fitur is reversal
This commit is contained in:
@@ -78,15 +78,13 @@ export default function FormEdit({ isEdit, currentClaim }: Props) {
|
||||
);
|
||||
|
||||
|
||||
const [date, setDate] = useState(currentClaim?.submission_date)
|
||||
const [date, setDate] = useState(currentClaim?.submission_date ? fDateTimesecond(currentClaim?.submission_date) : null)
|
||||
const id = currentClaim?.id
|
||||
|
||||
useEffect(() => {
|
||||
setDate(currentClaim?.submission_date)
|
||||
}, [currentClaim]);
|
||||
|
||||
console.log(date);
|
||||
|
||||
useEffect(() => {
|
||||
if (isEdit && currentClaim) {
|
||||
reset(defaultValues);
|
||||
@@ -254,7 +252,6 @@ export default function FormEdit({ isEdit, currentClaim }: Props) {
|
||||
</Stack>
|
||||
)
|
||||
|
||||
|
||||
return (
|
||||
<FormProvider methods={methods} onSubmit={handleSubmit(onSubmit)}>
|
||||
<Stack direction="row" alignItems="center" sx={{ mb: 5 }}>
|
||||
@@ -310,10 +307,14 @@ export default function FormEdit({ isEdit, currentClaim }: Props) {
|
||||
<RHFDateTimePicker
|
||||
{...field}
|
||||
label="Date of Submission"
|
||||
value={field.value || null}
|
||||
onChange={() => setDate(field.value)}
|
||||
value={field.value}
|
||||
onChange={() =>
|
||||
setDate(field.value)
|
||||
}
|
||||
dateFormat='dd MMM yyyy HH:mm:ss'
|
||||
/>
|
||||
)}
|
||||
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item xs={3}>
|
||||
|
||||
Reference in New Issue
Block a user