@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.
Files changed (139) hide show
  1. package/dist/checkout-element/main.js +38080 -0
  2. package/dist/lib/checkout-widget/checkout-draft-line.d.ts +25 -0
  3. package/dist/lib/checkout-widget/checkout-draft-line.d.ts.map +1 -0
  4. package/dist/lib/checkout-widget/checkout-draft-line.js +46 -0
  5. package/dist/lib/checkout-widget/checkout-draft-line.js.map +1 -0
  6. package/dist/lib/checkout-widget/checkout-public-host.component.d.ts +80 -0
  7. package/dist/lib/checkout-widget/checkout-public-host.component.d.ts.map +1 -0
  8. package/dist/lib/checkout-widget/checkout-public-host.component.js +360 -0
  9. package/dist/lib/checkout-widget/checkout-public-host.component.js.map +1 -0
  10. package/dist/lib/checkout-widget/checkout-widget.component.d.ts +143 -0
  11. package/dist/lib/checkout-widget/checkout-widget.component.d.ts.map +1 -0
  12. package/dist/lib/checkout-widget/checkout-widget.component.js +873 -0
  13. package/dist/lib/checkout-widget/checkout-widget.component.js.map +1 -0
  14. package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts +1 -0
  15. package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts.map +1 -1
  16. package/dist/lib/custom/OrderHeader/order-header-form.component.js +10 -6
  17. package/dist/lib/custom/OrderHeader/order-header-form.component.js.map +1 -1
  18. package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts +2 -0
  19. package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts.map +1 -1
  20. package/dist/lib/custom/OrderHeader/order-lines-editor.component.js +37 -11
  21. package/dist/lib/custom/OrderHeader/order-lines-editor.component.js.map +1 -1
  22. package/dist/lib/form-panels/party-order-stats.js +2 -2
  23. package/dist/lib/form-panels/party-order-stats.js.map +1 -1
  24. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.d.ts +10 -0
  25. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.d.ts.map +1 -0
  26. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.js +103 -0
  27. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.js.map +1 -0
  28. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.d.ts +10 -0
  29. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.d.ts.map +1 -0
  30. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.js +136 -0
  31. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.js.map +1 -0
  32. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.d.ts +10 -0
  33. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.d.ts.map +1 -0
  34. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.js +106 -0
  35. package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.js.map +1 -0
  36. package/dist/lib/generated/Entities/mjBizAppsOrdersEventOrderLine/mjbizappsorderseventorderline.form.component.js +9 -9
  37. package/dist/lib/generated/Entities/mjBizAppsOrdersEventOrderLine/mjbizappsorderseventorderline.form.component.js.map +1 -1
  38. package/dist/lib/generated/Entities/mjBizAppsOrdersEventProduct/mjbizappsorderseventproduct.form.component.js +12 -12
  39. package/dist/lib/generated/Entities/mjBizAppsOrdersEventProduct/mjbizappsorderseventproduct.form.component.js.map +1 -1
  40. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderCompanyPolicy/mjbizappsordersordercompanypolicy.form.component.d.ts.map +1 -1
  41. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderCompanyPolicy/mjbizappsordersordercompanypolicy.form.component.js +16 -10
  42. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderCompanyPolicy/mjbizappsordersordercompanypolicy.form.component.js.map +1 -1
  43. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.d.ts.map +1 -1
  44. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.js +78 -52
  45. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.js.map +1 -1
  46. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.d.ts.map +1 -1
  47. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.js +88 -82
  48. package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.js.map +1 -1
  49. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentHeader/mjbizappsorderspaymentheader.form.component.js +3 -3
  50. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentHeader/mjbizappsorderspaymentheader.form.component.js.map +1 -1
  51. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentIntent/mjbizappsorderspaymentintent.form.component.d.ts.map +1 -1
  52. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentIntent/mjbizappsorderspaymentintent.form.component.js +23 -5
  53. package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentIntent/mjbizappsorderspaymentintent.form.component.js.map +1 -1
  54. package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.d.ts.map +1 -1
  55. package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.js +75 -69
  56. package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.js.map +1 -1
  57. package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.d.ts.map +1 -1
  58. package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.js +37 -31
  59. package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.js.map +1 -1
  60. package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.d.ts.map +1 -1
  61. package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.js +24 -16
  62. package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.js.map +1 -1
  63. package/dist/lib/generated/generated-forms.module.d.ts +54 -51
  64. package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
  65. package/dist/lib/generated/generated-forms.module.js +27 -18
  66. package/dist/lib/generated/generated-forms.module.js.map +1 -1
  67. package/dist/lib/pages/catalog/pricing.page.d.ts +3 -24
  68. package/dist/lib/pages/catalog/pricing.page.d.ts.map +1 -1
  69. package/dist/lib/pages/catalog/pricing.page.js +158 -214
  70. package/dist/lib/pages/catalog/pricing.page.js.map +1 -1
  71. package/dist/lib/pages/catalog/products.page.d.ts +6 -29
  72. package/dist/lib/pages/catalog/products.page.d.ts.map +1 -1
  73. package/dist/lib/pages/catalog/products.page.js +255 -315
  74. package/dist/lib/pages/catalog/products.page.js.map +1 -1
  75. package/dist/lib/pages/orders/fulfillment.page.d.ts +14 -97
  76. package/dist/lib/pages/orders/fulfillment.page.d.ts.map +1 -1
  77. package/dist/lib/pages/orders/fulfillment.page.js +93 -258
  78. package/dist/lib/pages/orders/fulfillment.page.js.map +1 -1
  79. package/dist/lib/pages/orders/order-document.page.js +1 -1
  80. package/dist/lib/pages/orders/order-document.page.js.map +1 -1
  81. package/dist/lib/pages/orders/orders-dashboard.page.d.ts +29 -58
  82. package/dist/lib/pages/orders/orders-dashboard.page.d.ts.map +1 -1
  83. package/dist/lib/pages/orders/orders-dashboard.page.js +602 -352
  84. package/dist/lib/pages/orders/orders-dashboard.page.js.map +1 -1
  85. package/dist/lib/pages/orders/orders-list.page.d.ts +8 -58
  86. package/dist/lib/pages/orders/orders-list.page.d.ts.map +1 -1
  87. package/dist/lib/pages/orders/orders-list.page.js +52 -237
  88. package/dist/lib/pages/orders/orders-list.page.js.map +1 -1
  89. package/dist/lib/pages/payments/account-credit.page.d.ts +7 -17
  90. package/dist/lib/pages/payments/account-credit.page.d.ts.map +1 -1
  91. package/dist/lib/pages/payments/account-credit.page.js +99 -85
  92. package/dist/lib/pages/payments/account-credit.page.js.map +1 -1
  93. package/dist/lib/pages/payments/payments-dashboard.page.d.ts +4 -15
  94. package/dist/lib/pages/payments/payments-dashboard.page.d.ts.map +1 -1
  95. package/dist/lib/pages/payments/payments-dashboard.page.js +76 -111
  96. package/dist/lib/pages/payments/payments-dashboard.page.js.map +1 -1
  97. package/dist/lib/pages/payments/payments-list.page.d.ts +7 -41
  98. package/dist/lib/pages/payments/payments-list.page.d.ts.map +1 -1
  99. package/dist/lib/pages/payments/payments-list.page.js +51 -130
  100. package/dist/lib/pages/payments/payments-list.page.js.map +1 -1
  101. package/dist/lib/pages/receivables/customer-ar.page.d.ts +6 -8
  102. package/dist/lib/pages/receivables/customer-ar.page.d.ts.map +1 -1
  103. package/dist/lib/pages/receivables/customer-ar.page.js +112 -100
  104. package/dist/lib/pages/receivables/customer-ar.page.js.map +1 -1
  105. package/dist/lib/pages/receivables/overdue.page.d.ts +6 -3
  106. package/dist/lib/pages/receivables/overdue.page.d.ts.map +1 -1
  107. package/dist/lib/pages/receivables/overdue.page.js +61 -65
  108. package/dist/lib/pages/receivables/overdue.page.js.map +1 -1
  109. package/dist/lib/pages/receivables/subscriptions.page.d.ts +5 -9
  110. package/dist/lib/pages/receivables/subscriptions.page.d.ts.map +1 -1
  111. package/dist/lib/pages/receivables/subscriptions.page.js +139 -153
  112. package/dist/lib/pages/receivables/subscriptions.page.js.map +1 -1
  113. package/dist/lib/panels/order-stages.d.ts +12 -16
  114. package/dist/lib/panels/order-stages.d.ts.map +1 -1
  115. package/dist/lib/panels/order-stages.js +6 -42
  116. package/dist/lib/panels/order-stages.js.map +1 -1
  117. package/dist/lib/panels/party-orders-overview.component.d.ts +3 -1
  118. package/dist/lib/panels/party-orders-overview.component.d.ts.map +1 -1
  119. package/dist/lib/panels/party-orders-overview.component.js +18 -6
  120. package/dist/lib/panels/party-orders-overview.component.js.map +1 -1
  121. package/dist/lib/panels/status-stepper.component.d.ts +1 -1
  122. package/dist/lib/panels/status-stepper.component.d.ts.map +1 -1
  123. package/dist/lib/services/pricing-scheduler.service.d.ts +3 -4
  124. package/dist/lib/services/pricing-scheduler.service.d.ts.map +1 -1
  125. package/dist/lib/services/pricing-scheduler.service.js +3 -4
  126. package/dist/lib/services/pricing-scheduler.service.js.map +1 -1
  127. package/dist/public-api.d.ts +3 -2
  128. package/dist/public-api.d.ts.map +1 -1
  129. package/dist/public-api.js +3 -2
  130. package/dist/public-api.js.map +1 -1
  131. package/package.json +28 -16
  132. package/dist/lib/pages/orders/order-editor.page.d.ts +0 -547
  133. package/dist/lib/pages/orders/order-editor.page.d.ts.map +0 -1
  134. package/dist/lib/pages/orders/order-editor.page.js +0 -2269
  135. package/dist/lib/pages/orders/order-editor.page.js.map +0 -1
  136. package/dist/lib/pages/orders/order-workspace.page.d.ts +0 -120
  137. package/dist/lib/pages/orders/order-workspace.page.d.ts.map +0 -1
  138. package/dist/lib/pages/orders/order-workspace.page.js +0 -443
  139. 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 { MJOWorklistTableComponent } from '../../panels/worklist-table.component.js';
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, GetProducts, GetTaxExemptions, GetTaxJurisdictions, GetTaxNexus, GetTaxRates } from '../../data/orders-queries.js';
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
- const _c0 = () => [];
11
+ import * as i1 from "@memberjunction/ng-entity-viewer";
10
12
  const _forTrack0 = ($index, $item) => $item["ID"];
