@mj-biz-apps/orders-ng 5.46.0 → 5.47.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/custom/Product/widgets/product-accounting-widget.component.js +16 -17
- package/dist/lib/custom/Product/widgets/product-accounting-widget.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-effective-gl-accounts.component.d.ts +49 -24
- package/dist/lib/custom/Product/widgets/product-effective-gl-accounts.component.d.ts.map +1 -1
- package/dist/lib/custom/Product/widgets/product-effective-gl-accounts.component.js +229 -137
- package/dist/lib/custom/Product/widgets/product-effective-gl-accounts.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-gl-links.component.d.ts.map +1 -1
- package/dist/lib/custom/Product/widgets/product-gl-links.component.js +229 -183
- package/dist/lib/custom/Product/widgets/product-gl-links.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.d.ts +138 -4
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.d.ts.map +1 -1
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.js +1485 -316
- package/dist/lib/custom/Product/widgets/product-pricing-widget.component.js.map +1 -1
- package/dist/lib/custom/currency-input.directive.d.ts +31 -0
- package/dist/lib/custom/currency-input.directive.d.ts.map +1 -0
- package/dist/lib/custom/currency-input.directive.js +121 -0
- package/dist/lib/custom/currency-input.directive.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +29 -28
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +7 -2
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/form-panels/catalog-overviews.panels.d.ts +11 -1
- package/dist/lib/form-panels/catalog-overviews.panels.d.ts.map +1 -1
- package/dist/lib/form-panels/catalog-overviews.panels.js +53 -42
- package/dist/lib/form-panels/catalog-overviews.panels.js.map +1 -1
- package/dist/lib/form-panels/commercial-overviews.panels.js +5 -5
- package/dist/lib/form-panels/document-forms.module.d.ts +1 -1
- package/dist/lib/form-panels/document-forms.module.d.ts.map +1 -1
- package/dist/lib/form-panels/document-forms.module.js +7 -4
- package/dist/lib/form-panels/document-forms.module.js.map +1 -1
- package/dist/lib/form-panels/document-hero.component.js +2 -2
- package/dist/lib/form-panels/document-overviews.panels.js +7 -7
- package/dist/lib/form-panels/lookup-headers.panels.js +10 -10
- package/dist/lib/form-panels/order-access-overrides.panel.js +2 -2
- package/dist/lib/form-panels/overview-cards.component.d.ts +2 -0
- package/dist/lib/form-panels/overview-cards.component.d.ts.map +1 -1
- package/dist/lib/form-panels/overview-cards.component.js +31 -25
- package/dist/lib/form-panels/overview-cards.component.js.map +1 -1
- package/dist/lib/form-panels/payment-header.panel.js +2 -2
- package/dist/lib/form-panels/price-list-header.panel.js +2 -2
- package/dist/lib/form-panels/product-header.panel.d.ts +5 -0
- package/dist/lib/form-panels/product-header.panel.d.ts.map +1 -1
- package/dist/lib/form-panels/product-header.panel.js +148 -83
- package/dist/lib/form-panels/product-header.panel.js.map +1 -1
- package/dist/lib/form-panels/product-widget.panels.d.ts +26 -7
- package/dist/lib/form-panels/product-widget.panels.d.ts.map +1 -1
- package/dist/lib/form-panels/product-widget.panels.js +124 -71
- package/dist/lib/form-panels/product-widget.panels.js.map +1 -1
- package/dist/lib/form-panels/promotion-header.panel.js +2 -2
- package/dist/lib/form-panels/subscription-header.panel.js +2 -2
- package/dist/lib/form-panels/subscription-revrec.panel.js +2 -2
- package/dist/lib/form-panels/subscription-term-header.panel.js +2 -2
- package/dist/lib/form-panels/subscription-term-revrec.panel.js +2 -2
- package/dist/lib/form-panels/subscription-terms.panel.js +2 -2
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +2 -2
|
@@ -6,25 +6,28 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
import * as i1 from "@angular/forms";
|
|
7
7
|
import * as i2 from "@angular/common";
|
|
8
8
|
const _forTrack0 = ($index, $item) => $item.ID;
|
|
9
|
-
function
|
|
9
|
+
function BizAppsProductGLLinksComponent_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
10
10
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
11
|
-
i0.ɵɵelementStart(0, "button",
|
|
12
|
-
i0.ɵɵlistener("click", function
|
|
13
|
-
i0.ɵɵelement(1, "i",
|
|
14
|
-
i0.ɵɵ
|
|
11
|
+
i0.ɵɵelementStart(0, "button", 14);
|
|
12
|
+
i0.ɵɵlistener("click", function BizAppsProductGLLinksComponent_Conditional_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OpenDraft()); });
|
|
13
|
+
i0.ɵɵelement(1, "i", 15);
|
|
14
|
+
i0.ɵɵelementStart(2, "span");
|
|
15
|
+
i0.ɵɵtext(3, "Add assignment");
|
|
16
|
+
i0.ɵɵelementEnd()();
|
|
15
17
|
} }
|
|
16
|
-
function
|
|
17
|
-
i0.ɵɵelementStart(0, "p",
|
|
18
|
-
i0.ɵɵelement(1, "i",
|
|
19
|
-
i0.ɵɵ
|
|
20
|
-
i0.ɵɵ
|
|
18
|
+
function BizAppsProductGLLinksComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
+
i0.ɵɵelementStart(0, "p", 10);
|
|
20
|
+
i0.ɵɵelement(1, "i", 16);
|
|
21
|
+
i0.ɵɵelementStart(2, "span");
|
|
22
|
+
i0.ɵɵtext(3);
|
|
23
|
+
i0.ɵɵelementEnd()();
|
|
21
24
|
} if (rf & 2) {
|
|
22
25
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
23
|
-
i0.ɵɵadvance(
|
|
24
|
-
i0.ɵɵ
|
|
26
|
+
i0.ɵɵadvance(3);
|
|
27
|
+
i0.ɵɵtextInterpolate(ctx_r1.WriteError);
|
|
25
28
|
} }
|
|
26
|
-
function
|
|
27
|
-
i0.ɵɵelementStart(0, "option",
|
|
29
|
+
function BizAppsProductGLLinksComponent_Conditional_13_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
30
|
+
i0.ɵɵelementStart(0, "option", 21);
|
|
28
31
|
i0.ɵɵtext(1);
|
|
29
32
|
i0.ɵɵelementEnd();
|
|
30
33
|
} if (rf & 2) {
|
|
@@ -33,13 +36,8 @@ function BizAppsProductGLLinksComponent_Conditional_10_For_5_Template(rf, ctx) {
|
|
|
33
36
|
i0.ɵɵadvance();
|
|
34
37
|
i0.ɵɵtextInterpolate(r_r4.Name);
|
|
35
38
|
} }
|
|
36
|
-
function
|
|
37
|
-
i0.ɵɵelementStart(0, "
|
|
38
|
-
i0.ɵɵtext(1, " No GL accounts exist for this product's company yet, so there is nothing to link to. They are created in Accounting. ");
|
|
39
|
-
i0.ɵɵelementEnd();
|
|
40
|
-
} }
|
|
41
|
-
function BizAppsProductGLLinksComponent_Conditional_10_For_11_Template(rf, ctx) { if (rf & 1) {
|
|
42
|
-
i0.ɵɵelementStart(0, "option", 17);
|
|
39
|
+
function BizAppsProductGLLinksComponent_Conditional_13_For_18_Template(rf, ctx) { if (rf & 1) {
|
|
40
|
+
i0.ɵɵelementStart(0, "option", 21);
|
|
43
41
|
i0.ɵɵtext(1);
|
|
44
42
|
i0.ɵɵelementEnd();
|
|
45
43
|
} if (rf & 2) {
|
|
@@ -48,60 +46,78 @@ function BizAppsProductGLLinksComponent_Conditional_10_For_11_Template(rf, ctx)
|
|
|
48
46
|
i0.ɵɵadvance();
|
|
49
47
|
i0.ɵɵtextInterpolate(a_r5.Label);
|
|
50
48
|
} }
|
|
51
|
-
function
|
|
49
|
+
function BizAppsProductGLLinksComponent_Conditional_13_Conditional_28_Template(rf, ctx) { if (rf & 1) {
|
|
50
|
+
i0.ɵɵelementStart(0, "p", 26);
|
|
51
|
+
i0.ɵɵtext(1, "No GL accounts exist for this product's company yet. Create them in Accounting first.");
|
|
52
|
+
i0.ɵɵelementEnd();
|
|
53
|
+
} }
|
|
54
|
+
function BizAppsProductGLLinksComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
52
55
|
const _r3 = i0.ɵɵgetCurrentView();
|
|
53
|
-
i0.ɵɵelementStart(0, "div",
|
|
54
|
-
i0.ɵɵ
|
|
55
|
-
i0.ɵɵelementStart(2, "option", 16);
|
|
56
|
-
i0.ɵɵtext(3, "\u2014 role \u2014");
|
|
56
|
+
i0.ɵɵelementStart(0, "div", 11)(1, "h4", 17);
|
|
57
|
+
i0.ɵɵtext(2, "New account assignment");
|
|
57
58
|
i0.ɵɵelementEnd();
|
|
58
|
-
i0.ɵɵ
|
|
59
|
+
i0.ɵɵelementStart(3, "label", 18)(4, "span");
|
|
60
|
+
i0.ɵɵtext(5, "Role");
|
|
59
61
|
i0.ɵɵelementEnd();
|
|
60
|
-
i0.ɵɵ
|
|
61
|
-
i0.ɵɵ
|
|
62
|
-
i0.ɵɵ
|
|
63
|
-
i0.ɵɵ
|
|
64
|
-
i0.ɵɵtext(9, "\u2014 account \u2014");
|
|
62
|
+
i0.ɵɵelementStart(6, "select", 19);
|
|
63
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductGLLinksComponent_Conditional_13_Template_select_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Draft.RoleID, $event) || (ctx_r1.Draft.RoleID = $event); return i0.ɵɵresetView($event); });
|
|
64
|
+
i0.ɵɵelementStart(7, "option", 20);
|
|
65
|
+
i0.ɵɵtext(8, "Select a role");
|
|
65
66
|
i0.ɵɵelementEnd();
|
|
66
|
-
i0.ɵɵrepeaterCreate(
|
|
67
|
+
i0.ɵɵrepeaterCreate(9, BizAppsProductGLLinksComponent_Conditional_13_For_10_Template, 2, 2, "option", 21, _forTrack0);
|
|
68
|
+
i0.ɵɵelementEnd()();
|
|
69
|
+
i0.ɵɵelementStart(11, "label", 18)(12, "span");
|
|
70
|
+
i0.ɵɵtext(13, "GL account");
|
|
67
71
|
i0.ɵɵelementEnd();
|
|
68
|
-
i0.ɵɵelementStart(
|
|
69
|
-
i0.ɵɵtwoWayListener("ngModelChange", function
|
|
72
|
+
i0.ɵɵelementStart(14, "select", 19);
|
|
73
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductGLLinksComponent_Conditional_13_Template_select_ngModelChange_14_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Draft.AccountID, $event) || (ctx_r1.Draft.AccountID = $event); return i0.ɵɵresetView($event); });
|
|
74
|
+
i0.ɵɵelementStart(15, "option", 20);
|
|
75
|
+
i0.ɵɵtext(16, "Select an account");
|
|
70
76
|
i0.ɵɵelementEnd();
|
|
71
|
-
i0.ɵɵ
|
|
72
|
-
i0.ɵɵ
|
|
73
|
-
i0.ɵɵ
|
|
77
|
+
i0.ɵɵrepeaterCreate(17, BizAppsProductGLLinksComponent_Conditional_13_For_18_Template, 2, 2, "option", 21, _forTrack0);
|
|
78
|
+
i0.ɵɵelementEnd()();
|
|
79
|
+
i0.ɵɵelementStart(19, "label", 18)(20, "span");
|
|
80
|
+
i0.ɵɵtext(21, "Effective from");
|
|
81
|
+
i0.ɵɵelementEnd();
|
|
82
|
+
i0.ɵɵelementStart(22, "input", 22);
|
|
83
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductGLLinksComponent_Conditional_13_Template_input_ngModelChange_22_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Draft.StartedAt, $event) || (ctx_r1.Draft.StartedAt = $event); return i0.ɵɵresetView($event); });
|
|
84
|
+
i0.ɵɵelementEnd()();
|
|
85
|
+
i0.ɵɵelementStart(23, "div", 23)(24, "button", 24);
|
|
86
|
+
i0.ɵɵlistener("click", function BizAppsProductGLLinksComponent_Conditional_13_Template_button_click_24_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.AddLink()); });
|
|
87
|
+
i0.ɵɵtext(25);
|
|
74
88
|
i0.ɵɵelementEnd();
|
|
75
|
-
i0.ɵɵelementStart(
|
|
76
|
-
i0.ɵɵlistener("click", function
|
|
77
|
-
i0.ɵɵtext(
|
|
89
|
+
i0.ɵɵelementStart(26, "button", 25);
|
|
90
|
+
i0.ɵɵlistener("click", function BizAppsProductGLLinksComponent_Conditional_13_Template_button_click_26_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CancelDraft()); });
|
|
91
|
+
i0.ɵɵtext(27, "Cancel");
|
|
78
92
|
i0.ɵɵelementEnd()();
|
|
93
|
+
i0.ɵɵconditionalCreate(28, BizAppsProductGLLinksComponent_Conditional_13_Conditional_28_Template, 2, 0, "p", 26);
|
|
94
|
+
i0.ɵɵelementEnd();
|
|
79
95
|
} if (rf & 2) {
|
|
80
96
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
81
|
-
i0.ɵɵadvance();
|
|
97
|
+
i0.ɵɵadvance(6);
|
|
82
98
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Draft.RoleID);
|
|
83
99
|
i0.ɵɵproperty("disabled", ctx_r1.Saving);
|
|
84
100
|
i0.ɵɵadvance(3);
|
|
85
101
|
i0.ɵɵrepeater(ctx_r1.Roles);
|
|
86
|
-
i0.ɵɵadvance(
|
|
87
|
-
i0.ɵɵconditional(ctx_r1.Accounts.length === 0 ? 6 : -1);
|
|
88
|
-
i0.ɵɵadvance();
|
|
102
|
+
i0.ɵɵadvance(5);
|
|
89
103
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Draft.AccountID);
|
|
90
104
|
i0.ɵɵproperty("disabled", ctx_r1.Saving);
|
|
91
105
|
i0.ɵɵadvance(3);
|
|
92
106
|
i0.ɵɵrepeater(ctx_r1.Accounts);
|
|
93
|
-
i0.ɵɵadvance(
|
|
107
|
+
i0.ɵɵadvance(5);
|
|
94
108
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Draft.StartedAt);
|
|
95
109
|
i0.ɵɵproperty("disabled", ctx_r1.Saving);
|
|
96
|
-
i0.ɵɵadvance();
|
|
110
|
+
i0.ɵɵadvance(2);
|
|
97
111
|
i0.ɵɵproperty("disabled", ctx_r1.Saving || !ctx_r1.Draft.RoleID || !ctx_r1.Draft.AccountID);
|
|
98
112
|
i0.ɵɵadvance();
|
|
99
|
-
i0.ɵɵtextInterpolate(ctx_r1.Saving ? "
|
|
113
|
+
i0.ɵɵtextInterpolate(ctx_r1.Saving ? "Saving\u2026" : "Save");
|
|
100
114
|
i0.ɵɵadvance();
|
|
101
115
|
i0.ɵɵproperty("disabled", ctx_r1.Saving);
|
|
116
|
+
i0.ɵɵadvance(2);
|
|
117
|
+
i0.ɵɵconditional(ctx_r1.Accounts.length === 0 ? 28 : -1);
|
|
102
118
|
} }
|
|
103
|
-
function
|
|
104
|
-
i0.ɵɵelementStart(0, "option",
|
|
119
|
+
function BizAppsProductGLLinksComponent_Conditional_14_For_8_Template(rf, ctx) { if (rf & 1) {
|
|
120
|
+
i0.ɵɵelementStart(0, "option", 27);
|
|
105
121
|
i0.ɵɵtext(1);
|
|
106
122
|
i0.ɵɵelementEnd();
|
|
107
123
|
} if (rf & 2) {
|
|
@@ -110,8 +126,8 @@ function BizAppsProductGLLinksComponent_Conditional_11_For_3_Template(rf, ctx) {
|
|
|
110
126
|
i0.ɵɵadvance();
|
|
111
127
|
i0.ɵɵtextInterpolate(r_r7.Label);
|
|
112
128
|
} }
|
|
113
|
-
function
|
|
114
|
-
i0.ɵɵelementStart(0, "option",
|
|
129
|
+
function BizAppsProductGLLinksComponent_Conditional_14_For_14_Template(rf, ctx) { if (rf & 1) {
|
|
130
|
+
i0.ɵɵelementStart(0, "option", 27);
|
|
115
131
|
i0.ɵɵtext(1);
|
|
116
132
|
i0.ɵɵelementEnd();
|
|
117
133
|
} if (rf & 2) {
|
|
@@ -120,196 +136,223 @@ function BizAppsProductGLLinksComponent_Conditional_11_For_6_Template(rf, ctx) {
|
|
|
120
136
|
i0.ɵɵadvance();
|
|
121
137
|
i0.ɵɵtextInterpolate(a_r8.Label);
|
|
122
138
|
} }
|
|
123
|
-
function
|
|
124
|
-
i0.ɵɵelementStart(0, "
|
|
125
|
-
i0.ɵɵtext(1, " This
|
|
139
|
+
function BizAppsProductGLLinksComponent_Conditional_14_Conditional_28_Template(rf, ctx) { if (rf & 1) {
|
|
140
|
+
i0.ɵɵelementStart(0, "p", 26);
|
|
141
|
+
i0.ɵɵtext(1, " This assignment has already been used for posting, so only its end date can change. To post to a different account, add a new assignment with a later start date. ");
|
|
126
142
|
i0.ɵɵelementEnd();
|
|
127
143
|
} }
|
|
128
|
-
function
|
|
144
|
+
function BizAppsProductGLLinksComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
129
145
|
const _r6 = i0.ɵɵgetCurrentView();
|
|
130
|
-
i0.ɵɵelementStart(0, "div",
|
|
131
|
-
i0.ɵɵ
|
|
132
|
-
i0.ɵɵrepeaterCreate(2, BizAppsProductGLLinksComponent_Conditional_11_For_3_Template, 2, 3, "option", 21, _forTrack0);
|
|
146
|
+
i0.ɵɵelementStart(0, "div", 11)(1, "h4", 17);
|
|
147
|
+
i0.ɵɵtext(2, "Edit account assignment");
|
|
133
148
|
i0.ɵɵelementEnd();
|
|
134
|
-
i0.ɵɵelementStart(
|
|
135
|
-
i0.ɵɵ
|
|
136
|
-
i0.ɵɵrepeaterCreate(5, BizAppsProductGLLinksComponent_Conditional_11_For_6_Template, 2, 3, "option", 21, _forTrack0);
|
|
149
|
+
i0.ɵɵelementStart(3, "label", 18)(4, "span");
|
|
150
|
+
i0.ɵɵtext(5, "Role");
|
|
137
151
|
i0.ɵɵelementEnd();
|
|
138
|
-
i0.ɵɵelementStart(
|
|
139
|
-
i0.ɵɵ
|
|
140
|
-
i0.ɵɵ
|
|
141
|
-
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductGLLinksComponent_Conditional_11_Template_input_ngModelChange_9_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Editing.StartedAt, $event) || (ctx_r1.Editing.StartedAt = $event); return i0.ɵɵresetView($event); });
|
|
152
|
+
i0.ɵɵelementStart(6, "select", 19);
|
|
153
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductGLLinksComponent_Conditional_14_Template_select_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Editing.RoleID, $event) || (ctx_r1.Editing.RoleID = $event); return i0.ɵɵresetView($event); });
|
|
154
|
+
i0.ɵɵrepeaterCreate(7, BizAppsProductGLLinksComponent_Conditional_14_For_8_Template, 2, 3, "option", 27, _forTrack0);
|
|
142
155
|
i0.ɵɵelementEnd()();
|
|
143
|
-
i0.ɵɵelementStart(
|
|
144
|
-
i0.ɵɵtext(11, "
|
|
145
|
-
i0.ɵɵ
|
|
146
|
-
i0.ɵɵ
|
|
156
|
+
i0.ɵɵelementStart(9, "label", 18)(10, "span");
|
|
157
|
+
i0.ɵɵtext(11, "GL account");
|
|
158
|
+
i0.ɵɵelementEnd();
|
|
159
|
+
i0.ɵɵelementStart(12, "select", 19);
|
|
160
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductGLLinksComponent_Conditional_14_Template_select_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Editing.AccountID, $event) || (ctx_r1.Editing.AccountID = $event); return i0.ɵɵresetView($event); });
|
|
161
|
+
i0.ɵɵrepeaterCreate(13, BizAppsProductGLLinksComponent_Conditional_14_For_14_Template, 2, 3, "option", 27, _forTrack0);
|
|
147
162
|
i0.ɵɵelementEnd()();
|
|
148
|
-
i0.ɵɵelementStart(
|
|
149
|
-
i0.ɵɵ
|
|
150
|
-
i0.ɵɵ
|
|
163
|
+
i0.ɵɵelementStart(15, "label", 18)(16, "span");
|
|
164
|
+
i0.ɵɵtext(17, "Effective from");
|
|
165
|
+
i0.ɵɵelementEnd();
|
|
166
|
+
i0.ɵɵelementStart(18, "input", 22);
|
|
167
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductGLLinksComponent_Conditional_14_Template_input_ngModelChange_18_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Editing.StartedAt, $event) || (ctx_r1.Editing.StartedAt = $event); return i0.ɵɵresetView($event); });
|
|
168
|
+
i0.ɵɵelementEnd()();
|
|
169
|
+
i0.ɵɵelementStart(19, "label", 18)(20, "span");
|
|
170
|
+
i0.ɵɵtext(21, "Effective to");
|
|
151
171
|
i0.ɵɵelementEnd();
|
|
152
|
-
i0.ɵɵelementStart(
|
|
153
|
-
i0.ɵɵ
|
|
154
|
-
i0.ɵɵ
|
|
172
|
+
i0.ɵɵelementStart(22, "input", 22);
|
|
173
|
+
i0.ɵɵtwoWayListener("ngModelChange", function BizAppsProductGLLinksComponent_Conditional_14_Template_input_ngModelChange_22_listener($event) { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Editing.EndedAt, $event) || (ctx_r1.Editing.EndedAt = $event); return i0.ɵɵresetView($event); });
|
|
174
|
+
i0.ɵɵelementEnd()();
|
|
175
|
+
i0.ɵɵelementStart(23, "div", 23)(24, "button", 24);
|
|
176
|
+
i0.ɵɵlistener("click", function BizAppsProductGLLinksComponent_Conditional_14_Template_button_click_24_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SaveEdit()); });
|
|
177
|
+
i0.ɵɵtext(25);
|
|
155
178
|
i0.ɵɵelementEnd();
|
|
156
|
-
i0.ɵɵ
|
|
179
|
+
i0.ɵɵelementStart(26, "button", 25);
|
|
180
|
+
i0.ɵɵlistener("click", function BizAppsProductGLLinksComponent_Conditional_14_Template_button_click_26_listener() { i0.ɵɵrestoreView(_r6); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.CancelEdit()); });
|
|
181
|
+
i0.ɵɵtext(27, "Cancel");
|
|
182
|
+
i0.ɵɵelementEnd()();
|
|
183
|
+
i0.ɵɵconditionalCreate(28, BizAppsProductGLLinksComponent_Conditional_14_Conditional_28_Template, 2, 0, "p", 26);
|
|
157
184
|
i0.ɵɵelementEnd();
|
|
158
185
|
} if (rf & 2) {
|
|
159
186
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
160
|
-
i0.ɵɵadvance();
|
|
187
|
+
i0.ɵɵadvance(6);
|
|
161
188
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Editing.RoleID);
|
|
162
189
|
i0.ɵɵproperty("disabled", ctx_r1.Saving || ctx_r1.Editing.Applied);
|
|
163
190
|
i0.ɵɵadvance();
|
|
164
191
|
i0.ɵɵrepeater(ctx_r1.EditRoles);
|
|
165
|
-
i0.ɵɵadvance(
|
|
192
|
+
i0.ɵɵadvance(5);
|
|
166
193
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Editing.AccountID);
|
|
167
194
|
i0.ɵɵproperty("disabled", ctx_r1.Saving || ctx_r1.Editing.Applied);
|
|
168
195
|
i0.ɵɵadvance();
|
|
169
196
|
i0.ɵɵrepeater(ctx_r1.EditAccounts);
|
|
170
|
-
i0.ɵɵadvance(
|
|
197
|
+
i0.ɵɵadvance(5);
|
|
171
198
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Editing.StartedAt);
|
|
172
199
|
i0.ɵɵproperty("disabled", ctx_r1.Saving || ctx_r1.Editing.Applied);
|
|
173
|
-
i0.ɵɵadvance(
|
|
200
|
+
i0.ɵɵadvance(4);
|
|
174
201
|
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Editing.EndedAt);
|
|
175
202
|
i0.ɵɵproperty("disabled", ctx_r1.Saving);
|
|
176
|
-
i0.ɵɵadvance();
|
|
203
|
+
i0.ɵɵadvance(2);
|
|
177
204
|
i0.ɵɵproperty("disabled", ctx_r1.Saving);
|
|
178
205
|
i0.ɵɵadvance();
|
|
179
206
|
i0.ɵɵtextInterpolate(ctx_r1.Saving ? "Saving\u2026" : "Save");
|
|
180
207
|
i0.ɵɵadvance();
|
|
181
208
|
i0.ɵɵproperty("disabled", ctx_r1.Saving);
|
|
182
209
|
i0.ɵɵadvance(2);
|
|
183
|
-
i0.ɵɵconditional(ctx_r1.Editing.Applied ?
|
|
210
|
+
i0.ɵɵconditional(ctx_r1.Editing.Applied ? 28 : -1);
|
|
184
211
|
} }
|
|
185
|
-
function
|
|
186
|
-
i0.ɵɵelementStart(0, "p",
|
|
212
|
+
function BizAppsProductGLLinksComponent_Conditional_15_Template(rf, ctx) { if (rf & 1) {
|
|
213
|
+
i0.ɵɵelementStart(0, "p", 12);
|
|
187
214
|
i0.ɵɵtext(1, "Loading\u2026");
|
|
188
215
|
i0.ɵɵelementEnd();
|
|
189
216
|
} }
|
|
190
|
-
function
|
|
191
|
-
i0.ɵɵelementStart(0, "p",
|
|
192
|
-
i0.ɵɵelement(1, "i",
|
|
193
|
-
i0.ɵɵ
|
|
194
|
-
i0.ɵɵ
|
|
217
|
+
function BizAppsProductGLLinksComponent_Conditional_16_Template(rf, ctx) { if (rf & 1) {
|
|
218
|
+
i0.ɵɵelementStart(0, "p", 10);
|
|
219
|
+
i0.ɵɵelement(1, "i", 16);
|
|
220
|
+
i0.ɵɵelementStart(2, "span");
|
|
221
|
+
i0.ɵɵtext(3);
|
|
222
|
+
i0.ɵɵelementEnd()();
|
|
195
223
|
} if (rf & 2) {
|
|
196
224
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
197
|
-
i0.ɵɵadvance(
|
|
198
|
-
i0.ɵɵtextInterpolate1("
|
|
225
|
+
i0.ɵɵadvance(3);
|
|
226
|
+
i0.ɵɵtextInterpolate1("The account assignments could not be read: ", ctx_r1.LoadError);
|
|
199
227
|
} }
|
|
200
|
-
function
|
|
201
|
-
i0.ɵɵelementStart(0, "p",
|
|
202
|
-
i0.ɵɵtext(1, " No
|
|
228
|
+
function BizAppsProductGLLinksComponent_Conditional_17_Template(rf, ctx) { if (rf & 1) {
|
|
229
|
+
i0.ɵɵelementStart(0, "p", 12);
|
|
230
|
+
i0.ɵɵtext(1, " No account assignments on this product. It posts through its category, product type or company default, shown above. ");
|
|
203
231
|
i0.ɵɵelementEnd();
|
|
204
232
|
} }
|
|
205
|
-
function
|
|
233
|
+
function BizAppsProductGLLinksComponent_Conditional_18_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
234
|
+
i0.ɵɵelementStart(0, "th")(1, "span", 30);
|
|
235
|
+
i0.ɵɵtext(2, "Actions");
|
|
236
|
+
i0.ɵɵelementEnd()();
|
|
237
|
+
} }
|
|
238
|
+
function BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
206
239
|
const _r11 = i0.ɵɵgetCurrentView();
|
|
207
|
-
i0.ɵɵelementStart(0, "button",
|
|
208
|
-
i0.ɵɵlistener("click", function
|
|
240
|
+
i0.ɵɵelementStart(0, "button", 42);
|
|
241
|
+
i0.ɵɵlistener("click", function BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const row_r10 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OpenEdit(row_r10)); });
|
|
209
242
|
i0.ɵɵtext(1, "Edit");
|
|
210
243
|
i0.ɵɵelementEnd();
|
|
211
244
|
} if (rf & 2) {
|
|
212
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
245
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
213
246
|
i0.ɵɵproperty("disabled", ctx_r1.Saving);
|
|
214
247
|
} }
|
|
215
|
-
function
|
|
248
|
+
function BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
216
249
|
const _r12 = i0.ɵɵgetCurrentView();
|
|
217
|
-
i0.ɵɵelementStart(0, "button",
|
|
218
|
-
i0.ɵɵlistener("click", function
|
|
219
|
-
i0.ɵɵtext(1, "
|
|
250
|
+
i0.ɵɵelementStart(0, "button", 43);
|
|
251
|
+
i0.ɵɵlistener("click", function BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const row_r10 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.RetireLink(row_r10)); });
|
|
252
|
+
i0.ɵɵtext(1, "End");
|
|
220
253
|
i0.ɵɵelementEnd();
|
|
221
254
|
} if (rf & 2) {
|
|
222
|
-
const ctx_r1 = i0.ɵɵnextContext(
|
|
255
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
223
256
|
i0.ɵɵproperty("disabled", ctx_r1.Saving);
|
|
224
257
|
} }
|
|
225
|
-
function
|
|
258
|
+
function BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
226
259
|
const _r13 = i0.ɵɵgetCurrentView();
|
|
227
|
-
i0.ɵɵelementStart(0, "button",
|
|
228
|
-
i0.ɵɵlistener("click", function
|
|
229
|
-
i0.ɵɵtext(1, "
|
|
260
|
+
i0.ɵɵelementStart(0, "button", 44);
|
|
261
|
+
i0.ɵɵlistener("click", function BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r13); const row_r10 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.RemoveLink(row_r10)); });
|
|
262
|
+
i0.ɵɵtext(1, "Delete");
|
|
230
263
|
i0.ɵɵelementEnd();
|
|
231
264
|
} if (rf & 2) {
|
|
232
|
-
const row_r10 = i0.ɵɵnextContext().$implicit;
|
|
265
|
+
const row_r10 = i0.ɵɵnextContext(2).$implicit;
|
|
233
266
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
234
267
|
i0.ɵɵproperty("disabled", ctx_r1.Saving)("title", ctx_r1.RemoveWarning(row_r10));
|
|
235
268
|
} }
|
|
236
|
-
function
|
|
269
|
+
function BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
270
|
+
i0.ɵɵelementStart(0, "td", 38);
|
|
271
|
+
i0.ɵɵconditionalCreate(1, BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Conditional_1_Template, 2, 1, "button", 39);
|
|
272
|
+
i0.ɵɵconditionalCreate(2, BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Conditional_2_Template, 2, 1, "button", 40);
|
|
273
|
+
i0.ɵɵconditionalCreate(3, BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Conditional_3_Template, 2, 2, "button", 41);
|
|
274
|
+
i0.ɵɵelementEnd();
|
|
275
|
+
} if (rf & 2) {
|
|
276
|
+
const row_r10 = i0.ɵɵnextContext().$implicit;
|
|
277
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
278
|
+
i0.ɵɵadvance();
|
|
279
|
+
i0.ɵɵconditional((ctx_r1.Editing == null ? null : ctx_r1.Editing.ID) !== row_r10.ID ? 1 : -1);
|
|
280
|
+
i0.ɵɵadvance();
|
|
281
|
+
i0.ɵɵconditional(row_r10.Active && ctx_r1.HasApplied(row_r10) ? 2 : -1);
|
|
282
|
+
i0.ɵɵadvance();
|
|
283
|
+
i0.ɵɵconditional(!ctx_r1.HasApplied(row_r10) ? 3 : -1);
|
|
284
|
+
} }
|
|
285
|
+
function BizAppsProductGLLinksComponent_Conditional_18_For_15_Template(rf, ctx) { if (rf & 1) {
|
|
237
286
|
const _r9 = i0.ɵɵgetCurrentView();
|
|
238
|
-
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
287
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 31);
|
|
239
288
|
i0.ɵɵtext(2);
|
|
240
289
|
i0.ɵɵelementEnd();
|
|
241
|
-
i0.ɵɵelementStart(3, "td")(4, "button",
|
|
242
|
-
i0.ɵɵlistener("click", function
|
|
243
|
-
i0.ɵɵ
|
|
244
|
-
i0.ɵɵ
|
|
245
|
-
i0.ɵɵ
|
|
290
|
+
i0.ɵɵelementStart(3, "td")(4, "button", 32);
|
|
291
|
+
i0.ɵɵlistener("click", function BizAppsProductGLLinksComponent_Conditional_18_For_15_Template_button_click_4_listener() { const row_r10 = i0.ɵɵrestoreView(_r9).$implicit; const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.OpenLink(row_r10)); });
|
|
292
|
+
i0.ɵɵelementStart(5, "span", 33);
|
|
293
|
+
i0.ɵɵtext(6);
|
|
294
|
+
i0.ɵɵelementEnd();
|
|
295
|
+
i0.ɵɵelementStart(7, "span", 34);
|
|
296
|
+
i0.ɵɵtext(8);
|
|
246
297
|
i0.ɵɵelementEnd()()();
|
|
247
|
-
i0.ɵɵelementStart(
|
|
298
|
+
i0.ɵɵelementStart(9, "td", 35);
|
|
248
299
|
i0.ɵɵtext(10);
|
|
249
|
-
i0.ɵɵ
|
|
250
|
-
i0.ɵɵelementStart(
|
|
251
|
-
i0.ɵɵtext(
|
|
252
|
-
i0.ɵɵpipe(13, "date");
|
|
300
|
+
i0.ɵɵpipe(11, "date");
|
|
301
|
+
i0.ɵɵelementStart(12, "span", 36);
|
|
302
|
+
i0.ɵɵtext(13, "\u2192");
|
|
253
303
|
i0.ɵɵelementEnd();
|
|
254
|
-
i0.ɵɵ
|
|
255
|
-
i0.ɵɵ
|
|
256
|
-
i0.ɵɵpipe(16, "date");
|
|
304
|
+
i0.ɵɵtext(14);
|
|
305
|
+
i0.ɵɵpipe(15, "date");
|
|
257
306
|
i0.ɵɵelementEnd();
|
|
258
|
-
i0.ɵɵelementStart(
|
|
259
|
-
i0.ɵɵ
|
|
260
|
-
i0.ɵɵconditionalCreate(19, BizAppsProductGLLinksComponent_Conditional_15_For_19_Conditional_19_Template, 2, 1, "button", 31);
|
|
261
|
-
i0.ɵɵconditionalCreate(20, BizAppsProductGLLinksComponent_Conditional_15_For_19_Conditional_20_Template, 2, 2, "button", 32);
|
|
307
|
+
i0.ɵɵelementStart(16, "td")(17, "span", 37);
|
|
308
|
+
i0.ɵɵtext(18);
|
|
262
309
|
i0.ɵɵelementEnd()();
|
|
310
|
+
i0.ɵɵconditionalCreate(19, BizAppsProductGLLinksComponent_Conditional_18_For_15_Conditional_19_Template, 4, 3, "td", 38);
|
|
311
|
+
i0.ɵɵelementEnd();
|
|
263
312
|
} if (rf & 2) {
|
|
264
313
|
const row_r10 = ctx.$implicit;
|
|
265
314
|
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
266
|
-
i0.ɵɵclassProp("
|
|
315
|
+
i0.ɵɵclassProp("muted", !row_r10.Active);
|
|
267
316
|
i0.ɵɵadvance(2);
|
|
268
317
|
i0.ɵɵtextInterpolate(row_r10.RoleName);
|
|
269
|
-
i0.ɵɵadvance(
|
|
270
|
-
i0.ɵɵ
|
|
318
|
+
i0.ɵɵadvance(4);
|
|
319
|
+
i0.ɵɵtextInterpolate(row_r10.AccountCode);
|
|
271
320
|
i0.ɵɵadvance(2);
|
|
272
|
-
i0.ɵɵ
|
|
321
|
+
i0.ɵɵtextInterpolate(row_r10.AccountName);
|
|
273
322
|
i0.ɵɵadvance(2);
|
|
274
|
-
i0.ɵɵ
|
|
275
|
-
i0.ɵɵadvance();
|
|
276
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
277
|
-
i0.ɵɵadvance(2);
|
|
278
|
-
i0.ɵɵtextInterpolate(row_r10.StartedAt ? i0.ɵɵpipeBind3(13, 13, row_r10.StartedAt, "yyyy-MM-dd", "UTC") : "\u2014");
|
|
279
|
-
i0.ɵɵadvance(3);
|
|
280
|
-
i0.ɵɵtextInterpolate(row_r10.EndedAt ? i0.ɵɵpipeBind3(16, 17, row_r10.EndedAt, "yyyy-MM-dd", "UTC") : "\u2014");
|
|
323
|
+
i0.ɵɵtextInterpolate1(" ", row_r10.StartedAt ? i0.ɵɵpipeBind3(11, 11, row_r10.StartedAt, "MMM d, y", "UTC") : "Always", " ");
|
|
324
|
+
i0.ɵɵadvance(4);
|
|
325
|
+
i0.ɵɵtextInterpolate1(" ", row_r10.EndedAt ? i0.ɵɵpipeBind3(15, 15, row_r10.EndedAt, "MMM d, y", "UTC") : "Open", " ");
|
|
281
326
|
i0.ɵɵadvance(3);
|
|
282
|
-
i0.ɵɵ
|
|
327
|
+
i0.ɵɵclassProp("mjo-acct-chip--ok", row_r10.Active);
|
|
283
328
|
i0.ɵɵadvance();
|
|
284
|
-
i0.ɵɵ
|
|
329
|
+
i0.ɵɵtextInterpolate(ctx_r1.StatusLabel(row_r10));
|
|
285
330
|
i0.ɵɵadvance();
|
|
286
|
-
i0.ɵɵconditional(ctx_r1.CanWrite
|
|
331
|
+
i0.ɵɵconditional(ctx_r1.CanWrite ? 19 : -1);
|
|
287
332
|
} }
|
|
288
|
-
function
|
|
289
|
-
i0.ɵɵelementStart(0, "div",
|
|
333
|
+
function BizAppsProductGLLinksComponent_Conditional_18_Template(rf, ctx) { if (rf & 1) {
|
|
334
|
+
i0.ɵɵelementStart(0, "div", 13)(1, "table", 28)(2, "thead")(3, "tr")(4, "th");
|
|
290
335
|
i0.ɵɵtext(5, "Role");
|
|
291
336
|
i0.ɵɵelementEnd();
|
|
292
337
|
i0.ɵɵelementStart(6, "th");
|
|
293
|
-
i0.ɵɵtext(7, "
|
|
338
|
+
i0.ɵɵtext(7, "GL account");
|
|
294
339
|
i0.ɵɵelementEnd();
|
|
295
340
|
i0.ɵɵelementStart(8, "th");
|
|
296
|
-
i0.ɵɵtext(9, "
|
|
341
|
+
i0.ɵɵtext(9, "Effective");
|
|
297
342
|
i0.ɵɵelementEnd();
|
|
298
343
|
i0.ɵɵelementStart(10, "th");
|
|
299
|
-
i0.ɵɵtext(11, "
|
|
300
|
-
i0.ɵɵelementEnd();
|
|
301
|
-
i0.ɵɵelementStart(12, "th");
|
|
302
|
-
i0.ɵɵtext(13, "To");
|
|
344
|
+
i0.ɵɵtext(11, "Status");
|
|
303
345
|
i0.ɵɵelementEnd();
|
|
304
|
-
i0.ɵɵ
|
|
305
|
-
i0.ɵɵ
|
|
306
|
-
i0.ɵɵ
|
|
307
|
-
i0.ɵɵ
|
|
308
|
-
i0.ɵɵrepeaterCreate(18, BizAppsProductGLLinksComponent_Conditional_15_For_19_Template, 21, 21, "tr", 26, _forTrack0);
|
|
346
|
+
i0.ɵɵconditionalCreate(12, BizAppsProductGLLinksComponent_Conditional_18_Conditional_12_Template, 3, 0, "th");
|
|
347
|
+
i0.ɵɵelementEnd()();
|
|
348
|
+
i0.ɵɵelementStart(13, "tbody");
|
|
349
|
+
i0.ɵɵrepeaterCreate(14, BizAppsProductGLLinksComponent_Conditional_18_For_15_Template, 20, 19, "tr", 29, _forTrack0);
|
|
309
350
|
i0.ɵɵelementEnd()()();
|
|
310
351
|
} if (rf & 2) {
|
|
311
352
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
312
|
-
i0.ɵɵadvance(
|
|
353
|
+
i0.ɵɵadvance(12);
|
|
354
|
+
i0.ɵɵconditional(ctx_r1.CanWrite ? 12 : -1);
|
|
355
|
+
i0.ɵɵadvance(2);
|
|
313
356
|
i0.ɵɵrepeater(ctx_r1.Rows);
|
|
314
357
|
} }
|
|
315
358
|
/** Accounting's polymorphic link entity. A SOFT reference — no FK crosses the schema boundary. */
|
|
@@ -485,14 +528,14 @@ export class BizAppsProductGLLinksComponent {
|
|
|
485
528
|
*/
|
|
486
529
|
StatusLabel(row) {
|
|
487
530
|
if (row.Active) {
|
|
488
|
-
return '
|
|
531
|
+
return 'Active';
|
|
489
532
|
}
|
|
490
533
|
if (row.Status !== 'Active') {
|
|
491
534
|
// Disabled or Pending — the row's own status is the honest answer.
|
|
492
535
|
return row.Status;
|
|
493
536
|
}
|
|
494
537
|
// Active, but not the winner. Which of the two remaining reasons applies is a date question.
|
|
495
|
-
return this.HasApplied(row) ? 'Superseded' : '
|
|
538
|
+
return this.HasApplied(row) ? 'Superseded' : 'Scheduled';
|
|
496
539
|
}
|
|
497
540
|
/**
|
|
498
541
|
* What Remove actually does to THIS row, said accurately.
|
|
@@ -512,10 +555,9 @@ export class BizAppsProductGLLinksComponent {
|
|
|
512
555
|
*/
|
|
513
556
|
RemoveWarning(row) {
|
|
514
557
|
return row.Active
|
|
515
|
-
? '
|
|
516
|
-
+ '
|
|
517
|
-
|
|
518
|
-
: 'Remove this link permanently. It has not started yet, so nothing has booked through it.';
|
|
558
|
+
? 'Delete this assignment. It is active today, so orders posted today may already have used it. '
|
|
559
|
+
+ 'It cannot be ended instead, because an assignment cannot end on the day it starts.'
|
|
560
|
+
: 'Delete this assignment. It has not started, so nothing has posted through it.';
|
|
519
561
|
}
|
|
520
562
|
/** Opens accounting's Account Links screen, which is where a link is created or retired. */
|
|
521
563
|
OpenLink(row) {
|
|
@@ -1197,38 +1239,42 @@ export class BizAppsProductGLLinksComponent {
|
|
|
1197
1239
|
return winners;
|
|
1198
1240
|
}
|
|
1199
1241
|
static ɵfac = function BizAppsProductGLLinksComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || BizAppsProductGLLinksComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
1200
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BizAppsProductGLLinksComponent, selectors: [["bizapps-product-gl-links"]], inputs: { Product: "Product", EditMode: "EditMode", FormContext: "FormContext" }, outputs: { Navigate: "Navigate", LinksChanged: "LinksChanged" }, standalone: false, decls:
|
|
1201
|
-
i0.ɵɵelementStart(0, "
|
|
1242
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: BizAppsProductGLLinksComponent, selectors: [["bizapps-product-gl-links"]], inputs: { Product: "Product", EditMode: "EditMode", FormContext: "FormContext" }, outputs: { Navigate: "Navigate", LinksChanged: "LinksChanged" }, standalone: false, decls: 19, vars: 5, consts: [[1, "mjo-acct-card__head"], [1, "mjo-acct-card__titles"], [1, "mjo-acct-card__title"], [1, "fa-solid", "fa-link"], [1, "mjo-acct-card__sub"], [1, "mjo-acct-card__actions"], ["type", "button", 1, "mjo-acct-btn", "mjo-acct-btn--primary"], ["type", "button", "title", "Refresh", "aria-label", "Refresh", 1, "mjo-acct-btn", "mjo-acct-btn--icon", 3, "click"], [1, "fa-solid", "fa-rotate"], [1, "mjo-acct-card__body"], [1, "mjo-acct-alert", "mjo-acct-alert--error"], [1, "mjo-acct-form"], [1, "mjo-acct-note"], [1, "mjo-acct-tablewrap"], ["type", "button", 1, "mjo-acct-btn", "mjo-acct-btn--primary", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "mjo-acct-form__title"], [1, "mjo-acct-field"], [3, "ngModelChange", "ngModel", "disabled"], ["value", ""], [3, "value"], ["type", "date", 3, "ngModelChange", "ngModel", "disabled"], [1, "mjo-acct-form__actions"], ["type", "button", 1, "mjo-acct-btn", "mjo-acct-btn--primary", 3, "click", "disabled"], ["type", "button", 1, "mjo-acct-btn", 3, "click", "disabled"], [1, "mjo-acct-form__note"], [3, "value", "disabled"], [1, "mjo-acct-table"], [3, "muted"], [1, "mjo-sr-only"], [1, "mjo-gl-links__role"], ["type", "button", "title", "Open the assignment record", 1, "mjo-acct-link", "mjo-acct-account", 3, "click"], [1, "mjo-acct-code"], [1, "mjo-acct-name"], [1, "mjo-gl-links__dates"], [1, "mjo-gl-links__arrow"], [1, "mjo-acct-chip"], [1, "actions"], ["type", "button", 1, "mjo-acct-btn", "mjo-acct-btn--link", 3, "disabled"], ["type", "button", "title", "End this assignment today. It stops applying immediately and stays on the product as history.", 1, "mjo-acct-btn", "mjo-acct-btn--link", 3, "disabled"], ["type", "button", 1, "mjo-acct-btn", "mjo-acct-btn--link", 3, "disabled", "title"], ["type", "button", 1, "mjo-acct-btn", "mjo-acct-btn--link", 3, "click", "disabled"], ["type", "button", "title", "End this assignment today. It stops applying immediately and stays on the product as history.", 1, "mjo-acct-btn", "mjo-acct-btn--link", 3, "click", "disabled"], ["type", "button", 1, "mjo-acct-btn", "mjo-acct-btn--link", 3, "click", "disabled", "title"]], template: function BizAppsProductGLLinksComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1243
|
+
i0.ɵɵelementStart(0, "header", 0)(1, "div", 1)(2, "h3", 2);
|
|
1202
1244
|
i0.ɵɵelement(3, "i", 3);
|
|
1203
|
-
i0.ɵɵtext(4, "
|
|
1245
|
+
i0.ɵɵtext(4, "Accounts assigned directly to this product");
|
|
1204
1246
|
i0.ɵɵelementEnd();
|
|
1205
|
-
i0.ɵɵelementStart(5, "
|
|
1206
|
-
i0.ɵɵ
|
|
1207
|
-
i0.ɵɵ
|
|
1208
|
-
i0.ɵɵ
|
|
1209
|
-
i0.ɵɵ
|
|
1247
|
+
i0.ɵɵelementStart(5, "p", 4);
|
|
1248
|
+
i0.ɵɵtext(6, " An account assigned here takes precedence over the category, product type and company default. ");
|
|
1249
|
+
i0.ɵɵelementEnd()();
|
|
1250
|
+
i0.ɵɵelementStart(7, "div", 5);
|
|
1251
|
+
i0.ɵɵconditionalCreate(8, BizAppsProductGLLinksComponent_Conditional_8_Template, 4, 0, "button", 6);
|
|
1252
|
+
i0.ɵɵelementStart(9, "button", 7);
|
|
1253
|
+
i0.ɵɵlistener("click", function BizAppsProductGLLinksComponent_Template_button_click_9_listener() { return ctx.Refresh(); });
|
|
1254
|
+
i0.ɵɵelement(10, "i", 8);
|
|
1210
1255
|
i0.ɵɵelementEnd()()();
|
|
1211
|
-
i0.ɵɵ
|
|
1212
|
-
i0.ɵɵconditionalCreate(
|
|
1213
|
-
i0.ɵɵconditionalCreate(
|
|
1214
|
-
i0.ɵɵconditionalCreate(
|
|
1256
|
+
i0.ɵɵelementStart(11, "div", 9);
|
|
1257
|
+
i0.ɵɵconditionalCreate(12, BizAppsProductGLLinksComponent_Conditional_12_Template, 4, 1, "p", 10);
|
|
1258
|
+
i0.ɵɵconditionalCreate(13, BizAppsProductGLLinksComponent_Conditional_13_Template, 29, 10, "div", 11);
|
|
1259
|
+
i0.ɵɵconditionalCreate(14, BizAppsProductGLLinksComponent_Conditional_14_Template, 29, 12, "div", 11);
|
|
1260
|
+
i0.ɵɵconditionalCreate(15, BizAppsProductGLLinksComponent_Conditional_15_Template, 2, 0, "p", 12)(16, BizAppsProductGLLinksComponent_Conditional_16_Template, 4, 1, "p", 10)(17, BizAppsProductGLLinksComponent_Conditional_17_Template, 2, 0, "p", 12)(18, BizAppsProductGLLinksComponent_Conditional_18_Template, 16, 1, "div", 13);
|
|
1215
1261
|
i0.ɵɵelementEnd();
|
|
1216
1262
|
} if (rf & 2) {
|
|
1217
|
-
i0.ɵɵadvance(
|
|
1218
|
-
i0.ɵɵconditional(ctx.CanWrite && !ctx.Draft ?
|
|
1219
|
-
i0.ɵɵadvance(
|
|
1220
|
-
i0.ɵɵconditional(ctx.WriteError ?
|
|
1263
|
+
i0.ɵɵadvance(8);
|
|
1264
|
+
i0.ɵɵconditional(ctx.CanWrite && !ctx.Draft ? 8 : -1);
|
|
1265
|
+
i0.ɵɵadvance(4);
|
|
1266
|
+
i0.ɵɵconditional(ctx.WriteError ? 12 : -1);
|
|
1221
1267
|
i0.ɵɵadvance();
|
|
1222
|
-
i0.ɵɵconditional(ctx.Draft ?
|
|
1268
|
+
i0.ɵɵconditional(ctx.Draft ? 13 : -1);
|
|
1223
1269
|
i0.ɵɵadvance();
|
|
1224
|
-
i0.ɵɵconditional(ctx.Editing ?
|
|
1270
|
+
i0.ɵɵconditional(ctx.Editing ? 14 : -1);
|
|
1225
1271
|
i0.ɵɵadvance();
|
|
1226
|
-
i0.ɵɵconditional(ctx.Loading ?
|
|
1227
|
-
} }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.DatePipe], styles: ["\n\n\n
|
|
1272
|
+
i0.ɵɵconditional(ctx.Loading ? 15 : ctx.LoadError ? 16 : !ctx.Rows.length ? 17 : 18);
|
|
1273
|
+
} }, dependencies: [i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, i2.DatePipe], styles: ["\n\n\n[_nghost-%COMP%] {\n display: block;\n}\n\n.mjo-gl-links__role[_ngcontent-%COMP%] {\n font-weight: 600;\n}\n\n.mjo-gl-links__dates[_ngcontent-%COMP%] {\n white-space: nowrap;\n}\n\n.mjo-gl-links__arrow[_ngcontent-%COMP%] {\n color: var(--mj-text-muted, #94a3b8);\n margin: 0 4px;\n}\n\n.mjo-sr-only[_ngcontent-%COMP%] {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}"] });
|
|
1228
1274
|
}
|
|
1229
1275
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BizAppsProductGLLinksComponent, [{
|
|
1230
1276
|
type: Component,
|
|
1231
|
-
args: [{ standalone: false, selector: 'bizapps-product-gl-links', template: "<div class=\"mjo-gl-links\">\n <div class=\"mjo-gl-links__head\">\n <span class=\"mjo-gl-links__title\">\n <i class=\"fa-solid fa-link\"></i>\n GL Accounts\n </span>\n <span class=\"mjo-gl-links__actions\">\n <!--\n ADD is offered only on a SAVED product. A link stores the product's primary key in\n RecordID, so there is nothing to point at until the record exists \u2014 the same reason\n sales blocks Add line on an unsaved deal rather than failing at save time.\n -->\n @if (CanWrite && !Draft) {\n <button\n type=\"button\"\n class=\"mjo-gl-links__refresh\"\n title=\"Link a GL account to this product\"\n (click)=\"OpenDraft()\">\n <i class=\"fa-solid fa-plus\"></i>\n </button>\n }\n <button\n type=\"button\"\n class=\"mjo-gl-links__refresh\"\n title=\"Re-read this product's GL account links\"\n (click)=\"Refresh()\">\n <i class=\"fa-solid fa-rotate\"></i>\n </button>\n </span>\n </div>\n\n <!--\n A REFUSED WRITE IS SHOWN VERBATIM. GLAccountLinkEntityServer explains why it refused \u2014 usually\n that an Active link already exists for this role, same company, same start date \u2014 and that\n sentence is what teaches the reader to supersede with a LATER date instead. Replacing it with a\n friendlier summary would remove the only part that says what to do next.\n -->\n @if (WriteError) {\n <p class=\"mjo-gl-links__error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n {{ WriteError }}\n </p>\n }\n\n @if (Draft) {\n <div class=\"mjo-gl-links__draft\">\n <select [(ngModel)]=\"Draft.RoleID\" [disabled]=\"Saving\" aria-label=\"Role\">\n <option value=\"\">\u2014 role \u2014</option>\n @for (r of Roles; track r.ID) {\n <option [value]=\"r.ID\">{{ r.Name }}</option>\n }\n </select>\n @if (Accounts.length === 0) {\n <!--\n An empty picker and \"no accounts exist\" look identical to a reader and mean opposite\n things \u2014 the same distinction the load-error message below is careful about. Scoping\n to the product's company made this reachable: a company whose chart has not been\n seeded yields nothing, and without this the form renders a permanently disabled Link\n button with no explanation.\n -->\n <span class=\"mjo-gl-links__note\">\n No GL accounts exist for this product's company yet, so there is nothing to link to.\n They are created in Accounting.\n </span>\n }\n <select [(ngModel)]=\"Draft.AccountID\" [disabled]=\"Saving\" aria-label=\"GL account\">\n <option value=\"\">\u2014 account \u2014</option>\n @for (a of Accounts; track a.ID) {\n <option [value]=\"a.ID\">{{ a.Label }}</option>\n }\n </select>\n <!-- Starts today by default; a LATER date is how an existing mapping is superseded. -->\n <input type=\"date\" [(ngModel)]=\"Draft.StartedAt\" [disabled]=\"Saving\" aria-label=\"In force from\" />\n <button type=\"button\" class=\"mjo-gl-links__btn\" [disabled]=\"Saving || !Draft.RoleID || !Draft.AccountID\"\n (click)=\"AddLink()\">{{ Saving ? 'Linking\u2026' : 'Link' }}</button>\n <button type=\"button\" class=\"mjo-gl-links__btn\" [disabled]=\"Saving\" (click)=\"CancelDraft()\">Cancel</button>\n </div>\n }\n\n @if (Editing) {\n <div class=\"mjo-gl-links__draft\">\n <!--\n On a link that has ALREADY applied, role / account / start are disabled rather than\n hidden: seeing what the mapping is, and that it cannot be changed here, is the point.\n Hiding them would read as \"this link has no account\", which is the confusion #112 was.\n -->\n <select [(ngModel)]=\"Editing.RoleID\" [disabled]=\"Saving || Editing.Applied\" aria-label=\"Role\">\n @for (r of EditRoles; track r.ID) {\n <option [value]=\"r.ID\" [disabled]=\"r.Disabled === true\">{{ r.Label }}</option>\n }\n </select>\n <select [(ngModel)]=\"Editing.AccountID\" [disabled]=\"Saving || Editing.Applied\" aria-label=\"GL account\">\n @for (a of EditAccounts; track a.ID) {\n <!--\n A disabled option is the link's CURRENT account when this product's company\n cannot use it. Shown so the picker never reads as \"this link has no account\";\n unselectable so the repair path cannot write the unreachable link back.\n -->\n <option [value]=\"a.ID\" [disabled]=\"a.Disabled === true\">{{ a.Label }}</option>\n }\n </select>\n <label class=\"mjo-gl-links__lbl\">from\n <input type=\"date\" [(ngModel)]=\"Editing.StartedAt\"\n [disabled]=\"Saving || Editing.Applied\" aria-label=\"In force from\" />\n </label>\n <!-- Always editable, and clearable: emptying it undoes a retire applied by mistake. -->\n <label class=\"mjo-gl-links__lbl\">to\n <input type=\"date\" [(ngModel)]=\"Editing.EndedAt\" [disabled]=\"Saving\" aria-label=\"In force to\" />\n </label>\n <button type=\"button\" class=\"mjo-gl-links__btn\" [disabled]=\"Saving\"\n (click)=\"SaveEdit()\">{{ Saving ? 'Saving\u2026' : 'Save' }}</button>\n <button type=\"button\" class=\"mjo-gl-links__btn\" [disabled]=\"Saving\" (click)=\"CancelEdit()\">Cancel</button>\n @if (Editing.Applied) {\n <span class=\"mjo-gl-links__note\">\n This link has been in force, so only its end date can change here. To book a\n different account, add a link with a later start date.\n </span>\n }\n </div>\n }\n\n @if (Loading) {\n <p class=\"mjo-gl-links__note\">Loading\u2026</p>\n } @else if (LoadError) {\n <!--\n An error is shown INSTEAD of the empty state, never alongside it. \"No accounts assigned\" and\n \"the accounts could not be read\" look identical to a reader and mean opposite things \u2014 one\n is a setup task, the other is a broken screen.\n -->\n <p class=\"mjo-gl-links__error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n The GL account links could not be read: {{ LoadError }}\n </p>\n } @else if (!Rows.length) {\n <p class=\"mjo-gl-links__note\">\n No GL accounts are linked directly to this product. It may still book through its category\n or the company default \u2014 open Accounting \u2192 Account Links to see the full chain.\n </p>\n } @else {\n <div class=\"mjo-gl-links__scroll\">\n <table class=\"mjo-gl-links__table\">\n <thead>\n <tr>\n <th>Role</th>\n <th>Account</th>\n <th>Status</th>\n <!--\n RENDERED IN UTC, EXPLICITLY. Angular's date pipe formats in the browser's LOCAL\n zone by default, and StartedAt/EndedAt are datetimeoffset stored as UTC midnight \u2014\n so west of Greenwich a link starting 2026-01-01 renders as 2025-12-31. Observed\n exactly that on this panel before the timezone argument was added. Sales'\n deal-workspace.dates.ts records the same hazard: \"a stored 20 November renders\n as the 19th\".\n -->\n <th>From</th>\n <th>To</th>\n <th><span class=\"mjo-gl-links__sr\">Row actions</span></th>\n </tr>\n </thead>\n <tbody>\n @for (row of Rows; track row.ID) {\n <tr [class.mjo-gl-links__row--inactive]=\"!row.Active\">\n <td>{{ row.RoleName }}</td>\n <td>\n <button type=\"button\" class=\"mjo-gl-links__link\" (click)=\"OpenLink(row)\">\n {{ row.AccountCode }}<span class=\"mjo-gl-links__name\"> {{ row.AccountName }}</span>\n </button>\n </td>\n <td>\n <span\n class=\"mjo-gl-links__chip\"\n [class.mjo-gl-links__chip--on]=\"row.Active\">\n {{ StatusLabel(row) }}\n </span>\n </td>\n <td>{{ row.StartedAt ? (row.StartedAt | date: 'yyyy-MM-dd' : 'UTC') : '\u2014' }}</td>\n <td>{{ row.EndedAt ? (row.EndedAt | date: 'yyyy-MM-dd' : 'UTC') : '\u2014' }}</td>\n <td>\n <!--\n Retire, not delete \u2014 the link explains where money went, and ending\n its window stops it applying while keeping the record. Offered only\n on the link actually IN FORCE: retiring one already superseded or\n ended changes nothing a reader can see, so the control would be a\n button that appears to do nothing.\n -->\n <!--\n EDIT is offered on every link, but it does not mean the same thing\n on both sides of HasApplied \u2014 see OpenEdit. On a link that has\n booked, only the end date opens; the rest is history.\n -->\n @if (CanWrite && Editing?.ID !== row.ID) {\n <button type=\"button\" class=\"mjo-gl-links__btn\" [disabled]=\"Saving\"\n title=\"Edit this link\"\n (click)=\"OpenEdit(row)\">Edit</button>\n }\n @if (CanWrite && row.Active && HasApplied(row)) {\n <button type=\"button\" class=\"mjo-gl-links__btn\" [disabled]=\"Saving\"\n title=\"End this link's window as of today. It stops applying immediately, and the record stays on the product as history.\"\n (click)=\"RetireLink(row)\">Retire</button>\n }\n <!--\n Remove exists because retiring is impossible for a link that starts\n today: CK_GLAccountLink_Window enforces EndedAt > StartedAt, so a\n mistake made today has no other undo.\n\n The WARNING is conditional, because the two cases are not the same. A\n future-dated link has explained nothing. A link dated TODAY is already\n in force \u2014 pickActiveLinkIndex includes t === started \u2014 so orders\n booked today may have resolved through it. The button used to claim\n otherwise on both.\n -->\n @if (CanWrite && !HasApplied(row)) {\n <button type=\"button\" class=\"mjo-gl-links__btn\" [disabled]=\"Saving\"\n [title]=\"RemoveWarning(row)\"\n (click)=\"RemoveLink(row)\">Remove</button>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n</div>\n", styles: ["/*\n * Deliberately minimal, and deliberately not a new visual language. This sits inside the Accounting\n * panel beside `mj-form-field` rows, so it borrows the host's type and colour rather than introducing\n * its own \u2014 a table that looks like a different product is the tell of a bolted-on feature.\n */\n\n.mjo-gl-links {\n margin-top: 12px;\n}\n\n.mjo-gl-links__head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n margin-bottom: 6px;\n}\n\n.mjo-gl-links__title {\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n opacity: 0.75;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n}\n\n.mjo-gl-links__refresh {\n background: none;\n border: none;\n cursor: pointer;\n padding: 2px 6px;\n opacity: 0.6;\n color: inherit;\n}\n\n.mjo-gl-links__refresh:hover {\n opacity: 1;\n}\n\n.mjo-gl-links__refresh:focus-visible {\n outline: 2px solid currentColor;\n outline-offset: 2px;\n border-radius: 3px;\n}\n\n.mjo-gl-links__note {\n font-size: 13px;\n opacity: 0.7;\n margin: 4px 0;\n max-width: 70ch;\n}\n\n.mjo-gl-links__error {\n font-size: 13px;\n margin: 4px 0;\n display: flex;\n align-items: flex-start;\n gap: 6px;\n color: #b3452c;\n}\n\n/* Wide content scrolls inside its own container so the form never scrolls sideways. */\n.mjo-gl-links__scroll {\n overflow-x: auto;\n}\n\n.mjo-gl-links__table {\n width: 100%;\n border-collapse: collapse;\n font-size: 13px;\n font-variant-numeric: tabular-nums;\n min-width: 460px;\n}\n\n.mjo-gl-links__table th {\n text-align: left;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.05em;\n text-transform: uppercase;\n opacity: 0.6;\n padding: 4px 10px 4px 0;\n border-bottom: 1px solid currentColor;\n border-bottom-color: color-mix(in srgb, currentColor 20%, transparent);\n white-space: nowrap;\n}\n\n.mjo-gl-links__table td {\n padding: 6px 10px 6px 0;\n border-bottom: 1px solid currentColor;\n border-bottom-color: color-mix(in srgb, currentColor 10%, transparent);\n vertical-align: top;\n}\n\n/* A retired or not-yet-started link stays visible but reads as history, not as current mapping. */\n.mjo-gl-links__row--inactive {\n opacity: 0.55;\n}\n\n.mjo-gl-links__link {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n font: inherit;\n color: inherit;\n text-align: left;\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n\n.mjo-gl-links__link:focus-visible {\n outline: 2px solid currentColor;\n outline-offset: 2px;\n border-radius: 2px;\n}\n\n.mjo-gl-links__name {\n opacity: 0.7;\n}\n\n.mjo-gl-links__chip {\n display: inline-block;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.04em;\n padding: 1px 7px;\n border-radius: 2px;\n border: 1px solid currentColor;\n border-color: color-mix(in srgb, currentColor 30%, transparent);\n white-space: nowrap;\n}\n\n.mjo-gl-links__chip--on {\n color: #1f6f5c;\n border-color: color-mix(in srgb, #1f6f5c 45%, transparent);\n}\n\n/* \u2500\u2500 Writing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.mjo-gl-links__actions {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n}\n\n/*\n * The add row wraps rather than scrolling: it sits inside a form panel whose width is not ours to\n * assume, and a horizontally-scrolling control strip hides the confirm button on a narrow pane.\n */\n.mjo-gl-links__draft {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px;\n margin: 6px 0 10px;\n padding: 8px;\n border: 1px solid currentColor;\n border-color: color-mix(in srgb, currentColor 18%, transparent);\n border-radius: 4px;\n}\n\n.mjo-gl-links__draft select,\n.mjo-gl-links__draft input {\n font: inherit;\n font-size: 13px;\n padding: 3px 5px;\n border: 1px solid currentColor;\n border-color: color-mix(in srgb, currentColor 28%, transparent);\n border-radius: 3px;\n background: transparent;\n color: inherit;\n max-width: 100%;\n}\n\n.mjo-gl-links__btn {\n font: inherit;\n font-size: 12px;\n padding: 3px 10px;\n border: 1px solid currentColor;\n border-color: color-mix(in srgb, currentColor 30%, transparent);\n border-radius: 3px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n\n.mjo-gl-links__btn:hover:not(:disabled) {\n background: color-mix(in srgb, currentColor 8%, transparent);\n}\n\n.mjo-gl-links__btn:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n.mjo-gl-links__btn:focus-visible,\n.mjo-gl-links__draft select:focus-visible,\n.mjo-gl-links__draft input:focus-visible {\n outline: 2px solid currentColor;\n outline-offset: 2px;\n}\n\n/* Screen-reader-only, for the actions column header. */\n.mjo-gl-links__sr {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n/* Small inline label so the two date inputs in the edit row say which end they are. */\n.mjo-gl-links__lbl {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n font-size: 12px;\n opacity: 0.8;\n}\n\n.mjo-gl-links__draft .mjo-gl-links__note {\n flex-basis: 100%;\n margin: 2px 0 0;\n}\n\n.mjo-gl-links__draft select:disabled,\n.mjo-gl-links__draft input:disabled {\n opacity: 0.55;\n}\n"] }]
|
|
1277
|
+
args: [{ standalone: false, selector: 'bizapps-product-gl-links', template: "<header class=\"mjo-acct-card__head\">\n <div class=\"mjo-acct-card__titles\">\n <h3 class=\"mjo-acct-card__title\"><i class=\"fa-solid fa-link\"></i>Accounts assigned directly to this product</h3>\n <p class=\"mjo-acct-card__sub\">\n An account assigned here takes precedence over the category, product type and company default.\n </p>\n </div>\n <div class=\"mjo-acct-card__actions\">\n <!--\n ADD is offered only on a SAVED product. A link stores the product's primary key in\n RecordID, so there is nothing to point at until the record exists \u2014 the same reason\n sales blocks Add line on an unsaved deal rather than failing at save time.\n -->\n @if (CanWrite && !Draft) {\n <button type=\"button\" class=\"mjo-acct-btn mjo-acct-btn--primary\" (click)=\"OpenDraft()\">\n <i class=\"fa-solid fa-plus\"></i><span>Add assignment</span>\n </button>\n }\n <button type=\"button\" class=\"mjo-acct-btn mjo-acct-btn--icon\" title=\"Refresh\" aria-label=\"Refresh\" (click)=\"Refresh()\">\n <i class=\"fa-solid fa-rotate\"></i>\n </button>\n </div>\n</header>\n\n<div class=\"mjo-acct-card__body\">\n <!--\n A REFUSED WRITE IS SHOWN VERBATIM. GLAccountLinkEntityServer explains why it refused \u2014 usually\n that an Active link already exists for this role, same company, same start date \u2014 and that\n sentence is what teaches the reader to supersede with a LATER date instead. Replacing it with a\n friendlier summary would remove the only part that says what to do next.\n -->\n @if (WriteError) {\n <p class=\"mjo-acct-alert mjo-acct-alert--error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <span>{{ WriteError }}</span>\n </p>\n }\n\n @if (Draft) {\n <div class=\"mjo-acct-form\">\n <h4 class=\"mjo-acct-form__title\">New account assignment</h4>\n <label class=\"mjo-acct-field\">\n <span>Role</span>\n <select [(ngModel)]=\"Draft.RoleID\" [disabled]=\"Saving\">\n <option value=\"\">Select a role</option>\n @for (r of Roles; track r.ID) {\n <option [value]=\"r.ID\">{{ r.Name }}</option>\n }\n </select>\n </label>\n <label class=\"mjo-acct-field\">\n <span>GL account</span>\n <select [(ngModel)]=\"Draft.AccountID\" [disabled]=\"Saving\">\n <option value=\"\">Select an account</option>\n @for (a of Accounts; track a.ID) {\n <option [value]=\"a.ID\">{{ a.Label }}</option>\n }\n </select>\n </label>\n <!-- Starts today by default; a LATER date is how an existing mapping is superseded. -->\n <label class=\"mjo-acct-field\">\n <span>Effective from</span>\n <input type=\"date\" [(ngModel)]=\"Draft.StartedAt\" [disabled]=\"Saving\" />\n </label>\n <div class=\"mjo-acct-form__actions\">\n <button type=\"button\" class=\"mjo-acct-btn mjo-acct-btn--primary\" [disabled]=\"Saving || !Draft.RoleID || !Draft.AccountID\"\n (click)=\"AddLink()\">{{ Saving ? 'Saving\u2026' : 'Save' }}</button>\n <button type=\"button\" class=\"mjo-acct-btn\" [disabled]=\"Saving\" (click)=\"CancelDraft()\">Cancel</button>\n </div>\n @if (Accounts.length === 0) {\n <!--\n An empty picker and \"no accounts exist\" look identical to a reader and mean opposite\n things. Scoping to the product's company made this reachable: a company whose chart\n has not been seeded yields nothing.\n -->\n <p class=\"mjo-acct-form__note\">No GL accounts exist for this product's company yet. Create them in Accounting first.</p>\n }\n </div>\n }\n\n @if (Editing) {\n <div class=\"mjo-acct-form\">\n <h4 class=\"mjo-acct-form__title\">Edit account assignment</h4>\n <!--\n On a link that has ALREADY applied, role / account / start are disabled rather than\n hidden: seeing what the mapping is, and that it cannot be changed here, is the point.\n Hiding them would read as \"this link has no account\", which is the confusion #112 was.\n -->\n <label class=\"mjo-acct-field\">\n <span>Role</span>\n <select [(ngModel)]=\"Editing.RoleID\" [disabled]=\"Saving || Editing.Applied\">\n @for (r of EditRoles; track r.ID) {\n <option [value]=\"r.ID\" [disabled]=\"r.Disabled === true\">{{ r.Label }}</option>\n }\n </select>\n </label>\n <label class=\"mjo-acct-field\">\n <span>GL account</span>\n <select [(ngModel)]=\"Editing.AccountID\" [disabled]=\"Saving || Editing.Applied\">\n @for (a of EditAccounts; track a.ID) {\n <!--\n A disabled option is the link's CURRENT account when this product's company\n cannot use it. Shown so the picker never reads as \"this link has no account\";\n unselectable so the repair path cannot write the unreachable link back.\n -->\n <option [value]=\"a.ID\" [disabled]=\"a.Disabled === true\">{{ a.Label }}</option>\n }\n </select>\n </label>\n <label class=\"mjo-acct-field\">\n <span>Effective from</span>\n <input type=\"date\" [(ngModel)]=\"Editing.StartedAt\" [disabled]=\"Saving || Editing.Applied\" />\n </label>\n <!-- Always editable, and clearable: emptying it undoes an end date applied by mistake. -->\n <label class=\"mjo-acct-field\">\n <span>Effective to</span>\n <input type=\"date\" [(ngModel)]=\"Editing.EndedAt\" [disabled]=\"Saving\" />\n </label>\n <div class=\"mjo-acct-form__actions\">\n <button type=\"button\" class=\"mjo-acct-btn mjo-acct-btn--primary\" [disabled]=\"Saving\" (click)=\"SaveEdit()\">{{ Saving ? 'Saving\u2026' : 'Save' }}</button>\n <button type=\"button\" class=\"mjo-acct-btn\" [disabled]=\"Saving\" (click)=\"CancelEdit()\">Cancel</button>\n </div>\n @if (Editing.Applied) {\n <p class=\"mjo-acct-form__note\">\n This assignment has already been used for posting, so only its end date can change. To post\n to a different account, add a new assignment with a later start date.\n </p>\n }\n </div>\n }\n\n @if (Loading) {\n <p class=\"mjo-acct-note\">Loading\u2026</p>\n } @else if (LoadError) {\n <!--\n An error is shown INSTEAD of the empty state, never alongside it. \"No accounts assigned\" and\n \"the accounts could not be read\" look identical to a reader and mean opposite things \u2014 one\n is a setup task, the other is a broken screen.\n -->\n <p class=\"mjo-acct-alert mjo-acct-alert--error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <span>The account assignments could not be read: {{ LoadError }}</span>\n </p>\n } @else if (!Rows.length) {\n <p class=\"mjo-acct-note\">\n No account assignments on this product. It posts through its category, product type or company\n default, shown above.\n </p>\n } @else {\n <div class=\"mjo-acct-tablewrap\">\n <table class=\"mjo-acct-table\">\n <thead>\n <tr>\n <th>Role</th>\n <th>GL account</th>\n <!--\n RENDERED IN UTC, EXPLICITLY. Angular's date pipe formats in the browser's LOCAL\n zone by default, and StartedAt/EndedAt are datetimeoffset stored as UTC midnight \u2014\n so west of Greenwich a link starting 2026-01-01 renders as 2025-12-31. Observed\n exactly that on this panel before the timezone argument was added.\n -->\n <th>Effective</th>\n <th>Status</th>\n @if (CanWrite) {\n <th><span class=\"mjo-sr-only\">Actions</span></th>\n }\n </tr>\n </thead>\n <tbody>\n @for (row of Rows; track row.ID) {\n <tr [class.muted]=\"!row.Active\">\n <td class=\"mjo-gl-links__role\">{{ row.RoleName }}</td>\n <td>\n <button type=\"button\" class=\"mjo-acct-link mjo-acct-account\" title=\"Open the assignment record\" (click)=\"OpenLink(row)\">\n <span class=\"mjo-acct-code\">{{ row.AccountCode }}</span>\n <span class=\"mjo-acct-name\">{{ row.AccountName }}</span>\n </button>\n </td>\n <td class=\"mjo-gl-links__dates\">\n {{ row.StartedAt ? (row.StartedAt | date: 'MMM d, y' : 'UTC') : 'Always' }}\n <span class=\"mjo-gl-links__arrow\">\u2192</span>\n {{ row.EndedAt ? (row.EndedAt | date: 'MMM d, y' : 'UTC') : 'Open' }}\n </td>\n <td>\n <span class=\"mjo-acct-chip\" [class.mjo-acct-chip--ok]=\"row.Active\">{{ StatusLabel(row) }}</span>\n </td>\n @if (CanWrite) {\n <td class=\"actions\">\n <!--\n EDIT is offered on every link, but it does not mean the same thing\n on both sides of HasApplied \u2014 see OpenEdit. On a link that has\n booked, only the end date opens; the rest is history.\n -->\n @if (Editing?.ID !== row.ID) {\n <button type=\"button\" class=\"mjo-acct-btn mjo-acct-btn--link\" [disabled]=\"Saving\" (click)=\"OpenEdit(row)\">Edit</button>\n }\n <!--\n End, not delete \u2014 the link explains where money went, and ending\n its window stops it applying while keeping the record. Offered only\n on the link actually IN FORCE.\n -->\n @if (row.Active && HasApplied(row)) {\n <button type=\"button\" class=\"mjo-acct-btn mjo-acct-btn--link\" [disabled]=\"Saving\"\n title=\"End this assignment today. It stops applying immediately and stays on the product as history.\"\n (click)=\"RetireLink(row)\">End</button>\n }\n <!--\n Delete exists because ending is impossible for a link that starts\n today: CK_GLAccountLink_Window enforces EndedAt > StartedAt, so a\n mistake made today has no other undo. The warning differs for a\n link dated today, which may already have posted.\n -->\n @if (!HasApplied(row)) {\n <button type=\"button\" class=\"mjo-acct-btn mjo-acct-btn--link\" [disabled]=\"Saving\"\n [title]=\"RemoveWarning(row)\"\n (click)=\"RemoveLink(row)\">Delete</button>\n }\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n</div>\n", styles: ["/* Card chrome (head, body, table, chips, forms, buttons) comes from the accounting widget's shared rules. */\n\n:host {\n display: block;\n}\n\n.mjo-gl-links__role {\n font-weight: 600;\n}\n\n.mjo-gl-links__dates {\n white-space: nowrap;\n}\n\n.mjo-gl-links__arrow {\n color: var(--mj-text-muted, #94a3b8);\n margin: 0 4px;\n}\n\n.mjo-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n"] }]
|
|
1232
1278
|
}], () => [{ type: i0.ChangeDetectorRef }], { Product: [{
|
|
1233
1279
|
type: Input
|
|
1234
1280
|
}], EditMode: [{
|