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