@mj-biz-apps/sales-ng 6.20.0 → 6.22.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 (58) hide show
  1. package/dist/lib/custom/deal-form.component.d.ts +35 -33
  2. package/dist/lib/custom/deal-form.component.d.ts.map +1 -1
  3. package/dist/lib/custom/deal-form.component.js +61 -50
  4. package/dist/lib/custom/deal-form.component.js.map +1 -1
  5. package/dist/lib/data/billcom-customer.d.ts +34 -0
  6. package/dist/lib/data/billcom-customer.d.ts.map +1 -0
  7. package/dist/lib/data/billcom-customer.js +122 -0
  8. package/dist/lib/data/billcom-customer.js.map +1 -0
  9. package/dist/lib/data/entity-names.d.ts +4 -0
  10. package/dist/lib/data/entity-names.d.ts.map +1 -1
  11. package/dist/lib/data/entity-names.js +4 -0
  12. package/dist/lib/data/entity-names.js.map +1 -1
  13. package/dist/lib/form-panels/account-contacts.d.ts +10 -0
  14. package/dist/lib/form-panels/account-contacts.d.ts.map +1 -1
  15. package/dist/lib/form-panels/account-contacts.js +13 -0
  16. package/dist/lib/form-panels/account-contacts.js.map +1 -1
  17. package/dist/lib/form-panels/contact-accounts.panel.d.ts +18 -0
  18. package/dist/lib/form-panels/contact-accounts.panel.d.ts.map +1 -0
  19. package/dist/lib/form-panels/contact-accounts.panel.js +123 -0
  20. package/dist/lib/form-panels/contact-accounts.panel.js.map +1 -0
  21. package/dist/lib/form-panels/deal-form.panels.d.ts +48 -14
  22. package/dist/lib/form-panels/deal-form.panels.d.ts.map +1 -1
  23. package/dist/lib/form-panels/deal-form.panels.js +384 -171
  24. package/dist/lib/form-panels/deal-form.panels.js.map +1 -1
  25. package/dist/lib/form-panels/deal-hero.panel.d.ts +18 -0
  26. package/dist/lib/form-panels/deal-hero.panel.d.ts.map +1 -1
  27. package/dist/lib/form-panels/deal-hero.panel.js +100 -45
  28. package/dist/lib/form-panels/deal-hero.panel.js.map +1 -1
  29. package/dist/lib/form-panels/deal-line-cards.component.d.ts +38 -0
  30. package/dist/lib/form-panels/deal-line-cards.component.d.ts.map +1 -1
  31. package/dist/lib/form-panels/deal-line-cards.component.js +168 -31
  32. package/dist/lib/form-panels/deal-line-cards.component.js.map +1 -1
  33. package/dist/lib/form-panels/deal-line-editor.component.d.ts +55 -8
  34. package/dist/lib/form-panels/deal-line-editor.component.d.ts.map +1 -1
  35. package/dist/lib/form-panels/deal-line-editor.component.js +291 -165
  36. package/dist/lib/form-panels/deal-line-editor.component.js.map +1 -1
  37. package/dist/lib/form-panels/deal-schedule-total.d.ts +56 -0
  38. package/dist/lib/form-panels/deal-schedule-total.d.ts.map +1 -0
  39. package/dist/lib/form-panels/deal-schedule-total.js +72 -0
  40. package/dist/lib/form-panels/deal-schedule-total.js.map +1 -0
  41. package/dist/lib/form-panels/field-readable.d.ts +16 -0
  42. package/dist/lib/form-panels/field-readable.d.ts.map +1 -0
  43. package/dist/lib/form-panels/field-readable.js +6 -0
  44. package/dist/lib/form-panels/field-readable.js.map +1 -0
  45. package/dist/lib/generated/Entities/mjBizAppsSalesPipeline/mjbizappssalespipeline.form.component.d.ts.map +1 -1
  46. package/dist/lib/generated/Entities/mjBizAppsSalesPipeline/mjbizappssalespipeline.form.component.js +48 -28
  47. package/dist/lib/generated/Entities/mjBizAppsSalesPipeline/mjbizappssalespipeline.form.component.js.map +1 -1
  48. package/dist/lib/sections/sales-section.component.js +1 -1
  49. package/dist/lib/sections/sales-section.component.js.map +1 -1
  50. package/dist/lib/workspace/deal-workspace.service.d.ts +5 -3
  51. package/dist/lib/workspace/deal-workspace.service.d.ts.map +1 -1
  52. package/dist/lib/workspace/deal-workspace.service.js +13 -5
  53. package/dist/lib/workspace/deal-workspace.service.js.map +1 -1
  54. package/dist/public-api.d.ts +2 -1
  55. package/dist/public-api.d.ts.map +1 -1
  56. package/dist/public-api.js +4 -1
  57. package/dist/public-api.js.map +1 -1
  58. package/package.json +7 -7
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @fileoverview Deal form — the close lock, and whether the cached amount can still be trusted.
2
+ * @fileoverview Deal form — the close lock.
3
3
  *
4
- * This class adds the two things a *form* is the right place for: refusing an edit the server will
5
- * refuse, and saying out loud when a number on screen is stale. Lines, products and the roster are
6
- * edited by the panels contributed onto this form (`form-panels/`).
4
+ * This class adds the one thing a *form* is the right place for: refusing an edit the server will
5
+ * refuse. Lines, products and the roster are edited by the panels contributed onto this form
6
+ * (`form-panels/`).
7
7
  *
8
8
  * ── THE CLOSE LOCK ──────────────────────────────────────────────────────────────────────────────
9
9
  *
@@ -18,19 +18,12 @@
18
18
  * The lock is keyed on the PERSISTED status, matching the server: a deal being closed right now still has
19
19
  * an open status in the database, and reading the in-memory value would make a deal impossible to close.
20
20
  *
21
- * ── THE STALE AMOUNT ────────────────────────────────────────────────────────────────────────────
21
+ * ── THE NOTICES ARE THE HEADER'S, NOT THIS CLASS'S ──────────────────────────────────────────────
22
22
  *
