@mj-biz-apps/orders-ng 5.35.0 → 5.36.0
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/lib/data/orders-grid-state.d.ts +4 -2
- package/dist/lib/data/orders-grid-state.d.ts.map +1 -1
- package/dist/lib/data/orders-grid-state.js +4 -2
- package/dist/lib/data/orders-grid-state.js.map +1 -1
- package/dist/lib/data/orders-queries.d.ts +20 -0
- package/dist/lib/data/orders-queries.d.ts.map +1 -1
- package/dist/lib/data/orders-queries.js +32 -1
- package/dist/lib/data/orders-queries.js.map +1 -1
- package/dist/lib/form-panels/document-forms.module.d.ts +26 -24
- package/dist/lib/form-panels/document-forms.module.d.ts.map +1 -1
- package/dist/lib/form-panels/document-forms.module.js +7 -0
- package/dist/lib/form-panels/document-forms.module.js.map +1 -1
- package/dist/lib/form-panels/document-overviews.panels.d.ts +3 -0
- package/dist/lib/form-panels/document-overviews.panels.d.ts.map +1 -1
- package/dist/lib/form-panels/document-overviews.panels.js +11 -4
- package/dist/lib/form-panels/document-overviews.panels.js.map +1 -1
- package/dist/lib/form-panels/external-invoices.panel.d.ts +14 -0
- package/dist/lib/form-panels/external-invoices.panel.d.ts.map +1 -1
- package/dist/lib/form-panels/external-invoices.panel.js +99 -46
- package/dist/lib/form-panels/external-invoices.panel.js.map +1 -1
- package/dist/lib/form-panels/subscription-cancel.component.d.ts +58 -0
- package/dist/lib/form-panels/subscription-cancel.component.d.ts.map +1 -0
- package/dist/lib/form-panels/subscription-cancel.component.js +303 -0
- package/dist/lib/form-panels/subscription-cancel.component.js.map +1 -0
- package/dist/lib/form-panels/subscription-header.panel.d.ts +7 -0
- package/dist/lib/form-panels/subscription-header.panel.d.ts.map +1 -1
- package/dist/lib/form-panels/subscription-header.panel.js +22 -4
- package/dist/lib/form-panels/subscription-header.panel.js.map +1 -1
- package/dist/lib/pages/orders/order-document.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/order-document.page.js +7 -2
- package/dist/lib/pages/orders/order-document.page.js.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts +11 -11
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.js +2 -2
- package/dist/lib/pages/orders/orders-dashboard.page.js.map +1 -1
- package/dist/lib/pages/receivables/customer-ar.page.js +2 -2
- package/dist/lib/pages/receivables/customer-ar.page.js.map +1 -1
- package/dist/lib/panels/external-invoice-view.d.ts +15 -2
- package/dist/lib/panels/external-invoice-view.d.ts.map +1 -1
- package/dist/lib/panels/external-invoice-view.js +15 -2
- package/dist/lib/panels/external-invoice-view.js.map +1 -1
- package/dist/lib/sections/orders-sections.component.d.ts.map +1 -1
- package/dist/lib/sections/orders-sections.component.js +5 -4
- package/dist/lib/sections/orders-sections.component.js.map +1 -1
- package/package.json +28 -28
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import type { IMetadataProvider } from '@memberjunction/core';
|
|
3
|
+
import { type CancelSubscriptionInput, type CancelSubscriptionOutput, type mjBizAppsOrdersSubscriptionEntity } from '@mj-biz-apps/orders-entities';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* What the person cancelling picks: the subscription type's own rule (`Type`, which sends no timing),
|
|
7
|
+
* or one of the two timings that override it. Only the type's own rule applies its grace period; a
|
|
8
|
+
* chosen timing ends access on the day it names.
|
|
9
|
+
*/
|
|
10
|
+
export type MJOCancelTiming = 'Type' | NonNullable<CancelSubscriptionInput['Timing']>;
|
|
11
|
+
/**
|
|
12
|
+
* `mjo-subscription-cancel` — cancel a subscription from its form: choose when coverage ends,
|
|
13
|
+
* preview what that does, then confirm.
|
|
14
|
+
*
|
|
15
|
+
* The decision is the server's. Preview and confirm are the same `Orders.CancelSubscription` call,
|
|
16
|
+
* the first with `Preview: true`, so what the person confirms is what the operation computed, not a
|
|
17
|
+
* second calculation done here. Changing the timing or the reason throws the preview away, so a
|
|
18
|
+
* stale preview can never be confirmed.
|
|
19
|
+
*
|
|
20
|
+
* Offered only to a viewer who may update subscriptions, and only while the subscription is in a
|
|
21
|
+
* status it can be cancelled from.
|
|
22
|
+
*
|
|
23
|
+
* ```html
|
|
24
|
+
* <mjo-subscription-cancel [Record]="Record" [Provider]="provider" (Canceled)="refresh()" />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class MJOSubscriptionCancelComponent {
|
|
28
|
+
private readonly cdr;
|
|
29
|
+
Record: mjBizAppsOrdersSubscriptionEntity;
|
|
30
|
+
/** The provider the record was loaded through; the operation and the permission check use it. */
|
|
31
|
+
Provider: IMetadataProvider;
|
|
32
|
+
/** Emits after a confirmed cancellation, so the host can reload the record. */
|
|
33
|
+
Canceled: EventEmitter<CancelSubscriptionOutput>;
|
|
34
|
+
Open: boolean;
|
|
35
|
+
Busy: boolean;
|
|
36
|
+
Error: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* The type's own rule by default, so cancelling from here means what the type says it means; an
|
|
39
|
+
* `EndOfBillingPeriod` type ends at its billing period, not the term. A timing is an override.
|
|
40
|
+
*/
|
|
41
|
+
Timing: MJOCancelTiming;
|
|
42
|
+
Reason: string;
|
|
43
|
+
Preview: CancelSubscriptionOutput | null;
|
|
44
|
+
get CanCancel(): boolean;
|
|
45
|
+
/** The type's name for the default option, from the subscription's own view field. */
|
|
46
|
+
get TypeName(): string;
|
|
47
|
+
Day(value: string | null | undefined): string;
|
|
48
|
+
Start(): void;
|
|
49
|
+
Close(): void;
|
|
50
|
+
/** Any change to what would be sent makes the preview describe something else. */
|
|
51
|
+
Changed(): void;
|
|
52
|
+
RunPreview(): Promise<void>;
|
|
53
|
+
Confirm(): Promise<void>;
|
|
54
|
+
private execute;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJOSubscriptionCancelComponent, never>;
|
|
56
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJOSubscriptionCancelComponent, "mjo-subscription-cancel", never, { "Record": { "alias": "Record"; "required": true; }; "Provider": { "alias": "Provider"; "required": true; }; }, { "Canceled": "Canceled"; }, never, never, false, never>;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=subscription-cancel.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-cancel.component.d.ts","sourceRoot":"","sources":["../../../src/lib/form-panels/subscription-cancel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,YAAY,EAAyB,MAAM,eAAe,CAAC;AAClG,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAGH,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,iCAAiC,EACzC,MAAM,8BAA8B,CAAC;;AAEtC;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,WAAW,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC,CAAC;AAKtF;;;;;;;;;;;;;;;GAeG;AACH,qBAMa,8BAA8B;IACvC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IAEtB,MAAM,EAAG,iCAAiC,CAAC;IACtE,iGAAiG;IACtE,QAAQ,EAAG,iBAAiB,CAAC;IACxD,+EAA+E;IACrE,QAAQ,yCAAgD;IAE3D,IAAI,UAAS;IACb,IAAI,UAAS;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC;;;OAGG;IACI,MAAM,EAAE,eAAe,CAAU;IACjC,MAAM,SAAM;IACZ,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAQ;IAEvD,IAAW,SAAS,IAAI,OAAO,CAI9B;IAED,sFAAsF;IACtF,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAEM,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM;IAI7C,KAAK,IAAI,IAAI;IAQb,KAAK,IAAI,IAAI;IAQpB,kFAAkF;IAC3E,OAAO,IAAI,IAAI;IAKT,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAK3B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;YAQvB,OAAO;yCAtEZ,8BAA8B;2CAA9B,8BAA8B;CA4F1C"}
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import { ChangeDetectorRef, Component, EventEmitter, Input, Output, inject } from '@angular/core';
|
|
2
|
+
import { OrdersCancelSubscriptionOperation, ToISODate, } from '@mj-biz-apps/orders-entities';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/forms";
|
|
5
|
+
import * as i2 from "@memberjunction/ng-ui-components";
|
|
6
|
+
import * as i3 from "../panels/money-format.js";
|
|
7
|
+
const _c0 = () => ({ Zero: "None" });
|
|
8
|
+
function MJOSubscriptionCancelComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
9
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
10
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "button", 2);
|
|
11
|
+
i0.ɵɵlistener("click", function MJOSubscriptionCancelComponent_Conditional_0_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Start()); });
|
|
12
|
+
i0.ɵɵelement(2, "i", 3);
|
|
13
|
+
i0.ɵɵtext(3, " Cancel subscription ");
|
|
14
|
+
i0.ɵɵelementEnd()();
|
|
15
|
+
} }
|
|
16
|
+
function MJOSubscriptionCancelComponent_Conditional_1_Conditional_31_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
17
|
+
i0.ɵɵelementStart(0, "div")(1, "dt");
|
|
18
|
+
i0.ɵɵtext(2, "Later terms canceled");
|
|
19
|
+
i0.ɵɵelementEnd();
|
|
20
|
+
i0.ɵɵelementStart(3, "dd");
|
|
21
|
+
i0.ɵɵtext(4);
|
|
22
|
+
i0.ɵɵelementEnd()();
|
|
23
|
+
} if (rf & 2) {
|
|
24
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
25
|
+
i0.ɵɵadvance(4);
|
|
26
|
+
i0.ɵɵtextInterpolate(ctx_r1.Preview == null ? null : ctx_r1.Preview.LaterTerms == null ? null : ctx_r1.Preview.LaterTerms.length);
|
|
27
|
+
} }
|
|
28
|
+
function MJOSubscriptionCancelComponent_Conditional_1_Conditional_31_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
+
i0.ɵɵelementStart(0, "dl", 18)(1, "div")(2, "dt");
|
|
30
|
+
i0.ɵɵtext(3, "Coverage ends");
|
|
31
|
+
i0.ɵɵelementEnd();
|
|
32
|
+
i0.ɵɵelementStart(4, "dd");
|
|
33
|
+
i0.ɵɵtext(5);
|
|
34
|
+
i0.ɵɵelementEnd()();
|
|
35
|
+
i0.ɵɵelementStart(6, "div")(7, "dt");
|
|
36
|
+
i0.ɵɵtext(8, "Access ends");
|
|
37
|
+
i0.ɵɵelementEnd();
|
|
38
|
+
i0.ɵɵelementStart(9, "dd");
|
|
39
|
+
i0.ɵɵtext(10);
|
|
40
|
+
i0.ɵɵelementEnd()();
|
|
41
|
+
i0.ɵɵelementStart(11, "div")(12, "dt");
|
|
42
|
+
i0.ɵɵtext(13, "Refund");
|
|
43
|
+
i0.ɵɵelementEnd();
|
|
44
|
+
i0.ɵɵelementStart(14, "dd");
|
|
45
|
+
i0.ɵɵtext(15);
|
|
46
|
+
i0.ɵɵpipe(16, "mjoMoney");
|
|
47
|
+
i0.ɵɵelementEnd()();
|
|
48
|
+
i0.ɵɵconditionalCreate(17, MJOSubscriptionCancelComponent_Conditional_1_Conditional_31_Conditional_17_Template, 5, 1, "div");
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
i0.ɵɵelementStart(18, "p", 19);
|
|
51
|
+
i0.ɵɵtext(19);
|
|
52
|
+
i0.ɵɵelementEnd();
|
|
53
|
+
} if (rf & 2) {
|
|
54
|
+
const d_r4 = ctx;
|
|
55
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
56
|
+
i0.ɵɵadvance(5);
|
|
57
|
+
i0.ɵɵtextInterpolate(ctx_r1.Day(d_r4.EffectiveDate));
|
|
58
|
+
i0.ɵɵadvance(5);
|
|
59
|
+
i0.ɵɵtextInterpolate(ctx_r1.Day(d_r4.AccessThroughDate));
|
|
60
|
+
i0.ɵɵadvance(5);
|
|
61
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(16, 5, (ctx_r1.Preview == null ? null : ctx_r1.Preview.TotalRefundAmount) ?? d_r4.RefundAmount, i0.ɵɵpureFunction0(8, _c0)));
|
|
62
|
+
i0.ɵɵadvance(2);
|
|
63
|
+
i0.ɵɵconditional((ctx_r1.Preview == null ? null : ctx_r1.Preview.LaterTerms == null ? null : ctx_r1.Preview.LaterTerms.length) ? 17 : -1);
|
|
64
|
+
i0.ɵɵadvance(2);
|
|
65
|
+
i0.ɵɵtextInterpolate((ctx_r1.Preview == null ? null : ctx_r1.Preview.Message) || d_r4.Explanation);
|
|
66
|
+
} }
|
|
67
|
+
function MJOSubscriptionCancelComponent_Conditional_1_Conditional_32_Template(rf, ctx) { if (rf & 1) {
|
|
68
|
+
i0.ɵɵelementStart(0, "p", 13);
|
|
69
|
+
i0.ɵɵelement(1, "i", 20);
|
|
70
|
+
i0.ɵɵtext(2);
|
|
71
|
+
i0.ɵɵelementEnd();
|
|
72
|
+
} if (rf & 2) {
|
|
73
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
74
|
+
i0.ɵɵadvance(2);
|
|
75
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.Error);
|
|
76
|
+
} }
|
|
77
|
+
function MJOSubscriptionCancelComponent_Conditional_1_Conditional_36_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
79
|
+
i0.ɵɵelementStart(0, "button", 21);
|
|
80
|
+
i0.ɵɵlistener("click", function MJOSubscriptionCancelComponent_Conditional_1_Conditional_36_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.Confirm()); });
|
|
81
|
+
i0.ɵɵtext(1, "Confirm cancellation");
|
|
82
|
+
i0.ɵɵelementEnd();
|
|
83
|
+
} if (rf & 2) {
|
|
84
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
85
|
+
i0.ɵɵproperty("disabled", ctx_r1.Busy);
|
|
86
|
+
} }
|
|
87
|
+
function MJOSubscriptionCancelComponent_Conditional_1_Conditional_37_Template(rf, ctx) { if (rf & 1) {
|
|
88
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
89
|
+
i0.ɵɵelementStart(0, "button", 22);
|
|
90
|
+
i0.ɵɵlistener("click", function MJOSubscriptionCancelComponent_Conditional_1_Conditional_37_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.RunPreview()); });
|
|
91
|
+
i0.ɵɵtext(1, "Preview");
|
|
92
|
+
i0.ɵɵelementEnd();
|
|
93
|
+
} if (rf & 2) {
|
|
94
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
95
|
+
i0.ɵɵproperty("disabled", ctx_r1.Busy);
|
|
96
|
+
} }
|
|
97
|
+
function MJOSubscriptionCancelComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
98
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
99
|
+
i0.ɵɵelementStart(0, "section", 1)(1, "h2", 4);
|
|
100
|
+
i0.ɵɵtext(2, "Cancel subscription");
|
|
101
|
+
i0.ɵɵelementEnd();
|
|
102
|
+
i0.ɵɵelementStart(3, "fieldset", 5)(4, "legend");
|
|
103
|
+
i0.ɵɵtext(5, "When does access end?");
|
|
104
|
+
i0.ɵɵelementEnd();
|
|
105
|
+
i0.ɵɵelementStart(6, "label", 6)(7, "input", 7);
|
|
106
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJOSubscriptionCancelComponent_Conditional_1_Template_input_ngModelChange_7_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Timing, $event) || (ctx_r1.Timing = $event); return i0.ɵɵresetView($event); });
|
|
107
|
+
i0.ɵɵlistener("ngModelChange", function MJOSubscriptionCancelComponent_Conditional_1_Template_input_ngModelChange_7_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Changed()); });
|
|
108
|
+
i0.ɵɵelementEnd();
|
|
109
|
+
i0.ɵɵelementStart(8, "span")(9, "strong");
|
|
110
|
+
i0.ɵɵtext(10, "As the subscription type sets it");
|
|
111
|
+
i0.ɵɵelementEnd();
|
|
112
|
+
i0.ɵɵelementStart(11, "span", 8);
|
|
113
|
+
i0.ɵɵtext(12);
|
|
114
|
+
i0.ɵɵelementEnd()()();
|
|
115
|
+
i0.ɵɵelementStart(13, "label", 6)(14, "input", 9);
|
|
116
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJOSubscriptionCancelComponent_Conditional_1_Template_input_ngModelChange_14_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Timing, $event) || (ctx_r1.Timing = $event); return i0.ɵɵresetView($event); });
|
|
117
|
+
i0.ɵɵlistener("ngModelChange", function MJOSubscriptionCancelComponent_Conditional_1_Template_input_ngModelChange_14_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Changed()); });
|
|
118
|
+
i0.ɵɵelementEnd();
|
|
119
|
+
i0.ɵɵelementStart(15, "span")(16, "strong");
|
|
120
|
+
i0.ɵɵtext(17, "At the end of the term instead");
|
|
121
|
+
i0.ɵɵelementEnd();
|
|
122
|
+
i0.ɵɵelementStart(18, "span", 8);
|
|
123
|
+
i0.ɵɵtext(19, "Access runs to the last day of what was paid for, with no grace period. It does not renew.");
|
|
124
|
+
i0.ɵɵelementEnd()()();
|
|
125
|
+
i0.ɵɵelementStart(20, "label", 6)(21, "input", 10);
|
|
126
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJOSubscriptionCancelComponent_Conditional_1_Template_input_ngModelChange_21_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Timing, $event) || (ctx_r1.Timing = $event); return i0.ɵɵresetView($event); });
|
|
127
|
+
i0.ɵɵlistener("ngModelChange", function MJOSubscriptionCancelComponent_Conditional_1_Template_input_ngModelChange_21_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Changed()); });
|
|
128
|
+
i0.ɵɵelementEnd();
|
|
129
|
+
i0.ɵɵelementStart(22, "span")(23, "strong");
|
|
130
|
+
i0.ɵɵtext(24, "Immediately instead");
|
|
131
|
+
i0.ɵɵelementEnd();
|
|
132
|
+
i0.ɵɵelementStart(25, "span", 8);
|
|
133
|
+
i0.ɵɵtext(26, "Coverage and access end today. Any refund follows the subscription type's refund rule; give other money back from the payment's Refund page.");
|
|
134
|
+
i0.ɵɵelementEnd()()()();
|
|
135
|
+
i0.ɵɵelementStart(27, "label", 11)(28, "span");
|
|
136
|
+
i0.ɵɵtext(29, "Reason");
|
|
137
|
+
i0.ɵɵelementEnd();
|
|
138
|
+
i0.ɵɵelementStart(30, "textarea", 12);
|
|
139
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJOSubscriptionCancelComponent_Conditional_1_Template_textarea_ngModelChange_30_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Reason, $event) || (ctx_r1.Reason = $event); return i0.ɵɵresetView($event); });
|
|
140
|
+
i0.ɵɵlistener("ngModelChange", function MJOSubscriptionCancelComponent_Conditional_1_Template_textarea_ngModelChange_30_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Changed()); });
|
|
141
|
+
i0.ɵɵelementEnd()();
|
|
142
|
+
i0.ɵɵconditionalCreate(31, MJOSubscriptionCancelComponent_Conditional_1_Conditional_31_Template, 20, 9);
|
|
143
|
+
i0.ɵɵconditionalCreate(32, MJOSubscriptionCancelComponent_Conditional_1_Conditional_32_Template, 3, 1, "p", 13);
|
|
144
|
+
i0.ɵɵelementStart(33, "div", 14)(34, "button", 15);
|
|
145
|
+
i0.ɵɵlistener("click", function MJOSubscriptionCancelComponent_Conditional_1_Template_button_click_34_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Close()); });
|
|
146
|
+
i0.ɵɵtext(35, "Keep subscription");
|
|
147
|
+
i0.ɵɵelementEnd();
|
|
148
|
+
i0.ɵɵconditionalCreate(36, MJOSubscriptionCancelComponent_Conditional_1_Conditional_36_Template, 2, 1, "button", 16)(37, MJOSubscriptionCancelComponent_Conditional_1_Conditional_37_Template, 2, 1, "button", 17);
|
|
149
|
+
i0.ɵɵelementEnd()();
|
|
150
|
+
} if (rf & 2) {
|
|
151
|
+
let tmp_8_0;
|
|
152
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
153
|
+
i0.ɵɵadvance(3);
|
|
154
|
+
i0.ɵɵproperty("disabled", ctx_r1.Busy);
|
|
155
|
+
i0.ɵɵadvance(4);
|
|
156
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Timing);
|
|
157
|
+
i0.ɵɵadvance(5);
|
|
158
|
+
i0.ɵɵtextInterpolate1("", ctx_r1.TypeName, "'s cancellation rule and grace period decide when coverage and access end. Preview shows the dates.");
|
|
159
|
+
i0.ɵɵadvance(2);
|
|
160
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Timing);
|
|
161
|
+
i0.ɵɵadvance(7);
|
|
162
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Timing);
|
|
163
|
+
i0.ɵɵadvance(9);
|
|
164
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Reason);
|
|
165
|
+
i0.ɵɵproperty("disabled", ctx_r1.Busy);
|
|
166
|
+
i0.ɵɵadvance();
|
|
167
|
+
i0.ɵɵconditional((tmp_8_0 = ctx_r1.Preview == null ? null : ctx_r1.Preview.Decision) ? 31 : -1, tmp_8_0);
|
|
168
|
+
i0.ɵɵadvance();
|
|
169
|
+
i0.ɵɵconditional(ctx_r1.Error ? 32 : -1);
|
|
170
|
+
i0.ɵɵadvance(2);
|
|
171
|
+
i0.ɵɵproperty("disabled", ctx_r1.Busy);
|
|
172
|
+
i0.ɵɵadvance(2);
|
|
173
|
+
i0.ɵɵconditional(ctx_r1.Preview ? 36 : 37);
|
|
174
|
+
} }
|
|
175
|
+
/** Statuses a subscription can be cancelled from. The operation refuses `Canceled` itself. */
|
|
176
|
+
const CANCELLABLE_STATUSES = new Set(['Active', 'Trialing', 'Paused']);
|
|
177
|
+
/**
|
|
178
|
+
* `mjo-subscription-cancel` — cancel a subscription from its form: choose when coverage ends,
|
|
179
|
+
* preview what that does, then confirm.
|
|
180
|
+
*
|
|
181
|
+
* The decision is the server's. Preview and confirm are the same `Orders.CancelSubscription` call,
|
|
182
|
+
* the first with `Preview: true`, so what the person confirms is what the operation computed, not a
|
|
183
|
+
* second calculation done here. Changing the timing or the reason throws the preview away, so a
|
|
184
|
+
* stale preview can never be confirmed.
|
|
185
|
+
*
|
|
186
|
+
* Offered only to a viewer who may update subscriptions, and only while the subscription is in a
|
|
187
|
+
* status it can be cancelled from.
|
|
188
|
+
*
|
|
189
|
+
* ```html
|
|
190
|
+
* <mjo-subscription-cancel [Record]="Record" [Provider]="provider" (Canceled)="refresh()" />
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
export class MJOSubscriptionCancelComponent {
|
|
194
|
+
cdr = inject(ChangeDetectorRef);
|
|
195
|
+
Record;
|
|
196
|
+
/** The provider the record was loaded through; the operation and the permission check use it. */
|
|
197
|
+
Provider;
|
|
198
|
+
/** Emits after a confirmed cancellation, so the host can reload the record. */
|
|
199
|
+
Canceled = new EventEmitter();
|
|
200
|
+
Open = false;
|
|
201
|
+
Busy = false;
|
|
202
|
+
Error = null;
|
|
203
|
+
/**
|
|
204
|
+
* The type's own rule by default, so cancelling from here means what the type says it means; an
|
|
205
|
+
* `EndOfBillingPeriod` type ends at its billing period, not the term. A timing is an override.
|
|
206
|
+
*/
|
|
207
|
+
Timing = 'Type';
|
|
208
|
+
Reason = '';
|
|
209
|
+
Preview = null;
|
|
210
|
+
get CanCancel() {
|
|
211
|
+
if (!this.Record?.IsSaved || !CANCELLABLE_STATUSES.has(this.Record.Status))
|
|
212
|
+
return false;
|
|
213
|
+
const user = this.Provider?.CurrentUser;
|
|
214
|
+
return !!user && this.Record.EntityInfo.GetUserPermisions(user).CanUpdate;
|
|
215
|
+
}
|
|
216
|
+
/** The type's name for the default option, from the subscription's own view field. */
|
|
217
|
+
get TypeName() {
|
|
218
|
+
return this.Record?.SubscriptionType || 'the subscription type';
|
|
219
|
+
}
|
|
220
|
+
Day(value) {
|
|
221
|
+
return ToISODate(value) ?? '—';
|
|
222
|
+
}
|
|
223
|
+
Start() {
|
|
224
|
+
this.Open = true;
|
|
225
|
+
this.Timing = 'Type';
|
|
226
|
+
this.Reason = '';
|
|
227
|
+
this.Preview = null;
|
|
228
|
+
this.Error = null;
|
|
229
|
+
}
|
|
230
|
+
Close() {
|
|
231
|
+
this.Open = false;
|
|
232
|
+
this.Timing = 'Type';
|
|
233
|
+
this.Reason = '';
|
|
234
|
+
this.Preview = null;
|
|
235
|
+
this.Error = null;
|
|
236
|
+
}
|
|
237
|
+
/** Any change to what would be sent makes the preview describe something else. */
|
|
238
|
+
Changed() {
|
|
239
|
+
this.Preview = null;
|
|
240
|
+
this.Error = null;
|
|
241
|
+
}
|
|
242
|
+
async RunPreview() {
|
|
243
|
+
const output = await this.execute(true);
|
|
244
|
+
if (output)
|
|
245
|
+
this.Preview = output;
|
|
246
|
+
}
|
|
247
|
+
async Confirm() {
|
|
248
|
+
if (!this.Preview)
|
|
249
|
+
return;
|
|
250
|
+
const output = await this.execute(false);
|
|
251
|
+
if (!output)
|
|
252
|
+
return;
|
|
253
|
+
this.Close();
|
|
254
|
+
this.Canceled.emit(output);
|
|
255
|
+
}
|
|
256
|
+
async execute(preview) {
|
|
257
|
+
this.Busy = true;
|
|
258
|
+
this.Error = null;
|
|
259
|
+
try {
|
|
260
|
+
const result = await new OrdersCancelSubscriptionOperation().Execute({
|
|
261
|
+
SubscriptionID: this.Record.ID,
|
|
262
|
+
Timing: this.Timing === 'Type' ? undefined : this.Timing,
|
|
263
|
+
Reason: this.Reason.trim() || undefined,
|
|
264
|
+
Preview: preview,
|
|
265
|
+
}, { provider: this.Provider });
|
|
266
|
+
if (!result.Success || !result.Output?.Success) {
|
|
267
|
+
throw new Error(result.Output?.Message ?? result.ErrorMessage ?? 'The cancellation failed.');
|
|
268
|
+
}
|
|
269
|
+
return result.Output;
|
|
270
|
+
}
|
|
271
|
+
catch (err) {
|
|
272
|
+
this.Error = err instanceof Error ? err.message : String(err);
|
|
273
|
+
return null;
|
|
274
|
+
}
|
|
275
|
+
finally {
|
|
276
|
+
this.Busy = false;
|
|
277
|
+
this.cdr.detectChanges();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
static ɵfac = function MJOSubscriptionCancelComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJOSubscriptionCancelComponent)(); };
|
|
281
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJOSubscriptionCancelComponent, selectors: [["mjo-subscription-cancel"]], inputs: { Record: "Record", Provider: "Provider" }, outputs: { Canceled: "Canceled" }, standalone: false, decls: 2, vars: 2, consts: [[1, "mjo-sc-toolbar"], ["aria-labelledby", "mjo-sc-title", 1, "mjo-sc"], ["type", "button", "mjButton", "", "variant", "outline", "size", "sm", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-ban"], ["id", "mjo-sc-title", 1, "mjo-sc__title"], [1, "mjo-sc__timing", 3, "disabled"], [1, "mjo-sc__option"], ["type", "radio", "name", "timing", "value", "Type", 3, "ngModelChange", "ngModel"], [1, "mjo-sc__hint"], ["type", "radio", "name", "timing", "value", "EndOfTerm", 3, "ngModelChange", "ngModel"], ["type", "radio", "name", "timing", "value", "Immediate", 3, "ngModelChange", "ngModel"], [1, "mjo-sc__field"], ["name", "reason", "rows", "2", "maxlength", "1000", 3, "ngModelChange", "ngModel", "disabled"], ["role", "alert", 1, "mjo-sc__error"], [1, "mjo-sc__actions"], ["type", "button", "mjButton", "", "variant", "flat", "size", "sm", 3, "click", "disabled"], ["type", "button", "mjButton", "", "variant", "danger", "size", "sm", 3, "disabled"], ["type", "button", "mjButton", "", "variant", "primary", "size", "sm", 3, "disabled"], ["aria-live", "polite", 1, "mjo-sc__preview"], [1, "mjo-sc__explain"], ["aria-hidden", "true", 1, "fa-solid", "fa-triangle-exclamation"], ["type", "button", "mjButton", "", "variant", "danger", "size", "sm", 3, "click", "disabled"], ["type", "button", "mjButton", "", "variant", "primary", "size", "sm", 3, "click", "disabled"]], template: function MJOSubscriptionCancelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
282
|
+
i0.ɵɵconditionalCreate(0, MJOSubscriptionCancelComponent_Conditional_0_Template, 4, 0, "div", 0);
|
|
283
|
+
i0.ɵɵconditionalCreate(1, MJOSubscriptionCancelComponent_Conditional_1_Template, 38, 11, "section", 1);
|
|
284
|
+
} if (rf & 2) {
|
|
285
|
+
i0.ɵɵconditional(ctx.CanCancel && !ctx.Open ? 0 : -1);
|
|
286
|
+
i0.ɵɵadvance();
|
|
287
|
+
i0.ɵɵconditional(ctx.Open ? 1 : -1);
|
|
288
|
+
} }, dependencies: [i1.DefaultValueAccessor, i1.RadioControlValueAccessor, i1.NgControlStatus, i1.MaxLengthValidator, i1.NgModel, i2.MJButtonDirective, i3.MJOMoneyPipe], styles: [".mjo-sc-toolbar[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n}\n\n.mjo-sc[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-3);\n padding: var(--mj-space-4);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n}\n\n.mjo-sc__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--mj-text-base);\n font-weight: 600;\n}\n\n.mjo-sc__timing[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2);\n margin: 0;\n padding: 0;\n border: none;\n}\n\n.mjo-sc__timing[_ngcontent-%COMP%] legend[_ngcontent-%COMP%] {\n margin-bottom: var(--mj-space-1);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n}\n\n.mjo-sc__option[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-2);\n cursor: pointer;\n}\n\n.mjo-sc__option[_ngcontent-%COMP%] > span[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1);\n}\n\n.mjo-sc__hint[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mjo-sc__field[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n}\n\n.mjo-sc__preview[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));\n gap: var(--mj-space-3);\n margin: 0;\n}\n\n.mjo-sc__preview[_ngcontent-%COMP%] dt[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mjo-sc__preview[_ngcontent-%COMP%] dd[_ngcontent-%COMP%] {\n margin: 0;\n font-weight: 600;\n}\n\n.mjo-sc__explain[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--mj-text-sm);\n}\n\n.mjo-sc__error[_ngcontent-%COMP%] {\n margin: 0;\n color: var(--mj-status-error-text);\n}\n\n.mjo-sc__actions[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: var(--mj-space-2);\n}"] });
|
|
289
|
+
}
|
|
290
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJOSubscriptionCancelComponent, [{
|
|
291
|
+
type: Component,
|
|
292
|
+
args: [{ standalone: false, selector: 'mjo-subscription-cancel', template: "@if (CanCancel && !Open) {\n <div class=\"mjo-sc-toolbar\">\n <button type=\"button\" mjButton variant=\"outline\" size=\"sm\" (click)=\"Start()\">\n <i class=\"fa-solid fa-ban\" aria-hidden=\"true\"></i> Cancel subscription\n </button>\n </div>\n}\n@if (Open) {\n <section class=\"mjo-sc\" aria-labelledby=\"mjo-sc-title\">\n <h2 id=\"mjo-sc-title\" class=\"mjo-sc__title\">Cancel subscription</h2>\n <fieldset class=\"mjo-sc__timing\" [disabled]=\"Busy\">\n <legend>When does access end?</legend>\n <label class=\"mjo-sc__option\">\n <input type=\"radio\" name=\"timing\" value=\"Type\" [(ngModel)]=\"Timing\" (ngModelChange)=\"Changed()\" />\n <span>\n <strong>As the subscription type sets it</strong>\n <span class=\"mjo-sc__hint\">{{ TypeName }}'s cancellation rule and grace period decide when coverage and access end. Preview shows the dates.</span>\n </span>\n </label>\n <label class=\"mjo-sc__option\">\n <input type=\"radio\" name=\"timing\" value=\"EndOfTerm\" [(ngModel)]=\"Timing\" (ngModelChange)=\"Changed()\" />\n <span>\n <strong>At the end of the term instead</strong>\n <span class=\"mjo-sc__hint\">Access runs to the last day of what was paid for, with no grace period. It does not renew.</span>\n </span>\n </label>\n <label class=\"mjo-sc__option\">\n <input type=\"radio\" name=\"timing\" value=\"Immediate\" [(ngModel)]=\"Timing\" (ngModelChange)=\"Changed()\" />\n <span>\n <strong>Immediately instead</strong>\n <span class=\"mjo-sc__hint\">Coverage and access end today. Any refund follows the subscription type's refund rule; give other money back from the payment's Refund page.</span>\n </span>\n </label>\n </fieldset>\n <label class=\"mjo-sc__field\">\n <span>Reason</span>\n <textarea name=\"reason\" rows=\"2\" maxlength=\"1000\" [(ngModel)]=\"Reason\" (ngModelChange)=\"Changed()\" [disabled]=\"Busy\"></textarea>\n </label>\n\n @if (Preview?.Decision; as d) {\n <dl class=\"mjo-sc__preview\" aria-live=\"polite\">\n <div><dt>Coverage ends</dt><dd>{{ Day(d.EffectiveDate) }}</dd></div>\n <div><dt>Access ends</dt><dd>{{ Day(d.AccessThroughDate) }}</dd></div>\n <div><dt>Refund</dt><dd>{{ Preview?.TotalRefundAmount ?? d.RefundAmount | mjoMoney: { Zero: 'None' } }}</dd></div>\n @if (Preview?.LaterTerms?.length) {\n <div><dt>Later terms canceled</dt><dd>{{ Preview?.LaterTerms?.length }}</dd></div>\n }\n </dl>\n <p class=\"mjo-sc__explain\">{{ Preview?.Message || d.Explanation }}</p>\n }\n\n @if (Error) {\n <p class=\"mjo-sc__error\" role=\"alert\"><i class=\"fa-solid fa-triangle-exclamation\" aria-hidden=\"true\"></i> {{ Error }}</p>\n }\n\n <div class=\"mjo-sc__actions\">\n <button type=\"button\" mjButton variant=\"flat\" size=\"sm\" (click)=\"Close()\" [disabled]=\"Busy\">Keep subscription</button>\n @if (Preview) {\n <button type=\"button\" mjButton variant=\"danger\" size=\"sm\" (click)=\"Confirm()\" [disabled]=\"Busy\">Confirm cancellation</button>\n } @else {\n <button type=\"button\" mjButton variant=\"primary\" size=\"sm\" (click)=\"RunPreview()\" [disabled]=\"Busy\">Preview</button>\n }\n </div>\n </section>\n}\n", styles: [".mjo-sc-toolbar {\n display: flex;\n justify-content: flex-end;\n}\n\n.mjo-sc {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-3);\n padding: var(--mj-space-4);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n background: var(--mj-bg-surface);\n}\n\n.mjo-sc__title {\n margin: 0;\n font-size: var(--mj-text-base);\n font-weight: 600;\n}\n\n.mjo-sc__timing {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-2);\n margin: 0;\n padding: 0;\n border: none;\n}\n\n.mjo-sc__timing legend {\n margin-bottom: var(--mj-space-1);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n}\n\n.mjo-sc__option {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-2);\n cursor: pointer;\n}\n\n.mjo-sc__option > span {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1);\n}\n\n.mjo-sc__hint {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mjo-sc__field {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-1);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-muted);\n}\n\n.mjo-sc__preview {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));\n gap: var(--mj-space-3);\n margin: 0;\n}\n\n.mjo-sc__preview dt {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mjo-sc__preview dd {\n margin: 0;\n font-weight: 600;\n}\n\n.mjo-sc__explain {\n margin: 0;\n font-size: var(--mj-text-sm);\n}\n\n.mjo-sc__error {\n margin: 0;\n color: var(--mj-status-error-text);\n}\n\n.mjo-sc__actions {\n display: flex;\n justify-content: flex-end;\n gap: var(--mj-space-2);\n}\n"] }]
|
|
293
|
+
}], null, { Record: [{
|
|
294
|
+
type: Input,
|
|
295
|
+
args: [{ required: true }]
|
|
296
|
+
}], Provider: [{
|
|
297
|
+
type: Input,
|
|
298
|
+
args: [{ required: true }]
|
|
299
|
+
}], Canceled: [{
|
|
300
|
+
type: Output
|
|
301
|
+
}] }); })();
|
|
302
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJOSubscriptionCancelComponent, { className: "MJOSubscriptionCancelComponent", filePath: "lib/form-panels/subscription-cancel.component.ts", lineNumber: 43 }); })();
|
|
303
|
+
//# sourceMappingURL=subscription-cancel.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription-cancel.component.js","sourceRoot":"","sources":["../../../src/lib/form-panels/subscription-cancel.component.ts","../../../src/lib/form-panels/subscription-cancel.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAElG,OAAO,EACH,iCAAiC,EACjC,SAAS,GAIZ,MAAM,8BAA8B,CAAC;;;;;;;;ICN9B,AADJ,8BAA4B,gBACqD;IAAlB,kMAAS,cAAO,KAAC;IACxE,uBAAkD;IAAC,qCACvD;IACJ,AADI,iBAAS,EACP;;;IAwCe,AAAL,2BAAK,SAAI;IAAA,oCAAoB;IAAA,iBAAK;IAAA,0BAAI;IAAA,YAAiC;IAAK,AAAL,iBAAK,EAAM;;;IAA5C,eAAiC;IAAjC,iIAAiC;;;IAJtE,AAAL,AADJ,8BAA+C,UACtC,SAAI;IAAA,6BAAa;IAAA,iBAAK;IAAA,0BAAI;IAAA,YAA0B;IAAK,AAAL,iBAAK,EAAM;IAC/D,AAAL,2BAAK,SAAI;IAAA,2BAAW;IAAA,iBAAK;IAAA,0BAAI;IAAA,aAA8B;IAAK,AAAL,iBAAK,EAAM;IACjE,AAAL,4BAAK,UAAI;IAAA,uBAAM;IAAA,iBAAK;IAAA,2BAAI;IAAA,aAA+E;;IAAK,AAAL,iBAAK,EAAM;IAClH,4HAAmC;IAGvC,iBAAK;IACL,8BAA2B;IAAA,aAAuC;IAAA,iBAAI;;;;IAPnC,eAA0B;IAA1B,oDAA0B;IAC5B,eAA8B;IAA9B,w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,EAAE,CAAC;QAC7B,CAAC;IACL,CAAC;wHA3FQ,8BAA8B;6DAA9B,8BAA8B;YC1C3C,gGAA0B;YAO1B,sGAAY;;YAPZ,qDAMC;YACD,cAyDC;YAzDD,mCAyDC;;;iFDtBY,8BAA8B;cAN1C,SAAS;6BACM,KAAK,YACP,yBAAyB;;kBAOlC,KAAK;mBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;kBAExB,KAAK;mBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;kBAExB,MAAM;;kFAPE,8BAA8B"}
|
|
@@ -17,6 +17,13 @@ export declare class SubscriptionHeaderPanel extends BaseFormPanel<mjBizAppsOrde
|
|
|
17
17
|
get StatusClass(): string;
|
|
18
18
|
get AutoRenewClass(): string;
|
|
19
19
|
get Coverage(): string;
|
|
20
|
+
/**
|
|
21
|
+
* A confirmed cancellation rewrote the status, end date and auto-renew, and the terms, grants and
|
|
22
|
+
* events beside them. `RefreshRecord()` reloads the record and tells every panel through
|
|
23
|
+
* `OnRecordRefreshed`, so the Overview cards update too; when it declines (edit mode) the record is
|
|
24
|
+
* re-read directly so this header at least shows the cancellation.
|
|
25
|
+
*/
|
|
26
|
+
OnCanceled(): Promise<void>;
|
|
20
27
|
get Holder(): string;
|
|
21
28
|
get Beneficiary(): string;
|
|
22
29
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-header.panel.d.ts","sourceRoot":"","sources":["../../../src/lib/form-panels/subscription-header.panel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;;AAYtF;;GAEG;AACH,qBAea,uBAAwB,SAAQ,aAAa,CAAC,iCAAiC,CAAC;IACzF;;;;OAIG;IACH,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,YAAY,CAA4B;IAEhD,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED,IAAW,cAAc,IAAI,MAAM,CAElC;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED;;;;;;;;;;;OAWG;IACH,IAAW,YAAY,IAAI,kBAAkB,EAAE,CAkB9C;
|
|
1
|
+
{"version":3,"file":"subscription-header.panel.d.ts","sourceRoot":"","sources":["../../../src/lib/form-panels/subscription-header.panel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;;AAYtF;;GAEG;AACH,qBAea,uBAAwB,SAAQ,aAAa,CAAC,iCAAiC,CAAC;IACzF;;;;OAIG;IACH,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,YAAY,CAA4B;IAEhD,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED,IAAW,cAAc,IAAI,MAAM,CAElC;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED;;;;;OAKG;IACU,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAMxC,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,WAAW,IAAI,MAAM,CAE/B;IAED;;;;;;;;;;;OAWG;IACH,IAAW,YAAY,IAAI,kBAAkB,EAAE,CAkB9C;yCA3EQ,uBAAuB;2CAAvB,uBAAuB;CA4EnC"}
|
|
@@ -11,6 +11,7 @@ import { MJO_ENTITIES } from '../data/entity-names.js';
|
|
|
11
11
|
import { FormatCoverageWindow, SubscriptionStatusChipClass } from './document-form.helpers.js';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
import * as i1 from "@mj-biz-apps/common-ng";
|
|
14
|
+
import * as i2 from "./subscription-cancel.component.js";
|
|
14
15
|
function SubscriptionHeaderPanel_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
15
16
|
i0.ɵɵelementStart(0, "span");
|
|
16
17
|
i0.ɵɵtext(1);
|
|
@@ -59,6 +60,18 @@ let SubscriptionHeaderPanel = class SubscriptionHeaderPanel extends BaseFormPane
|
|
|
59
60
|
get Coverage() {
|
|
60
61
|
return FormatCoverageWindow(this.Record.StartDate, this.Record.EndDate);
|
|
61
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* A confirmed cancellation rewrote the status, end date and auto-renew, and the terms, grants and
|
|
65
|
+
* events beside them. `RefreshRecord()` reloads the record and tells every panel through
|
|
66
|
+
* `OnRecordRefreshed`, so the Overview cards update too; when it declines (edit mode) the record is
|
|
67
|
+
* re-read directly so this header at least shows the cancellation.
|
|
68
|
+
*/
|
|
69
|
+
async OnCanceled() {
|
|
70
|
+
const refreshed = await this.FormComponent.RefreshRecord();
|
|
71
|
+
if (!refreshed)
|
|
72
|
+
await this.Record.Refresh();
|
|
73
|
+
this.FormComponent.cdr.detectChanges();
|
|
74
|
+
}
|
|
62
75
|
get Holder() {
|
|
63
76
|
return this.Record.HolderOrganization || '—';
|
|
64
77
|
}
|
|
@@ -97,7 +110,7 @@ let SubscriptionHeaderPanel = class SubscriptionHeaderPanel extends BaseFormPane
|
|
|
97
110
|
return this.relatedLinks;
|
|
98
111
|
}
|
|
99
112
|
static ɵfac = /*@__PURE__*/ (() => { let ɵSubscriptionHeaderPanel_BaseFactory; return function SubscriptionHeaderPanel_Factory(__ngFactoryType__) { return (ɵSubscriptionHeaderPanel_BaseFactory || (ɵSubscriptionHeaderPanel_BaseFactory = i0.ɵɵgetInheritedFactory(SubscriptionHeaderPanel)))(__ngFactoryType__ || SubscriptionHeaderPanel); }; })();
|
|
100
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SubscriptionHeaderPanel, selectors: [["mjo-subscription-header-panel"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
113
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SubscriptionHeaderPanel, selectors: [["mjo-subscription-header-panel"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 33, vars: 16, consts: [[1, "mjo-doc-hero"], [1, "mjo-doc-hero__identity"], [1, "mjo-doc-hero__avatar"], ["aria-hidden", "true", 1, "fa-solid", "fa-arrows-rotate"], [1, "mjo-doc-hero__copy"], [1, "mjo-doc-hero__title-row"], [1, "mjo-doc-hero__title"], [1, "mjo-doc-hero__meta"], [3, "Navigate", "Links", "Provider"], [1, "mjo-doc-hero__stats"], [1, "mjo-doc-stat"], [1, "mjo-doc-stat__label"], [1, "mjo-doc-stat__value"], [3, "Canceled", "Record", "Provider"]], template: function SubscriptionHeaderPanel_Template(rf, ctx) { if (rf & 1) {
|
|
101
114
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2);
|
|
102
115
|
i0.ɵɵelement(3, "i", 3);
|
|
103
116
|
i0.ɵɵelementEnd();
|
|
@@ -133,7 +146,10 @@ let SubscriptionHeaderPanel = class SubscriptionHeaderPanel extends BaseFormPane
|
|
|
133
146
|
i0.ɵɵelementEnd();
|
|
134
147
|
i0.ɵɵelementStart(30, "span", 12);
|
|
135
148
|
i0.ɵɵtext(31);
|
|
136
|
-
i0.ɵɵelementEnd()()()
|
|
149
|
+
i0.ɵɵelementEnd()()();
|
|
150
|
+
i0.ɵɵelementStart(32, "mjo-subscription-cancel", 13);
|
|
151
|
+
i0.ɵɵlistener("Canceled", function SubscriptionHeaderPanel_Template_mjo_subscription_cancel_Canceled_32_listener() { return ctx.OnCanceled(); });
|
|
152
|
+
i0.ɵɵelementEnd()();
|
|
137
153
|
} if (rf & 2) {
|
|
138
154
|
i0.ɵɵadvance(7);
|
|
139
155
|
i0.ɵɵtextInterpolate(ctx.Title);
|
|
@@ -157,7 +173,9 @@ let SubscriptionHeaderPanel = class SubscriptionHeaderPanel extends BaseFormPane
|
|
|
157
173
|
i0.ɵɵtextInterpolate(ctx.Holder);
|
|
158
174
|
i0.ɵɵadvance(5);
|
|
159
175
|
i0.ɵɵtextInterpolate(ctx.Beneficiary);
|
|
160
|
-
|
|
176
|
+
i0.ɵɵadvance();
|
|
177
|
+
i0.ɵɵproperty("Record", ctx.Record)("Provider", ctx.FormComponent.ProviderToUse);
|
|
178
|
+
} }, dependencies: [i1.RelatedChipsComponent, i2.MJOSubscriptionCancelComponent], styles: [".mjo-doc-hero[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-4);\n padding: var(--mj-space-4) var(--mj-space-5);\n margin-bottom: var(--mj-space-4);\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.04));\n}\n\n.mjo-doc-hero__identity[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: var(--mj-space-4);\n min-width: 0;\n}\n\n.mjo-doc-hero__avatar[_ngcontent-%COMP%] {\n flex: none;\n width: 52px;\n height: 52px;\n border-radius: var(--mj-radius-md);\n display: flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--mj-brand-primary) 18%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-size: 1.25rem;\n}\n\n.mjo-doc-hero__avatar--reverse[_ngcontent-%COMP%] {\n background: color-mix(in srgb, var(--mj-status-warning) 22%, var(--mj-bg-surface));\n color: var(--mj-status-warning-text);\n}\n\n.mjo-doc-hero__copy[_ngcontent-%COMP%] {\n min-width: 0;\n flex: 1;\n}\n\n.mjo-doc-hero__title-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--mj-space-2) var(--mj-space-3);\n}\n\n.mjo-doc-hero__title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--mj-text-lg);\n font-weight: 700;\n color: var(--mj-text-primary);\n line-height: 1.25;\n}\n\n.mjo-doc-hero__meta[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-3);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n}\n\n.mjo-doc-hero__stats[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));\n gap: var(--mj-space-3);\n}\n\n.mjo-doc-stat[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.mjo-doc-stat__label[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-stat__value[_ngcontent-%COMP%] {\n font-size: var(--mj-text-md);\n font-weight: 650;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mjo-doc-chip[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-sm);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.mjo-doc-chip--ok[_ngcontent-%COMP%] {\n background: var(--mj-status-success-bg);\n color: var(--mj-status-success-text);\n}\n\n.mjo-doc-chip--draft[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.mjo-doc-chip--error[_ngcontent-%COMP%] {\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error-text);\n}\n\n.mjo-doc-chip--warn[_ngcontent-%COMP%] {\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n}\n\n.mjo-doc-chip--info[_ngcontent-%COMP%] {\n background: var(--mj-status-info-bg);\n color: var(--mj-status-info-text);\n}\n\n.mjo-doc-chip--muted[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-chip--on[_ngcontent-%COMP%] {\n background: var(--mj-status-success-bg);\n color: var(--mj-status-success-text);\n}\n\n.mjo-doc-chip--off[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n}\n\n.mjo-terms-toolbar[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n margin-bottom: var(--mj-space-3);\n}\n\n.mjo-term-empty[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n padding: var(--mj-space-4);\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-stat__sub[_ngcontent-%COMP%] {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mjo-ov[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: var(--mj-space-4);\n}\n\n.mjo-ov-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.04));\n min-width: 0;\n}\n\n.mjo-ov-card--wide[_ngcontent-%COMP%] {\n grid-column: 1 / -1;\n}\n\n.mjo-ov-card__h[_ngcontent-%COMP%] {\n padding: var(--mj-space-3) var(--mj-space-4) var(--mj-space-2);\n}\n\n.mjo-ov-card__h[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--mj-text-sm);\n font-weight: 700;\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n}\n\n.mjo-ov-card__h[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: var(--mj-brand-primary);\n font-size: 12px;\n}\n\n.mjo-ov-card__b[_ngcontent-%COMP%] {\n padding: 4px var(--mj-space-4) var(--mj-space-4);\n}\n\n.mjo-ov-note[_ngcontent-%COMP%] {\n margin: 0 0 var(--mj-space-3);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n line-height: 1.5;\n}\n\n.mjo-ov-facts[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: var(--mj-space-3) var(--mj-space-4);\n}\n\n.mjo-ov-fact__l[_ngcontent-%COMP%] {\n font-size: 10.5px;\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n.mjo-ov-fact__v[_ngcontent-%COMP%] {\n font-size: var(--mj-text-sm);\n font-weight: 650;\n color: var(--mj-text-primary);\n}\n\n.mjo-ov-table[_ngcontent-%COMP%] {\n width: 100%;\n border-collapse: collapse;\n font-size: var(--mj-text-sm);\n}\n\n.mjo-ov-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] {\n text-align: left;\n font-size: 10.5px;\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n padding: 6px 8px;\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.mjo-ov-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] {\n padding: 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n}\n\n.mjo-ov-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%] {\n border-bottom: 0;\n}\n\n.mjo-ov-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-3);\n padding: 8px 0;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.mjo-ov-row[_ngcontent-%COMP%]:last-child {\n border-bottom: 0;\n}\n\n.mjo-ov-row[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n margin: 0;\n font-size: var(--mj-text-sm);\n font-weight: 650;\n}\n\n.mjo-ov-row[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 2px 0 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.mjo-ov-empty[_ngcontent-%COMP%] {\n padding: 12px 4px;\n color: var(--mj-text-muted);\n font-size: var(--mj-text-sm);\n}\n\n@media (max-width: 800px) {\n .mjo-ov[_ngcontent-%COMP%], \n .mjo-ov-facts[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n }\n\n .mjo-ov-card--wide[_ngcontent-%COMP%] {\n grid-column: auto;\n }\n}\n\n.mjo-doc-hero__description[_ngcontent-%COMP%] {\n margin: 0;\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n line-height: 1.5;\n white-space: pre-wrap;\n}\n\n\n\n\n.mjo-doc-hero__edit[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));\n gap: var(--mj-space-3) var(--mj-space-4);\n padding-top: var(--mj-space-4);\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.mjo-doc-hero__field[_ngcontent-%COMP%] {\n min-width: 0;\n}\n\n.mjo-doc-hero__field--span[_ngcontent-%COMP%] {\n grid-column: 1 / -1;\n}\n\n\n\n\n.mjo-doc-hero__field[_ngcontent-%COMP%] .mj-forms-field {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 4px;\n padding: 0;\n}\n\n.mjo-doc-hero__field[_ngcontent-%COMP%] .mj-forms-field-label {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-bold);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-hero__field[_ngcontent-%COMP%] .mj-forms-field--editing:hover {\n margin: 0;\n padding: 0;\n}\n\n.mjo-doc-hero__field[_ngcontent-%COMP%] .mj-forms-field-control {\n width: 100%;\n}"] });
|
|
161
179
|
};
|
|
162
180
|
SubscriptionHeaderPanel = __decorate([
|
|
163
181
|
RegisterClassEx(BaseFormPanel, {
|
|
@@ -173,7 +191,7 @@ SubscriptionHeaderPanel = __decorate([
|
|
|
173
191
|
export { SubscriptionHeaderPanel };
|
|
174
192
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SubscriptionHeaderPanel, [{
|
|
175
193
|
type: Component,
|
|
176
|
-
args: [{ standalone: false, selector: 'mjo-subscription-header-panel', template: "<div class=\"mjo-doc-hero\">\n <div class=\"mjo-doc-hero__identity\">\n <div class=\"mjo-doc-hero__avatar\">\n <i class=\"fa-solid fa-arrows-rotate\" aria-hidden=\"true\"></i>\n </div>\n <div class=\"mjo-doc-hero__copy\">\n <div class=\"mjo-doc-hero__title-row\">\n <h1 class=\"mjo-doc-hero__title\">{{ Title }}</h1>\n <span [class]=\"StatusClass\">{{ Record.Status || 'Active' }}</span>\n <span [class]=\"AutoRenewClass\">\n <i class=\"fa-solid fa-arrows-rotate\" aria-hidden=\"true\"></i>\n {{ Record.AutoRenew ? 'Auto-renews' : 'Manual renewal' }}\n </span>\n </div>\n <div class=\"mjo-doc-hero__meta\">\n <span>Coverage: <strong>{{ Coverage }}</strong></span>\n @if (Record.Product) {\n <span>{{ Record.Product }}</span>\n }\n @if (Record.Company) {\n <span>{{ Record.Company }}</span>\n }\n </div>\n <bizapps-related-chips\n [Links]=\"RelatedLinks\"\n [Provider]=\"FormComponent.ProviderToUse\"\n (Navigate)=\"FormComponent.OnFormNavigate($event)\" />\n </div>\n </div>\n <div class=\"mjo-doc-hero__stats\">\n <div class=\"mjo-doc-stat\">\n <span class=\"mjo-doc-stat__label\">Holder</span>\n <span class=\"mjo-doc-stat__value\">{{ Holder }}</span>\n </div>\n <div class=\"mjo-doc-stat\">\n <span class=\"mjo-doc-stat__label\">Beneficiary</span>\n <span class=\"mjo-doc-stat__value\">{{ Beneficiary }}</span>\n </div>\n </div>\n</div>\n", styles: [".mjo-doc-hero {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-4);\n padding: var(--mj-space-4) var(--mj-space-5);\n margin-bottom: var(--mj-space-4);\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.04));\n}\n\n.mjo-doc-hero__identity {\n display: flex;\n align-items: center;\n gap: var(--mj-space-4);\n min-width: 0;\n}\n\n.mjo-doc-hero__avatar {\n flex: none;\n width: 52px;\n height: 52px;\n border-radius: var(--mj-radius-md);\n display: flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--mj-brand-primary) 18%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-size: 1.25rem;\n}\n\n.mjo-doc-hero__avatar--reverse {\n background: color-mix(in srgb, var(--mj-status-warning) 22%, var(--mj-bg-surface));\n color: var(--mj-status-warning-text);\n}\n\n.mjo-doc-hero__copy {\n min-width: 0;\n flex: 1;\n}\n\n.mjo-doc-hero__title-row {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--mj-space-2) var(--mj-space-3);\n}\n\n.mjo-doc-hero__title {\n margin: 0;\n font-size: var(--mj-text-lg);\n font-weight: 700;\n color: var(--mj-text-primary);\n line-height: 1.25;\n}\n\n.mjo-doc-hero__meta {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-3);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n}\n\n.mjo-doc-hero__stats {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));\n gap: var(--mj-space-3);\n}\n\n.mjo-doc-stat {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.mjo-doc-stat__label {\n font-size: var(--mj-text-xs);\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-stat__value {\n font-size: var(--mj-text-md);\n font-weight: 650;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mjo-doc-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-sm);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.mjo-doc-chip--ok {\n background: var(--mj-status-success-bg);\n color: var(--mj-status-success-text);\n}\n\n.mjo-doc-chip--draft {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.mjo-doc-chip--error {\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error-text);\n}\n\n.mjo-doc-chip--warn {\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n}\n\n.mjo-doc-chip--info {\n background: var(--mj-status-info-bg);\n color: var(--mj-status-info-text);\n}\n\n.mjo-doc-chip--muted {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-chip--on {\n background: var(--mj-status-success-bg);\n color: var(--mj-status-success-text);\n}\n\n.mjo-doc-chip--off {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n}\n\n.mjo-terms-toolbar {\n display: flex;\n justify-content: flex-end;\n margin-bottom: var(--mj-space-3);\n}\n\n.mjo-term-empty {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n padding: var(--mj-space-4);\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-stat__sub {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mjo-ov {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: var(--mj-space-4);\n}\n\n.mjo-ov-card {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.04));\n min-width: 0;\n}\n\n.mjo-ov-card--wide {\n grid-column: 1 / -1;\n}\n\n.mjo-ov-card__h {\n padding: var(--mj-space-3) var(--mj-space-4) var(--mj-space-2);\n}\n\n.mjo-ov-card__h h3 {\n margin: 0;\n font-size: var(--mj-text-sm);\n font-weight: 700;\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n}\n\n.mjo-ov-card__h i {\n color: var(--mj-brand-primary);\n font-size: 12px;\n}\n\n.mjo-ov-card__b {\n padding: 4px var(--mj-space-4) var(--mj-space-4);\n}\n\n.mjo-ov-note {\n margin: 0 0 var(--mj-space-3);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n line-height: 1.5;\n}\n\n.mjo-ov-facts {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: var(--mj-space-3) var(--mj-space-4);\n}\n\n.mjo-ov-fact__l {\n font-size: 10.5px;\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n.mjo-ov-fact__v {\n font-size: var(--mj-text-sm);\n font-weight: 650;\n color: var(--mj-text-primary);\n}\n\n.mjo-ov-table {\n width: 100%;\n border-collapse: collapse;\n font-size: var(--mj-text-sm);\n}\n\n.mjo-ov-table th {\n text-align: left;\n font-size: 10.5px;\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n padding: 6px 8px;\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.mjo-ov-table td {\n padding: 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n}\n\n.mjo-ov-table tr:last-child td {\n border-bottom: 0;\n}\n\n.mjo-ov-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-3);\n padding: 8px 0;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.mjo-ov-row:last-child {\n border-bottom: 0;\n}\n\n.mjo-ov-row h4 {\n margin: 0;\n font-size: var(--mj-text-sm);\n font-weight: 650;\n}\n\n.mjo-ov-row p {\n margin: 2px 0 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.mjo-ov-empty {\n padding: 12px 4px;\n color: var(--mj-text-muted);\n font-size: var(--mj-text-sm);\n}\n\n@media (max-width: 800px) {\n .mjo-ov,\n .mjo-ov-facts {\n grid-template-columns: 1fr;\n }\n\n .mjo-ov-card--wide {\n grid-column: auto;\n }\n}\n\n.mjo-doc-hero__description {\n margin: 0;\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n line-height: 1.5;\n white-space: pre-wrap;\n}\n\n/* mj-form-field is display: contents \u2014 its label and control would otherwise\n become direct children of this grid. Each field sits in a wrapping cell. */\n.mjo-doc-hero__edit {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));\n gap: var(--mj-space-3) var(--mj-space-4);\n padding-top: var(--mj-space-4);\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.mjo-doc-hero__field {\n min-width: 0;\n}\n\n.mjo-doc-hero__field--span {\n grid-column: 1 / -1;\n}\n\n/* Label above the control. The shared field is a 200px | 1fr row, which needs\n ~28rem per field \u2014 far more than a hero column gets. */\n.mjo-doc-hero__field ::ng-deep .mj-forms-field {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 4px;\n padding: 0;\n}\n\n.mjo-doc-hero__field ::ng-deep .mj-forms-field-label {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-bold);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-hero__field ::ng-deep .mj-forms-field--editing:hover {\n margin: 0;\n padding: 0;\n}\n\n.mjo-doc-hero__field ::ng-deep .mj-forms-field-control {\n width: 100%;\n}\n"] }]
|
|
194
|
+
args: [{ standalone: false, selector: 'mjo-subscription-header-panel', template: "<div class=\"mjo-doc-hero\">\n <div class=\"mjo-doc-hero__identity\">\n <div class=\"mjo-doc-hero__avatar\">\n <i class=\"fa-solid fa-arrows-rotate\" aria-hidden=\"true\"></i>\n </div>\n <div class=\"mjo-doc-hero__copy\">\n <div class=\"mjo-doc-hero__title-row\">\n <h1 class=\"mjo-doc-hero__title\">{{ Title }}</h1>\n <span [class]=\"StatusClass\">{{ Record.Status || 'Active' }}</span>\n <span [class]=\"AutoRenewClass\">\n <i class=\"fa-solid fa-arrows-rotate\" aria-hidden=\"true\"></i>\n {{ Record.AutoRenew ? 'Auto-renews' : 'Manual renewal' }}\n </span>\n </div>\n <div class=\"mjo-doc-hero__meta\">\n <span>Coverage: <strong>{{ Coverage }}</strong></span>\n @if (Record.Product) {\n <span>{{ Record.Product }}</span>\n }\n @if (Record.Company) {\n <span>{{ Record.Company }}</span>\n }\n </div>\n <bizapps-related-chips\n [Links]=\"RelatedLinks\"\n [Provider]=\"FormComponent.ProviderToUse\"\n (Navigate)=\"FormComponent.OnFormNavigate($event)\" />\n </div>\n </div>\n <div class=\"mjo-doc-hero__stats\">\n <div class=\"mjo-doc-stat\">\n <span class=\"mjo-doc-stat__label\">Holder</span>\n <span class=\"mjo-doc-stat__value\">{{ Holder }}</span>\n </div>\n <div class=\"mjo-doc-stat\">\n <span class=\"mjo-doc-stat__label\">Beneficiary</span>\n <span class=\"mjo-doc-stat__value\">{{ Beneficiary }}</span>\n </div>\n </div>\n <mjo-subscription-cancel\n [Record]=\"Record\"\n [Provider]=\"FormComponent.ProviderToUse\"\n (Canceled)=\"OnCanceled()\" />\n</div>\n", styles: [".mjo-doc-hero {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-4);\n padding: var(--mj-space-4) var(--mj-space-5);\n margin-bottom: var(--mj-space-4);\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.04));\n}\n\n.mjo-doc-hero__identity {\n display: flex;\n align-items: center;\n gap: var(--mj-space-4);\n min-width: 0;\n}\n\n.mjo-doc-hero__avatar {\n flex: none;\n width: 52px;\n height: 52px;\n border-radius: var(--mj-radius-md);\n display: flex;\n align-items: center;\n justify-content: center;\n background: color-mix(in srgb, var(--mj-brand-primary) 18%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-size: 1.25rem;\n}\n\n.mjo-doc-hero__avatar--reverse {\n background: color-mix(in srgb, var(--mj-status-warning) 22%, var(--mj-bg-surface));\n color: var(--mj-status-warning-text);\n}\n\n.mjo-doc-hero__copy {\n min-width: 0;\n flex: 1;\n}\n\n.mjo-doc-hero__title-row {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: var(--mj-space-2) var(--mj-space-3);\n}\n\n.mjo-doc-hero__title {\n margin: 0;\n font-size: var(--mj-text-lg);\n font-weight: 700;\n color: var(--mj-text-primary);\n line-height: 1.25;\n}\n\n.mjo-doc-hero__meta {\n display: flex;\n flex-wrap: wrap;\n gap: var(--mj-space-3);\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n}\n\n.mjo-doc-hero__stats {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));\n gap: var(--mj-space-3);\n}\n\n.mjo-doc-stat {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.mjo-doc-stat__label {\n font-size: var(--mj-text-xs);\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-stat__value {\n font-size: var(--mj-text-md);\n font-weight: 650;\n color: var(--mj-text-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.mjo-doc-chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n border-radius: var(--mj-radius-sm);\n font-size: var(--mj-text-xs);\n font-weight: 600;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.mjo-doc-chip--ok {\n background: var(--mj-status-success-bg);\n color: var(--mj-status-success-text);\n}\n\n.mjo-doc-chip--draft {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n}\n\n.mjo-doc-chip--error {\n background: var(--mj-status-error-bg);\n color: var(--mj-status-error-text);\n}\n\n.mjo-doc-chip--warn {\n background: var(--mj-status-warning-bg);\n color: var(--mj-status-warning-text);\n}\n\n.mjo-doc-chip--info {\n background: var(--mj-status-info-bg);\n color: var(--mj-status-info-text);\n}\n\n.mjo-doc-chip--muted {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-chip--on {\n background: var(--mj-status-success-bg);\n color: var(--mj-status-success-text);\n}\n\n.mjo-doc-chip--off {\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n}\n\n.mjo-terms-toolbar {\n display: flex;\n justify-content: flex-end;\n margin-bottom: var(--mj-space-3);\n}\n\n.mjo-term-empty {\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n padding: var(--mj-space-4);\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-stat__sub {\n font-size: var(--mj-text-xs);\n color: var(--mj-text-muted);\n}\n\n.mjo-ov {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: var(--mj-space-4);\n}\n\n.mjo-ov-card {\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-lg);\n box-shadow: var(--mj-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.04));\n min-width: 0;\n}\n\n.mjo-ov-card--wide {\n grid-column: 1 / -1;\n}\n\n.mjo-ov-card__h {\n padding: var(--mj-space-3) var(--mj-space-4) var(--mj-space-2);\n}\n\n.mjo-ov-card__h h3 {\n margin: 0;\n font-size: var(--mj-text-sm);\n font-weight: 700;\n display: flex;\n align-items: center;\n gap: var(--mj-space-2);\n}\n\n.mjo-ov-card__h i {\n color: var(--mj-brand-primary);\n font-size: 12px;\n}\n\n.mjo-ov-card__b {\n padding: 4px var(--mj-space-4) var(--mj-space-4);\n}\n\n.mjo-ov-note {\n margin: 0 0 var(--mj-space-3);\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n line-height: 1.5;\n}\n\n.mjo-ov-facts {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: var(--mj-space-3) var(--mj-space-4);\n}\n\n.mjo-ov-fact__l {\n font-size: 10.5px;\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n.mjo-ov-fact__v {\n font-size: var(--mj-text-sm);\n font-weight: 650;\n color: var(--mj-text-primary);\n}\n\n.mjo-ov-table {\n width: 100%;\n border-collapse: collapse;\n font-size: var(--mj-text-sm);\n}\n\n.mjo-ov-table th {\n text-align: left;\n font-size: 10.5px;\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n padding: 6px 8px;\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.mjo-ov-table td {\n padding: 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n color: var(--mj-text-secondary);\n}\n\n.mjo-ov-table tr:last-child td {\n border-bottom: 0;\n}\n\n.mjo-ov-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--mj-space-3);\n padding: 8px 0;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.mjo-ov-row:last-child {\n border-bottom: 0;\n}\n\n.mjo-ov-row h4 {\n margin: 0;\n font-size: var(--mj-text-sm);\n font-weight: 650;\n}\n\n.mjo-ov-row p {\n margin: 2px 0 0;\n font-size: 12px;\n color: var(--mj-text-secondary);\n}\n\n.mjo-ov-empty {\n padding: 12px 4px;\n color: var(--mj-text-muted);\n font-size: var(--mj-text-sm);\n}\n\n@media (max-width: 800px) {\n .mjo-ov,\n .mjo-ov-facts {\n grid-template-columns: 1fr;\n }\n\n .mjo-ov-card--wide {\n grid-column: auto;\n }\n}\n\n.mjo-doc-hero__description {\n margin: 0;\n color: var(--mj-text-secondary);\n font-size: var(--mj-text-sm);\n line-height: 1.5;\n white-space: pre-wrap;\n}\n\n/* mj-form-field is display: contents \u2014 its label and control would otherwise\n become direct children of this grid. Each field sits in a wrapping cell. */\n.mjo-doc-hero__edit {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));\n gap: var(--mj-space-3) var(--mj-space-4);\n padding-top: var(--mj-space-4);\n border-top: 1px solid var(--mj-border-subtle);\n}\n\n.mjo-doc-hero__field {\n min-width: 0;\n}\n\n.mjo-doc-hero__field--span {\n grid-column: 1 / -1;\n}\n\n/* Label above the control. The shared field is a 200px | 1fr row, which needs\n ~28rem per field \u2014 far more than a hero column gets. */\n.mjo-doc-hero__field ::ng-deep .mj-forms-field {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: 4px;\n padding: 0;\n}\n\n.mjo-doc-hero__field ::ng-deep .mj-forms-field-label {\n font-size: var(--mj-text-xs);\n font-weight: var(--mj-font-bold);\n letter-spacing: 0.06em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n.mjo-doc-hero__field ::ng-deep .mj-forms-field--editing:hover {\n margin: 0;\n padding: 0;\n}\n\n.mjo-doc-hero__field ::ng-deep .mj-forms-field-control {\n width: 100%;\n}\n"] }]
|
|
177
195
|
}], null, null); })();
|
|
178
196
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SubscriptionHeaderPanel, { className: "SubscriptionHeaderPanel", filePath: "lib/form-panels/subscription-header.panel.ts", lineNumber: 35 }); })();
|
|
179
197
|
//# sourceMappingURL=subscription-header.panel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-header.panel.js","sourceRoot":"","sources":["../../../src/lib/form-panels/subscription-header.panel.ts","../../../src/lib/form-panels/subscription-header.panel.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC
|
|
1
|
+
{"version":3,"file":"subscription-header.panel.js","sourceRoot":"","sources":["../../../src/lib/form-panels/subscription-header.panel.ts","../../../src/lib/form-panels/subscription-header.panel.html"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG9D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;;;;;ICWxE,4BAAM;IAAA,YAAoB;IAAA,iBAAO;;;IAA3B,cAAoB;IAApB,2CAAoB;;;IAG1B,4BAAM;IAAA,YAAoB;IAAA,iBAAO;;;IAA3B,cAAoB;IAApB,2CAAoB;;ADZ9C;;;;;GAKG;AACH,MAAM,UAAU,GAAG,iEAAiE,CAAC;AAErF;;GAEG;AAgBI,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,aAAgD;IACzF;;;;OAIG;IACK,eAAe,GAAkB,IAAI,CAAC;IACtC,YAAY,GAAyB,EAAE,CAAC;IAEhD,IAAW,KAAK;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,IAAI,kBAAkB,CAAC;IAChE,CAAC;IAED,IAAW,WAAW;QAClB,OAAO,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3D,CAAC;IAED,IAAW,cAAc;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,gCAAgC,CAAC;IACtG,CAAC;IAED,IAAW,QAAQ;QACf,OAAO,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,E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C5B;KACJ,CAAC;GAOW,uBAAuB,CA4EnC;;iFA5EY,uBAAuB;cANnC,SAAS;6BACM,KAAK,YACP,+BAA+B;;kFAIhC,uBAAuB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"order-document.page.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/orders/order-document.page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,MAAM,EAAU,MAAM,eAAe,CAAC;AAMpF,OAAO,EAA+B,KAAK,gCAAgC,EAAE,KAAK,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;;AAGvJ,2BAA2B;AAC3B,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAwOa,6BAA8B,YAAW,MAAM;IACxD;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IAEjD,6BAA6B;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEvC,wCAAwC;IAC/B,MAAM,EAAE,SAAS,CAAkC;IAErD,KAAK,EAAE,gCAAgC,GAAG,IAAI,CAAQ;IACtD,KAAK,EAAE,8BAA8B,EAAE,CAAM;IACpD,SAAgB,KAAK,SAAW;IAEnB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"order-document.page.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/orders/order-document.page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuC,MAAM,EAAU,MAAM,eAAe,CAAC;AAMpF,OAAO,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6B;CA6EzC"}
|
|
@@ -358,8 +358,13 @@ export class MJOOrderDocumentPageComponent {
|
|
|
358
358
|
async ngOnInit() {
|
|
359
359
|
if (!this.OrderID)
|
|
360
360
|
return;
|
|
361
|
-
|
|
362
|
-
|
|
361
|
+
try {
|
|
362
|
+
const orders = await GetOrders({ OrderHeaderID: this.OrderID });
|
|
363
|
+
this.Order = orders[0] ?? null;
|
|
364
|
+
}
|
|
365
|
+
catch {
|
|
366
|
+
this.Order = null;
|
|
367
|
+
}
|
|
363
368
|
if (this.Order)
|
|
364
369
|
this.Lines = await GetOrderLines(this.Order.ID);
|
|
365
370
|
this.cdr.detectChanges();
|