IO-1044 Dynamic fields on time ticket modal
This commit is contained in:
@@ -34,6 +34,7 @@ export function TimeTicketModalComponent({
|
||||
bodyshop,
|
||||
authLevel,
|
||||
employeeAutoCompleteOptions,
|
||||
isEdit,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
@@ -158,28 +159,33 @@ export function TimeTicketModalComponent({
|
||||
<Form.Item label={t("timetickets.fields.actualhrs")} name="actualhrs">
|
||||
<InputNumber min={0} precision={1} />
|
||||
</Form.Item>
|
||||
<Form.Item label={t("timetickets.fields.clockon")} name="clockon">
|
||||
<FormDateTimePicker
|
||||
disabled={
|
||||
!HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel,
|
||||
action: "timetickets:shiftedit",
|
||||
})
|
||||
}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("timetickets.fields.clockoff")} name="clockoff">
|
||||
<FormDateTimePicker
|
||||
disabled={
|
||||
!HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel,
|
||||
action: "timetickets:shiftedit",
|
||||
})
|
||||
}
|
||||
/>
|
||||
</Form.Item>
|
||||
{isEdit && (
|
||||
<>
|
||||
<Form.Item label={t("timetickets.fields.clockon")} name="clockon">
|
||||
<FormDateTimePicker
|
||||
disabled={
|
||||
!HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel,
|
||||
action: "timetickets:shiftedit",
|
||||
})
|
||||
}
|
||||
/>
|
||||
</Form.Item>
|
||||
<Form.Item label={t("timetickets.fields.clockoff")} name="clockoff">
|
||||
<FormDateTimePicker
|
||||
disabled={
|
||||
!HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel,
|
||||
action: "timetickets:shiftedit",
|
||||
})
|
||||
}
|
||||
/>
|
||||
</Form.Item>
|
||||
</>
|
||||
)}
|
||||
|
||||
<Form.Item label={t("timetickets.fields.memo")} name="memo">
|
||||
<MemoInput />
|
||||
</Form.Item>
|
||||
|
||||
Reference in New Issue
Block a user