23
- * `Deal.Amount` is a CACHED ANSWER from Orders, stamped with `AmountIsComputed` / `AmountComputedAt` /
24
- * `AmountSourceHash`. Sales never recomputes it — this form does not add, multiply or round anything. It
25
- * only COMPARES the cached figure with the order's current total: if they differ, the number on screen
26
- * no longer describes the order it claims to, and the form says so.
27
- *
28
- * That comparison is not pricing. It is the difference between showing a number and vouching for one.
29
- *
30
- * It compares the NUMBER, not a timestamp, and `amount-freshness.ts` records why: the timestamp test
31
- * asked whether a line had been touched, and closing a deal touches every line without moving a price —
32
- * so every Won deal warned forever about an amount it was simultaneously forbidden to change
33
- * (golive#230).
23
+ * The lock notice and the stale-amount notice are worked out and shown by the deal header
24
+ * (`deal-hero.panel.ts`). This class used to work out both as well, and its template showed neither,
25
+ * so every open and every save of a deal with an order ran a second order-total read for nothing
26
+ * (#386).
34
27
  *
35
28
  * @module @mj-biz-apps/sales-ng
36
29
  */
@@ -58,22 +51,25 @@ export declare class DealFormComponentExtended extends mjBizAppsSalesDealFormCom
58
51
  * than asking again.
59
52
  */
60
53
  IsWon: boolean;
61
- /** Shown when locked, so the greyed-out-ness the form cannot render is at least explained. */
62
- LockNotice: string | null;
63
- /** Set when `Deal.Amount` no longer matches its order's total. Null when trustworthy, absent or locked. */
64
- StaleAmountNotice: string | null;
54
+ /**
55
+ * The persisted status row no longer exists (#402). The deal is locked, but its status may be set
56
+ * to an open one, which is how the server lets the orphan be repaired; the Status control and
57
+ * `Validate()` read this so the form offers that one write and nothing else.
58
+ */
59
+ IsStatusMissing: boolean;
65
60
  ngOnInit(): Promise<void>;
66
61
  /** Emits after {@link RefreshDealState}, so mounted panels re-check their own notices. */
67
62
  readonly DealStateRefreshed: EventEmitter<void>;
68
63
  /**
69
- * Re-resolves the lock and the stale-amount notice after a deal save this form did not run (#271).
64
+ * Re-resolves the lock after a deal save this form did not run, and tells the panels so the header
65
+ * re-checks its lock and stale-amount notices (#271).
70
66
  *
71
67
  * The products panel saves the deal through `Record.Save(options)` to pull the order's new total
72
68
  * into `Amount`, because `SaveRecord` takes no save options. That path raises no `RecordSaved`, so
73
69
  * without this the notices stayed as they were before the product was added.
74
70
  */
75
71
  RefreshDealState(): Promise<void>;
76
- /** The lock and the amount warning, resolved together — they are read together. */
72
+ /** The lock, then a repaint: the panels read `IsLocked`, `IsLost` and `IsWon` off this instance. */
77
73
  private resolveDealState;
78
74
  /** The fields a user may still edit right now — everything when open, the carve-outs when locked. */
79
75
  EditableFieldNames(): readonly string[] | null;
@@ -84,17 +80,6 @@ export declare class DealFormComponentExtended extends mjBizAppsSalesDealFormCom
84
80
  * in `ResolveDealLockState` so every surface that asks gets the same answer.
85
81
  */
86
82
  private resolveCloseLock;
87
- /**
88
- * Compares the cached amount against the order it claims to describe. No arithmetic.
89
- *
90
- * The rule lives in `ResolveDealAmountFreshness` so this form and the deal hero cannot answer it
91
- * differently — the same reason `ResolveDealLockState` is shared. Read that file's header for why
92
- * this is no longer a timestamp comparison (golive#230).
93
- *
94
- * ORDER MATTERS: `resolveCloseLock()` runs first in `ngOnInit`, so `IsLocked` is settled before it
95
- * is passed here. A locked deal never warns.
96
- */
97
- private resolveAmountFreshness;
98
83
  /**
99
84
  * Fills the selling company from the pipeline before the save is validated.
100
85
  *
@@ -111,6 +96,23 @@ export declare class DealFormComponentExtended extends mjBizAppsSalesDealFormCom
111
96
  * refusal the user then sees still names `CompanyID`.
112
97
  */
113
98
  SaveRecord(StopEditModeAfterSave: boolean): Promise<boolean>;
99
+ /**
100
+ * A SAVE OF A CLEAN DEAL STILL REACHES THE SERVER WHEN ITS AMOUNT IS STALE (#399).
101
+ *
102
+ * The header tells the rep to save the deal when its cached amount no longer matches the order
103
+ * (`DEAL_AMOUNT_STALE_NOTICE`). When the order changed somewhere else, the deal's own columns are
104
+ * untouched, so the record is clean and `BaseEntity.Save()` returns without sending anything: the
105
+ * notice stayed and the amount with it. The add-product path met the same wall and answers it the
106
+ * same way, with `IgnoreDirtyState`.
107
+ *
108
+ * Forced only when the amount is actually stale, by the same rule the header uses, so an ordinary
109
+ * clean save stays the no-op it always was. The freshness read runs only here, on a clean save
110
+ * with nothing pending, never on open (#386). A dirty deal needs nothing: its save reaches the
111
+ * entity server, which refreshes the amount from the order on every save of a computed amount.
112
+ */
113
+ protected InternalSaveRecord(): Promise<boolean>;
114
+ /** Whether the saved deal's cached amount disagrees with its order, through the shared rule. */
115
+ private amountIsStale;
114
116
  /** Reads the chosen pipeline's company and writes it to the deal. See `SaveRecord` for why. */
115
117
  private stampCompanyFromPipeline;
116
118
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"deal-form.component.d.ts","sourceRoot":"","sources":["../../../src/lib/custom/deal-form.component.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAAa,YAAY,EAAE,MAAM,eAAe,CAAC;AAQxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,4EAA4E,CAAC;;AAI7H,0GAA0G;AAC1G,qB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;;;;OAKG;IACI,MAAM,UAAS;IAEtB;;;;;;;OAOG;IACI,KAAK,UAAS;IAErB;;;;OAIG;IACI,eAAe,UAAS;IAET,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA6B/C,0FAA0F;IAC1F,SAAgB,kBAAkB,qBAA4B;IAE9D;;;;;;;OAOG;IACU,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9C,oGAAoG;YACtF,gBAAgB;IAK9B,qGAAqG;IAC9F,kBAAkB,IAAI,SAAS,MAAM,EAAE,GAAG,IAAI;IAIrD;;;;;OAKG;YACW,gBAAgB;IAS9B;;;;;;;;;;;;;;OAcG;IACmB,UAAU,CAAC,qBAAqB,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAKlF;;;;;;;;;;;;;OAaG;cACsB,kBAAkB,IAAI,OAAO,CAAC,OAAO,CAAC;IAU/D,gGAAgG;YAClF,aAAa;IAc3B,+FAA+F;YACjF,wBAAwB;IAiCtC;;;;;OAKG;IACa,QAAQ,IAAI,gBAAgB;yCAvMnC,yBAAyB;2CAAzB,yBAAyB;CA0OrC;AAED,gCAAgC;AAChC,wBAAgB,YAAY,IAAI,IAAI,CAEnC"}
@@ -5,11 +5,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  /**
8
- * @fileoverview Deal form — the close lock, and whether the cached amount can still be trusted.
8
+ * @fileoverview Deal form — the close lock.
9
9
  *
10
- * This class adds the two things a *form* is the right place for: refusing an edit the server will
11
- * refuse, and saying out loud when a number on screen is stale. Lines, products and the roster are
12
- * edited by the panels contributed onto this form (`form-panels/`).
10
+ * This class adds the one thing a *form* is the right place for: refusing an edit the server will
11
+ * refuse. Lines, products and the roster are edited by the panels contributed onto this form
12
+ * (`form-panels/`).
13
13
  *
14
14
  * ── THE CLOSE LOCK ──────────────────────────────────────────────────────────────────────────────
15
15
  *
@@ -24,19 +24,12 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
24
24
  * The lock is keyed on the PERSISTED status, matching the server: a deal being closed right now still has
25
25
  * an open status in the database, and reading the in-memory value would make a deal impossible to close.
26
26
  *
27
- * ── THE STALE AMOUNT ────────────────────────────────────────────────────────────────────────────
27
+ * ── THE NOTICES ARE THE HEADER'S, NOT THIS CLASS'S ──────────────────────────────────────────────
28
28
  *
29
- * `Deal.Amount` is a CACHED ANSWER from Orders, stamped with `AmountIsComputed` / `AmountComputedAt` /
30
- * `AmountSourceHash`. Sales never recomputes it — this form does not add, multiply or round anything. It
31
- * only COMPARES the cached figure with the order's current total: if they differ, the number on screen
32
- * no longer describes the order it claims to, and the form says so.
33
- *
34
- * That comparison is not pricing. It is the difference between showing a number and vouching for one.
35
- *
36
- * It compares the NUMBER, not a timestamp, and `amount-freshness.ts` records why: the timestamp test
37
- * asked whether a line had been touched, and closing a deal touches every line without moving a price —
38
- * so every Won deal warned forever about an amount it was simultaneously forbidden to change
39
- * (golive#230).
29
+ * The lock notice and the stale-amount notice are worked out and shown by the deal header
30
+ * (`deal-hero.panel.ts`). This class used to work out both as well, and its template showed neither,
31
+ * so every open and every save of a deal with an order ran a second order-total read for nothing
32
+ * (#386).
40
33
  *
41
34
  * @module @mj-biz-apps/sales-ng
42
35
  */
@@ -44,7 +37,7 @@ import { Component, EventEmitter } from '@angular/core';
44
37
  import { RegisterClass } from '@memberjunction/global';
45
38
  import { BaseFormComponent } from '@memberjunction/ng-base-forms';
46
39
  import { DealFieldsEditableWhileLocked, ResolveDealAmountFreshness, ResolveDealLockState, } from '@mj-biz-apps/sales-entities';
47
- import { RunView } from '@memberjunction/core';
40
+ import { EntitySaveOptions, RunView } from '@memberjunction/core';
48
41
  import { mjBizAppsSalesDealFormComponent } from '../generated/Entities/mjBizAppsSalesDeal/mjbizappssalesdeal.form.component';
49
42
  import { MJS_ENTITIES } from '../data/entity-names';
50
43
  import { ShouldStampCompanyFromPipeline } from './company-from-pipeline';
@@ -110,10 +103,12 @@ let DealFormComponentExtended = class DealFormComponentExtended extends mjBizApp
110
103
  * than asking again.
111
104
  */
112
105
  IsWon = false;
113
- /** Shown when locked, so the greyed-out-ness the form cannot render is at least explained. */
114
- LockNotice = null;
115
- /** Set when `Deal.Amount` no longer matches its order's total. Null when trustworthy, absent or locked. */
116
- StaleAmountNotice = null;
106
+ /**
107
+ * The persisted status row no longer exists (#402). The deal is locked, but its status may be set
108
+ * to an open one, which is how the server lets the orphan be repaired; the Status control and
109
+ * `Validate()` read this so the form offers that one write and nothing else.
110
+ */
111
+ IsStatusMissing = false;
117
112
  async ngOnInit() {
118
113
  await super.ngOnInit();
119
114
  await this.resolveDealState();
@@ -144,7 +139,8 @@ let DealFormComponentExtended = class DealFormComponentExtended extends mjBizApp
144
139
  /** Emits after {@link RefreshDealState}, so mounted panels re-check their own notices. */
145
140
  DealStateRefreshed = new EventEmitter();
146
141
  /**
147
- * Re-resolves the lock and the stale-amount notice after a deal save this form did not run (#271).
142
+ * Re-resolves the lock after a deal save this form did not run, and tells the panels so the header
143
+ * re-checks its lock and stale-amount notices (#271).
148
144
  *
149
145
  * The products panel saves the deal through `Record.Save(options)` to pull the order's new total
150
146
  * into `Amount`, because `SaveRecord` takes no save options. That path raises no `RecordSaved`, so
@@ -154,10 +150,9 @@ let DealFormComponentExtended = class DealFormComponentExtended extends mjBizApp
154
150
  await this.resolveDealState();
155
151
  this.DealStateRefreshed.emit();
156
152
  }
157
- /** The lock and the amount warning, resolved together — they are read together. */
153
+ /** The lock, then a repaint: the panels read `IsLocked`, `IsLost` and `IsWon` off this instance. */
158
154
  async resolveDealState() {
159
155
  await this.resolveCloseLock();
160
- await this.resolveAmountFreshness();
161
156
  this.cdr?.detectChanges();
162
157
  }
163
158
  /** The fields a user may still edit right now — everything when open, the carve-outs when locked. */
@@ -176,30 +171,7 @@ let DealFormComponentExtended = class DealFormComponentExtended extends mjBizApp
176
171
  this.IsLocked = lock.IsLocked;
177
172
  this.IsLost = lock.IsLost;
178
173
  this.IsWon = lock.IsWon;
179
- this.LockNotice = lock.Notice;
180
- }
181
- /**
182
- * Compares the cached amount against the order it claims to describe. No arithmetic.
183
- *
184
- * The rule lives in `ResolveDealAmountFreshness` so this form and the deal hero cannot answer it
185
- * differently — the same reason `ResolveDealLockState` is shared. Read that file's header for why
186
- * this is no longer a timestamp comparison (golive#230).
187
- *
188
- * ORDER MATTERS: `resolveCloseLock()` runs first in `ngOnInit`, so `IsLocked` is settled before it
189
- * is passed here. A locked deal never warns.
190
- */
191
- async resolveAmountFreshness() {
192
- this.StaleAmountNotice = null;
193
- if (!this.record?.Get?.('ID')) {
194
- return;
195
- }
196
- const freshness = await ResolveDealAmountFreshness({
197
- IsLocked: this.IsLocked,
198
- AmountIsComputed: this.record.Get('AmountIsComputed'),
199
- Amount: this.record.Get('Amount'),
200
- OrderID: this.record.Get('OrderID'),
201
- });
202
- this.StaleAmountNotice = freshness.Notice;
174
+ this.IsStatusMissing = lock.IsStatusMissing;
203
175
  }
204
176
  /**
205
177
  * Fills the selling company from the pipeline before the save is validated.
@@ -220,6 +192,43 @@ let DealFormComponentExtended = class DealFormComponentExtended extends mjBizApp
220
192
  await this.stampCompanyFromPipeline();
221
193
  return super.SaveRecord(StopEditModeAfterSave);
222
194
  }
195
+ /**
196
+ * A SAVE OF A CLEAN DEAL STILL REACHES THE SERVER WHEN ITS AMOUNT IS STALE (#399).
197
+ *
198
+ * The header tells the rep to save the deal when its cached amount no longer matches the order
199
+ * (`DEAL_AMOUNT_STALE_NOTICE`). When the order changed somewhere else, the deal's own columns are
200
+ * untouched, so the record is clean and `BaseEntity.Save()` returns without sending anything: the
201
+ * notice stayed and the amount with it. The add-product path met the same wall and answers it the
202
+ * same way, with `IgnoreDirtyState`.
203
+ *
204
+ * Forced only when the amount is actually stale, by the same rule the header uses, so an ordinary
205
+ * clean save stays the no-op it always was. The freshness read runs only here, on a clean save
206
+ * with nothing pending, never on open (#386). A dirty deal needs nothing: its save reaches the
207
+ * entity server, which refreshes the amount from the order on every save of a computed amount.
208
+ */
209
+ async InternalSaveRecord() {
210
+ const record = this.record;
211
+ if (record && !record.Dirty && this.PendingRecords.length === 0 && (await this.amountIsStale())) {
212
+ const options = new EntitySaveOptions();
213
+ options.IgnoreDirtyState = true;
214
+ return record.Save(options);
215
+ }
216
+ return super.InternalSaveRecord();
217
+ }
218
+ /** Whether the saved deal's cached amount disagrees with its order, through the shared rule. */
219
+ async amountIsStale() {
220
+ const record = this.record;
221
+ if (!record?.IsSaved) {
222
+ return false;
223
+ }
224
+ const freshness = await ResolveDealAmountFreshness({
225
+ IsLocked: this.IsLocked,
226
+ AmountIsComputed: record.Get('AmountIsComputed'),
227
+ Amount: record.Get('Amount'),
228
+ OrderID: record.Get('OrderID'),
229
+ });
230
+ return freshness.IsStale;
231
+ }
223
232
  /** Reads the chosen pipeline's company and writes it to the deal. See `SaveRecord` for why. */
224
233
  async stampCompanyFromPipeline() {
225
234
  const record = this.record;
@@ -263,7 +272,9 @@ let DealFormComponentExtended = class DealFormComponentExtended extends mjBizApp
263
272
  return result;
264
273
  }
265
274
  const editable = DealFieldsEditableWhileLocked(this.IsLost);
266
- const frozen = this.record.Fields.filter((f) => f.Dirty && !editable.has(f.Name));
275
+ // The status repair the server allows on a deal whose status row is gone (#402).
276
+ const statusRepair = (name) => this.IsStatusMissing && name === 'DealStatusTypeID';
277
+ const frozen = this.record.Fields.filter((f) => f.Dirty && !editable.has(f.Name) && !statusRepair(f.Name));
267
278
  if (frozen.length === 0) {
268
279
  return result;
269
280
  }
@@ -461,7 +472,7 @@ export { DealFormComponentExtended };
461
472
  type: Component,
462
473
  args: [{ standalone: false, selector: 'mjs-deal-form', template: "<mj-record-form-container [Record]=\"record\" [FormComponent]=\"this\"\n (Navigate)=\"OnFormNavigate($event)\"\n (DeleteRequested)=\"OnDeleteRequested()\"\n (FavoriteToggled)=\"OnFavoriteToggled()\"\n (HistoryRequested)=\"OnHistoryRequested()\"\n (ListManagementRequested)=\"OnListManagementRequested()\">\n\n <mj-form-panel-slot Entity=\"{{record.EntityInfo.Name}}\" Slot=\"before-fields\" [Record]=\"record\" [FormComponent]=\"this\" [FormContext]=\"formContext\"></mj-form-panel-slot>\n\n <!-- ========================================\n FIELD PANELS\n ======================================== -->\n <!-- Details Section -->\n <mj-collapsible-panel\n SectionKey=\"details\"\n SectionName=\"Details\"\n Icon=\"fa fa-align-left\"\n [Form]=\"this\"\n [FormContext]=\"formContext\">\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"DealNumber\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"Name\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"PipelineID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"PipelineStageID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"DealTypeID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"DealStatusTypeID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"AccountID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"PrimaryContactID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"BillingContactID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"CompanyID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"OwnerEmployeeID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"Amount\"\n Type=\"number\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"AmountIsComputed\"\n Type=\"checkbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"AmountComputedAt\"\n Type=\"datepicker\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"AmountSourceHash\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"CurrencyID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"MRR\"\n Type=\"number\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ARR\"\n Type=\"number\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"TermMonths\"\n Type=\"number\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"EstimatedProjectWeeks\"\n Type=\"number\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ExecutionDate\"\n Type=\"datepicker\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"StartDate\"\n Type=\"datepicker\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ExpectedCloseDate\"\n Type=\"datepicker\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ActualCloseDate\"\n Type=\"datepicker\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"Probability\"\n Type=\"number\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ForecastCategoryTypeID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"LossReasonID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"LossNotes\"\n Type=\"textarea\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"LeadSourceTypeID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"CampaignID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ContractID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"RenewsContractID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"AutoRenew\"\n Type=\"checkbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"AnnualIncreasePctOverride\"\n Type=\"number\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"CancellationNoticeDaysOverride\"\n Type=\"number\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"PaymentMethod\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"StandardAgreementModified\"\n Type=\"checkbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ContractVariances\"\n Type=\"textarea\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"Description\"\n Type=\"textarea\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"NextStep\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"NextStepDate\"\n Type=\"datepicker\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ClosedAt\"\n Type=\"datepicker\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"ClosedByUserID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"OrderID\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n LinkType=\"Record\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"__mj_CreatedAt\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"__mj_UpdatedAt\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"PredictedWinProbability\"\n Type=\"number\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"PredictedWinRiskBand\"\n Type=\"select\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"PredictedWinScoredAt\"\n Type=\"datepicker\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"WinOutcome\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"DaysToExpectedClose\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"HasPaymentSchedule\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"TeamMemberCount\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"HasPartnerInvolved\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"IsEnterpriseTier\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"AutoRenewFlag\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n <mj-form-field \n [Record]=\"record\"\n [ShowLabel]=\"true\"\n FieldName=\"StandardAgreementModifiedFlag\"\n Type=\"textbox\"\n [EditMode]=\"EditMode\"\n [FormContext]=\"formContext\"\n ></mj-form-field>\n\n </mj-collapsible-panel>\n\n <mj-form-panel-slot Entity=\"{{record.EntityInfo.Name}}\" Slot=\"after-fields\" [Record]=\"record\" [FormComponent]=\"this\" [FormContext]=\"formContext\"></mj-form-panel-slot>\n\n <!-- ========================================\n RELATED ENTITY PANELS\n ======================================== -->\n\n <!-- Deal Contact Roles Section -->\n <mj-collapsible-panel\n SectionKey=\"mJBizAppsSalesDealContactRoles\"\n SectionName=\"Deal Contact Roles\"\n Icon=\"fa fa-table\"\n Variant=\"related-entity\"\n [Form]=\"this\"\n [FormContext]=\"formContext\"\n [BadgeCount]=\"GetSectionRowCount('mJBizAppsSalesDealContactRoles')\"\n [DefaultExpanded]=\"false\">\n @if (record.IsSaved) {\n <div>\n <mj-explorer-entity-data-grid\n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ_BizApps_Sales: Deal Contact Roles','DealID')\"\n [NewRecordValues]=\"NewRecordValues('MJ_BizApps_Sales: Deal Contact Roles','DealID')\"\n [AllowLoad]=\"IsSectionExpanded('mJBizAppsSalesDealContactRoles')\"\n [ShowToolbar]=\"true\"\n (Navigate)=\"OnFormNavigate($event)\"\n (AfterDataLoad)=\"SetSectionRowCount('mJBizAppsSalesDealContactRoles', $event.totalRowCount)\"\n >\n </mj-explorer-entity-data-grid>\n </div>\n }\n </mj-collapsible-panel>\n\n <!-- Deal Stage Events Section -->\n <mj-collapsible-panel\n SectionKey=\"mJBizAppsSalesDealStageEvents\"\n SectionName=\"Deal Stage Events\"\n Icon=\"fa fa-table\"\n Variant=\"related-entity\"\n [Form]=\"this\"\n [FormContext]=\"formContext\"\n [BadgeCount]=\"GetSectionRowCount('mJBizAppsSalesDealStageEvents')\"\n [DefaultExpanded]=\"false\">\n @if (record.IsSaved) {\n <div>\n <mj-explorer-entity-data-grid\n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ_BizApps_Sales: Deal Stage Events','DealID')\"\n [NewRecordValues]=\"NewRecordValues('MJ_BizApps_Sales: Deal Stage Events','DealID')\"\n [AllowLoad]=\"IsSectionExpanded('mJBizAppsSalesDealStageEvents')\"\n [ShowToolbar]=\"true\"\n (Navigate)=\"OnFormNavigate($event)\"\n (AfterDataLoad)=\"SetSectionRowCount('mJBizAppsSalesDealStageEvents', $event.totalRowCount)\"\n >\n </mj-explorer-entity-data-grid>\n </div>\n }\n </mj-collapsible-panel>\n\n <!-- Deal Team Members Section -->\n <mj-collapsible-panel\n SectionKey=\"mJBizAppsSalesDealTeamMembers\"\n SectionName=\"Deal Team Members\"\n Icon=\"fa fa-table\"\n Variant=\"related-entity\"\n [Form]=\"this\"\n [FormContext]=\"formContext\"\n [BadgeCount]=\"GetSectionRowCount('mJBizAppsSalesDealTeamMembers')\"\n [DefaultExpanded]=\"false\">\n @if (record.IsSaved) {\n <div>\n <mj-explorer-entity-data-grid\n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ_BizApps_Sales: Deal Team Members','DealID')\"\n [NewRecordValues]=\"NewRecordValues('MJ_BizApps_Sales: Deal Team Members','DealID')\"\n [AllowLoad]=\"IsSectionExpanded('mJBizAppsSalesDealTeamMembers')\"\n [ShowToolbar]=\"true\"\n (Navigate)=\"OnFormNavigate($event)\"\n (AfterDataLoad)=\"SetSectionRowCount('mJBizAppsSalesDealTeamMembers', $event.totalRowCount)\"\n >\n </mj-explorer-entity-data-grid>\n </div>\n }\n </mj-collapsible-panel>\n\n <!-- Deal Payment Schedules Section -->\n <mj-collapsible-panel\n SectionKey=\"mJBizAppsSalesDealPaymentSchedules\"\n SectionName=\"Deal Payment Schedules\"\n Icon=\"fa fa-table\"\n Variant=\"related-entity\"\n [Form]=\"this\"\n [FormContext]=\"formContext\"\n [BadgeCount]=\"GetSectionRowCount('mJBizAppsSalesDealPaymentSchedules')\"\n [DefaultExpanded]=\"false\">\n @if (record.IsSaved) {\n <div>\n <mj-explorer-entity-data-grid\n [Params]=\"BuildRelationshipViewParamsByEntityName('MJ_BizApps_Sales: Deal Payment Schedules','DealID')\"\n [NewRecordValues]=\"NewRecordValues('MJ_BizApps_Sales: Deal Payment Schedules','DealID')\"\n [AllowLoad]=\"IsSectionExpanded('mJBizAppsSalesDealPaymentSchedules')\"\n [ShowToolbar]=\"true\"\n (Navigate)=\"OnFormNavigate($event)\"\n (AfterDataLoad)=\"SetSectionRowCount('mJBizAppsSalesDealPaymentSchedules', $event.totalRowCount)\"\n >\n </mj-explorer-entity-data-grid>\n </div>\n }\n </mj-collapsible-panel>\n\n <mj-form-panel-slot Entity=\"{{record.EntityInfo.Name}}\" Slot=\"after-related\" [Record]=\"record\" [FormComponent]=\"this\" [FormContext]=\"formContext\"></mj-form-panel-slot>\n</mj-record-form-container>\n " }]
463
474
  }], null, null); })();
