@autologix-engineering/shared 1.2.350 → 1.2.351

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autologix-engineering/shared",
3
- "version": "1.2.350",
3
+ "version": "1.2.351",
4
4
  "dependencies": {
5
5
  "tslib": "^2.3.0"
6
6
  },
@@ -1,3 +1,4 @@
1
+ import { LTRDriverPayoutSortKey, SortOrder } from '../../enums/src';
1
2
  /**
2
3
  * LTR payout entries for the bookings belonging to one driver.
3
4
  *
@@ -40,5 +41,26 @@ export declare class GetLTRDriverPayoutRowsDTO {
40
41
  * alongside it.
41
42
  */
42
43
  rowGroupId?: string;
44
+ /**
45
+ * Which date to order each booking's entries by. Defaults to
46
+ * `StartDate` — when the duty began, which is how the list has always
47
+ * been ordered.
48
+ */
49
+ sortBy?: LTRDriverPayoutSortKey;
50
+ /**
51
+ * Direction for `sortBy`. Defaults to `ASC`.
52
+ *
53
+ * For entries made in the driver app this reproduces the existing order:
54
+ * those write paths already sort the stored rows by date, so grouping
55
+ * them yielded ascending start order anyway. Rows that arrived by Excel
56
+ * upload or the webapp are NOT sorted on write, so those bookings now
57
+ * come back in date order where they previously came back in sheet
58
+ * order.
59
+ *
60
+ * Entries with no parsable date sort last in BOTH directions: they have
61
+ * no place on a date axis, and letting them ride the comparator would
62
+ * float them to the top of a newest-first list.
63
+ */
64
+ order?: SortOrder;
43
65
  constructor(obj?: Partial<GetLTRDriverPayoutRowsDTO>);
44
66
  }
@@ -1,5 +1,6 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
- import { IsOptional, IsString, IsUUID, MaxLength } from 'class-validator';
2
+ import { IsEnum, IsOptional, IsString, IsUUID, MaxLength, } from 'class-validator';
3
+ import { LTRDriverPayoutSortKey, SortOrder } from '../../enums/src';
3
4
  /**
4
5
  * LTR payout entries for the bookings belonging to one driver.
5
6
  *
@@ -39,4 +40,14 @@ __decorate([
39
40
  MaxLength(120),
40
41
  __metadata("design:type", String)
41
42
  ], GetLTRDriverPayoutRowsDTO.prototype, "rowGroupId", void 0);
43
+ __decorate([
44
+ IsOptional(),
45
+ IsEnum(LTRDriverPayoutSortKey),
46
+ __metadata("design:type", String)
47
+ ], GetLTRDriverPayoutRowsDTO.prototype, "sortBy", void 0);
48
+ __decorate([
49
+ IsOptional(),
50
+ IsEnum(SortOrder),
51
+ __metadata("design:type", String)
52
+ ], GetLTRDriverPayoutRowsDTO.prototype, "order", void 0);
42
53
  //# sourceMappingURL=get.ltr.driver.payout.rows.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"get.ltr.driver.payout.rows.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.ltr.driver.payout.rows.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE1E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,yBAAyB;IAgCrC,YAAY,GAAwC;QACnD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AAjCA;IADC,MAAM,CAAC,CAAC,CAAC;;mEACe;AASzB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;4DACU;AAmBnB;IAHC,UAAU,EAAE;IACZ,QAAQ,EAAE;IACV,SAAS,CAAC,GAAG,CAAC;;6DACK"}
1
+ {"version":3,"file":"get.ltr.driver.payout.rows.dto.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/data-transfer-objects/src/get.ltr.driver.payout.rows.dto.ts"],"names":[],"mappings":";AAAA,OAAO,EACN,MAAM,EACN,UAAU,EACV,QAAQ,EACR,MAAM,EACN,SAAS,GACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEpE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,yBAAyB;IA2DrC,YAAY,GAAwC;QACnD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1B,CAAC;CACD;AA5DA;IADC,MAAM,CAAC,CAAC,CAAC;;mEACe;AASzB;IAFC,UAAU,EAAE;IACZ,MAAM,EAAE;;4DACU;AAmBnB;IAHC,UAAU,EAAE;IACZ,QAAQ,EAAE;IACV,SAAS,CAAC,GAAG,CAAC;;6DACK;AASpB;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,sBAAsB,CAAC;;yDACC;AAkBhC;IAFC,UAAU,EAAE;IACZ,MAAM,CAAC,SAAS,CAAC;;wDACA"}
@@ -53,3 +53,15 @@ export declare enum LTRPayoutRowSource {
53
53
  /** Created by the payout Excel upload. */
54
54
  Upload = "upload"
