PromucFlow_constructor/app/client/src/actions/orgActions.ts
Rishabh Rathod a9f16d75bd
Enable Autocomplete for Static Objects (#6302)
* Remove type from COLORS constant

* Remove type from InputTypes in InputWidget

* Remove type from ReduxActionTypes

* Remove type from ReduxErrorActionTypes

* Remove type from SocialLoginTypes

* Fix widget actions issues

* Remove OPEN_SUB_PANE commented redux action
2021-08-03 13:36:48 +05:30

77 lines
1.5 KiB
TypeScript

import { ReduxActionTypes } from "constants/ReduxActionConstants";
import { SaveOrgLogo, SaveOrgRequest } from "api/OrgApi";
export const fetchOrg = (orgId: string, skipValidation?: boolean) => {
return {
type: ReduxActionTypes.FETCH_CURRENT_ORG,
payload: {
orgId,
skipValidation,
},
};
};
export const changeOrgUserRole = (
orgId: string,
role: string,
username: string,
) => {
return {
type: ReduxActionTypes.CHANGE_ORG_USER_ROLE_INIT,
payload: {
orgId,
role,
username,
},
};
};
export const deleteOrgUser = (orgId: string, username: string) => {
return {
type: ReduxActionTypes.DELETE_ORG_USER_INIT,
payload: {
orgId,
username,
},
};
};
export const fetchUsersForOrg = (orgId: string) => {
return {
type: ReduxActionTypes.FETCH_ALL_USERS_INIT,
payload: {
orgId,
},
};
};
export const fetchRolesForOrg = (orgId: string) => {
return {
type: ReduxActionTypes.FETCH_ALL_ROLES_INIT,
payload: {
orgId,
},
};
};
export const saveOrg = (orgSettings: SaveOrgRequest) => {
return {
type: ReduxActionTypes.SAVE_ORG_INIT,
payload: orgSettings,
};
};
export const uploadOrgLogo = (orgLogo: SaveOrgLogo) => {
return {
type: ReduxActionTypes.UPLOAD_ORG_LOGO,
payload: orgLogo,
};
};
export const deleteOrgLogo = (id: string) => {
return {
type: ReduxActionTypes.REMOVE_ORG_LOGO,
payload: {
id: id,
},
};
};