Fix report creation form

This commit is contained in:
Viet Anh Nguyen 2024-03-07 11:02:41 +07:00
parent b10d10edcb
commit 01596e3222

View File

@ -35,7 +35,6 @@ const ReportsPage = () => {
}) })
.then((data) => { .then((data) => {
if (!!data && data?.report_id) { if (!!data && data?.report_id) {
form.resetFields();
setIsModalOpen(false); setIsModalOpen(false);
window.location.reload(); window.location.reload();
} }
@ -53,8 +52,6 @@ const ReportsPage = () => {
setIsModalOpen(false); setIsModalOpen(false);
}; };
form.setFieldsValue({reportType: "accuracy"})
return ( return (
<> <>
<SbtPageHeader <SbtPageHeader
@ -111,6 +108,7 @@ const ReportsPage = () => {
message: 'Please select a subsidiary', message: 'Please select a subsidiary',
}, },
]} ]}
initialValue={'SEAO'}
> >
<Select <Select
placeholder='Select a subsidiary' placeholder='Select a subsidiary'
@ -136,16 +134,15 @@ const ReportsPage = () => {
message: 'Please select a type', message: 'Please select a type',
}, },
]} ]}
initialValue={'accuracy'}
> >
<Select <Select
placeholder='Select a report type' placeholder='Select a report type'
style={{ width: 200 }} style={{ width: 200 }}
options={[ options={[
{ value: 'billing', label: 'billing' }, { value: 'billing', label: 'Billing' },
{ value: 'accuracy', label: 'accuracy' }, { value: 'accuracy', label: 'Accuracy' },
]} ]}
// defaultValue='accuracy'
/> />
</Form.Item> </Form.Item>
</Form> </Form>