* Members and org settings page. * Adding link back to applications * Making UI look better. * Fixing some more css * Table dropdown onBlur, UI transparency, Popover issue fixed. Added sort arrow (#413) * table dropdown ui issue and onblur click fixed * position props value fixed * tabs tripple click fixed * Position props in table dropdown made optional * tabs background color bug removed * General settings page is bug free. * Getting the manage users page to work. * Moving general settings into its own file. * Removing some unwanted URLs * User cant change their role or remove themselves * Changing onClick prop for Icon. * Fixing tests * Added loading states to text inputs. * Added validators for text input * Fixed border of skeleton for text input * Adding a loader for Members screen * Adding Noop to icon button * Removing console.log * Fixing imports. * Moving org reducer to immer. * Using utils email validator. * Removing placeholder from text input props. Co-authored-by: devrk96 <rohit.kumawat@primathon.in>
69 lines
1.3 KiB
TypeScript
69 lines
1.3 KiB
TypeScript
import { ReduxActionTypes } from "constants/ReduxActionConstants";
|
|
import { SaveOrgRequest } from "api/OrgApi";
|
|
|
|
export const fetchOrg = (orgId: string) => {
|
|
return {
|
|
type: ReduxActionTypes.FETCH_CURRENT_ORG,
|
|
payload: {
|
|
orgId,
|
|
},
|
|
};
|
|
};
|
|
|
|
export const changeOrgName = (name: string) => {
|
|
return {
|
|
type: ReduxActionTypes.UPDATE_ORG_NAME_INIT,
|
|
payload: {
|
|
name,
|
|
},
|
|
};
|
|
};
|
|
|
|
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,
|
|
};
|
|
};
|