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);

View File

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