@mj-biz-apps/common-ng 5.45.0 → 5.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/lib/components/identity-header/activity-identity.component.d.ts +3 -0
  2. package/dist/lib/components/identity-header/activity-identity.component.d.ts.map +1 -1
  3. package/dist/lib/components/identity-header/activity-identity.component.js +87 -46
  4. package/dist/lib/components/identity-header/activity-identity.component.js.map +1 -1
  5. package/dist/lib/components/identity-header/organization-identity.component.js +2 -2
  6. package/dist/lib/components/identity-header/person-identity.component.d.ts +4 -0
  7. package/dist/lib/components/identity-header/person-identity.component.d.ts.map +1 -1
  8. package/dist/lib/components/identity-header/person-identity.component.js +157 -55
  9. package/dist/lib/components/identity-header/person-identity.component.js.map +1 -1
  10. package/dist/lib/components/person-job-functions/person-job-functions.component.d.ts +49 -0
  11. package/dist/lib/components/person-job-functions/person-job-functions.component.d.ts.map +1 -0
  12. package/dist/lib/components/person-job-functions/person-job-functions.component.js +506 -0
  13. package/dist/lib/components/person-job-functions/person-job-functions.component.js.map +1 -0
  14. package/dist/lib/components/relationship-list/relationship-list.component.d.ts +25 -1
  15. package/dist/lib/components/relationship-list/relationship-list.component.d.ts.map +1 -1
  16. package/dist/lib/components/relationship-list/relationship-list.component.js +318 -119
  17. package/dist/lib/components/relationship-list/relationship-list.component.js.map +1 -1
  18. package/dist/lib/custom/custom-forms.module.d.ts +22 -20
  19. package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
  20. package/dist/lib/custom/custom-forms.module.js +10 -0
  21. package/dist/lib/custom/custom-forms.module.js.map +1 -1
  22. package/dist/lib/custom/panels/__tests__/activity-header.panel.test.js +17 -0
  23. package/dist/lib/custom/panels/__tests__/activity-header.panel.test.js.map +1 -1
  24. package/dist/lib/custom/panels/person-job-functions.panel.d.ts +13 -0
  25. package/dist/lib/custom/panels/person-job-functions.panel.d.ts.map +1 -0
  26. package/dist/lib/custom/panels/person-job-functions.panel.js +60 -0
  27. package/dist/lib/custom/panels/person-job-functions.panel.js.map +1 -0
  28. package/dist/lib/generated/Entities/mjBizAppsCommonActivity/mjbizappscommonactivity.form.component.js +43 -41
  29. package/dist/lib/generated/Entities/mjBizAppsCommonActivity/mjbizappscommonactivity.form.component.js.map +1 -1
  30. package/dist/lib/generated/Entities/mjBizAppsCommonJobFunction/mjbizappscommonjobfunction.form.component.d.ts +10 -0
  31. package/dist/lib/generated/Entities/mjBizAppsCommonJobFunction/mjbizappscommonjobfunction.form.component.d.ts.map +1 -0
  32. package/dist/lib/generated/Entities/mjBizAppsCommonJobFunction/mjbizappscommonjobfunction.form.component.js +106 -0
  33. package/dist/lib/generated/Entities/mjBizAppsCommonJobFunction/mjbizappscommonjobfunction.form.component.js.map +1 -0
  34. package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.js +27 -31
  35. package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.js.map +1 -1
  36. package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.d.ts.map +1 -1
  37. package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.js +61 -37
  38. package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.js.map +1 -1
  39. package/dist/lib/generated/Entities/mjBizAppsCommonPersonJobFunction/mjbizappscommonpersonjobfunction.form.component.d.ts +10 -0
  40. package/dist/lib/generated/Entities/mjBizAppsCommonPersonJobFunction/mjbizappscommonpersonjobfunction.form.component.d.ts.map +1 -0
  41. package/dist/lib/generated/Entities/mjBizAppsCommonPersonJobFunction/mjbizappscommonpersonjobfunction.form.component.js +77 -0
  42. package/dist/lib/generated/Entities/mjBizAppsCommonPersonJobFunction/mjbizappscommonpersonjobfunction.form.component.js.map +1 -0
  43. package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.d.ts.map +1 -1
  44. package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.js +9 -9
  45. package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.js.map +1 -1
  46. package/dist/lib/generated/Entities/mjBizAppsCommonSeniorityLevel/mjbizappscommonsenioritylevel.form.component.d.ts +10 -0
  47. package/dist/lib/generated/Entities/mjBizAppsCommonSeniorityLevel/mjbizappscommonsenioritylevel.form.component.d.ts.map +1 -0
  48. package/dist/lib/generated/Entities/mjBizAppsCommonSeniorityLevel/mjbizappscommonsenioritylevel.form.component.js +106 -0
  49. package/dist/lib/generated/Entities/mjBizAppsCommonSeniorityLevel/mjbizappscommonsenioritylevel.form.component.js.map +1 -0
  50. package/dist/lib/generated/generated-forms.module.d.ts +114 -31
  51. package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
  52. package/dist/lib/generated/generated-forms.module.js +543 -54
  53. package/dist/lib/generated/generated-forms.module.js.map +1 -1
  54. package/dist/public-api.d.ts +2 -0
  55. package/dist/public-api.d.ts.map +1 -1
  56. package/dist/public-api.js +2 -0
  57. package/dist/public-api.js.map +1 -1
  58. package/package.json +2 -2
