- Remove console.log statements
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -361,7 +361,6 @@ export const fetchFilterData = async ({name}) => {
|
||||
};
|
||||
|
||||
const fetchContextData = async (templateObject, jsrAuth) => {
|
||||
console.log(' FETCH CONTEXT DATA !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
||||
const bodyshop = store.getState().user.bodyshop;
|
||||
|
||||
jsreport.headers["FirebaseAuthorization"] =
|
||||
@@ -399,15 +398,15 @@ const fetchContextData = async (templateObject, jsrAuth) => {
|
||||
templateQueryToExecute = atob(generalTemplate.content);
|
||||
}
|
||||
|
||||
console.log('Template Object');
|
||||
console.dir(templateObject);
|
||||
console.log('Unmodified Query');
|
||||
console.dir(templateQueryToExecute);
|
||||
// Commented out for future revision debugging
|
||||
// console.log('Template Object');
|
||||
// console.dir(templateObject);
|
||||
// console.log('Unmodified Query');
|
||||
// console.dir(templateQueryToExecute);
|
||||
|
||||
|
||||
// We have no template filters or sorters, so we can just execute the query and return the data
|
||||
if ((!templateObject?.filters && !templateObject?.filters?.length && !templateObject?.sorters && !templateObject?.sorters?.length)) {
|
||||
console.log('No filters or sorters');
|
||||
let contextData = {};
|
||||
if (templateQueryToExecute) {
|
||||
const {data} = await client.query({
|
||||
@@ -426,20 +425,19 @@ const fetchContextData = async (templateObject, jsrAuth) => {
|
||||
let filterFields = [];
|
||||
|
||||
if (templateObject?.filters && templateObject?.filters?.length) {
|
||||
console.log('Applying filters')
|
||||
applyFilters(ast, templateObject.filters, filterFields);
|
||||
wrapFiltersInAnd(ast, filterFields);
|
||||
}
|
||||
|
||||
if (templateObject?.sorters && templateObject?.sorters?.length) {
|
||||
console.log('Applying sorters')
|
||||
applySorters(ast, templateObject.sorters);
|
||||
}
|
||||
|
||||
const finalQuery = printQuery(ast);
|
||||
|
||||
console.log('Modified Query');
|
||||
console.log(finalQuery);
|
||||
// commented out for future revision debugging
|
||||
// console.log('Modified Query');
|
||||
// console.log(finalQuery);
|
||||
|
||||
let contextData = {};
|
||||
if (templateQueryToExecute) {
|
||||
|
||||
Reference in New Issue
Block a user