Removed nivo package. Added saving info on multiple time ticket entry with issues BOD-224

This commit is contained in:
Patrick Fic
2020-08-04 16:37:16 -07:00
parent e8e7e76473
commit 0af4ffc9f0
6 changed files with 30 additions and 254 deletions

View File

@@ -73,7 +73,11 @@ export function TimeTicketModalContainer({
});
if (timeTicketModal.actions.refetch) timeTicketModal.actions.refetch();
if (enterAgain) {
//Capture the existing information and repopulate it.
const prev = form.getFieldsValue(["jobid", "employeeid", "date"]);
form.resetFields();
form.setFieldsValue(prev);
} else {
toggleModalVisible();
}
@@ -151,16 +155,18 @@ export function TimeTicketModalContainer({
</Button>
{timeTicketModal.context && timeTicketModal.context.id ? null : (
<Button
type='primary'
type="primary"
onClick={() => {
setEnterAgain(true);
}}>
}}
>
{t("general.actions.saveandnew")}
</Button>
)}
</span>
}
destroyOnClose>
destroyOnClose
>
<Form
onFinish={handleFinish}
autoComplete={"off"}
@@ -179,7 +185,8 @@ export function TimeTicketModalContainer({
}
: { jobid: timeTicketModal.context.jobId || null }
}
onValuesChange={handleFieldsChange}>
onValuesChange={handleFieldsChange}
>
<TimeTicketModalComponent
form={form}
roAutoCompleteOptions={RoAutoCompleteData && RoAutoCompleteData.jobs}