@@ -0,0 +1,506 @@
1
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output, inject, } from '@angular/core';
2
+ import { CommonModule } from '@angular/common';
3
+ import { FormsModule } from '@angular/forms';
4
+ import { Metadata, RunView } from '@memberjunction/core';
5
+ import { UUIDsEqual } from '@memberjunction/global';
6
+ import { MJButtonDirective } from '@memberjunction/ng-ui-components';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "@angular/forms";
9
+ const _forTrack0 = ($index, $item) => $item.ID;
10
+ function PersonJobFunctionsComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
11
+ i0.ɵɵelementStart(0, "span", 4);
12
+ i0.ɵɵtext(1, " Primary: ");
13
+ i0.ɵɵelementStart(2, "strong");
14
+ i0.ɵɵtext(3);
15
+ i0.ɵɵelementEnd()();
16
+ } if (rf & 2) {
17
+ const ctx_r0 = i0.ɵɵnextContext();
18
+ i0.ɵɵadvance(3);
19
+ i0.ɵɵtextInterpolate(ctx_r0.Items[0].JobFunction);
20
+ } }
21
+ function PersonJobFunctionsComponent_Conditional_7_Template(rf, ctx) { if (rf & 1) {
22
+ const _r2 = i0.ɵɵgetCurrentView();
23
+ i0.ɵɵelementStart(0, "button", 14);
24
+ i0.ɵɵlistener("click", function PersonJobFunctionsComponent_Conditional_7_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.ShowAddPicker = !ctx_r0.ShowAddPicker); });
25
+ i0.ɵɵelement(1, "i", 15);
26
+ i0.ɵɵtext(2);
27
+ i0.ɵɵelementEnd();
28
+ } if (rf & 2) {
29
+ const ctx_r0 = i0.ɵɵnextContext();
30
+ i0.ɵɵproperty("disabled", ctx_r0.Saving);
31
+ i0.ɵɵadvance();
32
+ i0.ɵɵclassProp("fa-plus", !ctx_r0.ShowAddPicker)("fa-xmark", ctx_r0.ShowAddPicker);
33
+ i0.ɵɵadvance();
34
+ i0.ɵɵtextInterpolate1(" ", ctx_r0.ShowAddPicker ? "Cancel" : "Add Function", " ");
35
+ } }
36
+ function PersonJobFunctionsComponent_Conditional_10_For_9_Template(rf, ctx) { if (rf & 1) {
37
+ i0.ɵɵelementStart(0, "option", 21);
38
+ i0.ɵɵtext(1);
39
+ i0.ɵɵelementEnd();
40
+ } if (rf & 2) {
41
+ const fn_r4 = ctx.$implicit;
42
+ i0.ɵɵproperty("value", fn_r4.ID);
43
+ i0.ɵɵadvance();
44
+ i0.ɵɵtextInterpolate(fn_r4.Name);
45
+ } }
46
+ function PersonJobFunctionsComponent_Conditional_10_Template(rf, ctx) { if (rf & 1) {
47
+ const _r3 = i0.ɵɵgetCurrentView();
48
+ i0.ɵɵelementStart(0, "div", 9)(1, "div", 16);
49
+ i0.ɵɵelement(2, "i", 17);
50
+ i0.ɵɵtext(3, " Add Job Function ");
51
+ i0.ɵɵelementEnd();
52
+ i0.ɵɵelementStart(4, "div", 18)(5, "select", 19);
53
+ i0.ɵɵtwoWayListener("ngModelChange", function PersonJobFunctionsComponent_Conditional_10_Template_select_ngModelChange_5_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r0.SelectedFunctionIDToAdd, $event) || (ctx_r0.SelectedFunctionIDToAdd = $event); return i0.ɵɵresetView($event); });
54
+ i0.ɵɵelementStart(6, "option", 20);
55
+ i0.ɵɵtext(7, "\u2014 Select Job Function to Assign \u2014");
56
+ i0.ɵɵelementEnd();
57
+ i0.ɵɵrepeaterCreate(8, PersonJobFunctionsComponent_Conditional_10_For_9_Template, 2, 2, "option", 21, _forTrack0);
58
+ i0.ɵɵelementEnd();
59
+ i0.ɵɵelementStart(10, "button", 14);
60
+ i0.ɵɵlistener("click", function PersonJobFunctionsComponent_Conditional_10_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.onAddFunction()); });
61
+ i0.ɵɵelement(11, "i", 22);
62
+ i0.ɵɵtext(12, " Assign ");
63
+ i0.ɵɵelementEnd()()();
64
+ } if (rf & 2) {
65
+ const ctx_r0 = i0.ɵɵnextContext();
66
+ i0.ɵɵadvance(5);
67
+ i0.ɵɵtwoWayProperty("ngModel", ctx_r0.SelectedFunctionIDToAdd);
68
+ i0.ɵɵproperty("disabled", ctx_r0.Saving);
69
+ i0.ɵɵadvance(3);
70
+ i0.ɵɵrepeater(ctx_r0.unassignedFunctions);
71
+ i0.ɵɵadvance(2);
72
+ i0.ɵɵproperty("disabled", !ctx_r0.SelectedFunctionIDToAdd || ctx_r0.Saving);
73
+ } }
74
+ function PersonJobFunctionsComponent_Conditional_11_Template(rf, ctx) { if (rf & 1) {
75
+ i0.ɵɵelementStart(0, "div", 10);
76
+ i0.ɵɵelement(1, "i", 23);
77
+ i0.ɵɵelementStart(2, "span");
78
+ i0.ɵɵtext(3);
79
+ i0.ɵɵelementEnd()();
80
+ } if (rf & 2) {
81
+ const ctx_r0 = i0.ɵɵnextContext();
82
+ i0.ɵɵadvance(3);
83
+ i0.ɵɵtextInterpolate(ctx_r0.ErrorMessage);
84
+ } }
85
+ function PersonJobFunctionsComponent_Conditional_12_Template(rf, ctx) { if (rf & 1) {
86
+ i0.ɵɵelementStart(0, "div", 11);
87
+ i0.ɵɵelement(1, "i", 24);
88
+ i0.ɵɵelementStart(2, "span");
89
+ i0.ɵɵtext(3, "Loading job functions...");
90
+ i0.ɵɵelementEnd()();
91
+ } }
92
+ function PersonJobFunctionsComponent_Conditional_13_Conditional_6_Template(rf, ctx) { if (rf & 1) {
93
+ const _r5 = i0.ɵɵgetCurrentView();
94
+ i0.ɵɵelementStart(0, "button", 27);
95
+ i0.ɵɵlistener("click", function PersonJobFunctionsComponent_Conditional_13_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.ShowAddPicker = true); });
96
+ i0.ɵɵelement(1, "i", 28);
97
+ i0.ɵɵtext(2, " Assign First Function ");
98
+ i0.ɵɵelementEnd();
99
+ } }
100
+ function PersonJobFunctionsComponent_Conditional_13_Template(rf, ctx) { if (rf & 1) {
101
+ i0.ɵɵelementStart(0, "div", 12);
102
+ i0.ɵɵelement(1, "i", 25);
103
+ i0.ɵɵelementStart(2, "h4");
104
+ i0.ɵɵtext(3, "No Job Functions Assigned");
105
+ i0.ɵɵelementEnd();
106
+ i0.ɵɵelementStart(4, "p");
107
+ i0.ɵɵtext(5, "Assign one or more job functions to prioritize this person's functional specialties.");
108
+ i0.ɵɵelementEnd();
109
+ i0.ɵɵconditionalCreate(6, PersonJobFunctionsComponent_Conditional_13_Conditional_6_Template, 3, 0, "button", 26);
110
+ i0.ɵɵelementEnd();
111
+ } if (rf & 2) {
112
+ const ctx_r0 = i0.ɵɵnextContext();
113
+ i0.ɵɵadvance(6);
114
+ i0.ɵɵconditional(ctx_r0.EditMode && ctx_r0.unassignedFunctions.length > 0 ? 6 : -1);
115
+ } }
116
+ function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
117
+ i0.ɵɵelementStart(0, "div", 32);
118
+ i0.ɵɵelement(1, "i", 41);
119
+ i0.ɵɵelementStart(2, "span");
120
+ i0.ɵɵtext(3, "#1 Primary");
121
+ i0.ɵɵelementEnd()();
122
+ } }
123
+ function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
124
+ i0.ɵɵelementStart(0, "div", 33)(1, "span");
125
+ i0.ɵɵtext(2);
126
+ i0.ɵɵelementEnd()();
127
+ } if (rf & 2) {
128
+ const ɵ$index_89_r6 = i0.ɵɵnextContext().$index;
129
+ i0.ɵɵadvance(2);
130
+ i0.ɵɵtextInterpolate1("#", ɵ$index_89_r6 + 1);
131
+ } }
132
+ function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_9_Conditional_3_Template(rf, ctx) { if (rf & 1) {
133
+ i0.ɵɵelementStart(0, "span", 43);
134
+ i0.ɵɵtext(1);
135
+ i0.ɵɵelementEnd();
136
+ } if (rf & 2) {
137
+ const item_r7 = i0.ɵɵnextContext(2).$implicit;
138
+ const ctx_r0 = i0.ɵɵnextContext(2);
139
+ i0.ɵɵadvance();
140
+ i0.ɵɵtextInterpolate1("(", ctx_r0.formatConfidence(item_r7.Confidence), ")");
141
+ } }
142
+ function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_9_Template(rf, ctx) { if (rf & 1) {
143
+ i0.ɵɵelementStart(0, "span", 38);
144
+ i0.ɵɵelement(1, "i", 42);
145
+ i0.ɵɵtext(2, " Derived ");
146
+ i0.ɵɵconditionalCreate(3, PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_9_Conditional_3_Template, 2, 1, "span", 43);
147
+ i0.ɵɵelementEnd();
148
+ } if (rf & 2) {
149
+ const item_r7 = i0.ɵɵnextContext().$implicit;
150
+ i0.ɵɵadvance(3);
151
+ i0.ɵɵconditional(item_r7.Confidence != null ? 3 : -1);
152
+ } }
153
+ function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_10_Template(rf, ctx) { if (rf & 1) {
154
+ i0.ɵɵelementStart(0, "span", 39);
155
+ i0.ɵɵelement(1, "i", 44);
156
+ i0.ɵɵtext(2, " Manual ");
157
+ i0.ɵɵelementEnd();
158
+ } }
159
+ function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_11_Conditional_1_Template(rf, ctx) { if (rf & 1) {
160
+ const _r9 = i0.ɵɵgetCurrentView();
161
+ i0.ɵɵelementStart(0, "button", 53);
162
+ i0.ɵɵlistener("click", function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_11_Conditional_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const ɵ$index_89_r6 = i0.ɵɵnextContext(2).$index; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onSetPrimary(ɵ$index_89_r6)); });
163
+ i0.ɵɵelement(1, "i", 41);
164
+ i0.ɵɵelementStart(2, "span");
165
+ i0.ɵɵtext(3, "Make Primary");
166
+ i0.ɵɵelementEnd()();
167
+ } if (rf & 2) {
168
+ const ctx_r0 = i0.ɵɵnextContext(4);
169
+ i0.ɵɵproperty("disabled", ctx_r0.Saving);
170
+ } }
171
+ function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
172
+ const _r8 = i0.ɵɵgetCurrentView();
173
+ i0.ɵɵelementStart(0, "div", 40);
174
+ i0.ɵɵconditionalCreate(1, PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_11_Conditional_1_Template, 4, 1, "button", 45);
175
+ i0.ɵɵelementStart(2, "div", 46)(3, "button", 47);
176
+ i0.ɵɵlistener("click", function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_11_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r8); const ɵ$index_89_r6 = i0.ɵɵnextContext().$index; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onMoveUp(ɵ$index_89_r6)); });
177
+ i0.ɵɵelement(4, "i", 48);
178
+ i0.ɵɵelementEnd();
179
+ i0.ɵɵelementStart(5, "button", 49);
180
+ i0.ɵɵlistener("click", function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_11_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r8); const ɵ$index_89_r6 = i0.ɵɵnextContext().$index; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onMoveDown(ɵ$index_89_r6)); });
181
+ i0.ɵɵelement(6, "i", 50);
182
+ i0.ɵɵelementEnd()();
183
+ i0.ɵɵelementStart(7, "button", 51);
184
+ i0.ɵɵlistener("click", function PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_11_Template_button_click_7_listener() { i0.ɵɵrestoreView(_r8); const item_r7 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onRemove(item_r7)); });
185
+ i0.ɵɵelement(8, "i", 52);
186
+ i0.ɵɵelementEnd()();
187
+ } if (rf & 2) {
188
+ const ctx_r9 = i0.ɵɵnextContext();
189
+ const ɵ$index_89_r6 = ctx_r9.$index;
190
+ const ɵ$count_89_r11 = ctx_r9.$count;
191
+ const ctx_r0 = i0.ɵɵnextContext(2);
192
+ i0.ɵɵadvance();
193
+ i0.ɵɵconditional(!(ɵ$index_89_r6 === 0) ? 1 : -1);
194
+ i0.ɵɵadvance(2);
195
+ i0.ɵɵproperty("disabled", ɵ$index_89_r6 === 0 || ctx_r0.Saving);
196
+ i0.ɵɵadvance(2);
197
+ i0.ɵɵproperty("disabled", ɵ$index_89_r6 === ɵ$count_89_r11 - 1 || ctx_r0.Saving);
198
+ i0.ɵɵadvance(2);
199
+ i0.ɵɵproperty("disabled", ctx_r0.Saving);
200
+ } }
201
+ function PersonJobFunctionsComponent_Conditional_14_For_2_Template(rf, ctx) { if (rf & 1) {
202
+ i0.ɵɵelementStart(0, "div", 30)(1, "div", 31);
203
+ i0.ɵɵconditionalCreate(2, PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_2_Template, 4, 0, "div", 32)(3, PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_3_Template, 3, 1, "div", 33);
204
+ i0.ɵɵelementEnd();
205
+ i0.ɵɵelementStart(4, "div", 34)(5, "div", 35)(6, "span", 36);
206
+ i0.ɵɵtext(7);
207
+ i0.ɵɵelementEnd();
208
+ i0.ɵɵelementStart(8, "div", 37);
209
+ i0.ɵɵconditionalCreate(9, PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_9_Template, 4, 1, "span", 38)(10, PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_10_Template, 3, 0, "span", 39);
210
+ i0.ɵɵelementEnd()()();
211
+ i0.ɵɵconditionalCreate(11, PersonJobFunctionsComponent_Conditional_14_For_2_Conditional_11_Template, 9, 4, "div", 40);
212
+ i0.ɵɵelementEnd();
213
+ } if (rf & 2) {
214
+ const item_r7 = ctx.$implicit;
215
+ const ɵ$index_89_r6 = ctx.$index;
216
+ const ctx_r0 = i0.ɵɵnextContext(2);
217
+ i0.ɵɵclassProp("is-primary", ɵ$index_89_r6 === 0);
218
+ i0.ɵɵadvance(2);
219
+ i0.ɵɵconditional(ɵ$index_89_r6 === 0 ? 2 : 3);
220
+ i0.ɵɵadvance(5);
221
+ i0.ɵɵtextInterpolate(item_r7.JobFunction);
222
+ i0.ɵɵadvance(2);
223
+ i0.ɵɵconditional(item_r7.Source === "Derived" ? 9 : 10);
224
+ i0.ɵɵadvance(2);
225
+ i0.ɵɵconditional(ctx_r0.EditMode ? 11 : -1);
226
+ } }
227
+ function PersonJobFunctionsComponent_Conditional_14_Template(rf, ctx) { if (rf & 1) {
228
+ i0.ɵɵelementStart(0, "div", 13);
229
+ i0.ɵɵrepeaterCreate(1, PersonJobFunctionsComponent_Conditional_14_For_2_Template, 12, 6, "div", 29, _forTrack0);
230
+ i0.ɵɵelementEnd();
231
+ } if (rf & 2) {
232
+ const ctx_r0 = i0.ɵɵnextContext();
233
+ i0.ɵɵadvance();
234
+ i0.ɵɵrepeater(ctx_r0.Items);
235
+ } }
236
+ /**
237
+ * Visual editor and manager for a Person's assigned Job Functions.
238
+ * Displays functions in sequence order with primary badge, confidence metrics,
239
+ * inline sequence reordering (Move Up / Down), set-as-primary, delete, and quick-add.
240
+ */
241
+ export class PersonJobFunctionsComponent {
242
+ cdr = inject(ChangeDetectorRef);
243
+ PersonID = null;
244
+ EditMode = true;
245
+ Provider;
246
+ DataChanged = new EventEmitter();
247
+ /** The provider actually used — the one passed in, or the ambient one. */
248
+ get ProviderToUse() {
249
+ return this.Provider ?? Metadata.Provider;
250
+ }
251
+ Items = [];
252
+ AvailableFunctions = [];
253
+ Loading = false;
254
+ Saving = false;
255
+ ErrorMessage = null;
256
+ SelectedFunctionIDToAdd = '';
257
+ ShowAddPicker = false;
258
+ async ngOnInit() {
259
+ await this.loadAll();
260
+ }
261
+ async ngOnChanges(changes) {
262
+ if (changes['PersonID'] && !changes['PersonID'].firstChange) {
263
+ await this.loadAll();
264
+ }
265
+ }
266
+ /** Unassigned job functions available for quick assignment. */
267
+ get unassignedFunctions() {
268
+ return this.AvailableFunctions.filter((f) => !this.Items.some((item) => UUIDsEqual(item.JobFunctionID, f.ID)));
269
+ }
270
+ /** Reload both available functions catalog and assigned person functions. */
271
+ async loadAll() {
272
+ if (!this.PersonID) {
273
+ this.Items = [];
274
+ this.cdr.markForCheck();
275
+ return;
276
+ }
277
+ this.Loading = true;
278
+ this.ErrorMessage = null;
279
+ this.cdr.markForCheck();
280
+ try {
281
+ const p = this.ProviderToUse;
282
+ const rv = new RunView();
283
+ const [catalogRes, assignedRes] = await Promise.all([
284
+ rv.RunView({
285
+ EntityName: 'MJ_BizApps_Common: Job Functions',
286
+ ExtraFilter: "Status = 'Active'",
287
+ OrderBy: 'Name ASC',
288
+ ResultType: 'entity_object',
289
+ }, p.CurrentUser),
290
+ rv.RunView({
291
+ EntityName: 'MJ_BizApps_Common: Person Job Functions',
292
+ ExtraFilter: `PersonID = '${this.PersonID}'`,
293
+ OrderBy: 'Sequence ASC, __mj_CreatedAt ASC',
294
+ ResultType: 'entity_object',
295
+ }, p.CurrentUser),
296
+ ]);
297
+ if (catalogRes.Success && catalogRes.Results) {
298
+ this.AvailableFunctions = catalogRes.Results;
299
+ }
300
+ else if (!catalogRes.Success) {
301
+ this.ErrorMessage = catalogRes.ErrorMessage || 'Failed to load job function catalog';
302
+ }
303
+ if (assignedRes.Success && assignedRes.Results) {
304
+ this.Items = [...assignedRes.Results].sort((a, b) => (a.Sequence || 0) - (b.Sequence || 0));
305
+ }
306
+ else if (!assignedRes.Success) {
307
+ this.ErrorMessage = assignedRes.ErrorMessage || 'Failed to load assigned job functions';
308
+ }
309
+ }
310
+ catch (err) {
311
+ console.error('[PersonJobFunctions] Failed to load job functions:', err);
312
+ this.ErrorMessage = err instanceof Error ? err.message : String(err);
313
+ }
314
+ finally {
315
+ this.Loading = false;
316
+ this.cdr.markForCheck();
317
+ }
318
+ }
319
+ /** Add a selected job function to the person. */
320
+ async onAddFunction() {
321
+ if (!this.PersonID || !this.SelectedFunctionIDToAdd || this.Saving)
322
+ return;
323
+ this.Saving = true;
324
+ this.ErrorMessage = null;
325
+ this.cdr.markForCheck();
326
+ try {
327
+ const p = this.ProviderToUse;
328
+ const newRecord = await p.GetEntityObject('MJ_BizApps_Common: Person Job Functions', p.CurrentUser);
329
+ const nextSeq = this.Items.length > 0
330
+ ? Math.max(...this.Items.map((i) => i.Sequence || 0)) + 1
331
+ : 1;
332
+ newRecord.PersonID = this.PersonID;
333
+ newRecord.JobFunctionID = this.SelectedFunctionIDToAdd;
334
+ newRecord.Sequence = nextSeq;
335
+ newRecord.Source = 'Manual';
336
+ const saved = await newRecord.Save();
337
+ if (!saved) {
338
+ throw new Error(newRecord.LatestResult?.CompleteMessage || 'Failed to save job function');
339
+ }
340
+ this.SelectedFunctionIDToAdd = '';
341
+ this.ShowAddPicker = false;
342
+ await this.loadAll();
343
+ this.DataChanged.emit();
344
+ }
345
+ catch (err) {
346
+ console.error('[PersonJobFunctions] Add function failed:', err);
347
+ this.ErrorMessage = err instanceof Error ? err.message : String(err);
348
+ }
349
+ finally {
350
+ this.Saving = false;
351
+ this.cdr.markForCheck();
352
+ }
353
+ }
354
+ /** Remove an assigned job function. */
355
+ async onRemove(item) {
356
+ if (this.Saving)
357
+ return;
358
+ this.Saving = true;
359
+ this.ErrorMessage = null;
360
+ this.cdr.markForCheck();
361
+ try {
362
+ const deleted = await item.Delete();
363
+ if (!deleted) {
364
+ throw new Error(item.LatestResult?.CompleteMessage || 'Failed to remove job function');
365
+ }
366
+ // Renumber remaining items to ensure sequential 1..N order
367
+ const remaining = this.Items.filter((i) => !UUIDsEqual(i.ID, item.ID));
368
+ await this.normalizeSequences(remaining);
369
+ await this.loadAll();
370
+ this.DataChanged.emit();
371
+ }
372
+ catch (err) {
373
+ console.error('[PersonJobFunctions] Remove function failed:', err);
374
+ this.ErrorMessage = err instanceof Error ? err.message : String(err);
375
+ }
376
+ finally {
377
+ this.Saving = false;
378
+ this.cdr.markForCheck();
379
+ }
380
+ }
381
+ /** Move a function up one position. */
382
+ async onMoveUp(index) {
383
+ if (index <= 0 || this.Saving)
384
+ return;
385
+ await this.swapPositions(index, index - 1);
386
+ }
387
+ /** Move a function down one position. */
388
+ async onMoveDown(index) {
389
+ if (index >= this.Items.length - 1 || this.Saving)
390
+ return;
391
+ await this.swapPositions(index, index + 1);
392
+ }
393
+ /** Promote any function directly to #1 (Primary). */
394
+ async onSetPrimary(index) {
395
+ if (index === 0 || this.Saving)
396
+ return;
397
+ this.Saving = true;
398
+ this.ErrorMessage = null;
399
+ this.cdr.markForCheck();
400
+ try {
401
+ const target = this.Items[index];
402
+ const reordered = [target, ...this.Items.filter((_, i) => i !== index)];
403
+ await this.normalizeSequences(reordered);
404
+ await this.loadAll();
405
+ this.DataChanged.emit();
406
+ }
407
+ catch (err) {
408
+ console.error('[PersonJobFunctions] Set primary failed:', err);
409
+ this.ErrorMessage = err instanceof Error ? err.message : String(err);
410
+ }
411
+ finally {
412
+ this.Saving = false;
413
+ this.cdr.markForCheck();
414
+ }
415
+ }
416
+ async swapPositions(idxA, idxB) {
417
+ this.Saving = true;
418
+ this.ErrorMessage = null;
419
+ this.cdr.markForCheck();
420
+ try {
421
+ const copy = [...this.Items];
422
+ const temp = copy[idxA];
423
+ copy[idxA] = copy[idxB];
424
+ copy[idxB] = temp;
425
+ await this.normalizeSequences(copy);
426
+ await this.loadAll();
427
+ this.DataChanged.emit();
428
+ }
429
+ catch (err) {
430
+ console.error('[PersonJobFunctions] Swap positions failed:', err);
431
+ this.ErrorMessage = err instanceof Error ? err.message : String(err);
432
+ }
433
+ finally {
434
+ this.Saving = false;
435
+ this.cdr.markForCheck();
436
+ }
437
+ }
438
+ /** Assign consecutive sequence numbers 1..N and persist changes. */
439
+ async normalizeSequences(items) {
440
+ for (let i = 0; i < items.length; i++) {
441
+ const expectedSeq = i + 1;
442
+ if (items[i].Sequence !== expectedSeq) {
443
+ items[i].Sequence = expectedSeq;
444
+ const saved = await items[i].Save();
445
+ if (!saved) {
446
+ throw new Error(items[i].LatestResult?.CompleteMessage || `Failed to update sequence for job function ${items[i].JobFunction}`);
447
+ }
448
+ }
449
+ }
450
+ }
451
+ /** Format confidence score as a percentage. */
452
+ formatConfidence(score) {
453
+ if (score == null)
454
+ return '';
455
+ return `${Math.round(score * 100)}%`;
456
+ }
457
+ static ɵfac = function PersonJobFunctionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PersonJobFunctionsComponent)(); };
458
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PersonJobFunctionsComponent, selectors: [["bizapps-person-job-functions"]], inputs: { PersonID: "PersonID", EditMode: "EditMode", Provider: "Provider" }, outputs: { DataChanged: "DataChanged" }, features: [i0.ɵɵNgOnChangesFeature], decls: 15, vars: 10, consts: [[1, "pjf-container"], [1, "pjf-header"], [1, "pjf-header-left"], [1, "pjf-count-badge"], [1, "pjf-primary-summary"], [1, "pjf-header-right"], ["mjButton", "", "size", "sm", "variant", "primary", 3, "disabled"], ["mjButton", "", "size", "sm", "variant", "flat", 3, "click", "disabled"], [1, "fa-solid", "fa-arrows-rotate"], [1, "pjf-add-card"], [1, "pjf-error"], [1, "pjf-loading"], [1, "pjf-empty"], [1, "pjf-list"], ["mjButton", "", "size", "sm", "variant", "primary", 3, "click", "disabled"], [1, "fa-solid"], [1, "pjf-add-title"], [1, "fa-solid", "fa-plus-circle"], [1, "pjf-add-form"], [1, "pjf-select", 3, "ngModelChange", "ngModel", "disabled"], ["value", "", "disabled", ""], [3, "value"], [1, "fa-solid", "fa-check"], [1, "fa-solid", "fa-triangle-exclamation"], [1, "fa-solid", "fa-circle-notch", "fa-spin"], [1, "fa-solid", "fa-briefcase"], ["mjButton", "", "size", "sm", "variant", "secondary"], ["mjButton", "", "size", "sm", "variant", "secondary", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "pjf-item-card", 3, "is-primary"], [1, "pjf-item-card"], [1, "pjf-seq-col"], ["title", "Primary Job Function", 1, "pjf-rank-badge", "primary"], ["title", "Secondary Job Function", 1, "pjf-rank-badge"], [1, "pjf-info-col"], [1, "pjf-name-row"], [1, "pjf-function-name"], [1, "pjf-pill-group"], ["title", "Derived by Feature Pipeline", 1, "pjf-source-pill", "derived"], ["title", "Manually assigned", 1, "pjf-source-pill", "manual"], [1, "pjf-actions-col"], [1, "fa-solid", "fa-star"], [1, "fa-solid", "fa-sparkles"], [1, "pjf-conf"], [1, "fa-solid", "fa-user-pen"], ["type", "button", "title", "Set as Primary", 1, "pjf-action-btn", "primary-btn", 3, "disabled"], [1, "pjf-order-buttons"], ["type", "button", "title", "Move Up", 1, "pjf-icon-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-up"], ["type", "button", "title", "Move Down", 1, "pjf-icon-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-chevron-down"], ["type", "button", "title", "Remove Job Function", 1, "pjf-icon-btn", "delete-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-trash-can"], ["type", "button", "title", "Set as Primary", 1, "pjf-action-btn", "primary-btn", 3, "click", "disabled"]], template: function PersonJobFunctionsComponent_Template(rf, ctx) { if (rf & 1) {
459
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "span", 3);
460
+ i0.ɵɵtext(4);
461
+ i0.ɵɵelementEnd();
462
+ i0.ɵɵconditionalCreate(5, PersonJobFunctionsComponent_Conditional_5_Template, 4, 1, "span", 4);
463
+ i0.ɵɵelementEnd();
464
+ i0.ɵɵelementStart(6, "div", 5);
465
+ i0.ɵɵconditionalCreate(7, PersonJobFunctionsComponent_Conditional_7_Template, 3, 6, "button", 6);
466
+ i0.ɵɵelementStart(8, "button", 7);
467
+ i0.ɵɵlistener("click", function PersonJobFunctionsComponent_Template_button_click_8_listener() { return ctx.loadAll(); });
468
+ i0.ɵɵelement(9, "i", 8);
469
+ i0.ɵɵelementEnd()()();
470
+ i0.ɵɵconditionalCreate(10, PersonJobFunctionsComponent_Conditional_10_Template, 13, 3, "div", 9);
471
+ i0.ɵɵconditionalCreate(11, PersonJobFunctionsComponent_Conditional_11_Template, 4, 1, "div", 10);
472
+ i0.ɵɵconditionalCreate(12, PersonJobFunctionsComponent_Conditional_12_Template, 4, 0, "div", 11)(13, PersonJobFunctionsComponent_Conditional_13_Template, 7, 1, "div", 12)(14, PersonJobFunctionsComponent_Conditional_14_Template, 3, 0, "div", 13);
473
+ i0.ɵɵelementEnd();
474
+ } if (rf & 2) {
475
+ i0.ɵɵadvance(4);
476
+ i0.ɵɵtextInterpolate2(" ", ctx.Items.length, " ", ctx.Items.length === 1 ? "Job Function" : "Job Functions", " ");
477
+ i0.ɵɵadvance();
478
+ i0.ɵɵconditional(ctx.Items.length > 0 ? 5 : -1);
479
+ i0.ɵɵadvance(2);
480
+ i0.ɵɵconditional(ctx.EditMode && ctx.unassignedFunctions.length > 0 ? 7 : -1);
481
+ i0.ɵɵadvance();
482
+ i0.ɵɵproperty("disabled", ctx.Loading || ctx.Saving);
483
+ i0.ɵɵadvance();
484
+ i0.ɵɵclassProp("fa-spin", ctx.Loading);
485
+ i0.ɵɵadvance();
486
+ i0.ɵɵconditional(ctx.ShowAddPicker && ctx.EditMode ? 10 : -1);
487
+ i0.ɵɵadvance();
488
+ i0.ɵɵconditional(ctx.ErrorMessage ? 11 : -1);
489
+ i0.ɵɵadvance();
490
+ i0.ɵɵconditional(ctx.Loading && ctx.Items.length === 0 ? 12 : ctx.Items.length === 0 ? 13 : 14);
491
+ } }, dependencies: [CommonModule, FormsModule, i1.NgSelectOption, i1.ɵNgSelectMultipleOption, i1.SelectControlValueAccessor, i1.NgControlStatus, i1.NgModel, MJButtonDirective], styles: ["[_nghost-%COMP%] {\n display: block;\n width: 100%;\n}\n\n.pjf-container[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 0;\n}\n\n\n\n.pjf-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.pjf-header-left[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.pjf-count-badge[_ngcontent-%COMP%] {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n border: 1px solid var(--mj-border-subtle);\n}\n\n.pjf-primary-summary[_ngcontent-%COMP%] {\n font-size: 13px;\n color: var(--mj-text-secondary);\n}\n\n.pjf-primary-summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%] {\n color: var(--mj-text-primary);\n font-weight: 600;\n}\n\n.pjf-header-right[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n\n\n.pjf-add-card[_ngcontent-%COMP%] {\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-brand-primary);\n border-radius: 8px;\n padding: 12px 14px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n animation: _ngcontent-%COMP%_pjfFadeIn 0.2s ease-out;\n}\n\n@keyframes _ngcontent-%COMP%_pjfFadeIn {\n from { opacity: 0; transform: translateY(-4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n\n.pjf-add-title[_ngcontent-%COMP%] {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-brand-primary);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.pjf-add-form[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.pjf-select[_ngcontent-%COMP%] {\n flex: 1;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n padding: 6px 12px;\n font-size: 13px;\n outline: none;\n transition: border-color 0.15s ease;\n}\n\n.pjf-select[_ngcontent-%COMP%]:focus {\n border-color: var(--mj-brand-primary);\n}\n\n\n\n.pjf-list[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.pjf-item-card[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 10px 14px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 8px;\n transition: all 0.15s ease;\n}\n\n.pjf-item-card[_ngcontent-%COMP%]:hover {\n border-color: var(--mj-border-default);\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);\n}\n\n.pjf-item-card.is-primary[_ngcontent-%COMP%] {\n border-color: var(--mj-status-warning-border, color-mix(in srgb, var(--mj-status-warning) 35%, transparent));\n background: linear-gradient(90deg, color-mix(in srgb, var(--mj-status-warning) 8%, transparent) 0%, var(--mj-bg-surface) 100%);\n}\n\n\n\n.pjf-seq-col[_ngcontent-%COMP%] {\n min-width: 100px;\n flex-shrink: 0;\n}\n\n.pjf-rank-badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 9px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 700;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n border: 1px solid var(--mj-border-subtle);\n}\n\n.pjf-rank-badge.primary[_ngcontent-%COMP%] {\n background: var(--mj-status-warning-bg, color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface)));\n color: var(--mj-status-warning-text, var(--mj-status-warning));\n border: 1px solid var(--mj-status-warning-border, color-mix(in srgb, var(--mj-status-warning) 35%, transparent));\n}\n\n.pjf-rank-badge.primary[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 10px;\n}\n\n\n\n.pjf-info-col[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.pjf-name-row[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.pjf-function-name[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.pjf-pill-group[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.pjf-source-pill[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 11px;\n font-weight: 600;\n padding: 2px 7px;\n border-radius: 4px;\n}\n\n.pjf-source-pill.derived[_ngcontent-%COMP%] {\n background: var(--mj-status-info-bg, color-mix(in srgb, var(--mj-status-info) 14%, var(--mj-bg-surface)));\n color: var(--mj-status-info-text, var(--mj-status-info));\n border: 1px solid var(--mj-status-info-border, color-mix(in srgb, var(--mj-status-info) 28%, transparent));\n}\n\n.pjf-source-pill.manual[_ngcontent-%COMP%] {\n background: var(--mj-status-success-bg, color-mix(in srgb, var(--mj-status-success) 14%, var(--mj-bg-surface)));\n color: var(--mj-status-success-text, var(--mj-status-success));\n border: 1px solid var(--mj-status-success-border, color-mix(in srgb, var(--mj-status-success) 28%, transparent));\n}\n\n.pjf-conf[_ngcontent-%COMP%] {\n font-size: 10px;\n opacity: 0.85;\n}\n\n\n\n.pjf-actions-col[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-shrink: 0;\n}\n\n.pjf-action-btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 8px;\n border-radius: 5px;\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.15s ease;\n border: none;\n}\n\n.pjf-action-btn.primary-btn[_ngcontent-%COMP%] {\n background: transparent;\n color: var(--mj-status-warning-text, var(--mj-status-warning));\n border: 1px solid var(--mj-status-warning-border, color-mix(in srgb, var(--mj-status-warning) 30%, transparent));\n}\n\n.pjf-action-btn.primary-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-status-warning-bg, color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface)));\n}\n\n.pjf-order-buttons[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 2px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 5px;\n padding: 1px;\n}\n\n.pjf-icon-btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 24px;\n border: none;\n background: transparent;\n color: var(--mj-text-secondary);\n border-radius: 4px;\n cursor: pointer;\n font-size: 10px;\n transition: all 0.12s ease;\n}\n\n.pjf-icon-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.pjf-icon-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.pjf-icon-btn.delete-btn[_ngcontent-%COMP%] {\n color: var(--mj-text-muted);\n}\n\n.pjf-icon-btn.delete-btn[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: var(--mj-status-error-bg, color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface)));\n color: var(--mj-status-error-text, var(--mj-status-error));\n}\n\n\n\n.pjf-loading[_ngcontent-%COMP%], .pjf-empty[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n text-align: center;\n color: var(--mj-text-muted);\n border: 1px dashed var(--mj-border-subtle);\n border-radius: 8px;\n gap: 8px;\n}\n\n.pjf-empty[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 28px;\n margin-bottom: 4px;\n}\n\n.pjf-empty[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n}\n\n.pjf-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0 0 8px 0;\n font-size: 12px;\n max-width: 320px;\n}\n\n.pjf-error[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 6px;\n font-size: 12px;\n background: var(--mj-status-error-bg, color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface)));\n border: 1px solid var(--mj-status-error-border, var(--mj-status-error));\n color: var(--mj-status-error-text, var(--mj-status-error));\n}"], changeDetection: 0 });
492
+ }
493
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PersonJobFunctionsComponent, [{
494
+ type: Component,
495
+ args: [{ selector: 'bizapps-person-job-functions', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, FormsModule, MJButtonDirective], template: "<div class=\"pjf-container\">\n <!-- Top Action Bar -->\n <div class=\"pjf-header\">\n <div class=\"pjf-header-left\">\n <span class=\"pjf-count-badge\">\n {{ Items.length }} {{ Items.length === 1 ? 'Job Function' : 'Job Functions' }}\n </span>\n @if (Items.length > 0) {\n <span class=\"pjf-primary-summary\">\n Primary: <strong>{{ Items[0].JobFunction }}</strong>\n </span>\n }\n </div>\n <div class=\"pjf-header-right\">\n @if (EditMode && unassignedFunctions.length > 0) {\n <button\n mjButton\n size=\"sm\"\n variant=\"primary\"\n [disabled]=\"Saving\"\n (click)=\"ShowAddPicker = !ShowAddPicker\">\n <i class=\"fa-solid\" [class.fa-plus]=\"!ShowAddPicker\" [class.fa-xmark]=\"ShowAddPicker\"></i>\n {{ ShowAddPicker ? 'Cancel' : 'Add Function' }}\n </button>\n }\n <button\n mjButton\n size=\"sm\"\n variant=\"flat\"\n [disabled]=\"Loading || Saving\"\n (click)=\"loadAll()\">\n <i class=\"fa-solid fa-arrows-rotate\" [class.fa-spin]=\"Loading\"></i>\n </button>\n </div>\n </div>\n\n <!-- Quick Add Picker -->\n @if (ShowAddPicker && EditMode) {\n <div class=\"pjf-add-card\">\n <div class=\"pjf-add-title\">\n <i class=\"fa-solid fa-plus-circle\"></i> Add Job Function\n </div>\n <div class=\"pjf-add-form\">\n <select\n class=\"pjf-select\"\n [(ngModel)]=\"SelectedFunctionIDToAdd\"\n [disabled]=\"Saving\">\n <option value=\"\" disabled>\u2014 Select Job Function to Assign \u2014</option>\n @for (fn of unassignedFunctions; track fn.ID) {\n <option [value]=\"fn.ID\">{{ fn.Name }}</option>\n }\n </select>\n <button\n mjButton\n size=\"sm\"\n variant=\"primary\"\n [disabled]=\"!SelectedFunctionIDToAdd || Saving\"\n (click)=\"onAddFunction()\">\n <i class=\"fa-solid fa-check\"></i> Assign\n </button>\n </div>\n </div>\n }\n\n <!-- Error Banner -->\n @if (ErrorMessage) {\n <div class=\"pjf-error\">\n <i class=\"fa-solid fa-triangle-exclamation\"></i>\n <span>{{ ErrorMessage }}</span>\n </div>\n }\n\n <!-- Loading State -->\n @if (Loading && Items.length === 0) {\n <div class=\"pjf-loading\">\n <i class=\"fa-solid fa-circle-notch fa-spin\"></i>\n <span>Loading job functions...</span>\n </div>\n } @else if (Items.length === 0) {\n <!-- Empty State -->\n <div class=\"pjf-empty\">\n <i class=\"fa-solid fa-briefcase\"></i>\n <h4>No Job Functions Assigned</h4>\n <p>Assign one or more job functions to prioritize this person's functional specialties.</p>\n @if (EditMode && unassignedFunctions.length > 0) {\n <button mjButton size=\"sm\" variant=\"secondary\" (click)=\"ShowAddPicker = true\">\n <i class=\"fa-solid fa-plus\"></i> Assign First Function\n </button>\n }\n </div>\n } @else {\n <!-- Job Functions List -->\n <div class=\"pjf-list\">\n @for (item of Items; track item.ID; let idx = $index; let first = $first; let last = $last) {\n <div class=\"pjf-item-card\" [class.is-primary]=\"first\">\n <!-- Sequence / Rank Column -->\n <div class=\"pjf-seq-col\">\n @if (first) {\n <div class=\"pjf-rank-badge primary\" title=\"Primary Job Function\">\n <i class=\"fa-solid fa-star\"></i>\n <span>#1 Primary</span>\n </div>\n } @else {\n <div class=\"pjf-rank-badge\" title=\"Secondary Job Function\">\n <span>#{{ idx + 1 }}</span>\n </div>\n }\n </div>\n\n <!-- Main Info Column -->\n <div class=\"pjf-info-col\">\n <div class=\"pjf-name-row\">\n <span class=\"pjf-function-name\">{{ item.JobFunction }}</span>\n <div class=\"pjf-pill-group\">\n @if (item.Source === 'Derived') {\n <span class=\"pjf-source-pill derived\" title=\"Derived by Feature Pipeline\">\n <i class=\"fa-solid fa-sparkles\"></i> Derived\n @if (item.Confidence != null) {\n <span class=\"pjf-conf\">({{ formatConfidence(item.Confidence) }})</span>\n }\n </span>\n } @else {\n <span class=\"pjf-source-pill manual\" title=\"Manually assigned\">\n <i class=\"fa-solid fa-user-pen\"></i> Manual\n </span>\n }\n </div>\n </div>\n </div>\n\n <!-- Reorder & Actions Column -->\n @if (EditMode) {\n <div class=\"pjf-actions-col\">\n @if (!first) {\n <button\n class=\"pjf-action-btn primary-btn\"\n type=\"button\"\n title=\"Set as Primary\"\n [disabled]=\"Saving\"\n (click)=\"onSetPrimary(idx)\">\n <i class=\"fa-solid fa-star\"></i>\n <span>Make Primary</span>\n </button>\n }\n <div class=\"pjf-order-buttons\">\n <button\n class=\"pjf-icon-btn\"\n type=\"button\"\n title=\"Move Up\"\n [disabled]=\"first || Saving\"\n (click)=\"onMoveUp(idx)\">\n <i class=\"fa-solid fa-chevron-up\"></i>\n </button>\n <button\n class=\"pjf-icon-btn\"\n type=\"button\"\n title=\"Move Down\"\n [disabled]=\"last || Saving\"\n (click)=\"onMoveDown(idx)\">\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n </div>\n <button\n class=\"pjf-icon-btn delete-btn\"\n type=\"button\"\n title=\"Remove Job Function\"\n [disabled]=\"Saving\"\n (click)=\"onRemove(item)\">\n <i class=\"fa-solid fa-trash-can\"></i>\n </button>\n </div>\n }\n </div>\n }\n </div>\n }\n</div>\n", styles: [":host {\n display: block;\n width: 100%;\n}\n\n.pjf-container {\n display: flex;\n flex-direction: column;\n gap: 12px;\n padding: 12px 0;\n}\n\n/* Header bar */\n.pjf-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-bottom: 8px;\n border-bottom: 1px solid var(--mj-border-subtle);\n}\n\n.pjf-header-left {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.pjf-count-badge {\n font-size: 11px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.05em;\n padding: 3px 8px;\n border-radius: 6px;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n border: 1px solid var(--mj-border-subtle);\n}\n\n.pjf-primary-summary {\n font-size: 13px;\n color: var(--mj-text-secondary);\n}\n\n.pjf-primary-summary strong {\n color: var(--mj-text-primary);\n font-weight: 600;\n}\n\n.pjf-header-right {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n/* Add card */\n.pjf-add-card {\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-brand-primary);\n border-radius: 8px;\n padding: 12px 14px;\n display: flex;\n flex-direction: column;\n gap: 8px;\n animation: pjfFadeIn 0.2s ease-out;\n}\n\n@keyframes pjfFadeIn {\n from { opacity: 0; transform: translateY(-4px); }\n to { opacity: 1; transform: translateY(0); }\n}\n\n.pjf-add-title {\n font-size: 12px;\n font-weight: 600;\n color: var(--mj-brand-primary);\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.pjf-add-form {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n\n.pjf-select {\n flex: 1;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n border: 1px solid var(--mj-border-default);\n border-radius: 6px;\n padding: 6px 12px;\n font-size: 13px;\n outline: none;\n transition: border-color 0.15s ease;\n}\n\n.pjf-select:focus {\n border-color: var(--mj-brand-primary);\n}\n\n/* Items list */\n.pjf-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.pjf-item-card {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 10px 14px;\n background: var(--mj-bg-surface);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 8px;\n transition: all 0.15s ease;\n}\n\n.pjf-item-card:hover {\n border-color: var(--mj-border-default);\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);\n}\n\n.pjf-item-card.is-primary {\n border-color: var(--mj-status-warning-border, color-mix(in srgb, var(--mj-status-warning) 35%, transparent));\n background: linear-gradient(90deg, color-mix(in srgb, var(--mj-status-warning) 8%, transparent) 0%, var(--mj-bg-surface) 100%);\n}\n\n/* Sequence Column */\n.pjf-seq-col {\n min-width: 100px;\n flex-shrink: 0;\n}\n\n.pjf-rank-badge {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 9px;\n border-radius: 6px;\n font-size: 11px;\n font-weight: 700;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-muted);\n border: 1px solid var(--mj-border-subtle);\n}\n\n.pjf-rank-badge.primary {\n background: var(--mj-status-warning-bg, color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface)));\n color: var(--mj-status-warning-text, var(--mj-status-warning));\n border: 1px solid var(--mj-status-warning-border, color-mix(in srgb, var(--mj-status-warning) 35%, transparent));\n}\n\n.pjf-rank-badge.primary i {\n font-size: 10px;\n}\n\n/* Info Column */\n.pjf-info-col {\n flex: 1;\n min-width: 0;\n}\n\n.pjf-name-row {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.pjf-function-name {\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n\n.pjf-pill-group {\n display: flex;\n align-items: center;\n gap: 6px;\n}\n\n.pjf-source-pill {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-size: 11px;\n font-weight: 600;\n padding: 2px 7px;\n border-radius: 4px;\n}\n\n.pjf-source-pill.derived {\n background: var(--mj-status-info-bg, color-mix(in srgb, var(--mj-status-info) 14%, var(--mj-bg-surface)));\n color: var(--mj-status-info-text, var(--mj-status-info));\n border: 1px solid var(--mj-status-info-border, color-mix(in srgb, var(--mj-status-info) 28%, transparent));\n}\n\n.pjf-source-pill.manual {\n background: var(--mj-status-success-bg, color-mix(in srgb, var(--mj-status-success) 14%, var(--mj-bg-surface)));\n color: var(--mj-status-success-text, var(--mj-status-success));\n border: 1px solid var(--mj-status-success-border, color-mix(in srgb, var(--mj-status-success) 28%, transparent));\n}\n\n.pjf-conf {\n font-size: 10px;\n opacity: 0.85;\n}\n\n/* Actions Column */\n.pjf-actions-col {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-shrink: 0;\n}\n\n.pjf-action-btn {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 4px 8px;\n border-radius: 5px;\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n transition: all 0.15s ease;\n border: none;\n}\n\n.pjf-action-btn.primary-btn {\n background: transparent;\n color: var(--mj-status-warning-text, var(--mj-status-warning));\n border: 1px solid var(--mj-status-warning-border, color-mix(in srgb, var(--mj-status-warning) 30%, transparent));\n}\n\n.pjf-action-btn.primary-btn:hover:not(:disabled) {\n background: var(--mj-status-warning-bg, color-mix(in srgb, var(--mj-status-warning) 15%, var(--mj-bg-surface)));\n}\n\n.pjf-order-buttons {\n display: flex;\n align-items: center;\n gap: 2px;\n background: var(--mj-bg-surface-sunken);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 5px;\n padding: 1px;\n}\n\n.pjf-icon-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 24px;\n border: none;\n background: transparent;\n color: var(--mj-text-secondary);\n border-radius: 4px;\n cursor: pointer;\n font-size: 10px;\n transition: all 0.12s ease;\n}\n\n.pjf-icon-btn:hover:not(:disabled) {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.pjf-icon-btn:disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.pjf-icon-btn.delete-btn {\n color: var(--mj-text-muted);\n}\n\n.pjf-icon-btn.delete-btn:hover:not(:disabled) {\n background: var(--mj-status-error-bg, color-mix(in srgb, var(--mj-status-error) 15%, var(--mj-bg-surface)));\n color: var(--mj-status-error-text, var(--mj-status-error));\n}\n\n/* Loading & Empty */\n.pjf-loading, .pjf-empty {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 32px;\n text-align: center;\n color: var(--mj-text-muted);\n border: 1px dashed var(--mj-border-subtle);\n border-radius: 8px;\n gap: 8px;\n}\n\n.pjf-empty i {\n font-size: 28px;\n margin-bottom: 4px;\n}\n\n.pjf-empty h4 {\n margin: 0;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n}\n\n.pjf-empty p {\n margin: 0 0 8px 0;\n font-size: 12px;\n max-width: 320px;\n}\n\n.pjf-error {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 12px;\n border-radius: 6px;\n font-size: 12px;\n background: var(--mj-status-error-bg, color-mix(in srgb, var(--mj-status-error) 10%, var(--mj-bg-surface)));\n border: 1px solid var(--mj-status-error-border, var(--mj-status-error));\n color: var(--mj-status-error-text, var(--mj-status-error));\n}\n"] }]
496
+ }], null, { PersonID: [{
497
+ type: Input
498
+ }], EditMode: [{
499
+ type: Input
500
+ }], Provider: [{
501
+ type: Input
502
+ }], DataChanged: [{
503
+ type: Output
504
+ }] }); })();
505
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PersonJobFunctionsComponent, { className: "PersonJobFunctionsComponent", filePath: "lib/components/person-job-functions/person-job-functions.component.ts", lineNumber: 36 }); })();
506
+ //# sourceMappingURL=person-job-functions.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"person-job-functions.component.js","sourceRoot":"","sources":["../../../../src/lib/components/person-job-functions/person-job-functions.component.ts","../../../../src/lib/components/person-job-functions/person-job-functions.component.html"],"names":[],"mappings":"AAAA,OAAO,EACH,uBAAuB,EACvB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,KAAK,EAGL,MAAM,EAEN,MAAM,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAqB,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;;;;;ICRrD,+BAAkC;IAC9B,0BAAS;IAAA,8BAAQ;IAAA,YAA0B;IAC/C,AAD+C,iBAAS,EACjD;;;IADc,eAA0B;IAA1B,iDAA0B;;;;IAM/C,kCAK6C;IAAzC,gPAAwC;IACxC,wBAA0F;IAC1F,YACJ;IAAA,iBAAS;;;IAJL,wCAAmB;IAEC,cAAgC;IAAC,AAAjC,gDAAgC,kCAAiC;IACrF,cACJ;IADI,iFACJ;;;IA0BQ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PE,2BAA2B"}
@@ -1,7 +1,7 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { RelatedRecordCollection } from '@memberjunction/core';
3
3
  import { FormNavigationEvent } from '@memberjunction/ng-base-forms';