11
- function MJOProductsPageComponent_For_27_Conditional_3_Template(rf, ctx) { if (rf & 1) {
12
- i0.ɵɵelementStart(0, "div", 12);
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 type_r1 = i0.ɵɵnextContext().$implicit;
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(type_r1["ProductExtensionEntity"]));
35
+ i0.ɵɵtextInterpolate1("extends ", ctx_r1.shortEntity(type_r3["ProductExtensionEntity"]));
20
36
  } }
21
- function MJOProductsPageComponent_For_27_Template(rf, ctx) { if (rf & 1) {
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, MJOProductsPageComponent_For_27_Conditional_3_Template, 2, 1, "div", 12);
40
+ i0.ɵɵconditionalCreate(3, MJOProductsPageComponent_For_29_Conditional_3_Template, 2, 1, "div", 15);
25
41
  i0.ɵɵelementEnd();
26
- i0.ɵɵelementStart(4, "td", 13);
42
+ i0.ɵɵelementStart(4, "td", 16);
27
43
  i0.ɵɵtext(5);
28
44
  i0.ɵɵelementEnd();
29
- i0.ɵɵelementStart(6, "td", 13);
45
+ i0.ɵɵelementStart(6, "td", 16);
30
46
  i0.ɵɵtext(7);
31
47
  i0.ɵɵelementEnd();
32
- i0.ɵɵelementStart(8, "td", 13);
48
+ i0.ɵɵelementStart(8, "td", 16);
33
49
  i0.ɵɵtext(9);
34
50
  i0.ɵɵelementEnd()();
35
51
  } if (rf & 2) {
36
- const type_r1 = ctx.$implicit;
52
+ const type_r3 = ctx.$implicit;
37
53
  i0.ɵɵadvance(2);
38
- i0.ɵɵtextInterpolate1(" ", type_r1["Name"], " ");
54
+ i0.ɵɵtextInterpolate1(" ", type_r3["Name"], " ");
39
55
  i0.ɵɵadvance();
40
- i0.ɵɵconditional(type_r1["ProductExtensionEntity"] ? 3 : -1);
56
+ i0.ɵɵconditional(type_r3["ProductExtensionEntity"] ? 3 : -1);
41
57
  i0.ɵɵadvance(2);
42
- i0.ɵɵtextInterpolate(type_r1["RequiresFulfillment"] ? "yes" : "no");
58
+ i0.ɵɵtextInterpolate(type_r3["RequiresFulfillment"] ? "yes" : "no");
43
59
  i0.ɵɵadvance(2);
44
- i0.ɵɵtextInterpolate(type_r1["DefaultRevenueRecognitionType"] ?? "\u2014");
60
+ i0.ɵɵtextInterpolate(type_r3["DefaultRevenueRecognitionType"] ?? "\u2014");
45
61
  i0.ɵɵadvance(2);
46
- i0.ɵɵtextInterpolate1(" ", type_r1["DefaultIsTaxable"] ? type_r1["DefaultTaxCategory"] ?? "yes" : "no", " ");
62
+ i0.ɵɵtextInterpolate1(" ", type_r3["DefaultIsTaxable"] ? type_r3["DefaultTaxCategory"] ?? "yes" : "no", " ");
47
63
  } }
