@mj-biz-apps/sales-ng 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +183 -0
- package/dist/lib/activities/deal-activity-timeline.component.d.ts +104 -0
- package/dist/lib/activities/deal-activity-timeline.component.d.ts.map +1 -0
- package/dist/lib/activities/deal-activity-timeline.component.js +580 -0
- package/dist/lib/activities/deal-activity-timeline.component.js.map +1 -0
- package/dist/lib/board/deal-board.component.d.ts +194 -0
- package/dist/lib/board/deal-board.component.d.ts.map +1 -0
- package/dist/lib/board/deal-board.component.js +626 -0
- package/dist/lib/board/deal-board.component.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +14 -0
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -0
- package/dist/lib/custom/custom-forms.module.js +38 -0
- package/dist/lib/custom/custom-forms.module.js.map +1 -0
- package/dist/lib/custom/deal-form.component.d.ts +38 -0
- package/dist/lib/custom/deal-form.component.d.ts.map +1 -0
- package/dist/lib/custom/deal-form.component.js +346 -0
- package/dist/lib/custom/deal-form.component.js.map +1 -0
- package/dist/lib/custom/deal-line-form.component.d.ts +22 -0
- package/dist/lib/custom/deal-line-form.component.d.ts.map +1 -0
- package/dist/lib/custom/deal-line-form.component.js +129 -0
- package/dist/lib/custom/deal-line-form.component.js.map +1 -0
- package/dist/lib/custom/deal-stage-event-form.component.d.ts +26 -0
- package/dist/lib/custom/deal-stage-event-form.component.d.ts.map +1 -0
- package/dist/lib/custom/deal-stage-event-form.component.js +112 -0
- package/dist/lib/custom/deal-stage-event-form.component.js.map +1 -0
- package/dist/lib/custom/server-owned-fields.d.ts +47 -0
- package/dist/lib/custom/server-owned-fields.d.ts.map +1 -0
- package/dist/lib/custom/server-owned-fields.js +31 -0
- package/dist/lib/custom/server-owned-fields.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesAccountType/mjbizappssalesaccounttype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesAccountType/mjbizappssalesaccounttype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesAccountType/mjbizappssalesaccounttype.form.component.js +90 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesAccountType/mjbizappssalesaccounttype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesBuyingRoleType/mjbizappssalesbuyingroletype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesBuyingRoleType/mjbizappssalesbuyingroletype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesBuyingRoleType/mjbizappssalesbuyingroletype.form.component.js +108 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesBuyingRoleType/mjbizappssalesbuyingroletype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDeal/mjbizappssalesdeal.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDeal/mjbizappssalesdeal.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDeal/mjbizappssalesdeal.form.component.js +216 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDeal/mjbizappssalesdeal.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealContactRole/mjbizappssalesdealcontactrole.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealContactRole/mjbizappssalesdealcontactrole.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealContactRole/mjbizappssalesdealcontactrole.form.component.js +65 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealContactRole/mjbizappssalesdealcontactrole.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealLine/mjbizappssalesdealline.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealLine/mjbizappssalesdealline.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealLine/mjbizappssalesdealline.form.component.js +95 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealLine/mjbizappssalesdealline.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealLineType/mjbizappssalesdeallinetype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealLineType/mjbizappssalesdeallinetype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealLineType/mjbizappssalesdeallinetype.form.component.js +86 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealLineType/mjbizappssalesdeallinetype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealPaymentSchedule/mjbizappssalesdealpaymentschedule.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealPaymentSchedule/mjbizappssalesdealpaymentschedule.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealPaymentSchedule/mjbizappssalesdealpaymentschedule.form.component.js +65 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealPaymentSchedule/mjbizappssalesdealpaymentschedule.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealRole/mjbizappssalesdealrole.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealRole/mjbizappssalesdealrole.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealRole/mjbizappssalesdealrole.form.component.js +92 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealRole/mjbizappssalesdealrole.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealSequence/mjbizappssalesdealsequence.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealSequence/mjbizappssalesdealsequence.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealSequence/mjbizappssalesdealsequence.form.component.js +57 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealSequence/mjbizappssalesdealsequence.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealStageEvent/mjbizappssalesdealstageevent.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealStageEvent/mjbizappssalesdealstageevent.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealStageEvent/mjbizappssalesdealstageevent.form.component.js +77 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealStageEvent/mjbizappssalesdealstageevent.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealStatusType/mjbizappssalesdealstatustype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealStatusType/mjbizappssalesdealstatustype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealStatusType/mjbizappssalesdealstatustype.form.component.js +148 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealStatusType/mjbizappssalesdealstatustype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealTeamMember/mjbizappssalesdealteammember.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealTeamMember/mjbizappssalesdealteammember.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealTeamMember/mjbizappssalesdealteammember.form.component.js +73 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealTeamMember/mjbizappssalesdealteammember.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealType/mjbizappssalesdealtype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealType/mjbizappssalesdealtype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealType/mjbizappssalesdealtype.form.component.js +108 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesDealType/mjbizappssalesdealtype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesForecastCategoryType/mjbizappssalesforecastcategorytype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesForecastCategoryType/mjbizappssalesforecastcategorytype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesForecastCategoryType/mjbizappssalesforecastcategorytype.form.component.js +126 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesForecastCategoryType/mjbizappssalesforecastcategorytype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesForecastSnapshot/mjbizappssalesforecastsnapshot.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesForecastSnapshot/mjbizappssalesforecastsnapshot.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesForecastSnapshot/mjbizappssalesforecastsnapshot.form.component.js +77 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesForecastSnapshot/mjbizappssalesforecastsnapshot.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLeadSourceType/mjbizappssalesleadsourcetype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLeadSourceType/mjbizappssalesleadsourcetype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLeadSourceType/mjbizappssalesleadsourcetype.form.component.js +126 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLeadSourceType/mjbizappssalesleadsourcetype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLifecycleStageType/mjbizappssaleslifecyclestagetype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLifecycleStageType/mjbizappssaleslifecyclestagetype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLifecycleStageType/mjbizappssaleslifecyclestagetype.form.component.js +108 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLifecycleStageType/mjbizappssaleslifecyclestagetype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLossReason/mjbizappssaleslossreason.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLossReason/mjbizappssaleslossreason.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLossReason/mjbizappssaleslossreason.form.component.js +90 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesLossReason/mjbizappssaleslossreason.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesPipeline/mjbizappssalespipeline.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesPipeline/mjbizappssalespipeline.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesPipeline/mjbizappssalespipeline.form.component.js +150 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesPipeline/mjbizappssalespipeline.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesPipelineStage/mjbizappssalespipelinestage.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesPipelineStage/mjbizappssalespipelinestage.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesPipelineStage/mjbizappssalespipelinestage.form.component.js +138 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesPipelineStage/mjbizappssalespipelinestage.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesSalesAccount/mjbizappssalessalesaccount.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesSalesAccount/mjbizappssalessalesaccount.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesSalesAccount/mjbizappssalessalesaccount.form.component.js +124 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesSalesAccount/mjbizappssalessalesaccount.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesSalesContact/mjbizappssalessalescontact.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesSalesContact/mjbizappssalessalescontact.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesSalesContact/mjbizappssalessalescontact.form.component.js +156 -0
- package/dist/lib/generated/Entities/mjBizAppsSalesSalesContact/mjbizappssalessalescontact.form.component.js.map +1 -0
- package/dist/lib/generated/class-registrations-manifest.d.ts +20 -0
- package/dist/lib/generated/class-registrations-manifest.d.ts.map +1 -0
- package/dist/lib/generated/class-registrations-manifest.js +20 -0
- package/dist/lib/generated/class-registrations-manifest.js.map +1 -0
- package/dist/lib/generated/generated-forms.module.d.ts +37 -0
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -0
- package/dist/lib/generated/generated-forms.module.js +120 -0
- package/dist/lib/generated/generated-forms.module.js.map +1 -0
- package/dist/lib/nav/sales-nav.model.d.ts +93 -0
- package/dist/lib/nav/sales-nav.model.d.ts.map +1 -0
- package/dist/lib/nav/sales-nav.model.js +126 -0
- package/dist/lib/nav/sales-nav.model.js.map +1 -0
- package/dist/lib/sections/sales-section.component.d.ts +213 -0
- package/dist/lib/sections/sales-section.component.d.ts.map +1 -0
- package/dist/lib/sections/sales-section.component.js +905 -0
- package/dist/lib/sections/sales-section.component.js.map +1 -0
- package/dist/lib/vendored/workspace-tabs/workspace-card.component.d.ts +55 -0
- package/dist/lib/vendored/workspace-tabs/workspace-card.component.d.ts.map +1 -0
- package/dist/lib/vendored/workspace-tabs/workspace-card.component.js +243 -0
- package/dist/lib/vendored/workspace-tabs/workspace-card.component.js.map +1 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tab-store.d.ts +47 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tab-store.d.ts.map +1 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tab-store.js +112 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tab-store.js.map +1 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tab-strip.component.d.ts +36 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tab-strip.component.d.ts.map +1 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tab-strip.component.js +179 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tab-strip.component.js.map +1 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tabs.types.d.ts +36 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tabs.types.d.ts.map +1 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tabs.types.js +9 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tabs.types.js.map +1 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tip.directive.d.ts +35 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tip.directive.d.ts.map +1 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tip.directive.js +124 -0
- package/dist/lib/vendored/workspace-tabs/workspace-tip.directive.js.map +1 -0
- package/dist/lib/workspace/deal-workspace.component.d.ts +706 -0
- package/dist/lib/workspace/deal-workspace.component.d.ts.map +1 -0
- package/dist/lib/workspace/deal-workspace.component.js +2749 -0
- package/dist/lib/workspace/deal-workspace.component.js.map +1 -0
- package/dist/lib/workspace/deal-workspace.dates.d.ts +40 -0
- package/dist/lib/workspace/deal-workspace.dates.d.ts.map +1 -0
- package/dist/lib/workspace/deal-workspace.dates.js +60 -0
- package/dist/lib/workspace/deal-workspace.dates.js.map +1 -0
- package/dist/lib/workspace/deal-workspace.products.d.ts +61 -0
- package/dist/lib/workspace/deal-workspace.products.d.ts.map +1 -0
- package/dist/lib/workspace/deal-workspace.products.js +58 -0
- package/dist/lib/workspace/deal-workspace.products.js.map +1 -0
- package/dist/lib/workspace/deal-workspace.service.d.ts +207 -0
- package/dist/lib/workspace/deal-workspace.service.d.ts.map +1 -0
- package/dist/lib/workspace/deal-workspace.service.js +501 -0
- package/dist/lib/workspace/deal-workspace.service.js.map +1 -0
- package/dist/lib/workspace/deal-workspace.types.d.ts +101 -0
- package/dist/lib/workspace/deal-workspace.types.d.ts.map +1 -0
- package/dist/lib/workspace/deal-workspace.types.js +35 -0
- package/dist/lib/workspace/deal-workspace.types.js.map +1 -0
- package/dist/lib/workspace/deal-workspace.validation.d.ts +174 -0
- package/dist/lib/workspace/deal-workspace.validation.d.ts.map +1 -0
- package/dist/lib/workspace/deal-workspace.validation.js +288 -0
- package/dist/lib/workspace/deal-workspace.validation.js.map +1 -0
- package/dist/public-api.d.ts +63 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +96 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The pipeline board — deals as cards, pipeline stages as columns.
|
|
3
|
+
*
|
|
4
|
+
* WHAT THIS IS FOR. The roster answers "where does this deal stand"; the board answers "where is
|
|
5
|
+
* everything, and what needs pushing". Same deals, same data, a different question — which is why it is a
|
|
6
|
+
* rail page beside the dashboard and the roster rather than a section of its own.
|
|
7
|
+
*
|
|
8
|
+
* ── WHY THIS IS NOT AN MJ GENERIC KANBAN ────────────────────────────────────────────────────────
|
|
9
|
+
*
|
|
10
|
+
* CLAUDE.md lists `kanban` among MJ's Angular Generic components. **At MJ v5.51.0 it does not exist** —
|
|
11
|
+
* there is no `@memberjunction/ng-kanban`, and no kanban export anywhere under `@memberjunction/*`
|
|
12
|
+
* (`ng-timeline`, `ng-filter-builder`, `ng-entity-card` and `ng-join-grid` all do exist, so the list is
|
|
13
|
+
* aspirational rather than wrong). Recorded in BOARD-DECISIONS.md D-BD1.
|
|
14
|
+
*
|
|
15
|
+
* So the columns are laid out here, but the DRAG is not invented: it uses `@angular/cdk/drag-drop`, which
|
|
16
|
+
* is already the in-house primitive in this very package — `vendored/workspace-tabs/workspace-tab-strip`
|
|
17
|
+
* imports `CdkDropList`/`CdkDrag` for tab reordering. Same library, same idiom, no new dependency. When a
|
|
18
|
+
* generic kanban lands, this component is the thing to delete.
|
|
19
|
+
*
|
|
20
|
+
* ── WHAT IT REFUSES TO DO ───────────────────────────────────────────────────────────────────────
|
|
21
|
+
*
|
|
22
|
+
* A drag NEVER closes a deal. Dropping onto a stage whose `DealStatusType.LocksDeal` is set is refused
|
|
23
|
+
* with a hint pointing at the explicit close action, because a lock freezes the deal, its lines and its
|
|
24
|
+
* team, and an accidental mouse gesture is not an adequate signature on that. It also never calls the
|
|
25
|
+
* orders or contracts seams — closing is `Sales.CloseDeal`, deliberately explicit.
|
|
26
|
+
*
|
|
27
|
+
* ── VOCABULARY IS DATA ──────────────────────────────────────────────────────────────────────────
|
|
28
|
+
*
|
|
29
|
+
* Columns come from `PipelineStage` rows ordered by `DisplayOrder`. Whether a column is a closing column
|
|
30
|
+
* is read from the `DealStatusType.LocksDeal` FLAG its stage points at. No status name, stage name or
|
|
31
|
+
* pipeline name is compared anywhere in this file.
|
|
32
|
+
*
|
|
33
|
+
* ── IT COMPUTES NO MONEY ────────────────────────────────────────────────────────────────────────
|
|
34
|
+
*
|
|
35
|
+
* A column total is `SUM(Deal.Amount)` over the cards in that column — stored values, added up for
|
|
36
|
+
* display, exactly as the dashboard does it. Nothing is priced, derived, discounted or prorated. The sum
|
|
37
|
+
* is taken over DEALS, never over team members, which is the attribution double-count trap: a deal with
|
|
38
|
+
* an AE, an SE and an SDR has three `DealTeamMember` rows and would be counted three times.
|
|
39
|
+
*
|
|
40
|
+
* @module @mj-biz-apps/sales-ng
|
|
41
|
+
*/
|
|
42
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
43
|
+
import { EventEmitter } from '@angular/core';
|
|
44
|
+
import { type DealRosterRow } from '../workspace/deal-workspace.service';
|
|
45
|
+
import type { DealStatusLookup, PipelineLookup, StageLookup } from '../workspace/deal-workspace.types';
|
|
46
|
+
import * as i0 from "@angular/core";
|
|
47
|
+
/**
|
|
48
|
+
* The one currency a set of cards shares, or NULL when they do not share one.
|
|
49
|
+
*
|
|
50
|
+
* Uniformly-NULL counts as sharing: `Deal.CurrencyID` is unpopulated on every deal today, so treating
|
|
51
|
+
* that as a disagreement would suppress every total on the board and help nobody. What it must not do
|
|
52
|
+
* is treat NULL as the display default -- unknown and dollars are different claims, and conflating
|
|
53
|
+
* them is how a EUR deal ends up rendered as $48,000.
|
|
54
|
+
*/
|
|
55
|
+
export declare function SingleCurrencyOf(cards: readonly DealRosterRow[]): string | null;
|
|
56
|
+
/**
|
|
57
|
+
* What a figure is LABELLED as when no deal states a currency.
|
|
58
|
+
*
|
|
59
|
+
* A display default, not a fact about the money. It is here as one named constant rather than three
|
|
60
|
+
* hardcoded 'USD' literals so that the assumption is stated once, in a place a reader meets it, and
|
|
61
|
+
* so populating `Deal.CurrencyID` is a data change rather than a code hunt.
|
|
62
|
+
*/
|
|
63
|
+
export declare const DEFAULT_DISPLAY_CURRENCY = "USD";
|
|
64
|
+
/** One column: a stage, the deals sitting in it, and the two figures its header shows. */
|
|
65
|
+
export interface BoardColumn {
|
|
66
|
+
StageID: string;
|
|
67
|
+
Label: string;
|
|
68
|
+
/** Set when arriving here would lock the deal — the column refuses drops. */
|
|
69
|
+
IsClosing: boolean;
|
|
70
|
+
Cards: DealRosterRow[];
|
|
71
|
+
/** `SUM(Deal.Amount)` over `Cards`. Stored amounts, added for display. */
|
|
72
|
+
Total: number;
|
|
73
|
+
/**
|
|
74
|
+
* The currency every card in this column is denominated in, or NULL when they disagree.
|
|
75
|
+
*
|
|
76
|
+
* NULL means DO NOT RENDER THE TOTAL. Three display sites used to hardcode 'USD', so a deal priced
|
|
77
|
+
* in EUR rendered as dollars and was added into a dollar column total -- a number that is wrong in
|
|
78
|
+
* a way no reader can see. Refusing beats guessing: a missing figure prompts a question, a
|
|
79
|
+
* confidently wrong one does not.
|
|
80
|
+
*/
|
|
81
|
+
Currency: string | null;
|
|
82
|
+
/** True when the cards disagree about currency, so the template can say why the total is absent. */
|
|
83
|
+
MixedCurrency: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Cards in this column whose figure did NOT come from the orders engine.
|
|
86
|
+
*
|
|
87
|
+
* WIDENED, and the old definition was the more dangerous of the two. It counted only cards with a
|
|
88
|
+
* null amount, so a figure a human typed was counted as priced and folded into the total with no
|
|
89
|
+
* caveat at all -- and on the seeded data every deal carries `AmountIsComputed = 0`, which made this
|
|
90
|
+
* read `0 unpriced` on a board where nothing whatsoever was priced. A missing figure at least looks
|
|
91
|
+
* missing; a stated one looks authoritative, which is why it is the case that needed counting.
|
|
92
|
+
*
|
|
93
|
+
* A null amount is still counted -- it is certainly not priced -- so the footnote keeps one
|
|
94
|
+
* vocabulary rather than growing a second.
|
|
95
|
+
*/
|
|
96
|
+
Unpriced: number;
|
|
97
|
+
/** True when NOTHING in the column was priced, so the footnote can say so rather than count to N. */
|
|
98
|
+
NonePriced: boolean;
|
|
99
|
+
}
|
|
100
|
+
export declare class DealBoardComponent {
|
|
101
|
+
private readonly service;
|
|
102
|
+
private readonly cdr;
|
|
103
|
+
/** The roster, owned by the section so the board and the list cannot disagree about what exists. */
|
|
104
|
+
Deals: DealRosterRow[];
|
|
105
|
+
Pipelines: PipelineLookup[];
|
|
106
|
+
Stages: StageLookup[];
|
|
107
|
+
DealStatusTypes: DealStatusLookup[];
|
|
108
|
+
/** A card was clicked — the section opens it in the workspace, exactly as a roster row does. */
|
|
109
|
+
readonly DealOpened: EventEmitter<DealRosterRow>;
|
|
110
|
+
/** A move persisted; the section re-reads the roster so every page sees the new stage. */
|
|
111
|
+
readonly StageMoved: EventEmitter<void>;
|
|
112
|
+
SelectedPipelineID: string | null;
|
|
113
|
+
/** Shown verbatim. A refused or failed move must say why rather than silently snapping back. */
|
|
114
|
+
Message: string | null;
|
|
115
|
+
Moving: boolean;
|
|
116
|
+
/** The pipeline actually in view — the chosen one, or the first that has any stages. */
|
|
117
|
+
get ActivePipelineID(): string | null;
|
|
118
|
+
/**
|
|
119
|
+
* The columns, in `DisplayOrder`.
|
|
120
|
+
*
|
|
121
|
+
* Recomputed on read rather than cached, matching how the workspace's `IssuesForPane` and the
|
|
122
|
+
* dashboard's tiles already work. The card counts here are small — a pipeline has a handful of stages
|
|
123
|
+
* and a rep has tens of deals, not thousands — so the clarity is worth more than the memoization.
|
|
124
|
+
*/
|
|
125
|
+
get Columns(): BoardColumn[];
|
|
126
|
+
/** Deals on this pipeline that have no stage set — otherwise they would vanish from the board. */
|
|
127
|
+
get Unstaged(): DealRosterRow[];
|
|
128
|
+
/**
|
|
129
|
+
* The drop-list ids CDK needs to know a card may travel between columns.
|
|
130
|
+
*
|
|
131
|
+
* ── CACHED BY VALUE, BECAUSE THIS FEEDS `[cdkDropListConnectedTo]` ──────────────────
|
|
132
|
+
*
|
|
133
|
+
* `.map()` returns a NEW ARRAY IDENTITY on every call, this component runs default change
|
|
134
|
+
* detection, and CDK re-wires its drop-list connections whenever that input's identity changes.
|
|
135
|
+
* During a drag Angular runs change detection on every `pointermove`, so the board was tearing down
|
|
136
|
+
* and rebuilding the connection graph continuously — on the one gesture the demo shows.
|
|
137
|
+
*
|
|
138
|
+
* The sibling `Products` getter in the workspace already documents this exact hazard and returns a
|
|
139
|
+
* stable reference for it. The reasoning was there; it had not reached here.
|
|
140
|
+
*
|
|
141
|
+
* Rebuilt only when the JOINED ids actually change, so adding, removing or reordering a stage still
|
|
142
|
+
* re-wires — which is the behaviour that must not be lost by caching. Comparing the joined
|
|
143
|
+
* string rather than the array means a re-render that produces equal ids reuses the reference,
|
|
144
|
+
* which is the whole point.
|
|
145
|
+
*/
|
|
146
|
+
get ColumnIDs(): string[];
|
|
147
|
+
private _columnIDsKey;
|
|
148
|
+
private _columnIDs;
|
|
149
|
+
SelectPipeline(pipelineID: string): void;
|
|
150
|
+
OpenCard(deal: DealRosterRow): void;
|
|
151
|
+
/** CDK asks per drop list whether a given drag may land. This is where the lock is refused. */
|
|
152
|
+
CanDropInto: (column: BoardColumn) => () => boolean;
|
|
153
|
+
/**
|
|
154
|
+
* A card was dropped on a column.
|
|
155
|
+
*
|
|
156
|
+
* The move goes through `Sales.SaveDeal` — the same operation the workspace saves with — rather than a
|
|
157
|
+
* bespoke write. That is what earns the stage event, the validation and the company resolution without
|
|
158
|
+
* this component knowing they exist; the operation appends the append-only `DealStageEvent` itself when
|
|
159
|
+
* it sees the stage change. Reusing `LoadDraft` also means the deal's lines and instalments round-trip
|
|
160
|
+
* intact, which matters because the operation treats a present array as the complete desired set.
|
|
161
|
+
*/
|
|
162
|
+
OnDrop(event: CdkDragDrop<BoardColumn>, target: BoardColumn): Promise<void>;
|
|
163
|
+
/**
|
|
164
|
+
* ── THE BOARD DOES NOT WRITE STAGE DEFAULTS EITHER ──────────────────────────────────────────────
|
|
165
|
+
*
|
|
166
|
+
* `ApplyStageDefaults` was here too, assigning `Probability` and `ForecastCategoryTypeID`
|
|
167
|
+
* unconditionally onto the dragged card's header — with a comment saying it was deliberately the same
|
|
168
|
+
* rule as the workspace's, so that "a drag and a dropdown must not produce different deals". The
|
|
169
|
+
* intent was right and the implementation destroyed a rep-typed probability, in both places, before
|
|
170
|
+
* the server could apply its fill-but-don't-overwrite rule.
|
|
171
|
+
*
|
|
172
|
+
* Both copies are gone. The server applies the stage's answer inside the save (same trigger, same
|
|
173
|
+
* transaction), and the board re-reads the row afterwards, so the card shows what was actually
|
|
174
|
+
* written rather than what the client guessed. A drag and a dropdown now produce the same deal
|
|
175
|
+
* because they go through the same single writer, which is a stronger guarantee than two clients
|
|
176
|
+
* agreeing with each other.
|
|
177
|
+
*/
|
|
178
|
+
NameOf(pipelineID: string | null): string;
|
|
179
|
+
/** Track by ID so a re-render does not tear down every card. */
|
|
180
|
+
TrackCard: (_: number, deal: DealRosterRow) => string;
|
|
181
|
+
/** Exposed for the template's per-card fallback. See DEFAULT_DISPLAY_CURRENCY. */
|
|
182
|
+
readonly DefaultCurrency = "USD";
|
|
183
|
+
/**
|
|
184
|
+
* What the stated-amount footnote says when a reader hovers it.
|
|
185
|
+
*
|
|
186
|
+
* In the component rather than the template because it is a sentence, and a sentence built out of
|
|
187
|
+
* a ternary inside a binding is unreadable in both places at once.
|
|
188
|
+
*/
|
|
189
|
+
PricingNote(column: BoardColumn): string;
|
|
190
|
+
TrackColumn: (_: number, column: BoardColumn) => string;
|
|
191
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DealBoardComponent, never>;
|
|
192
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DealBoardComponent, "mjs-deal-board", never, { "Deals": { "alias": "Deals"; "required": false; }; "Pipelines": { "alias": "Pipelines"; "required": false; }; "Stages": { "alias": "Stages"; "required": false; }; "DealStatusTypes": { "alias": "DealStatusTypes"; "required": false; }; }, { "DealOpened": "DealOpened"; "StageMoved": "StageMoved"; }, never, never, true, never>;
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=deal-board.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deal-board.component.d.ts","sourceRoot":"","sources":["../../../src/lib/board/deal-board.component.ts"],"names":[],"mappings":"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"}
|