4
- import { mjBizAppsCommonRelationshipEntity, mjBizAppsCommonRelationshipTypeEntity } from '@mj-biz-apps/common-entities';
4
+ import { mjBizAppsCommonRelationshipEntity, mjBizAppsCommonRelationshipTypeEntity, mjBizAppsCommonJobFunctionEntity, mjBizAppsCommonSeniorityLevelEntity } from '@mj-biz-apps/common-entities';
5
5
  import * as i0 from "@angular/core";
6
6
  /**
7
7
  * View model for a single relationship row, enriched with display-friendly
@@ -74,6 +74,10 @@ interface AddFormData {
74
74
  StartDate: string;
75
75
  /** ISO date string (`YYYY-MM-DD`) for the relationship end date. */
76
76
  EndDate: string;
77
+ /** Optional job function record ID for this relationship. */
78
+ JobFunctionID: string;
79
+ /** Optional seniority level record ID for this relationship. */
80
+ SeniorityLevelID: string;
77
81
  }
78
82
  /**
79
83
  * Form model for the "Edit Relationship" inline panel.
@@ -92,6 +96,10 @@ interface EditFormData {
92
96
  EndDate: string;
93
97
  /** The current status of the relationship. */
94
98
  Status: 'Active' | 'Inactive' | 'Ended';
