IO-1853 Change attendance recipe type to text.
This commit is contained in:
@@ -28,7 +28,7 @@ export default function TimeTicketsAttendanceTable() {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{},
|
{},
|
||||||
"x"
|
"text"
|
||||||
);
|
);
|
||||||
|
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user