feat(hr): grey out attendance fields if no shift is assigned
This commit is contained in:
@@ -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') },
|
||||
|
||||
Reference in New Issue
Block a user