- Remove console.log statements

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-02-15 10:58:19 -05:00
parent 2584f7129c
commit a635725839

View File

@@ -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) {