diff --git a/helpers/functions.print.js b/helpers/functions.print.js index 593be019..bbf0660c 100644 --- a/helpers/functions.print.js +++ b/helpers/functions.print.js @@ -1,7 +1,7 @@ -import * as configFunctions from './functions.config.js'; import { getLot } from '../database/getLot.js'; import { getLotOccupancy } from '../database/getLotOccupancy.js'; import { getWorkOrder } from '../database/getWorkOrder.js'; +import * as configFunctions from './functions.config.js'; const screenPrintConfigs = { lotOccupancy: { title: `${configFunctions.getProperty('aliases.lot')} ${configFunctions.getProperty('aliases.occupancy')} Print`, diff --git a/helpers/functions.print.ts b/helpers/functions.print.ts index 9de0c784..c53366b5 100644 --- a/helpers/functions.print.ts +++ b/helpers/functions.print.ts @@ -1,9 +1,9 @@ -import * as configFunctions from './functions.config.js' - import { getLot } from '../database/getLot.js' import { getLotOccupancy } from '../database/getLotOccupancy.js' import { getWorkOrder } from '../database/getWorkOrder.js' +import * as configFunctions from './functions.config.js' + interface PrintConfig { title: string params: string[] diff --git a/helpers/functions.sqlFilters.js b/helpers/functions.sqlFilters.js index ac62ad56..2b2c381c 100644 --- a/helpers/functions.sqlFilters.js +++ b/helpers/functions.sqlFilters.js @@ -5,12 +5,12 @@ export function getLotNameWhereClause(lotName = '', lotNameSearchType, lotsTable if (lotName !== '') { switch (lotNameSearchType) { case 'startsWith': { - sqlWhereClause += ' and ' + lotsTableAlias + ".lotName like ? || '%'"; + sqlWhereClause += ` and ${lotsTableAlias}.lotName like ? || '%'`; sqlParameters.push(lotName); break; } case 'endsWith': { - sqlWhereClause += ' and ' + lotsTableAlias + ".lotName like '%' || ?"; + sqlWhereClause += ` and ${lotsTableAlias}.lotName like '%' || ?`; sqlParameters.push(lotName); break; } diff --git a/helpers/functions.sqlFilters.ts b/helpers/functions.sqlFilters.ts index 7272eb7b..a8a44247 100644 --- a/helpers/functions.sqlFilters.ts +++ b/helpers/functions.sqlFilters.ts @@ -18,12 +18,12 @@ export function getLotNameWhereClause( if (lotName !== '') { switch (lotNameSearchType) { case 'startsWith': { - sqlWhereClause += ' and ' + lotsTableAlias + ".lotName like ? || '%'" + sqlWhereClause += ` and ${lotsTableAlias}.lotName like ? || '%'` sqlParameters.push(lotName) break } case 'endsWith': { - sqlWhereClause += ' and ' + lotsTableAlias + ".lotName like '%' || ?" + sqlWhereClause += ` and ${lotsTableAlias}.lotName like '%' || ?` sqlParameters.push(lotName) break }