|
|
@@ -8,7 +8,7 @@ const genderOptions = [
|
|
|
const typeEnum = {
|
|
|
NATUREIDS: 'natureIds',
|
|
|
GENDER: 'gender',
|
|
|
- DEPARTMENTS: 'departments'
|
|
|
+ DEPARTMENTS: 'category'
|
|
|
}
|
|
|
|
|
|
export default function useOptions(type) {
|
|
|
@@ -24,7 +24,7 @@ export default function useOptions(type) {
|
|
|
}
|
|
|
}
|
|
|
if (type === typeEnum.DEPARTMENTS) {
|
|
|
- if (!store.getState().staff.natures.length) {
|
|
|
+ if (!store.getState().staff.departments.length) {
|
|
|
dispatch({
|
|
|
type: 'staff/fetchDepartments'
|
|
|
})
|
|
|
@@ -38,7 +38,7 @@ export default function useOptions(type) {
|
|
|
return store.getState().customer.natures
|
|
|
}
|
|
|
if (type === typeEnum.DEPARTMENTS) {
|
|
|
- return store.getState().staff.natures
|
|
|
+ return store.getState().staff.departments
|
|
|
}
|
|
|
return null
|
|
|
}
|