Get basic modal view for editing/creating a new subuser working
This commit is contained in:
parent
8d52e2e1a7
commit
51c5cf4dbb
13 changed files with 293 additions and 186 deletions
|
@ -1,15 +1,21 @@
|
|||
import { SubuserPermission } from '@/state/server/subusers';
|
||||
import { action, Action, thunk, Thunk } from 'easy-peasy';
|
||||
import getSystemPermissions from '@/api/getSystemPermissions';
|
||||
|
||||
export interface PanelPermissions {
|
||||
[key: string]: {
|
||||
description: string;
|
||||
keys: { [k: string]: string };
|
||||
};
|
||||
}
|
||||
|
||||
export interface GloablPermissionsStore {
|
||||
data: SubuserPermission[];
|
||||
setPermissions: Action<GloablPermissionsStore, SubuserPermission[]>;
|
||||
data: PanelPermissions;
|
||||
setPermissions: Action<GloablPermissionsStore, PanelPermissions>;
|
||||
getPermissions: Thunk<GloablPermissionsStore, void, {}, any, Promise<void>>;
|
||||
}
|
||||
|
||||
const permissions: GloablPermissionsStore = {
|
||||
data: [],
|
||||
data: {},
|
||||
|
||||
setPermissions: action((state, payload) => {
|
||||
state.data = payload;
|
||||
|
|
Reference in a new issue