staff中加入staffBase

main
wuyize 2023-01-02 14:35:45 +08:00
parent 0fc89f7c50
commit e711d03dd6
2 changed files with 4 additions and 1 deletions

View File

@ -11,6 +11,7 @@ export interface Staff {
managingDepartment: Department|null;
staffDepartments: Department[];
staffName: string;
staffBase: string;
}
export interface Department {

View File

@ -30,10 +30,12 @@ const staffSlice = createSlice({
staffName: "",
managingDepartment: null as Department|null,
staffDepartments: [{ departmentId: 0,
departmentName: ''}]
departmentName: ''}],
staffBase: ''
},
reducers: {
setStaff: (state, action: PayloadAction<Staff>) => {
state.staffBase = action.payload.staffBase
state.staffName = action.payload.staffName
state.managingDepartment = action.payload.managingDepartment
state.staffDepartments = action.payload.staffDepartments