- 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) => {
|
const fetchContextData = async (templateObject, jsrAuth) => {
|
||||||
console.log(' FETCH CONTEXT DATA !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
|
||||||
const bodyshop = store.getState().user.bodyshop;
|
const bodyshop = store.getState().user.bodyshop;
|
||||||
|
|
||||||
jsreport.headers["FirebaseAuthorization"] =
|
jsreport.headers["FirebaseAuthorization"] =
|
||||||
@@ -399,15 +398,15 @@ const fetchContextData = async (templateObject, jsrAuth) => {
|
|||||||
templateQueryToExecute = atob(generalTemplate.content);
|
templateQueryToExecute = atob(generalTemplate.content);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('Template Object');
|
// Commented out for future revision debugging
|
||||||
console.dir(templateObject);
|
// console.log('Template Object');
|
||||||
console.log('Unmodified Query');
|
// console.dir(templateObject);
|
||||||
console.dir(templateQueryToExecute);
|
// 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
|
// 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)) {
|
if ((!templateObject?.filters && !templateObject?.filters?.length && !templateObject?.sorters && !templateObject?.sorters?.length)) {
|
||||||
console.log('No filters or sorters');
|
|
||||||
let contextData = {};
|
let contextData = {};
|
||||||
if (templateQueryToExecute) {
|
if (templateQueryToExecute) {
|
||||||
const {data} = await client.query({
|
const {data} = await client.query({
|
||||||
@@ -426,20 +425,19 @@ const fetchContextData = async (templateObject, jsrAuth) => {
|
|||||||
let filterFields = [];
|
let filterFields = [];
|
||||||
|
|
||||||
if (templateObject?.filters && templateObject?.filters?.length) {
|
if (templateObject?.filters && templateObject?.filters?.length) {
|
||||||
console.log('Applying filters')
|
|
||||||
applyFilters(ast, templateObject.filters, filterFields);
|
applyFilters(ast, templateObject.filters, filterFields);
|
||||||
wrapFiltersInAnd(ast, filterFields);
|
wrapFiltersInAnd(ast, filterFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (templateObject?.sorters && templateObject?.sorters?.length) {
|
if (templateObject?.sorters && templateObject?.sorters?.length) {
|
||||||
console.log('Applying sorters')
|
|
||||||
applySorters(ast, templateObject.sorters);
|
applySorters(ast, templateObject.sorters);
|
||||||
}
|
}
|
||||||
|
|
||||||
const finalQuery = printQuery(ast);
|
const finalQuery = printQuery(ast);
|
||||||
|
|
||||||
console.log('Modified Query');
|
// commented out for future revision debugging
|
||||||
console.log(finalQuery);
|
// console.log('Modified Query');
|
||||||
|
// console.log(finalQuery);
|
||||||
|
|
||||||
let contextData = {};
|
let contextData = {};
|
||||||
if (templateQueryToExecute) {
|
if (templateQueryToExecute) {
|
||||||
|
|||||||
Reference in New Issue
Block a user