IO-1853 Change attendance recipe type to text.

This commit is contained in:
Patrick Fic
2022-05-06 14:30:26 -07:00
parent 09d54722f0
commit cf23266831
2 changed files with 7 additions and 2 deletions

View File

@@ -28,7 +28,7 @@ export default function TimeTicketsAttendanceTable() {
}, },
}, },
{}, {},
"x" "text"
); );
setLoading(false); setLoading(false);

View File

@@ -18,7 +18,8 @@ export default async function RenderTemplate(
templateObject, templateObject,
bodyshop, bodyshop,
renderAsHtml = false, renderAsHtml = false,
renderAsExcel = false renderAsExcel = false,
renderAsText = false
) { ) {
//Query assets that match the template name. Must be in format <<templateName>>.query //Query assets that match the template name. Must be in format <<templateName>>.query
let { contextData, useShopSpecificTemplate } = await fetchContextData( let { contextData, useShopSpecificTemplate } = await fetchContextData(
@@ -54,6 +55,7 @@ export default async function RenderTemplate(
}), }),
}), }),
...(renderAsExcel ? { recipe: "html-to-xlsx" } : {}), ...(renderAsExcel ? { recipe: "html-to-xlsx" } : {}),
...(renderAsText ? { recipe: "text" } : {}),
}, },
data: { data: {
...contextData, ...contextData,
@@ -254,6 +256,9 @@ export const GenerateDocument = async (
} else if (sendType === "x") { } else if (sendType === "x") {
console.log("excel"); console.log("excel");
await RenderTemplate(template, bodyshop, false, true); await RenderTemplate(template, bodyshop, false, true);
} else if (sendType === "x") {
console.log("text");
await RenderTemplate(template, bodyshop, false, false, true);
} else { } else {
await RenderTemplate(template, bodyshop); await RenderTemplate(template, bodyshop);
} }