rez_core 2.1.39 → 2.1.41
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.
- package/dist/module/filter/controller/filter.controller.d.ts +1 -1
- package/dist/module/filter/service/filter.service.d.ts +1 -1
- package/dist/module/filter/service/filter.service.js +1 -20
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/module/filter/service/filter.service.ts +22 -22
package/package.json
CHANGED
|
@@ -323,29 +323,29 @@ export class FilterService {
|
|
|
323
323
|
// };
|
|
324
324
|
|
|
325
325
|
// 1. Extract all date-type attribute keys
|
|
326
|
-
const dateAttributes = Object.entries(attributeMetaMap)
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
// 2. Format function using moment
|
|
331
|
-
const formatDate = (dateStr: string | null): string | null => {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
};
|
|
326
|
+
// const dateAttributes = Object.entries(attributeMetaMap)
|
|
327
|
+
// .filter(([_, attr]) => attr.data_type === 'date')
|
|
328
|
+
// .map(([key]) => key); // only the keys (e.g., 'created_date', 'modified_date')
|
|
329
|
+
|
|
330
|
+
// // 2. Format function using moment
|
|
331
|
+
// const formatDate = (dateStr: string | null): string | null => {
|
|
332
|
+
// if (!dateStr) return null;
|
|
333
|
+
// return moment(dateStr).format('MMM DD, YYYY'); // e.g., "Jun 25, 2025"
|
|
334
|
+
// };
|
|
335
335
|
|
|
336
|
-
// 3. Function to format only those keys in each entity row
|
|
337
|
-
const formatDatesInRow = (row: any): any => {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
};
|
|
336
|
+
// // 3. Function to format only those keys in each entity row
|
|
337
|
+
// const formatDatesInRow = (row: any): any => {
|
|
338
|
+
// const formattedRow = { ...row };
|
|
339
|
+
// for (const key of dateAttributes) {
|
|
340
|
+
// if (formattedRow[key]) {
|
|
341
|
+
// formattedRow[key] = formatDate(formattedRow[key]);
|
|
342
|
+
// }
|
|
343
|
+
// }
|
|
344
|
+
// return formattedRow;
|
|
345
|
+
// };
|
|
346
346
|
|
|
347
|
-
// 4. Final transformation
|
|
348
|
-
const formattedEntityList = entity_list.map(formatDatesInRow);
|
|
347
|
+
// // 4. Final transformation
|
|
348
|
+
// const formattedEntityList = entity_list.map(formatDatesInRow);
|
|
349
349
|
|
|
350
350
|
// Count query (without pagination)
|
|
351
351
|
const countQb = this.dataSource
|
|
@@ -362,7 +362,7 @@ export class FilterService {
|
|
|
362
362
|
success: true,
|
|
363
363
|
data: {
|
|
364
364
|
entity_tabs: filteredTabs,
|
|
365
|
-
|
|
365
|
+
entity_list,
|
|
366
366
|
pagination: {
|
|
367
367
|
total,
|
|
368
368
|
page,
|