law-common 10.72.4 → 10.72.6
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.
|
@@ -133,6 +133,7 @@ export declare class BillingEntityModel extends BaseEntityModel<EntityEnum.BILLI
|
|
|
133
133
|
}): string;
|
|
134
134
|
getBillingTimesheetUserIds(): number[];
|
|
135
135
|
getTimestamp(): string;
|
|
136
|
+
summarryFolderName(timestamp: string): string;
|
|
136
137
|
invoiceFileName(timestamp: string): string;
|
|
137
138
|
timesheetSummarryFileName(timestamp: string): string;
|
|
138
139
|
OPESummarryFileName(timestamp: string): string;
|
|
@@ -372,9 +372,9 @@ class BillingEntityModel extends base_entity_model_1.BaseEntityModel {
|
|
|
372
372
|
return (`${String(ist.getDate()).padStart(2, "0")}${String(ist.getMonth() + 1).padStart(2, "0")}${ist.getFullYear()}` +
|
|
373
373
|
`_${String(ist.getHours()).padStart(2, "0")}${String(ist.getMinutes()).padStart(2, "0")}${String(ist.getSeconds()).padStart(2, "0")}`);
|
|
374
374
|
}
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
375
|
+
summarryFolderName(timestamp) {
|
|
376
|
+
return `${this.billingPhase}_${this.clientName}_${this.projectName} _ ${timestamp}`;
|
|
377
|
+
}
|
|
378
378
|
invoiceFileName(timestamp) {
|
|
379
379
|
return `${this.billingPhase}_Invoice_${this.clientName}_${this.projectName}_${timestamp}.pdf`;
|
|
380
380
|
}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.groupByFunction = groupByFunction;
|
|
13
4
|
exports.groupByOneToOneFunction = groupByOneToOneFunction;
|
|
@@ -323,43 +314,39 @@ function getFilterByPermission(permissionFilterConfig, propertyName, userPermiss
|
|
|
323
314
|
: dtoFilter,
|
|
324
315
|
};
|
|
325
316
|
}
|
|
326
|
-
function getFilterByPermissionFn(
|
|
327
|
-
|
|
328
|
-
|
|
317
|
+
async function getFilterByPermissionFn(permissionFilterConfig, propertyName, userPermission, filterDto, emptyValue = []) {
|
|
318
|
+
const filterData = await permissionFilterConfig[userPermission]();
|
|
319
|
+
const dtoFilter = filterDto[propertyName];
|
|
320
|
+
const permissionFilter = filterData[propertyName];
|
|
321
|
+
const isDtoFilterIdPresent = dtoFilter && dtoFilter.length > 0;
|
|
322
|
+
const isPermissionFilterIdPresent = permissionFilter && permissionFilter.length > 0;
|
|
323
|
+
return {
|
|
324
|
+
[propertyName]: isPermissionFilterIdPresent
|
|
325
|
+
? isDtoFilterIdPresent
|
|
326
|
+
? arrayIntersection(permissionFilter, dtoFilter).length > 0
|
|
327
|
+
? arrayIntersection(permissionFilter, dtoFilter)
|
|
328
|
+
: emptyValue
|
|
329
|
+
: permissionFilter
|
|
330
|
+
: dtoFilter,
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
async function getPropertyFilterByPermissionFn(permissionFilterConfig, propertyNames, userPermission, filterDto, emptyValue = []) {
|
|
334
|
+
const filterData = await permissionFilterConfig[userPermission]();
|
|
335
|
+
const result = {};
|
|
336
|
+
for (const propertyName of propertyNames) {
|
|
329
337
|
const dtoFilter = filterDto[propertyName];
|
|
330
338
|
const permissionFilter = filterData[propertyName];
|
|
331
339
|
const isDtoFilterIdPresent = dtoFilter && dtoFilter.length > 0;
|
|
332
340
|
const isPermissionFilterIdPresent = permissionFilter && permissionFilter.length > 0;
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
?
|
|
336
|
-
? arrayIntersection(permissionFilter, dtoFilter)
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
function getPropertyFilterByPermissionFn(permissionFilterConfig_1, propertyNames_1, userPermission_1, filterDto_1) {
|
|
345
|
-
return __awaiter(this, arguments, void 0, function* (permissionFilterConfig, propertyNames, userPermission, filterDto, emptyValue = []) {
|
|
346
|
-
const filterData = yield permissionFilterConfig[userPermission]();
|
|
347
|
-
const result = {};
|
|
348
|
-
for (const propertyName of propertyNames) {
|
|
349
|
-
const dtoFilter = filterDto[propertyName];
|
|
350
|
-
const permissionFilter = filterData[propertyName];
|
|
351
|
-
const isDtoFilterIdPresent = dtoFilter && dtoFilter.length > 0;
|
|
352
|
-
const isPermissionFilterIdPresent = permissionFilter && permissionFilter.length > 0;
|
|
353
|
-
result[propertyName] = isPermissionFilterIdPresent
|
|
354
|
-
? isDtoFilterIdPresent
|
|
355
|
-
? arrayIntersection(permissionFilter, dtoFilter).length > 0
|
|
356
|
-
? arrayIntersection(permissionFilter, dtoFilter)
|
|
357
|
-
: emptyValue
|
|
358
|
-
: permissionFilter
|
|
359
|
-
: dtoFilter;
|
|
360
|
-
}
|
|
361
|
-
return result;
|
|
362
|
-
});
|
|
341
|
+
result[propertyName] = isPermissionFilterIdPresent
|
|
342
|
+
? isDtoFilterIdPresent
|
|
343
|
+
? arrayIntersection(permissionFilter, dtoFilter).length > 0
|
|
344
|
+
? arrayIntersection(permissionFilter, dtoFilter)
|
|
345
|
+
: emptyValue
|
|
346
|
+
: permissionFilter
|
|
347
|
+
: dtoFilter;
|
|
348
|
+
}
|
|
349
|
+
return result;
|
|
363
350
|
}
|
|
364
351
|
/**
|
|
365
352
|
* Sets a property value on an object with proper TypeScript type safety.
|