Modified how template list is generated to be a function to allow checking whether the templates can be printed.

This commit is contained in:
Patrick Fic
2020-09-11 14:43:04 -07:00
parent 984c001bd8
commit f7e74c5043
20 changed files with 167 additions and 207 deletions

View File

@@ -89,7 +89,7 @@ export function JobsDetailHeaderCsi({
replyTo: bodyshop.email,
},
template: {
name: TemplateList.csi_invitation.key,
name: TemplateList().csi_invitation.key,
variables: {
id: result.data.insert_csi.returning[0].id,
},
@@ -108,14 +108,16 @@ export function JobsDetailHeaderCsi({
<Menu.SubMenu title={t("jobs.actions.sendcsi")} {...props}>
<Menu.Item
onClick={handleCreateCsi}
key='email'
disabled={!!!job.ownr_ea}>
key="email"
disabled={!!!job.ownr_ea}
>
{t("general.labels.email")}
</Menu.Item>
<Menu.Item
onClick={handleCreateCsi}
key='text'
disabled={!!!job.ownr_ph1}>
key="text"
disabled={!!!job.ownr_ph1}
>
{t("general.labels.text")}
</Menu.Item>
<Menu.Divider />