@mj-biz-apps/common-ng 5.52.0 → 5.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/custom/custom-forms.module.d.ts +2 -1
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +9 -3
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/custom/panels/organization-staff.panel.d.ts +38 -0
- package/dist/lib/custom/panels/organization-staff.panel.d.ts.map +1 -0
- package/dist/lib/custom/panels/organization-staff.panel.js +282 -0
- package/dist/lib/custom/panels/organization-staff.panel.js.map +1 -0
- package/dist/lib/data/__tests__/organization-staff.test.d.ts +2 -0
- package/dist/lib/data/__tests__/organization-staff.test.d.ts.map +1 -0
- package/dist/lib/data/__tests__/organization-staff.test.js +124 -0
- package/dist/lib/data/__tests__/organization-staff.test.js.map +1 -0
- package/dist/lib/data/organization-staff.d.ts +87 -0
- package/dist/lib/data/organization-staff.d.ts.map +1 -0
- package/dist/lib/data/organization-staff.js +99 -0
- package/dist/lib/data/organization-staff.js.map +1 -0
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +2 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +2 -2
|
@@ -26,12 +26,13 @@ import * as i24 from "./panels/activity-hierarchy.panel";
|
|
|
26
26
|
import * as i25 from "./panels/activity-links.panel";
|
|
27
27
|
import * as i26 from "./panels/activity-files.panel";
|
|
28
28
|
import * as i27 from "./panels/activity-content.panel";
|
|
29
|
+
import * as i28 from "./panels/organization-staff.panel";
|
|
29
30
|
/**
|
|
30
31
|
* Registers People/Organization/Activity BaseFormPanel contributions.
|
|
31
32
|
*/
|
|
32
33
|
export declare class CustomFormsModule {
|
|
33
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<CustomFormsModule, never>;
|
|
34
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<CustomFormsModule, [typeof i1.PersonHeaderPanel, typeof i2.OrganizationHeaderPanel, typeof i3.ActivityHeaderPanel, typeof i4.PersonAddressesPanel, typeof i5.PersonContactMethodsPanel, typeof i6.PersonRelationshipsPanel, typeof i7.PersonJobFunctionsPanel, typeof i8.OrganizationAddressesPanel, typeof i9.OrganizationContactMethodsPanel, typeof i10.OrganizationRelationshipsPanel, typeof i11.OrganizationHierarchyPanel], [typeof i12.CommonModule, typeof i13.BaseFormsModule, typeof i14.AddressEditorComponent, typeof i15.ContactMethodListComponent, typeof i16.RelationshipListComponent, typeof i17.OrgHierarchyTreeComponent, typeof i18.CommonRelationshipGraphComponent, typeof i19.PersonIdentityComponent, typeof i20.PersonJobFunctionsComponent, typeof i21.OrganizationIdentityComponent, typeof i22.ActivityIdentityComponent, typeof i23.ActivityTypeHierarchyPanel, typeof i24.ActivityHierarchyPanel, typeof i25.ActivityLinksPanel, typeof i26.ActivityFilesPanel, typeof i27.ActivityContentPanel], [typeof i1.PersonHeaderPanel, typeof i2.OrganizationHeaderPanel, typeof i3.ActivityHeaderPanel, typeof i4.PersonAddressesPanel, typeof i5.PersonContactMethodsPanel, typeof i6.PersonRelationshipsPanel, typeof i7.PersonJobFunctionsPanel, typeof i8.OrganizationAddressesPanel, typeof i9.OrganizationContactMethodsPanel, typeof i10.OrganizationRelationshipsPanel, typeof i11.OrganizationHierarchyPanel, typeof i19.PersonIdentityComponent, typeof i20.PersonJobFunctionsComponent, typeof i21.OrganizationIdentityComponent, typeof i22.ActivityIdentityComponent, typeof i23.ActivityTypeHierarchyPanel, typeof i24.ActivityHierarchyPanel, typeof i25.ActivityLinksPanel, typeof i26.ActivityFilesPanel, typeof i27.ActivityContentPanel]>;
|
|
35
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<CustomFormsModule, [typeof i1.PersonHeaderPanel, typeof i2.OrganizationHeaderPanel, typeof i3.ActivityHeaderPanel, typeof i4.PersonAddressesPanel, typeof i5.PersonContactMethodsPanel, typeof i6.PersonRelationshipsPanel, typeof i7.PersonJobFunctionsPanel, typeof i8.OrganizationAddressesPanel, typeof i9.OrganizationContactMethodsPanel, typeof i10.OrganizationRelationshipsPanel, typeof i11.OrganizationHierarchyPanel], [typeof i12.CommonModule, typeof i13.BaseFormsModule, typeof i14.AddressEditorComponent, typeof i15.ContactMethodListComponent, typeof i16.RelationshipListComponent, typeof i17.OrgHierarchyTreeComponent, typeof i18.CommonRelationshipGraphComponent, typeof i19.PersonIdentityComponent, typeof i20.PersonJobFunctionsComponent, typeof i21.OrganizationIdentityComponent, typeof i22.ActivityIdentityComponent, typeof i23.ActivityTypeHierarchyPanel, typeof i24.ActivityHierarchyPanel, typeof i25.ActivityLinksPanel, typeof i26.ActivityFilesPanel, typeof i27.ActivityContentPanel, typeof i28.OrganizationStaffPanel], [typeof i1.PersonHeaderPanel, typeof i2.OrganizationHeaderPanel, typeof i3.ActivityHeaderPanel, typeof i4.PersonAddressesPanel, typeof i5.PersonContactMethodsPanel, typeof i6.PersonRelationshipsPanel, typeof i7.PersonJobFunctionsPanel, typeof i8.OrganizationAddressesPanel, typeof i9.OrganizationContactMethodsPanel, typeof i10.OrganizationRelationshipsPanel, typeof i11.OrganizationHierarchyPanel, typeof i19.PersonIdentityComponent, typeof i20.PersonJobFunctionsComponent, typeof i21.OrganizationIdentityComponent, typeof i22.ActivityIdentityComponent, typeof i23.ActivityTypeHierarchyPanel, typeof i24.ActivityHierarchyPanel, typeof i25.ActivityLinksPanel, typeof i26.ActivityFilesPanel, typeof i27.ActivityContentPanel, typeof i28.OrganizationStaffPanel]>;
|
|
35
36
|
static ɵinj: i0.ɵɵInjectorDeclaration<CustomFormsModule>;
|
|
36
37
|
}
|
|
37
38
|
//# sourceMappingURL=custom-forms.module.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-forms.module.d.ts","sourceRoot":"","sources":["../../../src/lib/custom/custom-forms.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"custom-forms.module.d.ts","sourceRoot":"","sources":["../../../src/lib/custom/custom-forms.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA;;GAEG;AACH,qBAmCa,iBAAiB;yCAAjB,iBAAiB;0CAAjB,iBAAiB;0CAAjB,iBAAiB;CAAG"}
|
|
@@ -25,6 +25,7 @@ import { ActivityTypeHierarchyPanel } from './panels/activity-type-hierarchy.pan
|
|
|
25
25
|
import { ActivityHierarchyPanel } from './panels/activity-hierarchy.panel';
|
|
26
26
|
import { ActivityLinksPanel } from './panels/activity-links.panel';
|
|
27
27
|
import { ActivityFilesPanel } from './panels/activity-files.panel';
|
|
28
|
+
import { OrganizationStaffPanel } from './panels/organization-staff.panel';
|
|
28
29
|
import { ActivityContentPanel } from './panels/activity-content.panel';
|
|
29
30
|
import * as i0 from "@angular/core";
|
|
30
31
|
const PANELS = [
|
|
@@ -61,7 +62,8 @@ export class CustomFormsModule {
|
|
|
61
62
|
ActivityHierarchyPanel,
|
|
62
63
|
ActivityLinksPanel,
|
|
63
64
|
ActivityFilesPanel,
|
|
64
|
-
ActivityContentPanel
|
|
65
|
+
ActivityContentPanel,
|
|
66
|
+
OrganizationStaffPanel] });
|
|
65
67
|
}
|
|
66
68
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CustomFormsModule, [{
|
|
67
69
|
type: NgModule,
|
|
@@ -84,6 +86,7 @@ export class CustomFormsModule {
|
|
|
84
86
|
ActivityLinksPanel,
|
|
85
87
|
ActivityFilesPanel,
|
|
86
88
|
ActivityContentPanel,
|
|
89
|
+
OrganizationStaffPanel,
|
|
87
90
|
],
|
|
88
91
|
exports: [
|
|
89
92
|
...PANELS,
|
|
@@ -96,6 +99,7 @@ export class CustomFormsModule {
|
|
|
96
99
|
ActivityLinksPanel,
|
|
97
100
|
ActivityFilesPanel,
|
|
98
101
|
ActivityContentPanel,
|
|
102
|
+
OrganizationStaffPanel,
|
|
99
103
|
],
|
|
100
104
|
}]
|
|
101
105
|
}], null, null); })();
|
|
@@ -124,7 +128,8 @@ export class CustomFormsModule {
|
|
|
124
128
|
ActivityHierarchyPanel,
|
|
125
129
|
ActivityLinksPanel,
|
|
126
130
|
ActivityFilesPanel,
|
|
127
|
-
ActivityContentPanel
|
|
131
|
+
ActivityContentPanel,
|
|
132
|
+
OrganizationStaffPanel], exports: [PersonHeaderPanel,
|
|
128
133
|
OrganizationHeaderPanel,
|
|
129
134
|
ActivityHeaderPanel,
|
|
130
135
|
PersonAddressesPanel,
|
|
@@ -142,5 +147,6 @@ export class CustomFormsModule {
|
|
|
142
147
|
ActivityHierarchyPanel,
|
|
143
148
|
ActivityLinksPanel,
|
|
144
149
|
ActivityFilesPanel,
|
|
145
|
-
ActivityContentPanel
|
|
150
|
+
ActivityContentPanel,
|
|
151
|
+
OrganizationStaffPanel] }); })();
|
|
146
152
|
//# sourceMappingURL=custom-forms.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"custom-forms.module.js","sourceRoot":"","sources":["../../../src/lib/custom/custom-forms.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAEhE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uDAAuD,CAAC;AAC/F,OAAO,EAAE,0BAA0B,EAAE,MAAM,iEAAiE,CAAC;AAC7G,OAAO,EAAE,yBAAyB,EAAE,MAAM,6DAA6D,CAAC;AACxG,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,EAAE,gCAAgC,EAAE,MAAM,sEAAsE,CAAC;AAExH,OAAO,EAAE,uBAAuB,EAAE,MAAM,yDAAyD,CAAC;AAClG,OAAO,EAAE,6BAA6B,EAAE,MAAM,+DAA+D,CAAC;AAC9G,O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zB;gBACD,OAAO,EAAE;oBACL,GAAG,MAAM;oBACT,uBAAuB;oBACvB,2BAA2B;oBAC3B,6BAA6B;oBAC7B,yBAAyB;oBACzB,0BAA0B;oBAC1B,sBAAsB;oBACtB,kBAAkB;oBAClB,kBAAkB;oBAClB,oBAAoB;oBACpB,sBAAsB;iBACzB;aACJ;;wFACY,iBAAiB,mBAnD1B,iBAAiB;QACjB,uBAAuB;QACvB,mBAAmB;QACnB,oBAAoB;QACpB,yBAAyB;QACzB,wBAAwB;QACxB,uBAAuB;QACvB,0BAA0B;QAC1B,+BAA+B;QAC/B,8BAA8B;QAC9B,0BAA0B,aAStB,YAAY;QACZ,eAAe;QACf,sBAAsB;QACtB,0BAA0B;QAC1B,yBAAyB;QACzB,yBAAyB;QACzB,gCAAgC;QAChC,uBAAuB;QACvB,2BAA2B;QAC3B,6BAA6B;QAC7B,yBAAyB;QACzB,0BAA0B;QAC1B,sBAAsB;QACtB,kBAAkB;QAClB,kBAAkB;QAClB,oBAAoB;QACpB,sBAAsB,aAnC1B,iBAAiB;QACjB,uBAAuB;QACvB,mBAAmB;QACnB,oBAAoB;QACpB,yBAAyB;QACzB,wBAAwB;QACxB,uBAAuB;QACvB,0BAA0B;QAC1B,+BAA+B;QAC/B,8BAA8B;QAC9B,0BAA0B,EA6BtB,uBAAuB;QACvB,2BAA2B;QAC3B,6BAA6B;QAC7B,yBAAyB;QACzB,0BAA0B;QAC1B,sBAAsB;QACtB,kBAAkB;QAClB,kBAAkB;QAClB,oBAAoB;QACpB,sBAAsB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { BaseFormPanel } from '@memberjunction/ng-base-forms';
|
|
3
|
+
import type { mjBizAppsCommonOrganizationEntity } from '@mj-biz-apps/common-entities';
|
|
4
|
+
import { type OrganizationStaffMember, type StaffCell, type StaffFigure } from '../../data/organization-staff';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/** A contributed column, namespaced by contributor so two apps can both use Key 'status'. */
|
|
7
|
+
interface StaffTableColumn {
|
|
8
|
+
Id: string;
|
|
9
|
+
ContributorKey: string;
|
|
10
|
+
Key: string;
|
|
11
|
+
Header: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Organization form **Staff** section: the organization's active employees, rolled up into headline
|
|
15
|
+
* figures and a staff table. Other apps add figures and columns through
|
|
16
|
+
* `OrganizationStaffContributor` (see `data/organization-staff.ts`); this section never names them.
|
|
17
|
+
*/
|
|
18
|
+
export declare class OrganizationStaffPanel extends BaseFormPanel<mjBizAppsCommonOrganizationEntity> implements OnInit {
|
|
19
|
+
private readonly cdr;
|
|
20
|
+
Staff: OrganizationStaffMember[];
|
|
21
|
+
Figures: StaffFigure[];
|
|
22
|
+
Columns: StaffTableColumn[];
|
|
23
|
+
IsLoading: boolean;
|
|
24
|
+
LoadError: string | null;
|
|
25
|
+
/** One line naming the contributors that failed; their figures and columns are absent. */
|
|
26
|
+
ContributorError: string | null;
|
|
27
|
+
private results;
|
|
28
|
+
ngOnInit(): Promise<void>;
|
|
29
|
+
/** The cell a contributor supplied for this person and column, if any. */
|
|
30
|
+
CellFor(member: OrganizationStaffMember, col: StaffTableColumn): StaffCell | null;
|
|
31
|
+
OpenPerson(member: OrganizationStaffMember): void;
|
|
32
|
+
private load;
|
|
33
|
+
private applyResults;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OrganizationStaffPanel, never>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OrganizationStaffPanel, "bizapps-organization-staff-panel", never, {}, {}, never, never, true, never>;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=organization-staff.panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-staff.panel.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/panels/organization-staff.panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,MAAM,EAAU,MAAM,eAAe,CAAC;AAItG,OAAO,EAAE,aAAa,EAAmB,MAAM,+BAA+B,CAAC;AAC/E,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAItF,OAAO,EAKH,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EAEd,KAAK,WAAW,EACnB,MAAM,+BAA+B,CAAC;;AAEvC,6FAA6F;AAC7F,UAAU,gBAAgB;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,qBA4Fa,sBAAuB,SAAQ,aAAa,CAAC,iCAAiC,CAAE,YAAW,MAAM;IAC1G,OAAO,CAAC,QAAQ,CAAC,GAAG,CAA6B;IAE1C,KAAK,EAAE,uBAAuB,EAAE,CAAM;IACtC,OAAO,EAAE,WAAW,EAAE,CAAM;IAC5B,OAAO,EAAE,gBAAgB,EAAE,CAAM;IACjC,SAAS,UAAS;IAClB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAQ;IACvC,0FAA0F;IACnF,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9C,OAAO,CAAC,OAAO,CAAgC;IAElC,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAMtC,0EAA0E;IACnE,OAAO,CAAC,MAAM,EAAE,uBAAuB,EAAE,GAAG,EAAE,gBAAgB,GAAG,SAAS,GAAG,IAAI;IAKjF,UAAU,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI;YAQ1C,IAAI;IAmBlB,OAAO,CAAC,YAAY;yCAnDX,sBAAsB;2CAAtB,sBAAsB;CAiElC"}
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject } from '@angular/core';
|
|
8
|
+
import { CommonModule } from '@angular/common';
|
|
9
|
+
import { CompositeKey, Metadata } from '@memberjunction/core';
|
|
10
|
+
import { RegisterClassEx } from '@memberjunction/global';
|
|
11
|
+
import { BaseFormPanel, BaseFormsModule } from '@memberjunction/ng-base-forms';
|
|
12
|
+
import { StatTileComponent } from '../../components/stat-tile/stat-tile.component';
|
|
13
|
+
import { StatRowComponent } from '../../components/stat-tile/stat-row.component';
|
|
14
|
+
import { COMMON_ENTITIES } from '../../data/entity-names';
|
|
15
|
+
import { CommonStaffFigures, DiscoverOrganizationStaffContributors, LoadOrganizationStaff, RunStaffContributors, } from '../../data/organization-staff';
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
17
|
+
import * as i1 from "@memberjunction/ng-base-forms";
|
|
18
|
+
import * as i2 from "@angular/common";
|
|
19
|
+
const _forTrack0 = ($index, $item) => $item.Id;
|
|
20
|
+
const _forTrack1 = ($index, $item) => $item.PersonID;
|
|
21
|
+
function OrganizationStaffPanel_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
22
|
+
i0.ɵɵelementStart(0, "p", 1);
|
|
23
|
+
i0.ɵɵtext(1, "Save the organization to see its staff.");
|
|
24
|
+
i0.ɵɵelementEnd();
|
|
25
|
+
} }
|
|
26
|
+
function OrganizationStaffPanel_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
27
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
28
|
+
i0.ɵɵtext(1, "Loading staff\u2026");
|
|
29
|
+
i0.ɵɵelementEnd();
|
|
30
|
+
} }
|
|
31
|
+
function OrganizationStaffPanel_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
+
i0.ɵɵelementStart(0, "p", 2);
|
|
33
|
+
i0.ɵɵtext(1);
|
|
34
|
+
i0.ɵɵelementEnd();
|
|
35
|
+
} if (rf & 2) {
|
|
36
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
37
|
+
i0.ɵɵadvance();
|
|
38
|
+
i0.ɵɵtextInterpolate(ctx_r0.LoadError);
|
|
39
|
+
} }
|
|
40
|
+
function OrganizationStaffPanel_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
+
i0.ɵɵelementStart(0, "p", 1);
|
|
42
|
+
i0.ɵɵtext(1, "No active staff on file. Staff are people with an active Employee relationship to this organization.");
|
|
43
|
+
i0.ɵɵelementEnd();
|
|
44
|
+
} }
|
|
45
|
+
function OrganizationStaffPanel_Conditional_5_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
46
|
+
i0.ɵɵelement(0, "bizapps-stat-tile", 4);
|
|
47
|
+
} if (rf & 2) {
|
|
48
|
+
const figure_r2 = ctx.$implicit;
|
|
49
|
+
i0.ɵɵproperty("Label", figure_r2.Label)("Icon", figure_r2.Icon ?? null)("Value", figure_r2.Value)("Detail", figure_r2.Detail ?? null)("Tone", figure_r2.Tone ?? "none")("Clickable", false);
|
|
50
|
+
} }
|
|
51
|
+
function OrganizationStaffPanel_Conditional_5_For_14_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
+
i0.ɵɵelementStart(0, "th");
|
|
53
|
+
i0.ɵɵtext(1);
|
|
54
|
+
i0.ɵɵelementEnd();
|
|
55
|
+
} if (rf & 2) {
|
|
56
|
+
const col_r3 = ctx.$implicit;
|
|
57
|
+
i0.ɵɵadvance();
|
|
58
|
+
i0.ɵɵtextInterpolate(col_r3.Header);
|
|
59
|
+
} }
|
|
60
|
+
function OrganizationStaffPanel_Conditional_5_For_17_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
i0.ɵɵelementStart(0, "td");
|
|
62
|
+
i0.ɵɵtext(1);
|
|
63
|
+
i0.ɵɵelementEnd();
|
|
64
|
+
} if (rf & 2) {
|
|
65
|
+
const col_r6 = ctx.$implicit;
|
|
66
|
+
const member_r5 = i0.ɵɵnextContext().$implicit;
|
|
67
|
+
const cell_r7 = i0.ɵɵnextContext(2).CellFor(member_r5, col_r6);
|
|
68
|
+
i0.ɵɵclassMap("bizapps-staff-cell bizapps-staff-cell--" + ((cell_r7 == null ? null : cell_r7.Tone) ?? "none"));
|
|
69
|
+
i0.ɵɵattribute("title", (cell_r7 == null ? null : cell_r7.Title) ?? null);
|
|
70
|
+
i0.ɵɵadvance();
|
|
71
|
+
i0.ɵɵtextInterpolate((cell_r7 == null ? null : cell_r7.Text) ?? "\u2014");
|
|
72
|
+
} }
|
|
73
|
+
function OrganizationStaffPanel_Conditional_5_For_17_Template(rf, ctx) { if (rf & 1) {
|
|
74
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
75
|
+
i0.ɵɵelementStart(0, "tr")(1, "td")(2, "button", 7);
|
|
76
|
+
i0.ɵɵlistener("click", function OrganizationStaffPanel_Conditional_5_For_17_Template_button_click_2_listener() { const member_r5 = i0.ɵɵrestoreView(_r4).$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.OpenPerson(member_r5)); });
|
|
77
|
+
i0.ɵɵtext(3);
|
|
78
|
+
i0.ɵɵelementEnd()();
|
|
79
|
+
i0.ɵɵelementStart(4, "td");
|
|
80
|
+
i0.ɵɵtext(5);
|
|
81
|
+
i0.ɵɵelementEnd();
|
|
82
|
+
i0.ɵɵelementStart(6, "td");
|
|
83
|
+
i0.ɵɵtext(7);
|
|
84
|
+
i0.ɵɵpipe(8, "date");
|
|
85
|
+
i0.ɵɵelementEnd();
|
|
86
|
+
i0.ɵɵrepeaterCreate(9, OrganizationStaffPanel_Conditional_5_For_17_For_10_Template, 2, 4, "td", 8, _forTrack0);
|
|
87
|
+
i0.ɵɵelementEnd();
|
|
88
|
+
} if (rf & 2) {
|
|
89
|
+
const member_r5 = ctx.$implicit;
|
|
90
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
91
|
+
i0.ɵɵadvance(3);
|
|
92
|
+
i0.ɵɵtextInterpolate(member_r5.Name);
|
|
93
|
+
i0.ɵɵadvance(2);
|
|
94
|
+
i0.ɵɵtextInterpolate(member_r5.Title || "\u2014");
|
|
95
|
+
i0.ɵɵadvance(2);
|
|
96
|
+
i0.ɵɵtextInterpolate(member_r5.StartDate ? i0.ɵɵpipeBind3(8, 3, member_r5.StartDate, "MMM y", "UTC") : "\u2014");
|
|
97
|
+
i0.ɵɵadvance(2);
|
|
98
|
+
i0.ɵɵrepeater(ctx_r0.Columns);
|
|
99
|
+
} }
|
|
100
|
+
function OrganizationStaffPanel_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
101
|
+
i0.ɵɵelementStart(0, "bizapps-stat-row", 3);
|
|
102
|
+
i0.ɵɵrepeaterCreate(1, OrganizationStaffPanel_Conditional_5_For_2_Template, 1, 6, "bizapps-stat-tile", 4, i0.ɵɵrepeaterTrackByIndex);
|
|
103
|
+
i0.ɵɵelementEnd();
|
|
104
|
+
i0.ɵɵelementStart(3, "div", 5)(4, "table", 6)(5, "thead")(6, "tr")(7, "th");
|
|
105
|
+
i0.ɵɵtext(8, "Name");
|
|
106
|
+
i0.ɵɵelementEnd();
|
|
107
|
+
i0.ɵɵelementStart(9, "th");
|
|
108
|
+
i0.ɵɵtext(10, "Title");
|
|
109
|
+
i0.ɵɵelementEnd();
|
|
110
|
+
i0.ɵɵelementStart(11, "th");
|
|
111
|
+
i0.ɵɵtext(12, "Since");
|
|
112
|
+
i0.ɵɵelementEnd();
|
|
113
|
+
i0.ɵɵrepeaterCreate(13, OrganizationStaffPanel_Conditional_5_For_14_Template, 2, 1, "th", null, _forTrack0);
|
|
114
|
+
i0.ɵɵelementEnd()();
|
|
115
|
+
i0.ɵɵelementStart(15, "tbody");
|
|
116
|
+
i0.ɵɵrepeaterCreate(16, OrganizationStaffPanel_Conditional_5_For_17_Template, 11, 7, "tr", null, _forTrack1);
|
|
117
|
+
i0.ɵɵelementEnd()()();
|
|
118
|
+
} if (rf & 2) {
|
|
119
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
120
|
+
i0.ɵɵproperty("Error", ctx_r0.ContributorError);
|
|
121
|
+
i0.ɵɵadvance();
|
|
122
|
+
i0.ɵɵrepeater(ctx_r0.Figures);
|
|
123
|
+
i0.ɵɵadvance(12);
|
|
124
|
+
i0.ɵɵrepeater(ctx_r0.Columns);
|
|
125
|
+
i0.ɵɵadvance(3);
|
|
126
|
+
i0.ɵɵrepeater(ctx_r0.Staff);
|
|
127
|
+
} }
|
|
128
|
+
/**
|
|
129
|
+
* Organization form **Staff** section: the organization's active employees, rolled up into headline
|
|
130
|
+
* figures and a staff table. Other apps add figures and columns through
|
|
131
|
+
* `OrganizationStaffContributor` (see `data/organization-staff.ts`); this section never names them.
|
|
132
|
+
*/
|
|
133
|
+
let OrganizationStaffPanel = class OrganizationStaffPanel extends BaseFormPanel {
|
|
134
|
+
cdr = inject(ChangeDetectorRef);
|
|
135
|
+
Staff = [];
|
|
136
|
+
Figures = [];
|
|
137
|
+
Columns = [];
|
|
138
|
+
IsLoading = false;
|
|
139
|
+
LoadError = null;
|
|
140
|
+
/** One line naming the contributors that failed; their figures and columns are absent. */
|
|
141
|
+
ContributorError = null;
|
|
142
|
+
results = [];
|
|
143
|
+
async ngOnInit() {
|
|
144
|
+
if (this.Record?.IsSaved) {
|
|
145
|
+
await this.load();
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
/** The cell a contributor supplied for this person and column, if any. */
|
|
149
|
+
CellFor(member, col) {
|
|
150
|
+
const result = this.results.find(r => r.Contributor.Key === col.ContributorKey);
|
|
151
|
+
return result?.Contribution?.Cells.get(member.PersonID.toUpperCase())?.[col.Key] ?? null;
|
|
152
|
+
}
|
|
153
|
+
OpenPerson(member) {
|
|
154
|
+
this.FormComponent.OnFormNavigate({
|
|
155
|
+
Kind: 'record',
|
|
156
|
+
EntityName: COMMON_ENTITIES.Person,
|
|
157
|
+
PrimaryKey: CompositeKey.FromID(member.PersonID),
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
async load() {
|
|
161
|
+
this.IsLoading = true;
|
|
162
|
+
this.cdr.detectChanges();
|
|
163
|
+
try {
|
|
164
|
+
const provider = Metadata.Provider;
|
|
165
|
+
this.Staff = await LoadOrganizationStaff(this.Record.ID, provider);
|
|
166
|
+
if (this.Staff.length > 0) {
|
|
167
|
+
const request = { OrganizationID: this.Record.ID, Staff: this.Staff, Provider: provider };
|
|
168
|
+
this.results = await RunStaffContributors(DiscoverOrganizationStaffContributors(), request);
|
|
169
|
+
}
|
|
170
|
+
this.applyResults();
|
|
171
|
+
}
|
|
172
|
+
catch (e) {
|
|
173
|
+
this.LoadError = e instanceof Error ? e.message : 'Could not load the organization\'s staff.';
|
|
174
|
+
}
|
|
175
|
+
finally {
|
|
176
|
+
this.IsLoading = false;
|
|
177
|
+
this.cdr.detectChanges();
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
applyResults() {
|
|
181
|
+
const ok = this.results.filter(r => r.Contribution);
|
|
182
|
+
this.Figures = [...CommonStaffFigures(this.Staff), ...ok.flatMap(r => r.Contribution.Figures)];
|
|
183
|
+
this.Columns = ok.flatMap(r => r.Contribution.Columns.map(c => ({
|
|
184
|
+
Id: `${r.Contributor.Key}:${c.Key}`,
|
|
185
|
+
ContributorKey: r.Contributor.Key,
|
|
186
|
+
Key: c.Key,
|
|
187
|
+
Header: c.Header,
|
|
188
|
+
})));
|
|
189
|
+
const failed = this.results.filter(r => r.Error).map(r => r.Contributor.Label);
|
|
190
|
+
this.ContributorError = failed.length > 0
|
|
191
|
+
? `Could not load: ${failed.join(', ')}. Those figures and columns are not shown.`
|
|
192
|
+
: null;
|
|
193
|
+
}
|
|
194
|
+
static ɵfac = /*@__PURE__*/ (() => { let ɵOrganizationStaffPanel_BaseFactory; return function OrganizationStaffPanel_Factory(__ngFactoryType__) { return (ɵOrganizationStaffPanel_BaseFactory || (ɵOrganizationStaffPanel_BaseFactory = i0.ɵɵgetInheritedFactory(OrganizationStaffPanel)))(__ngFactoryType__ || OrganizationStaffPanel); }; })();
|
|
195
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: OrganizationStaffPanel, selectors: [["bizapps-organization-staff-panel"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 5, consts: [["SectionKey", "staff", "SectionName", "Staff", "Icon", "fa-solid fa-id-badge", 3, "Form", "FormContext", "BadgeCount", "DefaultExpanded"], [1, "bizapps-staff-empty"], ["role", "status", 1, "bizapps-staff-error"], [3, "Error"], [3, "Label", "Icon", "Value", "Detail", "Tone", "Clickable"], [1, "bizapps-staff-table-wrap"], [1, "bizapps-staff-table"], ["type", "button", 1, "bizapps-staff-link", 3, "click"], [3, "class"]], template: function OrganizationStaffPanel_Template(rf, ctx) { if (rf & 1) {
|
|
196
|
+
i0.ɵɵelementStart(0, "mj-collapsible-panel", 0);
|
|
197
|
+
i0.ɵɵconditionalCreate(1, OrganizationStaffPanel_Conditional_1_Template, 2, 0, "p", 1)(2, OrganizationStaffPanel_Conditional_2_Template, 2, 0, "div", 1)(3, OrganizationStaffPanel_Conditional_3_Template, 2, 1, "p", 2)(4, OrganizationStaffPanel_Conditional_4_Template, 2, 0, "p", 1)(5, OrganizationStaffPanel_Conditional_5_Template, 18, 1);
|
|
198
|
+
i0.ɵɵelementEnd();
|
|
199
|
+
} if (rf & 2) {
|
|
200
|
+
i0.ɵɵproperty("Form", ctx.FormComponent)("FormContext", ctx.FormContext)("BadgeCount", ctx.Staff.length)("DefaultExpanded", true);
|
|
201
|
+
i0.ɵɵadvance();
|
|
202
|
+
i0.ɵɵconditional(!ctx.Record.IsSaved ? 1 : ctx.IsLoading ? 2 : ctx.LoadError ? 3 : ctx.Staff.length === 0 ? 4 : 5);
|
|
203
|
+
} }, dependencies: [CommonModule, BaseFormsModule, i1.MjCollapsiblePanelComponent, StatTileComponent, StatRowComponent, i2.DatePipe], styles: ["[_nghost-%COMP%] { display: block; width: 100%; }\n .bizapps-staff-empty[_ngcontent-%COMP%] { color: var(--mj-text-muted); font-size: 13px; margin: 0; padding: 8px 0; }\n .bizapps-staff-error[_ngcontent-%COMP%] { color: var(--mj-status-error-text); font-size: 13px; margin: 0; padding: 8px 0; }\n .bizapps-staff-table-wrap[_ngcontent-%COMP%] { margin-top: 12px; max-height: 420px; overflow: auto; border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md, 8px); }\n .bizapps-staff-table[_ngcontent-%COMP%] { width: 100%; border-collapse: collapse; font-size: 13px; }\n .bizapps-staff-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%] { position: sticky; top: 0; background: var(--mj-bg-surface-sunken, var(--mj-bg-surface)); color: var(--mj-text-secondary); font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--mj-border-default); white-space: nowrap; }\n .bizapps-staff-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%] { padding: 7px 10px; border-bottom: 1px solid var(--mj-border-subtle, var(--mj-border-default)); color: var(--mj-text-primary); }\n .bizapps-staff-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child td[_ngcontent-%COMP%] { border-bottom: none; }\n .bizapps-staff-link[_ngcontent-%COMP%] { background: none; border: none; padding: 0; font: inherit; color: var(--mj-brand-primary); cursor: pointer; text-align: left; }\n .bizapps-staff-link[_ngcontent-%COMP%]:hover { text-decoration: underline; }\n .bizapps-staff-cell--success[_ngcontent-%COMP%] { color: var(--mj-status-success-text); font-weight: 600; }\n .bizapps-staff-cell--warn[_ngcontent-%COMP%] { color: var(--mj-status-warning-text); font-weight: 600; }\n .bizapps-staff-cell--error[_ngcontent-%COMP%] { color: var(--mj-status-error-text); font-weight: 600; }\n .bizapps-staff-cell--muted[_ngcontent-%COMP%] { color: var(--mj-text-muted); }"], changeDetection: 0 });
|
|
204
|
+
};
|
|
205
|
+
OrganizationStaffPanel = __decorate([
|
|
206
|
+
RegisterClassEx(BaseFormPanel, {
|
|
207
|
+
key: 'form-panel:Organizations:staff',
|
|
208
|
+
metadata: {
|
|
209
|
+
entity: 'MJ_BizApps_Common: Organizations',
|
|
210
|
+
slot: 'after-fields',
|
|
211
|
+
sortKey: 80,
|
|
212
|
+
contributionKey: 'staff',
|
|
213
|
+
},
|
|
214
|
+
})
|
|
215
|
+
], OrganizationStaffPanel);
|
|
216
|
+
export { OrganizationStaffPanel };
|
|
217
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrganizationStaffPanel, [{
|
|
218
|
+
type: Component,
|
|
219
|
+
args: [{ selector: 'bizapps-organization-staff-panel', standalone: true, imports: [CommonModule, BaseFormsModule, StatTileComponent, StatRowComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: `
|
|
220
|
+
<mj-collapsible-panel
|
|
221
|
+
SectionKey="staff"
|
|
222
|
+
SectionName="Staff"
|
|
223
|
+
Icon="fa-solid fa-id-badge"
|
|
224
|
+
[Form]="FormComponent"
|
|
225
|
+
[FormContext]="FormContext"
|
|
226
|
+
[BadgeCount]="Staff.length"
|
|
227
|
+
[DefaultExpanded]="true">
|
|
228
|
+
@if (!Record.IsSaved) {
|
|
229
|
+
<p class="bizapps-staff-empty">Save the organization to see its staff.</p>
|
|
230
|
+
} @else if (IsLoading) {
|
|
231
|
+
<div class="bizapps-staff-empty">Loading staff…</div>
|
|
232
|
+
} @else if (LoadError) {
|
|
233
|
+
<p class="bizapps-staff-error" role="status">{{ LoadError }}</p>
|
|
234
|
+
} @else if (Staff.length === 0) {
|
|
235
|
+
<p class="bizapps-staff-empty">No active staff on file. Staff are people with an active Employee relationship to this organization.</p>
|
|
236
|
+
} @else {
|
|
237
|
+
<bizapps-stat-row [Error]="ContributorError">
|
|
238
|
+
@for (figure of Figures; track $index) {
|
|
239
|
+
<bizapps-stat-tile
|
|
240
|
+
[Label]="figure.Label"
|
|
241
|
+
[Icon]="figure.Icon ?? null"
|
|
242
|
+
[Value]="figure.Value"
|
|
243
|
+
[Detail]="figure.Detail ?? null"
|
|
244
|
+
[Tone]="figure.Tone ?? 'none'"
|
|
245
|
+
[Clickable]="false" />
|
|
246
|
+
}
|
|
247
|
+
</bizapps-stat-row>
|
|
248
|
+
<div class="bizapps-staff-table-wrap">
|
|
249
|
+
<table class="bizapps-staff-table">
|
|
250
|
+
<thead>
|
|
251
|
+
<tr>
|
|
252
|
+
<th>Name</th>
|
|
253
|
+
<th>Title</th>
|
|
254
|
+
<th>Since</th>
|
|
255
|
+
@for (col of Columns; track col.Id) {
|
|
256
|
+
<th>{{ col.Header }}</th>
|
|
257
|
+
}
|
|
258
|
+
</tr>
|
|
259
|
+
</thead>
|
|
260
|
+
<tbody>
|
|
261
|
+
@for (member of Staff; track member.PersonID) {
|
|
262
|
+
<tr>
|
|
263
|
+
<td>
|
|
264
|
+
<button type="button" class="bizapps-staff-link" (click)="OpenPerson(member)">{{ member.Name }}</button>
|
|
265
|
+
</td>
|
|
266
|
+
<td>{{ member.Title || '—' }}</td>
|
|
267
|
+
<td>{{ member.StartDate ? (member.StartDate | date: 'MMM y' : 'UTC') : '—' }}</td>
|
|
268
|
+
@for (col of Columns; track col.Id) {
|
|
269
|
+
@let cell = CellFor(member, col);
|
|
270
|
+
<td [class]="'bizapps-staff-cell bizapps-staff-cell--' + (cell?.Tone ?? 'none')" [attr.title]="cell?.Title ?? null">{{ cell?.Text ?? '—' }}</td>
|
|
271
|
+
}
|
|
272
|
+
</tr>
|
|
273
|
+
}
|
|
274
|
+
</tbody>
|
|
275
|
+
</table>
|
|
276
|
+
</div>
|
|
277
|
+
}
|
|
278
|
+
</mj-collapsible-panel>
|
|
279
|
+
`, styles: ["\n :host { display: block; width: 100%; }\n .bizapps-staff-empty { color: var(--mj-text-muted); font-size: 13px; margin: 0; padding: 8px 0; }\n .bizapps-staff-error { color: var(--mj-status-error-text); font-size: 13px; margin: 0; padding: 8px 0; }\n .bizapps-staff-table-wrap { margin-top: 12px; max-height: 420px; overflow: auto; border: 1px solid var(--mj-border-default); border-radius: var(--mj-radius-md, 8px); }\n .bizapps-staff-table { width: 100%; border-collapse: collapse; font-size: 13px; }\n .bizapps-staff-table th { position: sticky; top: 0; background: var(--mj-bg-surface-sunken, var(--mj-bg-surface)); color: var(--mj-text-secondary); font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--mj-border-default); white-space: nowrap; }\n .bizapps-staff-table td { padding: 7px 10px; border-bottom: 1px solid var(--mj-border-subtle, var(--mj-border-default)); color: var(--mj-text-primary); }\n .bizapps-staff-table tr:last-child td { border-bottom: none; }\n .bizapps-staff-link { background: none; border: none; padding: 0; font: inherit; color: var(--mj-brand-primary); cursor: pointer; text-align: left; }\n .bizapps-staff-link:hover { text-decoration: underline; }\n .bizapps-staff-cell--success { color: var(--mj-status-success-text); font-weight: 600; }\n .bizapps-staff-cell--warn { color: var(--mj-status-warning-text); font-weight: 600; }\n .bizapps-staff-cell--error { color: var(--mj-status-error-text); font-weight: 600; }\n .bizapps-staff-cell--muted { color: var(--mj-text-muted); }\n "] }]
|
|
280
|
+
}], null, null); })();
|
|
281
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(OrganizationStaffPanel, { className: "OrganizationStaffPanel", filePath: "lib/custom/panels/organization-staff.panel.ts", lineNumber: 126 }); })();
|
|
282
|
+
//# sourceMappingURL=organization-staff.panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-staff.panel.js","sourceRoot":"","sources":["../../../../src/lib/custom/panels/organization-staff.panel.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,SAAS,EAAU,MA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,AAFA,AAFF,sFAAuB,kEAEC,gEAEA,gEAES,yDAExB;YA0Cb,iBAAuB;;YAnDnB,AADA,AADA,AADA,wCAAsB,gCACK,gCACA,yBACH;YACxB,cAiDC;YAjDD,kHAiDC;4BA5DC,YAAY,EAAE,eAAe,kCAAE,iBAAiB,EAAE,gBAAgB;;AAgFnE,sBAAsB;IA5FlC,eAAe,CAAC,aAAa,EAAE;QAC5B,GAAG,EAAE,gCAAgC;QACrC,QAAQ,EAAE;YACN,MAAM,EAAE,kCAAkC;YAC1C,IAAI,EAAE,cAAc;YACpB,OAAO,EAAE,EAAE;YACX,eAAe,EAAE,OAAO;SAC3B;KACJ,CAAC;GAoFW,sBAAsB,CAiElC;;iFAjEY,sBAAsB;cAnFlC,SAAS;2BACI,kCAAkC,cAChC,IAAI,WACP,CAAC,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,mBAC5D,uBAAuB,CAAC,MAAM,YACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4DT;;kFAkBQ,sBAAsB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-staff.test.d.ts","sourceRoot":"","sources":["../../../../src/lib/data/__tests__/organization-staff.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
8
|
+
import { RegisterClass } from '@memberjunction/global';
|
|
9
|
+
import { CommonStaffFigures, DiscoverOrganizationStaffContributors, LoadOrganizationStaff, OrganizationStaffContributor, RunStaffContributors, } from '../organization-staff';
|
|
10
|
+
const TODAY = new Date(Date.UTC(2026, 9, 7)); // 2026-10-07
|
|
11
|
+
function member(id, title, start) {
|
|
12
|
+
return { PersonID: id, Name: `Person ${id}`, Title: title, StartDate: start };
|
|
13
|
+
}
|
|
14
|
+
function contribution(label) {
|
|
15
|
+
return { Figures: [{ Label: label, Value: 1 }], Columns: [], Cells: new Map() };
|
|
16
|
+
}
|
|
17
|
+
describe('CommonStaffFigures', () => {
|
|
18
|
+
it('counts staff, distinct roles, and people who joined in the last 12 months (inclusive)', () => {
|
|
19
|
+
const staff = [
|
|
20
|
+
member('A', 'Cheesemaker', '2026-10-07T00:00:00.000Z'), // today
|
|
21
|
+
member('B', 'Cheesemaker', '2025-10-07T00:00:00.000Z'), // exactly 12 months ago: counts
|
|
22
|
+
member('C', 'Quality Manager', '2025-10-06T00:00:00.000Z'), // one day too old
|
|
23
|
+
member('D', null, null),
|
|
24
|
+
{ PersonID: 'E', Name: 'Person E', Title: 'Affineur', StartDate: new Date('2026-01-15T00:00:00.000Z') }, // Date object, as the browser provider sends
|
|
25
|
+
];
|
|
26
|
+
const figures = CommonStaffFigures(staff, TODAY);
|
|
27
|
+
expect(figures).toEqual([
|
|
28
|
+
{ Label: 'Staff', Value: 5, Icon: 'fa-solid fa-users', Detail: '3 roles' },
|
|
29
|
+
{ Label: 'Joined in 12 months', Value: 3, Icon: 'fa-solid fa-user-plus' },
|
|
30
|
+
]);
|
|
31
|
+
});
|
|
32
|
+
it('omits the roles detail when nobody has a title, and says "1 role" for one', () => {
|
|
33
|
+
expect(CommonStaffFigures([member('A', null, null)], TODAY)[0].Detail).toBeUndefined();
|
|
34
|
+
expect(CommonStaffFigures([member('A', 'Affineur', null), member('B', ' Affineur ', null)], TODAY)[0].Detail).toBe('1 role');
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
describe('RunStaffContributors', () => {
|
|
38
|
+
class Ok extends OrganizationStaffContributor {
|
|
39
|
+
Key = 'ok';
|
|
40
|
+
Label = 'Good figures';
|
|
41
|
+
async Load() { return contribution('Good'); }
|
|
42
|
+
}
|
|
43
|
+
class Broken extends OrganizationStaffContributor {
|
|
44
|
+
Key = 'broken';
|
|
45
|
+
Label = 'Broken figures';
|
|
46
|
+
async Load() { throw new Error('query not found'); }
|
|
47
|
+
}
|
|
48
|
+
const request = { OrganizationID: 'ORG', Staff: [member('A', null, null)] };
|
|
49
|
+
it('keeps a working contributor when another one throws, and reports the failure', async () => {
|
|
50
|
+
const results = await RunStaffContributors([new Ok(), new Broken()], request);
|
|
51
|
+
expect(results[0].Contribution?.Figures[0].Label).toBe('Good');
|
|
52
|
+
expect(results[0].Error).toBeNull();
|
|
53
|
+
expect(results[1].Contribution).toBeNull();
|
|
54
|
+
expect(results[1].Error).toBe('query not found');
|
|
55
|
+
expect(results[1].Contributor.Label).toBe('Broken figures');
|
|
56
|
+
});
|
|
57
|
+
it('passes the same request to every contributor', async () => {
|
|
58
|
+
const c = new Ok();
|
|
59
|
+
const spy = vi.spyOn(c, 'Load');
|
|
60
|
+
await RunStaffContributors([c], request);
|
|
61
|
+
expect(spy).toHaveBeenCalledWith(request);
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
describe('DiscoverOrganizationStaffContributors', () => {
|
|
65
|
+
let LowPriority = class LowPriority extends OrganizationStaffContributor {
|
|
66
|
+
Key = 'test-staff-low';
|
|
67
|
+
Label = 'Low';
|
|
68
|
+
async Load() { return contribution('low'); }
|
|
69
|
+
};
|
|
70
|
+
LowPriority = __decorate([
|
|
71
|
+
RegisterClass(OrganizationStaffContributor, 'test-staff-low')
|
|
72
|
+
], LowPriority);
|
|
73
|
+
let HighPriority = class HighPriority extends OrganizationStaffContributor {
|
|
74
|
+
Key = 'test-staff-high';
|
|
75
|
+
Label = 'High';
|
|
76
|
+
Priority = 50;
|
|
77
|
+
async Load() { return contribution('high'); }
|
|
78
|
+
};
|
|
79
|
+
HighPriority = __decorate([
|
|
80
|
+
RegisterClass(OrganizationStaffContributor, 'test-staff-high')
|
|
81
|
+
], HighPriority);
|
|
82
|
+
// An implementation replacing one app's contributor: same key, higher registration priority.
|
|
83
|
+
let LowReplacement = class LowReplacement extends OrganizationStaffContributor {
|
|
84
|
+
Key = 'test-staff-low';
|
|
85
|
+
Label = 'Low (replaced)';
|
|
86
|
+
async Load() { return contribution('replaced'); }
|
|
87
|
+
};
|
|
88
|
+
LowReplacement = __decorate([
|
|
89
|
+
RegisterClass(OrganizationStaffContributor, 'test-staff-low', 10)
|
|
90
|
+
], LowReplacement);
|
|
91
|
+
it('returns one instance per key, the highest-priority registration wins, sorted by Priority', () => {
|
|
92
|
+
void LowPriority;
|
|
93
|
+
void HighPriority;
|
|
94
|
+
void LowReplacement;
|
|
95
|
+
const found = DiscoverOrganizationStaffContributors().filter(c => c.Key.startsWith('test-staff-'));
|
|
96
|
+
expect(found.map(c => c.Label)).toEqual(['High', 'Low (replaced)']);
|
|
97
|
+
});
|
|
98
|
+
it('reuses the same instance across calls', () => {
|
|
99
|
+
const a = DiscoverOrganizationStaffContributors().find(c => c.Key === 'test-staff-high');
|
|
100
|
+
const b = DiscoverOrganizationStaffContributors().find(c => c.Key === 'test-staff-high');
|
|
101
|
+
expect(a).toBe(b);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
describe('LoadOrganizationStaff', () => {
|
|
105
|
+
it('reads active, not-ended Employee relationships to the organization, sorted by name', async () => {
|
|
106
|
+
const runView = vi.fn().mockResolvedValue({
|
|
107
|
+
Success: true,
|
|
108
|
+
Results: [{ FromPersonID: 'P1', FromPerson: 'Nia Ferraro', Title: 'Cheesemaker', StartDate: '2025-11-12' }],
|
|
109
|
+
});
|
|
110
|
+
const provider = { RunView: runView };
|
|
111
|
+
const staff = await LoadOrganizationStaff("ORG'1", provider, TODAY);
|
|
112
|
+
expect(staff).toEqual([{ PersonID: 'P1', Name: 'Nia Ferraro', Title: 'Cheesemaker', StartDate: '2025-11-12' }]);
|
|
113
|
+
const params = runView.mock.calls[0][0];
|
|
114
|
+
expect(params.EntityName).toBe('MJ_BizApps_Common: Relationships');
|
|
115
|
+
expect(params.ExtraFilter).toBe("ToOrganizationID='ORG''1' AND FromPersonID IS NOT NULL AND RelationshipType='Employee' AND Status='Active' AND (EndDate IS NULL OR EndDate >= '2026-10-07')");
|
|
116
|
+
expect(params.OrderBy).toBe('FromPerson');
|
|
117
|
+
expect(params.ResultType).toBe('simple');
|
|
118
|
+
});
|
|
119
|
+
it('throws with the view error so the section can show it', async () => {
|
|
120
|
+
const provider = { RunView: vi.fn().mockResolvedValue({ Success: false, ErrorMessage: 'boom', Results: [] }) };
|
|
121
|
+
await expect(LoadOrganizationStaff('ORG', provider, TODAY)).rejects.toThrow('boom');
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
//# sourceMappingURL=organization-staff.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-staff.test.js","sourceRoot":"","sources":["../../../../src/lib/data/__tests__/organization-staff.test.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACH,kBAAkB,EAClB,qCAAqC,EACrC,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,GAIvB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa;AAE3D,SAAS,MAAM,CAAC,EAAU,EAAE,KAAoB,EAAE,KAAoB;IA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,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAC1C,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uDAAuD,EAAE,KAAK,IAAI,EAAE;QACnE,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,EAAkC,CAAC;QAC/I,MAAM,MAAM,CAAC,qBAAqB,CAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { type IMetadataProvider } from '@memberjunction/core';
|
|
2
|
+
import type { StatTileTone } from '../components/stat-tile/stat-tile.component';
|
|
3
|
+
/**
|
|
4
|
+
* The Organization form's **Staff** section: the people who work at an organization, rolled up.
|
|
5
|
+
*
|
|
6
|
+
* Common owns the section and the staff list (active `Employee` relationships). Other apps add their
|
|
7
|
+
* own totals and per-person columns by registering an {@link OrganizationStaffContributor} (e.g. order
|
|
8
|
+
* figures, membership status), so several apps can extend the one section at once. Common never names
|
|
9
|
+
* or imports a contributor; apps depend on Common, not the reverse. (Replacing the whole section is still possible through the form-panel
|
|
10
|
+
* `contributionKey: 'staff'` + `priority`, but then only one app's version shows.)
|
|
11
|
+
*/
|
|
12
|
+
/** One active employee of the organization, from Common's `Employee` relationships. */
|
|
13
|
+
export interface OrganizationStaffMember {
|
|
14
|
+
PersonID: string;
|
|
15
|
+
Name: string;
|
|
16
|
+
Title: string | null;
|
|
17
|
+
/** The browser provider hands dates back as Date objects; tests and the server use ISO strings. */
|
|
18
|
+
StartDate: Date | string | null;
|
|
19
|
+
}
|
|
20
|
+
/** One headline number in the section's stat row. `Value: null` renders an em dash (unknown), never 0. */
|
|
21
|
+
export interface StaffFigure {
|
|
22
|
+
Label: string;
|
|
23
|
+
Value: number | string | null;
|
|
24
|
+
Detail?: string;
|
|
25
|
+
Icon?: string;
|
|
26
|
+
Tone?: StatTileTone;
|
|
27
|
+
}
|
|
28
|
+
/** A column a contributor adds to the staff table. `Key` must be unique within that contributor. */
|
|
29
|
+
export interface StaffColumn {
|
|
30
|
+
Key: string;
|
|
31
|
+
Header: string;
|
|
32
|
+
}
|
|
33
|
+
/** One cell in a contributed column. `Tone` colours the text only. */
|
|
34
|
+
export interface StaffCell {
|
|
35
|
+
Text: string;
|
|
36
|
+
Tone?: 'success' | 'warn' | 'error' | 'muted';
|
|
37
|
+
Title?: string;
|
|
38
|
+
}
|
|
39
|
+
/** What one contributor adds to the section. `Cells` is keyed by upper-cased PersonID, then by column Key. */
|
|
40
|
+
export interface StaffContribution {
|
|
41
|
+
Figures: StaffFigure[];
|
|
42
|
+
Columns: StaffColumn[];
|
|
43
|
+
Cells: Map<string, Record<string, StaffCell>>;
|
|
44
|
+
}
|
|
45
|
+
/** Everything a contributor is given. Staff is never empty when a contributor is called. */
|
|
46
|
+
export interface OrganizationStaffRequest {
|
|
47
|
+
OrganizationID: string;
|
|
48
|
+
Staff: OrganizationStaffMember[];
|
|
49
|
+
Provider?: IMetadataProvider;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Plug-in point for the Staff section. Register a subclass with
|
|
53
|
+
* `@RegisterClass(OrganizationStaffContributor, '<unique key>')`; the highest-priority registration
|
|
54
|
+
* wins per key (so an implementation can replace one app's contributor without touching the others).
|
|
55
|
+
* Contributors are ClassFactory-instantiated (no Angular DI) and should be stateless.
|
|
56
|
+
*/
|
|
57
|
+
export declare abstract class OrganizationStaffContributor {
|
|
58
|
+
/** Stable identifier; also the registration key. */
|
|
59
|
+
abstract readonly Key: string;
|
|
60
|
+
/** Shown in the error line when this contributor fails, e.g. "Order figures". */
|
|
61
|
+
abstract readonly Label: string;
|
|
62
|
+
/** Higher renders first. Common's own figures always come before every contributor. */
|
|
63
|
+
readonly Priority: number;
|
|
64
|
+
/** Load this contributor's figures and columns for the given staff. Throwing is allowed; the section reports it. */
|
|
65
|
+
abstract Load(request: OrganizationStaffRequest): Promise<StaffContribution>;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Every registered contributor — the winning registration per key — sorted by Priority (desc) then Key.
|
|
69
|
+
* Returns [] when no app registers one.
|
|
70
|
+
*/
|
|
71
|
+
export declare function DiscoverOrganizationStaffContributors(): OrganizationStaffContributor[];
|
|
72
|
+
/** A contributor's result: its contribution, or the reason it failed. */
|
|
73
|
+
export interface StaffContributorResult {
|
|
74
|
+
Contributor: OrganizationStaffContributor;
|
|
75
|
+
Contribution: StaffContribution | null;
|
|
76
|
+
Error: string | null;
|
|
77
|
+
}
|
|
78
|
+
/** Runs every contributor concurrently. One failing contributor never hides the others. */
|
|
79
|
+
export declare function RunStaffContributors(contributors: OrganizationStaffContributor[], request: OrganizationStaffRequest): Promise<StaffContributorResult[]>;
|
|
80
|
+
/** Common's own headline figures for the staff list. `today` is injectable for tests. */
|
|
81
|
+
export declare function CommonStaffFigures(staff: OrganizationStaffMember[], today?: Date): StaffFigure[];
|
|
82
|
+
/**
|
|
83
|
+
* Active staff of an organization: `Employee` relationships from a person to this organization whose
|
|
84
|
+
* Status is Active and that have not ended. Sorted by name.
|
|
85
|
+
*/
|
|
86
|
+
export declare function LoadOrganizationStaff(organizationID: string, provider?: IMetadataProvider, today?: Date): Promise<OrganizationStaffMember[]>;
|
|
87
|
+
//# sourceMappingURL=organization-staff.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-staff.d.ts","sourceRoot":"","sources":["../../../src/lib/data/organization-staff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,iBAAiB,EAA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sB,4BAA4B;IAC9C,oDAAoD;IACpD,kBAAyB,GAAG,EAAE,MAAM,CAAC;IACrC,iFAAiF;IACjF,kBAAyB,KAAK,EAAE,MAAM,CAAC;IACvC,uFAAuF;IACvF,SAAgB,QAAQ,EAAE,MAAM,CAAK;IAErC,oHAAoH;aACpG,IAAI,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CACtF;AAOD;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,4BAA4B,EAAE,CAwBtF;AAED,yEAAyE;AACzE,MAAM,WAAW,sBAAsB;IACnC,WAAW,EAAE,4BAA4B,CAAC;IAC1C,YAAY,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACvC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED,2FAA2F;AAC3F,wBAAsB,oBAAoB,CACtC,YAAY,EAAE,4BAA4B,EAAE,EAC5C,OAAO,EAAE,wBAAwB,GAClC,OAAO,CAAC,sBAAsB,EAAE,CAAC,CASnC;AAED,yFAAyF;AACzF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,EAAE,EAAE,KAAK,GAAE,IAAiB,GAAG,WAAW,EAAE,CAY5G;AAcD;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,iBAAiB,EAAE,KAAK,GAAE,IAAiB,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAmB9J"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { RunView } from '@memberjunction/core';
|
|
2
|
+
import { MJGlobal } from '@memberjunction/global';
|
|
3
|
+
import { COMMON_ENTITIES } from './entity-names';
|
|
4
|
+
/**
|
|
5
|
+
* Plug-in point for the Staff section. Register a subclass with
|
|
6
|
+
* `@RegisterClass(OrganizationStaffContributor, '<unique key>')`; the highest-priority registration
|
|
7
|
+
* wins per key (so an implementation can replace one app's contributor without touching the others).
|
|
8
|
+
* Contributors are ClassFactory-instantiated (no Angular DI) and should be stateless.
|
|
9
|
+
*/
|
|
10
|
+
export class OrganizationStaffContributor {
|
|
11
|
+
/** Higher renders first. Common's own figures always come before every contributor. */
|
|
12
|
+
Priority = 0;
|
|
13
|
+
}
|
|
14
|
+
/** One instance per registered subclass, keyed by its constructor. */
|
|
15
|
+
const contributorCache = new Map();
|
|
16
|
+
/**
|
|
17
|
+
* Every registered contributor — the winning registration per key — sorted by Priority (desc) then Key.
|
|
18
|
+
* Returns [] when no app registers one.
|
|
19
|
+
*/
|
|
20
|
+
export function DiscoverOrganizationStaffContributors() {
|
|
21
|
+
const factory = MJGlobal.Instance.ClassFactory;
|
|
22
|
+
const registrations = factory.GetAllRegistrations(OrganizationStaffContributor) ?? [];
|
|
23
|
+
const seen = new Set();
|
|
24
|
+
const contributors = [];
|
|
25
|
+
for (const registration of registrations) {
|
|
26
|
+
const key = registration.Key?.trim().toLowerCase();
|
|
27
|
+
if (!key || seen.has(key)) {
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
seen.add(key);
|
|
31
|
+
const winner = factory.GetRegistration(OrganizationStaffContributor, registration.Key);
|
|
32
|
+
if (!winner?.SubClass) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
const Ctor = winner.SubClass;
|
|
36
|
+
let instance = contributorCache.get(Ctor);
|
|
37
|
+
if (!instance) {
|
|
38
|
+
instance = new Ctor();
|
|
39
|
+
contributorCache.set(Ctor, instance);
|
|
40
|
+
}
|
|
41
|
+
contributors.push(instance);
|
|
42
|
+
}
|
|
43
|
+
return contributors.sort((a, b) => (b.Priority - a.Priority) || a.Key.localeCompare(b.Key));
|
|
44
|
+
}
|
|
45
|
+
/** Runs every contributor concurrently. One failing contributor never hides the others. */
|
|
46
|
+
export async function RunStaffContributors(contributors, request) {
|
|
47
|
+
const settled = await Promise.allSettled(contributors.map(c => c.Load(request)));
|
|
48
|
+
return settled.map((outcome, i) => outcome.status === 'fulfilled'
|
|
49
|
+
? { Contributor: contributors[i], Contribution: outcome.value, Error: null }
|
|
50
|
+
: {
|
|
51
|
+
Contributor: contributors[i],
|
|
52
|
+
Contribution: null,
|
|
53
|
+
Error: outcome.reason instanceof Error ? outcome.reason.message : String(outcome.reason),
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/** Common's own headline figures for the staff list. `today` is injectable for tests. */
|
|
57
|
+
export function CommonStaffFigures(staff, today = new Date()) {
|
|
58
|
+
const yearAgo = new Date(Date.UTC(today.getUTCFullYear() - 1, today.getUTCMonth(), today.getUTCDate()));
|
|
59
|
+
const recent = staff.filter(s => {
|
|
60
|
+
if (!s.StartDate)
|
|
61
|
+
return false;
|
|
62
|
+
const start = new Date(s.StartDate);
|
|
63
|
+
return !isNaN(start.getTime()) && start >= yearAgo;
|
|
64
|
+
}).length;
|
|
65
|
+
const titles = new Set(staff.map(s => s.Title?.trim()).filter((t) => !!t));
|
|
66
|
+
return [
|
|
67
|
+
{ Label: 'Staff', Value: staff.length, Icon: 'fa-solid fa-users', Detail: titles.size > 0 ? `${titles.size} role${titles.size === 1 ? '' : 's'}` : undefined },
|
|
68
|
+
{ Label: 'Joined in 12 months', Value: recent, Icon: 'fa-solid fa-user-plus' },
|
|
69
|
+
];
|
|
70
|
+
}
|
|
71
|
+
/** SQL date literal for today (UTC), for the active-relationship filter. */
|
|
72
|
+
function TodayLiteral(today) {
|
|
73
|
+
return today.toISOString().slice(0, 10);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Active staff of an organization: `Employee` relationships from a person to this organization whose
|
|
77
|
+
* Status is Active and that have not ended. Sorted by name.
|
|
78
|
+
*/
|
|
79
|
+
export async function LoadOrganizationStaff(organizationID, provider, today = new Date()) {
|
|
80
|
+
const rv = provider ? RunView.FromMetadataProvider(provider) : new RunView();
|
|
81
|
+
const id = organizationID.replace(/'/g, "''");
|
|
82
|
+
const result = await rv.RunView({
|
|
83
|
+
EntityName: COMMON_ENTITIES.Relationship,
|
|
84
|
+
ExtraFilter: `ToOrganizationID='${id}' AND FromPersonID IS NOT NULL AND RelationshipType='Employee' AND Status='Active' AND (EndDate IS NULL OR EndDate >= '${TodayLiteral(today)}')`,
|
|
85
|
+
Fields: ['FromPersonID', 'FromPerson', 'Title', 'StartDate'],
|
|
86
|
+
OrderBy: 'FromPerson',
|
|
87
|
+
ResultType: 'simple',
|
|
88
|
+
});
|
|
89
|
+
if (!result.Success) {
|
|
90
|
+
throw new Error(result.ErrorMessage || 'Could not load the organization\'s staff.');
|
|
91
|
+
}
|
|
92
|
+
return (result.Results ?? []).map(r => ({
|
|
93
|
+
PersonID: r.FromPersonID,
|
|
94
|
+
Name: r.FromPerson ?? 'Unnamed person',
|
|
95
|
+
Title: r.Title,
|
|
96
|
+
StartDate: r.StartDate,
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=organization-staff.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organization-staff.js","sourceRoot":"","sources":["../../../src/lib/data/organization-staff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA0B,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAyDjD;;;;;GAKG;AACH,MAAM,OAAgB,4BAA4B;IAK9C,uFAAuF;IACvE,QAAQ,GAAW,CAAC,CAAC;CAIxC;AAID,sEAAsE;AACtE,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAwD,CAAC;AAEzF;;;GAGG;AACH,MAAM,UAAU,qCAAqC;IACjD,MAAM,OAAO,GAAG,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC;IAC/C,MAAM,aAAa,GAAG,OAAO,CAAC,mBAAmB,CAAC,4BAA4B,CAAC,IAAI,EAAE,CAAC;IACtF,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B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AAW,CAAC;QAC5D,OAAO,EAAE,YAAY;QACrB,UAAU,EAAE,QAAQ;KACvB,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CAAC,MAAM,CAAC,YAAY,IAAI,2CAA2C,CAAC,CAAC;IACxF,CAAC;IACD,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;QACpC,QAAQ,EAAE,CAAC,CAAC,YAAY;QACxB,IAAI,EAAE,CAAC,CAAC,UAAU,IAAI,gBAAgB;QACtC,KAAK,EAAE,CAAC,CAAC,KAAK;QACd,SAAS,EAAE,CAAC,CAAC,SAAS;KACzB,CAAC,CAAC,CAAC;AACR,CAAC"}
|
package/dist/public-api.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export { ActivityHeaderPanel } from './lib/custom/panels/activity-header.panel';
|
|
|
31
31
|
export { ActivityLinksPanel } from './lib/custom/panels/activity-links.panel';
|
|
32
32
|
export { ActivityFilesPanel } from './lib/custom/panels/activity-files.panel';
|
|
33
33
|
export { ActivityContentPanel } from './lib/custom/panels/activity-content.panel';
|
|
34
|
+
export { OrganizationStaffPanel } from './lib/custom/panels/organization-staff.panel';
|
|
35
|
+
export { OrganizationStaffContributor, DiscoverOrganizationStaffContributors, RunStaffContributors, LoadOrganizationStaff, CommonStaffFigures, type OrganizationStaffMember, type OrganizationStaffRequest, type StaffFigure, type StaffColumn, type StaffCell, type StaffContribution, type StaffContributorResult, } from './lib/data/organization-staff';
|
|
34
36
|
import './lib/sections/common-sections.component';
|
|
35
37
|
export { LoadCommonSectionResources, CommonDirectoryResource, CommonPeopleResource, CommonOrganizationsResource, CommonRelationshipGraphResource, CommonActivitiesResource } from './lib/sections/common-sections.component';
|
|
36
38
|
export { CommonDashboardPageComponent } from './lib/pages/common-dashboard.page';
|
package/dist/public-api.d.ts.map
CHANGED
|
@@ -1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A0C,CAAC;AAClD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAItF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,wEAAwE,CAAC;AACtH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAC;AAEvG;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C"}
|
package/dist/public-api.js
CHANGED
|
@@ -36,6 +36,8 @@ export { ActivityHeaderPanel } from './lib/custom/panels/activity-header.panel';
|
|
|
36
36
|
export { ActivityLinksPanel } from './lib/custom/panels/activity-links.panel';
|
|
37
37
|
export { ActivityFilesPanel } from './lib/custom/panels/activity-files.panel';
|
|
38
38
|
export { ActivityContentPanel } from './lib/custom/panels/activity-content.panel';
|
|
39
|
+
export { OrganizationStaffPanel } from './lib/custom/panels/organization-staff.panel';
|
|
40
|
+
export { OrganizationStaffContributor, DiscoverOrganizationStaffContributors, RunStaffContributors, LoadOrganizationStaff, CommonStaffFigures, } from './lib/data/organization-staff';
|
|
39
41
|
// Directory dashboard + People / Organizations lists / Graph / Activities (Explorer Custom nav)
|
|
40
42
|
import './lib/sections/common-sections.component';
|
|
41
43
|
import { LoadCommonSectionResources } from './lib/sections/common-sections.component';
|
package/dist/public-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,mFAAmF;AACnF,OAAO,8BAA8B,CAAC;AAEtC,iFAAiF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EAAE,MAAM,wEAAwE,CAAC;AACtH,OAAO,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAC;AAEvG;;;GAGG;AACH,MAAM,UAAU,uBAAuB;IACnC,0BAA0B,EAAE,CAAC;AACjC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mj-biz-apps/common-ng",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.53.1",
|
|
5
5
|
"description": "BizApps Common Angular bootstrap - form components and module for the Common business entities Open App",
|
|
6
6
|
"main": "dist/public-api.js",
|
|
7
7
|
"types": "dist/public-api.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"author": "MemberJunction.com",
|
|
15
15
|
"license": "BUSL-1.1",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@mj-biz-apps/common-entities": "5.
|
|
17
|
+
"@mj-biz-apps/common-entities": "^5.53.1"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@angular/animations": "^21.1.3",
|