JSR CHange
This commit is contained in:
@@ -209,17 +209,21 @@ const fetchContextData = async (templateObject) => {
|
|||||||
`${server}/odata/assets?$filter=name eq '${templateObject.name}.query'`
|
`${server}/odata/assets?$filter=name eq '${templateObject.name}.query'`
|
||||||
);
|
);
|
||||||
|
|
||||||
let templateQueryToExecute,
|
let templateQueryToExecute;
|
||||||
useShopSpecificTemplate = false;
|
let useShopSpecificTemplate = false;
|
||||||
// let shopSpecificTemplate;
|
// let shopSpecificTemplate;
|
||||||
|
|
||||||
if (shopSpecificFolder) {
|
if (shopSpecificFolder) {
|
||||||
let shopSpecificTemplate = jsReportQueries.data.value.find(
|
let shopSpecificTemplate = jsReportQueries.data.value.find(
|
||||||
(f) => f?.folder?.shortid === shopSpecificFolder.shortid
|
(f) => f?.folder?.shortid === shopSpecificFolder.shortid
|
||||||
);
|
);
|
||||||
useShopSpecificTemplate = true;
|
if (shopSpecificTemplate) {
|
||||||
templateQueryToExecute = atob(shopSpecificTemplate.content);
|
useShopSpecificTemplate = true;
|
||||||
} else {
|
templateQueryToExecute = atob(shopSpecificTemplate.content);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!templateQueryToExecute) {
|
||||||
const generalTemplate = jsReportQueries.data.value.find((f) => !f.folder);
|
const generalTemplate = jsReportQueries.data.value.find((f) => !f.folder);
|
||||||
useShopSpecificTemplate = false;
|
useShopSpecificTemplate = false;
|
||||||
templateQueryToExecute = atob(generalTemplate.content);
|
templateQueryToExecute = atob(generalTemplate.content);
|
||||||
|
|||||||
Reference in New Issue
Block a user