Переглянути джерело

edit staff update : diable history btn

tags/Baseline_180220205_Frontend
MSI\derek 10 місяці тому
джерело
коміт
3b7d354d87
1 змінених файлів з 9 додано та 5 видалено
  1. +9
    -5
      src/components/EditStaff/StaffInfo.tsx

+ 9
- 5
src/components/EditStaff/StaffInfo.tsx Переглянути файл

@@ -82,7 +82,7 @@ const StaffInfo: React.FC<Props> = ({ combos }) => {
// reset,
resetField,
setValue,
// getValues,
getValues,
watch,
clearErrors,
} = useFormContext<CreateStaffInputs & { salaryEffectiveInfo: SalaryEffectiveInfo[] }>();
@@ -319,7 +319,9 @@ const StaffInfo: React.FC<Props> = ({ combos }) => {
</MenuItem>
))}
</Select>
<Button variant="contained" size="small" onClick={toggleTeamModal}>
<Button variant="contained" size="small" onClick={toggleTeamModal}
disabled={getValues("teamHistory").length == 0}
>
{t("Team History")}
</Button>
</Box>
@@ -354,7 +356,7 @@ const StaffInfo: React.FC<Props> = ({ combos }) => {
</Grid>
<Grid item xs={6}>
<FormControl fullWidth>
<InputLabel>{t("Grade")}</InputLabel>
<InputLabel required>{t("Grade")}</InputLabel>
<Controller
control={control}
name="gradeId"
@@ -372,7 +374,8 @@ const StaffInfo: React.FC<Props> = ({ combos }) => {
</MenuItem>
))}
</Select>
<Button variant="contained" size="small" onClick={toggleGradeModal}>
<Button variant="contained" size="small" onClick={toggleGradeModal}
disabled={getValues("gradeHistory").length == 0}>
{t("Grade History")}
</Button>
</Box>
@@ -439,7 +442,8 @@ const StaffInfo: React.FC<Props> = ({ combos }) => {
</MenuItem>
))}
</Select>
<Button variant="contained" size="small" onClick={togglePositionModal}>
<Button variant="contained" size="small" onClick={togglePositionModal}
disabled={getValues("positionHistory").length == 0}>
{t("Position History")}
</Button>
</Box>


Завантаження…
Відмінити
Зберегти