@react-pakistan/util-functions 1.24.78 → 1.24.79

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.
@@ -64,7 +64,7 @@ var multi_part_search_1 = require("../../../general/multi-part-search");
64
64
  * @returns {Promise<[number, Array<TaxBE>]>} Tuple containing total count and array of taxes
65
65
  */
66
66
  var listTax = function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
67
- var include, orderBy, idSearchQuery, nameSearchQuery, emailSearchQuery, where, _c, count, items;
67
+ var include, orderBy, idSearchQuery, taxNameSearchQuery, where, _c, count, items;
68
68
  var _d;
69
69
  var currentPage = _b.currentPage, _e = _b.includePreference, includePreference = _e === void 0 ? false : _e, _f = _b.orderByColumn, orderByColumn = _f === void 0 ? 'createdAt' : _f, _g = _b.orderByDirection, orderByDirection = _g === void 0 ? 'desc' : _g, pageLimit = _b.pageLimit, prisma = _b.prisma, _h = _b.searchQuery, searchQuery = _h === void 0 ? '' : _h;
70
70
  return __generator(this, function (_j) {
@@ -86,16 +86,12 @@ var listTax = function (_a) { return __awaiter(void 0, [_a], void 0, function (_
86
86
  columnName: 'id',
87
87
  fullText: searchQuery,
88
88
  });
89
- nameSearchQuery = (0, multi_part_search_1.multiPartSearch)({
90
- columnName: 'name',
91
- fullText: searchQuery,
92
- });
93
- emailSearchQuery = (0, multi_part_search_1.multiPartSearch)({
94
- columnName: 'email',
89
+ taxNameSearchQuery = (0, multi_part_search_1.multiPartSearch)({
90
+ columnName: 'taxName',
95
91
  fullText: searchQuery,
96
92
  });
97
93
  where = {
98
- OR: __spreadArray(__spreadArray(__spreadArray([], idSearchQuery, true), nameSearchQuery, true), emailSearchQuery, true),
94
+ OR: __spreadArray(__spreadArray([], idSearchQuery, true), taxNameSearchQuery, true),
99
95
  };
100
96
  return [4 /*yield*/, prisma.$transaction([
101
97
  prisma.tax.count({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.24.78",
3
+ "version": "1.24.79",
4
4
  "description": "A library of all util functions",
5
5
  "main": "index.js",
6
6
  "scripts": {