@mj-biz-apps/orders-ng 5.1.0 → 5.2.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/checkout-element/main.js +38080 -0
- package/dist/lib/checkout-widget/checkout-draft-line.d.ts +25 -0
- package/dist/lib/checkout-widget/checkout-draft-line.d.ts.map +1 -0
- package/dist/lib/checkout-widget/checkout-draft-line.js +46 -0
- package/dist/lib/checkout-widget/checkout-draft-line.js.map +1 -0
- package/dist/lib/checkout-widget/checkout-public-host.component.d.ts +80 -0
- package/dist/lib/checkout-widget/checkout-public-host.component.d.ts.map +1 -0
- package/dist/lib/checkout-widget/checkout-public-host.component.js +360 -0
- package/dist/lib/checkout-widget/checkout-public-host.component.js.map +1 -0
- package/dist/lib/checkout-widget/checkout-widget.component.d.ts +143 -0
- package/dist/lib/checkout-widget/checkout-widget.component.d.ts.map +1 -0
- package/dist/lib/checkout-widget/checkout-widget.component.js +873 -0
- package/dist/lib/checkout-widget/checkout-widget.component.js.map +1 -0
- package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts +1 -0
- package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-header-form.component.js +10 -6
- package/dist/lib/custom/OrderHeader/order-header-form.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts +2 -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 +37 -11
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js.map +1 -1
- package/dist/lib/form-panels/party-order-stats.js +2 -2
- package/dist/lib/form-panels/party-order-stats.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.js +103 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.js +136 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.js +106 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersEventOrderLine/mjbizappsorderseventorderline.form.component.js +9 -9
- package/dist/lib/generated/Entities/mjBizAppsOrdersEventOrderLine/mjbizappsorderseventorderline.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersEventProduct/mjbizappsorderseventproduct.form.component.js +12 -12
- package/dist/lib/generated/Entities/mjBizAppsOrdersEventProduct/mjbizappsorderseventproduct.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderCompanyPolicy/mjbizappsordersordercompanypolicy.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderCompanyPolicy/mjbizappsordersordercompanypolicy.form.component.js +16 -10
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderCompanyPolicy/mjbizappsordersordercompanypolicy.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.js +78 -52
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.js +88 -82
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentHeader/mjbizappsorderspaymentheader.form.component.js +3 -3
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentHeader/mjbizappsorderspaymentheader.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentIntent/mjbizappsorderspaymentintent.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentIntent/mjbizappsorderspaymentintent.form.component.js +23 -5
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentIntent/mjbizappsorderspaymentintent.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.js +75 -69
- package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.js +37 -31
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.js +24 -16
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.js.map +1 -1
- package/dist/lib/generated/generated-forms.module.d.ts +54 -51
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +27 -18
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/dist/lib/pages/catalog/pricing.page.d.ts +3 -24
- package/dist/lib/pages/catalog/pricing.page.d.ts.map +1 -1
- package/dist/lib/pages/catalog/pricing.page.js +158 -214
- package/dist/lib/pages/catalog/pricing.page.js.map +1 -1
- package/dist/lib/pages/catalog/products.page.d.ts +6 -29
- package/dist/lib/pages/catalog/products.page.d.ts.map +1 -1
- package/dist/lib/pages/catalog/products.page.js +255 -315
- package/dist/lib/pages/catalog/products.page.js.map +1 -1
- package/dist/lib/pages/orders/fulfillment.page.d.ts +14 -97
- package/dist/lib/pages/orders/fulfillment.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/fulfillment.page.js +93 -258
- package/dist/lib/pages/orders/fulfillment.page.js.map +1 -1
- package/dist/lib/pages/orders/order-document.page.js +1 -1
- package/dist/lib/pages/orders/order-document.page.js.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts +29 -58
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.js +602 -352
- package/dist/lib/pages/orders/orders-dashboard.page.js.map +1 -1
- package/dist/lib/pages/orders/orders-list.page.d.ts +8 -58
- package/dist/lib/pages/orders/orders-list.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-list.page.js +52 -237
- package/dist/lib/pages/orders/orders-list.page.js.map +1 -1
- package/dist/lib/pages/payments/account-credit.page.d.ts +7 -17
- package/dist/lib/pages/payments/account-credit.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/account-credit.page.js +99 -85
- package/dist/lib/pages/payments/account-credit.page.js.map +1 -1
- package/dist/lib/pages/payments/payments-dashboard.page.d.ts +4 -15
- package/dist/lib/pages/payments/payments-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/payments-dashboard.page.js +76 -111
- package/dist/lib/pages/payments/payments-dashboard.page.js.map +1 -1
- package/dist/lib/pages/payments/payments-list.page.d.ts +7 -41
- package/dist/lib/pages/payments/payments-list.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/payments-list.page.js +51 -130
- package/dist/lib/pages/payments/payments-list.page.js.map +1 -1
- package/dist/lib/pages/receivables/customer-ar.page.d.ts +6 -8
- package/dist/lib/pages/receivables/customer-ar.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/customer-ar.page.js +112 -100
- package/dist/lib/pages/receivables/customer-ar.page.js.map +1 -1
- package/dist/lib/pages/receivables/overdue.page.d.ts +6 -3
- package/dist/lib/pages/receivables/overdue.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/overdue.page.js +61 -65
- package/dist/lib/pages/receivables/overdue.page.js.map +1 -1
- package/dist/lib/pages/receivables/subscriptions.page.d.ts +5 -9
- package/dist/lib/pages/receivables/subscriptions.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/subscriptions.page.js +139 -153
- package/dist/lib/pages/receivables/subscriptions.page.js.map +1 -1
- package/dist/lib/panels/order-stages.d.ts +12 -16
- package/dist/lib/panels/order-stages.d.ts.map +1 -1
- package/dist/lib/panels/order-stages.js +6 -42
- package/dist/lib/panels/order-stages.js.map +1 -1
- package/dist/lib/panels/party-orders-overview.component.d.ts +3 -1
- package/dist/lib/panels/party-orders-overview.component.d.ts.map +1 -1
- package/dist/lib/panels/party-orders-overview.component.js +18 -6
- package/dist/lib/panels/party-orders-overview.component.js.map +1 -1
- package/dist/lib/panels/status-stepper.component.d.ts +1 -1
- package/dist/lib/panels/status-stepper.component.d.ts.map +1 -1
- package/dist/lib/services/pricing-scheduler.service.d.ts +3 -4
- package/dist/lib/services/pricing-scheduler.service.d.ts.map +1 -1
- package/dist/lib/services/pricing-scheduler.service.js +3 -4
- package/dist/lib/services/pricing-scheduler.service.js.map +1 -1
- package/dist/public-api.d.ts +3 -2
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -2
- package/dist/public-api.js.map +1 -1
- package/package.json +28 -16
- package/dist/lib/pages/orders/order-editor.page.d.ts +0 -547
- package/dist/lib/pages/orders/order-editor.page.d.ts.map +0 -1
- package/dist/lib/pages/orders/order-editor.page.js +0 -2269
- package/dist/lib/pages/orders/order-editor.page.js.map +0 -1
- package/dist/lib/pages/orders/order-workspace.page.d.ts +0 -120
- package/dist/lib/pages/orders/order-workspace.page.d.ts.map +0 -1
- package/dist/lib/pages/orders/order-workspace.page.js +0 -443
- package/dist/lib/pages/orders/order-workspace.page.js.map +0 -1
|
@@ -1,192 +1,219 @@
|
|
|
1
1
|
import { ChangeDetectorRef, Component, EventEmitter, Output, inject } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import {
|
|
3
|
+
import { EntityViewerModule } from '@memberjunction/ng-entity-viewer';
|
|
4
|
+
import { Metadata } from '@memberjunction/core';
|
|
4
5
|
import { FormatDate } from '../../panels/money-format.js';
|
|
5
6
|
import { MJAlertComponent } from '@memberjunction/ng-ui-components';
|
|
6
|
-
import { GetChargeTypes,
|
|
7
|
+
import { GetChargeTypes, GetTaxExemptions, GetTaxJurisdictions, GetTaxNexus, GetTaxRates } from '../../data/orders-queries.js';
|
|
8
|
+
import { MJO_ENTITIES } from '../../data/entity-names.js';
|
|
7
9
|
import { IsBefore, Today, } from '@mj-biz-apps/orders-entities';
|
|
8
10
|
import * as i0 from "@angular/core";
|
|
9
|
-
|
|
11
|
+
import * as i1 from "@memberjunction/ng-entity-viewer";
|
|
10
12
|
const _forTrack0 = ($index, $item) => $item["ID"];
|
|
11
|
-
function
|
|
12
|
-
i0.ɵɵ
|
|
13
|
+
function MJOProductsPageComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
15
|
+
i0.ɵɵelementStart(0, "mj-entity-viewer", 14);
|
|
16
|
+
i0.ɵɵlistener("RecordOpened", function MJOProductsPageComponent_Conditional_5_Template_mj_entity_viewer_RecordOpened_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnRecordOpened($event)); });
|
|
17
|
+
i0.ɵɵelementEnd();
|
|
18
|
+
} if (rf & 2) {
|
|
19
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
20
|
+
i0.ɵɵproperty("Entity", ctx_r1.ProductEntityInfo);
|
|
21
|
+
} }
|
|
22
|
+
function MJOProductsPageComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
24
|
+
i0.ɵɵtext(1, "Loading products...");
|
|
25
|
+
i0.ɵɵelementEnd();
|
|
26
|
+
} }
|
|
27
|
+
function MJOProductsPageComponent_For_29_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
28
|
+
i0.ɵɵelementStart(0, "div", 15);
|
|
13
29
|
i0.ɵɵtext(1);
|
|
14
30
|
i0.ɵɵelementEnd();
|
|
15
31
|
} if (rf & 2) {
|
|
16
|
-
const
|
|
32
|
+
const type_r3 = i0.ɵɵnextContext().$implicit;
|
|
17
33
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
18
34
|
i0.ɵɵadvance();
|
|
19
|
-
i0.ɵɵtextInterpolate1("extends ", ctx_r1.shortEntity(
|
|
35
|
+
i0.ɵɵtextInterpolate1("extends ", ctx_r1.shortEntity(type_r3["ProductExtensionEntity"]));
|
|
20
36
|
} }
|
|
21
|
-
function
|
|
37
|
+
function MJOProductsPageComponent_For_29_Template(rf, ctx) { if (rf & 1) {
|
|
22
38
|
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
23
39
|
i0.ɵɵtext(2);
|
|
24
|
-
i0.ɵɵconditionalCreate(3,
|
|
40
|
+
i0.ɵɵconditionalCreate(3, MJOProductsPageComponent_For_29_Conditional_3_Template, 2, 1, "div", 15);
|
|
25
41
|
i0.ɵɵelementEnd();
|
|
26
|
-
i0.ɵɵelementStart(4, "td",
|
|
42
|
+
i0.ɵɵelementStart(4, "td", 16);
|
|
27
43
|
i0.ɵɵtext(5);
|
|
28
44
|
i0.ɵɵelementEnd();
|
|
29
|
-
i0.ɵɵelementStart(6, "td",
|
|
45
|
+
i0.ɵɵelementStart(6, "td", 16);
|
|
30
46
|
i0.ɵɵtext(7);
|
|
31
47
|
i0.ɵɵelementEnd();
|
|
32
|
-
i0.ɵɵelementStart(8, "td",
|
|
48
|
+
i0.ɵɵelementStart(8, "td", 16);
|
|
33
49
|
i0.ɵɵtext(9);
|
|
34
50
|
i0.ɵɵelementEnd()();
|
|
35
51
|
} if (rf & 2) {
|
|
36
|
-
const
|
|
52
|
+
const type_r3 = ctx.$implicit;
|
|
37
53
|
i0.ɵɵadvance(2);
|
|
38
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
54
|
+
i0.ɵɵtextInterpolate1(" ", type_r3["Name"], " ");
|
|
39
55
|
i0.ɵɵadvance();
|
|
40
|
-
i0.ɵɵconditional(
|
|
56
|
+
i0.ɵɵconditional(type_r3["ProductExtensionEntity"] ? 3 : -1);
|
|
41
57
|
i0.ɵɵadvance(2);
|
|
42
|
-
i0.ɵɵtextInterpolate(
|
|
58
|
+
i0.ɵɵtextInterpolate(type_r3["RequiresFulfillment"] ? "yes" : "no");
|
|
43
59
|
i0.ɵɵadvance(2);
|
|
44
|
-
i0.ɵɵtextInterpolate(
|
|
60
|
+
i0.ɵɵtextInterpolate(type_r3["DefaultRevenueRecognitionType"] ?? "\u2014");
|
|
45
61
|
i0.ɵɵadvance(2);
|
|
46
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
62
|
+
i0.ɵɵtextInterpolate1(" ", type_r3["DefaultIsTaxable"] ? type_r3["DefaultTaxCategory"] ?? "yes" : "no", " ");
|
|
47
63
|
} }
|
|
48
|
-
function
|
|
49
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
64
|
+
function MJOProductsPageComponent_ForEmpty_30_Template(rf, ctx) { if (rf & 1) {
|
|
65
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 17);
|
|
50
66
|
i0.ɵɵtext(2, "No product types.");
|
|
51
67
|
i0.ɵɵelementEnd()();
|
|
52
68
|
} }
|
|
53
|
-
function
|
|
69
|
+
function MJOProductsPageComponent_For_54_Template(rf, ctx) { if (rf & 1) {
|
|
54
70
|
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
55
71
|
i0.ɵɵtext(2);
|
|
56
72
|
i0.ɵɵelementEnd();
|
|
57
|
-
i0.ɵɵelementStart(3, "td",
|
|
73
|
+
i0.ɵɵelementStart(3, "td", 18);
|
|
58
74
|
i0.ɵɵtext(4);
|
|
59
75
|
i0.ɵɵelementEnd();
|
|
60
|
-
i0.ɵɵelementStart(5, "td",
|
|
76
|
+
i0.ɵɵelementStart(5, "td", 16);
|
|
61
77
|
i0.ɵɵtext(6);
|
|
62
78
|
i0.ɵɵelementEnd()();
|
|
63
79
|
} if (rf & 2) {
|
|
64
|
-
const
|
|
80
|
+
const category_r4 = ctx.$implicit;
|
|
65
81
|
i0.ɵɵadvance(2);
|
|
66
|
-
i0.ɵɵtextInterpolate(
|
|
82
|
+
i0.ɵɵtextInterpolate(category_r4["Name"]);
|
|
67
83
|
i0.ɵɵadvance(2);
|
|
68
|
-
i0.ɵɵtextInterpolate(
|
|
84
|
+
i0.ɵɵtextInterpolate(category_r4["ParentProductCategory"] ?? "\u2014");
|
|
69
85
|
i0.ɵɵadvance(2);
|
|
70
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
86
|
+
i0.ɵɵtextInterpolate1(" ", category_r4["DefaultIsTaxable"] ? category_r4["DefaultTaxCategory"] ?? "taxable" : "exempt", " ");
|
|
71
87
|
} }
|
|
72
|
-
function
|
|
73
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
88
|
+
function MJOProductsPageComponent_ForEmpty_55_Template(rf, ctx) { if (rf & 1) {
|
|
89
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 19);
|
|
74
90
|
i0.ɵɵtext(2, "No categories.");
|
|
75
91
|
i0.ɵɵelementEnd()();
|
|
76
92
|
} }
|
|
77
93
|
const _forTrack1 = ($index, $item) => $item.Key;
|
|
78
|
-
function
|
|
79
|
-
i0.ɵɵ
|
|
94
|
+
function MJOChargesTaxPageComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
95
|
+
i0.ɵɵelement(0, "mj-entity-viewer", 2);
|
|
96
|
+
} if (rf & 2) {
|
|
97
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
98
|
+
i0.ɵɵproperty("Entity", ctx_r0.ChargeTypeEntityInfo);
|
|
99
|
+
} }
|
|
100
|
+
function MJOChargesTaxPageComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
101
|
+
i0.ɵɵelementStart(0, "div", 3);
|
|
102
|
+
i0.ɵɵtext(1, "Loading charge types...");
|
|
103
|
+
i0.ɵɵelementEnd();
|
|
104
|
+
} }
|
|
105
|
+
function MJOChargesTaxPageComponent_For_35_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
+
i0.ɵɵelementStart(0, "div", 20);
|
|
80
107
|
i0.ɵɵtext(1);
|
|
81
108
|
i0.ɵɵelementEnd();
|
|
82
109
|
} if (rf & 2) {
|
|
83
|
-
const
|
|
110
|
+
const row_r2 = i0.ɵɵnextContext().$implicit;
|
|
84
111
|
i0.ɵɵadvance();
|
|
85
|
-
i0.ɵɵtextInterpolate1("within ",
|
|
112
|
+
i0.ɵɵtextInterpolate1("within ", row_r2.Parent);
|
|
86
113
|
} }
|
|
87
|
-
function
|
|
114
|
+
function MJOChargesTaxPageComponent_For_35_Template(rf, ctx) { if (rf & 1) {
|
|
88
115
|
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
89
116
|
i0.ɵɵtext(2);
|
|
90
|
-
i0.ɵɵconditionalCreate(3,
|
|
117
|
+
i0.ɵɵconditionalCreate(3, MJOChargesTaxPageComponent_For_35_Conditional_3_Template, 2, 1, "div", 20);
|
|
91
118
|
i0.ɵɵelementEnd();
|
|
92
|
-
i0.ɵɵelementStart(4, "td",
|
|
119
|
+
i0.ɵɵelementStart(4, "td", 21);
|
|
93
120
|
i0.ɵɵtext(5);
|
|
94
121
|
i0.ɵɵelementEnd();
|
|
95
|
-
i0.ɵɵelementStart(6, "td",
|
|
122
|
+
i0.ɵɵelementStart(6, "td", 21);
|
|
96
123
|
i0.ɵɵtext(7);
|
|
97
124
|
i0.ɵɵelementEnd();
|
|
98
|
-
i0.ɵɵelementStart(8, "td",
|
|
125
|
+
i0.ɵɵelementStart(8, "td", 11);
|
|
99
126
|
i0.ɵɵtext(9);
|
|
100
127
|
i0.ɵɵelementEnd()();
|
|
101
128
|
} if (rf & 2) {
|
|
102
|
-
const
|
|
129
|
+
const row_r2 = ctx.$implicit;
|
|
103
130
|
i0.ɵɵadvance(2);
|
|
104
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
131
|
+
i0.ɵɵtextInterpolate1(" ", row_r2.Name, " ");
|
|
105
132
|
i0.ɵɵadvance();
|
|
106
|
-
i0.ɵɵconditional(
|
|
133
|
+
i0.ɵɵconditional(row_r2.Parent ? 3 : -1);
|
|
107
134
|
i0.ɵɵadvance(2);
|
|
108
|
-
i0.ɵɵtextInterpolate(
|
|
135
|
+
i0.ɵɵtextInterpolate(row_r2.Where);
|
|
109
136
|
i0.ɵɵadvance(2);
|
|
110
|
-
i0.ɵɵtextInterpolate(
|
|
137
|
+
i0.ɵɵtextInterpolate(row_r2.Category);
|
|
111
138
|
i0.ɵɵadvance(2);
|
|
112
|
-
i0.ɵɵtextInterpolate(
|
|
139
|
+
i0.ɵɵtextInterpolate(row_r2.Rate);
|
|
113
140
|
} }
|
|
114
|
-
function
|
|
115
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
141
|
+
function MJOChargesTaxPageComponent_ForEmpty_36_Template(rf, ctx) { if (rf & 1) {
|
|
142
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 22);
|
|
116
143
|
i0.ɵɵtext(2, "No jurisdictions configured.");
|
|
117
144
|
i0.ɵɵelementEnd()();
|
|
118
145
|
} }
|
|
119
|
-
function
|
|
120
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
146
|
+
function MJOChargesTaxPageComponent_For_58_Template(rf, ctx) { if (rf & 1) {
|
|
147
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 21);
|
|
121
148
|
i0.ɵɵtext(2);
|
|
122
149
|
i0.ɵɵelementEnd();
|
|
123
|
-
i0.ɵɵelementStart(3, "td",
|
|
150
|
+
i0.ɵɵelementStart(3, "td", 21);
|
|
124
151
|
i0.ɵɵtext(4);
|
|
125
152
|
i0.ɵɵelementEnd();
|
|
126
|
-
i0.ɵɵelementStart(5, "td",
|
|
153
|
+
i0.ɵɵelementStart(5, "td", 21);
|
|
127
154
|
i0.ɵɵtext(6);
|
|
128
155
|
i0.ɵɵelementEnd();
|
|
129
|
-
i0.ɵɵelementStart(7, "td")(8, "span",
|
|
156
|
+
i0.ɵɵelementStart(7, "td")(8, "span", 23);
|
|
130
157
|
i0.ɵɵtext(9);
|
|
131
158
|
i0.ɵɵelementEnd()()();
|
|
132
159
|
} if (rf & 2) {
|
|
133
|
-
const
|
|
134
|
-
const
|
|
160
|
+
const row_r3 = ctx.$implicit;
|
|
161
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
135
162
|
i0.ɵɵadvance(2);
|
|
136
|
-
i0.ɵɵtextInterpolate(
|
|
163
|
+
i0.ɵɵtextInterpolate(row_r3["Company"] ?? "\u2014");
|
|
137
164
|
i0.ɵɵadvance(2);
|
|
138
|
-
i0.ɵɵtextInterpolate(
|
|
165
|
+
i0.ɵɵtextInterpolate(row_r3["TaxJurisdiction"] ?? "\u2014");
|
|
139
166
|
i0.ɵɵadvance(2);
|
|
140
|
-
i0.ɵɵtextInterpolate(
|
|
167
|
+
i0.ɵɵtextInterpolate(row_r3["NexusType"] ?? "\u2014");
|
|
141
168
|
i0.ɵɵadvance(2);
|
|
142
|
-
i0.ɵɵclassMap(
|
|
169
|
+
i0.ɵɵclassMap(ctx_r0.nexusClass(row_r3));
|
|
143
170
|
i0.ɵɵadvance();
|
|
144
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
171
|
+
i0.ɵɵtextInterpolate1(" ", row_r3["Status"] ?? "\u2014", " ");
|
|
145
172
|
} }
|
|
146
|
-
function
|
|
147
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
173
|
+
function MJOChargesTaxPageComponent_ForEmpty_59_Template(rf, ctx) { if (rf & 1) {
|
|
174
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 22);
|
|
148
175
|
i0.ɵɵtext(2, "No registrations.");
|
|
149
176
|
i0.ɵɵelementEnd()();
|
|
150
177
|
} }
|
|
151
|
-
function
|
|
152
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
178
|
+
function MJOChargesTaxPageComponent_For_90_Template(rf, ctx) { if (rf & 1) {
|
|
179
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 21);
|
|
153
180
|
i0.ɵɵtext(2);
|
|
154
181
|
i0.ɵɵelementEnd();
|
|
155
|
-
i0.ɵɵelementStart(3, "td",
|
|
182
|
+
i0.ɵɵelementStart(3, "td", 21);
|
|
156
183
|
i0.ɵɵtext(4);
|
|
157
184
|
i0.ɵɵelementEnd();
|
|
158
|
-
i0.ɵɵelementStart(5, "td",
|
|
185
|
+
i0.ɵɵelementStart(5, "td", 21);
|
|
159
186
|
i0.ɵɵtext(6);
|
|
160
187
|
i0.ɵɵelementEnd();
|
|
161
|
-
i0.ɵɵelementStart(7, "td",
|
|
188
|
+
i0.ɵɵelementStart(7, "td", 24);
|
|
162
189
|
i0.ɵɵtext(8);
|
|
163
190
|
i0.ɵɵelementEnd();
|
|
164
|
-
i0.ɵɵelementStart(9, "td",
|
|
191
|
+
i0.ɵɵelementStart(9, "td", 21);
|
|
165
192
|
i0.ɵɵtext(10);
|
|
166
193
|
i0.ɵɵelementEnd();
|
|
167
|
-
i0.ɵɵelementStart(11, "td")(12, "span",
|
|
194
|
+
i0.ɵɵelementStart(11, "td")(12, "span", 23);
|
|
168
195
|
i0.ɵɵtext(13);
|
|
169
196
|
i0.ɵɵelementEnd()()();
|
|
170
197
|
} if (rf & 2) {
|
|
171
198
|
const row_r4 = ctx.$implicit;
|
|
172
|
-
const
|
|
199
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
173
200
|
i0.ɵɵadvance(2);
|
|
174
201
|
i0.ɵɵtextInterpolate(row_r4["Organization"] ?? row_r4["Person"] ?? "\u2014");
|
|
175
202
|
i0.ɵɵadvance(2);
|
|
176
|
-
i0.ɵɵtextInterpolate(
|
|
203
|
+
i0.ɵɵtextInterpolate(ctx_r0.jurisdictionOf(row_r4));
|
|
177
204
|
i0.ɵɵadvance(2);
|
|
178
205
|
i0.ɵɵtextInterpolate(row_r4["TaxCategory"] ?? "all");
|
|
179
206
|
i0.ɵɵadvance(2);
|
|
180
207
|
i0.ɵɵtextInterpolate(row_r4["CertificateRef"] ?? "\u2014");
|
|
181
208
|
i0.ɵɵadvance(2);
|
|
182
|
-
i0.ɵɵtextInterpolate(
|
|
209
|
+
i0.ɵɵtextInterpolate(ctx_r0.dateOf(row_r4["CertificateExpiresAt"]));
|
|
183
210
|
i0.ɵɵadvance(2);
|
|
184
|
-
i0.ɵɵclassMap(
|
|
211
|
+
i0.ɵɵclassMap(ctx_r0.exemptionClass(row_r4));
|
|
185
212
|
i0.ɵɵadvance();
|
|
186
213
|
i0.ɵɵtextInterpolate1(" ", row_r4["Status"] ?? "\u2014", " ");
|
|
187
214
|
} }
|
|
188
|
-
function
|
|
189
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
215
|
+
function MJOChargesTaxPageComponent_ForEmpty_91_Template(rf, ctx) { if (rf & 1) {
|
|
216
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 25);
|
|
190
217
|
i0.ɵɵtext(2, "No exemption certificates.");
|
|
191
218
|
i0.ɵɵelementEnd()();
|
|
192
219
|
} }
|
|
@@ -210,144 +237,97 @@ function MJOChargesTaxPageComponent_ForEmpty_89_Template(rf, ctx) { if (rf & 1)
|
|
|
210
237
|
* ```
|
|
211
238
|
*/
|
|
212
239
|
export class MJOProductsPageComponent {
|
|
213
|
-
/**
|
|
214
|
-
* Render what was just loaded.
|
|
215
|
-
*
|
|
216
|
-
* These pages are created imperatively by the section shell through
|
|
217
|
-
* `ViewContainerRef.createComponent`. When an async load assigns across
|
|
218
|
-
* Angular's check/verify boundary, dev mode raises NG0100 and ABORTS the DOM
|
|
219
|
-
* write. Nothing re-renders afterwards, so the recorded "previous" value stays
|
|
220
|
-
* pre-load while the getter returns the loaded one — the mismatch then repeats
|
|
221
|
-
* on every tick and the view is frozen for good. It is not a flicker: the
|
|
222
|
-
* Orders dashboard sat at "0 open orders / $0.00" against 73 real orders, and
|
|
223
|
-
* read as a quiet day rather than a broken screen.
|
|
224
|
-
*
|
|
225
|
-
* Writing the DOM here ends it: the rendered value matches the getter from the
|
|
226
|
-
* first pass on, so later verify passes agree.
|
|
227
|
-
*/
|
|
228
240
|
cdr = inject(ChangeDetectorRef);
|
|
229
241
|
ProductOpened = new EventEmitter();
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
{ Key: 'SKU', Label: 'SKU', Kind: 'mono', Width: '120px' },
|
|
234
|
-
{ Key: 'Name', Label: 'Product', Secondary: (r) => r.ProductCategory ?? null },
|
|
235
|
-
{ Key: 'ProductType', Label: 'Type', Width: '140px' },
|
|
236
|
-
{ Key: 'Company', Label: 'Company', Width: '150px', HideBelow: 1000 },
|
|
237
|
-
{
|
|
238
|
-
Key: 'Behaviour',
|
|
239
|
-
Label: 'Behaviour',
|
|
240
|
-
HideBelow: 760,
|
|
241
|
-
// What this product will DO to an order, which is the reason to look at
|
|
242
|
-
// this screen at all.
|
|
243
|
-
Format: (r) => {
|
|
244
|
-
const traits = [];
|
|
245
|
-
if (r.SubscriptionTypeID)
|
|
246
|
-
traits.push('subscription');
|
|
247
|
-
return traits.length ? traits.join(' · ') : '—';
|
|
248
|
-
},
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
Key: 'Status',
|
|
252
|
-
Label: 'Status',
|
|
253
|
-
Kind: 'chip',
|
|
254
|
-
Width: '100px',
|
|
255
|
-
ChipClass: (r) => r.Status === 'Active'
|
|
256
|
-
? 'mj-chip--success'
|
|
257
|
-
: r.Status === 'Draft'
|
|
258
|
-
? ''
|
|
259
|
-
: 'mj-chip--outline',
|
|
260
|
-
},
|
|
261
|
-
];
|
|
242
|
+
ProductEntityInfo = null;
|
|
243
|
+
Categories = [];
|
|
244
|
+
Types = [];
|
|
262
245
|
async ngOnInit() {
|
|
263
|
-
|
|
246
|
+
const md = new Metadata();
|
|
247
|
+
this.ProductEntityInfo = md.Entities.find((e) => e.Name === MJO_ENTITIES.Product) || null;
|
|
264
248
|
this.cdr.detectChanges();
|
|
265
249
|
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
250
|
+
OnRecordOpened(event) {
|
|
251
|
+
const id = (event.compositeKey?.GetValueByFieldName('ID') ?? event.record?.['ID']);
|
|
252
|
+
if (id) {
|
|
253
|
+
const surrogate = { ID: id };
|
|
254
|
+
this.ProductOpened.emit(surrogate);
|
|
255
|
+
}
|
|
270
256
|
}
|
|
271
|
-
Categories = [];
|
|
272
|
-
Types = [];
|
|
273
257
|
/** 'MJ_BizApps_Orders: Event Products' → 'Event Products'. */
|
|
274
258
|
shortEntity(name) {
|
|
275
259
|
return String(name ?? '').split(':').pop()?.trim() ?? '';
|
|
276
260
|
}
|
|
277
|
-
async load() {
|
|
278
|
-
this.Rows = await GetProducts({ Search: this.Search });
|
|
279
|
-
this.cdr.detectChanges();
|
|
280
|
-
}
|
|
281
261
|
static ɵfac = function MJOProductsPageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJOProductsPageComponent)(); };
|
|
282
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJOProductsPageComponent, selectors: [["mjo-products-page"]], outputs: { ProductOpened: "ProductOpened" }, decls:
|
|
262
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJOProductsPageComponent, selectors: [["mjo-products-page"]], outputs: { ProductOpened: "ProductOpened" }, decls: 62, vars: 5, consts: [["Variant", "info", "Icon", "fa-solid fa-sitemap", 1, "mjo-cat__note"], [1, "mjo-products-viewer-container"], [3, "Entity"], [1, "small", "muted", 2, "padding", "24px"], [1, "mjo-cat__grid"], [1, "mj-card"], [1, "mj-card-head"], ["aria-hidden", "true", 1, "fa-solid", "fa-layer-group"], [1, "right", "small", "muted"], [1, "mj-table-wrap"], [1, "mj-table", "mj-table--compact"], [1, "mj-card-pad", "small", "muted"], ["aria-hidden", "true", 1, "fa-solid", "fa-folder-tree"], ["Variant", "info", "Icon", "fa-solid fa-puzzle-piece", 1, "mjo-cat__block"], [3, "RecordOpened", "Entity"], [1, "secondary"], [1, "small"], ["colspan", "4", 1, "small", "muted"], [1, "small", "muted"], ["colspan", "3", 1, "small", "muted"]], template: function MJOProductsPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
283
263
|
i0.ɵɵelementStart(0, "mj-alert", 0)(1, "strong");
|
|
284
264
|
i0.ɵɵtext(2, "The catalog is the behaviour root.");
|
|
285
265
|
i0.ɵɵelementEnd();
|
|
286
266
|
i0.ɵɵtext(3, " A product's type decides recognition, taxability, fulfillment and recurrence, and every order line inherits those answers \u2014 which is why an order screen never asks for them again. ");
|
|
287
267
|
i0.ɵɵelementEnd();
|
|
288
|
-
i0.ɵɵelementStart(4, "
|
|
289
|
-
i0.ɵɵ
|
|
268
|
+
i0.ɵɵelementStart(4, "div", 1);
|
|
269
|
+
i0.ɵɵconditionalCreate(5, MJOProductsPageComponent_Conditional_5_Template, 1, 1, "mj-entity-viewer", 2)(6, MJOProductsPageComponent_Conditional_6_Template, 2, 0, "div", 3);
|
|
290
270
|
i0.ɵɵelementEnd();
|
|
291
|
-
i0.ɵɵelementStart(
|
|
292
|
-
i0.ɵɵelement(
|
|
293
|
-
i0.ɵɵelementStart(
|
|
294
|
-
i0.ɵɵtext(
|
|
271
|
+
i0.ɵɵelementStart(7, "div", 4)(8, "div", 5)(9, "div", 6);
|
|
272
|
+
i0.ɵɵelement(10, "i", 7);
|
|
273
|
+
i0.ɵɵelementStart(11, "h3");
|
|
274
|
+
i0.ɵɵtext(12, "Product types");
|
|
295
275
|
i0.ɵɵelementEnd();
|
|
296
|
-
i0.ɵɵelementStart(
|
|
297
|
-
i0.ɵɵtext(
|
|
276
|
+
i0.ɵɵelementStart(13, "span", 8);
|
|
277
|
+
i0.ɵɵtext(14);
|
|
298
278
|
i0.ɵɵelementEnd()();
|
|
299
|
-
i0.ɵɵelementStart(
|
|
300
|
-
i0.ɵɵtext(
|
|
301
|
-
i0.ɵɵelementEnd();
|
|
302
|
-
i0.ɵɵelementStart(19, "th");
|
|
303
|
-
i0.ɵɵtext(20, "Ships");
|
|
279
|
+
i0.ɵɵelementStart(15, "div", 9)(16, "table", 10)(17, "thead")(18, "tr")(19, "th");
|
|
280
|
+
i0.ɵɵtext(20, "Type");
|
|
304
281
|
i0.ɵɵelementEnd();
|
|
305
282
|
i0.ɵɵelementStart(21, "th");
|
|
306
|
-
i0.ɵɵtext(22, "
|
|
283
|
+
i0.ɵɵtext(22, "Ships");
|
|
307
284
|
i0.ɵɵelementEnd();
|
|
308
285
|
i0.ɵɵelementStart(23, "th");
|
|
309
|
-
i0.ɵɵtext(24, "
|
|
286
|
+
i0.ɵɵtext(24, "Recognition");
|
|
287
|
+
i0.ɵɵelementEnd();
|
|
288
|
+
i0.ɵɵelementStart(25, "th");
|
|
289
|
+
i0.ɵɵtext(26, "Taxable");
|
|
310
290
|
i0.ɵɵelementEnd()()();
|
|
311
|
-
i0.ɵɵelementStart(
|
|
312
|
-
i0.ɵɵrepeaterCreate(
|
|
291
|
+
i0.ɵɵelementStart(27, "tbody");
|
|
292
|
+
i0.ɵɵrepeaterCreate(28, MJOProductsPageComponent_For_29_Template, 10, 5, "tr", null, _forTrack0, false, MJOProductsPageComponent_ForEmpty_30_Template, 3, 0, "tr");
|
|
313
293
|
i0.ɵɵelementEnd()()();
|
|
314
|
-
i0.ɵɵelementStart(
|
|
315
|
-
i0.ɵɵtext(
|
|
294
|
+
i0.ɵɵelementStart(31, "div", 11)(32, "b");
|
|
295
|
+
i0.ɵɵtext(33, "What a type decides:");
|
|
316
296
|
i0.ɵɵelementEnd();
|
|
317
|
-
i0.ɵɵtext(
|
|
297
|
+
i0.ɵɵtext(34, " whether a line ships, how its revenue is recognised, whether it is taxable, and whether it recurs. A product inherits all four and may override any \u2014 so a line never has to be asked. ");
|
|
318
298
|
i0.ɵɵelementEnd()();
|
|
319
|
-
i0.ɵɵelementStart(
|
|
320
|
-
i0.ɵɵelement(
|
|
321
|
-
i0.ɵɵelementStart(
|
|
322
|
-
i0.ɵɵtext(
|
|
299
|
+
i0.ɵɵelementStart(35, "div", 5)(36, "div", 6);
|
|
300
|
+
i0.ɵɵelement(37, "i", 12);
|
|
301
|
+
i0.ɵɵelementStart(38, "h3");
|
|
302
|
+
i0.ɵɵtext(39, "Categories");
|
|
323
303
|
i0.ɵɵelementEnd();
|
|
324
|
-
i0.ɵɵelementStart(
|
|
325
|
-
i0.ɵɵtext(
|
|
304
|
+
i0.ɵɵelementStart(40, "span", 8);
|
|
305
|
+
i0.ɵɵtext(41);
|
|
326
306
|
i0.ɵɵelementEnd()();
|
|
327
|
-
i0.ɵɵelementStart(
|
|
328
|
-
i0.ɵɵtext(
|
|
329
|
-
i0.ɵɵelementEnd();
|
|
330
|
-
i0.ɵɵelementStart(46, "th");
|
|
331
|
-
i0.ɵɵtext(47, "Within");
|
|
307
|
+
i0.ɵɵelementStart(42, "div", 9)(43, "table", 10)(44, "thead")(45, "tr")(46, "th");
|
|
308
|
+
i0.ɵɵtext(47, "Category");
|
|
332
309
|
i0.ɵɵelementEnd();
|
|
333
310
|
i0.ɵɵelementStart(48, "th");
|
|
334
|
-
i0.ɵɵtext(49, "
|
|
311
|
+
i0.ɵɵtext(49, "Within");
|
|
312
|
+
i0.ɵɵelementEnd();
|
|
313
|
+
i0.ɵɵelementStart(50, "th");
|
|
314
|
+
i0.ɵɵtext(51, "Default tax");
|
|
335
315
|
i0.ɵɵelementEnd()()();
|
|
336
|
-
i0.ɵɵelementStart(
|
|
337
|
-
i0.ɵɵrepeaterCreate(
|
|
316
|
+
i0.ɵɵelementStart(52, "tbody");
|
|
317
|
+
i0.ɵɵrepeaterCreate(53, MJOProductsPageComponent_For_54_Template, 7, 3, "tr", null, _forTrack0, false, MJOProductsPageComponent_ForEmpty_55_Template, 3, 0, "tr");
|
|
338
318
|
i0.ɵɵelementEnd()()();
|
|
339
|
-
i0.ɵɵelementStart(
|
|
340
|
-
i0.ɵɵtext(
|
|
319
|
+
i0.ɵɵelementStart(56, "div", 11);
|
|
320
|
+
i0.ɵɵtext(57, " Categories group for reporting and supply defaults. They do NOT decide behaviour \u2014 that is the type's job. Keeping the two apart is what stops a reporting change from altering how something is taxed. ");
|
|
341
321
|
i0.ɵɵelementEnd()()();
|
|
342
|
-
i0.ɵɵelementStart(
|
|
343
|
-
i0.ɵɵtext(
|
|
322
|
+
i0.ɵɵelementStart(58, "mj-alert", 13)(59, "strong");
|
|
323
|
+
i0.ɵɵtext(60, "Type extensions carry what only that type needs.");
|
|
344
324
|
i0.ɵɵelementEnd();
|
|
345
|
-
i0.ɵɵtext(
|
|
325
|
+
i0.ɵɵtext(61, " An event has a venue and a date; a subscription has a term length. Rather than a products table with columns most rows leave null, a type names an extension entity and the extra facts live there. The order line gets a matching extension, so a line selling a ticket can hold ticket facts without every other line pretending to. ");
|
|
346
326
|
i0.ɵɵelementEnd();
|
|
347
327
|
} if (rf & 2) {
|
|
348
|
-
i0.ɵɵadvance(
|
|
349
|
-
i0.ɵɵ
|
|
350
|
-
i0.ɵɵadvance(
|
|
328
|
+
i0.ɵɵadvance(5);
|
|
329
|
+
i0.ɵɵconditional(ctx.ProductEntityInfo ? 5 : 6);
|
|
330
|
+
i0.ɵɵadvance(9);
|
|
351
331
|
i0.ɵɵtextInterpolate(ctx.Types.length);
|
|
352
332
|
i0.ɵɵadvance(14);
|
|
353
333
|
i0.ɵɵrepeater(ctx.Types);
|
|
@@ -355,11 +335,11 @@ export class MJOProductsPageComponent {
|
|
|
355
335
|
i0.ɵɵtextInterpolate(ctx.Categories.length);
|
|
356
336
|
i0.ɵɵadvance(12);
|
|
357
337
|
i0.ɵɵrepeater(ctx.Categories);
|
|
358
|
-
} }, dependencies: [CommonModule,
|
|
338
|
+
} }, dependencies: [CommonModule, MJAlertComponent, EntityViewerModule, i1.EntityViewerComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n height: 100%;\n overflow: auto;\n padding: var(--mj-space-6);\n }\n .mjo-products-viewer-container[_ngcontent-%COMP%] {\n height: 600px;\n min-height: 500px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n mj-entity-viewer[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n }\n .mjo-cat__note[_ngcontent-%COMP%] { margin-bottom: var(--mj-space-4); }\n .mjo-cat__grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-4);\n margin-top: var(--mj-space-4);\n }\n .mjo-cat__block[_ngcontent-%COMP%] { margin-top: var(--mj-space-4); }\n @media (max-width: 1000px) {\n .mjo-cat__grid[_ngcontent-%COMP%] { grid-template-columns: 1fr; }\n }\n @media (max-width: 760px) {\n [_nghost-%COMP%] { padding: var(--mj-space-4); }\n }"] });
|
|
359
339
|
}
|
|
360
340
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJOProductsPageComponent, [{
|
|
361
341
|
type: Component,
|
|
362
|
-
args: [{ selector: 'mjo-products-page', standalone: true, imports: [CommonModule,
|
|
342
|
+
args: [{ selector: 'mjo-products-page', standalone: true, imports: [CommonModule, MJAlertComponent, EntityViewerModule], template: `
|
|
363
343
|
<mj-alert Variant="info" Icon="fa-solid fa-sitemap" class="mjo-cat__note">
|
|
364
344
|
<strong>The catalog is the behaviour root.</strong>
|
|
365
345
|
A product's type decides recognition, taxability, fulfillment and recurrence, and every
|
|
@@ -367,18 +347,16 @@ export class MJOProductsPageComponent {
|
|
|
367
347
|
again.
|
|
368
348
|
</mj-alert>
|
|
369
349
|
|
|
370
|
-
<mjo-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
(SearchChanged)="OnSearch($event)"
|
|
381
|
-
(RowClicked)="ProductOpened.emit($any($event))" />
|
|
350
|
+
<div class="mjo-products-viewer-container">
|
|
351
|
+
@if (ProductEntityInfo) {
|
|
352
|
+
<mj-entity-viewer
|
|
353
|
+
[Entity]="ProductEntityInfo"
|
|
354
|
+
(RecordOpened)="OnRecordOpened($event)">
|
|
355
|
+
</mj-entity-viewer>
|
|
356
|
+
} @else {
|
|
357
|
+
<div class="small muted" style="padding: 24px;">Loading products...</div>
|
|
358
|
+
}
|
|
359
|
+
</div>
|
|
382
360
|
|
|
383
361
|
<div class="mjo-cat__grid">
|
|
384
362
|
<div class="mj-card">
|
|
@@ -466,11 +444,11 @@ export class MJOProductsPageComponent {
|
|
|
466
444
|
and the extra facts live there. The order line gets a matching extension, so a line
|
|
467
445
|
selling a ticket can hold ticket facts without every other line pretending to.
|
|
468
446
|
</mj-alert>
|
|
469
|
-
`, styles: ["\n :host {\n display: block;\n height: 100%;\n overflow: auto;\n padding: var(--mj-space-6);\n }\n .mjo-cat__note { margin-bottom: var(--mj-space-4); }\n .mjo-cat__grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-4);\n margin-top: var(--mj-space-4);\n }\n .mjo-cat__block { margin-top: var(--mj-space-4); }\n @media (max-width: 1000px) {\n .mjo-cat__grid { grid-template-columns: 1fr; }\n }\n @media (max-width: 760px) {\n :host { padding: var(--mj-space-4); }\n }\n "] }]
|
|
447
|
+
`, styles: ["\n :host {\n display: block;\n height: 100%;\n overflow: auto;\n padding: var(--mj-space-6);\n }\n .mjo-products-viewer-container {\n height: 600px;\n min-height: 500px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n display: flex;\n flex-direction: column;\n }\n mj-entity-viewer {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n }\n .mjo-cat__note { margin-bottom: var(--mj-space-4); }\n .mjo-cat__grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-4);\n margin-top: var(--mj-space-4);\n }\n .mjo-cat__block { margin-top: var(--mj-space-4); }\n @media (max-width: 1000px) {\n .mjo-cat__grid { grid-template-columns: 1fr; }\n }\n @media (max-width: 760px) {\n :host { padding: var(--mj-space-4); }\n }\n "] }]
|
|
470
448
|
}], null, { ProductOpened: [{
|
|
471
449
|
type: Output
|
|
472
450
|
}] }); })();
|
|
473
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJOProductsPageComponent, { className: "MJOProductsPageComponent", filePath: "lib/pages/catalog/products.page.ts", lineNumber:
|
|
451
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJOProductsPageComponent, { className: "MJOProductsPageComponent", filePath: "lib/pages/catalog/products.page.ts", lineNumber: 189 }); })();
|
|
474
452
|
/**
|
|
475
453
|
* `mjo-charges-tax-page` — shipping, handling and tax as one mechanism.
|
|
476
454
|
*
|
|
@@ -490,55 +468,16 @@ export class MJOProductsPageComponent {
|
|
|
490
468
|
* ```
|
|
491
469
|
*/
|
|
492
470
|
export class MJOChargesTaxPageComponent {
|
|
493
|
-
/**
|
|
494
|
-
* Render what was just loaded. See orders-dashboard.page.ts for the full
|
|
495
|
-
* reasoning: these pages are created imperatively by the section shell, and an
|
|
496
|
-
* async assignment across Angular's check/verify boundary raises NG0100, aborts
|
|
497
|
-
* the DOM write, and freezes the view on its pre-load values permanently.
|
|
498
|
-
*/
|
|
499
471
|
cdr = inject(ChangeDetectorRef);
|
|
472
|
+
ChargeTypeEntityInfo = null;
|
|
500
473
|
Rows = [];
|
|
501
|
-
Columns = [
|
|
502
|
-
{ Key: 'Sequence', Label: 'Seq', Kind: 'number', Width: '70px' },
|
|
503
|
-
{ Key: 'Name', Label: 'Charge type', Secondary: (r) => r['Description'] ?? null },
|
|
504
|
-
{ Key: 'Basis', Label: 'Basis', Width: '190px' },
|
|
505
|
-
{
|
|
506
|
-
// Tax-ness is the CATEGORY, not a boolean. `IsTax` is not a column on
|
|
507
|
-
// this entity, so both this chip and the column below read undefined
|
|
508
|
-
// and every row claimed to be an ordinary charge that enlarges the tax
|
|
509
|
-
// base — the exact opposite of the truth for the tax rows.
|
|
510
|
-
Key: 'Category',
|
|
511
|
-
Label: 'Kind',
|
|
512
|
-
Kind: 'chip',
|
|
513
|
-
Width: '100px',
|
|
514
|
-
Format: (r) => (r['Category'] === 'Tax' ? 'tax' : 'charge'),
|
|
515
|
-
ChipClass: (r) => (r['Category'] === 'Tax' ? 'mj-chip--info' : 'mj-chip--outline'),
|
|
516
|
-
},
|
|
517
|
-
{
|
|
518
|
-
Key: 'EnlargesBase',
|
|
519
|
-
Label: 'Enlarges tax base',
|
|
520
|
-
Width: '160px',
|
|
521
|
-
HideBelow: 760,
|
|
522
|
-
// The single most consequential flag on this screen: a tax never
|
|
523
|
-
// enlarges the base another tax is computed on, so taxes cannot compound.
|
|
524
|
-
Format: (r) => (r['Category'] === 'Tax' ? 'no — never compounds' : 'yes'),
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
Key: 'IsActive',
|
|
528
|
-
Label: 'Active',
|
|
529
|
-
Kind: 'chip',
|
|
530
|
-
Width: '96px',
|
|
531
|
-
Format: (r) => (r['IsActive'] === false ? 'Off' : 'Active'),
|
|
532
|
-
ChipClass: (r) => (r['IsActive'] === false ? '' : 'mj-chip--success'),
|
|
533
|
-
},
|
|
534
|
-
];
|
|
535
474
|
Jurisdictions = [];
|
|
536
475
|
Rates = [];
|
|
537
476
|
Nexus = [];
|
|
538
477
|
Exemptions = [];
|
|
539
478
|
async ngOnInit() {
|
|
540
|
-
|
|
541
|
-
|
|
479
|
+
const md = new Metadata();
|
|
480
|
+
this.ChargeTypeEntityInfo = md.Entities.find((e) => e.Name === MJO_ENTITIES.ChargeType) || null;
|
|
542
481
|
const [rows, jurisdictions, rates, nexus, exemptions] = await Promise.all([
|
|
543
482
|
GetChargeTypes(),
|
|
544
483
|
GetTaxJurisdictions(),
|
|
@@ -630,7 +569,7 @@ export class MJOChargesTaxPageComponent {
|
|
|
630
569
|
return row['Status'] === 'Active' ? 'mj-chip--success' : 'mj-chip--outline';
|
|
631
570
|
}
|
|
632
571
|
static ɵfac = function MJOChargesTaxPageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJOChargesTaxPageComponent)(); };
|
|
633
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJOChargesTaxPageComponent, selectors: [["mjo-charges-tax-page"]], decls:
|
|
572
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJOChargesTaxPageComponent, selectors: [["mjo-charges-tax-page"]], decls: 107, vars: 6, consts: [["Variant", "info", "Icon", "fa-solid fa-layer-group", 1, "mjo-cat__note"], [1, "mjo-tax__viewer-host"], [3, "Entity"], [1, "small", "muted", 2, "padding", "24px"], [1, "mjo-tax__grid"], [1, "mj-card"], [1, "mj-card-head"], ["aria-hidden", "true", 1, "fa-solid", "fa-percent"], [1, "right", "small", "muted"], [1, "mj-table-wrap"], [1, "mj-table", "mj-table--compact"], [1, "num"], [1, "mj-card-pad", "small", "muted"], ["aria-hidden", "true", 1, "fa-solid", "fa-building-columns"], [1, "mj-card", "mjo-tax__block"], ["aria-hidden", "true", 1, "fa-solid", "fa-file-shield"], [1, "mjo-tax__grid", "mjo-tax__block"], ["Variant", "info", "Icon", "fa-solid fa-sitemap"], ["Variant", "info", "Icon", "fa-solid fa-pen"], ["Variant", "info", "Icon", "fa-solid fa-check-double", 1, "mjo-tax__block"], [1, "secondary"], [1, "small"], ["colspan", "4", 1, "small", "muted"], [1, "mj-chip"], [1, "small", "mono"], ["colspan", "6", 1, "small", "muted"]], template: function MJOChargesTaxPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
634
573
|
i0.ɵɵelementStart(0, "mj-alert", 0)(1, "strong");
|
|
635
574
|
i0.ɵɵtext(2, "Tax is a charge.");
|
|
636
575
|
i0.ɵɵelementEnd();
|
|
@@ -644,111 +583,113 @@ export class MJOChargesTaxPageComponent {
|
|
|
644
583
|
i0.ɵɵelementEnd();
|
|
645
584
|
i0.ɵɵtext(9, " decides what it computes on. ");
|
|
646
585
|
i0.ɵɵelementEnd();
|
|
647
|
-
i0.ɵɵ
|
|
648
|
-
i0.ɵɵ
|
|
649
|
-
i0.ɵɵelement(14, "i", 5);
|
|
650
|
-
i0.ɵɵelementStart(15, "h3");
|
|
651
|
-
i0.ɵɵtext(16, "Jurisdiction layers");
|
|
586
|
+
i0.ɵɵelementStart(10, "div", 1);
|
|
587
|
+
i0.ɵɵconditionalCreate(11, MJOChargesTaxPageComponent_Conditional_11_Template, 1, 1, "mj-entity-viewer", 2)(12, MJOChargesTaxPageComponent_Conditional_12_Template, 2, 0, "div", 3);
|
|
652
588
|
i0.ɵɵelementEnd();
|
|
653
|
-
i0.ɵɵelementStart(
|
|
654
|
-
i0.ɵɵ
|
|
655
|
-
i0.ɵɵ
|
|
656
|
-
i0.ɵɵ
|
|
657
|
-
i0.ɵɵtext(24, "Jurisdiction");
|
|
589
|
+
i0.ɵɵelementStart(13, "div", 4)(14, "div", 5)(15, "div", 6);
|
|
590
|
+
i0.ɵɵelement(16, "i", 7);
|
|
591
|
+
i0.ɵɵelementStart(17, "h3");
|
|
592
|
+
i0.ɵɵtext(18, "Jurisdiction layers");
|
|
658
593
|
i0.ɵɵelementEnd();
|
|
659
|
-
i0.ɵɵelementStart(
|
|
660
|
-
i0.ɵɵtext(
|
|
594
|
+
i0.ɵɵelementStart(19, "span", 8);
|
|
595
|
+
i0.ɵɵtext(20);
|
|
596
|
+
i0.ɵɵelementEnd()();
|
|
597
|
+
i0.ɵɵelementStart(21, "div", 9)(22, "table", 10)(23, "thead")(24, "tr")(25, "th");
|
|
598
|
+
i0.ɵɵtext(26, "Jurisdiction");
|
|
661
599
|
i0.ɵɵelementEnd();
|
|
662
600
|
i0.ɵɵelementStart(27, "th");
|
|
663
|
-
i0.ɵɵtext(28, "
|
|
601
|
+
i0.ɵɵtext(28, "Where");
|
|
602
|
+
i0.ɵɵelementEnd();
|
|
603
|
+
i0.ɵɵelementStart(29, "th");
|
|
604
|
+
i0.ɵɵtext(30, "Category");
|
|
664
605
|
i0.ɵɵelementEnd();
|
|
665
|
-
i0.ɵɵelementStart(
|
|
666
|
-
i0.ɵɵtext(
|
|
606
|
+
i0.ɵɵelementStart(31, "th", 11);
|
|
607
|
+
i0.ɵɵtext(32, "Rate");
|
|
667
608
|
i0.ɵɵelementEnd()()();
|
|
668
|
-
i0.ɵɵelementStart(
|
|
669
|
-
i0.ɵɵrepeaterCreate(
|
|
609
|
+
i0.ɵɵelementStart(33, "tbody");
|
|
610
|
+
i0.ɵɵrepeaterCreate(34, MJOChargesTaxPageComponent_For_35_Template, 10, 5, "tr", null, _forTrack1, false, MJOChargesTaxPageComponent_ForEmpty_36_Template, 3, 0, "tr");
|
|
670
611
|
i0.ɵɵelementEnd()()();
|
|
671
|
-
i0.ɵɵelementStart(
|
|
672
|
-
i0.ɵɵtext(
|
|
612
|
+
i0.ɵɵelementStart(37, "div", 12);
|
|
613
|
+
i0.ɵɵtext(38, " State, county and city are three ROWS, not one blended rate. Layering them separately is what lets a return be filed per authority \u2014 a single 8.25% cannot be split back apart afterwards. ");
|
|
673
614
|
i0.ɵɵelementEnd()();
|
|
674
|
-
i0.ɵɵelementStart(
|
|
675
|
-
i0.ɵɵelement(
|
|
676
|
-
i0.ɵɵelementStart(
|
|
677
|
-
i0.ɵɵtext(
|
|
615
|
+
i0.ɵɵelementStart(39, "div", 5)(40, "div", 6);
|
|
616
|
+
i0.ɵɵelement(41, "i", 13);
|
|
617
|
+
i0.ɵɵelementStart(42, "h3");
|
|
618
|
+
i0.ɵɵtext(43, "Nexus \u2014 where we must collect");
|
|
678
619
|
i0.ɵɵelementEnd()();
|
|
679
|
-
i0.ɵɵelementStart(
|
|
680
|
-
i0.ɵɵtext(
|
|
681
|
-
i0.ɵɵelementEnd();
|
|
682
|
-
i0.ɵɵelementStart(48, "th");
|
|
683
|
-
i0.ɵɵtext(49, "Jurisdiction");
|
|
620
|
+
i0.ɵɵelementStart(44, "div", 9)(45, "table", 10)(46, "thead")(47, "tr")(48, "th");
|
|
621
|
+
i0.ɵɵtext(49, "Company");
|
|
684
622
|
i0.ɵɵelementEnd();
|
|
685
623
|
i0.ɵɵelementStart(50, "th");
|
|
686
|
-
i0.ɵɵtext(51, "
|
|
624
|
+
i0.ɵɵtext(51, "Jurisdiction");
|
|
687
625
|
i0.ɵɵelementEnd();
|
|
688
626
|
i0.ɵɵelementStart(52, "th");
|
|
689
|
-
i0.ɵɵtext(53, "
|
|
627
|
+
i0.ɵɵtext(53, "Type");
|
|
628
|
+
i0.ɵɵelementEnd();
|
|
629
|
+
i0.ɵɵelementStart(54, "th");
|
|
630
|
+
i0.ɵɵtext(55, "Status");
|
|
690
631
|
i0.ɵɵelementEnd()()();
|
|
691
|
-
i0.ɵɵelementStart(
|
|
692
|
-
i0.ɵɵrepeaterCreate(
|
|
632
|
+
i0.ɵɵelementStart(56, "tbody");
|
|
633
|
+
i0.ɵɵrepeaterCreate(57, MJOChargesTaxPageComponent_For_58_Template, 10, 6, "tr", null, _forTrack0, false, MJOChargesTaxPageComponent_ForEmpty_59_Template, 3, 0, "tr");
|
|
693
634
|
i0.ɵɵelementEnd()()();
|
|
694
|
-
i0.ɵɵelementStart(
|
|
695
|
-
i0.ɵɵtext(
|
|
696
|
-
i0.ɵɵelementStart(
|
|
697
|
-
i0.ɵɵtext(
|
|
635
|
+
i0.ɵɵelementStart(60, "div", 12);
|
|
636
|
+
i0.ɵɵtext(61, " A rate without a registration is a rate we must ");
|
|
637
|
+
i0.ɵɵelementStart(62, "b");
|
|
638
|
+
i0.ɵɵtext(63, "not");
|
|
698
639
|
i0.ɵɵelementEnd();
|
|
699
|
-
i0.ɵɵtext(
|
|
640
|
+
i0.ɵɵtext(64, " charge. Nexus decides whether tax applies at all; the rate only decides how much. ");
|
|
700
641
|
i0.ɵɵelementEnd()()();
|
|
701
|
-
i0.ɵɵelementStart(
|
|
702
|
-
i0.ɵɵelement(
|
|
703
|
-
i0.ɵɵelementStart(
|
|
704
|
-
i0.ɵɵtext(
|
|
642
|
+
i0.ɵɵelementStart(65, "div", 14)(66, "div", 6);
|
|
643
|
+
i0.ɵɵelement(67, "i", 15);
|
|
644
|
+
i0.ɵɵelementStart(68, "h3");
|
|
645
|
+
i0.ɵɵtext(69, "Customer exemptions");
|
|
705
646
|
i0.ɵɵelementEnd();
|
|
706
|
-
i0.ɵɵelementStart(
|
|
707
|
-
i0.ɵɵtext(
|
|
647
|
+
i0.ɵɵelementStart(70, "span", 8);
|
|
648
|
+
i0.ɵɵtext(71);
|
|
708
649
|
i0.ɵɵelementEnd()();
|
|
709
|
-
i0.ɵɵelementStart(
|
|
710
|
-
i0.ɵɵtext(
|
|
711
|
-
i0.ɵɵelementEnd();
|
|
712
|
-
i0.ɵɵelementStart(76, "th");
|
|
713
|
-
i0.ɵɵtext(77, "Jurisdiction");
|
|
650
|
+
i0.ɵɵelementStart(72, "div", 9)(73, "table", 10)(74, "thead")(75, "tr")(76, "th");
|
|
651
|
+
i0.ɵɵtext(77, "Customer");
|
|
714
652
|
i0.ɵɵelementEnd();
|
|
715
653
|
i0.ɵɵelementStart(78, "th");
|
|
716
|
-
i0.ɵɵtext(79, "
|
|
654
|
+
i0.ɵɵtext(79, "Jurisdiction");
|
|
717
655
|
i0.ɵɵelementEnd();
|
|
718
656
|
i0.ɵɵelementStart(80, "th");
|
|
719
|
-
i0.ɵɵtext(81, "
|
|
657
|
+
i0.ɵɵtext(81, "Category");
|
|
720
658
|
i0.ɵɵelementEnd();
|
|
721
659
|
i0.ɵɵelementStart(82, "th");
|
|
722
|
-
i0.ɵɵtext(83, "
|
|
660
|
+
i0.ɵɵtext(83, "Certificate");
|
|
723
661
|
i0.ɵɵelementEnd();
|
|
724
662
|
i0.ɵɵelementStart(84, "th");
|
|
725
|
-
i0.ɵɵtext(85, "
|
|
663
|
+
i0.ɵɵtext(85, "Expires");
|
|
664
|
+
i0.ɵɵelementEnd();
|
|
665
|
+
i0.ɵɵelementStart(86, "th");
|
|
666
|
+
i0.ɵɵtext(87, "Status");
|
|
726
667
|
i0.ɵɵelementEnd()()();
|
|
727
|
-
i0.ɵɵelementStart(
|
|
728
|
-
i0.ɵɵrepeaterCreate(
|
|
668
|
+
i0.ɵɵelementStart(88, "tbody");
|
|
669
|
+
i0.ɵɵrepeaterCreate(89, MJOChargesTaxPageComponent_For_90_Template, 14, 8, "tr", null, _forTrack0, false, MJOChargesTaxPageComponent_ForEmpty_91_Template, 3, 0, "tr");
|
|
729
670
|
i0.ɵɵelementEnd()()();
|
|
730
|
-
i0.ɵɵelementStart(
|
|
731
|
-
i0.ɵɵtext(
|
|
671
|
+
i0.ɵɵelementStart(92, "div", 12);
|
|
672
|
+
i0.ɵɵtext(93, " An exemption is scoped: a certificate can cover one jurisdiction, one category, or everything. An EXPIRED certificate stops exempting on its own date \u2014 nobody has to remember to switch it off, which is the only way this stays correct. ");
|
|
732
673
|
i0.ɵɵelementEnd()();
|
|
733
|
-
i0.ɵɵelementStart(
|
|
734
|
-
i0.ɵɵtext(
|
|
674
|
+
i0.ɵɵelementStart(94, "div", 16)(95, "mj-alert", 17)(96, "strong");
|
|
675
|
+
i0.ɵɵtext(97, "Taxability inherits down one chain.");
|
|
735
676
|
i0.ɵɵelementEnd();
|
|
736
|
-
i0.ɵɵtext(
|
|
677
|
+
i0.ɵɵtext(98, " A product's tax category comes from its type unless the product overrides it, and the order line takes whatever the product resolved to. One chain, one override point \u2014 so \"why was this taxed?\" has a single answer rather than a search. ");
|
|
737
678
|
i0.ɵɵelementEnd();
|
|
738
|
-
i0.ɵɵelementStart(
|
|
739
|
-
i0.ɵɵtext(
|
|
679
|
+
i0.ɵɵelementStart(99, "mj-alert", 18)(100, "strong");
|
|
680
|
+
i0.ɵɵtext(101, "Computed, but overridable.");
|
|
740
681
|
i0.ɵɵelementEnd();
|
|
741
|
-
i0.ɵɵtext(
|
|
682
|
+
i0.ɵɵtext(102, " A charge computes from its basis, and a person may replace the amount \u2014 with a reason, which the database itself requires. An override without a reason is a number nobody can explain a year later. ");
|
|
742
683
|
i0.ɵɵelementEnd()();
|
|
743
|
-
i0.ɵɵelementStart(
|
|
744
|
-
i0.ɵɵtext(
|
|
684
|
+
i0.ɵɵelementStart(103, "mj-alert", 19)(104, "strong");
|
|
685
|
+
i0.ɵɵtext(105, "Both must hold.");
|
|
745
686
|
i0.ɵɵelementEnd();
|
|
746
|
-
i0.ɵɵtext(
|
|
687
|
+
i0.ɵɵtext(106, " Tax is charged only where there is nexus AND the customer is not exempt for that jurisdiction and category. Either one alone is not enough, and treating them as interchangeable is how a business ends up collecting tax it must refund. ");
|
|
747
688
|
i0.ɵɵelementEnd();
|
|
748
689
|
} if (rf & 2) {
|
|
749
|
-
i0.ɵɵadvance(
|
|
750
|
-
i0.ɵɵ
|
|
751
|
-
i0.ɵɵadvance(
|
|
690
|
+
i0.ɵɵadvance(11);
|
|
691
|
+
i0.ɵɵconditional(ctx.ChargeTypeEntityInfo ? 11 : 12);
|
|
692
|
+
i0.ɵɵadvance(9);
|
|
752
693
|
i0.ɵɵtextInterpolate1("", ctx.Jurisdictions.length, " active");
|
|
753
694
|
i0.ɵɵadvance(14);
|
|
754
695
|
i0.ɵɵrepeater(ctx.JurisdictionRates);
|
|
@@ -758,11 +699,11 @@ export class MJOChargesTaxPageComponent {
|
|
|
758
699
|
i0.ɵɵtextInterpolate1("", ctx.Exemptions.length, " on file");
|
|
759
700
|
i0.ɵɵadvance(18);
|
|
760
701
|
i0.ɵɵrepeater(ctx.Exemptions);
|
|
761
|
-
} }, dependencies: [CommonModule,
|
|
702
|
+
} }, dependencies: [CommonModule, EntityViewerModule, i1.EntityViewerComponent, MJAlertComponent], styles: ["[_nghost-%COMP%] {\n display: block;\n height: 100%;\n overflow: auto;\n padding: var(--mj-space-6);\n }\n .mjo-cat__note[_ngcontent-%COMP%] { margin-bottom: var(--mj-space-4); }\n .mjo-tax__viewer-host[_ngcontent-%COMP%] {\n height: 520px;\n min-height: 450px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n margin-bottom: var(--mj-space-4);\n display: flex;\n flex-direction: column;\n }\n mj-entity-viewer[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n }\n .mjo-tax__grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-4);\n margin-top: var(--mj-space-4);\n }\n .mjo-tax__block[_ngcontent-%COMP%] { margin-top: var(--mj-space-4); }\n @media (max-width: 1000px) {\n .mjo-tax__grid[_ngcontent-%COMP%] { grid-template-columns: 1fr; }\n }\n @media (max-width: 760px) {\n [_nghost-%COMP%] { padding: var(--mj-space-4); }\n }"] });
|
|
762
703
|
}
|
|
763
704
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJOChargesTaxPageComponent, [{
|
|
764
705
|
type: Component,
|
|
765
|
-
args: [{ selector: 'mjo-charges-tax-page', standalone: true, imports: [CommonModule,
|
|
706
|
+
args: [{ selector: 'mjo-charges-tax-page', standalone: true, imports: [CommonModule, EntityViewerModule, MJAlertComponent], template: `
|
|
766
707
|
<mj-alert Variant="info" Icon="fa-solid fa-layer-group" class="mjo-cat__note">
|
|
767
708
|
<strong>Tax is a charge.</strong>
|
|
768
709
|
State plus county plus city is three rows rather than a special case — so ordering,
|
|
@@ -770,16 +711,15 @@ export class MJOChargesTaxPageComponent {
|
|
|
770
711
|
when it computes and its <b>basis</b> decides what it computes on.
|
|
771
712
|
</mj-alert>
|
|
772
713
|
|
|
773
|
-
<mjo-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
FootNote="Non-tax charges enlarge the taxable base; tax charges never do. That is what stops county tax being charged on state tax." />
|
|
714
|
+
<div class="mjo-tax__viewer-host">
|
|
715
|
+
@if (ChargeTypeEntityInfo) {
|
|
716
|
+
<mj-entity-viewer
|
|
717
|
+
[Entity]="ChargeTypeEntityInfo">
|
|
718
|
+
</mj-entity-viewer>
|
|
719
|
+
} @else {
|
|
720
|
+
<div class="small muted" style="padding: 24px;">Loading charge types...</div>
|
|
721
|
+
}
|
|
722
|
+
</div>
|
|
783
723
|
|
|
784
724
|
<div class="mjo-tax__grid">
|
|
785
725
|
<div class="mj-card">
|
|
@@ -931,7 +871,7 @@ export class MJOChargesTaxPageComponent {
|
|
|
931
871
|
jurisdiction and category. Either one alone is not enough, and treating them as
|
|
932
872
|
interchangeable is how a business ends up collecting tax it must refund.
|
|
933
873
|
</mj-alert>
|
|
934
|
-
`, styles: ["\n :host {\n display: block;\n height: 100%;\n overflow: auto;\n padding: var(--mj-space-6);\n }\n .mjo-cat__note { margin-bottom: var(--mj-space-4); }\n .mjo-tax__grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-4);\n margin-top: var(--mj-space-4);\n }\n .mjo-tax__block { margin-top: var(--mj-space-4); }\n @media (max-width: 1000px) {\n .mjo-tax__grid { grid-template-columns: 1fr; }\n }\n @media (max-width: 760px) {\n :host { padding: var(--mj-space-4); }\n }\n "] }]
|
|
874
|
+
`, styles: ["\n :host {\n display: block;\n height: 100%;\n overflow: auto;\n padding: var(--mj-space-6);\n }\n .mjo-cat__note { margin-bottom: var(--mj-space-4); }\n .mjo-tax__viewer-host {\n height: 520px;\n min-height: 450px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-md);\n overflow: hidden;\n margin-bottom: var(--mj-space-4);\n display: flex;\n flex-direction: column;\n }\n mj-entity-viewer {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n }\n .mjo-tax__grid {\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: var(--mj-space-4);\n margin-top: var(--mj-space-4);\n }\n .mjo-tax__block { margin-top: var(--mj-space-4); }\n @media (max-width: 1000px) {\n .mjo-tax__grid { grid-template-columns: 1fr; }\n }\n @media (max-width: 760px) {\n :host { padding: var(--mj-space-4); }\n }\n "] }]
|
|
935
875
|
}], null, null); })();
|
|
936
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJOChargesTaxPageComponent, { className: "MJOChargesTaxPageComponent", filePath: "lib/pages/catalog/products.page.ts", lineNumber:
|
|
876
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJOChargesTaxPageComponent, { className: "MJOChargesTaxPageComponent", filePath: "lib/pages/catalog/products.page.ts", lineNumber: 452 }); })();
|
|
937
877
|
//# sourceMappingURL=products.page.js.map
|