Fixed job costing bugs. BOD-247

This commit is contained in:
Patrick Fic
2020-08-11 13:26:53 -07:00
parent 1715c08296
commit 1e3bf19cd3
12 changed files with 134 additions and 27 deletions

View File

@@ -57,9 +57,14 @@ export function TimeTicketModalContainer({
.then(handleMutationSuccess)
.catch(handleMutationError);
} else {
//Get selected employee rate.
const rate = EmployeeAutoCompleteData.employees.filter(
(i) => i.id === values.employeeid
)[0].base_rate;
insertTicket({
variables: {
timeTicketInput: [{ ...values, bodyshopid: bodyshop.id }],
timeTicketInput: [{ ...values, rate, bodyshopid: bodyshop.id }],
},
})
.then(handleMutationSuccess)