IO-934 Refactor some search select fields & save employee on new ticket

This commit is contained in:
Patrick Fic
2021-04-26 14:57:04 -07:00
parent 438692ea7c
commit 485e1c4497
3 changed files with 17 additions and 38 deletions

View File

@@ -92,9 +92,14 @@ export function TimeTicketModalContainer({
if (enterAgain) {
//Capture the existing information and repopulate it.
const prev = form.getFieldsValue(["date"]);
const prev = form.getFieldsValue(["date", "employeeid"]);
console.log(
"🚀 ~ file: time-ticket-modal.container.jsx ~ line 96 ~ prev",
prev
);
form.resetFields();
form.setFieldsValue(prev);
} else {
toggleModalVisible();
@@ -177,6 +182,7 @@ export function TimeTicketModalContainer({
{timeTicketModal.context && timeTicketModal.context.id ? null : (
<Button
type="primary"
htmlType="submit"
onClick={() => {
setEnterAgain(true);
}}