48
- function MJOProductsPageComponent_ForEmpty_28_Template(rf, ctx) { if (rf & 1) {
49
- i0.ɵɵelementStart(0, "tr")(1, "td", 14);
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 MJOProductsPageComponent_For_52_Template(rf, ctx) { if (rf & 1) {
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", 15);
73
+ i0.ɵɵelementStart(3, "td", 18);
58
74
  i0.ɵɵtext(4);
59
75
  i0.ɵɵelementEnd();
60
- i0.ɵɵelementStart(5, "td", 13);
76
+ i0.ɵɵelementStart(5, "td", 16);
61
77
  i0.ɵɵtext(6);
62
78
  i0.ɵɵelementEnd()();
63
79
  } if (rf & 2) {
64
- const category_r3 = ctx.$implicit;
80
+ const category_r4 = ctx.$implicit;
65
81
  i0.ɵɵadvance(2);
66
- i0.ɵɵtextInterpolate(category_r3["Name"]);
82
+ i0.ɵɵtextInterpolate(category_r4["Name"]);
67
83
  i0.ɵɵadvance(2);
68
- i0.ɵɵtextInterpolate(category_r3["ParentProductCategory"] ?? "\u2014");
84
+ i0.ɵɵtextInterpolate(category_r4["ParentProductCategory"] ?? "\u2014");
69
85
  i0.ɵɵadvance(2);
70
- i0.ɵɵtextInterpolate1(" ", category_r3["DefaultIsTaxable"] ? category_r3["DefaultTaxCategory"] ?? "taxable" : "exempt", " ");
86
+ i0.ɵɵtextInterpolate1(" ", category_r4["DefaultIsTaxable"] ? category_r4["DefaultTaxCategory"] ?? "taxable" : "exempt", " ");
71
87
  } }
72
- function MJOProductsPageComponent_ForEmpty_53_Template(rf, ctx) { if (rf & 1) {
73
- i0.ɵɵelementStart(0, "tr")(1, "td", 16);
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 MJOChargesTaxPageComponent_For_33_Conditional_3_Template(rf, ctx) { if (rf & 1) {
79
- i0.ɵɵelementStart(0, "div", 18);
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 row_r1 = i0.ɵɵnextContext().$implicit;
110
+ const row_r2 = i0.ɵɵnextContext().$implicit;
84
111
  i0.ɵɵadvance();
85
- i0.ɵɵtextInterpolate1("within ", row_r1.Parent);
112
+ i0.ɵɵtextInterpolate1("within ", row_r2.Parent);
86
113
  } }
87
- function MJOChargesTaxPageComponent_For_33_Template(rf, ctx) { if (rf & 1) {
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, MJOChargesTaxPageComponent_For_33_Conditional_3_Template, 2, 1, "div", 18);
117
+ i0.ɵɵconditionalCreate(3, MJOChargesTaxPageComponent_For_35_Conditional_3_Template, 2, 1, "div", 20);
91
118
  i0.ɵɵelementEnd();
92
- i0.ɵɵelementStart(4, "td", 19);
119
+ i0.ɵɵelementStart(4, "td", 21);
93
120
  i0.ɵɵtext(5);
94
121
  i0.ɵɵelementEnd();
95
- i0.ɵɵelementStart(6, "td", 19);
122
+ i0.ɵɵelementStart(6, "td", 21);
96
123
  i0.ɵɵtext(7);
97
124
  i0.ɵɵelementEnd();
98
- i0.ɵɵelementStart(8, "td", 9);
125
+ i0.ɵɵelementStart(8, "td", 11);
99
126
  i0.ɵɵtext(9);
100
127
  i0.ɵɵelementEnd()();
101
128
  } if (rf & 2) {
102
- const row_r1 = ctx.$implicit;
129
+ const row_r2 = ctx.$implicit;
103
130
  i0.ɵɵadvance(2);
104
- i0.ɵɵtextInterpolate1(" ", row_r1.Name, " ");
131
+ i0.ɵɵtextInterpolate1(" ", row_r2.Name, " ");
105
132
  i0.ɵɵadvance();
106
- i0.ɵɵconditional(row_r1.Parent ? 3 : -1);
133
+ i0.ɵɵconditional(row_r2.Parent ? 3 : -1);
107
134
  i0.ɵɵadvance(2);
108
- i0.ɵɵtextInterpolate(row_r1.Where);
135
+ i0.ɵɵtextInterpolate(row_r2.Where);
109
136
  i0.ɵɵadvance(2);
110
- i0.ɵɵtextInterpolate(row_r1.Category);
137
+ i0.ɵɵtextInterpolate(row_r2.Category);
111
138
  i0.ɵɵadvance(2);
112
- i0.ɵɵtextInterpolate(row_r1.Rate);
139
+ i0.ɵɵtextInterpolate(row_r2.Rate);
113
140
  } }
114
- function MJOChargesTaxPageComponent_ForEmpty_34_Template(rf, ctx) { if (rf & 1) {
115
- i0.ɵɵelementStart(0, "tr")(1, "td", 20);
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 MJOChargesTaxPageComponent_For_56_Template(rf, ctx) { if (rf & 1) {
120
- i0.ɵɵelementStart(0, "tr")(1, "td", 19);
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", 19);
150
+ i0.ɵɵelementStart(3, "td", 21);
124
151
  i0.ɵɵtext(4);
125
152
  i0.ɵɵelementEnd();
126
- i0.ɵɵelementStart(5, "td", 19);
153
+ i0.ɵɵelementStart(5, "td", 21);
127
154
  i0.ɵɵtext(6);
128
155
  i0.ɵɵelementEnd();
129
- i0.ɵɵelementStart(7, "td")(8, "span", 21);
156
+ i0.ɵɵelementStart(7, "td")(8, "span", 23);
130
157
  i0.ɵɵtext(9);
131
158
  i0.ɵɵelementEnd()()();
132
159
  } if (rf & 2) {
133
- const row_r2 = ctx.$implicit;
134
- const ctx_r2 = i0.ɵɵnextContext();
160
+ const row_r3 = ctx.$implicit;
161
+ const ctx_r0 = i0.ɵɵnextContext();
135
162
  i0.ɵɵadvance(2);
136
- i0.ɵɵtextInterpolate(row_r2["Company"] ?? "\u2014");
163
+ i0.ɵɵtextInterpolate(row_r3["Company"] ?? "\u2014");
137
164
  i0.ɵɵadvance(2);
138
- i0.ɵɵtextInterpolate(row_r2["TaxJurisdiction"] ?? "\u2014");
165
+ i0.ɵɵtextInterpolate(row_r3["TaxJurisdiction"] ?? "\u2014");
139
166
  i0.ɵɵadvance(2);
140
- i0.ɵɵtextInterpolate(row_r2["NexusType"] ?? "\u2014");
167
+ i0.ɵɵtextInterpolate(row_r3["NexusType"] ?? "\u2014");
141
168
  i0.ɵɵadvance(2);
142
- i0.ɵɵclassMap(ctx_r2.nexusClass(row_r2));
169
+ i0.ɵɵclassMap(ctx_r0.nexusClass(row_r3));
143
170
  i0.ɵɵadvance();
144
- i0.ɵɵtextInterpolate1(" ", row_r2["Status"] ?? "\u2014", " ");
171
+ i0.ɵɵtextInterpolate1(" ", row_r3["Status"] ?? "\u2014", " ");
145
172
  } }
146
- function MJOChargesTaxPageComponent_ForEmpty_57_Template(rf, ctx) { if (rf & 1) {
147
- i0.ɵɵelementStart(0, "tr")(1, "td", 20);
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 MJOChargesTaxPageComponent_For_88_Template(rf, ctx) { if (rf & 1) {
152
- i0.ɵɵelementStart(0, "tr")(1, "td", 19);
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", 19);
182
+ i0.ɵɵelementStart(3, "td", 21);
156
183
  i0.ɵɵtext(4);
157
184
  i0.ɵɵelementEnd();
158
- i0.ɵɵelementStart(5, "td", 19);
185
+ i0.ɵɵelementStart(5, "td", 21);
159
186
  i0.ɵɵtext(6);
160
187
  i0.ɵɵelementEnd();
161
- i0.ɵɵelementStart(7, "td", 22);
188
+ i0.ɵɵelementStart(7, "td", 24);
162
189
  i0.ɵɵtext(8);
163
190
  i0.ɵɵelementEnd();
164
- i0.ɵɵelementStart(9, "td", 19);
191
+ i0.ɵɵelementStart(9, "td", 21);
165
192
  i0.ɵɵtext(10);
166
193
  i0.ɵɵelementEnd();
167
- i0.ɵɵelementStart(11, "td")(12, "span", 21);
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 ctx_r2 = i0.ɵɵnextContext();
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(ctx_r2.jurisdictionOf(row_r4));
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(ctx_r2.dateOf(row_r4["CertificateExpiresAt"]));
209
+ i0.ɵɵtextInterpolate(ctx_r0.dateOf(row_r4["CertificateExpiresAt"]));
183
210
  i0.ɵɵadvance(2);
184
- i0.ɵɵclassMap(ctx_r2.exemptionClass(row_r4));
211
+ i0.ɵɵclassMap(ctx_r0.exemptionClass(row_r4));
185
212
  i0.ɵɵadvance();
186
213
  i0.ɵɵtextInterpolate1(" ", row_r4["Status"] ?? "\u2014", " ");
187
214
  } }
188
- function MJOChargesTaxPageComponent_ForEmpty_89_Template(rf, ctx) { if (rf & 1) {
189
- i0.ɵɵelementStart(0, "tr")(1, "td", 23);
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
- Rows = [];
231
- Search = '';
232
- Columns = [
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
- await this.load();
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
- async OnSearch(text) {
267
- this.Search = text;
268
- await this.load();
269
- this.cdr.detectChanges();
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: 60, vars: 9, consts: [["Variant", "info", "Icon", "fa-solid fa-sitemap", 1, "mjo-cat__note"], ["SearchPlaceholder", "Product name or SKU\u2026", "RowKey", "ID", "EmptyIcon", "fa-solid fa-boxes-stacked", "EmptyTitle", "No products match", "EmptyHint", "Try a different search.", 3, "SearchChanged", "RowClicked", "Columns", "Rows", "Presets", "Search"], [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"], [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) {
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, "mjo-worklist-table", 1);
289
- i0.ɵɵlistener("SearchChanged", function MJOProductsPageComponent_Template_mjo_worklist_table_SearchChanged_4_listener($event) { return ctx.OnSearch($event); })("RowClicked", function MJOProductsPageComponent_Template_mjo_worklist_table_RowClicked_4_listener($event) { return ctx.ProductOpened.emit($event); });
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(5, "div", 2)(6, "div", 3)(7, "div", 4);
292
- i0.ɵɵelement(8, "i", 5);
293
- i0.ɵɵelementStart(9, "h3");
294
- i0.ɵɵtext(10, "Product types");
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(11, "span", 6);
297
- i0.ɵɵtext(12);
276
+ i0.ɵɵelementStart(13, "span", 8);
277
+ i0.ɵɵtext(14);
298
278
  i0.ɵɵelementEnd()();
299
- i0.ɵɵelementStart(13, "div", 7)(14, "table", 8)(15, "thead")(16, "tr")(17, "th");
300
- i0.ɵɵtext(18, "Type");
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, "Recognition");
283
+ i0.ɵɵtext(22, "Ships");
307
284
  i0.ɵɵelementEnd();
308
285
  i0.ɵɵelementStart(23, "th");
309
- i0.ɵɵtext(24, "Taxable");
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(25, "tbody");
312
- i0.ɵɵrepeaterCreate(26, MJOProductsPageComponent_For_27_Template, 10, 5, "tr", null, _forTrack0, false, MJOProductsPageComponent_ForEmpty_28_Template, 3, 0, "tr");
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(29, "div", 9)(30, "b");
315
- i0.ɵɵtext(31, "What a type decides:");
294
+ i0.ɵɵelementStart(31, "div", 11)(32, "b");
295
+ i0.ɵɵtext(33, "What a type decides:");
316
296
  i0.ɵɵelementEnd();
317
- i0.ɵɵtext(32, " 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. ");
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(33, "div", 3)(34, "div", 4);
320
- i0.ɵɵelement(35, "i", 10);
321
- i0.ɵɵelementStart(36, "h3");
322
- i0.ɵɵtext(37, "Categories");
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(38, "span", 6);
325
- i0.ɵɵtext(39);
304
+ i0.ɵɵelementStart(40, "span", 8);
305
+ i0.ɵɵtext(41);
326
306
  i0.ɵɵelementEnd()();
327
- i0.ɵɵelementStart(40, "div", 7)(41, "table", 8)(42, "thead")(43, "tr")(44, "th");
328
- i0.ɵɵtext(45, "Category");
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, "Default tax");
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(50, "tbody");
337
- i0.ɵɵrepeaterCreate(51, MJOProductsPageComponent_For_52_Template, 7, 3, "tr", null, _forTrack0, false, MJOProductsPageComponent_ForEmpty_53_Template, 3, 0, "tr");
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(54, "div", 9);
340
- i0.ɵɵtext(55, " 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. ");
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(56, "mj-alert", 11)(57, "strong");
343
- i0.ɵɵtext(58, "Type extensions carry what only that type needs.");
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(59, " 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. ");
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(4);
349
- i0.ɵɵproperty("Columns", ctx.Columns)("Rows", ctx.Rows)("Presets", i0.ɵɵpureFunction0(8, _c0))("Search", ctx.Search);
350
- i0.ɵɵadvance(8);
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, MJOWorklistTableComponent, 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-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 }"] });
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, MJOWorklistTableComponent, MJAlertComponent], template: `
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-worklist-table
371
- [Columns]="Columns"
372
- [Rows]="Rows"
373
- [Presets]="[]"
374
- [Search]="Search"
375
- SearchPlaceholder="Product name or SKU…"
376
- RowKey="ID"
377
- EmptyIcon="fa-solid fa-boxes-stacked"
378
- EmptyTitle="No products match"
379
- EmptyHint="Try a different search."
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: 172 }); })();
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
- // Four independent reads, so they go together rather than in sequence —
541
- // none of them needs another's answer.
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: 105, vars: 10, consts: [["Variant", "info", "Icon", "fa-solid fa-layer-group", 1, "mjo-cat__note"], ["RowKey", "ID", "EmptyIcon", "fa-solid fa-receipt", "EmptyTitle", "No charge types configured", "EmptyHint", "Shipping, handling and each tax jurisdiction are charge types.", "FootNote", "Non-tax charges enlarge the taxable base; tax charges never do. That is what stops county tax being charged on state tax.", 3, "Columns", "Rows", "Presets", "Searchable"], [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) {
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.ɵɵelement(10, "mjo-worklist-table", 1);
648
- i0.ɵɵelementStart(11, "div", 2)(12, "div", 3)(13, "div", 4);
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(17, "span", 6);
654
- i0.ɵɵtext(18);
655
- i0.ɵɵelementEnd()();
656
- i0.ɵɵelementStart(19, "div", 7)(20, "table", 8)(21, "thead")(22, "tr")(23, "th");
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(25, "th");
660
- i0.ɵɵtext(26, "Where");
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, "Category");
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(29, "th", 9);
666
- i0.ɵɵtext(30, "Rate");
606
+ i0.ɵɵelementStart(31, "th", 11);
607
+ i0.ɵɵtext(32, "Rate");
667
608
  i0.ɵɵelementEnd()()();
668
- i0.ɵɵelementStart(31, "tbody");
669
- i0.ɵɵrepeaterCreate(32, MJOChargesTaxPageComponent_For_33_Template, 10, 5, "tr", null, _forTrack1, false, MJOChargesTaxPageComponent_ForEmpty_34_Template, 3, 0, "tr");
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(35, "div", 10);
672
- i0.ɵɵtext(36, " 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. ");
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(37, "div", 3)(38, "div", 4);
675
- i0.ɵɵelement(39, "i", 11);
676
- i0.ɵɵelementStart(40, "h3");
677
- i0.ɵɵtext(41, "Nexus \u2014 where we must collect");
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(42, "div", 7)(43, "table", 8)(44, "thead")(45, "tr")(46, "th");
680
- i0.ɵɵtext(47, "Company");
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, "Type");
624
+ i0.ɵɵtext(51, "Jurisdiction");
687
625
  i0.ɵɵelementEnd();
688
626
  i0.ɵɵelementStart(52, "th");
689
- i0.ɵɵtext(53, "Status");
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(54, "tbody");
692
- i0.ɵɵrepeaterCreate(55, MJOChargesTaxPageComponent_For_56_Template, 10, 6, "tr", null, _forTrack0, false, MJOChargesTaxPageComponent_ForEmpty_57_Template, 3, 0, "tr");
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(58, "div", 10);
695
- i0.ɵɵtext(59, " A rate without a registration is a rate we must ");
696
- i0.ɵɵelementStart(60, "b");
697
- i0.ɵɵtext(61, "not");
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(62, " charge. Nexus decides whether tax applies at all; the rate only decides how much. ");
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(63, "div", 12)(64, "div", 4);
702
- i0.ɵɵelement(65, "i", 13);
703
- i0.ɵɵelementStart(66, "h3");
704
- i0.ɵɵtext(67, "Customer exemptions");
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(68, "span", 6);
707
- i0.ɵɵtext(69);
647
+ i0.ɵɵelementStart(70, "span", 8);
648
+ i0.ɵɵtext(71);
708
649
  i0.ɵɵelementEnd()();
709
- i0.ɵɵelementStart(70, "div", 7)(71, "table", 8)(72, "thead")(73, "tr")(74, "th");
710
- i0.ɵɵtext(75, "Customer");
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, "Category");
654
+ i0.ɵɵtext(79, "Jurisdiction");
717
655
  i0.ɵɵelementEnd();
718
656
  i0.ɵɵelementStart(80, "th");
719
- i0.ɵɵtext(81, "Certificate");
657
+ i0.ɵɵtext(81, "Category");
720
658
  i0.ɵɵelementEnd();
721
659
  i0.ɵɵelementStart(82, "th");
722
- i0.ɵɵtext(83, "Expires");
660
+ i0.ɵɵtext(83, "Certificate");
723
661
  i0.ɵɵelementEnd();
724
662
  i0.ɵɵelementStart(84, "th");
725
- i0.ɵɵtext(85, "Status");
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(86, "tbody");
728
- i0.ɵɵrepeaterCreate(87, MJOChargesTaxPageComponent_For_88_Template, 14, 8, "tr", null, _forTrack0, false, MJOChargesTaxPageComponent_ForEmpty_89_Template, 3, 0, "tr");
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(90, "div", 10);
731
- i0.ɵɵtext(91, " 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. ");
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(92, "div", 14)(93, "mj-alert", 15)(94, "strong");
734
- i0.ɵɵtext(95, "Taxability inherits down one chain.");
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(96, " 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. ");
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(97, "mj-alert", 16)(98, "strong");
739
- i0.ɵɵtext(99, "Computed, but overridable.");
679
+ i0.ɵɵelementStart(99, "mj-alert", 18)(100, "strong");
680
+ i0.ɵɵtext(101, "Computed, but overridable.");
740
681
  i0.ɵɵelementEnd();
741
- i0.ɵɵtext(100, " 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. ");
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(101, "mj-alert", 17)(102, "strong");
744
- i0.ɵɵtext(103, "Both must hold.");
684
+ i0.ɵɵelementStart(103, "mj-alert", 19)(104, "strong");
685
+ i0.ɵɵtext(105, "Both must hold.");
745
686
  i0.ɵɵelementEnd();
746
- i0.ɵɵtext(104, " 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. ");
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(10);
750
- i0.ɵɵproperty("Columns", ctx.Columns)("Rows", ctx.Rows)("Presets", i0.ɵɵpureFunction0(9, _c0))("Searchable", false);
751
- i0.ɵɵadvance(8);
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, MJOWorklistTableComponent, 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__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 }"] });
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, MJOWorklistTableComponent, MJAlertComponent], template: `
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-worklist-table
774
- [Columns]="Columns"
775
- [Rows]="Rows"
776
- [Presets]="[]"
777
- [Searchable]="false"
778
- RowKey="ID"
779
- EmptyIcon="fa-solid fa-receipt"
780
- EmptyTitle="No charge types configured"
781
- EmptyHint="Shipping, handling and each tax jurisdiction are charge types."
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: 468 }); })();
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