@mj-biz-apps/contracts-ng 0.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/data/entity-names.d.ts +29 -0
- package/dist/lib/data/entity-names.d.ts.map +1 -0
- package/dist/lib/data/entity-names.js +29 -0
- package/dist/lib/data/entity-names.js.map +1 -0
- package/dist/lib/data/provider.d.ts +44 -0
- package/dist/lib/data/provider.d.ts.map +1 -0
- package/dist/lib/data/provider.js +48 -0
- package/dist/lib/data/provider.js.map +1 -0
- package/dist/lib/directives/fk-navigate.directive.d.ts +63 -0
- package/dist/lib/directives/fk-navigate.directive.d.ts.map +1 -0
- package/dist/lib/directives/fk-navigate.directive.js +99 -0
- package/dist/lib/directives/fk-navigate.directive.js.map +1 -0
- package/dist/lib/form-panels/contract.panels.d.ts +124 -0
- package/dist/lib/form-panels/contract.panels.d.ts.map +1 -0
- package/dist/lib/form-panels/contract.panels.js +1167 -0
- package/dist/lib/form-panels/contract.panels.js.map +1 -0
- package/dist/lib/form-panels/organization.panels.d.ts +23 -0
- package/dist/lib/form-panels/organization.panels.d.ts.map +1 -0
- package/dist/lib/form-panels/organization.panels.js +118 -0
- package/dist/lib/form-panels/organization.panels.js.map +1 -0
- package/dist/lib/form-panels/record-files.panel.d.ts +151 -0
- package/dist/lib/form-panels/record-files.panel.d.ts.map +1 -0
- package/dist/lib/form-panels/record-files.panel.js +1046 -0
- package/dist/lib/form-panels/record-files.panel.js.map +1 -0
- package/dist/lib/form-panels/supersede.panel.d.ts +68 -0
- package/dist/lib/form-panels/supersede.panel.d.ts.map +1 -0
- package/dist/lib/form-panels/supersede.panel.js +415 -0
- package/dist/lib/form-panels/supersede.panel.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.js +196 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContract/mjbizappscontractscontract.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.js +120 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplate/mjbizappscontractscontracttemplate.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.js +79 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateModification/mjbizappscontractscontracttemplatemodification.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.js +79 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateProvision/mjbizappscontractscontracttemplateprovision.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.js +86 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractTemplateType/mjbizappscontractscontracttemplatetype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.js +100 -0
- package/dist/lib/generated/Entities/mjBizAppsContractsContractType/mjbizappscontractscontracttype.form.component.js.map +1 -0
- package/dist/lib/generated/generated-forms.module.d.ts +23 -0
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -0
- package/dist/lib/generated/generated-forms.module.js +78 -0
- package/dist/lib/generated/generated-forms.module.js.map +1 -0
- package/dist/lib/pages/configuration.page.d.ts +83 -0
- package/dist/lib/pages/configuration.page.d.ts.map +1 -0
- package/dist/lib/pages/configuration.page.js +240 -0
- package/dist/lib/pages/configuration.page.js.map +1 -0
- package/dist/lib/pages/contract-grid.page.d.ts +169 -0
- package/dist/lib/pages/contract-grid.page.d.ts.map +1 -0
- package/dist/lib/pages/contract-grid.page.js +487 -0
- package/dist/lib/pages/contract-grid.page.js.map +1 -0
- package/dist/lib/pages/contracts-dashboard.page.d.ts +56 -0
- package/dist/lib/pages/contracts-dashboard.page.d.ts.map +1 -0
- package/dist/lib/pages/contracts-dashboard.page.js +215 -0
- package/dist/lib/pages/contracts-dashboard.page.js.map +1 -0
- package/dist/lib/pages/modifications.page.d.ts +96 -0
- package/dist/lib/pages/modifications.page.d.ts.map +1 -0
- package/dist/lib/pages/modifications.page.js +243 -0
- package/dist/lib/pages/modifications.page.js.map +1 -0
- package/dist/lib/pages/templates.page.d.ts +120 -0
- package/dist/lib/pages/templates.page.d.ts.map +1 -0
- package/dist/lib/pages/templates.page.js +258 -0
- package/dist/lib/pages/templates.page.js.map +1 -0
- package/dist/lib/sections/contracts-sections.component.d.ts +112 -0
- package/dist/lib/sections/contracts-sections.component.d.ts.map +1 -0
- package/dist/lib/sections/contracts-sections.component.js +412 -0
- package/dist/lib/sections/contracts-sections.component.js.map +1 -0
- package/dist/lib/sections/section-nav.model.d.ts +78 -0
- package/dist/lib/sections/section-nav.model.d.ts.map +1 -0
- package/dist/lib/sections/section-nav.model.js +110 -0
- package/dist/lib/sections/section-nav.model.js.map +1 -0
- package/dist/lib/sections/section-shell.component.d.ts +73 -0
- package/dist/lib/sections/section-shell.component.d.ts.map +1 -0
- package/dist/lib/sections/section-shell.component.js +170 -0
- package/dist/lib/sections/section-shell.component.js.map +1 -0
- package/dist/public-api.d.ts +44 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +105 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The contract list, and the two worklists that are the same list with a filter.
|
|
3
|
+
*
|
|
4
|
+
* ONE BASE, THREE PAGES. "All contracts", "Renewals & expiry" and "Awaiting documents" are the same
|
|
5
|
+
* grid over the same view with different `ExtraFilter`s and different default pills. Three separate
|
|
6
|
+
* implementations would be three places to fix a column, and they would drift — this is exactly the
|
|
7
|
+
* 2-to-4-locations-of-similar-logic case the workspace guide says to unify, parameterised by context
|
|
8
|
+
* (Template Method: shared skeleton, overridden hooks).
|
|
9
|
+
*
|
|
10
|
+
* THE GRID IS MJ'S OWN (`mj-explorer-entity-data-grid`), not a bespoke table. D-21 ruled the watchlist
|
|
11
|
+
* deliberately thin — stock grid plus filter pills, no saved views — and D-23 requires selecting the
|
|
12
|
+
* BASE VIEW so foreign keys render as names. Both are satisfied by construction here: `vwContracts` is
|
|
13
|
+
* what the entity's `BaseView` resolves to, and it already carries `ContractType`, `Company`,
|
|
14
|
+
* `CustomerOrganization`, `ContractTemplate` and `ParentContract` as joined name columns, plus the six
|
|
15
|
+
* derived columns from the layered wrapper. Showing a UUID would take extra work.
|
|
16
|
+
*
|
|
17
|
+
* WHY THE FILTERS ARE VIEW COLUMNS AND NOT DATE ARITHMETIC IN TYPESCRIPT. `RenewalNoticeDeadline`,
|
|
18
|
+
* `DaysToEnd`, `IsAwaitingDocument` and `State` are computed in the wrapper view (item 12), so a filter
|
|
19
|
+
* here is a comparison against a column rather than a re-derivation. That is the whole payoff of
|
|
20
|
+
* deriving them in SQL: the rule renders once, and a worklist cannot disagree with a form.
|
|
21
|
+
*
|
|
22
|
+
* @module @mj-biz-apps/contracts-ng
|
|
23
|
+
*/
|
|
24
|
+
import { ChangeDetectorRef, Component, ViewEncapsulation, inject } from '@angular/core';
|
|
25
|
+
import { CommonModule } from '@angular/common';
|
|
26
|
+
import { NavigationService } from '@memberjunction/ng-shared';
|
|
27
|
+
import { BaseFormsModule } from '@memberjunction/ng-base-forms';
|
|
28
|
+
import { MJC_ENTITIES } from '../data/entity-names';
|
|
29
|
+
import { ScopedRunView } from '../data/provider';
|
|
30
|
+
import { MJCFkNavigateDirective } from '../directives/fk-navigate.directive';
|
|
31
|
+
import * as i0 from "@angular/core";
|
|
32
|
+
import * as i1 from "@memberjunction/ng-base-forms";
|
|
33
|
+
const _forTrack0 = ($index, $item) => $item.Id;
|
|
34
|
+
function MJCAllContractsPageComponent_For_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
35
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
36
|
+
i0.ɵɵtext(1);
|
|
37
|
+
i0.ɵɵelementEnd();
|
|
38
|
+
} if (rf & 2) {
|
|
39
|
+
const pill_r2 = i0.ɵɵnextContext().$implicit;
|
|
40
|
+
i0.ɵɵadvance();
|
|
41
|
+
i0.ɵɵtextInterpolate(pill_r2.Count);
|
|
42
|
+
} }
|
|
43
|
+
function MJCAllContractsPageComponent_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
44
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
45
|
+
i0.ɵɵelementStart(0, "button", 6);
|
|
46
|
+
i0.ɵɵlistener("click", function MJCAllContractsPageComponent_For_5_Template_button_click_0_listener() { const pill_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.SelectPill(pill_r2.Id)); });
|
|
47
|
+
i0.ɵɵtext(1);
|
|
48
|
+
i0.ɵɵconditionalCreate(2, MJCAllContractsPageComponent_For_5_Conditional_2_Template, 2, 1, "span", 7);
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
} if (rf & 2) {
|
|
51
|
+
const pill_r2 = ctx.$implicit;
|
|
52
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
53
|
+
i0.ɵɵclassProp("mjc-pill--active", pill_r2.Id === ctx_r2.ActivePillId);
|
|
54
|
+
i0.ɵɵproperty("title", pill_r2.Hint ?? "");
|
|
55
|
+
i0.ɵɵattribute("aria-pressed", pill_r2.Id === ctx_r2.ActivePillId);
|
|
56
|
+
i0.ɵɵadvance();
|
|
57
|
+
i0.ɵɵtextInterpolate1(" ", pill_r2.Label, " ");
|
|
58
|
+
i0.ɵɵadvance();
|
|
59
|
+
i0.ɵɵconditional(pill_r2.Count ? 2 : -1);
|
|
60
|
+
} }
|
|
61
|
+
function MJCRenewalsPageComponent_For_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
62
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
63
|
+
i0.ɵɵtext(1);
|
|
64
|
+
i0.ɵɵelementEnd();
|
|
65
|
+
} if (rf & 2) {
|
|
66
|
+
const pill_r2 = i0.ɵɵnextContext().$implicit;
|
|
67
|
+
i0.ɵɵadvance();
|
|
68
|
+
i0.ɵɵtextInterpolate(pill_r2.Count);
|
|
69
|
+
} }
|
|
70
|
+
function MJCRenewalsPageComponent_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
71
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
72
|
+
i0.ɵɵelementStart(0, "button", 6);
|
|
73
|
+
i0.ɵɵlistener("click", function MJCRenewalsPageComponent_For_5_Template_button_click_0_listener() { const pill_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.SelectPill(pill_r2.Id)); });
|
|
74
|
+
i0.ɵɵtext(1);
|
|
75
|
+
i0.ɵɵconditionalCreate(2, MJCRenewalsPageComponent_For_5_Conditional_2_Template, 2, 1, "span", 7);
|
|
76
|
+
i0.ɵɵelementEnd();
|
|
77
|
+
} if (rf & 2) {
|
|
78
|
+
const pill_r2 = ctx.$implicit;
|
|
79
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
80
|
+
i0.ɵɵclassProp("mjc-pill--active", pill_r2.Id === ctx_r2.ActivePillId);
|
|
81
|
+
i0.ɵɵproperty("title", pill_r2.Hint ?? "");
|
|
82
|
+
i0.ɵɵattribute("aria-pressed", pill_r2.Id === ctx_r2.ActivePillId);
|
|
83
|
+
i0.ɵɵadvance();
|
|
84
|
+
i0.ɵɵtextInterpolate1(" ", pill_r2.Label, " ");
|
|
85
|
+
i0.ɵɵadvance();
|
|
86
|
+
i0.ɵɵconditional(pill_r2.Count ? 2 : -1);
|
|
87
|
+
} }
|
|
88
|
+
function MJCAwaitingDocumentsPageComponent_For_5_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
89
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
90
|
+
i0.ɵɵtext(1);
|
|
91
|
+
i0.ɵɵelementEnd();
|
|
92
|
+
} if (rf & 2) {
|
|
93
|
+
const pill_r2 = i0.ɵɵnextContext().$implicit;
|
|
94
|
+
i0.ɵɵadvance();
|
|
95
|
+
i0.ɵɵtextInterpolate(pill_r2.Count);
|
|
96
|
+
} }
|
|
97
|
+
function MJCAwaitingDocumentsPageComponent_For_5_Template(rf, ctx) { if (rf & 1) {
|
|
98
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
99
|
+
i0.ɵɵelementStart(0, "button", 6);
|
|
100
|
+
i0.ɵɵlistener("click", function MJCAwaitingDocumentsPageComponent_For_5_Template_button_click_0_listener() { const pill_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.SelectPill(pill_r2.Id)); });
|
|
101
|
+
i0.ɵɵtext(1);
|
|
102
|
+
i0.ɵɵconditionalCreate(2, MJCAwaitingDocumentsPageComponent_For_5_Conditional_2_Template, 2, 1, "span", 7);
|
|
103
|
+
i0.ɵɵelementEnd();
|
|
104
|
+
} if (rf & 2) {
|
|
105
|
+
const pill_r2 = ctx.$implicit;
|
|
106
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
107
|
+
i0.ɵɵclassProp("mjc-pill--active", pill_r2.Id === ctx_r2.ActivePillId);
|
|
108
|
+
i0.ɵɵproperty("title", pill_r2.Hint ?? "");
|
|
109
|
+
i0.ɵɵattribute("aria-pressed", pill_r2.Id === ctx_r2.ActivePillId);
|
|
110
|
+
i0.ɵɵadvance();
|
|
111
|
+
i0.ɵɵtextInterpolate1(" ", pill_r2.Label, " ");
|
|
112
|
+
i0.ɵɵadvance();
|
|
113
|
+
i0.ɵɵconditional(pill_r2.Count ? 2 : -1);
|
|
114
|
+
} }
|
|
115
|
+
/**
|
|
116
|
+
* Shared skeleton. A concrete page supplies its title, its pills, and which pill starts active.
|
|
117
|
+
*
|
|
118
|
+
* `standalone: false` is wrong for these — they are created dynamically by the section via
|
|
119
|
+
* `createComponent`, so they must be standalone and self-sufficient in their imports.
|
|
120
|
+
*/
|
|
121
|
+
export class MJCContractGridPageBase {
|
|
122
|
+
cdr = inject(ChangeDetectorRef);
|
|
123
|
+
navigation = inject(NavigationService);
|
|
124
|
+
/** Pills for this page, in display order. The first is the default. */
|
|
125
|
+
Pills = [];
|
|
126
|
+
/** Which pill is active. Null means "no pill" — the unfiltered list. */
|
|
127
|
+
ActivePillId = null;
|
|
128
|
+
/** What the grid runs. Rebuilt whenever the active pill changes. */
|
|
129
|
+
Params = null;
|
|
130
|
+
IsLoading = false;
|
|
131
|
+
LoadError = null;
|
|
132
|
+
/** Free-text restriction the user typed, ANDed with the pill. */
|
|
133
|
+
SearchText = '';
|
|
134
|
+
/**
|
|
135
|
+
* Toolbar affordances that actually work, and one that does not.
|
|
136
|
+
*
|
|
137
|
+
* ⚠ `showFilterToggle` IS A NO-OP, and this comment used to claim the opposite. It is declared on
|
|
138
|
+
* `GridToolbarConfig` (`grid-types.ts:249`) and documented in the entity-viewer README, and it is
|
|
139
|
+
* **read nowhere in MJ** — no template branch renders a filter button. Three sibling hooks are dead
|
|
140
|
+
* the same way: the `AllowColumnFilters` input stores `_allowColumnFilters` and nothing reads it,
|
|
141
|
+
* `_filterState` is declared and never touched, and `defaultColDef.filter` is hardcoded `false`, so
|
|
142
|
+
* AG Grid's per-column filters are off with no input to turn them on. It is left set to `true` here
|
|
143
|
+
* because it costs nothing and is the flag to keep passing if MJ ever wires it up.
|
|
144
|
+
*
|
|
145
|
+
* So the ONLY filtering this page has beyond the pills is `showSearch` — which sets AG Grid's
|
|
146
|
+
* `quickFilterText`, a client-side substring match over the rows already loaded. It is not
|
|
147
|
+
* structured and not server-side. Filtering by date range / category / derived State needs a real
|
|
148
|
+
* filter popover (see `design-docs/ui-design/mockups-v2/renewal-watchlist.html`), which is ours to
|
|
149
|
+
* build; the pills stay regardless, because they encode the QUESTIONS people ask rather than
|
|
150
|
+
* predicates a user would assemble by hand.
|
|
151
|
+
*/
|
|
152
|
+
GridToolbar = {
|
|
153
|
+
showSearch: true,
|
|
154
|
+
showFilterToggle: true,
|
|
155
|
+
showColumnChooser: true,
|
|
156
|
+
showRefresh: true,
|
|
157
|
+
showExport: true,
|
|
158
|
+
showRowCount: true,
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Open the double-clicked record.
|
|
162
|
+
*
|
|
163
|
+
* THE GRID DOES NOT NAVIGATE ITSELF. `NavigateOnDoubleClick` only controls whether it EMITS
|
|
164
|
+
* `Navigate`; acting on it is the HOST's job. Without this, a double-click merely selected the row
|
|
165
|
+
* — measured in a real browser, where it looked exactly like the grid being broken. Explorer's own
|
|
166
|
+
* host wires this for generated forms; a page hosting the grid inside a BaseResourceComponent must
|
|
167
|
+
* do it itself.
|
|
168
|
+
*/
|
|
169
|
+
OnNavigate(event) {
|
|
170
|
+
if (!event?.EntityName)
|
|
171
|
+
return;
|
|
172
|
+
if (event.Kind === 'record' && event.PrimaryKey) {
|
|
173
|
+
this.navigation.OpenEntityRecord(event.EntityName, event.PrimaryKey);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (event.Kind === 'new-record') {
|
|
177
|
+
// TWO kinds, and missing this one meant the toolbar's New button did NOTHING on every grid
|
|
178
|
+
// page — found in the browser, after the double-click bug had already taught me the same
|
|
179
|
+
// lesson about this component. Handling only 'record' silently dropped it.
|
|
180
|
+
//
|
|
181
|
+
// ⚠ `event.DefaultValues` is DISCARDED here, and it has nowhere to go: NavigationOptions
|
|
182
|
+
// carries no default-values field, so `OpenNewEntityRecord` cannot pre-populate. Harmless on
|
|
183
|
+
// these pages (nothing sets NewRecordValues), but it means the Organization agreements
|
|
184
|
+
// panel's pre-linking to the customer will NOT survive a New click routed through here —
|
|
185
|
+
// that panel needs its own affordance, or MJ needs the option.
|
|
186
|
+
//
|
|
187
|
+
// Filed upstream in ~/MJDev/MJ-UPSTREAM.md, because it is a PLATFORM gap every family app
|
|
188
|
+
// hosting a grid in a resource page will hit, and a comment here only reaches readers of
|
|
189
|
+
// this repo.
|
|
190
|
+
this.navigation.OpenNewEntityRecord(event.EntityName);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* A restriction that applies to EVERY pill on this page — what makes a worklist a worklist.
|
|
195
|
+
*
|
|
196
|
+
* Kept separate from the pills rather than baked into each one: the page-level scope is the
|
|
197
|
+
* page's identity ("contracts awaiting documents"), while a pill narrows within it. Merging them
|
|
198
|
+
* would mean repeating the scope in every pill and being able to forget it in one.
|
|
199
|
+
*/
|
|
200
|
+
get pageFilter() {
|
|
201
|
+
return '';
|
|
202
|
+
}
|
|
203
|
+
ngOnInit() {
|
|
204
|
+
this.Pills = this.pills;
|
|
205
|
+
this.ActivePillId = this.Pills[0]?.Id ?? null;
|
|
206
|
+
this.rebuild();
|
|
207
|
+
void this.refreshCounts();
|
|
208
|
+
}
|
|
209
|
+
/** Pill click. Re-selecting the active pill CLEARS it, which is how a user gets back to unfiltered. */
|
|
210
|
+
SelectPill(id) {
|
|
211
|
+
this.ActivePillId = this.ActivePillId === id ? null : id;
|
|
212
|
+
this.rebuild();
|
|
213
|
+
}
|
|
214
|
+
ApplySearch(text) {
|
|
215
|
+
this.SearchText = text ?? '';
|
|
216
|
+
this.rebuild();
|
|
217
|
+
}
|
|
218
|
+
/** Compose page scope + active pill + search into one ExtraFilter. */
|
|
219
|
+
rebuild() {
|
|
220
|
+
const clauses = [];
|
|
221
|
+
if (this.pageFilter)
|
|
222
|
+
clauses.push(`(${this.pageFilter})`);
|
|
223
|
+
const pill = this.Pills.find((p) => p.Id === this.ActivePillId);
|
|
224
|
+
if (pill?.Filter)
|
|
225
|
+
clauses.push(`(${pill.Filter})`);
|
|
226
|
+
const search = this.SearchText.trim();
|
|
227
|
+
if (search) {
|
|
228
|
+
// Single quotes doubled — the only escaping this needs, and it must not be skipped: the
|
|
229
|
+
// string reaches SQL. Searching the NAME columns rather than the ids is the point of D-23.
|
|
230
|
+
const safe = search.replace(/'/g, "''");
|
|
231
|
+
clauses.push(`(ContractNumber LIKE '%${safe}%' OR CustomerOrganization LIKE '%${safe}%' ` +
|
|
232
|
+
`OR ContractType LIKE '%${safe}%')`);
|
|
233
|
+
}
|
|
234
|
+
this.Params = {
|
|
235
|
+
EntityName: MJC_ENTITIES.Contract,
|
|
236
|
+
ExtraFilter: clauses.join(' AND '),
|
|
237
|
+
OrderBy: this.orderBy,
|
|
238
|
+
};
|
|
239
|
+
this.cdr.detectChanges();
|
|
240
|
+
}
|
|
241
|
+
/** Default ordering. Worklists override — a worklist sorts by urgency, not by identity. */
|
|
242
|
+
get orderBy() {
|
|
243
|
+
return 'ContractNumber DESC';
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Count each pill, so the rail and the pills agree about how much work there is.
|
|
247
|
+
*
|
|
248
|
+
* One `RunView` per pill with `MaxRows: 1` — the count comes from `TotalRowCount`, so nothing is
|
|
249
|
+
* transferred. Failures are swallowed to a null count rather than surfaced: a missing badge is a
|
|
250
|
+
* cosmetic loss, and a page that refuses to render because a count query failed is not.
|
|
251
|
+
*/
|
|
252
|
+
async refreshCounts() {
|
|
253
|
+
const rv = ScopedRunView();
|
|
254
|
+
await Promise.all(this.Pills.map(async (pill) => {
|
|
255
|
+
const clauses = [this.pageFilter, pill.Filter].filter(Boolean).map((c) => `(${c})`);
|
|
256
|
+
try {
|
|
257
|
+
const result = await rv.RunView({
|
|
258
|
+
EntityName: MJC_ENTITIES.Contract,
|
|
259
|
+
ExtraFilter: clauses.join(' AND '),
|
|
260
|
+
MaxRows: 1,
|
|
261
|
+
});
|
|
262
|
+
pill.Count = result?.TotalRowCount ?? undefined;
|
|
263
|
+
}
|
|
264
|
+
catch {
|
|
265
|
+
pill.Count = undefined;
|
|
266
|
+
}
|
|
267
|
+
}));
|
|
268
|
+
this.cdr.detectChanges();
|
|
269
|
+
}
|
|
270
|
+
static ɵfac = function MJCContractGridPageBase_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJCContractGridPageBase)(); };
|
|
271
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJCContractGridPageBase, selectors: [["ng-component"]], decls: 0, vars: 0, template: function MJCContractGridPageBase_Template(rf, ctx) { }, encapsulation: 2 });
|
|
272
|
+
}
|
|
273
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJCContractGridPageBase, [{
|
|
274
|
+
type: Component,
|
|
275
|
+
args: [{ template: '' }]
|
|
276
|
+
}], null, null); })();
|
|
277
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJCContractGridPageBase, { className: "MJCContractGridPageBase", filePath: "lib/pages/contract-grid.page.ts", lineNumber: 53 }); })();
|
|
278
|
+
/* ────────────────────────────────────────────────────────────────────────────
|
|
279
|
+
* The three pages
|
|
280
|
+
* ──────────────────────────────────────────────────────────────────────────── */
|
|
281
|
+
/** Markup shared by all three. Hoisted so a column or a pill row is styled in one place. */
|
|
282
|
+
const GRID_TEMPLATE = `
|
|
283
|
+
<div class="mjc-page mjc-page--grid">
|
|
284
|
+
<p class="mjc-page__intro">{{ Intro }}</p>
|
|
285
|
+
|
|
286
|
+
<div class="mjc-pills">
|
|
287
|
+
@for (pill of Pills; track pill.Id) {
|
|
288
|
+
<button
|
|
289
|
+
type="button"
|
|
290
|
+
class="mjc-pill"
|
|
291
|
+
[class.mjc-pill--active]="pill.Id === ActivePillId"
|
|
292
|
+
[attr.aria-pressed]="pill.Id === ActivePillId"
|
|
293
|
+
[title]="pill.Hint ?? ''"
|
|
294
|
+
(click)="SelectPill(pill.Id)">
|
|
295
|
+
{{ pill.Label }}
|
|
296
|
+
@if (pill.Count) { <span class="mjc-pill__count">{{ pill.Count }}</span> }
|
|
297
|
+
</button>
|
|
298
|
+
}
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
<div class="mjc-grid-fill">
|
|
302
|
+
<mj-explorer-entity-data-grid mjcFkNavigate
|
|
303
|
+
[Params]="Params"
|
|
304
|
+
[ShowToolbar]="true"
|
|
305
|
+
[ToolbarConfig]="GridToolbar"
|
|
306
|
+
[NavigateOnDoubleClick]="true"
|
|
307
|
+
(Navigate)="OnNavigate($event)" />
|
|
308
|
+
</div>
|
|
309
|
+
</div>
|
|
310
|
+
`;
|
|
311
|
+
/** Every contract, newest number first. */
|
|
312
|
+
export class MJCAllContractsPageComponent extends MJCContractGridPageBase {
|
|
313
|
+
Intro = 'Every agreement on record. Double-click a row to open it.';
|
|
314
|
+
get pills() {
|
|
315
|
+
return [
|
|
316
|
+
{ Id: 'open', Label: 'Open', Filter: `State IN ('Draft','Executed','Active')`, Hint: 'Not expired, terminated or superseded' },
|
|
317
|
+
{ Id: 'active', Label: 'In force', Filter: `State = 'Active'`, Hint: 'Started and not yet ended' },
|
|
318
|
+
{ Id: 'executed', Label: 'Signed, not started', Filter: `State = 'Executed'`, Hint: 'Executed with a future effective date' },
|
|
319
|
+
{ Id: 'modified', Label: 'Modified', Filter: 'HasModifications = 1', Hint: 'Deviates from the standard agreement' },
|
|
320
|
+
{ Id: 'all', Label: 'All', Filter: '', Hint: 'Including expired, terminated and superseded' },
|
|
321
|
+
];
|
|
322
|
+
}
|
|
323
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵMJCAllContractsPageComponent_BaseFactory; return function MJCAllContractsPageComponent_Factory(__ngFactoryType__) { return (ɵMJCAllContractsPageComponent_BaseFactory || (ɵMJCAllContractsPageComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MJCAllContractsPageComponent)))(__ngFactoryType__ || MJCAllContractsPageComponent); }; })();
|
|
324
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJCAllContractsPageComponent, selectors: [["mjc-all-contracts-page"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 5, consts: [[1, "mjc-page", "mjc-page--grid"], [1, "mjc-page__intro"], [1, "mjc-pills"], ["type", "button", 1, "mjc-pill", 3, "mjc-pill--active", "title"], [1, "mjc-grid-fill"], ["mjcFkNavigate", "", 3, "Navigate", "Params", "ShowToolbar", "ToolbarConfig", "NavigateOnDoubleClick"], ["type", "button", 1, "mjc-pill", 3, "click", "title"], [1, "mjc-pill__count"]], template: function MJCAllContractsPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
325
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "p", 1);
|
|
326
|
+
i0.ɵɵtext(2);
|
|
327
|
+
i0.ɵɵelementEnd();
|
|
328
|
+
i0.ɵɵelementStart(3, "div", 2);
|
|
329
|
+
i0.ɵɵrepeaterCreate(4, MJCAllContractsPageComponent_For_5_Template, 3, 6, "button", 3, _forTrack0);
|
|
330
|
+
i0.ɵɵelementEnd();
|
|
331
|
+
i0.ɵɵelementStart(6, "div", 4)(7, "mj-explorer-entity-data-grid", 5);
|
|
332
|
+
i0.ɵɵlistener("Navigate", function MJCAllContractsPageComponent_Template_mj_explorer_entity_data_grid_Navigate_7_listener($event) { return ctx.OnNavigate($event); });
|
|
333
|
+
i0.ɵɵelementEnd()()();
|
|
334
|
+
} if (rf & 2) {
|
|
335
|
+
i0.ɵɵadvance(2);
|
|
336
|
+
i0.ɵɵtextInterpolate(ctx.Intro);
|
|
337
|
+
i0.ɵɵadvance(2);
|
|
338
|
+
i0.ɵɵrepeater(ctx.Pills);
|
|
339
|
+
i0.ɵɵadvance(3);
|
|
340
|
+
i0.ɵɵproperty("Params", ctx.Params)("ShowToolbar", true)("ToolbarConfig", ctx.GridToolbar)("NavigateOnDoubleClick", true);
|
|
341
|
+
} }, dependencies: [CommonModule, BaseFormsModule, i1.ExplorerEntityDataGridComponent, MJCFkNavigateDirective], encapsulation: 2 });
|
|
342
|
+
}
|
|
343
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJCAllContractsPageComponent, [{
|
|
344
|
+
type: Component,
|
|
345
|
+
args: [{
|
|
346
|
+
selector: 'mjc-all-contracts-page',
|
|
347
|
+
standalone: true,
|
|
348
|
+
encapsulation: ViewEncapsulation.None,
|
|
349
|
+
imports: [CommonModule, BaseFormsModule, MJCFkNavigateDirective],
|
|
350
|
+
template: GRID_TEMPLATE,
|
|
351
|
+
}]
|
|
352
|
+
}], null, null); })();
|
|
353
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJCAllContractsPageComponent, { className: "MJCAllContractsPageComponent", filePath: "lib/pages/contract-grid.page.ts", lineNumber: 274 }); })();
|
|
354
|
+
/**
|
|
355
|
+
* Renewals & expiry — item 12's screen.
|
|
356
|
+
*
|
|
357
|
+
* Sorted by `RenewalNoticeDeadline`, not `EndDate`, because the date that matters is when our chance to
|
|
358
|
+
* act ends rather than when the contract does. Nulls last: a contract with no notice period recorded
|
|
359
|
+
* has no deadline to miss, so it should not head a list of deadlines.
|
|
360
|
+
*
|
|
361
|
+
* The four defaults are exactly D-21's, and there is deliberately no Save-as-view: users drive filters
|
|
362
|
+
* in-session, and persisting custom watchlists is phase 2 or never.
|
|
363
|
+
*/
|
|
364
|
+
export class MJCRenewalsPageComponent extends MJCContractGridPageBase {
|
|
365
|
+
Intro = 'What finance must act on. Sorted by the renewal-notice deadline — the day our chance to act ends, ' +
|
|
366
|
+
'which is earlier than the day the contract does.';
|
|
367
|
+
/** Only live agreements can be renewed or allowed to expire. */
|
|
368
|
+
get pageFilter() {
|
|
369
|
+
return `State IN ('Active','Executed')`;
|
|
370
|
+
}
|
|
371
|
+
get orderBy() {
|
|
372
|
+
// CASE rather than NULLS LAST — T-SQL has no NULLS LAST, and sorting nulls first would put
|
|
373
|
+
// every contract with no notice period at the top of a deadline list.
|
|
374
|
+
return 'CASE WHEN RenewalNoticeDeadline IS NULL THEN 1 ELSE 0 END, RenewalNoticeDeadline ASC';
|
|
375
|
+
}
|
|
376
|
+
get pills() {
|
|
377
|
+
return [
|
|
378
|
+
{
|
|
379
|
+
Id: 'next120',
|
|
380
|
+
Label: 'Ends in 120 days',
|
|
381
|
+
Filter: 'DaysToEnd IS NOT NULL AND DaysToEnd BETWEEN 0 AND 120',
|
|
382
|
+
Hint: 'The quarter-ahead view',
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
Id: 'notice-open',
|
|
386
|
+
Label: 'Notice window open',
|
|
387
|
+
Filter: 'RenewalNoticeDeadline IS NOT NULL AND RenewalNoticeDeadline >= CAST(GETUTCDATE() AS date)',
|
|
388
|
+
Hint: 'We can still give notice in time',
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
Id: 'notice-missed',
|
|
392
|
+
Label: 'Notice window passed',
|
|
393
|
+
Filter: 'RenewalNoticeDeadline IS NOT NULL AND RenewalNoticeDeadline < CAST(GETUTCDATE() AS date)',
|
|
394
|
+
Hint: 'The deadline to give notice has gone by — surfaced rather than hidden',
|
|
395
|
+
},
|
|
396
|
+
{ Id: 'auto', Label: 'Auto-renewing', Filter: 'AutoRenew = 1', Hint: 'Renews unless someone acts' },
|
|
397
|
+
{ Id: 'cancellation', Label: 'In cancellation window', Filter: 'IsInCancellationWindow = 1', Hint: "Inside the customer's notice period" },
|
|
398
|
+
];
|
|
399
|
+
}
|
|
400
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵMJCRenewalsPageComponent_BaseFactory; return function MJCRenewalsPageComponent_Factory(__ngFactoryType__) { return (ɵMJCRenewalsPageComponent_BaseFactory || (ɵMJCRenewalsPageComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MJCRenewalsPageComponent)))(__ngFactoryType__ || MJCRenewalsPageComponent); }; })();
|
|
401
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJCRenewalsPageComponent, selectors: [["mjc-renewals-page"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 5, consts: [[1, "mjc-page", "mjc-page--grid"], [1, "mjc-page__intro"], [1, "mjc-pills"], ["type", "button", 1, "mjc-pill", 3, "mjc-pill--active", "title"], [1, "mjc-grid-fill"], ["mjcFkNavigate", "", 3, "Navigate", "Params", "ShowToolbar", "ToolbarConfig", "NavigateOnDoubleClick"], ["type", "button", 1, "mjc-pill", 3, "click", "title"], [1, "mjc-pill__count"]], template: function MJCRenewalsPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
402
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "p", 1);
|
|
403
|
+
i0.ɵɵtext(2);
|
|
404
|
+
i0.ɵɵelementEnd();
|
|
405
|
+
i0.ɵɵelementStart(3, "div", 2);
|
|
406
|
+
i0.ɵɵrepeaterCreate(4, MJCRenewalsPageComponent_For_5_Template, 3, 6, "button", 3, _forTrack0);
|
|
407
|
+
i0.ɵɵelementEnd();
|
|
408
|
+
i0.ɵɵelementStart(6, "div", 4)(7, "mj-explorer-entity-data-grid", 5);
|
|
409
|
+
i0.ɵɵlistener("Navigate", function MJCRenewalsPageComponent_Template_mj_explorer_entity_data_grid_Navigate_7_listener($event) { return ctx.OnNavigate($event); });
|
|
410
|
+
i0.ɵɵelementEnd()()();
|
|
411
|
+
} if (rf & 2) {
|
|
412
|
+
i0.ɵɵadvance(2);
|
|
413
|
+
i0.ɵɵtextInterpolate(ctx.Intro);
|
|
414
|
+
i0.ɵɵadvance(2);
|
|
415
|
+
i0.ɵɵrepeater(ctx.Pills);
|
|
416
|
+
i0.ɵɵadvance(3);
|
|
417
|
+
i0.ɵɵproperty("Params", ctx.Params)("ShowToolbar", true)("ToolbarConfig", ctx.GridToolbar)("NavigateOnDoubleClick", true);
|
|
418
|
+
} }, dependencies: [CommonModule, BaseFormsModule, i1.ExplorerEntityDataGridComponent, MJCFkNavigateDirective], encapsulation: 2 });
|
|
419
|
+
}
|
|
420
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJCRenewalsPageComponent, [{
|
|
421
|
+
type: Component,
|
|
422
|
+
args: [{
|
|
423
|
+
selector: 'mjc-renewals-page',
|
|
424
|
+
standalone: true,
|
|
425
|
+
encapsulation: ViewEncapsulation.None,
|
|
426
|
+
imports: [CommonModule, BaseFormsModule, MJCFkNavigateDirective],
|
|
427
|
+
template: GRID_TEMPLATE,
|
|
428
|
+
}]
|
|
429
|
+
}], null, null); })();
|
|
430
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJCRenewalsPageComponent, { className: "MJCRenewalsPageComponent", filePath: "lib/pages/contract-grid.page.ts", lineNumber: 305 }); })();
|
|
431
|
+
/**
|
|
432
|
+
* Awaiting documents — the other half of item 12's work group.
|
|
433
|
+
*
|
|
434
|
+
* `IsAwaitingDocument` is derived (the contract TYPE expects paper and no file is linked), which is why
|
|
435
|
+
* this page is a filter rather than a stored worklist: a Payment Link never appears here, because its
|
|
436
|
+
* type says paper was never expected. Nothing has to remember to clear a flag.
|
|
437
|
+
*/
|
|
438
|
+
export class MJCAwaitingDocumentsPageComponent extends MJCContractGridPageBase {
|
|
439
|
+
Intro = 'Contracts whose type expects an executed document, with none attached. Payment Links never appear ' +
|
|
440
|
+
'here — their type says no signature was ever expected.';
|
|
441
|
+
get pageFilter() {
|
|
442
|
+
return 'IsAwaitingDocument = 1';
|
|
443
|
+
}
|
|
444
|
+
get orderBy() {
|
|
445
|
+
// Oldest signature first: a contract executed months ago with no filed paper is the one to chase.
|
|
446
|
+
return 'CASE WHEN ExecutedDate IS NULL THEN 1 ELSE 0 END, ExecutedDate ASC';
|
|
447
|
+
}
|
|
448
|
+
get pills() {
|
|
449
|
+
return [
|
|
450
|
+
{ Id: 'in-force', Label: 'Already in force', Filter: `State = 'Active'`, Hint: 'Operating without filed paper — the urgent ones' },
|
|
451
|
+
{ Id: 'signed', Label: 'Signed, awaiting file', Filter: 'ExecutedDate IS NOT NULL', Hint: 'Executed but the document is not attached' },
|
|
452
|
+
{ Id: 'unsigned', Label: 'Not signed yet', Filter: 'ExecutedDate IS NULL', Hint: 'Nothing to file yet — expected' },
|
|
453
|
+
{ Id: 'all', Label: 'All awaiting', Filter: '', Hint: 'Everything missing expected paper' },
|
|
454
|
+
];
|
|
455
|
+
}
|
|
456
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵMJCAwaitingDocumentsPageComponent_BaseFactory; return function MJCAwaitingDocumentsPageComponent_Factory(__ngFactoryType__) { return (ɵMJCAwaitingDocumentsPageComponent_BaseFactory || (ɵMJCAwaitingDocumentsPageComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MJCAwaitingDocumentsPageComponent)))(__ngFactoryType__ || MJCAwaitingDocumentsPageComponent); }; })();
|
|
457
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJCAwaitingDocumentsPageComponent, selectors: [["mjc-awaiting-documents-page"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 8, vars: 5, consts: [[1, "mjc-page", "mjc-page--grid"], [1, "mjc-page__intro"], [1, "mjc-pills"], ["type", "button", 1, "mjc-pill", 3, "mjc-pill--active", "title"], [1, "mjc-grid-fill"], ["mjcFkNavigate", "", 3, "Navigate", "Params", "ShowToolbar", "ToolbarConfig", "NavigateOnDoubleClick"], ["type", "button", 1, "mjc-pill", 3, "click", "title"], [1, "mjc-pill__count"]], template: function MJCAwaitingDocumentsPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
458
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "p", 1);
|
|
459
|
+
i0.ɵɵtext(2);
|
|
460
|
+
i0.ɵɵelementEnd();
|
|
461
|
+
i0.ɵɵelementStart(3, "div", 2);
|
|
462
|
+
i0.ɵɵrepeaterCreate(4, MJCAwaitingDocumentsPageComponent_For_5_Template, 3, 6, "button", 3, _forTrack0);
|
|
463
|
+
i0.ɵɵelementEnd();
|
|
464
|
+
i0.ɵɵelementStart(6, "div", 4)(7, "mj-explorer-entity-data-grid", 5);
|
|
465
|
+
i0.ɵɵlistener("Navigate", function MJCAwaitingDocumentsPageComponent_Template_mj_explorer_entity_data_grid_Navigate_7_listener($event) { return ctx.OnNavigate($event); });
|
|
466
|
+
i0.ɵɵelementEnd()()();
|
|
467
|
+
} if (rf & 2) {
|
|
468
|
+
i0.ɵɵadvance(2);
|
|
469
|
+
i0.ɵɵtextInterpolate(ctx.Intro);
|
|
470
|
+
i0.ɵɵadvance(2);
|
|
471
|
+
i0.ɵɵrepeater(ctx.Pills);
|
|
472
|
+
i0.ɵɵadvance(3);
|
|
473
|
+
i0.ɵɵproperty("Params", ctx.Params)("ShowToolbar", true)("ToolbarConfig", ctx.GridToolbar)("NavigateOnDoubleClick", true);
|
|
474
|
+
} }, dependencies: [CommonModule, BaseFormsModule, i1.ExplorerEntityDataGridComponent, MJCFkNavigateDirective], encapsulation: 2 });
|
|
475
|
+
}
|
|
476
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJCAwaitingDocumentsPageComponent, [{
|
|
477
|
+
type: Component,
|
|
478
|
+
args: [{
|
|
479
|
+
selector: 'mjc-awaiting-documents-page',
|
|
480
|
+
standalone: true,
|
|
481
|
+
encapsulation: ViewEncapsulation.None,
|
|
482
|
+
imports: [CommonModule, BaseFormsModule, MJCFkNavigateDirective],
|
|
483
|
+
template: GRID_TEMPLATE,
|
|
484
|
+
}]
|
|
485
|
+
}], null, null); })();
|
|
486
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJCAwaitingDocumentsPageComponent, { className: "MJCAwaitingDocumentsPageComponent", filePath: "lib/pages/contract-grid.page.ts", lineNumber: 361 }); })();
|
|
487
|
+
//# sourceMappingURL=contract-grid.page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contract-grid.page.js","sourceRoot":"","sources":["../../../src/lib/pages/contract-grid.page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAU,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,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AChB,aAAa,EAAE,iBAAiB,CAAC,IAAI;gBACrC,OAAO,EAAE,CAAC,YAAY,EAAE,eAAe,EAAE,sBAAsB,CAAC;gBAChE,QAAQ,EAAE,aAAa;aAC1B;;kFACY,iCAAiC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The Contracts dashboard — "what needs attention", not "how are we doing".
|
|
3
|
+
*
|
|
4
|
+
* DELIBERATELY NOT A CHART. This app tracks obligations; the useful question on opening it is which
|
|
5
|
+
* agreements need a person this quarter, and the honest answer is four numbers and the lists behind
|
|
6
|
+
* them. A revenue chart would be a chart about orders' data drawn on contracts' screen, and it would
|
|
7
|
+
* invite reading it as authoritative about money — which contracts explicitly is not (plan §1).
|
|
8
|
+
*
|
|
9
|
+
* Every number is a count over the layered base view's DERIVED columns, so the dashboard cannot
|
|
10
|
+
* disagree with the worklists: both read `IsAwaitingDocument`, `RenewalNoticeDeadline` and `State`
|
|
11
|
+
* from the same view. A dashboard computing its own version of "expiring soon" is how a summary and a
|
|
12
|
+
* worklist end up giving different answers to the same question.
|
|
13
|
+
*
|
|
14
|
+
* @module @mj-biz-apps/contracts-ng
|
|
15
|
+
*/
|
|
16
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
17
|
+
import * as i0 from "@angular/core";
|
|
18
|
+
/** One headline number, and where clicking it goes. */
|
|
19
|
+
interface AttentionTile {
|
|
20
|
+
Id: string;
|
|
21
|
+
Label: string;
|
|
22
|
+
/** What the number means, in a sentence — shown as the tile's title. */
|
|
23
|
+
Hint: string;
|
|
24
|
+
Filter: string;
|
|
25
|
+
/** Rail page id to open. Null means the tile is informational only. */
|
|
26
|
+
GoTo: string | null;
|
|
27
|
+
Count: number | null;
|
|
28
|
+
}
|
|
29
|
+
export declare class MJCContractsDashboardPageComponent implements OnInit {
|
|
30
|
+
private readonly cdr;
|
|
31
|
+
/** Asks the host section to switch rail pages. The dashboard does not route itself. */
|
|
32
|
+
NavigateToPage: EventEmitter<string>;
|
|
33
|
+
LoadError: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* The four questions worth answering on open, in priority order.
|
|
36
|
+
*
|
|
37
|
+
* "In force without paper" leads because it is the only one that is both an obligation we are
|
|
38
|
+
* already performing and a document we cannot produce — the combination that hurts in a dispute.
|
|
39
|
+
*/
|
|
40
|
+
Tiles: AttentionTile[];
|
|
41
|
+
ngOnInit(): void;
|
|
42
|
+
Open(tile: AttentionTile): void;
|
|
43
|
+
/**
|
|
44
|
+
* Count every tile concurrently.
|
|
45
|
+
*
|
|
46
|
+
* `MaxRows: 1` and read `TotalRowCount` — the count comes back without transferring rows. A tile
|
|
47
|
+
* whose query fails shows an em dash rather than a zero: "we do not know" and "there are none" are
|
|
48
|
+
* different answers, and showing 0 for the first is the kind of quiet lie a dashboard should never
|
|
49
|
+
* tell. One shared error line explains it once rather than five times.
|
|
50
|
+
*/
|
|
51
|
+
private refresh;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJCContractsDashboardPageComponent, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJCContractsDashboardPageComponent, "mjc-contracts-dashboard-page", never, {}, { "NavigateToPage": "NavigateToPage"; }, never, never, true, never>;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=contracts-dashboard.page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts-dashboard.page.d.ts","sourceRoot":"","sources":["../../../src/lib/pages/contracts-dashboard.page.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAgC,YAAY,EAAE,MAAM,EAAqC,MAAM,eAAe,CAAC;;AAKtH,uDAAuD;AACvD,UAAU,aAAa;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,qBA2Ca,kCAAmC,YAAW,MAAM;IAC7D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IAEjD,uFAAuF;IAC7E,cAAc,uBAA8B;IAE/C,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEvC;;;;;OAKG;IACI,KAAK,EAAE,aAAa,EAAE,CA4C3B;IAEK,QAAQ,IAAI,IAAI;IAIhB,IAAI,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI;IAItC;;;;;;;OAOG;YACW,OAAO;yCA5EZ,kCAAkC;2CAAlC,kCAAkC;CAmG9C"}
|