@mj-biz-apps/orders-ng 5.52.0 → 5.54.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/OrderHeader/order-header-form.component.js +5 -5
- package/dist/lib/custom/OrderHeader/order-header-form.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-line-details-panel.component.js +2 -2
- package/dist/lib/custom/OrderHeader/order-line-details-panel.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts +11 -0
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js +310 -251
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-accounting-widget.component.js +2 -2
- package/dist/lib/form-panels/product-header.panel.d.ts +2 -2
- package/dist/lib/form-panels/product-header.panel.d.ts.map +1 -1
- package/dist/lib/form-panels/product-header.panel.js +4 -21
- package/dist/lib/form-panels/product-header.panel.js.map +1 -1
- package/dist/lib/form-panels/product-readiness-check.d.ts +4 -0
- package/dist/lib/form-panels/product-readiness-check.d.ts.map +1 -0
- package/dist/lib/form-panels/product-readiness-check.js +38 -0
- package/dist/lib/form-panels/product-readiness-check.js.map +1 -0
- package/dist/lib/pages/catalog/new-product-dialog.component.d.ts +67 -0
- package/dist/lib/pages/catalog/new-product-dialog.component.d.ts.map +1 -0
- package/dist/lib/pages/catalog/new-product-dialog.component.js +554 -0
- package/dist/lib/pages/catalog/new-product-dialog.component.js.map +1 -0
- package/dist/lib/pages/catalog/new-product-draft.d.ts +31 -0
- package/dist/lib/pages/catalog/new-product-draft.d.ts.map +1 -0
- package/dist/lib/pages/catalog/new-product-draft.js +81 -0
- package/dist/lib/pages/catalog/new-product-draft.js.map +1 -0
- package/dist/lib/pages/catalog/pricing.page.d.ts +16 -3
- package/dist/lib/pages/catalog/pricing.page.d.ts.map +1 -1
- package/dist/lib/pages/catalog/pricing.page.js +77 -38
- package/dist/lib/pages/catalog/pricing.page.js.map +1 -1
- package/dist/lib/pages/catalog/products.page.d.ts +16 -4
- package/dist/lib/pages/catalog/products.page.d.ts.map +1 -1
- package/dist/lib/pages/catalog/products.page.js +150 -111
- package/dist/lib/pages/catalog/products.page.js.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts +11 -3
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.js +31 -14
- package/dist/lib/pages/orders/orders-dashboard.page.js.map +1 -1
- package/dist/lib/pages/orders/orders-list.page.d.ts +3 -1
- package/dist/lib/pages/orders/orders-list.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-list.page.js +10 -5
- package/dist/lib/pages/orders/orders-list.page.js.map +1 -1
- package/dist/lib/pages/payments/account-credit.page.d.ts +21 -0
- package/dist/lib/pages/payments/account-credit.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/account-credit.page.js +145 -82
- package/dist/lib/pages/payments/account-credit.page.js.map +1 -1
- package/dist/lib/pages/payments/payments-dashboard.page.d.ts +3 -1
- package/dist/lib/pages/payments/payments-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/payments-dashboard.page.js +10 -5
- package/dist/lib/pages/payments/payments-dashboard.page.js.map +1 -1
- package/dist/lib/pages/payments/payments-list.page.d.ts +3 -1
- package/dist/lib/pages/payments/payments-list.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/payments-list.page.js +10 -5
- package/dist/lib/pages/payments/payments-list.page.js.map +1 -1
- package/dist/lib/pages/receivables/billing-issue.d.ts +14 -0
- package/dist/lib/pages/receivables/billing-issue.d.ts.map +1 -0
- package/dist/lib/pages/receivables/billing-issue.js +17 -0
- package/dist/lib/pages/receivables/billing-issue.js.map +1 -0
- package/dist/lib/pages/receivables/billing.page.d.ts +135 -19
- package/dist/lib/pages/receivables/billing.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/billing.page.js +748 -163
- package/dist/lib/pages/receivables/billing.page.js.map +1 -1
- package/dist/lib/pages/receivables/customer-ar.page.d.ts +12 -0
- package/dist/lib/pages/receivables/customer-ar.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/customer-ar.page.js +40 -14
- package/dist/lib/pages/receivables/customer-ar.page.js.map +1 -1
- package/dist/lib/pages/receivables/external-invoicing-queue.page.d.ts +157 -26
- package/dist/lib/pages/receivables/external-invoicing-queue.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/external-invoicing-queue.page.js +1278 -316
- package/dist/lib/pages/receivables/external-invoicing-queue.page.js.map +1 -1
- package/dist/lib/pages/receivables/overdue-page.model.d.ts +55 -0
- package/dist/lib/pages/receivables/overdue-page.model.d.ts.map +1 -0
- package/dist/lib/pages/receivables/overdue-page.model.js +112 -0
- package/dist/lib/pages/receivables/overdue-page.model.js.map +1 -0
- package/dist/lib/pages/receivables/overdue.page.d.ts +104 -16
- package/dist/lib/pages/receivables/overdue.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/overdue.page.js +476 -125
- package/dist/lib/pages/receivables/overdue.page.js.map +1 -1
- package/dist/lib/pages/receivables/progress.page.d.ts +69 -8
- package/dist/lib/pages/receivables/progress.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/progress.page.js +574 -248
- package/dist/lib/pages/receivables/progress.page.js.map +1 -1
- package/dist/lib/pages/receivables/worklist-view.model.d.ts +229 -0
- package/dist/lib/pages/receivables/worklist-view.model.d.ts.map +1 -0
- package/dist/lib/pages/receivables/worklist-view.model.js +402 -0
- package/dist/lib/pages/receivables/worklist-view.model.js.map +1 -0
- package/dist/lib/pages/subscriptions/subscriptions.page.d.ts +3 -1
- package/dist/lib/pages/subscriptions/subscriptions.page.d.ts.map +1 -1
- package/dist/lib/pages/subscriptions/subscriptions.page.js +10 -5
- package/dist/lib/pages/subscriptions/subscriptions.page.js.map +1 -1
- package/dist/lib/pages/workspace-requests.d.ts +30 -0
- package/dist/lib/pages/workspace-requests.d.ts.map +1 -0
- package/dist/lib/pages/workspace-requests.js +12 -0
- package/dist/lib/pages/workspace-requests.js.map +1 -0
- package/dist/lib/panels/aging-bar.component.d.ts +7 -1
- package/dist/lib/panels/aging-bar.component.d.ts.map +1 -1
- package/dist/lib/panels/aging-bar.component.js +89 -33
- package/dist/lib/panels/aging-bar.component.js.map +1 -1
- package/dist/lib/panels/side-panel.component.d.ts +41 -0
- package/dist/lib/panels/side-panel.component.d.ts.map +1 -0
- package/dist/lib/panels/side-panel.component.js +126 -0
- package/dist/lib/panels/side-panel.component.js.map +1 -0
- package/dist/lib/panels/worklist-bar.component.d.ts +81 -0
- package/dist/lib/panels/worklist-bar.component.d.ts.map +1 -0
- package/dist/lib/panels/worklist-bar.component.js +291 -0
- package/dist/lib/panels/worklist-bar.component.js.map +1 -0
- package/dist/lib/panels/worklist-table.component.d.ts +47 -5
- package/dist/lib/panels/worklist-table.component.d.ts.map +1 -1
- package/dist/lib/panels/worklist-table.component.js +283 -79
- package/dist/lib/panels/worklist-table.component.js.map +1 -1
- package/dist/lib/sections/orders-sections.component.d.ts.map +1 -1
- package/dist/lib/sections/orders-sections.component.js +18 -7
- package/dist/lib/sections/orders-sections.component.js.map +1 -1
- package/dist/lib/sections/section-nav.model.js +1 -1
- package/dist/lib/sections/section-nav.model.js.map +1 -1
- package/dist/lib/sections/section-shell.component.js +2 -2
- package/dist/lib/styles/orders-kit.css +10 -0
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
import { ChangeDetectorRef, Component, EventEmitter, Input, Output, ViewChild, inject } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { Metadata, RunView } from '@memberjunction/core';
|
|
5
|
+
import { MJButtonDirective, MJDialogActionsComponent, MJDialogComponent } from '@memberjunction/ng-ui-components';
|
|
6
|
+
import { OrdersEngine, Today } from '@mj-biz-apps/orders-entities';
|
|
7
|
+
import { CustomFormsModule } from '../../custom/custom-forms.module.js';
|
|
8
|
+
import { GetProductCategories, GetProductTypes } from '../../data/orders-queries.js';
|
|
9
|
+
import { MJO_ENTITIES } from '../../data/entity-names.js';
|
|
10
|
+
import { CheckProductReadiness } from '../../form-panels/product-readiness-check.js';
|
|
11
|
+
import { ApplyNewProductDraft, EmptyNewProductDraft, RevenueRecognitionForType, ValidateNewProductDraft, } from './new-product-draft.js';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
import * as i1 from "@angular/forms";
|
|
14
|
+
import * as i2 from "../../custom/Product/widgets/product-gl-links.component.js";
|
|
15
|
+
import * as i3 from "../../custom/Product/widgets/product-effective-gl-accounts.component.js";
|
|
16
|
+
const _c0 = ["effective"];
|
|
17
|
+
const _forTrack0 = ($index, $item) => $item.ID;
|
|
18
|
+
function MJONewProductDialogComponent_Conditional_1_For_20_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
+
i0.ɵɵelementStart(0, "option", 12);
|
|
20
|
+
i0.ɵɵtext(1);
|
|
21
|
+
i0.ɵɵelementEnd();
|
|
22
|
+
} if (rf & 2) {
|
|
23
|
+
const o_r3 = ctx.$implicit;
|
|
24
|
+
i0.ɵɵproperty("value", o_r3.ID);
|
|
25
|
+
i0.ɵɵadvance();
|
|
26
|
+
i0.ɵɵtextInterpolate(o_r3.Name);
|
|
27
|
+
} }
|
|
28
|
+
function MJONewProductDialogComponent_Conditional_1_For_28_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
+
i0.ɵɵelementStart(0, "option", 12);
|
|
30
|
+
i0.ɵɵtext(1);
|
|
31
|
+
i0.ɵɵelementEnd();
|
|
32
|
+
} if (rf & 2) {
|
|
33
|
+
const o_r4 = ctx.$implicit;
|
|
34
|
+
i0.ɵɵproperty("value", o_r4.ID);
|
|
35
|
+
i0.ɵɵadvance();
|
|
36
|
+
i0.ɵɵtextInterpolate(o_r4.Name);
|
|
37
|
+
} }
|
|
38
|
+
function MJONewProductDialogComponent_Conditional_1_For_36_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
+
i0.ɵɵelementStart(0, "option", 12);
|
|
40
|
+
i0.ɵɵtext(1);
|
|
41
|
+
i0.ɵɵelementEnd();
|
|
42
|
+
} if (rf & 2) {
|
|
43
|
+
const o_r5 = ctx.$implicit;
|
|
44
|
+
i0.ɵɵproperty("value", o_r5.ID);
|
|
45
|
+
i0.ɵɵadvance();
|
|
46
|
+
i0.ɵɵtextInterpolate(o_r5.Name);
|
|
47
|
+
} }
|
|
48
|
+
function MJONewProductDialogComponent_Conditional_1_For_44_Template(rf, ctx) { if (rf & 1) {
|
|
49
|
+
i0.ɵɵelementStart(0, "option", 12);
|
|
50
|
+
i0.ɵɵtext(1);
|
|
51
|
+
i0.ɵɵelementEnd();
|
|
52
|
+
} if (rf & 2) {
|
|
53
|
+
const o_r6 = ctx.$implicit;
|
|
54
|
+
i0.ɵɵproperty("value", o_r6.ID);
|
|
55
|
+
i0.ɵɵadvance();
|
|
56
|
+
i0.ɵɵtextInterpolate(o_r6.Name);
|
|
57
|
+
} }
|
|
58
|
+
function MJONewProductDialogComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
59
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
60
|
+
i0.ɵɵelementStart(0, "p", 3);
|
|
61
|
+
i0.ɵɵtext(1, " The product is saved as Draft with its base price. The next step checks its GL accounts, then activates it. ");
|
|
62
|
+
i0.ɵɵelementEnd();
|
|
63
|
+
i0.ɵɵelementStart(2, "div", 4);
|
|
64
|
+
i0.ɵɵlistener("input", function MJONewProductDialogComponent_Conditional_1_Template_div_input_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Errors = []); })("change", function MJONewProductDialogComponent_Conditional_1_Template_div_change_2_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Errors = []); });
|
|
65
|
+
i0.ɵɵelementStart(3, "label", 5)(4, "span");
|
|
66
|
+
i0.ɵɵtext(5, "Name");
|
|
67
|
+
i0.ɵɵelementEnd();
|
|
68
|
+
i0.ɵɵelementStart(6, "input", 6);
|
|
69
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJONewProductDialogComponent_Conditional_1_Template_input_ngModelChange_6_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Draft.Name, $event) || (ctx_r1.Draft.Name = $event); return i0.ɵɵresetView($event); });
|
|
70
|
+
i0.ɵɵelementEnd()();
|
|
71
|
+
i0.ɵɵelementStart(7, "label", 7)(8, "span");
|
|
72
|
+
i0.ɵɵtext(9, "SKU ");
|
|
73
|
+
i0.ɵɵelementStart(10, "span", 8);
|
|
74
|
+
i0.ɵɵtext(11, "(optional)");
|
|
75
|
+
i0.ɵɵelementEnd()();
|
|
76
|
+
i0.ɵɵelementStart(12, "input", 9);
|
|
77
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJONewProductDialogComponent_Conditional_1_Template_input_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Draft.SKU, $event) || (ctx_r1.Draft.SKU = $event); return i0.ɵɵresetView($event); });
|
|
78
|
+
i0.ɵɵelementEnd()();
|
|
79
|
+
i0.ɵɵelementStart(13, "label", 7)(14, "span");
|
|
80
|
+
i0.ɵɵtext(15, "Company");
|
|
81
|
+
i0.ɵɵelementEnd();
|
|
82
|
+
i0.ɵɵelementStart(16, "select", 10);
|
|
83
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJONewProductDialogComponent_Conditional_1_Template_select_ngModelChange_16_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Draft.CompanyID, $event) || (ctx_r1.Draft.CompanyID = $event); return i0.ɵɵresetView($event); });
|
|
84
|
+
i0.ɵɵelementStart(17, "option", 11);
|
|
85
|
+
i0.ɵɵtext(18, "Choose\u2026");
|
|
86
|
+
i0.ɵɵelementEnd();
|
|
87
|
+
i0.ɵɵrepeaterCreate(19, MJONewProductDialogComponent_Conditional_1_For_20_Template, 2, 2, "option", 12, _forTrack0);
|
|
88
|
+
i0.ɵɵelementEnd()();
|
|
89
|
+
i0.ɵɵelementStart(21, "label", 7)(22, "span");
|
|
90
|
+
i0.ɵɵtext(23, "Category");
|
|
91
|
+
i0.ɵɵelementEnd();
|
|
92
|
+
i0.ɵɵelementStart(24, "select", 13);
|
|
93
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJONewProductDialogComponent_Conditional_1_Template_select_ngModelChange_24_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Draft.ProductCategoryID, $event) || (ctx_r1.Draft.ProductCategoryID = $event); return i0.ɵɵresetView($event); });
|
|
94
|
+
i0.ɵɵelementStart(25, "option", 11);
|
|
95
|
+
i0.ɵɵtext(26, "Choose\u2026");
|
|
96
|
+
i0.ɵɵelementEnd();
|
|
97
|
+
i0.ɵɵrepeaterCreate(27, MJONewProductDialogComponent_Conditional_1_For_28_Template, 2, 2, "option", 12, _forTrack0);
|
|
98
|
+
i0.ɵɵelementEnd()();
|
|
99
|
+
i0.ɵɵelementStart(29, "label", 7)(30, "span");
|
|
100
|
+
i0.ɵɵtext(31, "Product type");
|
|
101
|
+
i0.ɵɵelementEnd();
|
|
102
|
+
i0.ɵɵelementStart(32, "select", 14);
|
|
103
|
+
i0.ɵɵlistener("ngModelChange", function MJONewProductDialogComponent_Conditional_1_Template_select_ngModelChange_32_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnTypeChanged($event)); });
|
|
104
|
+
i0.ɵɵelementStart(33, "option", 11);
|
|
105
|
+
i0.ɵɵtext(34, "Choose\u2026");
|
|
106
|
+
i0.ɵɵelementEnd();
|
|
107
|
+
i0.ɵɵrepeaterCreate(35, MJONewProductDialogComponent_Conditional_1_For_36_Template, 2, 2, "option", 12, _forTrack0);
|
|
108
|
+
i0.ɵɵelementEnd()();
|
|
109
|
+
i0.ɵɵelementStart(37, "label", 7)(38, "span");
|
|
110
|
+
i0.ɵɵtext(39, "Revenue recognition");
|
|
111
|
+
i0.ɵɵelementEnd();
|
|
112
|
+
i0.ɵɵelementStart(40, "select", 15);
|
|
113
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJONewProductDialogComponent_Conditional_1_Template_select_ngModelChange_40_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Draft.RevenueRecognitionTypeID, $event) || (ctx_r1.Draft.RevenueRecognitionTypeID = $event); return i0.ɵɵresetView($event); });
|
|
114
|
+
i0.ɵɵelementStart(41, "option", 11);
|
|
115
|
+
i0.ɵɵtext(42, "Choose\u2026");
|
|
116
|
+
i0.ɵɵelementEnd();
|
|
117
|
+
i0.ɵɵrepeaterCreate(43, MJONewProductDialogComponent_Conditional_1_For_44_Template, 2, 2, "option", 12, _forTrack0);
|
|
118
|
+
i0.ɵɵelementEnd()();
|
|
119
|
+
i0.ɵɵelementStart(45, "label", 7)(46, "span");
|
|
120
|
+
i0.ɵɵtext(47, "Base price");
|
|
121
|
+
i0.ɵɵelementEnd();
|
|
122
|
+
i0.ɵɵelementStart(48, "input", 16);
|
|
123
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJONewProductDialogComponent_Conditional_1_Template_input_ngModelChange_48_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Draft.BasePrice, $event) || (ctx_r1.Draft.BasePrice = $event); return i0.ɵɵresetView($event); });
|
|
124
|
+
i0.ɵɵelementEnd()();
|
|
125
|
+
i0.ɵɵelementStart(49, "label", 7)(50, "span");
|
|
126
|
+
i0.ɵɵtext(51, "Price applies from");
|
|
127
|
+
i0.ɵɵelementEnd();
|
|
128
|
+
i0.ɵɵelementStart(52, "input", 17);
|
|
129
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MJONewProductDialogComponent_Conditional_1_Template_input_ngModelChange_52_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.Draft.PriceEffectiveFrom, $event) || (ctx_r1.Draft.PriceEffectiveFrom = $event); return i0.ɵɵresetView($event); });
|
|
130
|
+
i0.ɵɵelementEnd()()();
|
|
131
|
+
i0.ɵɵelementStart(53, "p", 18);
|
|
132
|
+
i0.ɵɵtext(54, " Every product needs a base price, even when each deal enters its own amount; zero is fine. Orders dated before the price's start date cannot use it. ");
|
|
133
|
+
i0.ɵɵelementEnd();
|
|
134
|
+
} if (rf & 2) {
|
|
135
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
136
|
+
i0.ɵɵadvance(6);
|
|
137
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Draft.Name);
|
|
138
|
+
i0.ɵɵadvance(6);
|
|
139
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Draft.SKU);
|
|
140
|
+
i0.ɵɵadvance(4);
|
|
141
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Draft.CompanyID);
|
|
142
|
+
i0.ɵɵadvance(3);
|
|
143
|
+
i0.ɵɵrepeater(ctx_r1.Companies);
|
|
144
|
+
i0.ɵɵadvance(5);
|
|
145
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Draft.ProductCategoryID);
|
|
146
|
+
i0.ɵɵadvance(3);
|
|
147
|
+
i0.ɵɵrepeater(ctx_r1.Categories);
|
|
148
|
+
i0.ɵɵadvance(5);
|
|
149
|
+
i0.ɵɵproperty("ngModel", ctx_r1.Draft.ProductTypeID);
|
|
150
|
+
i0.ɵɵadvance(3);
|
|
151
|
+
i0.ɵɵrepeater(ctx_r1.Types);
|
|
152
|
+
i0.ɵɵadvance(5);
|
|
153
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Draft.RevenueRecognitionTypeID);
|
|
154
|
+
i0.ɵɵadvance(3);
|
|
155
|
+
i0.ɵɵrepeater(ctx_r1.RevenueRecognitionTypes);
|
|
156
|
+
i0.ɵɵadvance(5);
|
|
157
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Draft.BasePrice);
|
|
158
|
+
i0.ɵɵadvance(4);
|
|
159
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.Draft.PriceEffectiveFrom);
|
|
160
|
+
} }
|
|
161
|
+
function MJONewProductDialogComponent_Conditional_2_Conditional_6_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
162
|
+
i0.ɵɵelementStart(0, "li");
|
|
163
|
+
i0.ɵɵtext(1);
|
|
164
|
+
i0.ɵɵelementEnd();
|
|
165
|
+
} if (rf & 2) {
|
|
166
|
+
const m_r8 = ctx.$implicit;
|
|
167
|
+
i0.ɵɵadvance();
|
|
168
|
+
i0.ɵɵtextInterpolate(m_r8);
|
|
169
|
+
} }
|
|
170
|
+
function MJONewProductDialogComponent_Conditional_2_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
171
|
+
i0.ɵɵelementStart(0, "div", 23)(1, "strong");
|
|
172
|
+
i0.ɵɵtext(2, "Not ready to sell yet:");
|
|
173
|
+
i0.ɵɵelementEnd();
|
|
174
|
+
i0.ɵɵelementStart(3, "ul");
|
|
175
|
+
i0.ɵɵrepeaterCreate(4, MJONewProductDialogComponent_Conditional_2_Conditional_6_For_5_Template, 2, 1, "li", null, i0.ɵɵrepeaterTrackByIdentity);
|
|
176
|
+
i0.ɵɵelementEnd()();
|
|
177
|
+
} if (rf & 2) {
|
|
178
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
179
|
+
i0.ɵɵadvance(4);
|
|
180
|
+
i0.ɵɵrepeater(ctx_r1.Missing);
|
|
181
|
+
} }
|
|
182
|
+
function MJONewProductDialogComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
183
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
184
|
+
i0.ɵɵelementStart(0, "div", 19)(1, "section", 20);
|
|
185
|
+
i0.ɵɵelement(2, "bizapps-product-effective-gl-accounts", 21, 0);
|
|
186
|
+
i0.ɵɵelementEnd();
|
|
187
|
+
i0.ɵɵelementStart(4, "section", 20)(5, "bizapps-product-gl-links", 22);
|
|
188
|
+
i0.ɵɵlistener("LinksChanged", function MJONewProductDialogComponent_Conditional_2_Template_bizapps_product_gl_links_LinksChanged_5_listener() { i0.ɵɵrestoreView(_r7); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnLinksChanged()); });
|
|
189
|
+
i0.ɵɵelementEnd()()();
|
|
190
|
+
i0.ɵɵconditionalCreate(6, MJONewProductDialogComponent_Conditional_2_Conditional_6_Template, 6, 0, "div", 23);
|
|
191
|
+
} if (rf & 2) {
|
|
192
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
193
|
+
i0.ɵɵadvance(2);
|
|
194
|
+
i0.ɵɵproperty("Product", ctx_r1.Product)("RevenueRecognitionTypeID", ctx_r1.Product.RevenueRecognitionTypeID)("CompanyID", ctx_r1.Product.CompanyID);
|
|
195
|
+
i0.ɵɵadvance(3);
|
|
196
|
+
i0.ɵɵproperty("Product", ctx_r1.Product)("EditMode", true);
|
|
197
|
+
i0.ɵɵadvance();
|
|
198
|
+
i0.ɵɵconditional(ctx_r1.Missing.length ? 6 : -1);
|
|
199
|
+
} }
|
|
200
|
+
function MJONewProductDialogComponent_Conditional_3_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
201
|
+
i0.ɵɵelementStart(0, "li");
|
|
202
|
+
i0.ɵɵtext(1);
|
|
203
|
+
i0.ɵɵelementEnd();
|
|
204
|
+
} if (rf & 2) {
|
|
205
|
+
const e_r9 = ctx.$implicit;
|
|
206
|
+
i0.ɵɵadvance();
|
|
207
|
+
i0.ɵɵtextInterpolate(e_r9);
|
|
208
|
+
} }
|
|
209
|
+
function MJONewProductDialogComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
210
|
+
i0.ɵɵelementStart(0, "ul", 2);
|
|
211
|
+
i0.ɵɵrepeaterCreate(1, MJONewProductDialogComponent_Conditional_3_For_2_Template, 2, 1, "li", null, i0.ɵɵrepeaterTrackByIdentity);
|
|
212
|
+
i0.ɵɵelementEnd();
|
|
213
|
+
} if (rf & 2) {
|
|
214
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
215
|
+
i0.ɵɵadvance();
|
|
216
|
+
i0.ɵɵrepeater(ctx_r1.Errors);
|
|
217
|
+
} }
|
|
218
|
+
function MJONewProductDialogComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
219
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
220
|
+
i0.ɵɵelementStart(0, "button", 24);
|
|
221
|
+
i0.ɵɵlistener("click", function MJONewProductDialogComponent_Conditional_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Close()); });
|
|
222
|
+
i0.ɵɵtext(1, "Cancel");
|
|
223
|
+
i0.ɵɵelementEnd();
|
|
224
|
+
i0.ɵɵelementStart(2, "button", 25);
|
|
225
|
+
i0.ɵɵlistener("click", function MJONewProductDialogComponent_Conditional_5_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r10); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.SaveDetails()); });
|
|
226
|
+
i0.ɵɵtext(3);
|
|
227
|
+
i0.ɵɵelementEnd();
|
|
228
|
+
} if (rf & 2) {
|
|
229
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
230
|
+
i0.ɵɵproperty("disabled", ctx_r1.Busy);
|
|
231
|
+
i0.ɵɵadvance(2);
|
|
232
|
+
i0.ɵɵproperty("disabled", ctx_r1.Busy);
|
|
233
|
+
i0.ɵɵadvance();
|
|
234
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.Busy ? "Saving\u2026" : "Save and continue", " ");
|
|
235
|
+
} }
|
|
236
|
+
function MJONewProductDialogComponent_Conditional_6_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
237
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
238
|
+
i0.ɵɵelementStart(0, "button", 24);
|
|
239
|
+
i0.ɵɵlistener("click", function MJONewProductDialogComponent_Conditional_6_Conditional_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.Activate(true)); });
|
|
240
|
+
i0.ɵɵtext(1, "Activate anyway");
|
|
241
|
+
i0.ɵɵelementEnd();
|
|
242
|
+
} if (rf & 2) {
|
|
243
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
244
|
+
i0.ɵɵproperty("disabled", ctx_r1.Busy);
|
|
245
|
+
} }
|
|
246
|
+
function MJONewProductDialogComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
247
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
248
|
+
i0.ɵɵelementStart(0, "button", 24);
|
|
249
|
+
i0.ɵɵlistener("click", function MJONewProductDialogComponent_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Close()); });
|
|
250
|
+
i0.ɵɵtext(1, "Leave as Draft");
|
|
251
|
+
i0.ɵɵelementEnd();
|
|
252
|
+
i0.ɵɵconditionalCreate(2, MJONewProductDialogComponent_Conditional_6_Conditional_2_Template, 2, 1, "button", 26);
|
|
253
|
+
i0.ɵɵelementStart(3, "button", 25);
|
|
254
|
+
i0.ɵɵlistener("click", function MJONewProductDialogComponent_Conditional_6_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.Activate(false)); });
|
|
255
|
+
i0.ɵɵtext(4);
|
|
256
|
+
i0.ɵɵelementEnd();
|
|
257
|
+
} if (rf & 2) {
|
|
258
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
259
|
+
i0.ɵɵproperty("disabled", ctx_r1.Busy);
|
|
260
|
+
i0.ɵɵadvance(2);
|
|
261
|
+
i0.ɵɵconditional(ctx_r1.Missing.length ? 2 : -1);
|
|
262
|
+
i0.ɵɵadvance();
|
|
263
|
+
i0.ɵɵproperty("disabled", ctx_r1.Busy);
|
|
264
|
+
i0.ɵɵadvance();
|
|
265
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.Busy ? "Checking\u2026" : "Activate", " ");
|
|
266
|
+
} }
|
|
267
|
+
const COMPANY_ENTITY = 'MJ: Companies';
|
|
268
|
+
/**
|
|
269
|
+
* `mjo-new-product-dialog` — the guided way to create a sellable product (golive#434).
|
|
270
|
+
*
|
|
271
|
+
* Step 1 asks for the record and its base price and saves both as one unit, with the product in
|
|
272
|
+
* Draft. Step 2 shows the GL accounts the saved product books to (inherited from its category,
|
|
273
|
+
* product type or company where it has none of its own), lets the user link one for any role that has
|
|
274
|
+
* none, then activates it after the same readiness check the product header runs.
|
|
275
|
+
*
|
|
276
|
+
* Closing after step 1 leaves a Draft product with its price, which the product form's Draft banner
|
|
277
|
+
* picks up. `Created` fires once the product exists, with its ID, whether or not it was activated.
|
|
278
|
+
*
|
|
279
|
+
* ## Example
|
|
280
|
+
*
|
|
281
|
+
* ```html
|
|
282
|
+
* <mjo-new-product-dialog [Visible]="open" (Created)="openProduct($event)" (Closed)="open = false" />
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
export class MJONewProductDialogComponent {
|
|
286
|
+
cdr = inject(ChangeDetectorRef);
|
|
287
|
+
Visible = false;
|
|
288
|
+
/** The saved product's ID, once step 1 has saved it. */
|
|
289
|
+
Created = new EventEmitter();
|
|
290
|
+
Closed = new EventEmitter();
|
|
291
|
+
effective;
|
|
292
|
+
Step = 'details';
|
|
293
|
+
Draft = EmptyNewProductDraft(Today());
|
|
294
|
+
Product = null;
|
|
295
|
+
Companies = [];
|
|
296
|
+
Categories = [];
|
|
297
|
+
Types = [];
|
|
298
|
+
RevenueRecognitionTypes = [];
|
|
299
|
+
Errors = [];
|
|
300
|
+
/** What the readiness check found missing, shown before the user activates anyway. */
|
|
301
|
+
Missing = [];
|
|
302
|
+
Busy = false;
|
|
303
|
+
typeDefaults = [];
|
|
304
|
+
lookupsLoaded = false;
|
|
305
|
+
async ngOnChanges(changes) {
|
|
306
|
+
if (changes['Visible']?.currentValue) {
|
|
307
|
+
this.reset();
|
|
308
|
+
if (!this.lookupsLoaded)
|
|
309
|
+
await this.loadLookups();
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
OnTypeChanged(typeID) {
|
|
313
|
+
this.Draft.ProductTypeID = typeID;
|
|
314
|
+
this.Draft.RevenueRecognitionTypeID = RevenueRecognitionForType(this.typeDefaults, typeID, this.Draft.RevenueRecognitionTypeID);
|
|
315
|
+
}
|
|
316
|
+
/** Step 1: saves the product and its base price as one unit, in Draft, then moves to step 2. */
|
|
317
|
+
async SaveDetails() {
|
|
318
|
+
this.Errors = ValidateNewProductDraft(this.Draft);
|
|
319
|
+
if (this.Errors.length)
|
|
320
|
+
return;
|
|
321
|
+
this.Busy = true;
|
|
322
|
+
try {
|
|
323
|
+
const product = await new Metadata().GetEntityObject(MJO_ENTITIES.Product);
|
|
324
|
+
await ApplyNewProductDraft(product, this.Draft);
|
|
325
|
+
if (!(await product.Save())) {
|
|
326
|
+
this.Errors = [product.LatestResult?.CompleteMessage || 'The product could not be saved.'];
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
this.Product = product;
|
|
330
|
+
this.Step = 'accounts';
|
|
331
|
+
this.Created.emit(product.ID);
|
|
332
|
+
}
|
|
333
|
+
catch (e) {
|
|
334
|
+
this.Errors = [e instanceof Error ? e.message : String(e)];
|
|
335
|
+
}
|
|
336
|
+
finally {
|
|
337
|
+
this.Busy = false;
|
|
338
|
+
this.cdr.detectChanges();
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
/** A link was added or changed: the inherited accounts and any earlier check are now stale. */
|
|
342
|
+
OnLinksChanged() {
|
|
343
|
+
this.Missing = [];
|
|
344
|
+
void this.effective?.Refresh();
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Step 2: activates the product. Without `anyway`, runs the readiness check first and stops to
|
|
348
|
+
* list what is missing; the user can then link accounts, or activate anyway (golive#433's rule).
|
|
349
|
+
*/
|
|
350
|
+
async Activate(anyway) {
|
|
351
|
+
const product = this.Product;
|
|
352
|
+
if (!product)
|
|
353
|
+
return;
|
|
354
|
+
this.Busy = true;
|
|
355
|
+
this.Errors = [];
|
|
356
|
+
try {
|
|
357
|
+
if (!anyway) {
|
|
358
|
+
const readiness = await CheckProductReadiness(product.ID);
|
|
359
|
+
this.Missing = readiness.Missing;
|
|
360
|
+
if (!readiness.Ready)
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
product.Status = 'Active';
|
|
364
|
+
if (!(await product.Save())) {
|
|
365
|
+
product.Status = 'Draft';
|
|
366
|
+
this.Errors = [product.LatestResult?.CompleteMessage || 'The product could not be activated.'];
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
this.Close();
|
|
370
|
+
}
|
|
371
|
+
finally {
|
|
372
|
+
this.Busy = false;
|
|
373
|
+
this.cdr.detectChanges();
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
Close() {
|
|
377
|
+
this.Closed.emit();
|
|
378
|
+
}
|
|
379
|
+
reset() {
|
|
380
|
+
this.Step = 'details';
|
|
381
|
+
this.Draft = EmptyNewProductDraft(Today());
|
|
382
|
+
this.Product = null;
|
|
383
|
+
this.Errors = [];
|
|
384
|
+
this.Missing = [];
|
|
385
|
+
}
|
|
386
|
+
async loadLookups() {
|
|
387
|
+
const [types, categories, companies] = await Promise.all([GetProductTypes(), GetProductCategories(), loadCompanies()]);
|
|
388
|
+
this.typeDefaults = types.map((t) => ({ ID: t.ID, DefaultRevenueRecognitionTypeID: t.DefaultRevenueRecognitionTypeID }));
|
|
389
|
+
this.Types = types.map((t) => ({ ID: t.ID, Name: t.Name }));
|
|
390
|
+
this.Categories = categories.map((c) => ({ ID: c.ID, Name: c.Name }));
|
|
391
|
+
this.Companies = companies.Rows;
|
|
392
|
+
if (companies.Error)
|
|
393
|
+
this.Errors = [companies.Error];
|
|
394
|
+
// GetProductTypes has loaded the engine, which caches the recognition types too.
|
|
395
|
+
this.RevenueRecognitionTypes = OrdersEngine.Instance.RevenueRecognitionTypes.filter((r) => r.IsActive)
|
|
396
|
+
.sort((a, b) => a.Sequence - b.Sequence)
|
|
397
|
+
.map((r) => ({ ID: r.ID, Name: r.Name }));
|
|
398
|
+
this.lookupsLoaded = true;
|
|
399
|
+
this.cdr.detectChanges();
|
|
400
|
+
}
|
|
401
|
+
static ɵfac = function MJONewProductDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJONewProductDialogComponent)(); };
|
|
402
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJONewProductDialogComponent, selectors: [["mjo-new-product-dialog"]], viewQuery: function MJONewProductDialogComponent_Query(rf, ctx) { if (rf & 1) {
|
|
403
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
404
|
+
} if (rf & 2) {
|
|
405
|
+
let _t;
|
|
406
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.effective = _t.first);
|
|
407
|
+
} }, inputs: { Visible: "Visible" }, outputs: { Created: "Created", Closed: "Closed" }, features: [i0.ɵɵNgOnChangesFeature], decls: 7, vars: 5, consts: [["effective", ""], ["Size", "lg", 3, "Close", "Visible", "Title"], ["role", "alert", 1, "mjo-np__errors"], [1, "mjo-np__lede"], [1, "mjo-np__grid", 3, "input", "change"], [1, "mjo-np__field", "mjo-np__field--wide"], ["type", "text", "maxlength", "255", "aria-label", "Name", 3, "ngModelChange", "ngModel"], [1, "mjo-np__field"], [1, "muted"], ["type", "text", "maxlength", "100", "aria-label", "SKU", 3, "ngModelChange", "ngModel"], ["aria-label", "Company", 3, "ngModelChange", "ngModel"], ["value", ""], [3, "value"], ["aria-label", "Category", 3, "ngModelChange", "ngModel"], ["aria-label", "Product type", 3, "ngModelChange", "ngModel"], ["aria-label", "Revenue recognition", 3, "ngModelChange", "ngModel"], ["type", "number", "min", "0", "step", "0.01", "inputmode", "decimal", "aria-label", "Base price", 3, "ngModelChange", "ngModel"], ["type", "date", "aria-label", "Price applies from", 3, "ngModelChange", "ngModel"], [1, "small", "muted", "mjo-np__hint"], [1, "mjo-np__accounts"], [1, "mjo-acct-card"], [3, "Product", "RevenueRecognitionTypeID", "CompanyID"], [3, "LinksChanged", "Product", "EditMode"], ["role", "status", 1, "mjo-np__missing"], ["type", "button", "mjButton", "", "variant", "outline", 3, "click", "disabled"], ["type", "button", "mjButton", "", "variant", "primary", 3, "click", "disabled"], ["type", "button", "mjButton", "", "variant", "outline", 3, "disabled"]], template: function MJONewProductDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
408
|
+
i0.ɵɵelementStart(0, "mj-dialog", 1);
|
|
409
|
+
i0.ɵɵlistener("Close", function MJONewProductDialogComponent_Template_mj_dialog_Close_0_listener() { return ctx.Close(); });
|
|
410
|
+
i0.ɵɵconditionalCreate(1, MJONewProductDialogComponent_Conditional_1_Template, 55, 8)(2, MJONewProductDialogComponent_Conditional_2_Template, 7, 6);
|
|
411
|
+
i0.ɵɵconditionalCreate(3, MJONewProductDialogComponent_Conditional_3_Template, 3, 0, "ul", 2);
|
|
412
|
+
i0.ɵɵelementStart(4, "mj-dialog-actions");
|
|
413
|
+
i0.ɵɵconditionalCreate(5, MJONewProductDialogComponent_Conditional_5_Template, 4, 3)(6, MJONewProductDialogComponent_Conditional_6_Template, 5, 4);
|
|
414
|
+
i0.ɵɵelementEnd()();
|
|
415
|
+
} if (rf & 2) {
|
|
416
|
+
i0.ɵɵproperty("Visible", ctx.Visible)("Title", ctx.Step === "details" ? "New product" : "GL accounts for " + ((ctx.Product == null ? null : ctx.Product.Name) ?? "the product"));
|
|
417
|
+
i0.ɵɵadvance();
|
|
418
|
+
i0.ɵɵconditional(ctx.Step === "details" ? 1 : ctx.Product ? 2 : -1);
|
|
419
|
+
i0.ɵɵadvance(2);
|
|
420
|
+
i0.ɵɵconditional(ctx.Errors.length ? 3 : -1);
|
|
421
|
+
i0.ɵɵadvance(2);
|
|
422
|
+
i0.ɵɵconditional(ctx.Step === "details" ? 5 : 6);
|
|
423
|
+
} }, dependencies: [CommonModule, FormsModule, i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.DefaultValueAccessor, i1.NumberValueAccessor, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.MaxLengthValidator, i1.MinValidator, i1.NgModel, MJButtonDirective, MJDialogComponent, MJDialogActionsComponent, CustomFormsModule, i2.BizAppsProductGLLinksComponent, i3.BizAppsProductEffectiveGLAccountsComponent], styles: ["\n\n\n\n\n\n\n\n.mjo-acct-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n border-radius: var(--mj-radius-lg, 10px);\n overflow: hidden;\n}\n\n\n\n\n[_nghost-%COMP%] .mjo-acct-card__head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n padding: 16px 20px 14px;\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n[_nghost-%COMP%] .mjo-acct-card__titles {\n min-width: 0;\n}\n\n[_nghost-%COMP%] .mjo-acct-card__title {\n margin: 0;\n font-size: 15px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n[_nghost-%COMP%] .mjo-acct-card__title i {\n color: var(--mj-brand-primary, #0284c7);\n font-size: 14px;\n}\n\n[_nghost-%COMP%] .mjo-acct-card__sub {\n margin: 4px 0 0;\n font-size: 13px;\n color: var(--mj-text-muted, #94a3b8);\n max-width: 72ch;\n}\n\n[_nghost-%COMP%] .mjo-acct-card__actions {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n}\n\n[_nghost-%COMP%] .mjo-acct-card__body {\n padding: 16px 20px 20px;\n}\n\n\n\n\n[_nghost-%COMP%] .mjo-acct-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font: inherit;\n font-size: 13px;\n font-weight: 600;\n padding: 6px 12px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: transparent;\n color: var(--mj-text-primary, #0f172a);\n cursor: pointer;\n white-space: nowrap;\n}\n\n[_nghost-%COMP%] .mjo-acct-btn:hover:not(:disabled) {\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.08));\n}\n\n[_nghost-%COMP%] .mjo-acct-btn:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n[_nghost-%COMP%] .mjo-acct-btn--primary {\n background: var(--mj-brand-primary, #0284c7);\n border-color: var(--mj-brand-primary, #0284c7);\n color: #fff;\n}\n\n[_nghost-%COMP%] .mjo-acct-btn--primary:hover:not(:disabled) {\n filter: brightness(1.08);\n background: var(--mj-brand-primary, #0284c7);\n}\n\n[_nghost-%COMP%] .mjo-acct-btn--icon {\n width: 32px;\n height: 32px;\n padding: 0;\n justify-content: center;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n[_nghost-%COMP%] .mjo-acct-btn--link {\n border: none;\n padding: 2px 4px;\n font-weight: 600;\n color: var(--mj-brand-primary, #0284c7);\n}\n\n[_nghost-%COMP%] .mjo-acct-btn:focus-visible {\n outline: 2px solid var(--mj-brand-primary, #0284c7);\n outline-offset: 2px;\n}\n\n\n\n\n[_nghost-%COMP%] .mjo-acct-tablewrap {\n overflow-x: auto;\n}\n\n[_nghost-%COMP%] .mjo-acct-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 13.5px;\n font-variant-numeric: tabular-nums;\n}\n\n[_nghost-%COMP%] .mjo-acct-table th {\n text-align: left;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted, #94a3b8);\n padding: 0 12px 10px 0;\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n white-space: nowrap;\n}\n\n[_nghost-%COMP%] .mjo-acct-table td {\n padding: 10px 12px 10px 0;\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.08));\n vertical-align: middle;\n}\n\n[_nghost-%COMP%] .mjo-acct-table tr:last-child td {\n border-bottom: none;\n}\n\n[_nghost-%COMP%] .mjo-acct-table th:last-child, \n[_nghost-%COMP%] .mjo-acct-table td:last-child {\n padding-right: 0;\n}\n\n[_nghost-%COMP%] .mjo-acct-table .actions {\n text-align: right;\n white-space: nowrap;\n}\n\n[_nghost-%COMP%] .mjo-acct-table tr.muted td {\n color: var(--mj-text-muted, #94a3b8);\n}\n\n[_nghost-%COMP%] .mjo-acct-account {\n display: inline-flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n[_nghost-%COMP%] .mjo-acct-code {\n font-family: var(--mj-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace);\n font-weight: 700;\n}\n\n[_nghost-%COMP%] .mjo-acct-name {\n color: var(--mj-text-muted, #94a3b8);\n}\n\n[_nghost-%COMP%] .mjo-acct-link {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n font: inherit;\n color: inherit;\n text-align: left;\n}\n\n[_nghost-%COMP%] .mjo-acct-link:hover .mjo-acct-code {\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n\n\n\n\n[_nghost-%COMP%] .mjo-acct-chip {\n display: inline-block;\n font-size: 12px;\n font-weight: 600;\n padding: 2px 9px;\n border-radius: 999px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.2));\n color: var(--mj-text-muted, #94a3b8);\n white-space: nowrap;\n}\n\n[_nghost-%COMP%] .mjo-acct-chip--ok {\n color: var(--mj-status-success-text, #15803d);\n border-color: color-mix(in srgb, var(--mj-status-success-text, #15803d) 40%, transparent);\n background: color-mix(in srgb, var(--mj-status-success-text, #15803d) 10%, transparent);\n}\n\n[_nghost-%COMP%] .mjo-acct-chip--warn {\n color: var(--mj-status-warning-text, #b45309);\n border-color: color-mix(in srgb, var(--mj-status-warning-text, #b45309) 40%, transparent);\n background: color-mix(in srgb, var(--mj-status-warning-text, #b45309) 10%, transparent);\n}\n\n\n\n\n[_nghost-%COMP%] .mjo-acct-note {\n margin: 0;\n font-size: 13.5px;\n color: var(--mj-text-muted, #94a3b8);\n max-width: 72ch;\n}\n\n[_nghost-%COMP%] .mjo-acct-alert {\n display: flex;\n gap: 10px;\n align-items: flex-start;\n margin: 0 0 14px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13.5px;\n color: var(--mj-status-warning-text, #b45309);\n background: color-mix(in srgb, var(--mj-status-warning-text, #b45309) 10%, transparent);\n border: 1px solid color-mix(in srgb, var(--mj-status-warning-text, #b45309) 30%, transparent);\n}\n\n[_nghost-%COMP%] .mjo-acct-alert i {\n margin-top: 3px;\n}\n\n[_nghost-%COMP%] .mjo-acct-alert--error {\n color: var(--mj-status-error-text, #b91c1c);\n background: color-mix(in srgb, var(--mj-status-error-text, #b91c1c) 10%, transparent);\n border-color: color-mix(in srgb, var(--mj-status-error-text, #b91c1c) 30%, transparent);\n}\n\n\n\n\n[_nghost-%COMP%] .mjo-acct-form {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n gap: 14px 16px;\n align-items: end;\n margin: 0 0 16px;\n padding: 16px;\n border-radius: 8px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.08));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n[_nghost-%COMP%] .mjo-acct-form__title {\n grid-column: 1 / -1;\n margin: 0;\n font-size: 13.5px;\n font-weight: 700;\n}\n\n[_nghost-%COMP%] .mjo-acct-field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n min-width: 0;\n}\n\n[_nghost-%COMP%] .mjo-acct-field > span {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n[_nghost-%COMP%] .mjo-acct-field select, \n[_nghost-%COMP%] .mjo-acct-field input {\n font: inherit;\n font-size: 13.5px;\n padding: 7px 10px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.2));\n border-radius: 6px;\n background: var(--mj-bg-surface, transparent);\n color: inherit;\n width: 100%;\n box-sizing: border-box;\n}\n\n[_nghost-%COMP%] .mjo-acct-field select:disabled, \n[_nghost-%COMP%] .mjo-acct-field input:disabled {\n opacity: 0.55;\n}\n\n[_nghost-%COMP%] .mjo-acct-form__actions {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n[_nghost-%COMP%] .mjo-acct-form__note {\n grid-column: 1 / -1;\n margin: 0;\n font-size: 13px;\n color: var(--mj-text-muted, #94a3b8);\n}", ".mjo-np__accounts[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-4);\n font-size: 14px;\n line-height: 1.5;\n }\n .mjo-np__lede[_ngcontent-%COMP%] { margin: 0 0 var(--mj-space-4); color: var(--mj-text-secondary); }\n .mjo-np__grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-3) var(--mj-space-4);\n }\n .mjo-np__field[_ngcontent-%COMP%] { display: flex; flex-direction: column; gap: var(--mj-space-1); font-size: var(--mj-text-sm); }\n .mjo-np__field--wide[_ngcontent-%COMP%] { grid-column: 1 / -1; }\n .mjo-np__field[_ngcontent-%COMP%] input[_ngcontent-%COMP%], \n .mjo-np__field[_ngcontent-%COMP%] select[_ngcontent-%COMP%] {\n padding: var(--mj-space-2);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font: inherit;\n }\n .mjo-np__hint[_ngcontent-%COMP%] { margin: var(--mj-space-3) 0 0; }\n .mjo-np__missing[_ngcontent-%COMP%] {\n margin-top: var(--mj-space-4);\n padding: var(--mj-space-3);\n border: 1px solid var(--mj-status-warning);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-status-warning-bg);\n }\n .mjo-np__missing[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], \n .mjo-np__errors[_ngcontent-%COMP%] { margin: var(--mj-space-2) 0 0; padding-left: var(--mj-space-5); }\n .mjo-np__errors[_ngcontent-%COMP%] { color: var(--mj-status-error); }\n @media (max-width: 640px) {\n .mjo-np__grid[_ngcontent-%COMP%] { grid-template-columns: 1fr; }\n }"] });
|
|
424
|
+
}
|
|
425
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJONewProductDialogComponent, [{
|
|
426
|
+
type: Component,
|
|
427
|
+
args: [{ selector: 'mjo-new-product-dialog', standalone: true, imports: [CommonModule, FormsModule, MJButtonDirective, MJDialogComponent, MJDialogActionsComponent, CustomFormsModule], template: `
|
|
428
|
+
<mj-dialog [Visible]="Visible" [Title]="Step === 'details' ? 'New product' : 'GL accounts for ' + (Product?.Name ?? 'the product')" Size="lg" (Close)="Close()">
|
|
429
|
+
@if (Step === 'details') {
|
|
430
|
+
<p class="mjo-np__lede">
|
|
431
|
+
The product is saved as Draft with its base price. The next step checks its GL accounts, then activates it.
|
|
432
|
+
</p>
|
|
433
|
+
<div class="mjo-np__grid" (input)="Errors = []" (change)="Errors = []">
|
|
434
|
+
<label class="mjo-np__field mjo-np__field--wide">
|
|
435
|
+
<span>Name</span>
|
|
436
|
+
<input type="text" maxlength="255" [(ngModel)]="Draft.Name" aria-label="Name" />
|
|
437
|
+
</label>
|
|
438
|
+
<label class="mjo-np__field">
|
|
439
|
+
<span>SKU <span class="muted">(optional)</span></span>
|
|
440
|
+
<input type="text" maxlength="100" [(ngModel)]="Draft.SKU" aria-label="SKU" />
|
|
441
|
+
</label>
|
|
442
|
+
<label class="mjo-np__field">
|
|
443
|
+
<span>Company</span>
|
|
444
|
+
<select [(ngModel)]="Draft.CompanyID" aria-label="Company">
|
|
445
|
+
<option value="">Choose…</option>
|
|
446
|
+
@for (o of Companies; track o.ID) { <option [value]="o.ID">{{ o.Name }}</option> }
|
|
447
|
+
</select>
|
|
448
|
+
</label>
|
|
449
|
+
<label class="mjo-np__field">
|
|
450
|
+
<span>Category</span>
|
|
451
|
+
<select [(ngModel)]="Draft.ProductCategoryID" aria-label="Category">
|
|
452
|
+
<option value="">Choose…</option>
|
|
453
|
+
@for (o of Categories; track o.ID) { <option [value]="o.ID">{{ o.Name }}</option> }
|
|
454
|
+
</select>
|
|
455
|
+
</label>
|
|
456
|
+
<label class="mjo-np__field">
|
|
457
|
+
<span>Product type</span>
|
|
458
|
+
<select [ngModel]="Draft.ProductTypeID" (ngModelChange)="OnTypeChanged($event)" aria-label="Product type">
|
|
459
|
+
<option value="">Choose…</option>
|
|
460
|
+
@for (o of Types; track o.ID) { <option [value]="o.ID">{{ o.Name }}</option> }
|
|
461
|
+
</select>
|
|
462
|
+
</label>
|
|
463
|
+
<label class="mjo-np__field">
|
|
464
|
+
<span>Revenue recognition</span>
|
|
465
|
+
<select [(ngModel)]="Draft.RevenueRecognitionTypeID" aria-label="Revenue recognition">
|
|
466
|
+
<option value="">Choose…</option>
|
|
467
|
+
@for (o of RevenueRecognitionTypes; track o.ID) { <option [value]="o.ID">{{ o.Name }}</option> }
|
|
468
|
+
</select>
|
|
469
|
+
</label>
|
|
470
|
+
<label class="mjo-np__field">
|
|
471
|
+
<span>Base price</span>
|
|
472
|
+
<input type="number" min="0" step="0.01" inputmode="decimal" [(ngModel)]="Draft.BasePrice" aria-label="Base price" />
|
|
473
|
+
</label>
|
|
474
|
+
<label class="mjo-np__field">
|
|
475
|
+
<span>Price applies from</span>
|
|
476
|
+
<input type="date" [(ngModel)]="Draft.PriceEffectiveFrom" aria-label="Price applies from" />
|
|
477
|
+
</label>
|
|
478
|
+
</div>
|
|
479
|
+
<p class="small muted mjo-np__hint">
|
|
480
|
+
Every product needs a base price, even when each deal enters its own amount; zero is fine. Orders dated
|
|
481
|
+
before the price's start date cannot use it.
|
|
482
|
+
</p>
|
|
483
|
+
} @else if (Product) {
|
|
484
|
+
<div class="mjo-np__accounts">
|
|
485
|
+
<section class="mjo-acct-card">
|
|
486
|
+
<bizapps-product-effective-gl-accounts
|
|
487
|
+
#effective
|
|
488
|
+
[Product]="Product"
|
|
489
|
+
[RevenueRecognitionTypeID]="Product.RevenueRecognitionTypeID"
|
|
490
|
+
[CompanyID]="Product.CompanyID">
|
|
491
|
+
</bizapps-product-effective-gl-accounts>
|
|
492
|
+
</section>
|
|
493
|
+
<section class="mjo-acct-card">
|
|
494
|
+
<bizapps-product-gl-links [Product]="Product" [EditMode]="true" (LinksChanged)="OnLinksChanged()"></bizapps-product-gl-links>
|
|
495
|
+
</section>
|
|
496
|
+
</div>
|
|
497
|
+
@if (Missing.length) {
|
|
498
|
+
<div class="mjo-np__missing" role="status">
|
|
499
|
+
<strong>Not ready to sell yet:</strong>
|
|
500
|
+
<ul>
|
|
501
|
+
@for (m of Missing; track m) { <li>{{ m }}</li> }
|
|
502
|
+
</ul>
|
|
503
|
+
</div>
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
@if (Errors.length) {
|
|
508
|
+
<ul class="mjo-np__errors" role="alert">
|
|
509
|
+
@for (e of Errors; track e) { <li>{{ e }}</li> }
|
|
510
|
+
</ul>
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
<mj-dialog-actions>
|
|
514
|
+
@if (Step === 'details') {
|
|
515
|
+
<button type="button" mjButton variant="outline" [disabled]="Busy" (click)="Close()">Cancel</button>
|
|
516
|
+
<button type="button" mjButton variant="primary" [disabled]="Busy" (click)="SaveDetails()">
|
|
517
|
+
{{ Busy ? 'Saving…' : 'Save and continue' }}
|
|
518
|
+
</button>
|
|
519
|
+
} @else {
|
|
520
|
+
<button type="button" mjButton variant="outline" [disabled]="Busy" (click)="Close()">Leave as Draft</button>
|
|
521
|
+
@if (Missing.length) {
|
|
522
|
+
<button type="button" mjButton variant="outline" [disabled]="Busy" (click)="Activate(true)">Activate anyway</button>
|
|
523
|
+
}
|
|
524
|
+
<button type="button" mjButton variant="primary" [disabled]="Busy" (click)="Activate(false)">
|
|
525
|
+
{{ Busy ? 'Checking…' : 'Activate' }}
|
|
526
|
+
</button>
|
|
527
|
+
}
|
|
528
|
+
</mj-dialog-actions>
|
|
529
|
+
</mj-dialog>
|
|
530
|
+
`, styles: ["/*\n * The GL account cards: the chrome the product form's Accounting tab and the New product dialog\n * (golive#434) both put around the accounts-in-use and product-link panels. The panels render\n * their own header and table inside a `.mjo-acct-card`; these rules reach them through ::ng-deep\n * from whichever component hosts them, so every host shows them the same way.\n */\n\n.mjo-acct-card {\n background: var(--mj-bg-surface-card, rgba(255, 255, 255, 0.05));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n border-radius: var(--mj-radius-lg, 10px);\n overflow: hidden;\n}\n\n/* \u2500\u2500 Card header: title, one-line subtitle, actions on the right \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n:host ::ng-deep .mjo-acct-card__head {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 16px;\n padding: 16px 20px 14px;\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n:host ::ng-deep .mjo-acct-card__titles {\n min-width: 0;\n}\n\n:host ::ng-deep .mjo-acct-card__title {\n margin: 0;\n font-size: 15px;\n font-weight: 700;\n color: var(--mj-text-primary, #0f172a);\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n:host ::ng-deep .mjo-acct-card__title i {\n color: var(--mj-brand-primary, #0284c7);\n font-size: 14px;\n}\n\n:host ::ng-deep .mjo-acct-card__sub {\n margin: 4px 0 0;\n font-size: 13px;\n color: var(--mj-text-muted, #94a3b8);\n max-width: 72ch;\n}\n\n:host ::ng-deep .mjo-acct-card__actions {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n}\n\n:host ::ng-deep .mjo-acct-card__body {\n padding: 16px 20px 20px;\n}\n\n/* \u2500\u2500 Buttons \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\u2500\u2500\u2500\u2500\u2500 */\n\n:host ::ng-deep .mjo-acct-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n font: inherit;\n font-size: 13px;\n font-weight: 600;\n padding: 6px 12px;\n border-radius: 6px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.15));\n background: transparent;\n color: var(--mj-text-primary, #0f172a);\n cursor: pointer;\n white-space: nowrap;\n}\n\n:host ::ng-deep .mjo-acct-btn:hover:not(:disabled) {\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.08));\n}\n\n:host ::ng-deep .mjo-acct-btn:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n:host ::ng-deep .mjo-acct-btn--primary {\n background: var(--mj-brand-primary, #0284c7);\n border-color: var(--mj-brand-primary, #0284c7);\n color: #fff;\n}\n\n:host ::ng-deep .mjo-acct-btn--primary:hover:not(:disabled) {\n filter: brightness(1.08);\n background: var(--mj-brand-primary, #0284c7);\n}\n\n:host ::ng-deep .mjo-acct-btn--icon {\n width: 32px;\n height: 32px;\n padding: 0;\n justify-content: center;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n:host ::ng-deep .mjo-acct-btn--link {\n border: none;\n padding: 2px 4px;\n font-weight: 600;\n color: var(--mj-brand-primary, #0284c7);\n}\n\n:host ::ng-deep .mjo-acct-btn:focus-visible {\n outline: 2px solid var(--mj-brand-primary, #0284c7);\n outline-offset: 2px;\n}\n\n/* \u2500\u2500 Tables \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\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n:host ::ng-deep .mjo-acct-tablewrap {\n overflow-x: auto;\n}\n\n:host ::ng-deep .mjo-acct-table {\n width: 100%;\n border-collapse: collapse;\n font-size: 13.5px;\n font-variant-numeric: tabular-nums;\n}\n\n:host ::ng-deep .mjo-acct-table th {\n text-align: left;\n font-size: 12px;\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--mj-text-muted, #94a3b8);\n padding: 0 12px 10px 0;\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.12));\n white-space: nowrap;\n}\n\n:host ::ng-deep .mjo-acct-table td {\n padding: 10px 12px 10px 0;\n border-bottom: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.08));\n vertical-align: middle;\n}\n\n:host ::ng-deep .mjo-acct-table tr:last-child td {\n border-bottom: none;\n}\n\n:host ::ng-deep .mjo-acct-table th:last-child,\n:host ::ng-deep .mjo-acct-table td:last-child {\n padding-right: 0;\n}\n\n:host ::ng-deep .mjo-acct-table .actions {\n text-align: right;\n white-space: nowrap;\n}\n\n:host ::ng-deep .mjo-acct-table tr.muted td {\n color: var(--mj-text-muted, #94a3b8);\n}\n\n:host ::ng-deep .mjo-acct-account {\n display: inline-flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n:host ::ng-deep .mjo-acct-code {\n font-family: var(--mj-font-family-mono, ui-monospace, SFMono-Regular, Menlo, monospace);\n font-weight: 700;\n}\n\n:host ::ng-deep .mjo-acct-name {\n color: var(--mj-text-muted, #94a3b8);\n}\n\n:host ::ng-deep .mjo-acct-link {\n background: none;\n border: none;\n padding: 0;\n cursor: pointer;\n font: inherit;\n color: inherit;\n text-align: left;\n}\n\n:host ::ng-deep .mjo-acct-link:hover .mjo-acct-code {\n text-decoration: underline;\n text-underline-offset: 2px;\n}\n\n/* \u2500\u2500 Status chips \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:host ::ng-deep .mjo-acct-chip {\n display: inline-block;\n font-size: 12px;\n font-weight: 600;\n padding: 2px 9px;\n border-radius: 999px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.2));\n color: var(--mj-text-muted, #94a3b8);\n white-space: nowrap;\n}\n\n:host ::ng-deep .mjo-acct-chip--ok {\n color: var(--mj-status-success-text, #15803d);\n border-color: color-mix(in srgb, var(--mj-status-success-text, #15803d) 40%, transparent);\n background: color-mix(in srgb, var(--mj-status-success-text, #15803d) 10%, transparent);\n}\n\n:host ::ng-deep .mjo-acct-chip--warn {\n color: var(--mj-status-warning-text, #b45309);\n border-color: color-mix(in srgb, var(--mj-status-warning-text, #b45309) 40%, transparent);\n background: color-mix(in srgb, var(--mj-status-warning-text, #b45309) 10%, transparent);\n}\n\n/* \u2500\u2500 Notes and alerts \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:host ::ng-deep .mjo-acct-note {\n margin: 0;\n font-size: 13.5px;\n color: var(--mj-text-muted, #94a3b8);\n max-width: 72ch;\n}\n\n:host ::ng-deep .mjo-acct-alert {\n display: flex;\n gap: 10px;\n align-items: flex-start;\n margin: 0 0 14px;\n padding: 10px 12px;\n border-radius: 8px;\n font-size: 13.5px;\n color: var(--mj-status-warning-text, #b45309);\n background: color-mix(in srgb, var(--mj-status-warning-text, #b45309) 10%, transparent);\n border: 1px solid color-mix(in srgb, var(--mj-status-warning-text, #b45309) 30%, transparent);\n}\n\n:host ::ng-deep .mjo-acct-alert i {\n margin-top: 3px;\n}\n\n:host ::ng-deep .mjo-acct-alert--error {\n color: var(--mj-status-error-text, #b91c1c);\n background: color-mix(in srgb, var(--mj-status-error-text, #b91c1c) 10%, transparent);\n border-color: color-mix(in srgb, var(--mj-status-error-text, #b91c1c) 30%, transparent);\n}\n\n/* \u2500\u2500 Inline forms (add / edit a link) \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:host ::ng-deep .mjo-acct-form {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));\n gap: 14px 16px;\n align-items: end;\n margin: 0 0 16px;\n padding: 16px;\n border-radius: 8px;\n background: var(--mj-bg-surface-sunken, rgba(0, 0, 0, 0.08));\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.1));\n}\n\n:host ::ng-deep .mjo-acct-form__title {\n grid-column: 1 / -1;\n margin: 0;\n font-size: 13.5px;\n font-weight: 700;\n}\n\n:host ::ng-deep .mjo-acct-field {\n display: flex;\n flex-direction: column;\n gap: 6px;\n min-width: 0;\n}\n\n:host ::ng-deep .mjo-acct-field > span {\n font-size: 12.5px;\n font-weight: 600;\n color: var(--mj-text-muted, #94a3b8);\n}\n\n:host ::ng-deep .mjo-acct-field select,\n:host ::ng-deep .mjo-acct-field input {\n font: inherit;\n font-size: 13.5px;\n padding: 7px 10px;\n border: 1px solid var(--mj-border-default, rgba(255, 255, 255, 0.2));\n border-radius: 6px;\n background: var(--mj-bg-surface, transparent);\n color: inherit;\n width: 100%;\n box-sizing: border-box;\n}\n\n:host ::ng-deep .mjo-acct-field select:disabled,\n:host ::ng-deep .mjo-acct-field input:disabled {\n opacity: 0.55;\n}\n\n:host ::ng-deep .mjo-acct-form__actions {\n display: flex;\n gap: 8px;\n align-items: center;\n}\n\n:host ::ng-deep .mjo-acct-form__note {\n grid-column: 1 / -1;\n margin: 0;\n font-size: 13px;\n color: var(--mj-text-muted, #94a3b8);\n}\n", "\n .mjo-np__accounts {\n display: flex;\n flex-direction: column;\n gap: var(--mj-space-4);\n font-size: 14px;\n line-height: 1.5;\n }\n .mjo-np__lede { margin: 0 0 var(--mj-space-4); color: var(--mj-text-secondary); }\n .mjo-np__grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-3) var(--mj-space-4);\n }\n .mjo-np__field { display: flex; flex-direction: column; gap: var(--mj-space-1); font-size: var(--mj-text-sm); }\n .mjo-np__field--wide { grid-column: 1 / -1; }\n .mjo-np__field input,\n .mjo-np__field select {\n padding: var(--mj-space-2);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font: inherit;\n }\n .mjo-np__hint { margin: var(--mj-space-3) 0 0; }\n .mjo-np__missing {\n margin-top: var(--mj-space-4);\n padding: var(--mj-space-3);\n border: 1px solid var(--mj-status-warning);\n border-radius: var(--mj-radius-sm);\n background: var(--mj-status-warning-bg);\n }\n .mjo-np__missing ul,\n .mjo-np__errors { margin: var(--mj-space-2) 0 0; padding-left: var(--mj-space-5); }\n .mjo-np__errors { color: var(--mj-status-error); }\n @media (max-width: 640px) {\n .mjo-np__grid { grid-template-columns: 1fr; }\n }\n "] }]
|
|
531
|
+
}], null, { Visible: [{
|
|
532
|
+
type: Input
|
|
533
|
+
}], Created: [{
|
|
534
|
+
type: Output
|
|
535
|
+
}], Closed: [{
|
|
536
|
+
type: Output
|
|
537
|
+
}], effective: [{
|
|
538
|
+
type: ViewChild,
|
|
539
|
+
args: ['effective']
|
|
540
|
+
}] }); })();
|
|
541
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJONewProductDialogComponent, { className: "MJONewProductDialogComponent", filePath: "lib/pages/catalog/new-product-dialog.component.ts", lineNumber: 202 }); })();
|
|
542
|
+
/** Every company, by name: a new product may belong to one that sells nothing yet. */
|
|
543
|
+
async function loadCompanies() {
|
|
544
|
+
const result = await new RunView().RunView({
|
|
545
|
+
EntityName: COMPANY_ENTITY,
|
|
546
|
+
Fields: ['ID', 'Name'],
|
|
547
|
+
OrderBy: 'Name',
|
|
548
|
+
ResultType: 'simple',
|
|
549
|
+
});
|
|
550
|
+
return result.Success
|
|
551
|
+
? { Rows: result.Results, Error: null }
|
|
552
|
+
: { Rows: [], Error: `Companies could not be loaded: ${result.ErrorMessage}` };
|
|
553
|
+
}
|
|
554
|
+
//# sourceMappingURL=new-product-dialog.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-product-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/pages/catalog/new-product-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAa,MAAM,EAAiB,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvI,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAClH,OAAO,EAAE,YAAY,EAAE,KAAK,EAAqC,MAAM,8BAA8B,CAAC;AAEtG,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EACH,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,GAE1B,MAAM,qBAAqB,CAAC;;;;;;;;IAqDmC,kCAAuB;IAAA,YAAY;IAAA,iBAAS;;;IAApC,+BAAc;IAAC,cAAY;I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