Added deleting of custom templates for BOD-85.
This commit is contained in:
@@ -12,9 +12,12 @@ export default async function RenderTemplate(templateObject, client, bodyshop) {
|
||||
let templateToUse;
|
||||
|
||||
if (templateRecords.templates.length === 1) {
|
||||
console.log("[ITE] Using OOTB template.");
|
||||
templateToUse = templateRecords.templates[0];
|
||||
} else if (templateRecords.templates.length === 2) {
|
||||
templateToUse = templateRecords.templates.filter((t) => !!t.bodyshopid);
|
||||
console.log("[ITE] Found custom template.");
|
||||
templateToUse = templateRecords.templates.filter((t) => !!t.bodyshopid)[0];
|
||||
console.log("templateToUse", templateToUse);
|
||||
} else {
|
||||
//No template found.Uh oh.
|
||||
alert("Template key does not exist.");
|
||||
|
||||
Reference in New Issue
Block a user