55
55
  }
56
+ /**
57
+ * Which date the driver app's entry list is ordered by.
58
+ *
59
+ * Both are already derived per entry from its rows: `StartDate` is the
60
+ * earliest duty or garage start across them, `EndDate` the latest end. They
61
+ * are not interchangeable once entries span several days — a 27th-29th entry
62
+ * sorts above a 28th-only one by start, and below it by end.
63
+ */
64
+ export declare enum LTRDriverPayoutSortKey {
65
+ StartDate = "startDate",
66
+ EndDate = "endDate"
67
+ }
@@ -58,4 +58,17 @@ export var LTRPayoutRowSource;
58
58
  /** Created by the payout Excel upload. */
59
59
  LTRPayoutRowSource["Upload"] = "upload";
60
60
  })(LTRPayoutRowSource || (LTRPayoutRowSource = {}));
61
+ /**
62
+ * Which date the driver app's entry list is ordered by.
63
+ *
64
+ * Both are already derived per entry from its rows: `StartDate` is the
65
+ * earliest duty or garage start across them, `EndDate` the latest end. They
66
+ * are not interchangeable once entries span several days — a 27th-29th entry
67
+ * sorts above a 28th-only one by start, and below it by end.
68
+ */
69
+ export var LTRDriverPayoutSortKey;
70
+ (function (LTRDriverPayoutSortKey) {
71
+ LTRDriverPayoutSortKey["StartDate"] = "startDate";
72
+ LTRDriverPayoutSortKey["EndDate"] = "endDate";
73
+ })(LTRDriverPayoutSortKey || (LTRDriverPayoutSortKey = {}));
61
74
  //# sourceMappingURL=ltr.payout.enum.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ltr.payout.enum.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/enums/src/ltr.payout.enum.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,sCAAmB,CAAA;IACnB,kCAAe,CAAA;IACf,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;AAClB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAN,IAAY,sBAKX;AALD,WAAY,sBAAsB;IACjC,qCAAW,CAAA;IACX,iDAAuB,CAAA;IACvB,uCAAa,CAAA;IACb,uCAAa,CAAA;AACd,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,QAKjC;AAED,gEAAgE;AAChE,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAChC,yDAAgC,CAAA;IAChC,gDAAuB,CAAA;AACxB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAChC,4CAAmB,CAAA;IACnB,wCAAe,CAAA;IACf,wDAA+B,CAAA;IAC/B,0DAAiC,CAAA;AAClC,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC7B,2EAA2E;IAC3E,6CAAuB,CAAA;IACvB,mDAAmD;IACnD,uCAAiB,CAAA;IACjB,0CAA0C;IAC1C,uCAAiB,CAAA;AAClB,CAAC,EAPW,kBAAkB,KAAlB,kBAAkB,QAO7B"}
1
+ {"version":3,"file":"ltr.payout.enum.js","sourceRoot":"","sources":["../../../../../../../libs/shared/src/lib/enums/src/ltr.payout.enum.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IAC1B,sCAAmB,CAAA;IACnB,kCAAe,CAAA;IACf,wCAAqB,CAAA;IACrB,oCAAiB,CAAA;IACjB,oCAAiB,CAAA;AAClB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAN,IAAY,sBAKX;AALD,WAAY,sBAAsB;IACjC,qCAAW,CAAA;IACX,iDAAuB,CAAA;IACvB,uCAAa,CAAA;IACb,uCAAa,CAAA;AACd,CAAC,EALW,sBAAsB,KAAtB,sBAAsB,QAKjC;AAED,gEAAgE;AAChE,MAAM,CAAN,IAAY,qBAGX;AAHD,WAAY,qBAAqB;IAChC,yDAAgC,CAAA;IAChC,gDAAuB,CAAA;AACxB,CAAC,EAHW,qBAAqB,KAArB,qBAAqB,QAGhC;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAChC,4CAAmB,CAAA;IACnB,wCAAe,CAAA;IACf,wDAA+B,CAAA;IAC/B,0DAAiC,CAAA;AAClC,CAAC,EALW,qBAAqB,KAArB,qBAAqB,QAKhC;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,kBAOX;AAPD,WAAY,kBAAkB;IAC7B,2EAA2E;IAC3E,6CAAuB,CAAA;IACvB,mDAAmD;IACnD,uCAAiB,CAAA;IACjB,0CAA0C;IAC1C,uCAAiB,CAAA;AAClB,CAAC,EAPW,kBAAkB,KAAlB,kBAAkB,QAO7B;AAED;;;;;;;GAOG;AACH,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IACjC,iDAAuB,CAAA;IACvB,6CAAmB,CAAA;AACpB,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC"}