464
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DealFormComponentExtended, { className: "DealFormComponentExtended", filePath: "lib/custom/deal-form.component.ts", lineNumber: 59 }); })();
475
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DealFormComponentExtended, { className: "DealFormComponentExtended", filePath: "lib/custom/deal-form.component.ts", lineNumber: 52 }); })();
465
476
  /** Anti-tree-shaking anchor. */
466
477
  export function LoadDealForm() {
467
478
  /* keeps the registration alive */
@@ -1 +1 @@
1
- {"version":3,"file":"deal-form.component.js","sourceRoot":"","sources":["../../../src/lib/custom/deal-form.component.ts","../../../src/lib/generated/Entities/mjBizAppsSalesDeal/mjbizappssalesdeal.form.component.html"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACH,6BAA6B,EAC7B,0BAA0B,EAC1B,oBAAoB,GACvB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,+BAA+B,EAAE,MAAM,4EAA4E,CAAC;AAC7H,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,8BAA8B,EAA2B,MAAM,yBAAyB,CAAC;;;;;ICgdtF,AADJ,2BAAK,uCAQI;IADD,AADA,gOAAY,6BAAsB,KAAC,6NAClB,0BAAmB,gCAAgC,uBAAuB,KAAC;IAGpG,AADI,iBAA+B,EAC7B;;;IARE,cAAmG;IAGnG,AADA,AADA,AADA,yHAAmG,6FACf,yEACnB,qBAC7C;;;;IAqBxB,AADJ,2BAAK,uCAQI;IADD,AADA,gOAAY,6BAAsB,KAA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YAG3B,cAAiB;YAKjB,AADA,AAHA,AADA,mCAAiB,mBACC,0BAGG,gCACM;YAG3B,cAAiB;YAKjB,AADA,AAHA,AADA,mCAAiB,mBACC,0BAGG,gCACM;YAKf,cAAmC;YAA8D,AAAvB,AAAlB,AAAxD,wBAAA,4CAAmC,CAAA,sBAAsC,sBAAuB,gCAA4B;YAY5I,cAAa;YAGb,AADA,AADA,AADA,0BAAa,gCACc,wEACwC,0BAC1C;YACzB,cAYC;YAZD,8CAYC;YASD,cAAa;YAGb,AADA,AADA,AADA,0BAAa,gCACc,uEACuC,0BACzC;YACzB,cAYC;YAZD,8CAYC;YASD,cAAa;YAGb,AADA,AADA,AADA,0BAAa,gCACc,uEACuC,0BACzC;YACzB,cAYC;YAZD,8CAYC;YASD,cAAa;YAGb,AADA,AADA,AADA,0BAAa,gCACc,4EAC4C,0BAC9C;YACzB,cAYC;YAZD,8CAYC;YAGe,cAAmC;YAA+D,AAAvB,AAAlB,AAAzD,wBAAA,4CAAmC,CAAA,sBAAuC,sBAAuB,gCAA4B;;;AD/hBxI,yBAAyB;IANrC,aAAa,CAAC,iBAAiB,EAAE,yBAAyB,EAAE,CAAC,CAAC;GAMlD,yBAAyB,CAyNrC;;iFAzNY,yBAAyB;cALrC,SAAS;6BACM,KAAK,YACP,eAAe;;kFAGhB,yBAAyB;AA2NtC,gCAAgC;AAChC,MAAM,UAAU,YAAY;IACxB,kCAAkC;AACtC,CAAC"}
1
+ {"version":3,"file":"deal-form.component.js","sourceRoot":"","sources":["../../../src/lib/custom/deal-form.component.ts","../../../src/lib/generated/Entities/mjBizAppsSalesDeal/mjbizappssalesdeal.form.component.html"],"names":[],"mappings":";;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAA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AmC,CAAA,sBAAsC,sBAAuB,gCAA4B;YAY5I,cAAa;YAGb,AADA,AADA,AADA,0BAAa,gCACc,wEACwC,0BAC1C;YACzB,cAYC;YAZD,8CAYC;YASD,cAAa;YAGb,AADA,AADA,AADA,0BAAa,gCACc,uEACuC,0BACzC;YACzB,cAYC;YAZD,8CAYC;YASD,cAAa;YAGb,AADA,AADA,AADA,0BAAa,gCACc,uEACuC,0BACzC;YACzB,cAYC;YAZD,8CAYC;YASD,cAAa;YAGb,AADA,AADA,AADA,0BAAa,gCACc,4EAC4C,0BAC9C;YACzB,cAYC;YAZD,8CAYC;YAGe,cAAmC;YAA+D,AAAvB,AAAlB,AAAzD,wBAAA,4CAAmC,CAAA,sBAAuC,sBAAuB,gCAA4B;;;ADtiBxI,yBAAyB;IANrC,aAAa,CAAC,iBAAiB,EAAE,yBAAyB,EAAE,CAAC,CAAC;GAMlD,yBAAyB,CA0OrC;;iFA1OY,yBAAyB;cALrC,SAAS;6BACM,KAAK,YACP,eAAe;;kFAGhB,yBAAyB;AA4OtC,gCAAgC;AAChC,MAAM,UAAU,YAAY;IACxB,kCAAkC;AACtC,CAAC"}
@@ -0,0 +1,34 @@
1
+ /** Orders' provider type code for Bill.com; the same key Orders registers its invoice rail under. */
2
+ export declare const BILLCOM_PROVIDER_TYPE_CODE = "BillCom";
3
+ export type BillComCustomerCheck =
4
+ /** The company does not invoice through Bill.com, or the deal has no account or company yet. */
5
+ {
6
+ Kind: 'NotApplicable';
7
+ } | {
8
+ Kind: 'Linked';
9
+ } | {
10
+ Kind: 'Missing';
11
+ CompanyName: string | null;
12
+ };
13
+ export interface BillComProviderRow {
14
+ ID: string;
15
+ PaymentProviderTypeID: string;
16
+ Company: string | null;
17
+ }
18
+ /**
19
+ * The decision, kept apart from the reads so it can be tested without a database.
20
+ *
21
+ * `providers` are the company's active provider rows; `billComTypeIDs` the Bill.com type rows;
22
+ * `linkedProviderIDs` the provider rows the account already has an External Customer under.
23
+ */
24
+ export declare function DecideBillComCustomer(providers: readonly BillComProviderRow[], billComTypeIDs: readonly string[], linkedProviderIDs: readonly string[]): BillComCustomerCheck;
25
+ /** The line shown under the account. */
26
+ export declare function BillComCustomerWarning(check: BillComCustomerCheck): string | null;
27
+ /**
28
+ * Reads the company's Bill.com provider rows and the account's External Customer rows under them.
29
+ *
30
+ * `companyID` is the deal's; a new deal has none until it is saved, so the pipeline's is read
31
+ * instead, the same source the server stamps the deal's company from. Throws when a read fails.
32
+ */
33
+ export declare function CheckBillComCustomer(accountID: string | null, companyID: string | null, pipelineID: string | null): Promise<BillComCustomerCheck>;
34
+ //# sourceMappingURL=billcom-customer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billcom-customer.d.ts","sourceRoot":"","sources":["../../../src/lib/data/billcom-customer.ts"],"names":[],"mappings":"AAqBA,qGAAqG;AACrG,eAAO,MAAM,0BAA0B,YAAY,CAAC;AAEpD,MAAM,MAAM,oBAAoB;AAC5B,gGAAgG;AAC9F;IAAE,IAAI,EAAE,eAAe,CAAA;CAAE,GACzB;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAClB;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAEtD,MAAM,WAAW,kBAAkB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,qBAAqB,EAAE,MAAM,CAAC;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACjC,SAAS,EAAE,SAAS,kBAAkB,EAAE,EACxC,cAAc,EAAE,SAAS,MAAM,EAAE,EACjC,iBAAiB,EAAE,SAAS,MAAM,EAAE,GACrC,oBAAoB,CAOtB;AAED,wCAAwC;AACxC,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,oBAAoB,GAAG,MAAM,GAAG,IAAI,CAQjF;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACtC,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,UAAU,EAAE,MAAM,GAAG,IAAI,GAC1B,OAAO,CAAC,oBAAoB,CAAC,CAsC/B"}
@@ -0,0 +1,122 @@
1
+ /**
2
+ * @fileoverview Whether a deal's account already has a Bill.com customer under the selling company.
3
+ *
4
+ * Orders keeps the link in `External Customers`: one row per bill-to organization per payment
5
+ * provider row, and a Bill.com provider row belongs to one selling company. When an order is
6
+ * invoiced through Bill.com and its organization has no row, Orders creates a new Bill.com customer
7
+ * and records it. It never searches Bill.com for one that already exists, so an account that is
8
+ * already a customer there but has no row gets a duplicate on its first invoice.
9
+ *
10
+ * The deal form reads this when a rep picks an account so the gap is found while the deal is open,
11
+ * not when the invoice is sent. A company with no active Bill.com provider row invoices natively and
12
+ * has nothing to warn about.
13
+ *
14
+ * A Sales Account shares its ID with its Organization, so the account ID is the bill-to
15
+ * organization ID.
16
+ *
17
+ * @module @mj-biz-apps/sales-ng
18
+ */
19
+ import { RunView } from '@memberjunction/core';
20
+ import { MJS_ENTITIES, MJS_FOREIGN_ENTITIES } from './entity-names';
21
+ /** Orders' provider type code for Bill.com; the same key Orders registers its invoice rail under. */
22
+ export const BILLCOM_PROVIDER_TYPE_CODE = 'BillCom';
23
+ /**
24
+ * The decision, kept apart from the reads so it can be tested without a database.
25
+ *
26
+ * `providers` are the company's active provider rows; `billComTypeIDs` the Bill.com type rows;
27
+ * `linkedProviderIDs` the provider rows the account already has an External Customer under.
28
+ */
29
+ export function DecideBillComCustomer(providers, billComTypeIDs, linkedProviderIDs) {
30
+ const typeIDs = new Set(billComTypeIDs.map(lower));
31
+ const billCom = providers.filter((p) => typeIDs.has(lower(p.PaymentProviderTypeID)));
32
+ if (!billCom.length)
33
+ return { Kind: 'NotApplicable' };
34
+ const linked = new Set(linkedProviderIDs.map(lower));
35
+ if (billCom.some((p) => linked.has(lower(p.ID))))
36
+ return { Kind: 'Linked' };
37
+ return { Kind: 'Missing', CompanyName: billCom[0].Company ?? null };
38
+ }
39
+ /** The line shown under the account. */
40
+ export function BillComCustomerWarning(check) {
41
+ if (check.Kind !== 'Missing')
42
+ return null;
43
+ const company = check.CompanyName ? ` under ${check.CompanyName}` : '';
44
+ return (`This account has no Bill.com customer ID${company}. Its first Bill.com invoice will create a new ` +
45
+ `Bill.com customer. If it is already a customer in Bill.com, add its ID in External Customers ` +
46
+ `before the deal is invoiced, or Bill.com will hold a duplicate.`);
47
+ }
48
+ /**
49
+ * Reads the company's Bill.com provider rows and the account's External Customer rows under them.
50
+ *
51
+ * `companyID` is the deal's; a new deal has none until it is saved, so the pipeline's is read
52
+ * instead, the same source the server stamps the deal's company from. Throws when a read fails.
53
+ */
54
+ export async function CheckBillComCustomer(accountID, companyID, pipelineID) {
55
+ if (!isSet(accountID))
56
+ return { Kind: 'NotApplicable' };
57
+ const company = isSet(companyID) ? companyID : await pipelineCompany(pipelineID);
58
+ if (!company)
59
+ return { Kind: 'NotApplicable' };
60
+ const rv = new RunView();
61
+ const [types, providers] = await rv.RunViews([
62
+ {
63
+ EntityName: MJS_FOREIGN_ENTITIES.PaymentProviderType,
64
+ ExtraFilter: `Code = '${BILLCOM_PROVIDER_TYPE_CODE}'`,
65
+ Fields: ['ID'],
66
+ ResultType: 'simple',
67
+ },
68
+ {
69
+ EntityName: MJS_FOREIGN_ENTITIES.PaymentProvider,
70
+ ExtraFilter: `CompanyID = '${guid(company)}' AND IsActive = 1`,
71
+ Fields: ['ID', 'PaymentProviderTypeID', 'Company'],
72
+ ResultType: 'simple',
73
+ },
74
+ ]);
75
+ if (!types.Success)
76
+ throw new Error(types.ErrorMessage || 'Payment provider types could not be read.');
77
+ if (!providers.Success)
78
+ throw new Error(providers.ErrorMessage || 'Payment providers could not be read.');
79
+ const typeIDs = types.Results.map((t) => t.ID);
80
+ const providerRows = providers.Results;
81
+ const first = DecideBillComCustomer(providerRows, typeIDs, []);
82
+ if (first.Kind === 'NotApplicable')
83
+ return first;
84
+ const typeSet = new Set(typeIDs.map(lower));
85
+ const billComIDs = providerRows.filter((p) => typeSet.has(lower(p.PaymentProviderTypeID))).map((p) => `'${guid(p.ID)}'`);
86
+ const customers = await rv.RunView({
87
+ EntityName: MJS_FOREIGN_ENTITIES.ExternalCustomer,
88
+ ExtraFilter: `BillToOrganizationID = '${guid(accountID)}' AND PaymentProviderID IN (${billComIDs.join(',')})`,
89
+ Fields: ['PaymentProviderID'],
90
+ ResultType: 'simple',
91
+ });
92
+ if (!customers.Success)
93
+ throw new Error(customers.ErrorMessage || 'External customers could not be read.');
94
+ return DecideBillComCustomer(providerRows, typeIDs, customers.Results.map((c) => c.PaymentProviderID));
95
+ }
96
+ async function pipelineCompany(pipelineID) {
97
+ if (!isSet(pipelineID))
98
+ return null;
99
+ const result = await new RunView().RunView({
100
+ EntityName: MJS_ENTITIES.Pipeline,
101
+ ExtraFilter: `ID = '${guid(pipelineID)}'`,
102
+ Fields: ['CompanyID'],
103
+ ResultType: 'simple',
104
+ });
105
+ if (!result.Success)
106
+ throw new Error(result.ErrorMessage || 'The pipeline could not be read.');
107
+ return result.Results[0]?.CompanyID ?? null;
108
+ }
109
+ const GUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
110
+ /** Refuses anything that is not a GUID before it reaches a filter string. */
111
+ function guid(value) {
112
+ if (!GUID.test(value.trim()))
113
+ throw new Error(`Not an ID: ${value}`);
114
+ return value.trim();
115
+ }
116
+ function isSet(value) {
117
+ return typeof value === 'string' && value.trim().length > 0;
118
+ }
119
+ function lower(value) {
120
+ return value.toLowerCase();
121
+ }
122
+ //# sourceMappingURL=billcom-customer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billcom-customer.js","sourceRoot":"","sources":["../../../src/lib/data/billcom-customer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB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AAC,UAAU,CAAC;QAAE,OAAO,IAAI,CAAC;IACpC,MAAM,MAAM,GAAG,MAAM,IAAI,OAAO,EAAE,CAAC,OAAO,CAA+B;QACrE,UAAU,EAAE,YAAY,CAAC,QAAQ;QACjC,WAAW,EAAE,SAAS,IAAI,CAAC,UAAU,CAAC,GAAG;QACzC,MAAM,EAAE,CAAC,WAAW,CAAC;QACrB,UAAU,EAAE,QAAQ;KACvB,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,YAAY,IAAI,iCAAiC,CAAC,CAAC;IAC/F,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,SAAS,IAAI,IAAI,CAAC;AAChD,CAAC;AAED,MAAM,IAAI,GAAG,iEAAiE,CAAC;AAE/E,6EAA6E;AAC7E,SAAS,IAAI,CAAC,KAAa;IACvB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,cAAc,KAAK,EAAE,CAAC,CAAC;IACrE,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC;AACxB,CAAC;AAED,SAAS,KAAK,CAAC,KAAgC;IAC3C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,KAAK,CAAC,KAAa;IACxB,OAAO,KAAK,CAAC,WAAW,EAAE,CAAC;AAC/B,CAAC"}
@@ -22,6 +22,10 @@ export declare const MJS_FOREIGN_ENTITIES: {
22
22
  readonly Employee: "MJ: Employees";
23
23
  readonly OrderHeader: "MJ_BizApps_Orders: Order Headers";
24
24
  readonly OrderLine: "MJ_BizApps_Orders: Order Lines";
25
+ /** Read to warn when a deal's account has no Bill.com customer. See `billcom-customer.ts`. */
26
+ readonly PaymentProviderType: "MJ_BizApps_Orders: Payment Provider Types";
27
+ readonly PaymentProvider: "MJ_BizApps_Orders: Payment Providers";
28
+ readonly ExternalCustomer: "MJ_BizApps_Orders: External Customers";
25
29
  /**
26
30
  * Contracts' agreement. A deal holds TWO soft references to it — the contract the win produced
27
31
  * and the contract a renewal renews — and neither is a database FK, which is what left both
@@ -1 +1 @@
1
- {"version":3,"file":"entity-names.d.ts","sourceRoot":"","sources":["../../../src/lib/data/entity-names.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,YAAY;;;;;;IAMrB,iGAAiG;;;;CAI3F,CAAC;AAEX,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB;;;;;;IAM7B;;;;;;OAMG;;;;IAIH,4FAA4F;;CAEtF,CAAC"}
1
+ {"version":3,"file":"entity-names.d.ts","sourceRoot":"","sources":["../../../src/lib/data/entity-names.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,YAAY;;;;;;IAMrB,iGAAiG;;;;CAI3F,CAAC;AAEX,2FAA2F;AAC3F,eAAO,MAAM,oBAAoB;;;;;;IAM7B,8FAA8F;;;;IAI9F;;;;;;OAMG;;;;IAIH,4FAA4F;;CAEtF,CAAC"}
@@ -22,6 +22,10 @@ export const MJS_FOREIGN_ENTITIES = {
22
22
  Employee: 'MJ: Employees',
23
23
  OrderHeader: 'MJ_BizApps_Orders: Order Headers',
24
24
  OrderLine: 'MJ_BizApps_Orders: Order Lines',
25
+ /** Read to warn when a deal's account has no Bill.com customer. See `billcom-customer.ts`. */
26
+ PaymentProviderType: 'MJ_BizApps_Orders: Payment Provider Types',
27
+ PaymentProvider: 'MJ_BizApps_Orders: Payment Providers',
28
+ ExternalCustomer: 'MJ_BizApps_Orders: External Customers',
25
29
  /**
26
30
  * Contracts' agreement. A deal holds TWO soft references to it — the contract the win produced
27
31
  * and the contract a renewal renews — and neither is a database FK, which is what left both