Modified how template list is generated to be a function to allow checking whether the templates can be printed.
This commit is contained in:
@@ -154,8 +154,8 @@ export function PartsOrderModalContainer({
|
||||
},
|
||||
template: {
|
||||
name: isReturn
|
||||
? TemplateList.parts_return_confirmation.key
|
||||
: TemplateList.parts_order_confirmation.key,
|
||||
? TemplateList().parts_return_confirmation.key
|
||||
: TemplateList().parts_order_confirmation.key,
|
||||
variables: {
|
||||
id: insertResult.data.insert_parts_orders.returning[0].id,
|
||||
},
|
||||
@@ -166,8 +166,8 @@ export function PartsOrderModalContainer({
|
||||
await RenderTemplate(
|
||||
{
|
||||
name: isReturn
|
||||
? TemplateList.parts_return_confirmation.key
|
||||
: TemplateList.parts_order_confirmation.key,
|
||||
? TemplateList().parts_return_confirmation.key
|
||||
: TemplateList().parts_order_confirmation.key,
|
||||
variables: {
|
||||
id: insertResult.data.insert_parts_orders.returning[0].id,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user