@mj-biz-apps/orders-ng 5.53.0 → 5.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/custom/OrderHeader/order-header-form.component.js +5 -5
- package/dist/lib/custom/OrderHeader/order-header-form.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-line-details-panel.component.js +2 -2
- package/dist/lib/custom/OrderHeader/order-line-details-panel.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts +11 -0
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js +310 -251
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-accounting-widget.component.js +2 -2
- package/dist/lib/form-panels/product-header.panel.d.ts +2 -2
- package/dist/lib/form-panels/product-header.panel.d.ts.map +1 -1
- package/dist/lib/form-panels/product-header.panel.js +4 -21
- package/dist/lib/form-panels/product-header.panel.js.map +1 -1
- package/dist/lib/form-panels/product-readiness-check.d.ts +4 -0
- package/dist/lib/form-panels/product-readiness-check.d.ts.map +1 -0
- package/dist/lib/form-panels/product-readiness-check.js +38 -0
- package/dist/lib/form-panels/product-readiness-check.js.map +1 -0
- package/dist/lib/pages/catalog/new-product-dialog.component.d.ts +67 -0
- package/dist/lib/pages/catalog/new-product-dialog.component.d.ts.map +1 -0
- package/dist/lib/pages/catalog/new-product-dialog.component.js +554 -0
- package/dist/lib/pages/catalog/new-product-dialog.component.js.map +1 -0
- package/dist/lib/pages/catalog/new-product-draft.d.ts +31 -0
- package/dist/lib/pages/catalog/new-product-draft.d.ts.map +1 -0
- package/dist/lib/pages/catalog/new-product-draft.js +81 -0
- package/dist/lib/pages/catalog/new-product-draft.js.map +1 -0
- package/dist/lib/pages/catalog/pricing.page.d.ts +16 -3
- package/dist/lib/pages/catalog/pricing.page.d.ts.map +1 -1
- package/dist/lib/pages/catalog/pricing.page.js +77 -38
- package/dist/lib/pages/catalog/pricing.page.js.map +1 -1
- package/dist/lib/pages/catalog/products.page.d.ts +16 -4
- package/dist/lib/pages/catalog/products.page.d.ts.map +1 -1
- package/dist/lib/pages/catalog/products.page.js +150 -111
- package/dist/lib/pages/catalog/products.page.js.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts +11 -3
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.js +31 -14
- package/dist/lib/pages/orders/orders-dashboard.page.js.map +1 -1
- package/dist/lib/pages/orders/orders-list.page.d.ts +3 -1
- package/dist/lib/pages/orders/orders-list.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-list.page.js +10 -5
- package/dist/lib/pages/orders/orders-list.page.js.map +1 -1
- package/dist/lib/pages/payments/payments-dashboard.page.d.ts +3 -1
- package/dist/lib/pages/payments/payments-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/payments-dashboard.page.js +10 -5
- package/dist/lib/pages/payments/payments-dashboard.page.js.map +1 -1
- package/dist/lib/pages/payments/payments-list.page.d.ts +3 -1
- package/dist/lib/pages/payments/payments-list.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/payments-list.page.js +10 -5
- package/dist/lib/pages/payments/payments-list.page.js.map +1 -1
- package/dist/lib/pages/subscriptions/subscriptions.page.d.ts +3 -1
- package/dist/lib/pages/subscriptions/subscriptions.page.d.ts.map +1 -1
- package/dist/lib/pages/subscriptions/subscriptions.page.js +10 -5
- package/dist/lib/pages/subscriptions/subscriptions.page.js.map +1 -1
- package/dist/lib/pages/workspace-requests.d.ts +30 -0
- package/dist/lib/pages/workspace-requests.d.ts.map +1 -0
- package/dist/lib/pages/workspace-requests.js +12 -0
- package/dist/lib/pages/workspace-requests.js.map +1 -0
- package/dist/lib/sections/orders-sections.component.d.ts.map +1 -1
- package/dist/lib/sections/orders-sections.component.js +10 -7
- package/dist/lib/sections/orders-sections.component.js.map +1 -1
- package/dist/public-api.d.ts +1 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +1 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type mjBizAppsOrdersProductEntity, type mjBizAppsOrdersProductPriceEntity, type mjBizAppsOrdersProductTypeEntity } from '@mj-biz-apps/orders-entities';
|
|
2
|
+
/** The first step's fields. Ids are blank strings until chosen, as a native select holds them. */
|
|
3
|
+
export interface NewProductDraft {
|
|
4
|
+
Name: string;
|
|
5
|
+
SKU: string;
|
|
6
|
+
CompanyID: string;
|
|
7
|
+
ProductCategoryID: string;
|
|
8
|
+
ProductTypeID: string;
|
|
9
|
+
RevenueRecognitionTypeID: string;
|
|
10
|
+
/** The base price. Zero is a valid price: deals that always enter their own amount still need one. */
|
|
11
|
+
BasePrice: number | null;
|
|
12
|
+
/** `YYYY-MM-DD`. A price applies only to orders dated on or after it. */
|
|
13
|
+
PriceEffectiveFrom: string;
|
|
14
|
+
}
|
|
15
|
+
/** The name the base price row gets, matching what the pricing widget calls a no-list price. */
|
|
16
|
+
export declare const BASE_PRICE_NAME = "List";
|
|
17
|
+
/** A blank draft. The price starts at zero and applies from today. */
|
|
18
|
+
export declare function EmptyNewProductDraft(today: string): NewProductDraft;
|
|
19
|
+
/** One sentence per field the draft is missing or has wrong; empty when it can be saved. */
|
|
20
|
+
export declare function ValidateNewProductDraft(draft: NewProductDraft): string[];
|
|
21
|
+
/**
|
|
22
|
+
* The recognition type a product of this type gets unless the user picks another: the type's
|
|
23
|
+
* default, or the current choice when the type has none.
|
|
24
|
+
*/
|
|
25
|
+
export declare function RevenueRecognitionForType(types: readonly Pick<mjBizAppsOrdersProductTypeEntity, 'ID' | 'DefaultRevenueRecognitionTypeID'>[], productTypeID: string, current: string): string;
|
|
26
|
+
/**
|
|
27
|
+
* Fills a new product from the draft and adds its base price to the product's `Prices` collection,
|
|
28
|
+
* so the caller's `product.Save()` writes both or neither. The product is left Draft.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ApplyNewProductDraft(product: mjBizAppsOrdersProductEntity, draft: NewProductDraft): Promise<mjBizAppsOrdersProductPriceEntity>;
|
|
31
|
+
//# sourceMappingURL=new-product-draft.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-product-draft.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/catalog/new-product-draft.ts"],"names":[],"mappings":"AAYA,OAAO,EAGH,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,EACtC,KAAK,gCAAgC,EACxC,MAAM,8BAA8B,CAAC;AAEtC,kGAAkG;AAClG,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,wBAAwB,EAAE,MAAM,CAAC;IACjC,sGAAsG;IACtG,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,yEAAyE;IACzE,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAED,gGAAgG;AAChG,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC,sEAAsE;AACtE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,CAWnE;AAED,4FAA4F;AAC5F,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM,EAAE,CAYxE;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,SAAS,IAAI,CAAC,gCAAgC,EAAE,IAAI,GAAG,iCAAiC,CAAC,EAAE,EAClG,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,GAChB,MAAM,CAGR;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE,4BAA4B,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,iCAAiC,CAAC,CAoBpJ"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What the New product dialog collects in its first step, and how it becomes a saved product
|
|
3
|
+
* (golive#434).
|
|
4
|
+
*
|
|
5
|
+
* A product the catalog can sell needs four things that used to be set on separate screens: the
|
|
6
|
+
* record, a base price, GL accounts for Sales and Deferred Revenue, and Status = Active. Each missing
|
|
7
|
+
* one failed only at the next step. The dialog asks for the record and its base price together, and
|
|
8
|
+
* {@link ApplyNewProductDraft} puts both on one product so a single `Save()` writes them as one unit
|
|
9
|
+
* (the product's `Prices` collection is an entity graph). The product stays Draft until the dialog's
|
|
10
|
+
* second step has checked its GL accounts.
|
|
11
|
+
*/
|
|
12
|
+
import { UUIDsEqual } from '@memberjunction/global';
|
|
13
|
+
import { AsDateValue, TodayAsDateValue, } from '@mj-biz-apps/orders-entities';
|
|
14
|
+
/** The name the base price row gets, matching what the pricing widget calls a no-list price. */
|
|
15
|
+
export const BASE_PRICE_NAME = 'List';
|
|
16
|
+
/** A blank draft. The price starts at zero and applies from today. */
|
|
17
|
+
export function EmptyNewProductDraft(today) {
|
|
18
|
+
return {
|
|
19
|
+
Name: '',
|
|
20
|
+
SKU: '',
|
|
21
|
+
CompanyID: '',
|
|
22
|
+
ProductCategoryID: '',
|
|
23
|
+
ProductTypeID: '',
|
|
24
|
+
RevenueRecognitionTypeID: '',
|
|
25
|
+
BasePrice: 0,
|
|
26
|
+
PriceEffectiveFrom: today,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** One sentence per field the draft is missing or has wrong; empty when it can be saved. */
|
|
30
|
+
export function ValidateNewProductDraft(draft) {
|
|
31
|
+
const errors = [];
|
|
32
|
+
if (!draft.Name.trim())
|
|
33
|
+
errors.push('Enter a name.');
|
|
34
|
+
if (!draft.CompanyID)
|
|
35
|
+
errors.push('Choose the company that sells it.');
|
|
36
|
+
if (!draft.ProductCategoryID)
|
|
37
|
+
errors.push('Choose a category.');
|
|
38
|
+
if (!draft.ProductTypeID)
|
|
39
|
+
errors.push('Choose a product type.');
|
|
40
|
+
if (!draft.RevenueRecognitionTypeID)
|
|
41
|
+
errors.push('Choose how revenue is recognized.');
|
|
42
|
+
if (draft.BasePrice == null || !Number.isFinite(draft.BasePrice) || draft.BasePrice < 0) {
|
|
43
|
+
errors.push('Enter a base price of zero or more.');
|
|
44
|
+
}
|
|
45
|
+
if (!AsDateValue(draft.PriceEffectiveFrom))
|
|
46
|
+
errors.push('Enter the date the price applies from.');
|
|
47
|
+
return errors;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The recognition type a product of this type gets unless the user picks another: the type's
|
|
51
|
+
* default, or the current choice when the type has none.
|
|
52
|
+
*/
|
|
53
|
+
export function RevenueRecognitionForType(types, productTypeID, current) {
|
|
54
|
+
const type = types.find((t) => UUIDsEqual(t.ID, productTypeID));
|
|
55
|
+
return type?.DefaultRevenueRecognitionTypeID ?? current;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Fills a new product from the draft and adds its base price to the product's `Prices` collection,
|
|
59
|
+
* so the caller's `product.Save()` writes both or neither. The product is left Draft.
|
|
60
|
+
*/
|
|
61
|
+
export async function ApplyNewProductDraft(product, draft) {
|
|
62
|
+
product.Name = draft.Name.trim();
|
|
63
|
+
product.SKU = draft.SKU.trim() || null;
|
|
64
|
+
product.CompanyID = draft.CompanyID;
|
|
65
|
+
product.ProductCategoryID = draft.ProductCategoryID;
|
|
66
|
+
product.ProductTypeID = draft.ProductTypeID;
|
|
67
|
+
product.RevenueRecognitionTypeID = draft.RevenueRecognitionTypeID;
|
|
68
|
+
product.Status = 'Draft';
|
|
69
|
+
const price = await product.Prices.Create();
|
|
70
|
+
price.PriceListID = null;
|
|
71
|
+
price.Name = BASE_PRICE_NAME;
|
|
72
|
+
price.Amount = draft.BasePrice ?? 0;
|
|
73
|
+
price.PricingModel = 'PerUnit';
|
|
74
|
+
price.FeeType = 'Standard';
|
|
75
|
+
price.Priority = 0;
|
|
76
|
+
price.Status = 'Active';
|
|
77
|
+
// The chosen day at midnight UTC, the same rule the pricing widget follows.
|
|
78
|
+
price.EffectiveFrom = AsDateValue(draft.PriceEffectiveFrom) ?? TodayAsDateValue();
|
|
79
|
+
return price;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=new-product-draft.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"new-product-draft.js","sourceRoot":"","sources":["../../../../src/lib/pages/catalog/new-product-draft.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACH,WAAW,EACX,gBAAgB,GAInB,MAAM,8BAA8B,CAAC;AAgBtC,gGAAgG;AAChG,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AAEtC,sEAAsE;AACtE,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAC9C,OAAO;QACH,IAAI,EAAE,EAAE;QACR,GAAG,EAAE,EAAE;QACP,SAAS,EAAE,EAAE;QACb,iBAAiB,EAAE,EAAE;QACrB,aAAa,EAAE,EAAE;QACjB,wBAAwB,EAAE,EAAE;QAC5B,SAAS,EAAE,CAAC;QACZ,kBAAkB,EAAE,KAAK;KAC5B,CAAC;AACN,CAAC;AAED,4FAA4F;AAC5F,MAAM,UAAU,uBAAuB,CAAC,KAAsB;IAC1D,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE;QAAE,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACrD,IAAI,CAAC,KAAK,CAAC,SAAS;QAAE,MAAM,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;IACvE,IAAI,CAAC,KAAK,CAAC,iBAAiB;QAAE,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IAChE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B,GAAG,KAAK,CAAC,wBAAwB,CAAC;IAClE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC;IAEzB,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;IAC5C,KAAK,CAAC,WAAW,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,IAAI,GAAG,eAAe,CAAC;IAC7B,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,SAAS,IAAI,CAAC,CAAC;IACpC,KAAK,CAAC,YAAY,GAAG,SAAS,CAAC;IAC/B,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC;IAC3B,KAAK,CAAC,QAAQ,GAAG,CAAC,CAAC;IACnB,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC;IACxB,4EAA4E;IAC5E,KAAK,CAAC,aAAa,GAAG,WAAW,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,gBAAgB,EAAE,CAAC;IAClF,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { type EntityInfo } from '@memberjunction/core';
|
|
3
|
+
import { type RecordOpenRequest, type WorkspaceOpenEvent } from '../workspace-requests.js';
|
|
3
4
|
import type { mjBizAppsOrdersPriceListEntity, mjBizAppsOrdersPriceTierEntity, mjBizAppsOrdersProductPriceEntity, mjBizAppsOrdersPromotionEntity } from '@mj-biz-apps/orders-entities';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
@@ -27,11 +28,17 @@ import * as i0 from "@angular/core";
|
|
|
27
28
|
*/
|
|
28
29
|
export declare class MJOPricingPageComponent implements OnInit {
|
|
29
30
|
private readonly cdr;
|
|
31
|
+
/** The grid's New button: the section opens a blank form for this entity. */
|
|
32
|
+
RecordCreateRequested: EventEmitter<string>;
|
|
33
|
+
/** A grid row double-click: the section opens that record's form. */
|
|
34
|
+
RecordOpenRequested: EventEmitter<RecordOpenRequest>;
|
|
30
35
|
ProductPriceEntityInfo: EntityInfo | null;
|
|
31
36
|
Rows: mjBizAppsOrdersProductPriceEntity[];
|
|
32
37
|
PriceLists: mjBizAppsOrdersPriceListEntity[];
|
|
33
38
|
Tiers: mjBizAppsOrdersPriceTierEntity[];
|
|
34
39
|
ngOnInit(): Promise<void>;
|
|
40
|
+
/** Relay a row double-click to the section, which owns navigation. */
|
|
41
|
+
OnRecordOpened(event: WorkspaceOpenEvent): void;
|
|
35
42
|
/**
|
|
36
43
|
* Rules that only apply at certain times.
|
|
37
44
|
*
|
|
@@ -50,7 +57,7 @@ export declare class MJOPricingPageComponent implements OnInit {
|
|
|
50
57
|
protected statusChip(status: unknown): string;
|
|
51
58
|
protected money(value: unknown): string;
|
|
52
59
|
static ɵfac: i0.ɵɵFactoryDeclaration<MJOPricingPageComponent, never>;
|
|
53
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MJOPricingPageComponent, "mjo-pricing-page", never, {}, {}, never, never, true, never>;
|
|
60
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJOPricingPageComponent, "mjo-pricing-page", never, {}, { "RecordCreateRequested": "RecordCreateRequested"; "RecordOpenRequested": "RecordOpenRequested"; }, never, never, true, never>;
|
|
54
61
|
}
|
|
55
62
|
/**
|
|
56
63
|
* `mjo-promotions-page` — offers, and the codes that redeem them.
|
|
@@ -72,10 +79,16 @@ export declare class MJOPricingPageComponent implements OnInit {
|
|
|
72
79
|
*/
|
|
73
80
|
export declare class MJOPromotionsPageComponent implements OnInit {
|
|
74
81
|
private readonly cdr;
|
|
82
|
+
/** The grid's New button: the section opens a blank form for this entity. */
|
|
83
|
+
RecordCreateRequested: EventEmitter<string>;
|
|
84
|
+
/** A grid row double-click: the section opens that record's form. */
|
|
85
|
+
RecordOpenRequested: EventEmitter<RecordOpenRequest>;
|
|
75
86
|
PromotionEntityInfo: EntityInfo | null;
|
|
76
87
|
Rows: mjBizAppsOrdersPromotionEntity[];
|
|
77
88
|
ngOnInit(): Promise<void>;
|
|
89
|
+
/** Relay a row double-click to the section, which owns navigation. */
|
|
90
|
+
OnRecordOpened(event: WorkspaceOpenEvent): void;
|
|
78
91
|
static ɵfac: i0.ɵɵFactoryDeclaration<MJOPromotionsPageComponent, never>;
|
|
79
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MJOPromotionsPageComponent, "mjo-promotions-page", never, {}, {}, never, never, true, never>;
|
|
92
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJOPromotionsPageComponent, "mjo-promotions-page", never, {}, { "RecordCreateRequested": "RecordCreateRequested"; "RecordOpenRequested": "RecordOpenRequested"; }, never, never, true, never>;
|
|
80
93
|
}
|
|
81
94
|
//# sourceMappingURL=pricing.page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing.page.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/catalog/pricing.page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,MAAM,
|
|
1
|
+
{"version":3,"file":"pricing.page.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/catalog/pricing.page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,YAAY,EAAE,MAAM,EAAkB,MAAM,eAAe,CAAC;AAGnG,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKjE,OAAO,EAAuB,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC7G,OAAO,KAAK,EAAE,8BAA8B,EAAE,8BAA8B,EAAE,iCAAiC,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;;AAEtL;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBA0Ma,uBAAwB,YAAW,MAAM;IAClD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IAEjD,6EAA6E;IACnE,qBAAqB,uBAA8B;IAC7D,qEAAqE;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
|
1
|
-
import { ChangeDetectorRef, Component, inject } from '@angular/core';
|
|
1
|
+
import { ChangeDetectorRef, Component, EventEmitter, Output, inject } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
3
|
import { EntityViewerModule } from '@memberjunction/ng-entity-viewer';
|
|
4
4
|
import { Metadata } from '@memberjunction/core';
|
|
@@ -6,15 +6,19 @@ import { FormatDate, FormatMoney } from '../../panels/money-format.js';
|
|
|
6
6
|
import { MJAlertComponent } from '@memberjunction/ng-ui-components';
|
|
7
7
|
import { GetPriceLists, GetPriceTiers, GetProductPrices, GetPromotions } from '../../data/orders-queries.js';
|
|
8
8
|
import { MJO_ENTITIES } from '../../data/entity-names.js';
|
|
9
|
+
import { ToRecordOpenRequest } from '../workspace-requests.js';
|
|
9
10
|
import * as i0 from "@angular/core";
|
|
10
11
|
import * as i1 from "@memberjunction/ng-entity-viewer";
|
|
11
12
|
const _forTrack0 = ($index, $item) => $item["ID"];
|
|
12
13
|
const _forTrack1 = ($index, $item) => $item.Key;
|
|
13
14
|
function MJOPricingPageComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
-
i0.ɵɵ
|
|
15
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
16
|
+
i0.ɵɵelementStart(0, "mj-view-workspace", 20);
|
|
17
|
+
i0.ɵɵlistener("OpenRecordRequested", function MJOPricingPageComponent_Conditional_5_Template_mj_view_workspace_OpenRecordRequested_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnRecordOpened($event)); })("CreateNewRecordRequested", function MJOPricingPageComponent_Conditional_5_Template_mj_view_workspace_CreateNewRecordRequested_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.RecordCreateRequested.emit($event.Name)); });
|
|
18
|
+
i0.ɵɵelementEnd();
|
|
15
19
|
} if (rf & 2) {
|
|
16
|
-
const
|
|
17
|
-
i0.ɵɵproperty("Entity",
|
|
20
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
21
|
+
i0.ɵɵproperty("Entity", ctx_r1.ProductPriceEntityInfo)("AutoSaveView", true);
|
|
18
22
|
} }
|
|
19
23
|
function MJOPricingPageComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
20
24
|
i0.ɵɵelementStart(0, "div", 3);
|
|
@@ -24,78 +28,81 @@ function MJOPricingPageComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
|
24
28
|
function MJOPricingPageComponent_For_27_Template(rf, ctx) { if (rf & 1) {
|
|
25
29
|
i0.ɵɵelementStart(0, "tr")(1, "td");
|
|
26
30
|
i0.ɵɵtext(2);
|
|
27
|
-
i0.ɵɵelementStart(3, "div",
|
|
31
|
+
i0.ɵɵelementStart(3, "div", 21);
|
|
28
32
|
i0.ɵɵtext(4);
|
|
29
33
|
i0.ɵɵelementEnd()();
|
|
30
|
-
i0.ɵɵelementStart(5, "td",
|
|
34
|
+
i0.ɵɵelementStart(5, "td", 22);
|
|
31
35
|
i0.ɵɵtext(6);
|
|
32
36
|
i0.ɵɵelementEnd();
|
|
33
|
-
i0.ɵɵelementStart(7, "td")(8, "span",
|
|
37
|
+
i0.ɵɵelementStart(7, "td")(8, "span", 23);
|
|
34
38
|
i0.ɵɵtext(9);
|
|
35
39
|
i0.ɵɵelementEnd()()();
|
|
36
40
|
} if (rf & 2) {
|
|
37
|
-
const
|
|
38
|
-
const
|
|
41
|
+
const list_r3 = ctx.$implicit;
|
|
42
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
39
43
|
i0.ɵɵadvance(2);
|
|
40
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
44
|
+
i0.ɵɵtextInterpolate1(" ", list_r3["Name"], " ");
|
|
41
45
|
i0.ɵɵadvance(2);
|
|
42
|
-
i0.ɵɵtextInterpolate(
|
|
46
|
+
i0.ɵɵtextInterpolate(list_r3["Code"]);
|
|
43
47
|
i0.ɵɵadvance(2);
|
|
44
|
-
i0.ɵɵtextInterpolate(
|
|
48
|
+
i0.ɵɵtextInterpolate(ctx_r1.windowOf(list_r3));
|
|
45
49
|
i0.ɵɵadvance(2);
|
|
46
|
-
i0.ɵɵclassMap(
|
|
50
|
+
i0.ɵɵclassMap(ctx_r1.statusChip(list_r3["Status"]));
|
|
47
51
|
i0.ɵɵadvance();
|
|
48
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
52
|
+
i0.ɵɵtextInterpolate1(" ", list_r3["Status"] ?? "\u2014", " ");
|
|
49
53
|
} }
|
|
50
54
|
function MJOPricingPageComponent_ForEmpty_28_Template(rf, ctx) { if (rf & 1) {
|
|
51
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
55
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 24);
|
|
52
56
|
i0.ɵɵtext(2, " No price lists. Products use their default price. ");
|
|
53
57
|
i0.ɵɵelementEnd()();
|
|
54
58
|
} }
|
|
55
59
|
function MJOPricingPageComponent_For_70_Template(rf, ctx) { if (rf & 1) {
|
|
56
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
60
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 22);
|
|
57
61
|
i0.ɵɵtext(2);
|
|
58
62
|
i0.ɵɵelementEnd();
|
|
59
63
|
i0.ɵɵelementStart(3, "td", 17);
|
|
60
64
|
i0.ɵɵtext(4);
|
|
61
65
|
i0.ɵɵelementEnd()();
|
|
62
66
|
} if (rf & 2) {
|
|
63
|
-
const
|
|
64
|
-
const
|
|
67
|
+
const tier_r4 = ctx.$implicit;
|
|
68
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
65
69
|
i0.ɵɵadvance(2);
|
|
66
|
-
i0.ɵɵtextInterpolate(
|
|
70
|
+
i0.ɵɵtextInterpolate(ctx_r1.bandOf(tier_r4));
|
|
67
71
|
i0.ɵɵadvance(2);
|
|
68
|
-
i0.ɵɵtextInterpolate(
|
|
72
|
+
i0.ɵɵtextInterpolate(ctx_r1.money(tier_r4["Amount"]));
|
|
69
73
|
} }
|
|
70
74
|
function MJOPricingPageComponent_ForEmpty_71_Template(rf, ctx) { if (rf & 1) {
|
|
71
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
75
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 25);
|
|
72
76
|
i0.ɵɵtext(2, " No quantity bands. ");
|
|
73
77
|
i0.ɵɵelementEnd()();
|
|
74
78
|
} }
|
|
75
79
|
function MJOPricingPageComponent_For_89_Template(rf, ctx) { if (rf & 1) {
|
|
76
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
80
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 22);
|
|
77
81
|
i0.ɵɵtext(2);
|
|
78
82
|
i0.ɵɵelementEnd();
|
|
79
|
-
i0.ɵɵelementStart(3, "td",
|
|
83
|
+
i0.ɵɵelementStart(3, "td", 22);
|
|
80
84
|
i0.ɵɵtext(4);
|
|
81
85
|
i0.ɵɵelementEnd()();
|
|
82
86
|
} if (rf & 2) {
|
|
83
|
-
const
|
|
87
|
+
const row_r5 = ctx.$implicit;
|
|
84
88
|
i0.ɵɵadvance(2);
|
|
85
|
-
i0.ɵɵtextInterpolate(
|
|
89
|
+
i0.ɵɵtextInterpolate(row_r5.Product);
|
|
86
90
|
i0.ɵɵadvance(2);
|
|
87
|
-
i0.ɵɵtextInterpolate(
|
|
91
|
+
i0.ɵɵtextInterpolate(row_r5.When);
|
|
88
92
|
} }
|
|
89
93
|
function MJOPricingPageComponent_ForEmpty_90_Template(rf, ctx) { if (rf & 1) {
|
|
90
|
-
i0.ɵɵelementStart(0, "tr")(1, "td",
|
|
94
|
+
i0.ɵɵelementStart(0, "tr")(1, "td", 25);
|
|
91
95
|
i0.ɵɵtext(2, " No recurrence restrictions. ");
|
|
92
96
|
i0.ɵɵelementEnd()();
|
|
93
97
|
} }
|
|
94
98
|
function MJOPromotionsPageComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
95
|
-
i0.ɵɵ
|
|
99
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
100
|
+
i0.ɵɵelementStart(0, "mj-view-workspace", 4);
|
|
101
|
+
i0.ɵɵlistener("OpenRecordRequested", function MJOPromotionsPageComponent_Conditional_5_Template_mj_view_workspace_OpenRecordRequested_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnRecordOpened($event)); })("CreateNewRecordRequested", function MJOPromotionsPageComponent_Conditional_5_Template_mj_view_workspace_CreateNewRecordRequested_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.RecordCreateRequested.emit($event.Name)); });
|
|
102
|
+
i0.ɵɵelementEnd();
|
|
96
103
|
} if (rf & 2) {
|
|
97
|
-
const
|
|
98
|
-
i0.ɵɵproperty("Entity",
|
|
104
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
105
|
+
i0.ɵɵproperty("Entity", ctx_r1.PromotionEntityInfo)("AutoSaveView", true);
|
|
99
106
|
} }
|
|
100
107
|
function MJOPromotionsPageComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
101
108
|
i0.ɵɵelementStart(0, "div", 3);
|
|
@@ -127,6 +134,10 @@ function MJOPromotionsPageComponent_Conditional_6_Template(rf, ctx) { if (rf & 1
|
|
|
127
134
|
*/
|
|
128
135
|
export class MJOPricingPageComponent {
|
|
129
136
|
cdr = inject(ChangeDetectorRef);
|
|
137
|
+
/** The grid's New button: the section opens a blank form for this entity. */
|
|
138
|
+
RecordCreateRequested = new EventEmitter();
|
|
139
|
+
/** A grid row double-click: the section opens that record's form. */
|
|
140
|
+
RecordOpenRequested = new EventEmitter();
|
|
130
141
|
ProductPriceEntityInfo = null;
|
|
131
142
|
Rows = [];
|
|
132
143
|
PriceLists = [];
|
|
@@ -144,6 +155,12 @@ export class MJOPricingPageComponent {
|
|
|
144
155
|
this.Tiers = tiers;
|
|
145
156
|
this.cdr.detectChanges();
|
|
146
157
|
}
|
|
158
|
+
/** Relay a row double-click to the section, which owns navigation. */
|
|
159
|
+
OnRecordOpened(event) {
|
|
160
|
+
const request = ToRecordOpenRequest(event);
|
|
161
|
+
if (request)
|
|
162
|
+
this.RecordOpenRequested.emit(request);
|
|
163
|
+
}
|
|
147
164
|
/**
|
|
148
165
|
* Rules that only apply at certain times.
|
|
149
166
|
*
|
|
@@ -201,7 +218,7 @@ export class MJOPricingPageComponent {
|
|
|
201
218
|
return FormatMoney(Number(value ?? 0));
|
|
202
219
|
}
|
|
203
220
|
static ɵfac = function MJOPricingPageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJOPricingPageComponent)(); };
|
|
204
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJOPricingPageComponent, selectors: [["mjo-pricing-page"]], decls: 93, vars: 5, consts: [["Variant", "info", "Icon", "fa-solid fa-tags", 1, "mjo-pr__note"], [1, "mjo-pr__viewer-host"], [3, "Entity", "AutoSaveView"], [1, "small", "muted", 2, "padding", "24px"], [1, "mjo-pr__grid"], [1, "mj-card"], [1, "mj-card-head"], ["aria-hidden", "true", 1, "fa-solid", "fa-tags"], [1, "right", "small", "muted"], [1, "mj-table-wrap"], [1, "mj-table", "mj-table--compact"], ["aria-hidden", "true", 1, "fa-solid", "fa-sitemap"], [1, "mj-card-pad"], [1, "mjo-pr__walk"], [1, "small", "muted", "mjo-pr__note"], [1, "mjo-pr__grid", "mjo-pr__block"], ["aria-hidden", "true", 1, "fa-solid", "fa-layer-group"], [1, "num"], [1, "mj-card-pad", "small", "muted"], ["aria-hidden", "true", 1, "fa-solid", "fa-clock"], [1, "secondary", "mono"], [1, "small"], [1, "mjo-chip"], ["colspan", "3", 1, "small", "muted"], ["colspan", "2", 1, "small", "muted"]], template: function MJOPricingPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
221
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJOPricingPageComponent, selectors: [["mjo-pricing-page"]], outputs: { RecordCreateRequested: "RecordCreateRequested", RecordOpenRequested: "RecordOpenRequested" }, decls: 93, vars: 5, consts: [["Variant", "info", "Icon", "fa-solid fa-tags", 1, "mjo-pr__note"], [1, "mjo-pr__viewer-host"], [3, "Entity", "AutoSaveView"], [1, "small", "muted", 2, "padding", "24px"], [1, "mjo-pr__grid"], [1, "mj-card"], [1, "mj-card-head"], ["aria-hidden", "true", 1, "fa-solid", "fa-tags"], [1, "right", "small", "muted"], [1, "mj-table-wrap"], [1, "mj-table", "mj-table--compact"], ["aria-hidden", "true", 1, "fa-solid", "fa-sitemap"], [1, "mj-card-pad"], [1, "mjo-pr__walk"], [1, "small", "muted", "mjo-pr__note"], [1, "mjo-pr__grid", "mjo-pr__block"], ["aria-hidden", "true", 1, "fa-solid", "fa-layer-group"], [1, "num"], [1, "mj-card-pad", "small", "muted"], ["aria-hidden", "true", 1, "fa-solid", "fa-clock"], [3, "OpenRecordRequested", "CreateNewRecordRequested", "Entity", "AutoSaveView"], [1, "secondary", "mono"], [1, "small"], [1, "mjo-chip"], ["colspan", "3", 1, "small", "muted"], ["colspan", "2", 1, "small", "muted"]], template: function MJOPricingPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
205
222
|
i0.ɵɵelementStart(0, "mj-alert", 0)(1, "strong");
|
|
206
223
|
i0.ɵɵtext(2, "Each row is one price rule.");
|
|
207
224
|
i0.ɵɵelementEnd();
|
|
@@ -318,7 +335,9 @@ export class MJOPricingPageComponent {
|
|
|
318
335
|
@if (ProductPriceEntityInfo) {
|
|
319
336
|
<mj-view-workspace
|
|
320
337
|
[Entity]="ProductPriceEntityInfo"
|
|
321
|
-
[AutoSaveView]="true"
|
|
338
|
+
[AutoSaveView]="true"
|
|
339
|
+
(OpenRecordRequested)="OnRecordOpened($event)"
|
|
340
|
+
(CreateNewRecordRequested)="RecordCreateRequested.emit($event.Name)">
|
|
322
341
|
</mj-view-workspace>
|
|
323
342
|
} @else {
|
|
324
343
|
<div class="small muted" style="padding: 24px;">Loading price rules...</div>
|
|
@@ -457,8 +476,12 @@ export class MJOPricingPageComponent {
|
|
|
457
476
|
</div>
|
|
458
477
|
</div>
|
|
459
478
|
`, styles: ["\n :host {\n display: block;\n height: 100%;\n overflow: auto;\n padding: var(--mj-space-6);\n }\n .mjo-pr__note { margin-bottom: var(--mj-space-4); }\n .mjo-pr__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-view-workspace {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n min-height: 0;\n }\n .mjo-pr__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-pr__block { margin-top: var(--mj-space-4); }\n .mjo-pr__walk { margin: 0; padding-left: var(--mj-space-5); }\n .mjo-pr__walk li { margin-bottom: var(--mj-space-2); }\n @media (max-width: 1000px) {\n .mjo-pr__grid { grid-template-columns: 1fr; }\n }\n @media (max-width: 760px) {\n :host { padding: var(--mj-space-4); }\n }\n "] }]
|
|
460
|
-
}], null,
|
|
461
|
-
|
|
479
|
+
}], null, { RecordCreateRequested: [{
|
|
480
|
+
type: Output
|
|
481
|
+
}], RecordOpenRequested: [{
|
|
482
|
+
type: Output
|
|
483
|
+
}] }); })();
|
|
484
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJOPricingPageComponent, { className: "MJOPricingPageComponent", filePath: "lib/pages/catalog/pricing.page.ts", lineNumber: 237 }); })();
|
|
462
485
|
/**
|
|
463
486
|
* `mjo-promotions-page` — offers, and the codes that redeem them.
|
|
464
487
|
*
|
|
@@ -479,6 +502,10 @@ export class MJOPricingPageComponent {
|
|
|
479
502
|
*/
|
|
480
503
|
export class MJOPromotionsPageComponent {
|
|
481
504
|
cdr = inject(ChangeDetectorRef);
|
|
505
|
+
/** The grid's New button: the section opens a blank form for this entity. */
|
|
506
|
+
RecordCreateRequested = new EventEmitter();
|
|
507
|
+
/** A grid row double-click: the section opens that record's form. */
|
|
508
|
+
RecordOpenRequested = new EventEmitter();
|
|
482
509
|
PromotionEntityInfo = null;
|
|
483
510
|
Rows = [];
|
|
484
511
|
async ngOnInit() {
|
|
@@ -487,8 +514,14 @@ export class MJOPromotionsPageComponent {
|
|
|
487
514
|
this.Rows = await GetPromotions();
|
|
488
515
|
this.cdr.detectChanges();
|
|
489
516
|
}
|
|
517
|
+
/** Relay a row double-click to the section, which owns navigation. */
|
|
518
|
+
OnRecordOpened(event) {
|
|
519
|
+
const request = ToRecordOpenRequest(event);
|
|
520
|
+
if (request)
|
|
521
|
+
this.RecordOpenRequested.emit(request);
|
|
522
|
+
}
|
|
490
523
|
static ɵfac = function MJOPromotionsPageComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJOPromotionsPageComponent)(); };
|
|
491
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJOPromotionsPageComponent, selectors: [["mjo-promotions-page"]], decls: 7, vars: 1, consts: [["Variant", "info", "Icon", "fa-solid fa-percent", 1, "mjo-pr__note"], [1, "mjo-pr__viewer-host"], [3, "Entity", "AutoSaveView"], [1, "small", "muted", 2, "padding", "24px"]], template: function MJOPromotionsPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
524
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJOPromotionsPageComponent, selectors: [["mjo-promotions-page"]], outputs: { RecordCreateRequested: "RecordCreateRequested", RecordOpenRequested: "RecordOpenRequested" }, decls: 7, vars: 1, consts: [["Variant", "info", "Icon", "fa-solid fa-percent", 1, "mjo-pr__note"], [1, "mjo-pr__viewer-host"], [3, "Entity", "AutoSaveView"], [1, "small", "muted", 2, "padding", "24px"], [3, "OpenRecordRequested", "CreateNewRecordRequested", "Entity", "AutoSaveView"]], template: function MJOPromotionsPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
492
525
|
i0.ɵɵelementStart(0, "mj-alert", 0)(1, "strong");
|
|
493
526
|
i0.ɵɵtext(2, "A promotion is the offer; a code is a string pointing at it.");
|
|
494
527
|
i0.ɵɵelementEnd();
|
|
@@ -515,13 +548,19 @@ export class MJOPromotionsPageComponent {
|
|
|
515
548
|
@if (PromotionEntityInfo) {
|
|
516
549
|
<mj-view-workspace
|
|
517
550
|
[Entity]="PromotionEntityInfo"
|
|
518
|
-
[AutoSaveView]="true"
|
|
551
|
+
[AutoSaveView]="true"
|
|
552
|
+
(OpenRecordRequested)="OnRecordOpened($event)"
|
|
553
|
+
(CreateNewRecordRequested)="RecordCreateRequested.emit($event.Name)">
|
|
519
554
|
</mj-view-workspace>
|
|
520
555
|
} @else {
|
|
521
556
|
<div class="small muted" style="padding: 24px;">Loading promotions...</div>
|
|
522
557
|
}
|
|
523
558
|
</div>
|
|
524
559
|
`, styles: ["\n :host {\n display: block;\n height: 100%;\n overflow: auto;\n padding: var(--mj-space-6);\n }\n .mjo-pr__note { margin-bottom: var(--mj-space-4); }\n .mjo-pr__viewer-host {\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-view-workspace {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n height: 100%;\n width: 100%;\n min-height: 0;\n }\n @media (max-width: 760px) {\n :host { padding: var(--mj-space-4); }\n }\n "] }]
|
|
525
|
-
}], null,
|
|
526
|
-
|
|
560
|
+
}], null, { RecordCreateRequested: [{
|
|
561
|
+
type: Output
|
|
562
|
+
}], RecordOpenRequested: [{
|
|
563
|
+
type: Output
|
|
564
|
+
}] }); })();
|
|
565
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJOPromotionsPageComponent, { className: "MJOPromotionsPageComponent", filePath: "lib/pages/catalog/pricing.page.ts", lineNumber: 408 }); })();
|
|
527
566
|
//# sourceMappingURL=pricing.page.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing.page.js","sourceRoot":"","sources":["../../../../src/lib/pages/catalog/pricing.page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"pricing.page.js","sourceRoot":"","sources":["../../../../src/lib/pages/catalog/pricing.page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,YAAY,EAAU,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACnG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAmB,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1G,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAmD,MAAM,uBAAuB,CAAC;;;4CA+D5E,IAAI;;;;IAxBrB,6CAIyE;IAArE,AADA,wOAAuB,6BAAsB,KAAC,qOAClB,8CAAuC,KAAC;IACxE,iBAAoB;;;IAHhB,AADA,sDAAiC,sBACZ;;;IAKz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3B,AAPF,0GAA2B,sEAOlB;YAGb,iBAAM;;YAVF,eASC;YATD,iDASC;4BAlBC,YAAY,EAAE,kBAAkB,6BAAE,gBAAgB;;iFAsDnD,0BAA0B;cAzDtC,SAAS;2BACI,qBAAqB,cACnB,IAAI,WACP,CAAC,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,CAAC,YACnD;;;;;;;;;;;;;;;;;;;KAmBT;;kBAsCA,MAAM;;kBAEN,MAAM;;kFANE,0BAA0B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
2
|
import { type EntityInfo } from '@memberjunction/core';
|
|
3
|
+
import { type RecordOpenRequest, type WorkspaceOpenEvent } from '../workspace-requests.js';
|
|
3
4
|
import { type mjBizAppsOrdersChargeTypeEntity, type mjBizAppsOrdersCustomerTaxExemptionEntity, type mjBizAppsOrdersProductEntity } from '@mj-biz-apps/orders-entities';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
@@ -34,8 +35,10 @@ type OpenRecordRequest = {
|
|
|
34
35
|
export declare class MJOProductsPageComponent implements OnInit {
|
|
35
36
|
private readonly cdr;
|
|
36
37
|
ProductOpened: EventEmitter<mjBizAppsOrdersProductEntity>;
|
|
37
|
-
/** The grid's New button
|
|
38
|
-
|
|
38
|
+
/** The grid's New button opens the guided New product dialog (golive#434) rather than a blank form. */
|
|
39
|
+
NewProductOpen: boolean;
|
|
40
|
+
/** The product the dialog saved, opened once the dialog closes. */
|
|
41
|
+
private createdProductID;
|
|
39
42
|
ProductEntityInfo: EntityInfo | null;
|
|
40
43
|
Categories: Array<Record<string, unknown>>;
|
|
41
44
|
Types: Array<Record<string, unknown>>;
|
|
@@ -46,10 +49,13 @@ export declare class MJOProductsPageComponent implements OnInit {
|
|
|
46
49
|
* a half-built surrogate the section would try to route to.
|
|
47
50
|
*/
|
|
48
51
|
OnRecordOpened(event: OpenRecordRequest): void;
|
|
52
|
+
OnNewProductCreated(id: string): void;
|
|
53
|
+
/** The dialog closed: open the product it created, if it got that far. */
|
|
54
|
+
OnNewProductClosed(): void;
|
|
49
55
|
/** 'MJ_BizApps_Orders: Event Products' → 'Event Products'. */
|
|
50
56
|
protected shortEntity(name: unknown): string;
|
|
51
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<MJOProductsPageComponent, never>;
|
|
52
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MJOProductsPageComponent, "mjo-products-page", never, {}, { "ProductOpened": "ProductOpened";
|
|
58
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJOProductsPageComponent, "mjo-products-page", never, {}, { "ProductOpened": "ProductOpened"; }, never, never, true, never>;
|
|
53
59
|
}
|
|
54
60
|
/**
|
|
55
61
|
* `mjo-charges-tax-page` — shipping, handling and tax as one mechanism.
|
|
@@ -71,6 +77,10 @@ export declare class MJOProductsPageComponent implements OnInit {
|
|
|
71
77
|
*/
|
|
72
78
|
export declare class MJOChargesTaxPageComponent implements OnInit {
|
|
73
79
|
private readonly cdr;
|
|
80
|
+
/** The grid's New button: the section opens a blank form for this entity. */
|
|
81
|
+
RecordCreateRequested: EventEmitter<string>;
|
|
82
|
+
/** A grid row double-click: the section opens that record's form. */
|
|
83
|
+
RecordOpenRequested: EventEmitter<RecordOpenRequest>;
|
|
74
84
|
ChargeTypeEntityInfo: EntityInfo | null;
|
|
75
85
|
Rows: mjBizAppsOrdersChargeTypeEntity[];
|
|
76
86
|
Jurisdictions: Array<Record<string, unknown>>;
|
|
@@ -78,6 +88,8 @@ export declare class MJOChargesTaxPageComponent implements OnInit {
|
|
|
78
88
|
Nexus: Array<Record<string, unknown>>;
|
|
79
89
|
Exemptions: mjBizAppsOrdersCustomerTaxExemptionEntity[];
|
|
80
90
|
ngOnInit(): Promise<void>;
|
|
91
|
+
/** Relay a row double-click to the section, which owns navigation. */
|
|
92
|
+
OnRecordOpened(event: WorkspaceOpenEvent): void;
|
|
81
93
|
/**
|
|
82
94
|
* Jurisdictions joined to their CURRENT rate, one row per category.
|
|
83
95
|
*
|
|
@@ -110,7 +122,7 @@ export declare class MJOChargesTaxPageComponent implements OnInit {
|
|
|
110
122
|
protected jurisdictionOf(row: mjBizAppsOrdersCustomerTaxExemptionEntity): string;
|
|
111
123
|
protected exemptionClass(row: mjBizAppsOrdersCustomerTaxExemptionEntity): string;
|
|
112
124
|
static ɵfac: i0.ɵɵFactoryDeclaration<MJOChargesTaxPageComponent, never>;
|
|
113
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MJOChargesTaxPageComponent, "mjo-charges-tax-page", never, {}, {}, never, never, true, never>;
|
|
125
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJOChargesTaxPageComponent, "mjo-charges-tax-page", never, {}, { "RecordCreateRequested": "RecordCreateRequested"; "RecordOpenRequested": "RecordOpenRequested"; }, never, never, true, never>;
|
|
114
126
|
}
|
|
115
127
|
export {};
|
|
116
128
|
//# sourceMappingURL=products.page.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"products.page.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/catalog/products.page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,YAAY,EAAE,MAAM,EAAkB,MAAM,eAAe,CAAC;AAInG,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"products.page.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/catalog/products.page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,YAAY,EAAE,MAAM,EAAkB,MAAM,eAAe,CAAC;AAInG,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAMjE,OAAO,EAAuB,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC7G,OAAO,EAKH,KAAK,+BAA+B,EACpC,KAAK,yCAAyC,EAC9C,KAAK,4BAA4B,EACpC,MAAM,8BAA8B,C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