@mj-biz-apps/orders-ng 5.50.1 → 5.50.2

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.
@@ -0,0 +1,70 @@
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject } from '@angular/core';
2
+ import { LogError } from '@memberjunction/core';
3
+ import { ApprovalInboxComponent, ResolveCurrentPersonID } from '@mj-biz-apps/tasks-ng';
4
+ import * as i0 from "@angular/core";
5
+ function MJOOrderReviewQueueComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
6
+ i0.ɵɵelement(0, "bizapps-approval-inbox", 0);
7
+ } if (rf & 2) {
8
+ const ctx_r0 = i0.ɵɵnextContext();
9
+ i0.ɵɵproperty("ApprovalTypeName", ctx_r0.TypeName)("Title", ctx_r0.Title)("ApproverPersonID", ctx_r0.PersonID);
10
+ } }
11
+ /**
12
+ * The name of the order-review task type. Sales' `ORDER_REVIEW` (raised when a deal closes Won) and
13
+ * Orders' `ORDERS_ORDER_REVIEW` (raised when an order hits a review trigger) both declare it, but the
14
+ * tasks app keeps task type names unique, so a host holds whichever of the two was installed first.
15
+ * Filtering by name lists that one row. Renaming either type so both can exist would drop the renamed
16
+ * one from this card.
17
+ */
18
+ export const ORDER_REVIEW_TASK_TYPE_NAME = 'Order Review';
19
+ /** The card's heading. */
20
+ export const ORDER_REVIEW_CARD_TITLE = 'Orders awaiting review';
21
+ /**
22
+ * `mjo-order-review-queue` — the Orders home's "orders awaiting review" card
23
+ * (bc-aidp-next-golive#442).
24
+ *
25
+ * Embeds the Tasks approval inbox, filtered to Order Review tasks, for the signed-in user's Person.
26
+ * The inbox lists the open reviews assigned to that person or to a role they hold (a pipeline's
27
+ * Close Won Assignee Role, such as Finance), links each row to its order, and records the decision
28
+ * in place.
29
+ *
30
+ * Shows nothing for a user with no active Person: such a user has no assigned reviews, and the
31
+ * home page is shared by everyone who uses Orders.
32
+ */
33
+ export class MJOOrderReviewQueueComponent {
34
+ cdr = inject(ChangeDetectorRef);
35
+ /** The signed-in user's Person, once resolved; null when they have none. */
36
+ PersonID = null;
37
+ TypeName = ORDER_REVIEW_TASK_TYPE_NAME;
38
+ Title = ORDER_REVIEW_CARD_TITLE;
39
+ async ngOnInit() {
40
+ try {
41
+ this.PersonID = await ResolveCurrentPersonID();
42
+ this.cdr.detectChanges();
43
+ }
44
+ catch (err) {
45
+ LogError(`Orders home: could not find the signed-in user's Person for the review queue: ${err instanceof Error ? err.message : String(err)}`);
46
+ }
47
+ }
48
+ static ɵfac = function MJOOrderReviewQueueComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJOOrderReviewQueueComponent)(); };
49
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJOOrderReviewQueueComponent, selectors: [["mjo-order-review-queue"]], decls: 1, vars: 1, consts: [[3, "ApprovalTypeName", "Title", "ApproverPersonID"]], template: function MJOOrderReviewQueueComponent_Template(rf, ctx) { if (rf & 1) {
50
+ i0.ɵɵconditionalCreate(0, MJOOrderReviewQueueComponent_Conditional_0_Template, 1, 3, "bizapps-approval-inbox", 0);
51
+ } if (rf & 2) {
52
+ i0.ɵɵconditional(ctx.PersonID ? 0 : -1);
53
+ } }, dependencies: [ApprovalInboxComponent], styles: ["[_nghost-%COMP%] { display: block; }"], changeDetection: 0 });
54
+ }
55
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJOOrderReviewQueueComponent, [{
56
+ type: Component,
57
+ args: [{ selector: 'mjo-order-review-queue', standalone: true, imports: [ApprovalInboxComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
58
+ @if (PersonID) {
59
+ <!-- The type name and title are bound before the person: setting the person starts the
60
+ inbox's first read, which must already carry the type filter. -->
61
+ <bizapps-approval-inbox
62
+ [ApprovalTypeName]="TypeName"
63
+ [Title]="Title"
64
+ [ApproverPersonID]="PersonID">
65
+ </bizapps-approval-inbox>
66
+ }
67
+ `, styles: [":host { display: block; }"] }]
68
+ }], null, null); })();
69
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJOOrderReviewQueueComponent, { className: "MJOOrderReviewQueueComponent", filePath: "lib/panels/order-review-queue.component.ts", lineNumber: 47 }); })();
70
+ //# sourceMappingURL=order-review-queue.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-review-queue.component.js","sourceRoot":"","sources":["../../../src/lib/panels/order-review-queue.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,SAAS,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AACtG,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;;;IAmC3E,4CAIyB;;;IADrB,AADA,AADA,kDAA6B,uBACd,qCACc;;AApC7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,cAAc,CAAC;AAE1D,0BAA0B;AAC1B,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAEhE;;;;;;;;;;;GAWG;AAmBH,MAAM,OAAO,4BAA4B;IAC7B,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAExC,4EAA4E;IACrE,QAAQ,GAAkB,IAAI,CAAC;IACtB,QAAQ,GAAG,2BAA2B,CAAC;IACvC,KAAK,GAAG,uBAAuB,CAAC;IAEhD,KAAK,CAAC,QAAQ;QACV,IAAI,CAAC;YACD,IAAI,CAAC,QAAQ,GAAG,MAAM,sBAAsB,EAAE,CAAC;YAC/C,IAAI,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;QAC7B,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,QAAQ,CAAC,iFAAiF,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClJ,CAAC;IACL,CAAC;sHAfQ,4BAA4B;6DAA5B,4BAA4B;YAZjC,iHAAgB;;YAAhB,uCAQC;4BAXK,sBAAsB;;iFAevB,4BAA4B;cAlBxC,SAAS;2BACI,wBAAwB,cACtB,IAAI,WACP,CAAC,sBAAsB,CAAC,mBAChB,uBAAuB,CAAC,MAAM,YACrC;;;;;;;;;;KAUT;;kFAGQ,4BAA4B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mj-biz-apps/orders-ng",
3
3
  "type": "module",
4
- "version": "5.50.1",
4
+ "version": "5.50.2",
5
5
  "description": "BizApps Orders Angular bootstrap - generated form components and module for the unified order-management Open App",
6
6
  "main": "dist/public-api.js",
7
7
  "types": "dist/public-api.d.ts",
@@ -15,7 +15,7 @@
15
15
  "author": "MemberJunction.com",
16
16
  "license": "BUSL-1.1",
17
17
  "dependencies": {
18
- "@mj-biz-apps/orders-entities": "^5.50.1",
18
+ "@mj-biz-apps/orders-entities": "^5.50.2",
19
19
  "ag-grid-angular": "^35.0.1",
20
20
  "ag-grid-community": "^35.0.1"
21
21
  },
@@ -46,7 +46,8 @@
46
46
  "@mj-biz-apps/accounting-engine-base": ">=0.24.0",
47
47
  "@mj-biz-apps/accounting-ng": ">=0.24.0",
48
48
  "@mj-biz-apps/common-entities": "^5.56.0",
49
- "@mj-biz-apps/common-ng": "^5.56.0"
49
+ "@mj-biz-apps/common-ng": "^5.56.0",
50
+ "@mj-biz-apps/tasks-ng": "^1.13.0"
50
51
  },
51
52
  "devDependencies": {
52
53
  "@angular/animations": "21.1.3",
@@ -80,7 +81,8 @@
80
81
  "@mj-biz-apps/accounting-engine-base": "0.24.0",
81
82
  "@mj-biz-apps/accounting-ng": "0.24.0",
82
83
  "@mj-biz-apps/common-entities": "5.56.0",
83
- "@mj-biz-apps/common-ng": "5.56.0"
84
+ "@mj-biz-apps/common-ng": "5.56.0",
85
+ "@mj-biz-apps/tasks-ng": "1.13.0"
84
86
  },
85
87
  "repository": {
86
88
  "type": "git",