test-entity-library-asm 2.8.16 → 2.8.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,6 +55,8 @@ exports.CustomRepository = void 0;
55
55
  var typeorm_1 = require("typeorm");
56
56
  var utils_1 = require("./utils");
57
57
  var _1 = require(".");
58
+ var LocalsCompanyInformation_1 = require("./filters/LocalsCompanyInformation");
59
+ var VerifyLocalsInformation_1 = require("./filters/VerifyLocalsInformation");
58
60
  var CustomRepository = /** @class */ (function (_super) {
59
61
  __extends(CustomRepository, _super);
60
62
  function CustomRepository(target, dataSource) {
@@ -67,17 +69,17 @@ var CustomRepository = /** @class */ (function (_super) {
67
69
  return __generator(this, function (_d) {
68
70
  switch (_d.label) {
69
71
  case 0:
70
- queryBuilder = this.createQueryBuilder('verify_local')
72
+ queryBuilder = this.createQueryBuilder("verify_local")
71
73
  .skip(lazyEvent.first)
72
74
  .take(lazyEvent.rows);
73
75
  // Filtro global
74
- if (lazyEvent.filters['global'] && lazyEvent.filters['global'].value) {
75
- globalValue = "%".concat(lazyEvent.filters['global'].value.toLowerCase(), "%");
76
+ if (lazyEvent.filters["global"] && lazyEvent.filters["global"].value) {
77
+ globalValue = "%".concat(lazyEvent.filters["global"].value.toLowerCase(), "%");
76
78
  queryBuilder.andWhere('LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.local_information, "$.name"))) LIKE :globalValue OR LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.local_information, "$.addressElement"))) LIKE :globalValue', { globalValue: globalValue });
77
79
  }
78
80
  // Filtro por estado
79
81
  if (status !== null && status >= 0) {
80
- queryBuilder.andWhere('verify_local.status = :status', { status: status });
82
+ queryBuilder.andWhere("verify_local.status = :status", { status: status });
81
83
  }
82
84
  filters = lazyEvent.filters;
83
85
  Object.keys(filters).forEach(function (key) {
@@ -86,24 +88,24 @@ var CustomRepository = /** @class */ (function (_super) {
86
88
  if (filters[key] && filters[key].value) {
87
89
  var matchMode = filters[key].matchMode;
88
90
  var value = filters[key].value;
89
- if (key === 'status') {
90
- queryBuilder.andWhere('verify_local.status = :status', {
91
- status: (0, utils_1.getStatusVerifyLocalNumber)((_g = filters[key].value) !== null && _g !== void 0 ? _g : ''),
91
+ if (key === "status") {
92
+ queryBuilder.andWhere("verify_local.status = :status", {
93
+ status: (0, utils_1.getStatusVerifyLocalNumber)((_g = filters[key].value) !== null && _g !== void 0 ? _g : ""),
92
94
  });
93
95
  }
94
- else if (key === 'created') {
96
+ else if (key === "created") {
95
97
  switch (matchMode) {
96
- case 'dateIs':
98
+ case "dateIs":
97
99
  queryBuilder.andWhere("DATE(verify_local.created) = :created", {
98
100
  created: value,
99
101
  });
100
102
  break;
101
- case 'dateBefore':
103
+ case "dateBefore":
102
104
  queryBuilder.andWhere("DATE(verify_local.created) < :created", {
103
105
  created: value,
104
106
  });
105
107
  break;
106
- case 'dateAfter':
108
+ case "dateAfter":
107
109
  queryBuilder.andWhere("DATE(verify_local.created) > :created", {
108
110
  created: value,
109
111
  });
@@ -112,31 +114,31 @@ var CustomRepository = /** @class */ (function (_super) {
112
114
  break;
113
115
  }
114
116
  }
115
- else if (key !== 'global') {
117
+ else if (key !== "global") {
116
118
  var jsonPath = key
117
- .split('.')
119
+ .split(".")
118
120
  .slice(1)
119
121
  .map(function (segment) { return "$.".concat(segment); })
120
- .join('');
121
- var paramKey = key.split('.')[1];
122
+ .join("");
123
+ var paramKey = key.split(".")[1];
122
124
  switch (matchMode) {
123
- case 'contains':
124
- queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split('.')[0], ", \"").concat(jsonPath, "\"))) LIKE :").concat(paramKey), (_a = {}, _a[paramKey] = "%".concat(value, "%"), _a));
125
+ case "contains":
126
+ queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split(".")[0], ", \"").concat(jsonPath, "\"))) LIKE :").concat(paramKey), (_a = {}, _a[paramKey] = "%".concat(value, "%"), _a));
125
127
  break;
126
- case 'startsWith':
127
- queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split('.')[0], ", \"").concat(jsonPath, "\"))) LIKE :").concat(paramKey), (_b = {}, _b[paramKey] = "".concat(value, "%"), _b));
128
+ case "startsWith":
129
+ queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split(".")[0], ", \"").concat(jsonPath, "\"))) LIKE :").concat(paramKey), (_b = {}, _b[paramKey] = "".concat(value, "%"), _b));
128
130
  break;
129
- case 'notContains':
130
- queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split('.')[0], ", \"").concat(jsonPath, "\"))) NOT LIKE :").concat(paramKey), (_c = {}, _c[paramKey] = "%".concat(value, "%"), _c));
131
+ case "notContains":
132
+ queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split(".")[0], ", \"").concat(jsonPath, "\"))) NOT LIKE :").concat(paramKey), (_c = {}, _c[paramKey] = "%".concat(value, "%"), _c));
131
133
  break;
132
- case 'endsWith':
133
- queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split('.')[0], ", \"").concat(jsonPath, "\"))) LIKE :").concat(paramKey), (_d = {}, _d[paramKey] = "%".concat(value), _d));
134
+ case "endsWith":
135
+ queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split(".")[0], ", \"").concat(jsonPath, "\"))) LIKE :").concat(paramKey), (_d = {}, _d[paramKey] = "%".concat(value), _d));
134
136
  break;
135
- case 'equals':
136
- queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split('.')[0], ", \"").concat(jsonPath, "\"))) = :").concat(paramKey), (_e = {}, _e[paramKey] = value, _e));
137
+ case "equals":
138
+ queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split(".")[0], ", \"").concat(jsonPath, "\"))) = :").concat(paramKey), (_e = {}, _e[paramKey] = value, _e));
137
139
  break;
138
- case 'notEquals':
139
- queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split('.')[0], ", \"").concat(jsonPath, "\"))) != :").concat(paramKey), (_f = {}, _f[paramKey] = value, _f));
140
+ case "notEquals":
141
+ queryBuilder.andWhere("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.".concat(key.split(".")[0], ", \"").concat(jsonPath, "\"))) != :").concat(paramKey), (_f = {}, _f[paramKey] = value, _f));
140
142
  break;
141
143
  default:
142
144
  break;
@@ -146,13 +148,13 @@ var CustomRepository = /** @class */ (function (_super) {
146
148
  });
147
149
  // Ordenamiento
148
150
  if (lazyEvent.sortField) {
149
- order = lazyEvent.sortOrder === 1 ? 'ASC' : 'DESC';
150
- if (lazyEvent.sortField.startsWith('local_information.')) {
151
+ order = lazyEvent.sortOrder === 1 ? "ASC" : "DESC";
152
+ if (lazyEvent.sortField.startsWith("local_information.")) {
151
153
  jsonPath = lazyEvent.sortField
152
- .split('.')
154
+ .split(".")
153
155
  .slice(1)
154
156
  .map(function (segment) { return "$.".concat(segment); })
155
- .join('');
157
+ .join("");
156
158
  queryBuilder.orderBy("LOWER(JSON_UNQUOTE(JSON_EXTRACT(verify_local.local_information, '".concat(jsonPath, "')))"), order);
157
159
  }
158
160
  else {
@@ -178,27 +180,27 @@ var CustomRepository = /** @class */ (function (_super) {
178
180
  switch (_d.label) {
179
181
  case 0:
180
182
  timezone = (0, _1.getTimezoneOffset)((0, _1.getTimeZone)());
181
- queryBuilder = this.createQueryBuilder('discount_code_user')
183
+ queryBuilder = this.createQueryBuilder("discount_code_user")
182
184
  .skip(lazyEvent.first)
183
185
  .take(lazyEvent.rows);
184
186
  // DOC: Filtro global
185
- if (lazyEvent.filters['global'] && lazyEvent.filters['global'].value) {
186
- globalValue = "%".concat(lazyEvent.filters['global'].value.toLowerCase(), "%");
187
- queryBuilder.andWhere('(LOWER(discount_code_user.local_name) LIKE :globalValue OR LOWER(partner_surname) LIKE :globalValue OR LOWER(discount_code_user.code) LIKE :globalValue OR LOWER(discount_code_user.discount) LIKE :globalValue OR LOWER(partner_name) LIKE :globalValue)', {
187
+ if (lazyEvent.filters["global"] && lazyEvent.filters["global"].value) {
188
+ globalValue = "%".concat(lazyEvent.filters["global"].value.toLowerCase(), "%");
189
+ queryBuilder.andWhere("(LOWER(discount_code_user.local_name) LIKE :globalValue OR LOWER(partner_surname) LIKE :globalValue OR LOWER(discount_code_user.code) LIKE :globalValue OR LOWER(discount_code_user.discount) LIKE :globalValue OR LOWER(partner_name) LIKE :globalValue)", {
188
190
  globalValue: globalValue ||
189
- (0, utils_1.getStatusBasic)(lazyEvent.filters['global'].value.toLowerCase()) ||
190
- (0, utils_1.getSeverityNameDiscountType)(lazyEvent.filters['global'].value.toLowerCase()),
191
+ (0, utils_1.getStatusBasic)(lazyEvent.filters["global"].value.toLowerCase()) ||
192
+ (0, utils_1.getSeverityNameDiscountType)(lazyEvent.filters["global"].value.toLowerCase()),
191
193
  });
192
194
  }
193
195
  // DOC: Filtro por estado FILTRO POR DEFECTO
194
196
  if (status !== null && status >= 0) {
195
- queryBuilder.andWhere('discount_code_user.status = :status', {
197
+ queryBuilder.andWhere("discount_code_user.status = :status", {
196
198
  status: status,
197
199
  });
198
200
  }
199
201
  // DOC: Filtro por company FILTRO POR DEFECTO
200
202
  if (!!company && company >= 0) {
201
- queryBuilder.andWhere('discount_code_user.company = :company', {
203
+ queryBuilder.andWhere("discount_code_user.company = :company", {
202
204
  company: company,
203
205
  });
204
206
  }
@@ -208,16 +210,16 @@ var CustomRepository = /** @class */ (function (_super) {
208
210
  var _l, _m;
209
211
  var value = filters[key].value;
210
212
  if ((Array.isArray(value) && value.length > 0) ||
211
- (!Array.isArray(value) && value && key !== 'global')) {
213
+ (!Array.isArray(value) && value && key !== "global")) {
212
214
  var matchMode = filters[key].matchMode;
213
215
  if (!Array.isArray(value) && value) {
214
216
  value = filters[key].value.toLowerCase();
215
217
  }
216
- var accessKey = key.split('.').length > 1 ? "".concat(key) : "discount_code_user.".concat(key);
218
+ var accessKey = key.split(".").length > 1 ? "".concat(key) : "discount_code_user.".concat(key);
217
219
  switch (matchMode) {
218
- case 'custom':
219
- if ((key === 'number_of_times_used' || key === 'use_limit') &&
220
- matchMode === 'custom') {
220
+ case "custom":
221
+ if ((key === "number_of_times_used" || key === "use_limit") &&
222
+ matchMode === "custom") {
221
223
  var _o = value || [null, null], from = _o[0], to = _o[1];
222
224
  if (from !== null && to === null) {
223
225
  queryBuilder.andWhere("discount_code_user.".concat(key, " >= :from"), {
@@ -234,36 +236,36 @@ var CustomRepository = /** @class */ (function (_super) {
234
236
  }
235
237
  }
236
238
  break;
237
- case 'contains':
239
+ case "contains":
238
240
  queryBuilder.andWhere("".concat(accessKey, " LIKE :").concat(key), (_a = {},
239
241
  _a[key] = "%".concat(value, "%"),
240
242
  _a));
241
243
  break;
242
- case 'startsWith':
244
+ case "startsWith":
243
245
  queryBuilder.andWhere("".concat(accessKey, " LIKE :").concat(key), (_b = {},
244
246
  _b[key] = "".concat(value, "%"),
245
247
  _b));
246
248
  break;
247
- case 'endsWith':
249
+ case "endsWith":
248
250
  queryBuilder.andWhere("".concat(accessKey, " LIKE :").concat(key), (_c = {},
249
251
  _c[key] = "%".concat(value),
250
252
  _c));
251
253
  break;
252
- case 'equals':
253
- if (key === 'status') {
254
- queryBuilder.andWhere('discount_code_user.status = :status', {
255
- status: (0, utils_1.getStatusBasic)((_l = filters[key].value) !== null && _l !== void 0 ? _l : ''),
254
+ case "equals":
255
+ if (key === "status") {
256
+ queryBuilder.andWhere("discount_code_user.status = :status", {
257
+ status: (0, utils_1.getStatusBasic)((_l = filters[key].value) !== null && _l !== void 0 ? _l : ""),
256
258
  });
257
259
  }
258
- else if (key === 'typeText') {
259
- queryBuilder.andWhere('discount_code_user.type = :type', {
260
- type: (0, utils_1.getSeverityNameDiscountType)((_m = filters[key].value) !== null && _m !== void 0 ? _m : ''),
260
+ else if (key === "typeText") {
261
+ queryBuilder.andWhere("discount_code_user.type = :type", {
262
+ type: (0, utils_1.getSeverityNameDiscountType)((_m = filters[key].value) !== null && _m !== void 0 ? _m : ""),
261
263
  });
262
264
  }
263
- else if (key === 'updated_by') {
265
+ else if (key === "updated_by") {
264
266
  var updatedByIds = filters[key].value.map(function (element) { return element.id; });
265
267
  if (updatedByIds.length > 0) {
266
- queryBuilder.andWhere('discount_code_user.updated_by IN (:...updatedByIds)', {
268
+ queryBuilder.andWhere("discount_code_user.updated_by IN (:...updatedByIds)", {
267
269
  updatedByIds: updatedByIds,
268
270
  });
269
271
  }
@@ -274,50 +276,50 @@ var CustomRepository = /** @class */ (function (_super) {
274
276
  _d));
275
277
  }
276
278
  break;
277
- case 'notContains':
279
+ case "notContains":
278
280
  queryBuilder.andWhere("".concat(accessKey, " NOT LIKE :").concat(key), (_e = {},
279
281
  _e[key] = "%".concat(value, "%"),
280
282
  _e));
281
283
  break;
282
- case 'notEquals':
284
+ case "notEquals":
283
285
  queryBuilder.andWhere("".concat(accessKey, " != :").concat(key), (_f = {},
284
286
  _f[key] = value,
285
287
  _f));
286
288
  break;
287
- case 'dateIs':
288
- queryBuilder.andWhere("".concat(key !== 'expiration' && key !== 'start'
289
- ? 'DATE(CONVERT_TZ('
290
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
289
+ case "dateIs":
290
+ queryBuilder.andWhere("".concat(key !== "expiration" && key !== "start"
291
+ ? "DATE(CONVERT_TZ("
292
+ : "", " ").concat(accessKey, " ").concat(key !== "expiration" && key !== "start"
291
293
  ? ", '+00:00', '".concat(timezone, "'))")
292
- : '', " = :").concat(key), (_g = {},
293
- _g[key] = value.split('T')[0],
294
+ : "", " = :").concat(key), (_g = {},
295
+ _g[key] = value.split("T")[0],
294
296
  _g));
295
297
  break;
296
- case 'dateIsNot':
297
- queryBuilder.andWhere("".concat(key !== 'expiration' && key !== 'start'
298
- ? 'DATE(CONVERT_TZ('
299
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
298
+ case "dateIsNot":
299
+ queryBuilder.andWhere("".concat(key !== "expiration" && key !== "start"
300
+ ? "DATE(CONVERT_TZ("
301
+ : "", " ").concat(accessKey, " ").concat(key !== "expiration" && key !== "start"
300
302
  ? ", '+00:00', '".concat(timezone, "'))")
301
- : '', " != :").concat(key), (_h = {},
302
- _h[key] = value.split('T')[0],
303
+ : "", " != :").concat(key), (_h = {},
304
+ _h[key] = value.split("T")[0],
303
305
  _h));
304
306
  break;
305
- case 'dateBefore':
306
- queryBuilder.andWhere("".concat(key !== 'expiration' && key !== 'start'
307
- ? 'DATE(CONVERT_TZ('
308
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
307
+ case "dateBefore":
308
+ queryBuilder.andWhere("".concat(key !== "expiration" && key !== "start"
309
+ ? "DATE(CONVERT_TZ("
310
+ : "", " ").concat(accessKey, " ").concat(key !== "expiration" && key !== "start"
309
311
  ? ", '+00:00', '".concat(timezone, "'))")
310
- : '', " < :").concat(key), (_j = {},
311
- _j[key] = value.split('T')[0],
312
+ : "", " < :").concat(key), (_j = {},
313
+ _j[key] = value.split("T")[0],
312
314
  _j));
313
315
  break;
314
- case 'dateAfter':
315
- queryBuilder.andWhere("".concat(key !== 'expiration' && key !== 'start'
316
- ? 'DATE(CONVERT_TZ('
317
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
316
+ case "dateAfter":
317
+ queryBuilder.andWhere("".concat(key !== "expiration" && key !== "start"
318
+ ? "DATE(CONVERT_TZ("
319
+ : "", " ").concat(accessKey, " ").concat(key !== "expiration" && key !== "start"
318
320
  ? ", '+00:00', '".concat(timezone, "'))")
319
- : '', " > :").concat(key), (_k = {},
320
- _k[key] = value.split('T')[0],
321
+ : "", " > :").concat(key), (_k = {},
322
+ _k[key] = value.split("T")[0],
321
323
  _k));
322
324
  break;
323
325
  default:
@@ -327,15 +329,15 @@ var CustomRepository = /** @class */ (function (_super) {
327
329
  });
328
330
  // DOC: Ordenamiento
329
331
  if (lazyEvent.sortField) {
330
- order = lazyEvent.sortOrder === 1 ? 'ASC' : 'DESC';
331
- if (lazyEvent.sortField === 'local.name') {
332
+ order = lazyEvent.sortOrder === 1 ? "ASC" : "DESC";
333
+ if (lazyEvent.sortField === "local.name") {
332
334
  queryBuilder.orderBy("local.name", order);
333
335
  }
334
336
  else {
335
- if (lazyEvent.sortField === 'typeText') {
337
+ if (lazyEvent.sortField === "typeText") {
336
338
  queryBuilder.orderBy("discount_code_user.type", order);
337
339
  }
338
- else if (lazyEvent.sortField === 'status') {
340
+ else if (lazyEvent.sortField === "status") {
339
341
  queryBuilder.orderBy("discount_code_user.status", order);
340
342
  }
341
343
  else {
@@ -363,16 +365,16 @@ var CustomRepository = /** @class */ (function (_super) {
363
365
  case 0:
364
366
  _d.trys.push([0, 2, , 3]);
365
367
  timezone_1 = (0, _1.getTimezoneOffset)((0, _1.getTimeZone)());
366
- queryBuilder_1 = this.createQueryBuilder('discount')
367
- .leftJoinAndSelect('discount.updated_by', 'master')
368
+ queryBuilder_1 = this.createQueryBuilder("discount")
369
+ .leftJoinAndSelect("discount.updated_by", "master")
368
370
  .skip(lazyEvent.first)
369
371
  .take(lazyEvent.rows);
370
- if (lazyEvent.filters['global'] && lazyEvent.filters['global'].value) {
371
- globalValue = "%".concat(lazyEvent.filters['global'].value.toLowerCase(), "%");
372
- queryBuilder_1.andWhere('LOWER(discount.code) LIKE :globalValue OR LOWER(discount.discount) LIKE :globalValue OR LOWER(discount.use_limit) LIKE :globalValue OR LOWER(discount.repeat_days) LIKE :globalValue OR LOWER(discount.updated) LIKE :globalValue OR LOWER(discount.start) LIKE :globalValue OR LOWER(discount.created) LIKE :globalValue OR LOWER(discount.expiration) LIKE :globalValue OR LOWER(master.name) LIKE :globalValue OR LOWER(master.surname) LIKE :globalValue', {
372
+ if (lazyEvent.filters["global"] && lazyEvent.filters["global"].value) {
373
+ globalValue = "%".concat(lazyEvent.filters["global"].value.toLowerCase(), "%");
374
+ queryBuilder_1.andWhere("LOWER(discount.code) LIKE :globalValue OR LOWER(discount.discount) LIKE :globalValue OR LOWER(discount.use_limit) LIKE :globalValue OR LOWER(discount.repeat_days) LIKE :globalValue OR LOWER(discount.updated) LIKE :globalValue OR LOWER(discount.start) LIKE :globalValue OR LOWER(discount.created) LIKE :globalValue OR LOWER(discount.expiration) LIKE :globalValue OR LOWER(master.name) LIKE :globalValue OR LOWER(master.surname) LIKE :globalValue", {
373
375
  globalValue: globalValue ||
374
- (0, utils_1.getStatusBasic)(lazyEvent.filters['global'].value.toLowerCase()) ||
375
- (0, utils_1.getSeverityNameDiscountType)(lazyEvent.filters['global'].value.toLowerCase()),
376
+ (0, utils_1.getStatusBasic)(lazyEvent.filters["global"].value.toLowerCase()) ||
377
+ (0, utils_1.getSeverityNameDiscountType)(lazyEvent.filters["global"].value.toLowerCase()),
376
378
  });
377
379
  }
378
380
  filters_1 = lazyEvent.filters;
@@ -381,16 +383,16 @@ var CustomRepository = /** @class */ (function (_super) {
381
383
  var _l, _m;
382
384
  var value = filters_1[key].value;
383
385
  if ((Array.isArray(value) && value.length > 0) ||
384
- (!Array.isArray(value) && value && key !== 'global')) {
386
+ (!Array.isArray(value) && value && key !== "global")) {
385
387
  var matchMode = filters_1[key].matchMode;
386
388
  if (!Array.isArray(value) && value) {
387
389
  value = filters_1[key].value.toLowerCase();
388
390
  }
389
- var accessKey = key.split('.').length > 1 ? "".concat(key) : "discount.".concat(key);
391
+ var accessKey = key.split(".").length > 1 ? "".concat(key) : "discount.".concat(key);
390
392
  switch (matchMode) {
391
- case 'custom':
392
- if ((key === 'number_of_times_used' || key === 'use_limit') &&
393
- matchMode === 'custom') {
393
+ case "custom":
394
+ if ((key === "number_of_times_used" || key === "use_limit") &&
395
+ matchMode === "custom") {
394
396
  var _o = value || [null, null], from = _o[0], to = _o[1];
395
397
  if (from !== null && to === null) {
396
398
  queryBuilder_1.andWhere("discount.".concat(key, " >= :from"), {
@@ -410,36 +412,36 @@ var CustomRepository = /** @class */ (function (_super) {
410
412
  }
411
413
  }
412
414
  break;
413
- case 'contains':
415
+ case "contains":
414
416
  queryBuilder_1.andWhere("".concat(accessKey, " LIKE :").concat(key), (_a = {},
415
417
  _a[key] = "%".concat(value, "%"),
416
418
  _a));
417
419
  break;
418
- case 'startsWith':
420
+ case "startsWith":
419
421
  queryBuilder_1.andWhere("".concat(accessKey, " LIKE :").concat(key), (_b = {},
420
422
  _b[key] = "".concat(value, "%"),
421
423
  _b));
422
424
  break;
423
- case 'endsWith':
425
+ case "endsWith":
424
426
  queryBuilder_1.andWhere("".concat(accessKey, " LIKE :").concat(key), (_c = {},
425
427
  _c[key] = "%".concat(value),
426
428
  _c));
427
429
  break;
428
- case 'equals':
429
- if (key === 'status') {
430
- queryBuilder_1.andWhere('discount.status = :status', {
431
- status: (0, utils_1.getStatusBasic)((_l = filters_1[key].value) !== null && _l !== void 0 ? _l : ''),
430
+ case "equals":
431
+ if (key === "status") {
432
+ queryBuilder_1.andWhere("discount.status = :status", {
433
+ status: (0, utils_1.getStatusBasic)((_l = filters_1[key].value) !== null && _l !== void 0 ? _l : ""),
432
434
  });
433
435
  }
434
- else if (key === 'typeText') {
435
- queryBuilder_1.andWhere('discount.type = :type', {
436
- type: (0, utils_1.getSeverityNameDiscountType)((_m = filters_1[key].value) !== null && _m !== void 0 ? _m : ''),
436
+ else if (key === "typeText") {
437
+ queryBuilder_1.andWhere("discount.type = :type", {
438
+ type: (0, utils_1.getSeverityNameDiscountType)((_m = filters_1[key].value) !== null && _m !== void 0 ? _m : ""),
437
439
  });
438
440
  }
439
- else if (key === 'updated_by') {
441
+ else if (key === "updated_by") {
440
442
  var updatedByIds = filters_1[key].value.map(function (element) { return element.id; });
441
443
  if (updatedByIds.length > 0) {
442
- queryBuilder_1.andWhere('discount.updated_by IN (:...updatedByIds)', {
444
+ queryBuilder_1.andWhere("discount.updated_by IN (:...updatedByIds)", {
443
445
  updatedByIds: updatedByIds,
444
446
  });
445
447
  }
@@ -450,50 +452,50 @@ var CustomRepository = /** @class */ (function (_super) {
450
452
  _d));
451
453
  }
452
454
  break;
453
- case 'notContains':
455
+ case "notContains":
454
456
  queryBuilder_1.andWhere("".concat(accessKey, " NOT LIKE :").concat(key), (_e = {},
455
457
  _e[key] = "%".concat(value, "%"),
456
458
  _e));
457
459
  break;
458
- case 'notEquals':
460
+ case "notEquals":
459
461
  queryBuilder_1.andWhere("".concat(accessKey, " != :").concat(key), (_f = {},
460
462
  _f[key] = value,
461
463
  _f));
462
464
  break;
463
- case 'dateIs':
464
- queryBuilder_1.andWhere("".concat(key !== 'expiration' && key !== 'start'
465
- ? 'DATE(CONVERT_TZ('
466
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
465
+ case "dateIs":
466
+ queryBuilder_1.andWhere("".concat(key !== "expiration" && key !== "start"
467
+ ? "DATE(CONVERT_TZ("
468
+ : "", " ").concat(accessKey, " ").concat(key !== "expiration" && key !== "start"
467
469
  ? ", '+00:00', '".concat(timezone_1, "'))")
468
- : '', " = :").concat(key), (_g = {},
469
- _g[key] = value.split('T')[0],
470
+ : "", " = :").concat(key), (_g = {},
471
+ _g[key] = value.split("T")[0],
470
472
  _g));
471
473
  break;
472
- case 'dateIsNot':
473
- queryBuilder_1.andWhere("".concat(key !== 'expiration' && key !== 'start'
474
- ? 'DATE(CONVERT_TZ('
475
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
474
+ case "dateIsNot":
475
+ queryBuilder_1.andWhere("".concat(key !== "expiration" && key !== "start"
476
+ ? "DATE(CONVERT_TZ("
477
+ : "", " ").concat(accessKey, " ").concat(key !== "expiration" && key !== "start"
476
478
  ? ", '+00:00', '".concat(timezone_1, "'))")
477
- : '', " != :").concat(key), (_h = {},
478
- _h[key] = value.split('T')[0],
479
+ : "", " != :").concat(key), (_h = {},
480
+ _h[key] = value.split("T")[0],
479
481
  _h));
480
482
  break;
481
- case 'dateBefore':
482
- queryBuilder_1.andWhere("".concat(key !== 'expiration' && key !== 'start'
483
- ? 'DATE(CONVERT_TZ('
484
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
483
+ case "dateBefore":
484
+ queryBuilder_1.andWhere("".concat(key !== "expiration" && key !== "start"
485
+ ? "DATE(CONVERT_TZ("
486
+ : "", " ").concat(accessKey, " ").concat(key !== "expiration" && key !== "start"
485
487
  ? ", '+00:00', '".concat(timezone_1, "'))")
486
- : '', " < :").concat(key), (_j = {},
487
- _j[key] = value.split('T')[0],
488
+ : "", " < :").concat(key), (_j = {},
489
+ _j[key] = value.split("T")[0],
488
490
  _j));
489
491
  break;
490
- case 'dateAfter':
491
- queryBuilder_1.andWhere("".concat(key !== 'expiration' && key !== 'start'
492
- ? 'DATE(CONVERT_TZ('
493
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
492
+ case "dateAfter":
493
+ queryBuilder_1.andWhere("".concat(key !== "expiration" && key !== "start"
494
+ ? "DATE(CONVERT_TZ("
495
+ : "", " ").concat(accessKey, " ").concat(key !== "expiration" && key !== "start"
494
496
  ? ", '+00:00', '".concat(timezone_1, "'))")
495
- : '', " > :").concat(key), (_k = {},
496
- _k[key] = value.split('T')[0],
497
+ : "", " > :").concat(key), (_k = {},
498
+ _k[key] = value.split("T")[0],
497
499
  _k));
498
500
  break;
499
501
  default:
@@ -502,7 +504,7 @@ var CustomRepository = /** @class */ (function (_super) {
502
504
  }
503
505
  });
504
506
  if (lazyEvent.sortField) {
505
- order = lazyEvent.sortOrder === 1 ? 'ASC' : 'DESC';
507
+ order = lazyEvent.sortOrder === 1 ? "ASC" : "DESC";
506
508
  queryBuilder_1.orderBy("discount.".concat(lazyEvent.sortField), order);
507
509
  }
508
510
  return [4 /*yield*/, queryBuilder_1.getManyAndCount()];
@@ -520,195 +522,236 @@ var CustomRepository = /** @class */ (function (_super) {
520
522
  });
521
523
  });
522
524
  };
523
- CustomRepository.prototype.getLocalsCompanyInformation = function (_a) {
524
- return __awaiter(this, arguments, void 0, function (_b) {
525
- var timezone_2, queryBuilder_2, globalValue, filters_2, order, _c, locals, totalRecords, error_2;
526
- var company = _b.company, status = _b.status, visible = _b.visible, lazyEvent = _b.lazyEvent;
527
- return __generator(this, function (_d) {
528
- switch (_d.label) {
529
- case 0:
530
- _d.trys.push([0, 2, , 3]);
531
- timezone_2 = (0, _1.getTimezoneOffset)((0, _1.getTimeZone)());
532
- queryBuilder_2 = this
533
- .createQueryBuilder('view_locals_companies')
534
- .skip(lazyEvent.first)
535
- .take(lazyEvent.rows);
536
- // DOC: Filtro global
537
- if (lazyEvent.filters['global'] && lazyEvent.filters['global'].value) {
538
- globalValue = "%".concat(lazyEvent.filters['global'].value.toLowerCase(), "%");
539
- queryBuilder_2.andWhere('(LOWER(view_locals_companies.name_local) LIKE :globalValue OR LOWER(view_locals_companies.country_name) LIKE :globalValue OR LOWER(view_locals_companies.city_name) LIKE :globalValue OR LOWER(view_locals_companies.address) LIKE :globalValue OR LOWER(view_locals_companies.cellphone) LIKE :globalValue OR LOWER(view_locals_companies.email) LIKE :globalValue OR LOWER(view_locals_companies.pos_system_name) LIKE :globalValue OR LOWER(view_locals_companies.created_local) LIKE :globalValue OR LOWER(view_locals_companies.updated_local) LIKE :globalValue)', {
540
- globalValue: globalValue ||
541
- (0, utils_1.getStatusBasic)(lazyEvent.filters['global'].value.toLowerCase()),
542
- });
543
- }
544
- // DOC: Filtro por estado FILTRO POR DEFECTO
545
- if (status !== null && status >= 0) {
546
- queryBuilder_2.andWhere('view_locals_companies.status = :status', {
547
- status: status,
548
- });
549
- }
550
- // DOC: Filtro por company FILTRO POR DEFECTO
551
- if (company !== null && company >= 0) {
552
- queryBuilder_2.andWhere('view_locals_companies.company = :company', {
553
- company: company,
554
- });
555
- }
556
- if (visible !== null) {
557
- queryBuilder_2.andWhere('view_locals_companies.visible = :visible', {
558
- visible: visible,
559
- });
560
- }
561
- filters_2 = lazyEvent.filters;
562
- Object.keys(filters_2).forEach(function (key) {
563
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
564
- var _l, _m;
565
- var value = filters_2[key].value;
566
- if ((Array.isArray(value) && value.length > 0) ||
567
- (!Array.isArray(value) && value && key !== 'global')) {
568
- var matchMode = filters_2[key].matchMode;
569
- if (!Array.isArray(value) && value) {
570
- value = filters_2[key].value.toLowerCase();
571
- }
572
- var accessKey = key.split('.').length > 1 ? "".concat(key) : "view_locals_companies.".concat(key);
573
- switch (matchMode) {
574
- case 'custom':
575
- if (key === 'total_partners' && matchMode === 'custom') {
576
- var _o = value || [null, null], from = _o[0], to = _o[1];
577
- if (from !== null && to === null) {
578
- queryBuilder_2.andWhere("view_locals_companies.".concat(key, " >= :from"), {
579
- from: from,
580
- });
581
- }
582
- else if (from === null && to !== null) {
583
- queryBuilder_2.andWhere("view_locals_companies.".concat(key, " <= :to"), {
584
- to: to,
585
- });
586
- }
587
- else if (from !== null && to !== null) {
588
- queryBuilder_2.andWhere("view_locals_companies.".concat(key, " BETWEEN :from AND :to"), { from: from, to: to });
589
- }
590
- }
591
- break;
592
- case 'contains':
593
- queryBuilder_2.andWhere("".concat(accessKey, " LIKE :").concat(key), (_a = {},
594
- _a[key] = "%".concat(value, "%"),
595
- _a));
596
- break;
597
- case 'startsWith':
598
- queryBuilder_2.andWhere("".concat(accessKey, " LIKE :").concat(key), (_b = {},
599
- _b[key] = "".concat(value, "%"),
600
- _b));
601
- break;
602
- case 'endsWith':
603
- queryBuilder_2.andWhere("".concat(accessKey, " LIKE :").concat(key), (_c = {},
604
- _c[key] = "".concat(value, "%"),
605
- _c));
606
- break;
607
- case 'equals':
608
- if (key === 'status') {
609
- queryBuilder_2.andWhere('view_locals_companies.status = :status', {
610
- status: (0, utils_1.getStatusBasic)((_l = filters_2[key].value) !== null && _l !== void 0 ? _l : ''),
611
- });
612
- }
613
- else if (key === 'typeText') {
614
- queryBuilder_2.andWhere('view_locals_companies.type = :type', {
615
- type: (0, utils_1.getSeverityNameDiscountType)((_m = filters_2[key].value) !== null && _m !== void 0 ? _m : ''),
616
- });
617
- }
618
- else if (key === 'has_square') {
619
- var hasSI = filters_2[key].value.includes('SI');
620
- var hasNO = filters_2[key].value.includes('NO');
621
- var queryPlazolet = hasSI && hasNO
622
- ? ''
623
- : hasSI
624
- ? 'view_locals_companies.has_square IS NOT NULL'
625
- : hasNO
626
- ? 'view_locals_companies.has_square IS NULL'
627
- : '';
628
- if (queryPlazolet !== '') {
629
- queryBuilder_2.andWhere(queryPlazolet);
630
- }
631
- }
632
- else {
633
- queryBuilder_2.andWhere("".concat(accessKey, " = :").concat(key), (_d = {},
634
- _d[key] = value,
635
- _d));
636
- }
637
- break;
638
- case 'notContains':
639
- queryBuilder_2.andWhere("".concat(accessKey, " NOT LIKE :").concat(key), (_e = {},
640
- _e[key] = "%".concat(value, "%"),
641
- _e));
642
- break;
643
- case 'notEquals':
644
- queryBuilder_2.andWhere("".concat(accessKey, " != :").concat(key), (_f = {},
645
- _f[key] = value,
646
- _f));
647
- break;
648
- case 'dateIs':
649
- queryBuilder_2.andWhere("".concat(key !== 'expiration' && key !== 'start'
650
- ? 'DATE(CONVERT_TZ('
651
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
652
- ? ", '+00:00', '".concat(timezone_2, "'))")
653
- : '', " = :").concat(key), (_g = {},
654
- _g[key] = value.split('T')[0],
655
- _g));
656
- break;
657
- case 'dateIsNot':
658
- queryBuilder_2.andWhere("".concat(key !== 'expiration' && key !== 'start'
659
- ? 'DATE(CONVERT_TZ('
660
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
661
- ? ", '+00:00', '".concat(timezone_2, "'))")
662
- : '', " != :").concat(key), (_h = {},
663
- _h[key] = value.split('T')[0],
664
- _h));
665
- break;
666
- case 'dateBefore':
667
- queryBuilder_2.andWhere("".concat(key !== 'expiration' && key !== 'start'
668
- ? 'DATE(CONVERT_TZ('
669
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
670
- ? ", '+00:00', '".concat(timezone_2, "'))")
671
- : '', " < :").concat(key), (_j = {},
672
- _j[key] = value.split('T')[0],
673
- _j));
674
- break;
675
- case 'dateAfter':
676
- queryBuilder_2.andWhere("".concat(key !== 'expiration' && key !== 'start'
677
- ? 'DATE(CONVERT_TZ('
678
- : '', " ").concat(accessKey, " ").concat(key !== 'expiration' && key !== 'start'
679
- ? ", '+00:00', '".concat(timezone_2, "'))")
680
- : '', " > :").concat(key), (_k = {},
681
- _k[key] = value.split('T')[0],
682
- _k));
683
- break;
684
- default:
685
- break;
686
- }
687
- }
688
- });
689
- if (lazyEvent.sortField) {
690
- order = lazyEvent.sortOrder === 1 ? 'ASC' : 'DESC';
691
- queryBuilder_2.orderBy("view_locals_companies.".concat(lazyEvent.sortField), order);
692
- }
693
- return [4 /*yield*/, queryBuilder_2.getManyAndCount()];
694
- case 1:
695
- _c = _d.sent(), locals = _c[0], totalRecords = _c[1];
696
- return [2 /*return*/, {
697
- data: locals,
698
- totalRecords: totalRecords,
699
- }];
700
- case 2:
701
- error_2 = _d.sent();
702
- return [2 /*return*/, false];
703
- case 3: return [2 /*return*/];
525
+ // async getLocalsCompanyInformation({
526
+ // company,
527
+ // status,
528
+ // visible,
529
+ // lazyEvent,
530
+ // }: IBasicCompany) {
531
+ // try {
532
+ // const timezone = getTimezoneOffset(getTimeZone())
533
+ // const queryBuilder = this
534
+ // .createQueryBuilder('view_locals_companies')
535
+ // .skip(lazyEvent.first)
536
+ // .take(lazyEvent.rows)
537
+ // // DOC: Filtro global
538
+ // if (lazyEvent.filters['global'] && lazyEvent.filters['global'].value) {
539
+ // const globalValue = `%${lazyEvent.filters['global'].value.toLowerCase()}%`
540
+ // queryBuilder.andWhere(
541
+ // '(LOWER(view_locals_companies.name_local) LIKE :globalValue OR LOWER(view_locals_companies.country_name) LIKE :globalValue OR LOWER(view_locals_companies.city_name) LIKE :globalValue OR LOWER(view_locals_companies.address) LIKE :globalValue OR LOWER(view_locals_companies.cellphone) LIKE :globalValue OR LOWER(view_locals_companies.email) LIKE :globalValue OR LOWER(view_locals_companies.pos_system_name) LIKE :globalValue OR LOWER(view_locals_companies.created_local) LIKE :globalValue OR LOWER(view_locals_companies.updated_local) LIKE :globalValue)',
542
+ // {
543
+ // globalValue:
544
+ // globalValue ||
545
+ // getStatusBasic(lazyEvent.filters['global'].value.toLowerCase()),
546
+ // }
547
+ // )
548
+ // }
549
+ // // DOC: Filtro por estado FILTRO POR DEFECTO
550
+ // if (status !== null && status >= 0) {
551
+ // queryBuilder.andWhere('view_locals_companies.status = :status', {
552
+ // status: status,
553
+ // })
554
+ // }
555
+ // // DOC: Filtro por company FILTRO POR DEFECTO
556
+ // if (company !== null && company >= 0) {
557
+ // queryBuilder.andWhere('view_locals_companies.company = :company', {
558
+ // company: company,
559
+ // })
560
+ // }
561
+ // if (visible !== null) {
562
+ // queryBuilder.andWhere('view_locals_companies.visible = :visible', {
563
+ // visible: visible,
564
+ // })
565
+ // }
566
+ // const filters = lazyEvent.filters
567
+ // Object.keys(filters).forEach((key) => {
568
+ // let value = filters[key].value
569
+ // if (
570
+ // (Array.isArray(value) && value.length > 0) ||
571
+ // (!Array.isArray(value) && value && key !== 'global')
572
+ // ) {
573
+ // const matchMode = filters[key].matchMode
574
+ // if (!Array.isArray(value) && value) {
575
+ // value = filters[key].value.toLowerCase()
576
+ // }
577
+ // const accessKey =
578
+ // key.split('.').length > 1 ? `${key}` : `view_locals_companies.${key}`
579
+ // switch (matchMode) {
580
+ // case 'custom':
581
+ // if (key === 'total_partners' && matchMode === 'custom') {
582
+ // const [from, to] = value || [null, null]
583
+ // if (from !== null && to === null) {
584
+ // queryBuilder.andWhere(`view_locals_companies.${key} >= :from`, {
585
+ // from,
586
+ // })
587
+ // } else if (from === null && to !== null) {
588
+ // queryBuilder.andWhere(`view_locals_companies.${key} <= :to`, {
589
+ // to,
590
+ // })
591
+ // } else if (from !== null && to !== null) {
592
+ // queryBuilder.andWhere(
593
+ // `view_locals_companies.${key} BETWEEN :from AND :to`,
594
+ // { from, to }
595
+ // )
596
+ // }
597
+ // }
598
+ // break
599
+ // case 'contains':
600
+ // queryBuilder.andWhere(`${accessKey} LIKE :${key}`, {
601
+ // [key]: `%${value}%`,
602
+ // })
603
+ // break
604
+ // case 'startsWith':
605
+ // queryBuilder.andWhere(`${accessKey} LIKE :${key}`, {
606
+ // [key]: `${value}%`,
607
+ // })
608
+ // break
609
+ // case 'endsWith':
610
+ // queryBuilder.andWhere(`${accessKey} LIKE :${key}`, {
611
+ // [key]: `${value}%`,
612
+ // })
613
+ // break
614
+ // case 'equals':
615
+ // if (key === 'status') {
616
+ // queryBuilder.andWhere('view_locals_companies.status = :status', {
617
+ // status: getStatusBasic(filters[key].value ?? ''),
618
+ // })
619
+ // } else if (key === 'typeText') {
620
+ // queryBuilder.andWhere('view_locals_companies.type = :type', {
621
+ // type: getSeverityNameDiscountType(filters[key].value ?? ''),
622
+ // })
623
+ // } else if (key === 'has_square') {
624
+ // const hasSI = filters[key].value.includes('SI')
625
+ // const hasNO = filters[key].value.includes('NO')
626
+ // const queryPlazolet =
627
+ // hasSI && hasNO
628
+ // ? ''
629
+ // : hasSI
630
+ // ? 'view_locals_companies.has_square IS NOT NULL'
631
+ // : hasNO
632
+ // ? 'view_locals_companies.has_square IS NULL'
633
+ // : ''
634
+ // if (queryPlazolet !== '') {
635
+ // queryBuilder.andWhere(queryPlazolet)
636
+ // }
637
+ // } else {
638
+ // queryBuilder.andWhere(`${accessKey} = :${key}`, {
639
+ // [key]: value,
640
+ // })
641
+ // }
642
+ // break
643
+ // case 'notContains':
644
+ // queryBuilder.andWhere(`${accessKey} NOT LIKE :${key}`, {
645
+ // [key]: `%${value}%`,
646
+ // })
647
+ // break
648
+ // case 'notEquals':
649
+ // queryBuilder.andWhere(`${accessKey} != :${key}`, {
650
+ // [key]: value,
651
+ // })
652
+ // break
653
+ // case 'dateIs':
654
+ // queryBuilder.andWhere(
655
+ // `${
656
+ // key !== 'expiration' && key !== 'start'
657
+ // ? 'DATE(CONVERT_TZ('
658
+ // : ''
659
+ // } ${accessKey} ${
660
+ // key !== 'expiration' && key !== 'start'
661
+ // ? `, '+00:00', '${timezone}'))`
662
+ // : ''
663
+ // } = :${key}`,
664
+ // {
665
+ // [key]: value.split('T')[0],
666
+ // }
667
+ // )
668
+ // break
669
+ // case 'dateIsNot':
670
+ // queryBuilder.andWhere(
671
+ // `${
672
+ // key !== 'expiration' && key !== 'start'
673
+ // ? 'DATE(CONVERT_TZ('
674
+ // : ''
675
+ // } ${accessKey} ${
676
+ // key !== 'expiration' && key !== 'start'
677
+ // ? `, '+00:00', '${timezone}'))`
678
+ // : ''
679
+ // } != :${key}`,
680
+ // {
681
+ // [key]: value.split('T')[0],
682
+ // }
683
+ // )
684
+ // break
685
+ // case 'dateBefore':
686
+ // queryBuilder.andWhere(
687
+ // `${
688
+ // key !== 'expiration' && key !== 'start'
689
+ // ? 'DATE(CONVERT_TZ('
690
+ // : ''
691
+ // } ${accessKey} ${
692
+ // key !== 'expiration' && key !== 'start'
693
+ // ? `, '+00:00', '${timezone}'))`
694
+ // : ''
695
+ // } < :${key}`,
696
+ // {
697
+ // [key]: value.split('T')[0],
698
+ // }
699
+ // )
700
+ // break
701
+ // case 'dateAfter':
702
+ // queryBuilder.andWhere(
703
+ // `${
704
+ // key !== 'expiration' && key !== 'start'
705
+ // ? 'DATE(CONVERT_TZ('
706
+ // : ''
707
+ // } ${accessKey} ${
708
+ // key !== 'expiration' && key !== 'start'
709
+ // ? `, '+00:00', '${timezone}'))`
710
+ // : ''
711
+ // } > :${key}`,
712
+ // {
713
+ // [key]: value.split('T')[0],
714
+ // }
715
+ // )
716
+ // break
717
+ // default:
718
+ // break
719
+ // }
720
+ // }
721
+ // })
722
+ // if (lazyEvent.sortField) {
723
+ // const order = lazyEvent.sortOrder === 1 ? 'ASC' : 'DESC'
724
+ // queryBuilder.orderBy(
725
+ // `view_locals_companies.${lazyEvent.sortField}`,
726
+ // order
727
+ // )
728
+ // }
729
+ // const [locals, totalRecords] = await queryBuilder.getManyAndCount()
730
+ // return {
731
+ // data: locals,
732
+ // totalRecords,
733
+ // }
734
+ // } catch (error) {
735
+ // return false
736
+ // }
737
+ // }
738
+ CustomRepository.prototype.getLocalsCompanyInformationWrapper = function (params) {
739
+ return __awaiter(this, void 0, void 0, function () {
740
+ return __generator(this, function (_a) {
741
+ switch (_a.label) {
742
+ case 0: return [4 /*yield*/, (0, LocalsCompanyInformation_1.getLocalsCompanyInformation)(this, params)];
743
+ case 1: return [2 /*return*/, _a.sent()];
704
744
  }
705
745
  });
706
746
  });
707
747
  };
708
- CustomRepository.prototype.anyOtherRepository = function (args) {
748
+ CustomRepository.prototype.getVerifyLocalsInformationWrapper = function (params) {
709
749
  return __awaiter(this, void 0, void 0, function () {
710
750
  return __generator(this, function (_a) {
711
- return [2 /*return*/];
751
+ switch (_a.label) {
752
+ case 0: return [4 /*yield*/, (0, VerifyLocalsInformation_1.getVerifyLocalsInformation)(this, params)];
753
+ case 1: return [2 /*return*/, _a.sent()];
754
+ }
712
755
  });
713
756
  });
714
757
  };