99
+ /** Optional job function record ID for this relationship. */
100
+ JobFunctionID: string;
101
+ /** Optional seniority level record ID for this relationship. */
102
+ SeniorityLevelID: string;
95
103
  }
96
104
  /**
97
105
  * Displays and manages relationships for a Person or Organization record,
@@ -193,6 +201,22 @@ export declare class RelationshipListComponent {
193
201
  * Loaded from `MJ_BizApps_Common: Relationship Types`, filtered to `IsActive=1`.
194
202
  */
195
203
  RelationshipTypes: mjBizAppsCommonRelationshipTypeEntity[];
204
+ /**
205
+ * All active job functions available for selection.
206
+ */
207
+ JobFunctions: mjBizAppsCommonJobFunctionEntity[];
208
+ /**
209
+ * All active seniority levels available for selection.
210
+ */
211
+ SeniorityLevels: mjBizAppsCommonSeniorityLevelEntity[];
212
+ /**
213
+ * Progressive disclosure toggle for advanced role fields in Add Form.
214
+ */
215
+ ShowAddAdvanced: boolean;
216
+ /**
217
+ * Progressive disclosure toggle for advanced role fields in Edit Form.
218
+ */
219
+ ShowEditAdvanced: boolean;
196
220
  /**
197
221
  * Indicates whether the component is performing the initial data load.
198
222
  * The template shows a loading spinner while this is `true`.