|
|
@@ -68,6 +68,12 @@ const StaffSearch: React.FC<Props> = ({ staff, teams, grades, positions, abiliti |
|
|
|
type: "select", |
|
|
|
options: positionCombo, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: t("Active"), |
|
|
|
paramName: "active", |
|
|
|
type: "select", |
|
|
|
options: ["true", "false"], |
|
|
|
}, |
|
|
|
], |
|
|
|
[t] |
|
|
|
); |
|
|
@@ -121,14 +127,19 @@ const StaffSearch: React.FC<Props> = ({ staff, teams, grades, positions, abiliti |
|
|
|
{ name: "staffId", label: t("Staff ID") }, |
|
|
|
{ name: "grade", label: t("Grade") }, |
|
|
|
{ name: "currentPosition", label: t("Current Position") }, |
|
|
|
{ |
|
|
|
name: "action", |
|
|
|
label: t("Actions"), |
|
|
|
onClick: deleteClick, |
|
|
|
buttonIcon: <DeleteIcon />, |
|
|
|
color: "error", |
|
|
|
isHidden: !maintainStaff, |
|
|
|
{ |
|
|
|
name: "active", |
|
|
|
label: t("Active"), |
|
|
|
type: "checkbox" |
|
|
|
}, |
|
|
|
// { |
|
|
|
// name: "action", |
|
|
|
// label: t("Actions"), |
|
|
|
// onClick: deleteClick, |
|
|
|
// buttonIcon: <DeleteIcon />, |
|
|
|
// color: "error", |
|
|
|
// isHidden: !maintainStaff, |
|
|
|
// }, |
|
|
|
], |
|
|
|
[t, onStaffClick, deleteClick] |
|
|
|
); |
|
|
@@ -148,6 +159,7 @@ const StaffSearch: React.FC<Props> = ({ staff, teams, grades, positions, abiliti |
|
|
|
&& (query.team === "All" || s.teamId === teams[teamCombo.findIndex(team => team === query.team)].id) |
|
|
|
&& (query.grade === "All" || s.grade === query.grade) |
|
|
|
&& (query.currentPosition === "All" || s.currentPosition === query.currentPosition) |
|
|
|
&& (query.active === "All" || s.active.toString() === query.active) |
|
|
|
) |
|
|
|
); |
|
|
|
}} |
|
|
|