@autologix-engineering/shared 1.2.370 → 1.2.371
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/package.json +1 -1
- package/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.d.ts +13 -1
- package/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.js +4 -2
- package/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.js.map +1 -1
- package/src/lib/enums/src/report.module.type.enum.d.ts +5 -1
- package/src/lib/enums/src/report.module.type.enum.js +4 -0
- package/src/lib/enums/src/report.module.type.enum.js.map +1 -1
- package/src/lib/models/src/client.contract.date.change.model.d.ts +18 -7
package/package.json
CHANGED
|
@@ -35,7 +35,19 @@ export declare class GetContractDateChangesDTO {
|
|
|
35
35
|
from?: string;
|
|
36
36
|
to?: string;
|
|
37
37
|
rentalType?: TermRentalType;
|
|
38
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Narrow by whether the change waived a hit cap.
|
|
40
|
+
*
|
|
41
|
+
* Three states, not two: `true` returns only overridden changes, `false`
|
|
42
|
+
* only the ordinary ones, and **omitting it returns both**. The transform
|
|
43
|
+
* therefore has to pass `undefined` straight through — coercing an absent
|
|
44
|
+
* parameter to `false` would silently turn "no filter" into "hide every
|
|
45
|
+
* override", which is the opposite of the default a report should have.
|
|
46
|
+
*
|
|
47
|
+
* The callback takes the raw value, not a `{ value }` params object: this
|
|
48
|
+
* repo pins class-transformer 0.3.1, where that destructuring form yields
|
|
49
|
+
* `undefined` and the flag reads `false` for every request.
|
|
50
|
+
*/
|
|
39
51
|
overriddenOnly?: boolean;
|
|
40
52
|
/**
|
|
41
53
|
* Whether to interleave `ConfigurationsActivityLog` entries for the two
|
|
@@ -83,13 +83,15 @@ __decorate([
|
|
|
83
83
|
], GetContractDateChangesDTO.prototype, "rentalType", void 0);
|
|
84
84
|
__decorate([
|
|
85
85
|
IsOptional(),
|
|
86
|
-
Transform((
|
|
86
|
+
Transform((value) => value === undefined || value === null || value === ''
|
|
87
|
+
? undefined
|
|
88
|
+
: value === true || String(value) === 'true'),
|
|
87
89
|
IsBoolean(),
|
|
88
90
|
__metadata("design:type", Boolean)
|
|
89
91
|
], GetContractDateChangesDTO.prototype, "overriddenOnly", void 0);
|
|
90
92
|
__decorate([
|
|
91
93
|
IsOptional(),
|
|
92
|
-
Transform((
|
|
94
|
+
Transform((value) => value === true || String(value) === 'true'),
|
|
93
95
|
IsBoolean(),
|
|
94
96
|
__metadata("design:type", Boolean)
|
|
95
97
|
], GetContractDateChangesDTO.prototype, "includeConfigChanges", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get.contract.date.changes.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACN,SAAS,EACT,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,MAAM,EACN,GAAG,GACH,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,OAAO,oCAAoC;IAgBhD,YAAY,GAAmD;QAC9D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAjBA;IADC,MAAM,EAAE;;6EACe;AAGxB;IADC,MAAM,EAAE;;uEACS;AASlB;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,cAAc,CAAC;;wEACK;AAO7B;;;;;;;GAOG;AACH,MAAM,OAAO,yBAAyB;
|
|
1
|
+
{"version":3,"file":"get.contract.date.changes.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.contract.date.changes.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,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C,SAAS;QACX,CAAC,CAAC,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAC7C;IACA,SAAS,EAAE;;iEACa;AAUzB;IAHC,UAAU,EAAE;IACZ,SAAS,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC;IAChE,SAAS,EAAE;;uEACmB"}
|
|
@@ -2,7 +2,11 @@ export declare enum ReportModuleType {
|
|
|
2
2
|
BusinessAssociateReimbursement = "BusinessAssociateReimbursement",
|
|
3
3
|
OwnDriverReimbursement = "OwnDriverReimbursement",
|
|
4
4
|
BAPayoutDeductions = "BAPayoutDeductions",
|
|
5
|
-
BookingReport = "BookingReport"
|
|
5
|
+
BookingReport = "BookingReport",
|
|
6
|
+
/** AD-3177 — Report Center › Drivers › License Expiry. */
|
|
7
|
+
DriverLicenseExpiry = "DriverLicenseExpiry",
|
|
8
|
+
/** AD-3181 — Report Center › Vehicles › Compliance Validity. */
|
|
9
|
+
VehicleComplianceValidity = "VehicleComplianceValidity"
|
|
6
10
|
}
|
|
7
11
|
export declare enum ReportDateType {
|
|
8
12
|
InvoiceDate = "InvoiceDate",
|
|
@@ -4,6 +4,10 @@ export var ReportModuleType;
|
|
|
4
4
|
ReportModuleType["OwnDriverReimbursement"] = "OwnDriverReimbursement";
|
|
5
5
|
ReportModuleType["BAPayoutDeductions"] = "BAPayoutDeductions";
|
|
6
6
|
ReportModuleType["BookingReport"] = "BookingReport";
|
|
7
|
+
/** AD-3177 — Report Center › Drivers › License Expiry. */
|
|
8
|
+
ReportModuleType["DriverLicenseExpiry"] = "DriverLicenseExpiry";
|
|
9
|
+
/** AD-3181 — Report Center › Vehicles › Compliance Validity. */
|
|
10
|
+
ReportModuleType["VehicleComplianceValidity"] = "VehicleComplianceValidity";
|
|
7
11
|
})(ReportModuleType || (ReportModuleType = {}));
|
|
8
12
|
export var ReportDateType;
|
|
9
13
|
(function (ReportDateType) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.module.type.enum.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/enums/src/report.module.type.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"report.module.type.enum.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/enums/src/report.module.type.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBASX;AATD,WAAY,gBAAgB;IAC3B,qFAAiE,CAAA;IACjE,qEAAiD,CAAA;IACjD,6DAAyC,CAAA;IACzC,mDAA+B,CAAA;IAC/B,0DAA0D;IAC1D,+DAA2C,CAAA;IAC3C,gEAAgE;IAChE,2EAAuD,CAAA;AACxD,CAAC,EATW,gBAAgB,KAAhB,gBAAgB,QAS3B;AAED,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACzB,6CAA2B,CAAA;IAC3B,2CAAyB,CAAA;IACzB,qDAAmC,CAAA;AACpC,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB"}
|
|
@@ -27,16 +27,27 @@ export declare enum ClientContractDateChangeField {
|
|
|
27
27
|
WindowLimit = "windowLimit"
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
|
-
* One row per counted contract date change, bucketed by client.
|
|
30
|
+
* One row per counted contract date change, bucketed by client and rental type.
|
|
31
31
|
*
|
|
32
32
|
* The rule this backs is a rolling budget: at most `windowLimit` date changes
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
33
|
+
* within `windowDays` days, counted across every contract of one client of one
|
|
34
|
+
* rental type. STR and LTR hold separate tallies under the same configured X
|
|
35
|
+
* and Y, so spending the STR budget never blocks an LTR change; the
|
|
36
|
+
* contract-file path, which has no rental type, counts in a third bucket of
|
|
37
|
+
* its own under NULL. The window is anchored on the first change; once it
|
|
38
|
+
* elapses the next change opens a fresh window.
|
|
36
39
|
*
|
|
37
40
|
* `windowStartedAt` is written at record time rather than derived on read, so
|
|
38
41
|
* the current window is a single "newest row" lookup instead of a walk over
|
|
39
|
-
* the whole history. Rows sharing a `windowStartedAt` are one
|
|
42
|
+
* the whole history. Rows sharing a bucket and a `windowStartedAt` are one
|
|
43
|
+
* window.
|
|
44
|
+
*
|
|
45
|
+
* A change made while the rule is switched off is still recorded, with
|
|
46
|
+
* `windowStartedAt` and `seqInWindow` NULL: it is history, but it was counted
|
|
47
|
+
* into nothing. That keeps this table a complete record of who moved contract
|
|
48
|
+
* dates rather than a side effect of enforcement being configured — and
|
|
49
|
+
* evaluation ignores those rows, so switching the rule on later does not
|
|
50
|
+
* retroactively spend a client's budget on changes no rule governed.
|
|
40
51
|
*
|
|
41
52
|
* `windowDays` / `windowLimit` capture X and Y **as configured at the time**.
|
|
42
53
|
* They are audit only and never feed the decision — evaluation always reads
|
|
@@ -52,8 +63,8 @@ export interface IClientContractDateChange extends TypedModel {
|
|
|
52
63
|
[ClientContractDateChangeField.ContractTermsId]?: string;
|
|
53
64
|
[ClientContractDateChangeField.RentalType]?: TermRentalType;
|
|
54
65
|
[ClientContractDateChangeField.ChangedAt]: Date;
|
|
55
|
-
[ClientContractDateChangeField.WindowStartedAt]
|
|
56
|
-
[ClientContractDateChangeField.SeqInWindow]
|
|
66
|
+
[ClientContractDateChangeField.WindowStartedAt]?: Date;
|
|
67
|
+
[ClientContractDateChangeField.SeqInWindow]?: number;
|
|
57
68
|
[ClientContractDateChangeField.OldStartDate]?: Date;
|
|
58
69
|
[ClientContractDateChangeField.NewStartDate]?: Date;
|
|
59
70
|
[ClientContractDateChangeField.OldEndDate]?: Date;
|