feat(hr): grey out attendance fields if no shift is assigned

This commit is contained in:
2026-04-28 17:47:15 +08:00
parent 7a8e6c9a31
commit 268b5e4635
412 changed files with 14232 additions and 14230 deletions

View File

@@ -476,6 +476,7 @@ export default function AttendanceCalendar() {
label: t('Clock In'),
type: 'time',
required: true,
disabled: !users?.find((e: any) => e.id.toString() === currentItem?.employee_id?.toString())?.shift,
row: 3,
width: '48%',
conditional: (_, data) => !['absent', 'on_leave', 'holiday'].includes(data?.status)
@@ -485,6 +486,7 @@ export default function AttendanceCalendar() {
label: t('Clock Out'),
type: 'time',
required: true,
disabled: !users?.find((e: any) => e.id.toString() === currentItem?.employee_id?.toString())?.shift,
row: 3,
width: '48%',
conditional: (_, data) => !['absent', 'on_leave', 'holiday'].includes(data?.status)
@@ -494,7 +496,7 @@ export default function AttendanceCalendar() {
label: t('Status'),
type: 'select',
required: true,
disabled: currentItem?.is_readonly,
disabled: currentItem?.is_readonly || !users?.find((e: any) => e.id.toString() === currentItem?.employee_id?.toString())?.shift,
options: [
{ value: 'present', label: t('Present') },
{ value: 'absent', label: t('Absent') },