Addded parts order modal updates & translations
This commit is contained in:
@@ -130,6 +130,7 @@ export function PartsOrderModalContainer({
|
||||
actual_price: 0,
|
||||
actual_cost: 0,
|
||||
line_desc: p.line_desc,
|
||||
line_remarks: p.line_remarks,
|
||||
quantity: p.quantity || 1,
|
||||
cost_center:
|
||||
bodyshop.md_responsibility_centers.defaults.PAO || "Other*",
|
||||
@@ -147,10 +148,15 @@ export function PartsOrderModalContainer({
|
||||
toggleModalVisible();
|
||||
|
||||
if (sendType === "e") {
|
||||
const matchingVendor = data.vendors.filter(
|
||||
(item) => item.id === values.vendorid
|
||||
)[0];
|
||||
setEmailOptions({
|
||||
messageOptions: {
|
||||
to: [data.vendors.filter((item) => item.id === values.id)[0]] || null,
|
||||
to: matchingVendor ? [matchingVendor.email] : null,
|
||||
replyTo: bodyshop.email,
|
||||
subject: TemplateList("job", bodyshop.shopname)
|
||||
.parts_order_confirmation.subject,
|
||||
},
|
||||
template: {
|
||||
name: isReturn
|
||||
|
||||
@@ -47,7 +47,11 @@ function VendorsFormContainer({ refetch, bodyshop }) {
|
||||
message: t("vendors.successes.deleted"),
|
||||
});
|
||||
//TODO Better way to reset the field decorators?
|
||||
if (refetch) refetch().then((r) => form.resetFields());
|
||||
if (refetch)
|
||||
refetch().then((r) => {
|
||||
form.resetFields();
|
||||
form.resetFields();
|
||||
});
|
||||
setFormLoading(false);
|
||||
})
|
||||
.catch((error) => {
|
||||
@@ -71,7 +75,11 @@ function VendorsFormContainer({ refetch, bodyshop }) {
|
||||
message: t("vendors.successes.saved"),
|
||||
});
|
||||
//TODO Better way to reset the field decorators?
|
||||
if (refetch) refetch().form.resetFields();
|
||||
if (refetch)
|
||||
refetch().then(() => {
|
||||
form.resetFields();
|
||||
form.resetFields();
|
||||
});
|
||||
setFormLoading(false);
|
||||
})
|
||||
.catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user