@mj-biz-apps/orders-ng 5.1.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/checkout-element/main.js +38080 -0
- package/dist/lib/checkout-widget/checkout-draft-line.d.ts +25 -0
- package/dist/lib/checkout-widget/checkout-draft-line.d.ts.map +1 -0
- package/dist/lib/checkout-widget/checkout-draft-line.js +46 -0
- package/dist/lib/checkout-widget/checkout-draft-line.js.map +1 -0
- package/dist/lib/checkout-widget/checkout-public-host.component.d.ts +80 -0
- package/dist/lib/checkout-widget/checkout-public-host.component.d.ts.map +1 -0
- package/dist/lib/checkout-widget/checkout-public-host.component.js +360 -0
- package/dist/lib/checkout-widget/checkout-public-host.component.js.map +1 -0
- package/dist/lib/checkout-widget/checkout-widget.component.d.ts +143 -0
- package/dist/lib/checkout-widget/checkout-widget.component.d.ts.map +1 -0
- package/dist/lib/checkout-widget/checkout-widget.component.js +873 -0
- package/dist/lib/checkout-widget/checkout-widget.component.js.map +1 -0
- package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts +1 -0
- package/dist/lib/custom/OrderHeader/order-header-form.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-header-form.component.js +10 -6
- package/dist/lib/custom/OrderHeader/order-header-form.component.js.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts +2 -0
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.d.ts.map +1 -1
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js +37 -11
- package/dist/lib/custom/OrderHeader/order-lines-editor.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-accounting-widget.component.js +9 -3
- package/dist/lib/custom/Product/widgets/product-accounting-widget.component.js.map +1 -1
- package/dist/lib/custom/Product/widgets/product-gl-links.component.d.ts +460 -0
- package/dist/lib/custom/Product/widgets/product-gl-links.component.d.ts.map +1 -0
- package/dist/lib/custom/Product/widgets/product-gl-links.component.js +1229 -0
- package/dist/lib/custom/Product/widgets/product-gl-links.component.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +18 -17
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +5 -0
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/form-panels/party-order-stats.js +2 -2
- package/dist/lib/form-panels/party-order-stats.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.js +103 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutSession/mjbizappsorderscheckoutsession.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.js +136 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidget/mjbizappsorderscheckoutwidget.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.js +106 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersCheckoutWidgetDistribution/mjbizappsorderscheckoutwidgetdistribution.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsOrdersEventOrderLine/mjbizappsorderseventorderline.form.component.js +9 -9
- package/dist/lib/generated/Entities/mjBizAppsOrdersEventOrderLine/mjbizappsorderseventorderline.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersEventProduct/mjbizappsorderseventproduct.form.component.js +12 -12
- package/dist/lib/generated/Entities/mjBizAppsOrdersEventProduct/mjbizappsorderseventproduct.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderCompanyPolicy/mjbizappsordersordercompanypolicy.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderCompanyPolicy/mjbizappsordersordercompanypolicy.form.component.js +16 -10
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderCompanyPolicy/mjbizappsordersordercompanypolicy.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.js +78 -52
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderHeader/mjbizappsordersorderheader.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.js +88 -82
- package/dist/lib/generated/Entities/mjBizAppsOrdersOrderLine/mjbizappsordersorderline.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentHeader/mjbizappsorderspaymentheader.form.component.js +3 -3
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentHeader/mjbizappsorderspaymentheader.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentIntent/mjbizappsorderspaymentintent.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentIntent/mjbizappsorderspaymentintent.form.component.js +23 -5
- package/dist/lib/generated/Entities/mjBizAppsOrdersPaymentIntent/mjbizappsorderspaymentintent.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.js +75 -69
- package/dist/lib/generated/Entities/mjBizAppsOrdersProduct/mjbizappsordersproduct.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.js +37 -31
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductCategory/mjbizappsordersproductcategory.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.js +24 -16
- package/dist/lib/generated/Entities/mjBizAppsOrdersProductType/mjbizappsordersproducttype.form.component.js.map +1 -1
- package/dist/lib/generated/generated-forms.module.d.ts +54 -51
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +27 -18
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/dist/lib/pages/catalog/pricing.page.d.ts +3 -24
- package/dist/lib/pages/catalog/pricing.page.d.ts.map +1 -1
- package/dist/lib/pages/catalog/pricing.page.js +158 -214
- package/dist/lib/pages/catalog/pricing.page.js.map +1 -1
- package/dist/lib/pages/catalog/products.page.d.ts +6 -29
- package/dist/lib/pages/catalog/products.page.d.ts.map +1 -1
- package/dist/lib/pages/catalog/products.page.js +255 -315
- package/dist/lib/pages/catalog/products.page.js.map +1 -1
- package/dist/lib/pages/orders/fulfillment.page.d.ts +14 -97
- package/dist/lib/pages/orders/fulfillment.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/fulfillment.page.js +93 -258
- package/dist/lib/pages/orders/fulfillment.page.js.map +1 -1
- package/dist/lib/pages/orders/order-document.page.js +1 -1
- package/dist/lib/pages/orders/order-document.page.js.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts +29 -58
- package/dist/lib/pages/orders/orders-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-dashboard.page.js +602 -352
- package/dist/lib/pages/orders/orders-dashboard.page.js.map +1 -1
- package/dist/lib/pages/orders/orders-list.page.d.ts +8 -58
- package/dist/lib/pages/orders/orders-list.page.d.ts.map +1 -1
- package/dist/lib/pages/orders/orders-list.page.js +52 -237
- package/dist/lib/pages/orders/orders-list.page.js.map +1 -1
- package/dist/lib/pages/payments/account-credit.page.d.ts +7 -17
- package/dist/lib/pages/payments/account-credit.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/account-credit.page.js +99 -85
- package/dist/lib/pages/payments/account-credit.page.js.map +1 -1
- package/dist/lib/pages/payments/payments-dashboard.page.d.ts +4 -15
- package/dist/lib/pages/payments/payments-dashboard.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/payments-dashboard.page.js +76 -111
- package/dist/lib/pages/payments/payments-dashboard.page.js.map +1 -1
- package/dist/lib/pages/payments/payments-list.page.d.ts +7 -41
- package/dist/lib/pages/payments/payments-list.page.d.ts.map +1 -1
- package/dist/lib/pages/payments/payments-list.page.js +51 -130
- package/dist/lib/pages/payments/payments-list.page.js.map +1 -1
- package/dist/lib/pages/receivables/customer-ar.page.d.ts +6 -8
- package/dist/lib/pages/receivables/customer-ar.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/customer-ar.page.js +112 -100
- package/dist/lib/pages/receivables/customer-ar.page.js.map +1 -1
- package/dist/lib/pages/receivables/overdue.page.d.ts +6 -3
- package/dist/lib/pages/receivables/overdue.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/overdue.page.js +61 -65
- package/dist/lib/pages/receivables/overdue.page.js.map +1 -1
- package/dist/lib/pages/receivables/subscriptions.page.d.ts +5 -9
- package/dist/lib/pages/receivables/subscriptions.page.d.ts.map +1 -1
- package/dist/lib/pages/receivables/subscriptions.page.js +139 -153
- package/dist/lib/pages/receivables/subscriptions.page.js.map +1 -1
- package/dist/lib/panels/order-stages.d.ts +12 -16
- package/dist/lib/panels/order-stages.d.ts.map +1 -1
- package/dist/lib/panels/order-stages.js +6 -42
- package/dist/lib/panels/order-stages.js.map +1 -1
- package/dist/lib/panels/party-orders-overview.component.d.ts +3 -1
- package/dist/lib/panels/party-orders-overview.component.d.ts.map +1 -1
- package/dist/lib/panels/party-orders-overview.component.js +18 -6
- package/dist/lib/panels/party-orders-overview.component.js.map +1 -1
- package/dist/lib/panels/status-stepper.component.d.ts +1 -1
- package/dist/lib/panels/status-stepper.component.d.ts.map +1 -1
- package/dist/lib/services/pricing-scheduler.service.d.ts +3 -4
- package/dist/lib/services/pricing-scheduler.service.d.ts.map +1 -1
- package/dist/lib/services/pricing-scheduler.service.js +3 -4
- package/dist/lib/services/pricing-scheduler.service.js.map +1 -1
- package/dist/public-api.d.ts +3 -2
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +3 -2
- package/dist/public-api.js.map +1 -1
- package/package.json +28 -16
- package/dist/lib/pages/orders/order-editor.page.d.ts +0 -547
- package/dist/lib/pages/orders/order-editor.page.d.ts.map +0 -1
- package/dist/lib/pages/orders/order-editor.page.js +0 -2269
- package/dist/lib/pages/orders/order-editor.page.js.map +0 -1
- package/dist/lib/pages/orders/order-workspace.page.d.ts +0 -120
- package/dist/lib/pages/orders/order-workspace.page.d.ts.map +0 -1
- package/dist/lib/pages/orders/order-workspace.page.js +0 -443
- package/dist/lib/pages/orders/order-workspace.page.js.map +0 -1
|
@@ -1,547 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnChanges, OnDestroy, OnInit, type SimpleChanges } from '@angular/core';
|
|
2
|
-
import { OrderHeaderEntity, type mjBizAppsOrdersOrderHeaderEntity, type mjBizAppsOrdersOrderLineDimensionEntity, type mjBizAppsOrdersOrderLineEntity, type mjBizAppsOrdersPaymentLineEntity } from '@mj-biz-apps/orders-entities';
|
|
3
|
-
import { type MJOCompanyOption } from '../../data/orders-queries.js';
|
|
4
|
-
import { type MJOEstimatedTotals, type MJOLinePrice, type MJOPricingState } from '../../services/pricing-scheduler.service.js';
|
|
5
|
-
import { type MJOPaymentStatus } from '../../panels/money-strip.component.js';
|
|
6
|
-
import { type MJOJournalEntry } from '../../panels/journal-entry-preview.component.js';
|
|
7
|
-
import { type MJOLadderRow } from '../../panels/decomposition-ladder.component.js';
|
|
8
|
-
import { type MJOOrderStage, type MJOStageChangeRequestEventArgs } from '../../panels/order-stages.js';
|
|
9
|
-
import type { MJOProductOption, MJOTenderOption } from '../../data/orders-queries.js';
|
|
10
|
-
import type { RunViewParams } from '@memberjunction/core';
|
|
11
|
-
import { type TabConfig } from '@memberjunction/ng-ui-components';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
/** Which tab is showing. */
|
|
14
|
-
export type MJOEditorTab = 'lines' | 'parties' | 'charges' | 'payment' | 'accounting' | 'journal' | 'subscriptions';
|
|
15
|
-
/** A tab, with the red-dot state that drives completeness gating. */
|
|
16
|
-
export interface MJOEditorTabDef {
|
|
17
|
-
Key: MJOEditorTab;
|
|
18
|
-
Label: string;
|
|
19
|
-
/** Count badge — lines, charges. Omit where a count says nothing. */
|
|
20
|
-
Count?: number | null;
|
|
21
|
-
/** Something on this tab is required and missing. */
|
|
22
|
-
HasError?: boolean;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* `mjo-order-editor-page` — the hard order, in five tabs.
|
|
26
|
-
*
|
|
27
|
-
* The full lane. Where fast entry covers one customer and a few products, this
|
|
28
|
-
* covers the order that has per-line ship-to parties, charge overrides, dimension
|
|
29
|
-
* tags and lines belonging to different companies.
|
|
30
|
-
*
|
|
31
|
-
* FIVE NUMBERS ON THE ROW, THE REST IN A DRAWER. An order line carries around
|
|
32
|
-
* eighteen meaningful fields. Putting them all inline makes the common case
|
|
33
|
-
* unreadable to serve the rare one, so the row shows product, quantity, unit
|
|
34
|
-
* price, discount and line total, and everything else opens on click.
|
|
35
|
-
*
|
|
36
|
-
* REQUIRED STATE IS A RED DOT ON THE TAB, never a disabled Save with no
|
|
37
|
-
* explanation. The validation comes from `OrderHeaderEntity.SectionsWithErrors()`, so the
|
|
38
|
-
* dot and the reason are the same source.
|
|
39
|
-
*
|
|
40
|
-
* CONFIRMING IS INTERCEPTED. The stepper's stage change is cancelable, and this
|
|
41
|
-
* page always cancels a move to `Confirmed` so the pre-flight review can run
|
|
42
|
-
* first — booking journal entries is not undoable, and an irreversible action
|
|
43
|
-
* gets a review step.
|
|
44
|
-
*
|
|
45
|
-
* ## Example
|
|
46
|
-
*
|
|
47
|
-
* ```html
|
|
48
|
-
* <mjo-order-editor-page
|
|
49
|
-
* [Order]="order"
|
|
50
|
-
* [Catalog]="products"
|
|
51
|
-
* [Status]="'Draft'"
|
|
52
|
-
* (ConfirmRequested)="openPreflight($event)" />
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
/** Which party a picker is editing. Bill-to and ship-to fall back independently. */
|
|
56
|
-
export type MJOPartyRole = 'bill' | 'ship';
|
|
57
|
-
/** One customer-search hit, as `MJOOrdersDataService.SearchCustomers` returns it. */
|
|
58
|
-
export interface MJOPartyMatch {
|
|
59
|
-
ID: string;
|
|
60
|
-
Name: string;
|
|
61
|
-
IsOrganization: boolean;
|
|
62
|
-
Email: string | null;
|
|
63
|
-
}
|
|
64
|
-
export declare class MJOOrderEditorPageComponent implements OnInit, OnChanges, OnDestroy {
|
|
65
|
-
private readonly orders;
|
|
66
|
-
private readonly cdr;
|
|
67
|
-
/**
|
|
68
|
-
* The order being edited. Supplied by the host — often the SAME instance fast
|
|
69
|
-
* entry was working on, which is what makes escalation lossless.
|
|
70
|
-
*/
|
|
71
|
-
/**
|
|
72
|
-
* The order being edited — a real entity, not a parallel model of one.
|
|
73
|
-
*
|
|
74
|
-
* Bound directly: the object the screen mutates is the object that gets saved, so there is no
|
|
75
|
-
* mapping layer to drift and no second definition of what an order is.
|
|
76
|
-
*/
|
|
77
|
-
Order: OrderHeaderEntity;
|
|
78
|
-
/** True when the chosen tender needs a reference number — read from the PaymentType, not stored. */
|
|
79
|
-
RequiresPaymentReference: boolean;
|
|
80
|
-
/**
|
|
81
|
-
* The reference the user typed for the initial payment — a check number, wire confirmation, or
|
|
82
|
-
* transfer id.
|
|
83
|
-
*
|
|
84
|
-
* Backed by `Order.InitialPaymentReference` (companion). There is no column — confirm
|
|
85
|
-
* turns it into a `PaymentDetail` — but it has to ride the save, so it cannot stay page-only.
|
|
86
|
-
*/
|
|
87
|
-
/** Catalog for the product column and the add-line picker. */
|
|
88
|
-
Catalog: MJOProductOption[];
|
|
89
|
-
/**
|
|
90
|
-
* The companies this order could be raised under.
|
|
91
|
-
*
|
|
92
|
-
* The OWNING company decides which chart of accounts the order books into and who can see it,
|
|
93
|
-
* and it was previously taken silently from the first product in the catalog and never shown.
|
|
94
|
-
* A default nobody can see is a decision made on the user's behalf in secret — and with more
|
|
95
|
-
* than one company it is a decision they may well want to make differently.
|
|
96
|
-
*/
|
|
97
|
-
Companies: MJOCompanyOption[];
|
|
98
|
-
/** Where the order is. Drives the stepper and which verbs are offered. */
|
|
99
|
-
Status: MJOOrderStage;
|
|
100
|
-
/** Document number, once the order has one. Drafts have none. */
|
|
101
|
-
OrderNumber: string | null;
|
|
102
|
-
/**
|
|
103
|
-
* Show this page's own Save/Confirm bar.
|
|
104
|
-
*
|
|
105
|
-
* The order workspace hosts this editor inside `mj-workspace-card`, which already provides
|
|
106
|
-
* Confirm / Keep as draft / Discard for the active tab. Left on, the screen shows two action
|
|
107
|
-
* bars that appear to do different things and do not.
|
|
108
|
-
*/
|
|
109
|
-
ShowActions: boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Tenders the instance accepts, for the initial-payment picker. Supplied by the host — the
|
|
112
|
-
* section already loads and caches them.
|
|
113
|
-
*/
|
|
114
|
-
Tenders: MJOTenderOption[];
|
|
115
|
-
/** Journal entries — populated on the Accounting tab from a preview. */
|
|
116
|
-
JournalEntries: MJOJournalEntry[];
|
|
117
|
-
/** The user asked to confirm. The host runs the pre-flight. */
|
|
118
|
-
ConfirmRequested: EventEmitter<OrderHeaderEntity>;
|
|
119
|
-
/** The draft was saved. */
|
|
120
|
-
Saved: EventEmitter<OrderHeaderEntity>;
|
|
121
|
-
/** A line was opened. The host may show it in a slide-in instead of the built-in drawer. */
|
|
122
|
-
LineOpened: EventEmitter<mjBizAppsOrdersOrderLineEntity>;
|
|
123
|
-
/** An entry's Accounting link was followed. */
|
|
124
|
-
OpenInAccounting: EventEmitter<MJOJournalEntry>;
|
|
125
|
-
/** Allocation lines that have landed on this order. */
|
|
126
|
-
AppliedPayments: mjBizAppsOrdersPaymentLineEntity[];
|
|
127
|
-
/** Dimension tags across this order's lines. */
|
|
128
|
-
Dimensions: mjBizAppsOrdersOrderLineDimensionEntity[];
|
|
129
|
-
/** PaymentHeaderID (lower-cased) → its number, for the applied-payments table. */
|
|
130
|
-
PaymentNumbers: Map<string, string>;
|
|
131
|
-
/** What to show in the Payment column of an allocation row. */
|
|
132
|
-
PaymentNumberOf(line: mjBizAppsOrdersPaymentLineEntity): string;
|
|
133
|
-
/** Active tab. */
|
|
134
|
-
ActiveTab: MJOEditorTab;
|
|
135
|
-
/**
|
|
136
|
-
* What the consequence grids ask for, or null when this order has no saved lines.
|
|
137
|
-
*
|
|
138
|
-
* Set in `loadPersistedDetail`, which only runs for a persisted order — a draft that has never
|
|
139
|
-
* been saved has booked nothing and started nothing, and the panes say so rather than
|
|
140
|
-
* rendering an empty grid that looks like a failed query.
|
|
141
|
-
*/
|
|
142
|
-
get JournalEntryParams(): RunViewParams | null;
|
|
143
|
-
get SubscriptionParams(): RunViewParams | null;
|
|
144
|
-
/**
|
|
145
|
-
* Params PER ORDER, not per editor instance.
|
|
146
|
-
*
|
|
147
|
-
* The workspace holds one tab per order but renders ONE editor for whichever is active, so
|
|
148
|
-
* anything stored as a plain field on this component belongs to "the last order that loaded"
|
|
149
|
-
* rather than to the order on screen — which is exactly how the journal tab came to show the
|
|
150
|
-
* previous tab's entries. Keyed by order id, a tab switch is a different map lookup and cannot
|
|
151
|
-
* be stale; the query runs once per order and only when someone opens one of the two tabs.
|
|
152
|
-
*
|
|
153
|
-
* A null result is NOT cached: an order with no saved lines yet has nothing to ask for, and
|
|
154
|
-
* caching that would keep answering "nothing" after its lines are saved.
|
|
155
|
-
*/
|
|
156
|
-
private readonly consequences;
|
|
157
|
-
/** The order on screen, or null for a draft that has never been saved. */
|
|
158
|
-
private get currentOrderID();
|
|
159
|
-
/**
|
|
160
|
-
* Latest line pricing.
|
|
161
|
-
*
|
|
162
|
-
* LINE PRICES ONLY, and the name says so. It is what `Orders.PreviewPrice`
|
|
163
|
-
* resolved per line — the same `ResolvePrice` the engine's own pricing walk
|
|
164
|
-
* calls — summed to a net subtotal. Charges, tax and promotions are decided
|
|
165
|
-
* inside the confirm transaction and are NOT here; the screen says so rather
|
|
166
|
-
* than showing them as zero.
|
|
167
|
-
*/
|
|
168
|
-
Pricing: MJOPricingState;
|
|
169
|
-
/** The line whose drawer is open, or null. */
|
|
170
|
-
OpenLine: mjBizAppsOrdersOrderLineEntity | null;
|
|
171
|
-
private stopWatching;
|
|
172
|
-
ngOnInit(): Promise<void>;
|
|
173
|
-
/**
|
|
174
|
-
* The workspace swaps `[Draft]` when you change order tabs — the component is never remounted,
|
|
175
|
-
* so this is the only signal that the order on screen has changed.
|
|
176
|
-
*/
|
|
177
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
178
|
-
ngOnDestroy(): void;
|
|
179
|
-
get Stages(): import("../../panels/index.js").MJOStepperStage[];
|
|
180
|
-
/**
|
|
181
|
-
* Whether any line must ship — changes what the stepper says about Fulfilled.
|
|
182
|
-
*
|
|
183
|
-
* Read from the CATALOGUE, not from a priced line. It used to come off the
|
|
184
|
-
* preview's projection, which meant the stepper could not say whether an order
|
|
185
|
-
* shipped until a whole rolled-back booking had run. Whether a product is
|
|
186
|
-
* physical is a property of the product; the order does not decide it.
|
|
187
|
-
*/
|
|
188
|
-
get RequiresFulfillment(): boolean;
|
|
189
|
-
/** The line subtotal, BEFORE tax and charges. Null until the first pass returns. */
|
|
190
|
-
get Totals(): MJOEstimatedTotals | null;
|
|
191
|
-
/** True when at least one line has no resolvable price, so the subtotal is short. */
|
|
192
|
-
get HasUnpricedLines(): boolean;
|
|
193
|
-
/** The five tabs, with counts and the red-dot state. */
|
|
194
|
-
get Tabs(): MJOEditorTabDef[];
|
|
195
|
-
/**
|
|
196
|
-
* The same five tabs, shaped for MJ's own tab component.
|
|
197
|
-
*
|
|
198
|
-
* WHY mj-tab-nav AND NOT accounting's mj-workspace-card. The workspace card
|
|
199
|
-
* models OPEN DOCUMENTS — its strip closes, reorders and adds tabs, and it
|
|
200
|
-
* carries a New button. These five are PANES OF ONE ORDER: you cannot close
|
|
201
|
-
* Parties or add a sixth, so those affordances would be lies. It also lives in
|
|
202
|
-
* accounting's transfer-pending/ folder, which is explicitly parked code owed
|
|
203
|
-
* to another home, so depending on it now would buy a migration later.
|
|
204
|
-
* mj-tab-nav is the shared, shipped component whose semantics actually match.
|
|
205
|
-
*
|
|
206
|
-
* The red dot becomes an error-variant badge. A bare dot is a signifier with
|
|
207
|
-
* no meaning attached — only the aria-label said what it meant, so a sighted
|
|
208
|
-
* user saw a dot and had to guess. "!" in the same badge slot the count uses
|
|
209
|
-
* reads as attention-needed on sight, and severity is carried by colour rather
|
|
210
|
-
* than by a second element competing with the count.
|
|
211
|
-
*/
|
|
212
|
-
get TabNav(): TabConfig[];
|
|
213
|
-
/**
|
|
214
|
-
* Load what only a SAVED order can have.
|
|
215
|
-
*
|
|
216
|
-
* Payments and dimension tags exist against persisted rows, so a draft that
|
|
217
|
-
* has never been saved has neither — and asking for them with no id would be a
|
|
218
|
-
* query guaranteed to return nothing. Both awaits settle before either is
|
|
219
|
-
* assigned.
|
|
220
|
-
*/
|
|
221
|
-
private loadPersistedDetail;
|
|
222
|
-
/**
|
|
223
|
-
* The saved order row, or null while this is a draft that has never been saved.
|
|
224
|
-
*
|
|
225
|
-
* The DIVIDING LINE of this screen. Before a save there is no order, so the only money
|
|
226
|
-
* available is what `Orders.PreviewPrice` resolved per line — an estimate that excludes
|
|
227
|
-
* charges and tax and says so. After a save the engine's own figures exist, and they are
|
|
228
|
-
* authoritative; nothing here should be recomputing them.
|
|
229
|
-
*/
|
|
230
|
-
Persisted: mjBizAppsOrdersOrderHeaderEntity | null;
|
|
231
|
-
/** True once this order exists in the database, so its own money can be shown. */
|
|
232
|
-
get IsPersisted(): boolean;
|
|
233
|
-
/**
|
|
234
|
-
* The money strip's four values, persisted-first.
|
|
235
|
-
*
|
|
236
|
-
* These exist because the strip used to be bound to `[Paid]="0"` and
|
|
237
|
-
* `[PaymentStatus]="Status === 'Draft' ? null : 'Unpaid'"` — LITERALS, not stale reads. So a
|
|
238
|
-
* confirmed, fully-paid order reported "PAID — · BALANCE $560.00 · Unpaid" for ever, and no
|
|
239
|
-
* amount of refreshing would have changed it. Verified against ORD-000122, which the database
|
|
240
|
-
* had as Paid / AmountPaid 560 / Balance 0 while the screen said otherwise.
|
|
241
|
-
*
|
|
242
|
-
* A draft still shows the estimate — it has nothing else to show — but it is labelled as one
|
|
243
|
-
* and, being a Draft, the strip hides Paid entirely.
|
|
244
|
-
*/
|
|
245
|
-
get DisplayTotal(): number | null;
|
|
246
|
-
get DisplayPaid(): number;
|
|
247
|
-
get DisplayBalance(): number | null;
|
|
248
|
-
/**
|
|
249
|
-
* Null while the order is a draft — an unsaved order has no payment state to report.
|
|
250
|
-
*
|
|
251
|
-
* Narrowed rather than cast. `mjBizAppsOrdersOrderHeaderEntity.PaymentStatus` is a plain `string` off the view,
|
|
252
|
-
* and the strip takes the union; a cast would compile and then render an unstyled chip for
|
|
253
|
-
* any value the column grows later. Checking against the union means an unrecognised value
|
|
254
|
-
* shows nothing at all, which is the honest outcome.
|
|
255
|
-
*/
|
|
256
|
-
get DisplayPaymentStatus(): MJOPaymentStatus | null;
|
|
257
|
-
/** What has actually reached this order, summed from its allocations. */
|
|
258
|
-
get AppliedTotal(): number;
|
|
259
|
-
/**
|
|
260
|
-
* The line subtotal. NOT the order's gross — tax and charges are not known here.
|
|
261
|
-
* Named for what it is so no caller mistakes it for the amount that will book.
|
|
262
|
-
*/
|
|
263
|
-
get EstimatedTotal(): number;
|
|
264
|
-
get BalanceDue(): number;
|
|
265
|
-
protected dateOf(value: unknown): string;
|
|
266
|
-
protected moneyOf(value: unknown): string;
|
|
267
|
-
/**
|
|
268
|
-
* True when a tab has nothing to show and nothing to edit for this order yet.
|
|
269
|
-
*
|
|
270
|
-
* Accounting is derived entirely from a confirm: an unbooked order has no journal entries and
|
|
271
|
-
* no dimensions to read, and nothing on that tab is authored by hand at any point.
|
|
272
|
-
*/
|
|
273
|
-
IsTabInert(key: MJOEditorTab): boolean;
|
|
274
|
-
/** Human name for a draft section, used in the to-do strip's tooltips. */
|
|
275
|
-
SectionLabel(section: string): string;
|
|
276
|
-
/**
|
|
277
|
-
* Jump to whichever tab owns an outstanding item.
|
|
278
|
-
*
|
|
279
|
-
* `OrderEditorSection` includes `header`, which has no tab — those fields live in the identity
|
|
280
|
-
* strip, which is always on screen. Navigating somewhere arbitrary for them would be worse
|
|
281
|
-
* than staying put, so a header issue simply does not move you.
|
|
282
|
-
*/
|
|
283
|
-
GoToIssue(section: string): void;
|
|
284
|
-
SelectTab(tab: MJOEditorTab): void;
|
|
285
|
-
/**
|
|
286
|
-
* Read the current order's consequence params, once, on demand.
|
|
287
|
-
*
|
|
288
|
-
* ON DEMAND is the point: nothing needs refreshing from the five places an order can change,
|
|
289
|
-
* because the answer is fetched the first time someone opens the tab for THAT order and is
|
|
290
|
-
* then keyed to it. Switching workspace tabs needs no notification — the getters read a
|
|
291
|
-
* different key.
|
|
292
|
-
*/
|
|
293
|
-
private loadConsequences;
|
|
294
|
-
/**
|
|
295
|
-
* Narrowing entry point for MJ's tab component, whose (TabChange) is a plain
|
|
296
|
-
* string — it cannot know our union.
|
|
297
|
-
*
|
|
298
|
-
* Checked against the real tab list rather than cast. A cast would compile and
|
|
299
|
-
* then quietly set ActiveTab to a key that matches no pane, leaving the editor
|
|
300
|
-
* showing nothing with no error to explain it; this simply ignores a key that
|
|
301
|
-
* is not ours, and the current tab stays put.
|
|
302
|
-
*/
|
|
303
|
-
SelectTabKey(key: string): void;
|
|
304
|
-
/**
|
|
305
|
-
* Always cancels a move to Confirmed and routes through the confirm action instead.
|
|
306
|
-
* Booking is not undoable, and a stepper click is too easy a way to trigger it.
|
|
307
|
-
*/
|
|
308
|
-
OnBeforeStageChange(event: MJOStageChangeRequestEventArgs): void;
|
|
309
|
-
get Lines(): mjBizAppsOrdersOrderLineEntity[];
|
|
310
|
-
ProductFor(line: mjBizAppsOrdersOrderLineEntity): MJOProductOption | undefined;
|
|
311
|
-
PricedLine(line: mjBizAppsOrdersOrderLineEntity): MJOLinePrice | undefined;
|
|
312
|
-
/** What one line's discount comes to, derived rather than reported. */
|
|
313
|
-
DiscountAmount(line: mjBizAppsOrdersOrderLineEntity): number | null;
|
|
314
|
-
SetQuantity(line: mjBizAppsOrdersOrderLineEntity, raw: string): void;
|
|
315
|
-
/**
|
|
316
|
-
* Typing a price is DIRECT ENTRY and wins over any resolved one. Clearing the
|
|
317
|
-
* field restores resolution, which is why an empty string maps to `undefined`
|
|
318
|
-
* rather than to zero.
|
|
319
|
-
*/
|
|
320
|
-
SetUnitPrice(line: mjBizAppsOrdersOrderLineEntity, raw: string): void;
|
|
321
|
-
Remove(line: mjBizAppsOrdersOrderLineEntity): void;
|
|
322
|
-
/** What the user has typed into the add-product box. */
|
|
323
|
-
ProductQuery: string;
|
|
324
|
-
/** True once the box has focus — the list opens on click, not on the second keystroke. */
|
|
325
|
-
ProductPickerOpen: boolean;
|
|
326
|
-
/**
|
|
327
|
-
* What the product list shows.
|
|
328
|
-
*
|
|
329
|
-
* OPENS ON FOCUS, showing the catalogue, and narrows as you type. Requiring two characters
|
|
330
|
-
* first meant clicking the box did nothing at all, so there was no way to see what was for
|
|
331
|
-
* sale without already knowing its name — fine for a desk that has the catalogue memorised,
|
|
332
|
-
* useless for everyone else.
|
|
333
|
-
*
|
|
334
|
-
* ONE search over BOTH name and SKU, deliberately: an order taker reading off a purchase order
|
|
335
|
-
* has a code, one working from a conversation has a name, and asking them to pick the right box
|
|
336
|
-
* first is the kind of thing that makes people use the wrong one.
|
|
337
|
-
*
|
|
338
|
-
* `SKU ?? ''` is not defensive noise. Products in a freshly-migrated instance have a NULL SKU
|
|
339
|
-
* (the code ends up in the name instead), and `null.toLowerCase()` throws — which would take
|
|
340
|
-
* the whole picker down on the first keystroke rather than simply matching nothing.
|
|
341
|
-
*
|
|
342
|
-
* The cap is generous rather than tight because the list SCROLLS: it exists to stop a
|
|
343
|
-
* pathological catalogue rendering thousands of DOM nodes, not to make the user type.
|
|
344
|
-
*/
|
|
345
|
-
get ProductMatches(): MJOProductOption[];
|
|
346
|
-
OnProductFocus(): void;
|
|
347
|
-
/**
|
|
348
|
-
* Typing reopens the picker.
|
|
349
|
-
*
|
|
350
|
-
* Escape closes the list but does NOT blur the box — so without this, carrying on typing
|
|
351
|
-
* produced nothing and the field looked broken until you clicked away and back. Focus alone is
|
|
352
|
-
* not enough of a trigger, because the element already had it.
|
|
353
|
-
*/
|
|
354
|
-
OnProductQueryChange(): void;
|
|
355
|
-
/**
|
|
356
|
-
* True when the catalogue this picker filters was itself capped at the fetch.
|
|
357
|
-
*
|
|
358
|
-
* The section loads products with `MaxRows` (200 by default) and caches the result, so this
|
|
359
|
-
* picker filters a SUBSET and cannot see past it. Saying so is the difference between "no such
|
|
360
|
-
* product" and "not in the first 200" — the second is the one that wastes an afternoon.
|
|
361
|
-
*/
|
|
362
|
-
get CatalogTruncated(): boolean;
|
|
363
|
-
/**
|
|
364
|
-
* Add the product as a line.
|
|
365
|
-
*
|
|
366
|
-
* Quantity 1 and NO unit price: leaving `UnitPrice` undefined is what lets the
|
|
367
|
-
* pricing walk resolve it (`SetUnitPrice` documents the same rule from the
|
|
368
|
-
* other direction). Seeding it with the catalogue's list price would look
|
|
369
|
-
* helpful and would silently turn every line into a direct-entry price that
|
|
370
|
-
* ignores the customer's price list.
|
|
371
|
-
*/
|
|
372
|
-
AddProduct(option: MJOProductOption): Promise<void>;
|
|
373
|
-
/**
|
|
374
|
-
* Close any open picker when the click lands outside all of them.
|
|
375
|
-
*
|
|
376
|
-
* `pointerdown`, not `click`: the list is inside the same subtree, so a pointerdown that
|
|
377
|
-
* started on an option is excluded by the `closest()` test below and the option's own click
|
|
378
|
-
* still fires. Using blur instead would race the click and swallow the selection.
|
|
379
|
-
*/
|
|
380
|
-
OnDocumentPointerDown(event: Event): void;
|
|
381
|
-
/** Escape closes the open picker without touching what is already on the order. */
|
|
382
|
-
OnEscape(): void;
|
|
383
|
-
/**
|
|
384
|
-
* Clears the SEARCH state only — never a chosen product or party. Guarded so an ordinary click
|
|
385
|
-
* anywhere on the page does not schedule a change-detection pass for nothing.
|
|
386
|
-
*/
|
|
387
|
-
private ClosePickers;
|
|
388
|
-
/** Search text per role, so bill-to and ship-to can be edited independently. */
|
|
389
|
-
PartyQuery: Record<MJOPartyRole, string>;
|
|
390
|
-
PartyMatches: Record<MJOPartyRole, MJOPartyMatch[]>;
|
|
391
|
-
PartySearching: MJOPartyRole | null;
|
|
392
|
-
/**
|
|
393
|
-
* Focusing a party box shows who we have billed most recently, before anything is typed.
|
|
394
|
-
*
|
|
395
|
-
* A desk bills the same handful of accounts over and over, so the last few orders predict the
|
|
396
|
-
* next one better than an empty box does. `RecentCustomers` returns the same shape as
|
|
397
|
-
* `SearchCustomers`, so one template renders both and selection behaves identically.
|
|
398
|
-
*/
|
|
399
|
-
OnPartyFocus(role: MJOPartyRole): Promise<void>;
|
|
400
|
-
private partyTimer;
|
|
401
|
-
/**
|
|
402
|
-
* Search as they type, DEBOUNCED.
|
|
403
|
-
*
|
|
404
|
-
* This is bound to `ngModelChange`, so without the timer every keystroke is a server
|
|
405
|
-
* round-trip — eight requests to spell "Northgate", each a LIKE scan, arriving out of order so
|
|
406
|
-
* a slow early one can overwrite a fast late one. Fast entry already solved this the same way;
|
|
407
|
-
* this had simply not learned it.
|
|
408
|
-
*/
|
|
409
|
-
SearchParty(role: MJOPartyRole): void;
|
|
410
|
-
/**
|
|
411
|
-
* A customer is an organization OR a person, never both — the database says so
|
|
412
|
-
* (`CK_*_Party`), so the picker sets one and clears the other rather than
|
|
413
|
-
* leaving whichever was chosen first behind.
|
|
414
|
-
*/
|
|
415
|
-
ChooseParty(role: MJOPartyRole, match: MJOPartyMatch): void;
|
|
416
|
-
ClearParty(role: MJOPartyRole): void;
|
|
417
|
-
/**
|
|
418
|
-
* Display names for the chosen parties.
|
|
419
|
-
*
|
|
420
|
-
* Held here rather than read back from the draft because the draft stores IDs
|
|
421
|
-
* only — showing a GUID is what the old read-only tab did, and it told the
|
|
422
|
-
* user nothing.
|
|
423
|
-
*/
|
|
424
|
-
PartyLabels: Record<MJOPartyRole, string | null>;
|
|
425
|
-
PartyIdFor(role: MJOPartyRole): string | null;
|
|
426
|
-
/** True when there is a real choice to make — one company needs no picker. */
|
|
427
|
-
get HasCompanyChoice(): boolean;
|
|
428
|
-
/** The owning company's name, for the read-only case. */
|
|
429
|
-
get OwningCompanyName(): string;
|
|
430
|
-
/**
|
|
431
|
-
* Change which company owns the order.
|
|
432
|
-
*
|
|
433
|
-
* Only meaningful while the order is a draft: the owning company anchors the document and the
|
|
434
|
-
* ledger it books into, so moving it after confirm would rewrite history rather than edit a form.
|
|
435
|
-
* `IsEditable` already gates the control.
|
|
436
|
-
*/
|
|
437
|
-
SetOwningCompany(companyID: string): void;
|
|
438
|
-
/** The `PaymentType` row behind the chosen tender, or null for invoice-on-terms. */
|
|
439
|
-
get SelectedTenderType(): MJOTenderOption | null;
|
|
440
|
-
/** True when this tender cannot be captured without a check/wire/transfer number. */
|
|
441
|
-
get RequiresReference(): boolean;
|
|
442
|
-
/** The reference as typed. Read from the DRAFT, so it survives a tab switch or a remount. */
|
|
443
|
-
get Reference(): string;
|
|
444
|
-
SetReference(value: string): void;
|
|
445
|
-
SetTender(paymentTypeID: string): void;
|
|
446
|
-
/**
|
|
447
|
-
* Re-state the WHOLE initial-payment intent with one part changed.
|
|
448
|
-
*
|
|
449
|
-
* `SetInitialPayment` deliberately takes the complete intent, so patching one field means
|
|
450
|
-
* restating the others — and the two setters here used to omit the reference entirely, which
|
|
451
|
-
* would have wiped a typed check number the moment the amount changed.
|
|
452
|
-
*/
|
|
453
|
-
private restateIntent;
|
|
454
|
-
SetInitialAmount(raw: string): void;
|
|
455
|
-
/**
|
|
456
|
-
* Offer the balance as the obvious amount — the common case is paying in full.
|
|
457
|
-
*
|
|
458
|
-
* ⚠ It offers the NET subtotal, not the gross. See the same note in
|
|
459
|
-
* `fast-entry.page.ts` (`applyTenderIntent`): `createInitialPayment` takes the
|
|
460
|
-
* stated amount at face value and has no pay-in-full intent to settle against the
|
|
461
|
-
* total it computes, and the client can no longer know that total. Harmless while
|
|
462
|
-
* no charge or tax rule is configured; it UNDER-PAYS the moment one is. The fix is
|
|
463
|
-
* an engine-side intent, and it is backlogged rather than guessed at here.
|
|
464
|
-
*/
|
|
465
|
-
PayInFull(): void;
|
|
466
|
-
/**
|
|
467
|
-
* Order types, from the draft's own union rather than a list typed here — CodeGen widens that
|
|
468
|
-
* union when the CHECK constraint gains a value, and a hand-copied list would not follow.
|
|
469
|
-
*/
|
|
470
|
-
readonly OrderTypes: ReadonlyArray<NonNullable<OrderHeaderEntity['OrderType']>>;
|
|
471
|
-
/** The "no tender" row. A real option meaning invoice on terms, not a placeholder. */
|
|
472
|
-
readonly TenderNone: {
|
|
473
|
-
ID: string;
|
|
474
|
-
Name: string;
|
|
475
|
-
};
|
|
476
|
-
SetOrderType(value: string): void;
|
|
477
|
-
/**
|
|
478
|
-
* `<input type="date">` will only accept `yyyy-MM-dd`. The draft stores whatever it was given —
|
|
479
|
-
* often a full ISO timestamp from a loaded order — and handing that to the input makes the field
|
|
480
|
-
* render EMPTY with no error, which reads as "this order has no date".
|
|
481
|
-
*/
|
|
482
|
-
/**
|
|
483
|
-
* True once pricing has RETURNED, so an empty price source means "there is no rule" rather
|
|
484
|
-
* than "not yet". Drives the price badge's missing-rule state.
|
|
485
|
-
*
|
|
486
|
-
* Deliberately NOT `!!Pricing.Result` alone: a stale result from the previous keystroke is
|
|
487
|
-
* present while the next pass is in flight, and treating that as settled would flash
|
|
488
|
-
* "no price rule" at a line that is simply being recomputed.
|
|
489
|
-
*/
|
|
490
|
-
get PricingSettled(): boolean;
|
|
491
|
-
DateValue(raw: string | Date | null | undefined): string;
|
|
492
|
-
/**
|
|
493
|
-
* True when this header field is showing a DEFAULT the user has not confirmed — drives the
|
|
494
|
-
* muted styling and the explanatory tooltip on the identity strip.
|
|
495
|
-
*
|
|
496
|
-
* Guarded on `Draft` because the editor renders before a draft is bound in the imperative path.
|
|
497
|
-
*/
|
|
498
|
-
IsDefault(field: 'OrderDate' | 'OrderType'): boolean;
|
|
499
|
-
/** Free-text and date header fields, written straight through to the draft. */
|
|
500
|
-
SetHeaderField(field: 'Description' | 'Notes' | 'ExternalDocumentNumber' | 'RequestedDeliveryDate' | 'OrderDate' | 'DueDate', raw: string): void;
|
|
501
|
-
Open(line: mjBizAppsOrdersOrderLineEntity): void;
|
|
502
|
-
CloseDrawer(): void;
|
|
503
|
-
/**
|
|
504
|
-
* The decomposition ladder, as far as the browser can honestly go.
|
|
505
|
-
*
|
|
506
|
-
* It stops at the net subtotal, and SAYS it stops there. Charges and tax used to
|
|
507
|
-
* appear here because the rolled-back preview had run the engine's whole walk;
|
|
508
|
-
* without that run they are unknown, and an unknown rendered as `$0.00` on the
|
|
509
|
-
* screen that tells someone what they are committing to is the exact defect this
|
|
510
|
-
* ladder was built to prevent. A missing row is honest; a zero is not.
|
|
511
|
-
*/
|
|
512
|
-
get LadderRows(): MJOLadderRow[];
|
|
513
|
-
get IsEditable(): boolean;
|
|
514
|
-
/**
|
|
515
|
-
* NOT GATED ON A PRICE. It used to require a returned preview, so a failed or
|
|
516
|
-
* still-running preview left a completed order permanently unconfirmable with a
|
|
517
|
-
* dead button and no reason on it. The engine decides whether an order can be
|
|
518
|
-
* confirmed; this checks only what the client can know for itself.
|
|
519
|
-
*/
|
|
520
|
-
get CanConfirm(): boolean;
|
|
521
|
-
/** Errors worth surfacing above the tabs, so a red dot is never the only clue. */
|
|
522
|
-
get Issues(): {
|
|
523
|
-
Code: string;
|
|
524
|
-
Section: import("@mj-biz-apps/orders-entities").OrderEditorSection;
|
|
525
|
-
Severity: "error";
|
|
526
|
-
Message: string;
|
|
527
|
-
}[];
|
|
528
|
-
SaveDraft(): Promise<void>;
|
|
529
|
-
RequestConfirm(): void;
|
|
530
|
-
/**
|
|
531
|
-
* Called by every setter on this page after it mutates the order.
|
|
532
|
-
*
|
|
533
|
-
* Reprices (debounced) and repaints. Both matter on a zoneless, imperatively-created page: the
|
|
534
|
-
* pricing callback lands from a timer and an awaited round trip, so assigning alone paints
|
|
535
|
-
* nothing and the strip stays on "— resolving…" while CanConfirm never turns true.
|
|
536
|
-
*/
|
|
537
|
-
private onEdited;
|
|
538
|
-
/** Apply a chosen party to the bill-to or ship-to side. Null clears it. */
|
|
539
|
-
private applyParty;
|
|
540
|
-
/** Whether the user typed this line's price rather than the engine resolving one. */
|
|
541
|
-
PriceStated(line: mjBizAppsOrdersOrderLineEntity): boolean;
|
|
542
|
-
/** Promotion codes presented but not yet saved — screen state, held by the entry service. */
|
|
543
|
-
get PromotionCodes(): string[];
|
|
544
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MJOOrderEditorPageComponent, never>;
|
|
545
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MJOOrderEditorPageComponent, "mjo-order-editor-page", never, { "Order": { "alias": "Order"; "required": false; }; "Catalog": { "alias": "Catalog"; "required": false; }; "Companies": { "alias": "Companies"; "required": false; }; "Status": { "alias": "Status"; "required": false; }; "OrderNumber": { "alias": "OrderNumber"; "required": false; }; "ShowActions": { "alias": "ShowActions"; "required": false; }; "Tenders": { "alias": "Tenders"; "required": false; }; "JournalEntries": { "alias": "JournalEntries"; "required": false; }; }, { "ConfirmRequested": "ConfirmRequested"; "Saved": "Saved"; "LineOpened": "LineOpened"; "OpenInAccounting": "OpenInAccounting"; }, never, never, true, never>;
|
|
546
|
-
}
|
|
547
|
-
//# sourceMappingURL=order-editor.page.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"order-editor.page.d.ts","sourceRoot":"","sources":["../../../../src/lib/pages/orders/order-editor.page.ts"],"names":[],"mappings":"AAAA,OAAO,EAGH,YAAY,EAGZ,SAAS,EACT,SAAS,EACT,MAAM,EACN,KAAK,aAAa,EAGrB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,iBAAiB,EAAE,KAAK,gCAAgC,EAAE,KAAK,uCAAuC,EAAE,KAAK,8BAA8B,EAAE,KAAK,gCAAgC,EAAE,MAAM,8BAA8B,CAAC;AAKlO,OAAO,EAA2H,KAAK,gBAAgB,EAA0E,MAAM,2BAA2B,CAAC;AACnQ,OAAO,EAEH,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,eAAe,EACvB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAEnG,OAAO,EAAmC,KAAK,eAAe,EAAE,MAAM,8CAA8C,CAAC;AACrH,OAAO,EAAmC,KAAK,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAOjH,OAAO,EAAoB,KAAK,aAAa,EAAE,KAAK,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AACtH,OAAO,KAAK,EAAE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