@mj-biz-apps/common-ng 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +276 -0
- package/dist/lib/components/address-editor/address-editor.component.d.ts +249 -0
- package/dist/lib/components/address-editor/address-editor.component.d.ts.map +1 -0
- package/dist/lib/components/address-editor/address-editor.component.js +981 -0
- package/dist/lib/components/address-editor/address-editor.component.js.map +1 -0
- package/dist/lib/components/contact-method-list/contact-method-list.component.d.ts +256 -0
- package/dist/lib/components/contact-method-list/contact-method-list.component.d.ts.map +1 -0
- package/dist/lib/components/contact-method-list/contact-method-list.component.js +788 -0
- package/dist/lib/components/contact-method-list/contact-method-list.component.js.map +1 -0
- package/dist/lib/components/org-hierarchy-tree/org-hierarchy-tree.component.d.ts +119 -0
- package/dist/lib/components/org-hierarchy-tree/org-hierarchy-tree.component.d.ts.map +1 -0
- package/dist/lib/components/org-hierarchy-tree/org-hierarchy-tree.component.js +295 -0
- package/dist/lib/components/org-hierarchy-tree/org-hierarchy-tree.component.js.map +1 -0
- package/dist/lib/components/relationship-list/relationship-list.component.d.ts +392 -0
- package/dist/lib/components/relationship-list/relationship-list.component.d.ts.map +1 -0
- package/dist/lib/components/relationship-list/relationship-list.component.js +1171 -0
- package/dist/lib/components/relationship-list/relationship-list.component.js.map +1 -0
- package/dist/lib/custom/Organization/organization-form.component.d.ts +24 -0
- package/dist/lib/custom/Organization/organization-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Organization/organization-form.component.js +244 -0
- package/dist/lib/custom/Organization/organization-form.component.js.map +1 -0
- package/dist/lib/custom/Person/person-form.component.d.ts +24 -0
- package/dist/lib/custom/Person/person-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Person/person-form.component.js +231 -0
- package/dist/lib/custom/Person/person-form.component.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +17 -0
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -0
- package/dist/lib/custom/custom-forms.module.js +64 -0
- package/dist/lib/custom/custom-forms.module.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.js +94 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddress/mjbizappscommonaddress.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.js +70 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressLink/mjbizappscommonaddresslink.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.js +86 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonAddressType/mjbizappscommonaddresstype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.js +70 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactMethod/mjbizappscommoncontactmethod.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.js +86 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonContactType/mjbizappscommoncontacttype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.js +190 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganization/mjbizappscommonorganization.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.js +80 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonOrganizationType/mjbizappscommonorganizationtype.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.js +184 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonPerson/mjbizappscommonperson.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.js +78 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationship/mjbizappscommonrelationship.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.js +90 -0
- package/dist/lib/generated/Entities/mjBizAppsCommonRelationshipType/mjbizappscommonrelationshiptype.form.component.js.map +1 -0
- package/dist/lib/generated/class-registrations-manifest.d.ts +22 -0
- package/dist/lib/generated/class-registrations-manifest.d.ts.map +1 -0
- package/dist/lib/generated/class-registrations-manifest.js +39 -0
- package/dist/lib/generated/class-registrations-manifest.js.map +1 -0
- package/dist/lib/generated/generated-forms.module.d.ts +28 -0
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -0
- package/dist/lib/generated/generated-forms.module.js +94 -0
- package/dist/lib/generated/generated-forms.module.js.map +1 -0
- package/dist/public-api.d.ts +23 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +30 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +46 -0
|
@@ -0,0 +1,1171 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, inject, ChangeDetectorRef } from '@angular/core';
|
|
2
|
+
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { FormsModule } from '@angular/forms';
|
|
4
|
+
import { CompositeKey, Metadata, RunView } from '@memberjunction/core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@angular/common";
|
|
7
|
+
import * as i2 from "@angular/forms";
|
|
8
|
+
const _forTrack0 = ($index, $item) => $item.Category;
|
|
9
|
+
const _forTrack1 = ($index, $item) => $item.Relationship.ID;
|
|
10
|
+
const _forTrack2 = ($index, $item) => $item.ID;
|
|
11
|
+
function RelationshipListComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
12
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
13
|
+
i0.ɵɵelementStart(0, "button", 5);
|
|
14
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onShowAdd()); });
|
|
15
|
+
i0.ɵɵelement(1, "i", 6);
|
|
16
|
+
i0.ɵɵtext(2, " Add Relationship ");
|
|
17
|
+
i0.ɵɵelementEnd();
|
|
18
|
+
} }
|
|
19
|
+
function RelationshipListComponent_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
20
|
+
i0.ɵɵelementStart(0, "div", 4);
|
|
21
|
+
i0.ɵɵelement(1, "i", 7);
|
|
22
|
+
i0.ɵɵtext(2, " Loading relationships... ");
|
|
23
|
+
i0.ɵɵelementEnd();
|
|
24
|
+
} }
|
|
25
|
+
function RelationshipListComponent_Conditional_6_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
+
i0.ɵɵelementStart(0, "div", 8);
|
|
27
|
+
i0.ɵɵelement(1, "i", 2);
|
|
28
|
+
i0.ɵɵtext(2, " No relationships yet ");
|
|
29
|
+
i0.ɵɵelementEnd();
|
|
30
|
+
} }
|
|
31
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_For_10_Template(rf, ctx) { if (rf & 1) {
|
|
32
|
+
i0.ɵɵelementStart(0, "option", 22);
|
|
33
|
+
i0.ɵɵtext(1);
|
|
34
|
+
i0.ɵɵelementEnd();
|
|
35
|
+
} if (rf & 2) {
|
|
36
|
+
const t_r4 = ctx.$implicit;
|
|
37
|
+
i0.ɵɵproperty("value", t_r4.ID);
|
|
38
|
+
i0.ɵɵadvance();
|
|
39
|
+
i0.ɵɵtextInterpolate(t_r4.Name);
|
|
40
|
+
} }
|
|
41
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Conditional_43_Template(rf, ctx) { if (rf & 1) {
|
|
42
|
+
i0.ɵɵelement(0, "i", 35);
|
|
43
|
+
} }
|
|
44
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
45
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
46
|
+
i0.ɵɵelementStart(0, "div", 15)(1, "div", 17);
|
|
47
|
+
i0.ɵɵelement(2, "i", 18);
|
|
48
|
+
i0.ɵɵtext(3, " Edit Relationship ");
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
i0.ɵɵelementStart(4, "div", 19)(5, "div", 20)(6, "label");
|
|
51
|
+
i0.ɵɵtext(7, "Relationship Type");
|
|
52
|
+
i0.ɵɵelementEnd();
|
|
53
|
+
i0.ɵɵelementStart(8, "select", 21);
|
|
54
|
+
i0.ɵɵtwoWayListener("ngModelChange", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Template_select_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r1.EditForm.TypeID, $event) || (ctx_r1.EditForm.TypeID = $event); return i0.ɵɵresetView($event); });
|
|
55
|
+
i0.ɵɵlistener("ngModelChange", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Template_select_ngModelChange_8_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.onEditTypeChange()); });
|
|
56
|
+
i0.ɵɵrepeaterCreate(9, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_For_10_Template, 2, 2, "option", 22, _forTrack2);
|
|
57
|
+
i0.ɵɵelementEnd()();
|
|
58
|
+
i0.ɵɵelementStart(11, "div", 23)(12, "label");
|
|
59
|
+
i0.ɵɵtext(13, "Category");
|
|
60
|
+
i0.ɵɵelementEnd();
|
|
61
|
+
i0.ɵɵelementStart(14, "div", 24);
|
|
62
|
+
i0.ɵɵelement(15, "i", 25);
|
|
63
|
+
i0.ɵɵtext(16);
|
|
64
|
+
i0.ɵɵelementEnd()()();
|
|
65
|
+
i0.ɵɵelementStart(17, "div", 19)(18, "div", 26)(19, "label");
|
|
66
|
+
i0.ɵɵtext(20, "Title / Role");
|
|
67
|
+
i0.ɵɵelementEnd();
|
|
68
|
+
i0.ɵɵelementStart(21, "input", 27);
|
|
69
|
+
i0.ɵɵtwoWayListener("ngModelChange", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Template_input_ngModelChange_21_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r1.EditForm.Title, $event) || (ctx_r1.EditForm.Title = $event); return i0.ɵɵresetView($event); });
|
|
70
|
+
i0.ɵɵelementEnd()();
|
|
71
|
+
i0.ɵɵelementStart(22, "div", 28)(23, "label");
|
|
72
|
+
i0.ɵɵtext(24, "Start Date");
|
|
73
|
+
i0.ɵɵelementEnd();
|
|
74
|
+
i0.ɵɵelementStart(25, "input", 29);
|
|
75
|
+
i0.ɵɵtwoWayListener("ngModelChange", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Template_input_ngModelChange_25_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r1.EditForm.StartDate, $event) || (ctx_r1.EditForm.StartDate = $event); return i0.ɵɵresetView($event); });
|
|
76
|
+
i0.ɵɵelementEnd()();
|
|
77
|
+
i0.ɵɵelementStart(26, "div", 28)(27, "label");
|
|
78
|
+
i0.ɵɵtext(28, "End Date");
|
|
79
|
+
i0.ɵɵelementEnd();
|
|
80
|
+
i0.ɵɵelementStart(29, "input", 29);
|
|
81
|
+
i0.ɵɵtwoWayListener("ngModelChange", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Template_input_ngModelChange_29_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r1.EditForm.EndDate, $event) || (ctx_r1.EditForm.EndDate = $event); return i0.ɵɵresetView($event); });
|
|
82
|
+
i0.ɵɵelementEnd()()();
|
|
83
|
+
i0.ɵɵelementStart(30, "div", 19)(31, "div", 26)(32, "label");
|
|
84
|
+
i0.ɵɵtext(33, "Status");
|
|
85
|
+
i0.ɵɵelementEnd();
|
|
86
|
+
i0.ɵɵelementStart(34, "select", 21);
|
|
87
|
+
i0.ɵɵtwoWayListener("ngModelChange", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Template_select_ngModelChange_34_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(4); i0.ɵɵtwoWayBindingSet(ctx_r1.EditForm.Status, $event) || (ctx_r1.EditForm.Status = $event); return i0.ɵɵresetView($event); });
|
|
88
|
+
i0.ɵɵelementStart(35, "option", 30);
|
|
89
|
+
i0.ɵɵtext(36, "Active");
|
|
90
|
+
i0.ɵɵelementEnd();
|
|
91
|
+
i0.ɵɵelementStart(37, "option", 31);
|
|
92
|
+
i0.ɵɵtext(38, "Inactive");
|
|
93
|
+
i0.ɵɵelementEnd();
|
|
94
|
+
i0.ɵɵelementStart(39, "option", 32);
|
|
95
|
+
i0.ɵɵtext(40, "Ended");
|
|
96
|
+
i0.ɵɵelementEnd()()()();
|
|
97
|
+
i0.ɵɵelementStart(41, "div", 33)(42, "button", 34);
|
|
98
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Template_button_click_42_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.onSaveEdit()); });
|
|
99
|
+
i0.ɵɵconditionalCreate(43, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Conditional_43_Template, 1, 0, "i", 35);
|
|
100
|
+
i0.ɵɵtext(44, " Save ");
|
|
101
|
+
i0.ɵɵelementEnd();
|
|
102
|
+
i0.ɵɵelementStart(45, "button", 36);
|
|
103
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Template_button_click_45_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.onCancelEdit()); });
|
|
104
|
+
i0.ɵɵtext(46, "Cancel");
|
|
105
|
+
i0.ɵɵelementEnd()()();
|
|
106
|
+
} if (rf & 2) {
|
|
107
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
108
|
+
i0.ɵɵadvance(8);
|
|
109
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.EditForm.TypeID);
|
|
110
|
+
i0.ɵɵadvance();
|
|
111
|
+
i0.ɵɵrepeater(ctx_r1.RelationshipTypes);
|
|
112
|
+
i0.ɵɵadvance(7);
|
|
113
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getEditCategory(), " ");
|
|
114
|
+
i0.ɵɵadvance(5);
|
|
115
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.EditForm.Title);
|
|
116
|
+
i0.ɵɵadvance(4);
|
|
117
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.EditForm.StartDate);
|
|
118
|
+
i0.ɵɵadvance(4);
|
|
119
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.EditForm.EndDate);
|
|
120
|
+
i0.ɵɵadvance(5);
|
|
121
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.EditForm.Status);
|
|
122
|
+
i0.ɵɵadvance(8);
|
|
123
|
+
i0.ɵɵproperty("disabled", ctx_r1.Saving);
|
|
124
|
+
i0.ɵɵadvance();
|
|
125
|
+
i0.ɵɵconditional(ctx_r1.Saving ? 43 : -1);
|
|
126
|
+
} }
|
|
127
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
128
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
129
|
+
i0.ɵɵelementStart(0, "a", 48);
|
|
130
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_7_Template_a_click_0_listener($event) { i0.ɵɵrestoreView(_r5); const item_r6 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onNavigateToTarget(item_r6, $event)); });
|
|
131
|
+
i0.ɵɵtext(1);
|
|
132
|
+
i0.ɵɵelementEnd();
|
|
133
|
+
} if (rf & 2) {
|
|
134
|
+
const item_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
135
|
+
i0.ɵɵadvance();
|
|
136
|
+
i0.ɵɵtextInterpolate(item_r6.TargetName);
|
|
137
|
+
} }
|
|
138
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
139
|
+
i0.ɵɵelementStart(0, "span", 42);
|
|
140
|
+
i0.ɵɵtext(1);
|
|
141
|
+
i0.ɵɵelementEnd();
|
|
142
|
+
} if (rf & 2) {
|
|
143
|
+
const item_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
144
|
+
i0.ɵɵadvance();
|
|
145
|
+
i0.ɵɵtextInterpolate(item_r6.TargetName);
|
|
146
|
+
} }
|
|
147
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_10_Template(rf, ctx) { if (rf & 1) {
|
|
148
|
+
i0.ɵɵelementStart(0, "span", 44);
|
|
149
|
+
i0.ɵɵtext(1);
|
|
150
|
+
i0.ɵɵelementEnd();
|
|
151
|
+
} if (rf & 2) {
|
|
152
|
+
const item_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
153
|
+
i0.ɵɵadvance();
|
|
154
|
+
i0.ɵɵtextInterpolate(item_r6.Relationship.Title);
|
|
155
|
+
} }
|
|
156
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_11_Template(rf, ctx) { if (rf & 1) {
|
|
157
|
+
i0.ɵɵelementStart(0, "span", 45);
|
|
158
|
+
i0.ɵɵelement(1, "i", 49);
|
|
159
|
+
i0.ɵɵtext(2);
|
|
160
|
+
i0.ɵɵelementEnd();
|
|
161
|
+
} if (rf & 2) {
|
|
162
|
+
const item_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
163
|
+
i0.ɵɵadvance(2);
|
|
164
|
+
i0.ɵɵtextInterpolate1(" ", item_r6.DateDisplay, " ");
|
|
165
|
+
} }
|
|
166
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_14_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
167
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
168
|
+
i0.ɵɵelementStart(0, "button", 53);
|
|
169
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_14_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const item_r6 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onEndRelationship(item_r6.Relationship)); });
|
|
170
|
+
i0.ɵɵelement(1, "i", 54);
|
|
171
|
+
i0.ɵɵelementEnd();
|
|
172
|
+
} }
|
|
173
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_14_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
174
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
175
|
+
i0.ɵɵelementStart(0, "button", 55);
|
|
176
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_14_Conditional_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const item_r6 = i0.ɵɵnextContext(3).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onDelete(item_r6.Relationship)); });
|
|
177
|
+
i0.ɵɵelement(1, "i", 56);
|
|
178
|
+
i0.ɵɵelementEnd();
|
|
179
|
+
} }
|
|
180
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
181
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
182
|
+
i0.ɵɵelementStart(0, "div", 47)(1, "button", 50);
|
|
183
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_14_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r7); const item_r6 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onEdit(item_r6.Relationship)); });
|
|
184
|
+
i0.ɵɵelement(2, "i", 18);
|
|
185
|
+
i0.ɵɵelementEnd();
|
|
186
|
+
i0.ɵɵconditionalCreate(3, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_14_Conditional_3_Template, 2, 0, "button", 51)(4, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_14_Conditional_4_Template, 2, 0, "button", 52);
|
|
187
|
+
i0.ɵɵelementEnd();
|
|
188
|
+
} if (rf & 2) {
|
|
189
|
+
const item_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
190
|
+
i0.ɵɵadvance(3);
|
|
191
|
+
i0.ɵɵconditional(item_r6.Relationship.Status === "Active" ? 3 : 4);
|
|
192
|
+
} }
|
|
193
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
194
|
+
i0.ɵɵelementStart(0, "div", 16)(1, "div", 37);
|
|
195
|
+
i0.ɵɵelement(2, "i");
|
|
196
|
+
i0.ɵɵelementEnd();
|
|
197
|
+
i0.ɵɵelementStart(3, "div", 38)(4, "div", 39)(5, "span", 40);
|
|
198
|
+
i0.ɵɵtext(6);
|
|
199
|
+
i0.ɵɵelementEnd();
|
|
200
|
+
i0.ɵɵconditionalCreate(7, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_7_Template, 2, 1, "a", 41)(8, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_8_Template, 2, 1, "span", 42);
|
|
201
|
+
i0.ɵɵelementEnd();
|
|
202
|
+
i0.ɵɵelementStart(9, "div", 43);
|
|
203
|
+
i0.ɵɵconditionalCreate(10, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_10_Template, 2, 1, "span", 44);
|
|
204
|
+
i0.ɵɵconditionalCreate(11, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_11_Template, 3, 1, "span", 45);
|
|
205
|
+
i0.ɵɵelementStart(12, "span", 46);
|
|
206
|
+
i0.ɵɵtext(13);
|
|
207
|
+
i0.ɵɵelementEnd()()();
|
|
208
|
+
i0.ɵɵconditionalCreate(14, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Conditional_14_Template, 5, 1, "div", 47);
|
|
209
|
+
i0.ɵɵelementEnd();
|
|
210
|
+
} if (rf & 2) {
|
|
211
|
+
const item_r6 = i0.ɵɵnextContext().$implicit;
|
|
212
|
+
const group_r10 = i0.ɵɵnextContext().$implicit;
|
|
213
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
214
|
+
i0.ɵɵproperty("ngClass", "status-" + item_r6.Relationship.Status.toLowerCase());
|
|
215
|
+
i0.ɵɵadvance(2);
|
|
216
|
+
i0.ɵɵclassMap(group_r10.Icon);
|
|
217
|
+
i0.ɵɵadvance(4);
|
|
218
|
+
i0.ɵɵtextInterpolate(item_r6.DirectionLabel);
|
|
219
|
+
i0.ɵɵadvance();
|
|
220
|
+
i0.ɵɵconditional(item_r6.TargetEntityName && item_r6.TargetID ? 7 : 8);
|
|
221
|
+
i0.ɵɵadvance(3);
|
|
222
|
+
i0.ɵɵconditional(item_r6.Relationship.Title ? 10 : -1);
|
|
223
|
+
i0.ɵɵadvance();
|
|
224
|
+
i0.ɵɵconditional(item_r6.DateDisplay ? 11 : -1);
|
|
225
|
+
i0.ɵɵadvance();
|
|
226
|
+
i0.ɵɵproperty("ngClass", "badge-" + item_r6.Relationship.Status.toLowerCase());
|
|
227
|
+
i0.ɵɵadvance();
|
|
228
|
+
i0.ɵɵtextInterpolate1(" ", item_r6.Relationship.Status, " ");
|
|
229
|
+
i0.ɵɵadvance();
|
|
230
|
+
i0.ɵɵconditional(ctx_r1.EditMode ? 14 : -1);
|
|
231
|
+
} }
|
|
232
|
+
function RelationshipListComponent_Conditional_6_For_2_For_9_Template(rf, ctx) { if (rf & 1) {
|
|
233
|
+
i0.ɵɵconditionalCreate(0, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_0_Template, 47, 8, "div", 15)(1, RelationshipListComponent_Conditional_6_For_2_For_9_Conditional_1_Template, 15, 10, "div", 16);
|
|
234
|
+
} if (rf & 2) {
|
|
235
|
+
const item_r6 = ctx.$implicit;
|
|
236
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
237
|
+
i0.ɵɵconditional(ctx_r1.EditingId === item_r6.Relationship.ID ? 0 : 1);
|
|
238
|
+
} }
|
|
239
|
+
function RelationshipListComponent_Conditional_6_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
240
|
+
i0.ɵɵelementStart(0, "div", 9)(1, "div", 11)(2, "div", 12);
|
|
241
|
+
i0.ɵɵelement(3, "i");
|
|
242
|
+
i0.ɵɵelementEnd();
|
|
243
|
+
i0.ɵɵelementStart(4, "span", 13);
|
|
244
|
+
i0.ɵɵtext(5);
|
|
245
|
+
i0.ɵɵelementEnd();
|
|
246
|
+
i0.ɵɵelementStart(6, "span", 14);
|
|
247
|
+
i0.ɵɵtext(7);
|
|
248
|
+
i0.ɵɵelementEnd()();
|
|
249
|
+
i0.ɵɵrepeaterCreate(8, RelationshipListComponent_Conditional_6_For_2_For_9_Template, 2, 1, null, null, _forTrack1);
|
|
250
|
+
i0.ɵɵelementEnd();
|
|
251
|
+
} if (rf & 2) {
|
|
252
|
+
const group_r10 = ctx.$implicit;
|
|
253
|
+
i0.ɵɵadvance(2);
|
|
254
|
+
i0.ɵɵproperty("ngClass", group_r10.IconClass);
|
|
255
|
+
i0.ɵɵadvance();
|
|
256
|
+
i0.ɵɵclassMap(group_r10.Icon);
|
|
257
|
+
i0.ɵɵadvance(2);
|
|
258
|
+
i0.ɵɵtextInterpolate(group_r10.Label);
|
|
259
|
+
i0.ɵɵadvance(2);
|
|
260
|
+
i0.ɵɵtextInterpolate2("", group_r10.Items.length, " ", group_r10.Items.length === 1 ? "relationship" : "relationships");
|
|
261
|
+
i0.ɵɵadvance();
|
|
262
|
+
i0.ɵɵrepeater(group_r10.Items);
|
|
263
|
+
} }
|
|
264
|
+
function RelationshipListComponent_Conditional_6_Conditional_3_For_12_Template(rf, ctx) { if (rf & 1) {
|
|
265
|
+
i0.ɵɵelementStart(0, "option", 22);
|
|
266
|
+
i0.ɵɵtext(1);
|
|
267
|
+
i0.ɵɵelementEnd();
|
|
268
|
+
} if (rf & 2) {
|
|
269
|
+
const t_r12 = ctx.$implicit;
|
|
270
|
+
i0.ɵɵproperty("value", t_r12.ID);
|
|
271
|
+
i0.ɵɵadvance();
|
|
272
|
+
i0.ɵɵtextInterpolate(t_r12.Name);
|
|
273
|
+
} }
|
|
274
|
+
function RelationshipListComponent_Conditional_6_Conditional_3_Conditional_24_For_2_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
275
|
+
i0.ɵɵelementStart(0, "div", 64);
|
|
276
|
+
i0.ɵɵtext(1);
|
|
277
|
+
i0.ɵɵelementEnd();
|
|
278
|
+
} if (rf & 2) {
|
|
279
|
+
const result_r14 = i0.ɵɵnextContext().$implicit;
|
|
280
|
+
i0.ɵɵadvance();
|
|
281
|
+
i0.ɵɵtextInterpolate(result_r14.Detail);
|
|
282
|
+
} }
|
|
283
|
+
function RelationshipListComponent_Conditional_6_Conditional_3_Conditional_24_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
284
|
+
const _r13 = i0.ɵɵgetCurrentView();
|
|
285
|
+
i0.ɵɵelementStart(0, "div", 62);
|
|
286
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_6_Conditional_3_Conditional_24_For_2_Template_div_click_0_listener() { const result_r14 = i0.ɵɵrestoreView(_r13).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.onSelectTarget(result_r14)); });
|
|
287
|
+
i0.ɵɵelementStart(1, "div")(2, "div", 63);
|
|
288
|
+
i0.ɵɵtext(3);
|
|
289
|
+
i0.ɵɵelementEnd();
|
|
290
|
+
i0.ɵɵconditionalCreate(4, RelationshipListComponent_Conditional_6_Conditional_3_Conditional_24_For_2_Conditional_4_Template, 2, 1, "div", 64);
|
|
291
|
+
i0.ɵɵelementEnd()();
|
|
292
|
+
} if (rf & 2) {
|
|
293
|
+
const result_r14 = ctx.$implicit;
|
|
294
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
295
|
+
i0.ɵɵstyleProp("background", ctx_r1.AddForm.TargetID === result_r14.ID ? "#e3f2fd" : "");
|
|
296
|
+
i0.ɵɵadvance(3);
|
|
297
|
+
i0.ɵɵtextInterpolate(result_r14.Name);
|
|
298
|
+
i0.ɵɵadvance();
|
|
299
|
+
i0.ɵɵconditional(result_r14.Detail ? 4 : -1);
|
|
300
|
+
} }
|
|
301
|
+
function RelationshipListComponent_Conditional_6_Conditional_3_Conditional_24_Template(rf, ctx) { if (rf & 1) {
|
|
302
|
+
i0.ɵɵelementStart(0, "div", 59);
|
|
303
|
+
i0.ɵɵrepeaterCreate(1, RelationshipListComponent_Conditional_6_Conditional_3_Conditional_24_For_2_Template, 5, 4, "div", 61, _forTrack2);
|
|
304
|
+
i0.ɵɵelementEnd();
|
|
305
|
+
} if (rf & 2) {
|
|
306
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
307
|
+
i0.ɵɵadvance();
|
|
308
|
+
i0.ɵɵrepeater(ctx_r1.TargetSearchResults);
|
|
309
|
+
} }
|
|
310
|
+
function RelationshipListComponent_Conditional_6_Conditional_3_Conditional_25_Template(rf, ctx) { if (rf & 1) {
|
|
311
|
+
const _r15 = i0.ɵɵgetCurrentView();
|
|
312
|
+
i0.ɵɵelementStart(0, "div", 60)(1, "span", 65);
|
|
313
|
+
i0.ɵɵtext(2);
|
|
314
|
+
i0.ɵɵelementStart(3, "span", 66);
|
|
315
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_6_Conditional_3_Conditional_25_Template_span_click_3_listener() { i0.ɵɵrestoreView(_r15); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.onClearTarget()); });
|
|
316
|
+
i0.ɵɵelement(4, "i", 67);
|
|
317
|
+
i0.ɵɵelementEnd()()();
|
|
318
|
+
} if (rf & 2) {
|
|
319
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
320
|
+
i0.ɵɵadvance(2);
|
|
321
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.AddForm.TargetName, " ");
|
|
322
|
+
} }
|
|
323
|
+
function RelationshipListComponent_Conditional_6_Conditional_3_Conditional_41_Template(rf, ctx) { if (rf & 1) {
|
|
324
|
+
i0.ɵɵelement(0, "i", 35);
|
|
325
|
+
} }
|
|
326
|
+
function RelationshipListComponent_Conditional_6_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
327
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
328
|
+
i0.ɵɵelementStart(0, "div", 10)(1, "div", 17);
|
|
329
|
+
i0.ɵɵelement(2, "i", 6);
|
|
330
|
+
i0.ɵɵtext(3, " Add Relationship ");
|
|
331
|
+
i0.ɵɵelementEnd();
|
|
332
|
+
i0.ɵɵelementStart(4, "div", 19)(5, "div", 20)(6, "label");
|
|
333
|
+
i0.ɵɵtext(7, "Relationship Type");
|
|
334
|
+
i0.ɵɵelementEnd();
|
|
335
|
+
i0.ɵɵelementStart(8, "select", 21);
|
|
336
|
+
i0.ɵɵtwoWayListener("ngModelChange", function RelationshipListComponent_Conditional_6_Conditional_3_Template_select_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.AddForm.TypeID, $event) || (ctx_r1.AddForm.TypeID = $event); return i0.ɵɵresetView($event); });
|
|
337
|
+
i0.ɵɵlistener("ngModelChange", function RelationshipListComponent_Conditional_6_Conditional_3_Template_select_ngModelChange_8_listener() { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onAddTypeChange()); });
|
|
338
|
+
i0.ɵɵelementStart(9, "option", 57);
|
|
339
|
+
i0.ɵɵtext(10, "-- Select --");
|
|
340
|
+
i0.ɵɵelementEnd();
|
|
341
|
+
i0.ɵɵrepeaterCreate(11, RelationshipListComponent_Conditional_6_Conditional_3_For_12_Template, 2, 2, "option", 22, _forTrack2);
|
|
342
|
+
i0.ɵɵelementEnd()();
|
|
343
|
+
i0.ɵɵelementStart(13, "div", 23)(14, "label");
|
|
344
|
+
i0.ɵɵtext(15, "Category");
|
|
345
|
+
i0.ɵɵelementEnd();
|
|
346
|
+
i0.ɵɵelementStart(16, "div", 24);
|
|
347
|
+
i0.ɵɵelement(17, "i", 25);
|
|
348
|
+
i0.ɵɵtext(18);
|
|
349
|
+
i0.ɵɵelementEnd()()();
|
|
350
|
+
i0.ɵɵelementStart(19, "div", 19)(20, "div", 26)(21, "label");
|
|
351
|
+
i0.ɵɵtext(22);
|
|
352
|
+
i0.ɵɵelementEnd();
|
|
353
|
+
i0.ɵɵelementStart(23, "input", 58);
|
|
354
|
+
i0.ɵɵtwoWayListener("ngModelChange", function RelationshipListComponent_Conditional_6_Conditional_3_Template_input_ngModelChange_23_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.AddForm.TargetSearch, $event) || (ctx_r1.AddForm.TargetSearch = $event); return i0.ɵɵresetView($event); });
|
|
355
|
+
i0.ɵɵlistener("input", function RelationshipListComponent_Conditional_6_Conditional_3_Template_input_input_23_listener() { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTargetSearch()); });
|
|
356
|
+
i0.ɵɵelementEnd();
|
|
357
|
+
i0.ɵɵconditionalCreate(24, RelationshipListComponent_Conditional_6_Conditional_3_Conditional_24_Template, 3, 0, "div", 59);
|
|
358
|
+
i0.ɵɵconditionalCreate(25, RelationshipListComponent_Conditional_6_Conditional_3_Conditional_25_Template, 5, 1, "div", 60);
|
|
359
|
+
i0.ɵɵelementEnd()();
|
|
360
|
+
i0.ɵɵelementStart(26, "div", 19)(27, "div", 26)(28, "label");
|
|
361
|
+
i0.ɵɵtext(29, "Title / Role");
|
|
362
|
+
i0.ɵɵelementEnd();
|
|
363
|
+
i0.ɵɵelementStart(30, "input", 27);
|
|
364
|
+
i0.ɵɵtwoWayListener("ngModelChange", function RelationshipListComponent_Conditional_6_Conditional_3_Template_input_ngModelChange_30_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.AddForm.Title, $event) || (ctx_r1.AddForm.Title = $event); return i0.ɵɵresetView($event); });
|
|
365
|
+
i0.ɵɵelementEnd()();
|
|
366
|
+
i0.ɵɵelementStart(31, "div", 28)(32, "label");
|
|
367
|
+
i0.ɵɵtext(33, "Start Date");
|
|
368
|
+
i0.ɵɵelementEnd();
|
|
369
|
+
i0.ɵɵelementStart(34, "input", 29);
|
|
370
|
+
i0.ɵɵtwoWayListener("ngModelChange", function RelationshipListComponent_Conditional_6_Conditional_3_Template_input_ngModelChange_34_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.AddForm.StartDate, $event) || (ctx_r1.AddForm.StartDate = $event); return i0.ɵɵresetView($event); });
|
|
371
|
+
i0.ɵɵelementEnd()();
|
|
372
|
+
i0.ɵɵelementStart(35, "div", 28)(36, "label");
|
|
373
|
+
i0.ɵɵtext(37, "End Date");
|
|
374
|
+
i0.ɵɵelementEnd();
|
|
375
|
+
i0.ɵɵelementStart(38, "input", 29);
|
|
376
|
+
i0.ɵɵtwoWayListener("ngModelChange", function RelationshipListComponent_Conditional_6_Conditional_3_Template_input_ngModelChange_38_listener($event) { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.AddForm.EndDate, $event) || (ctx_r1.AddForm.EndDate = $event); return i0.ɵɵresetView($event); });
|
|
377
|
+
i0.ɵɵelementEnd()()();
|
|
378
|
+
i0.ɵɵelementStart(39, "div", 33)(40, "button", 34);
|
|
379
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_6_Conditional_3_Template_button_click_40_listener() { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onSaveAdd()); });
|
|
380
|
+
i0.ɵɵconditionalCreate(41, RelationshipListComponent_Conditional_6_Conditional_3_Conditional_41_Template, 1, 0, "i", 35);
|
|
381
|
+
i0.ɵɵtext(42, " Save ");
|
|
382
|
+
i0.ɵɵelementEnd();
|
|
383
|
+
i0.ɵɵelementStart(43, "button", 36);
|
|
384
|
+
i0.ɵɵlistener("click", function RelationshipListComponent_Conditional_6_Conditional_3_Template_button_click_43_listener() { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onCancelAdd()); });
|
|
385
|
+
i0.ɵɵtext(44, "Cancel");
|
|
386
|
+
i0.ɵɵelementEnd()()();
|
|
387
|
+
} if (rf & 2) {
|
|
388
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
389
|
+
i0.ɵɵadvance(8);
|
|
390
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.AddForm.TypeID);
|
|
391
|
+
i0.ɵɵadvance(3);
|
|
392
|
+
i0.ɵɵrepeater(ctx_r1.RelationshipTypes);
|
|
393
|
+
i0.ɵɵadvance(7);
|
|
394
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getAddCategory(), " ");
|
|
395
|
+
i0.ɵɵadvance(4);
|
|
396
|
+
i0.ɵɵtextInterpolate(ctx_r1.getAddTargetLabel());
|
|
397
|
+
i0.ɵɵadvance();
|
|
398
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.AddForm.TargetSearch);
|
|
399
|
+
i0.ɵɵproperty("placeholder", "Search " + ctx_r1.getAddTargetLabel().toLowerCase() + "...");
|
|
400
|
+
i0.ɵɵadvance();
|
|
401
|
+
i0.ɵɵconditional(ctx_r1.TargetSearchResults.length > 0 ? 24 : -1);
|
|
402
|
+
i0.ɵɵadvance();
|
|
403
|
+
i0.ɵɵconditional(ctx_r1.AddForm.TargetID && ctx_r1.AddForm.TargetName ? 25 : -1);
|
|
404
|
+
i0.ɵɵadvance(5);
|
|
405
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.AddForm.Title);
|
|
406
|
+
i0.ɵɵadvance(4);
|
|
407
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.AddForm.StartDate);
|
|
408
|
+
i0.ɵɵadvance(4);
|
|
409
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.AddForm.EndDate);
|
|
410
|
+
i0.ɵɵadvance(2);
|
|
411
|
+
i0.ɵɵproperty("disabled", ctx_r1.Saving || !ctx_r1.AddForm.TypeID || !ctx_r1.AddForm.TargetID);
|
|
412
|
+
i0.ɵɵadvance();
|
|
413
|
+
i0.ɵɵconditional(ctx_r1.Saving ? 41 : -1);
|
|
414
|
+
} }
|
|
415
|
+
function RelationshipListComponent_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
416
|
+
i0.ɵɵconditionalCreate(0, RelationshipListComponent_Conditional_6_Conditional_0_Template, 3, 0, "div", 8);
|
|
417
|
+
i0.ɵɵrepeaterCreate(1, RelationshipListComponent_Conditional_6_For_2_Template, 10, 6, "div", 9, _forTrack0);
|
|
418
|
+
i0.ɵɵconditionalCreate(3, RelationshipListComponent_Conditional_6_Conditional_3_Template, 45, 12, "div", 10);
|
|
419
|
+
} if (rf & 2) {
|
|
420
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
421
|
+
i0.ɵɵconditional(ctx_r1.GroupedRelationships.length === 0 && !ctx_r1.ShowAddForm ? 0 : -1);
|
|
422
|
+
i0.ɵɵadvance();
|
|
423
|
+
i0.ɵɵrepeater(ctx_r1.GroupedRelationships);
|
|
424
|
+
i0.ɵɵadvance(2);
|
|
425
|
+
i0.ɵɵconditional(ctx_r1.ShowAddForm ? 3 : -1);
|
|
426
|
+
} }
|
|
427
|
+
/**
|
|
428
|
+
* Display configuration for each relationship category, mapping category
|
|
429
|
+
* keys to their human-readable labels, Font Awesome icons, and CSS classes.
|
|
430
|
+
*
|
|
431
|
+
* Used by the template to render group headers with consistent iconography
|
|
432
|
+
* and color theming.
|
|
433
|
+
*/
|
|
434
|
+
const CATEGORY_CONFIG = {
|
|
435
|
+
'PersonToOrganization': { label: 'Employment', icon: 'fa-solid fa-briefcase', iconClass: 'cat-employment' },
|
|
436
|
+
'PersonToPerson': { label: 'Personal', icon: 'fa-solid fa-heart', iconClass: 'cat-personal' },
|
|
437
|
+
'OrganizationToOrganization': { label: 'Business', icon: 'fa-solid fa-building', iconClass: 'cat-business' }
|
|
438
|
+
};
|
|
439
|
+
/**
|
|
440
|
+
* Displays and manages relationships for a Person or Organization record,
|
|
441
|
+
* grouped by category (Employment, Personal, Business) in a timeline layout.
|
|
442
|
+
*
|
|
443
|
+
* Relationships are bidirectional: each record has From and To sides with
|
|
444
|
+
* optional Person and Organization foreign keys. The component automatically
|
|
445
|
+
* resolves direction labels and target names based on which side the current
|
|
446
|
+
* entity occupies.
|
|
447
|
+
*
|
|
448
|
+
* Supports adding new relationships with a typeahead target search, inline
|
|
449
|
+
* editing of relationship metadata, ending active relationships, and deletion.
|
|
450
|
+
*
|
|
451
|
+
* @example
|
|
452
|
+
* ```html
|
|
453
|
+
* <!-- For a Person -->
|
|
454
|
+
* <bizapps-relationship-list
|
|
455
|
+
* [PersonID]="person.ID"
|
|
456
|
+
* (Navigate)="onNavigate($event)">
|
|
457
|
+
* </bizapps-relationship-list>
|
|
458
|
+
*
|
|
459
|
+
* <!-- For an Organization -->
|
|
460
|
+
* <bizapps-relationship-list
|
|
461
|
+
* [OrganizationID]="org.ID"
|
|
462
|
+
* (Navigate)="onNavigate($event)">
|
|
463
|
+
* </bizapps-relationship-list>
|
|
464
|
+
* ```
|
|
465
|
+
*/
|
|
466
|
+
export class RelationshipListComponent {
|
|
467
|
+
cdr = inject(ChangeDetectorRef);
|
|
468
|
+
/**
|
|
469
|
+
* Emitted when the user clicks a relationship target name to navigate
|
|
470
|
+
* to that Person or Organization record.
|
|
471
|
+
*
|
|
472
|
+
* The event payload is a {@link FormNavigationEvent} (specifically a
|
|
473
|
+
* {@link RecordNavigationEvent}) containing the target entity name,
|
|
474
|
+
* composite key, and whether to open in a new tab.
|
|
475
|
+
*
|
|
476
|
+
* @fires Navigate When the user clicks a target entity link
|
|
477
|
+
*
|
|
478
|
+
* @example
|
|
479
|
+
* ```html
|
|
480
|
+
* <bizapps-relationship-list
|
|
481
|
+
* [PersonID]="person.ID"
|
|
482
|
+
* (Navigate)="onNavigate($event)">
|
|
483
|
+
* </bizapps-relationship-list>
|
|
484
|
+
* ```
|
|
485
|
+
*/
|
|
486
|
+
Navigate = new EventEmitter();
|
|
487
|
+
/**
|
|
488
|
+
* Controls whether add, edit, delete, and end-relationship actions are available.
|
|
489
|
+
* When `false`, the component renders in read-only display mode.
|
|
490
|
+
* Navigation links to related entities remain available regardless of this setting.
|
|
491
|
+
*/
|
|
492
|
+
EditMode = false;
|
|
493
|
+
/** Emitted after any mutation (save, delete, end-relationship) so the parent can refresh derived data. */
|
|
494
|
+
DataChanged = new EventEmitter();
|
|
495
|
+
_personID = null;
|
|
496
|
+
_organizationID = null;
|
|
497
|
+
/**
|
|
498
|
+
* The Person record ID whose relationships should be displayed.
|
|
499
|
+
*
|
|
500
|
+
* Mutually exclusive with {@link OrganizationID}. Setting this triggers
|
|
501
|
+
* a data reload unless the value has not changed.
|
|
502
|
+
*
|
|
503
|
+
* @example `'A1B2C3D4-E5F6-7890-ABCD-EF1234567890'`
|
|
504
|
+
*/
|
|
505
|
+
set PersonID(value) {
|
|
506
|
+
const prev = this._personID;
|
|
507
|
+
this._personID = value;
|
|
508
|
+
if (value && value !== prev) {
|
|
509
|
+
this.loadData();
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
get PersonID() { return this._personID; }
|
|
513
|
+
/**
|
|
514
|
+
* The Organization record ID whose relationships should be displayed.
|
|
515
|
+
*
|
|
516
|
+
* Mutually exclusive with {@link PersonID}. Setting this triggers
|
|
517
|
+
* a data reload unless the value has not changed.
|
|
518
|
+
*
|
|
519
|
+
* @example `'B2C3D4E5-F6A7-8901-BCDE-F12345678901'`
|
|
520
|
+
*/
|
|
521
|
+
set OrganizationID(value) {
|
|
522
|
+
const prev = this._organizationID;
|
|
523
|
+
this._organizationID = value;
|
|
524
|
+
if (value && value !== prev) {
|
|
525
|
+
this.loadData();
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
get OrganizationID() { return this._organizationID; }
|
|
529
|
+
/**
|
|
530
|
+
* Relationships grouped by category (Employment, Personal, Business),
|
|
531
|
+
* each containing an array of display items. This is the primary data
|
|
532
|
+
* structure consumed by the template for rendering the grouped timeline.
|
|
533
|
+
*/
|
|
534
|
+
GroupedRelationships = [];
|
|
535
|
+
/**
|
|
536
|
+
* All active relationship types available for selection in type dropdowns.
|
|
537
|
+
* Loaded from `MJ.BizApps.Common: Relationship Types`, filtered to `IsActive=1`.
|
|
538
|
+
*/
|
|
539
|
+
RelationshipTypes = [];
|
|
540
|
+
/**
|
|
541
|
+
* Indicates whether the component is performing the initial data load.
|
|
542
|
+
* The template shows a loading spinner while this is `true`.
|
|
543
|
+
*/
|
|
544
|
+
Loading = false;
|
|
545
|
+
/**
|
|
546
|
+
* Indicates whether a save, delete, or end-relationship operation is in progress.
|
|
547
|
+
* Used to disable action buttons and show spinner feedback while `true`.
|
|
548
|
+
*/
|
|
549
|
+
Saving = false;
|
|
550
|
+
/**
|
|
551
|
+
* Controls visibility of the "Add Relationship" form panel. When `true`,
|
|
552
|
+
* the add form is displayed below the existing relationship groups.
|
|
553
|
+
*/
|
|
554
|
+
ShowAddForm = false;
|
|
555
|
+
/**
|
|
556
|
+
* The ID of the relationship currently being edited inline, or `null`
|
|
557
|
+
* when not in edit mode.
|
|
558
|
+
*/
|
|
559
|
+
EditingId = null;
|
|
560
|
+
/**
|
|
561
|
+
* The form model bound to the "Add Relationship" panel via two-way
|
|
562
|
+
* binding. Reset to defaults each time the add form is opened.
|
|
563
|
+
*/
|
|
564
|
+
AddForm = this.createEmptyAddForm();
|
|
565
|
+
/**
|
|
566
|
+
* The form model bound to the inline edit panel via two-way binding.
|
|
567
|
+
* Populated from the existing relationship record when editing begins.
|
|
568
|
+
*/
|
|
569
|
+
EditForm = this.createEmptyEditForm();
|
|
570
|
+
/**
|
|
571
|
+
* Search results from the target entity typeahead, displayed as a
|
|
572
|
+
* dropdown below the search input in the add form.
|
|
573
|
+
*/
|
|
574
|
+
TargetSearchResults = [];
|
|
575
|
+
/** Lookup map from RelationshipType ID to entity for quick access. */
|
|
576
|
+
relationshipTypeMap = new Map();
|
|
577
|
+
/** Handle for the debounce timer used in target search. */
|
|
578
|
+
searchDebounceTimer = null;
|
|
579
|
+
/** Creates a blank {@link AddFormData} with empty defaults. */
|
|
580
|
+
createEmptyAddForm() {
|
|
581
|
+
return { TypeID: '', TargetSearch: '', TargetID: '', TargetName: '', Title: '', StartDate: '', EndDate: '' };
|
|
582
|
+
}
|
|
583
|
+
/** Creates a blank {@link EditFormData} with default status of Active. */
|
|
584
|
+
createEmptyEditForm() {
|
|
585
|
+
return { TypeID: '', Title: '', StartDate: '', EndDate: '', Status: 'Active' };
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Loads relationships and relationship types from the server,
|
|
589
|
+
* then groups them by category. Resets editing state before loading.
|
|
590
|
+
*/
|
|
591
|
+
async loadData() {
|
|
592
|
+
this.Loading = true;
|
|
593
|
+
this.EditingId = null;
|
|
594
|
+
this.ShowAddForm = false;
|
|
595
|
+
this.cdr.detectChanges();
|
|
596
|
+
try {
|
|
597
|
+
const rv = new RunView();
|
|
598
|
+
// Build filter for relationships
|
|
599
|
+
let filter = '';
|
|
600
|
+
if (this._personID) {
|
|
601
|
+
filter = `FromPersonID='${this._personID}' OR ToPersonID='${this._personID}'`;
|
|
602
|
+
}
|
|
603
|
+
else if (this._organizationID) {
|
|
604
|
+
filter = `FromOrganizationID='${this._organizationID}' OR ToOrganizationID='${this._organizationID}'`;
|
|
605
|
+
}
|
|
606
|
+
else {
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
const [relsResult, typesResult] = await rv.RunViews([
|
|
610
|
+
{
|
|
611
|
+
EntityName: 'MJ.BizApps.Common: Relationships',
|
|
612
|
+
ExtraFilter: filter,
|
|
613
|
+
OrderBy: 'Status ASC, StartDate DESC',
|
|
614
|
+
ResultType: 'entity_object'
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
EntityName: 'MJ.BizApps.Common: Relationship Types',
|
|
618
|
+
ExtraFilter: 'IsActive=1',
|
|
619
|
+
ResultType: 'entity_object'
|
|
620
|
+
}
|
|
621
|
+
]);
|
|
622
|
+
const relationships = relsResult.Success
|
|
623
|
+
? relsResult.Results
|
|
624
|
+
: [];
|
|
625
|
+
this.RelationshipTypes = typesResult.Success
|
|
626
|
+
? typesResult.Results
|
|
627
|
+
: [];
|
|
628
|
+
// Build type lookup map
|
|
629
|
+
this.relationshipTypeMap.clear();
|
|
630
|
+
for (const rt of this.RelationshipTypes) {
|
|
631
|
+
this.relationshipTypeMap.set(rt.ID, rt);
|
|
632
|
+
}
|
|
633
|
+
// Group relationships by category
|
|
634
|
+
this.GroupedRelationships = this.buildGroups(relationships);
|
|
635
|
+
}
|
|
636
|
+
catch (err) {
|
|
637
|
+
console.error('RelationshipList: Error loading data', err);
|
|
638
|
+
}
|
|
639
|
+
finally {
|
|
640
|
+
this.Loading = false;
|
|
641
|
+
this.cdr.detectChanges();
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
/** Organizes relationships into category groups with display-friendly items. */
|
|
645
|
+
buildGroups(relationships) {
|
|
646
|
+
const groupMap = new Map();
|
|
647
|
+
for (const rel of relationships) {
|
|
648
|
+
const relType = this.relationshipTypeMap.get(rel.RelationshipTypeID);
|
|
649
|
+
if (!relType)
|
|
650
|
+
continue;
|
|
651
|
+
const category = relType.Category;
|
|
652
|
+
if (!groupMap.has(category)) {
|
|
653
|
+
const config = CATEGORY_CONFIG[category] || { label: category, icon: 'fa-solid fa-link', iconClass: 'cat-default' };
|
|
654
|
+
groupMap.set(category, {
|
|
655
|
+
Category: category,
|
|
656
|
+
Label: config.label,
|
|
657
|
+
Icon: config.icon,
|
|
658
|
+
IconClass: config.iconClass,
|
|
659
|
+
Items: []
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
const displayItem = this.buildDisplayItem(rel, relType);
|
|
663
|
+
groupMap.get(category).Items.push(displayItem);
|
|
664
|
+
}
|
|
665
|
+
// Sort groups by a fixed order
|
|
666
|
+
const order = ['PersonToOrganization', 'OrganizationToOrganization', 'PersonToPerson'];
|
|
667
|
+
return order
|
|
668
|
+
.filter(cat => groupMap.has(cat))
|
|
669
|
+
.map(cat => groupMap.get(cat));
|
|
670
|
+
}
|
|
671
|
+
/** Constructs a display item from a relationship and its type, resolving direction. */
|
|
672
|
+
buildDisplayItem(rel, relType) {
|
|
673
|
+
// Determine direction: is the current entity on the "From" or "To" side?
|
|
674
|
+
const isFromSide = this.isCurrentEntityOnFromSide(rel);
|
|
675
|
+
let directionLabel;
|
|
676
|
+
let targetName;
|
|
677
|
+
let targetEntityName;
|
|
678
|
+
let targetID;
|
|
679
|
+
if (!relType.IsDirectional) {
|
|
680
|
+
// Symmetric relationship (e.g., Spouse) -- always use ForwardLabel
|
|
681
|
+
directionLabel = relType.ForwardLabel || relType.Name;
|
|
682
|
+
targetName = this.getOtherSideName(rel, isFromSide);
|
|
683
|
+
const target = this.getOtherSideTarget(rel, isFromSide);
|
|
684
|
+
targetEntityName = target.entityName;
|
|
685
|
+
targetID = target.id;
|
|
686
|
+
}
|
|
687
|
+
else if (isFromSide) {
|
|
688
|
+
// Current entity is "From" -> use ForwardLabel, show "To" target
|
|
689
|
+
directionLabel = relType.ForwardLabel || relType.Name;
|
|
690
|
+
targetName = this.getToSideName(rel);
|
|
691
|
+
const target = this.getToSideTarget(rel);
|
|
692
|
+
targetEntityName = target.entityName;
|
|
693
|
+
targetID = target.id;
|
|
694
|
+
}
|
|
695
|
+
else {
|
|
696
|
+
// Current entity is "To" -> use ReverseLabel, show "From" target
|
|
697
|
+
directionLabel = relType.ReverseLabel || relType.Name;
|
|
698
|
+
targetName = this.getFromSideName(rel);
|
|
699
|
+
const target = this.getFromSideTarget(rel);
|
|
700
|
+
targetEntityName = target.entityName;
|
|
701
|
+
targetID = target.id;
|
|
702
|
+
}
|
|
703
|
+
return {
|
|
704
|
+
Relationship: rel,
|
|
705
|
+
DirectionLabel: directionLabel + ' ',
|
|
706
|
+
TargetName: targetName,
|
|
707
|
+
TargetEntityName: targetEntityName,
|
|
708
|
+
TargetID: targetID,
|
|
709
|
+
DateDisplay: this.formatDateRange(rel.StartDate, rel.EndDate, rel.Status)
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
/** Checks whether the current entity (Person or Org) is on the "From" side. */
|
|
713
|
+
isCurrentEntityOnFromSide(rel) {
|
|
714
|
+
if (this._personID) {
|
|
715
|
+
return rel.FromPersonID === this._personID;
|
|
716
|
+
}
|
|
717
|
+
if (this._organizationID) {
|
|
718
|
+
return rel.FromOrganizationID === this._organizationID;
|
|
719
|
+
}
|
|
720
|
+
return true;
|
|
721
|
+
}
|
|
722
|
+
/** Returns the display name of the "To" side entity. */
|
|
723
|
+
getToSideName(rel) {
|
|
724
|
+
return rel.ToPerson || rel.ToOrganization || 'Unknown';
|
|
725
|
+
}
|
|
726
|
+
/** Returns the display name of the "From" side entity. */
|
|
727
|
+
getFromSideName(rel) {
|
|
728
|
+
return rel.FromPerson || rel.FromOrganization || 'Unknown';
|
|
729
|
+
}
|
|
730
|
+
/** Returns the display name of whichever side is NOT the current entity. */
|
|
731
|
+
getOtherSideName(rel, isFromSide) {
|
|
732
|
+
return isFromSide ? this.getToSideName(rel) : this.getFromSideName(rel);
|
|
733
|
+
}
|
|
734
|
+
/** Returns the entity name and ID for the "To" side. */
|
|
735
|
+
getToSideTarget(rel) {
|
|
736
|
+
if (rel.ToPersonID)
|
|
737
|
+
return { entityName: 'MJ.BizApps.Common: People', id: rel.ToPersonID };
|
|
738
|
+
if (rel.ToOrganizationID)
|
|
739
|
+
return { entityName: 'MJ.BizApps.Common: Organizations', id: rel.ToOrganizationID };
|
|
740
|
+
return { entityName: '', id: '' };
|
|
741
|
+
}
|
|
742
|
+
/** Returns the entity name and ID for the "From" side. */
|
|
743
|
+
getFromSideTarget(rel) {
|
|
744
|
+
if (rel.FromPersonID)
|
|
745
|
+
return { entityName: 'MJ.BizApps.Common: People', id: rel.FromPersonID };
|
|
746
|
+
if (rel.FromOrganizationID)
|
|
747
|
+
return { entityName: 'MJ.BizApps.Common: Organizations', id: rel.FromOrganizationID };
|
|
748
|
+
return { entityName: '', id: '' };
|
|
749
|
+
}
|
|
750
|
+
/** Returns the entity name and ID for whichever side is NOT the current entity. */
|
|
751
|
+
getOtherSideTarget(rel, isFromSide) {
|
|
752
|
+
return isFromSide ? this.getToSideTarget(rel) : this.getFromSideTarget(rel);
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Emits a {@link Navigate} event to navigate to the target entity record
|
|
756
|
+
* of a relationship row.
|
|
757
|
+
*
|
|
758
|
+
* Supports Ctrl+Click / Cmd+Click to open in a new tab.
|
|
759
|
+
*
|
|
760
|
+
* @param item - The relationship display item whose target should be navigated to
|
|
761
|
+
* @param event - The mouse event, used to detect modifier keys for new-tab behavior
|
|
762
|
+
*
|
|
763
|
+
* @fires Navigate With a {@link RecordNavigationEvent} payload
|
|
764
|
+
*/
|
|
765
|
+
onNavigateToTarget(item, event) {
|
|
766
|
+
if (!item.TargetEntityName || !item.TargetID)
|
|
767
|
+
return;
|
|
768
|
+
event.stopPropagation();
|
|
769
|
+
const navEvent = {
|
|
770
|
+
Kind: 'record',
|
|
771
|
+
EntityName: item.TargetEntityName,
|
|
772
|
+
PrimaryKey: CompositeKey.FromKeyValuePair('ID', item.TargetID),
|
|
773
|
+
OpenInNewTab: event.ctrlKey || event.metaKey
|
|
774
|
+
};
|
|
775
|
+
this.Navigate.emit(navEvent);
|
|
776
|
+
}
|
|
777
|
+
/** Formats a date range into a compact display string. */
|
|
778
|
+
formatDateRange(start, end, status) {
|
|
779
|
+
if (!start && !end)
|
|
780
|
+
return '';
|
|
781
|
+
const formatDate = (d) => {
|
|
782
|
+
const date = new Date(d);
|
|
783
|
+
return date.toLocaleDateString('en-US', { month: 'short', year: 'numeric' });
|
|
784
|
+
};
|
|
785
|
+
const startStr = start ? formatDate(start) : '';
|
|
786
|
+
const endStr = end ? formatDate(end) : (status === 'Active' ? 'Present' : '');
|
|
787
|
+
if (startStr && endStr)
|
|
788
|
+
return `${startStr} - ${endStr}`;
|
|
789
|
+
if (startStr)
|
|
790
|
+
return `${startStr} -`;
|
|
791
|
+
return '';
|
|
792
|
+
}
|
|
793
|
+
// --- Add Form ---
|
|
794
|
+
/**
|
|
795
|
+
* Opens the "Add Relationship" form panel.
|
|
796
|
+
*
|
|
797
|
+
* Resets the add form to defaults, clears any previous search results,
|
|
798
|
+
* and closes any active inline edit.
|
|
799
|
+
*/
|
|
800
|
+
onShowAdd() {
|
|
801
|
+
this.AddForm = this.createEmptyAddForm();
|
|
802
|
+
this.TargetSearchResults = [];
|
|
803
|
+
this.ShowAddForm = true;
|
|
804
|
+
this.EditingId = null;
|
|
805
|
+
this.cdr.detectChanges();
|
|
806
|
+
}
|
|
807
|
+
/**
|
|
808
|
+
* Closes the "Add Relationship" form panel without saving, and clears
|
|
809
|
+
* the target search results.
|
|
810
|
+
*/
|
|
811
|
+
onCancelAdd() {
|
|
812
|
+
this.ShowAddForm = false;
|
|
813
|
+
this.TargetSearchResults = [];
|
|
814
|
+
this.cdr.detectChanges();
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Handles a change to the relationship type in the add form.
|
|
818
|
+
*
|
|
819
|
+
* Clears the currently selected target because the category (and
|
|
820
|
+
* therefore the target entity type) may have changed.
|
|
821
|
+
*/
|
|
822
|
+
onAddTypeChange() {
|
|
823
|
+
// Clear target when type changes (category may differ)
|
|
824
|
+
this.AddForm.TargetID = '';
|
|
825
|
+
this.AddForm.TargetName = '';
|
|
826
|
+
this.AddForm.TargetSearch = '';
|
|
827
|
+
this.TargetSearchResults = [];
|
|
828
|
+
this.cdr.detectChanges();
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Returns the category key of the currently selected relationship type
|
|
832
|
+
* in the add form (e.g., `'PersonToOrganization'`).
|
|
833
|
+
*
|
|
834
|
+
* @returns The category string, or `'--'` if no type is selected
|
|
835
|
+
*/
|
|
836
|
+
getAddCategory() {
|
|
837
|
+
if (!this.AddForm.TypeID)
|
|
838
|
+
return '—';
|
|
839
|
+
const rt = this.relationshipTypeMap.get(this.AddForm.TypeID);
|
|
840
|
+
return rt?.Category || '—';
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* Returns a user-facing label for the target entity search field based
|
|
844
|
+
* on the current add form's relationship category.
|
|
845
|
+
*
|
|
846
|
+
* @returns `'Organization'`, `'Person'`, or `'Target'` depending on category
|
|
847
|
+
*/
|
|
848
|
+
getAddTargetLabel() {
|
|
849
|
+
const category = this.getAddCategory();
|
|
850
|
+
if (category === 'PersonToOrganization')
|
|
851
|
+
return 'Organization';
|
|
852
|
+
if (category === 'OrganizationToOrganization')
|
|
853
|
+
return 'Organization';
|
|
854
|
+
if (category === 'PersonToPerson')
|
|
855
|
+
return 'Person';
|
|
856
|
+
return 'Target';
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* Debounces the target search input and triggers a server-side search
|
|
860
|
+
* after a 300ms pause in typing.
|
|
861
|
+
*
|
|
862
|
+
* Called on each keystroke in the target search field.
|
|
863
|
+
*/
|
|
864
|
+
onTargetSearch() {
|
|
865
|
+
if (this.searchDebounceTimer) {
|
|
866
|
+
clearTimeout(this.searchDebounceTimer);
|
|
867
|
+
}
|
|
868
|
+
this.searchDebounceTimer = setTimeout(() => {
|
|
869
|
+
this.performTargetSearch();
|
|
870
|
+
}, 300);
|
|
871
|
+
}
|
|
872
|
+
/** Executes the debounced target search against Person or Organization entities. */
|
|
873
|
+
async performTargetSearch() {
|
|
874
|
+
const query = this.AddForm.TargetSearch?.trim();
|
|
875
|
+
if (!query || query.length < 2) {
|
|
876
|
+
this.TargetSearchResults = [];
|
|
877
|
+
this.cdr.detectChanges();
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
880
|
+
const category = this.getAddCategory();
|
|
881
|
+
const escapedQuery = query.replace(/'/g, "''");
|
|
882
|
+
const rv = new RunView();
|
|
883
|
+
try {
|
|
884
|
+
if (category === 'PersonToPerson') {
|
|
885
|
+
const result = await rv.RunView({
|
|
886
|
+
EntityName: 'MJ.BizApps.Common: People',
|
|
887
|
+
ExtraFilter: `(FirstName LIKE '%${escapedQuery}%' OR LastName LIKE '%${escapedQuery}%' OR DisplayName LIKE '%${escapedQuery}%')`,
|
|
888
|
+
MaxRows: 10,
|
|
889
|
+
ResultType: 'entity_object'
|
|
890
|
+
});
|
|
891
|
+
this.TargetSearchResults = result.Success
|
|
892
|
+
? result.Results.map(p => ({
|
|
893
|
+
ID: p.ID,
|
|
894
|
+
Name: p.DisplayName || `${p.FirstName} ${p.LastName}`,
|
|
895
|
+
Detail: p.Title || ''
|
|
896
|
+
}))
|
|
897
|
+
: [];
|
|
898
|
+
}
|
|
899
|
+
else {
|
|
900
|
+
const result = await rv.RunView({
|
|
901
|
+
EntityName: 'MJ.BizApps.Common: Organizations',
|
|
902
|
+
ExtraFilter: `Name LIKE '%${escapedQuery}%'`,
|
|
903
|
+
MaxRows: 10,
|
|
904
|
+
ResultType: 'entity_object'
|
|
905
|
+
});
|
|
906
|
+
this.TargetSearchResults = result.Success
|
|
907
|
+
? result.Results.map(o => ({
|
|
908
|
+
ID: o.ID,
|
|
909
|
+
Name: o.Name,
|
|
910
|
+
Detail: o.OrganizationType || ''
|
|
911
|
+
}))
|
|
912
|
+
: [];
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
catch (err) {
|
|
916
|
+
console.error('RelationshipList: Search error', err);
|
|
917
|
+
this.TargetSearchResults = [];
|
|
918
|
+
}
|
|
919
|
+
this.cdr.detectChanges();
|
|
920
|
+
}
|
|
921
|
+
/**
|
|
922
|
+
* Selects a target entity from the search results dropdown, populating
|
|
923
|
+
* the add form's target fields and clearing the search input.
|
|
924
|
+
*
|
|
925
|
+
* @param result - The selected search result to use as the relationship target
|
|
926
|
+
*/
|
|
927
|
+
onSelectTarget(result) {
|
|
928
|
+
this.AddForm.TargetID = result.ID;
|
|
929
|
+
this.AddForm.TargetName = result.Name;
|
|
930
|
+
this.AddForm.TargetSearch = '';
|
|
931
|
+
this.TargetSearchResults = [];
|
|
932
|
+
this.cdr.detectChanges();
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Clears the currently selected target entity from the add form,
|
|
936
|
+
* allowing the user to search for a different target.
|
|
937
|
+
*/
|
|
938
|
+
onClearTarget() {
|
|
939
|
+
this.AddForm.TargetID = '';
|
|
940
|
+
this.AddForm.TargetName = '';
|
|
941
|
+
this.cdr.detectChanges();
|
|
942
|
+
}
|
|
943
|
+
/**
|
|
944
|
+
* Persists the new relationship from the add form.
|
|
945
|
+
*
|
|
946
|
+
* Determines which From/To fields to populate based on the current
|
|
947
|
+
* entity type (Person or Organization) and the relationship category.
|
|
948
|
+
* After saving, the relationship list is reloaded.
|
|
949
|
+
*/
|
|
950
|
+
async onSaveAdd() {
|
|
951
|
+
if (!this.AddForm.TypeID || !this.AddForm.TargetID)
|
|
952
|
+
return;
|
|
953
|
+
this.Saving = true;
|
|
954
|
+
this.cdr.detectChanges();
|
|
955
|
+
try {
|
|
956
|
+
const md = new Metadata();
|
|
957
|
+
const rel = await md.GetEntityObject('MJ.BizApps.Common: Relationships');
|
|
958
|
+
rel.NewRecord();
|
|
959
|
+
rel.RelationshipTypeID = this.AddForm.TypeID;
|
|
960
|
+
rel.Title = this.AddForm.Title || null;
|
|
961
|
+
rel.Status = 'Active';
|
|
962
|
+
if (this.AddForm.StartDate) {
|
|
963
|
+
rel.StartDate = new Date(this.AddForm.StartDate);
|
|
964
|
+
}
|
|
965
|
+
if (this.AddForm.EndDate) {
|
|
966
|
+
rel.EndDate = new Date(this.AddForm.EndDate);
|
|
967
|
+
}
|
|
968
|
+
// Set From/To based on which side we're on and category
|
|
969
|
+
const rt = this.relationshipTypeMap.get(this.AddForm.TypeID);
|
|
970
|
+
if (!rt)
|
|
971
|
+
return;
|
|
972
|
+
if (this._personID) {
|
|
973
|
+
rel.FromPersonID = this._personID;
|
|
974
|
+
if (rt.Category === 'PersonToOrganization') {
|
|
975
|
+
rel.ToOrganizationID = this.AddForm.TargetID;
|
|
976
|
+
}
|
|
977
|
+
else if (rt.Category === 'PersonToPerson') {
|
|
978
|
+
rel.ToPersonID = this.AddForm.TargetID;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
else if (this._organizationID) {
|
|
982
|
+
rel.FromOrganizationID = this._organizationID;
|
|
983
|
+
rel.ToOrganizationID = this.AddForm.TargetID;
|
|
984
|
+
}
|
|
985
|
+
await rel.Save();
|
|
986
|
+
await this.loadData();
|
|
987
|
+
this.DataChanged.emit();
|
|
988
|
+
}
|
|
989
|
+
catch (err) {
|
|
990
|
+
console.error('RelationshipList: Error adding relationship', err);
|
|
991
|
+
}
|
|
992
|
+
finally {
|
|
993
|
+
this.Saving = false;
|
|
994
|
+
this.cdr.detectChanges();
|
|
995
|
+
}
|
|
996
|
+
}
|
|
997
|
+
// --- Edit ---
|
|
998
|
+
/**
|
|
999
|
+
* Opens the inline edit form for an existing relationship, populating
|
|
1000
|
+
* the form fields from the current entity data.
|
|
1001
|
+
*
|
|
1002
|
+
* Closes the add form if it is currently open.
|
|
1003
|
+
*
|
|
1004
|
+
* @param rel - The relationship entity to edit
|
|
1005
|
+
*/
|
|
1006
|
+
onEdit(rel) {
|
|
1007
|
+
this.EditForm = {
|
|
1008
|
+
TypeID: rel.RelationshipTypeID,
|
|
1009
|
+
Title: rel.Title || '',
|
|
1010
|
+
StartDate: rel.StartDate ? this.formatDateForInput(rel.StartDate) : '',
|
|
1011
|
+
EndDate: rel.EndDate ? this.formatDateForInput(rel.EndDate) : '',
|
|
1012
|
+
Status: rel.Status
|
|
1013
|
+
};
|
|
1014
|
+
this.EditingId = rel.ID;
|
|
1015
|
+
this.ShowAddForm = false;
|
|
1016
|
+
this.cdr.detectChanges();
|
|
1017
|
+
}
|
|
1018
|
+
/**
|
|
1019
|
+
* Cancels the current edit operation and returns to display mode.
|
|
1020
|
+
*/
|
|
1021
|
+
onCancelEdit() {
|
|
1022
|
+
this.EditingId = null;
|
|
1023
|
+
this.cdr.detectChanges();
|
|
1024
|
+
}
|
|
1025
|
+
/**
|
|
1026
|
+
* Handles a change to the relationship type in the edit form.
|
|
1027
|
+
*
|
|
1028
|
+
* Triggers change detection so the category display updates.
|
|
1029
|
+
*/
|
|
1030
|
+
onEditTypeChange() {
|
|
1031
|
+
this.cdr.detectChanges();
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Returns the category key of the currently selected relationship type
|
|
1035
|
+
* in the edit form (e.g., `'PersonToOrganization'`).
|
|
1036
|
+
*
|
|
1037
|
+
* @returns The category string, or `'--'` if no type is selected
|
|
1038
|
+
*/
|
|
1039
|
+
getEditCategory() {
|
|
1040
|
+
if (!this.EditForm.TypeID)
|
|
1041
|
+
return '—';
|
|
1042
|
+
const rt = this.relationshipTypeMap.get(this.EditForm.TypeID);
|
|
1043
|
+
return rt?.Category || '—';
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* Persists the edited relationship from the inline edit form.
|
|
1047
|
+
*
|
|
1048
|
+
* Locates the relationship entity within the grouped data, applies
|
|
1049
|
+
* the form values, saves, and reloads the list.
|
|
1050
|
+
*/
|
|
1051
|
+
async onSaveEdit() {
|
|
1052
|
+
if (!this.EditingId)
|
|
1053
|
+
return;
|
|
1054
|
+
this.Saving = true;
|
|
1055
|
+
this.cdr.detectChanges();
|
|
1056
|
+
try {
|
|
1057
|
+
// Find the relationship entity in our loaded data
|
|
1058
|
+
let rel;
|
|
1059
|
+
for (const group of this.GroupedRelationships) {
|
|
1060
|
+
const found = group.Items.find(i => i.Relationship.ID === this.EditingId);
|
|
1061
|
+
if (found) {
|
|
1062
|
+
rel = found.Relationship;
|
|
1063
|
+
break;
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
if (!rel)
|
|
1067
|
+
return;
|
|
1068
|
+
rel.RelationshipTypeID = this.EditForm.TypeID;
|
|
1069
|
+
rel.Title = this.EditForm.Title || null;
|
|
1070
|
+
rel.Status = this.EditForm.Status;
|
|
1071
|
+
rel.StartDate = this.EditForm.StartDate ? new Date(this.EditForm.StartDate) : null;
|
|
1072
|
+
rel.EndDate = this.EditForm.EndDate ? new Date(this.EditForm.EndDate) : null;
|
|
1073
|
+
await rel.Save();
|
|
1074
|
+
await this.loadData();
|
|
1075
|
+
this.DataChanged.emit();
|
|
1076
|
+
}
|
|
1077
|
+
catch (err) {
|
|
1078
|
+
console.error('RelationshipList: Error saving edit', err);
|
|
1079
|
+
}
|
|
1080
|
+
finally {
|
|
1081
|
+
this.Saving = false;
|
|
1082
|
+
this.cdr.detectChanges();
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Ends an active relationship by setting its status to `'Ended'` and
|
|
1087
|
+
* its end date to today. After saving, the relationship list is reloaded.
|
|
1088
|
+
*
|
|
1089
|
+
* @param rel - The active relationship entity to end
|
|
1090
|
+
*/
|
|
1091
|
+
async onEndRelationship(rel) {
|
|
1092
|
+
this.Saving = true;
|
|
1093
|
+
this.cdr.detectChanges();
|
|
1094
|
+
try {
|
|
1095
|
+
rel.Status = 'Ended';
|
|
1096
|
+
rel.EndDate = new Date();
|
|
1097
|
+
await rel.Save();
|
|
1098
|
+
await this.loadData();
|
|
1099
|
+
this.DataChanged.emit();
|
|
1100
|
+
}
|
|
1101
|
+
catch (err) {
|
|
1102
|
+
console.error('RelationshipList: Error ending relationship', err);
|
|
1103
|
+
}
|
|
1104
|
+
finally {
|
|
1105
|
+
this.Saving = false;
|
|
1106
|
+
this.cdr.detectChanges();
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
/**
|
|
1110
|
+
* Permanently deletes the given relationship record.
|
|
1111
|
+
*
|
|
1112
|
+
* After deletion, the relationship list is reloaded.
|
|
1113
|
+
*
|
|
1114
|
+
* @param rel - The relationship entity to delete
|
|
1115
|
+
*/
|
|
1116
|
+
async onDelete(rel) {
|
|
1117
|
+
this.Saving = true;
|
|
1118
|
+
this.cdr.detectChanges();
|
|
1119
|
+
try {
|
|
1120
|
+
await rel.Delete();
|
|
1121
|
+
await this.loadData();
|
|
1122
|
+
this.DataChanged.emit();
|
|
1123
|
+
}
|
|
1124
|
+
catch (err) {
|
|
1125
|
+
console.error('RelationshipList: Error deleting relationship', err);
|
|
1126
|
+
}
|
|
1127
|
+
finally {
|
|
1128
|
+
this.Saving = false;
|
|
1129
|
+
this.cdr.detectChanges();
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
/** Converts a Date to an ISO date string (`YYYY-MM-DD`) for HTML date inputs. */
|
|
1133
|
+
formatDateForInput(date) {
|
|
1134
|
+
const d = new Date(date);
|
|
1135
|
+
const year = d.getFullYear();
|
|
1136
|
+
const month = String(d.getMonth() + 1).padStart(2, '0');
|
|
1137
|
+
const day = String(d.getDate()).padStart(2, '0');
|
|
1138
|
+
return `${year}-${month}-${day}`;
|
|
1139
|
+
}
|
|
1140
|
+
static ɵfac = function RelationshipListComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RelationshipListComponent)(); };
|
|
1141
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RelationshipListComponent, selectors: [["bizapps-relationship-list"]], inputs: { EditMode: "EditMode", PersonID: "PersonID", OrganizationID: "OrganizationID" }, outputs: { Navigate: "Navigate", DataChanged: "DataChanged" }, decls: 7, vars: 2, consts: [[1, "section-header"], [1, "section-label"], [1, "fa-solid", "fa-diagram-project"], [1, "btn", "btn-outline"], [1, "loading-state"], [1, "btn", "btn-outline", 3, "click"], [1, "fa-solid", "fa-plus"], [1, "fa-solid", "fa-spinner"], [1, "empty-state"], [1, "rel-category"], [1, "rel-add-form"], [1, "rel-category-header"], [1, "rel-category-icon", 3, "ngClass"], [1, "rel-category-title"], [1, "rel-category-count"], [1, "rel-add-form", 2, "margin-bottom", "8px"], [1, "rel-timeline-item", 3, "ngClass"], [1, "rel-add-form-title"], [1, "fa-solid", "fa-pen"], [1, "form-row"], [1, "form-field", "type-field"], [3, "ngModelChange", "ngModel"], [3, "value"], [1, "form-field", "category-field"], [1, "category-display"], [1, "fa-solid", "fa-lock"], [1, "form-field"], ["type", "text", "placeholder", "e.g., CEO, Primary Contact", 3, "ngModelChange", "ngModel"], [1, "form-field", "date-field"], ["type", "date", 3, "ngModelChange", "ngModel"], ["value", "Active"], ["value", "Inactive"], ["value", "Ended"], [1, "form-actions"], [1, "btn", "btn-primary", 3, "click", "disabled"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "btn", "btn-cancel", 3, "click"], [1, "rel-timeline-icon"], [1, "rel-timeline-content"], [1, "rel-timeline-sentence"], [1, "rel-timeline-label"], ["href", "javascript:void(0)", 1, "rel-timeline-target"], [1, "rel-timeline-target"], [1, "rel-timeline-meta"], [1, "rel-timeline-title"], [1, "rel-timeline-dates"], [1, "badge", 3, "ngClass"], [1, "rel-timeline-actions"], ["href", "javascript:void(0)", 1, "rel-timeline-target", 3, "click"], [1, "fa-regular", "fa-calendar"], ["title", "Edit", 1, "btn-ghost", 3, "click"], ["title", "End Relationship", 1, "btn-ghost", "danger"], ["title", "Delete", 1, "btn-ghost", "danger"], ["title", "End Relationship", 1, "btn-ghost", "danger", 3, "click"], [1, "fa-solid", "fa-circle-xmark"], ["title", "Delete", 1, "btn-ghost", "danger", 3, "click"], [1, "fa-solid", "fa-trash"], ["value", ""], ["type", "text", 3, "ngModelChange", "input", "ngModel", "placeholder"], [2, "border", "1px solid #e0e0e0", "border-radius", "8px", "box-shadow", "0 4px 12px rgba(0,0,0,0.1)", "margin-top", "4px", "overflow", "hidden", "max-height", "200px", "overflow-y", "auto"], [2, "margin-top", "6px"], [2, "display", "flex", "align-items", "center", "gap", "10px", "padding", "10px 14px", "cursor", "pointer", "transition", "background 0.1s", 3, "background"], [2, "display", "flex", "align-items", "center", "gap", "10px", "padding", "10px 14px", "cursor", "pointer", "transition", "background 0.1s", 3, "click"], [2, "font-size", "14px", "font-weight", "500", "color", "#333"], [2, "font-size", "12px", "color", "#888"], [2, "display", "inline-flex", "align-items", "center", "gap", "6px", "padding", "4px 10px", "background", "#e3f2fd", "border-radius", "16px", "font-size", "13px", "color", "#1565c0", "font-weight", "500"], [2, "cursor", "pointer", "color", "#999", "font-size", "11px", 3, "click"], [1, "fa-solid", "fa-xmark"]], template: function RelationshipListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1142
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "span", 1);
|
|
1143
|
+
i0.ɵɵelement(2, "i", 2);
|
|
1144
|
+
i0.ɵɵtext(3, " Relationships ");
|
|
1145
|
+
i0.ɵɵelementEnd();
|
|
1146
|
+
i0.ɵɵconditionalCreate(4, RelationshipListComponent_Conditional_4_Template, 3, 0, "button", 3);
|
|
1147
|
+
i0.ɵɵelementEnd();
|
|
1148
|
+
i0.ɵɵconditionalCreate(5, RelationshipListComponent_Conditional_5_Template, 3, 0, "div", 4)(6, RelationshipListComponent_Conditional_6_Template, 4, 2);
|
|
1149
|
+
} if (rf & 2) {
|
|
1150
|
+
i0.ɵɵadvance(4);
|
|
1151
|
+
i0.ɵɵconditional(!ctx.Loading && ctx.EditMode ? 4 : -1);
|
|
1152
|
+
i0.ɵɵadvance();
|
|
1153
|
+
i0.ɵɵconditional(ctx.Loading ? 5 : 6);
|
|
1154
|
+
} }, dependencies: [CommonModule, i1.NgClass, FormsModule, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.DefaultValueAccessor, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.NgModel], styles: ["\n\n\n\n\n\n[_nghost-%COMP%] {\n display: block;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;\n color: #333;\n}\n\n.section-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n\n.section-label[_ngcontent-%COMP%] {\n font-size: 15px;\n font-weight: 600;\n color: #333;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.section-label[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #1976d2;\n}\n\n\n\n.rel-category[_ngcontent-%COMP%] {\n margin-bottom: 24px;\n}\n\n.rel-category[_ngcontent-%COMP%]:last-child {\n margin-bottom: 0;\n}\n\n.rel-category-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 0;\n margin-bottom: 12px;\n border-bottom: 2px solid #e8e8e8;\n}\n\n.rel-category-icon[_ngcontent-%COMP%] {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n font-size: 13px;\n}\n\n.rel-category-icon.cat-employment[_ngcontent-%COMP%] {\n background: #e3f2fd;\n color: #1565c0;\n}\n\n.rel-category-icon.cat-board[_ngcontent-%COMP%] {\n background: #f3e5f5;\n color: #7b1fa2;\n}\n\n.rel-category-icon.cat-personal[_ngcontent-%COMP%] {\n background: #fce4ec;\n color: #c62828;\n}\n\n.rel-category-icon.cat-business[_ngcontent-%COMP%] {\n background: #e8f5e9;\n color: #2e7d32;\n}\n\n.rel-category-icon.cat-default[_ngcontent-%COMP%] {\n background: #f5f5f5;\n color: #666;\n}\n\n.rel-category-title[_ngcontent-%COMP%] {\n font-size: 13px;\n font-weight: 600;\n color: #555;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n flex: 1;\n}\n\n.rel-category-count[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #999;\n}\n\n\n\n.rel-timeline-item[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n padding: 12px 16px;\n margin-bottom: 8px;\n border: 1px solid #e8e8e8;\n border-radius: 8px;\n transition: all 0.15s;\n position: relative;\n}\n\n.rel-timeline-item[_ngcontent-%COMP%]:hover {\n border-color: #d0d0d0;\n background: #fafafa;\n}\n\n.rel-timeline-item.status-active[_ngcontent-%COMP%] {\n border-left: 3px solid #4caf50;\n}\n\n.rel-timeline-item.status-inactive[_ngcontent-%COMP%] {\n border-left: 3px solid #ff9800;\n opacity: 0.7;\n}\n\n.rel-timeline-item.status-ended[_ngcontent-%COMP%] {\n border-left: 3px solid #bbb;\n opacity: 0.5;\n}\n\n\n\n.rel-timeline-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n background: #f0f4f8;\n color: #555;\n font-size: 16px;\n flex-shrink: 0;\n}\n\n\n\n.rel-timeline-content[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.rel-timeline-sentence[_ngcontent-%COMP%] {\n font-size: 14px;\n color: #333;\n line-height: 1.4;\n}\n\n.rel-timeline-label[_ngcontent-%COMP%] {\n font-weight: 600;\n color: #1976d2;\n}\n\na.rel-timeline-target[_ngcontent-%COMP%] {\n font-weight: 600;\n color: #1976d2;\n cursor: pointer;\n text-decoration: none;\n}\n\na.rel-timeline-target[_ngcontent-%COMP%]:hover {\n color: #1565c0;\n text-decoration: underline;\n}\n\nspan.rel-timeline-target[_ngcontent-%COMP%] {\n font-weight: 600;\n color: #333;\n}\n\n.rel-timeline-meta[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-top: 4px;\n font-size: 12px;\n color: #888;\n flex-wrap: wrap;\n}\n\n.rel-timeline-title[_ngcontent-%COMP%] {\n font-style: italic;\n color: #555;\n}\n\n.rel-timeline-dates[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n\n\n.rel-timeline-actions[_ngcontent-%COMP%] {\n position: absolute;\n top: 8px;\n right: 8px;\n display: flex;\n gap: 2px;\n opacity: 0;\n transition: opacity 0.15s;\n}\n\n.rel-timeline-item[_ngcontent-%COMP%]:hover .rel-timeline-actions[_ngcontent-%COMP%] {\n opacity: 1;\n}\n\n\n\n.badge[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 10px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.badge-active[_ngcontent-%COMP%] {\n background: #e8f5e9;\n color: #2e7d32;\n}\n\n.badge-inactive[_ngcontent-%COMP%] {\n background: #fff3e0;\n color: #e65100;\n}\n\n.badge-ended[_ngcontent-%COMP%] {\n background: #f5f5f5;\n color: #888;\n}\n\n\n\n.btn-ghost[_ngcontent-%COMP%] {\n background: transparent;\n color: #999;\n padding: 6px 8px;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 13px;\n transition: all 0.15s ease;\n}\n\n.btn-ghost[_ngcontent-%COMP%]:hover {\n color: #333;\n background: #f5f5f5;\n}\n\n.btn-ghost.danger[_ngcontent-%COMP%]:hover {\n color: #c62828;\n background: #ffebee;\n}\n\n\n\n.btn[_ngcontent-%COMP%] {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n border: none;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.btn-primary[_ngcontent-%COMP%] {\n background: #1976d2;\n color: white;\n}\n\n.btn-primary[_ngcontent-%COMP%]:hover {\n background: #1565c0;\n}\n\n.btn-outline[_ngcontent-%COMP%] {\n background: transparent;\n border: 1px dashed #ccc;\n color: #666;\n}\n\n.btn-outline[_ngcontent-%COMP%]:hover {\n border-color: #1976d2;\n color: #1976d2;\n background: #f5f9ff;\n}\n\n.btn-cancel[_ngcontent-%COMP%] {\n background: #f5f5f5;\n color: #666;\n border: 1px solid #e0e0e0;\n}\n\n.btn-cancel[_ngcontent-%COMP%]:hover {\n background: #eeeeee;\n}\n\n\n\n.rel-add-form[_ngcontent-%COMP%] {\n border: 2px solid #1976d2;\n border-radius: 10px;\n padding: 20px;\n background: white;\n margin-top: 16px;\n}\n\n.rel-add-form-title[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 600;\n color: #1976d2;\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.form-row[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n margin-bottom: 12px;\n}\n\n.form-field[_ngcontent-%COMP%] {\n flex: 1;\n}\n\n.form-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n display: block;\n font-size: 12px;\n font-weight: 600;\n color: #666;\n margin-bottom: 4px;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%], \n.form-field[_ngcontent-%COMP%] select[_ngcontent-%COMP%] {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e0e0e0;\n border-radius: 6px;\n font-size: 14px;\n font-family: inherit;\n background: white;\n}\n\n.form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, \n.form-field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus {\n outline: none;\n border-color: #1976d2;\n box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);\n}\n\n.form-field.type-field[_ngcontent-%COMP%] {\n max-width: 200px;\n}\n\n.form-field.category-field[_ngcontent-%COMP%] {\n max-width: 200px;\n}\n\n.form-field.date-field[_ngcontent-%COMP%] {\n max-width: 140px;\n}\n\n\n\n.category-display[_ngcontent-%COMP%] {\n padding: 8px 12px;\n background: #f5f5f5;\n border-radius: 6px;\n font-size: 13px;\n color: #666;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.category-display[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 11px;\n}\n\n.form-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n\n\n\n.empty-state[_ngcontent-%COMP%] {\n text-align: center;\n padding: 32px 16px;\n color: #888;\n font-size: 14px;\n}\n\n.empty-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 24px;\n color: #ccc;\n margin-bottom: 8px;\n display: block;\n}\n\n\n\n.loading-state[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 32px;\n color: #888;\n font-size: 13px;\n gap: 8px;\n}\n\n.loading-state[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n animation: _ngcontent-%COMP%_spin 1s linear infinite;\n}\n\n@keyframes _ngcontent-%COMP%_spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}"] });
|
|
1155
|
+
}
|
|
1156
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RelationshipListComponent, [{
|
|
1157
|
+
type: Component,
|
|
1158
|
+
args: [{ standalone: true, imports: [CommonModule, FormsModule], selector: 'bizapps-relationship-list', template: "<!-- RelationshipList - Grouped Timeline Design (Option A) -->\n\n<div class=\"section-header\">\n <span class=\"section-label\">\n <i class=\"fa-solid fa-diagram-project\"></i>\n Relationships\n </span>\n @if (!Loading && EditMode) {\n <button class=\"btn btn-outline\" (click)=\"onShowAdd()\">\n <i class=\"fa-solid fa-plus\"></i>\n Add Relationship\n </button>\n }\n</div>\n\n@if (Loading) {\n <div class=\"loading-state\">\n <i class=\"fa-solid fa-spinner\"></i> Loading relationships...\n </div>\n} @else {\n @if (GroupedRelationships.length === 0 && !ShowAddForm) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-diagram-project\"></i>\n No relationships yet\n </div>\n }\n\n @for (group of GroupedRelationships; track group.Category) {\n <div class=\"rel-category\">\n <div class=\"rel-category-header\">\n <div class=\"rel-category-icon\" [ngClass]=\"group.IconClass\">\n <i [class]=\"group.Icon\"></i>\n </div>\n <span class=\"rel-category-title\">{{ group.Label }}</span>\n <span class=\"rel-category-count\">{{ group.Items.length }} {{ group.Items.length === 1 ? 'relationship' : 'relationships' }}</span>\n </div>\n\n @for (item of group.Items; track item.Relationship.ID) {\n @if (EditingId === item.Relationship.ID) {\n <!-- Inline edit form -->\n <div class=\"rel-add-form\" style=\"margin-bottom: 8px;\">\n <div class=\"rel-add-form-title\">\n <i class=\"fa-solid fa-pen\"></i>\n Edit Relationship\n </div>\n <div class=\"form-row\">\n <div class=\"form-field type-field\">\n <label>Relationship Type</label>\n <select [(ngModel)]=\"EditForm.TypeID\" (ngModelChange)=\"onEditTypeChange()\">\n @for (t of RelationshipTypes; track t.ID) {\n <option [value]=\"t.ID\">{{ t.Name }}</option>\n }\n </select>\n </div>\n <div class=\"form-field category-field\">\n <label>Category</label>\n <div class=\"category-display\">\n <i class=\"fa-solid fa-lock\"></i>\n {{ getEditCategory() }}\n </div>\n </div>\n </div>\n <div class=\"form-row\">\n <div class=\"form-field\">\n <label>Title / Role</label>\n <input type=\"text\" [(ngModel)]=\"EditForm.Title\" placeholder=\"e.g., CEO, Primary Contact\">\n </div>\n <div class=\"form-field date-field\">\n <label>Start Date</label>\n <input type=\"date\" [(ngModel)]=\"EditForm.StartDate\">\n </div>\n <div class=\"form-field date-field\">\n <label>End Date</label>\n <input type=\"date\" [(ngModel)]=\"EditForm.EndDate\">\n </div>\n </div>\n <div class=\"form-row\">\n <div class=\"form-field\">\n <label>Status</label>\n <select [(ngModel)]=\"EditForm.Status\">\n <option value=\"Active\">Active</option>\n <option value=\"Inactive\">Inactive</option>\n <option value=\"Ended\">Ended</option>\n </select>\n </div>\n </div>\n <div class=\"form-actions\">\n <button class=\"btn btn-primary\" (click)=\"onSaveEdit()\" [disabled]=\"Saving\">\n @if (Saving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n Save\n </button>\n <button class=\"btn btn-cancel\" (click)=\"onCancelEdit()\">Cancel</button>\n </div>\n </div>\n } @else {\n <div class=\"rel-timeline-item\"\n [ngClass]=\"'status-' + item.Relationship.Status.toLowerCase()\">\n <div class=\"rel-timeline-icon\">\n <i [class]=\"group.Icon\"></i>\n </div>\n <div class=\"rel-timeline-content\">\n <div class=\"rel-timeline-sentence\">\n <span class=\"rel-timeline-label\">{{ item.DirectionLabel }}</span>\n @if (item.TargetEntityName && item.TargetID) {\n <a class=\"rel-timeline-target\" href=\"javascript:void(0)\"\n (click)=\"onNavigateToTarget(item, $event)\">{{ item.TargetName }}</a>\n } @else {\n <span class=\"rel-timeline-target\">{{ item.TargetName }}</span>\n }\n </div>\n <div class=\"rel-timeline-meta\">\n @if (item.Relationship.Title) {\n <span class=\"rel-timeline-title\">{{ item.Relationship.Title }}</span>\n }\n @if (item.DateDisplay) {\n <span class=\"rel-timeline-dates\">\n <i class=\"fa-regular fa-calendar\"></i> {{ item.DateDisplay }}\n </span>\n }\n <span class=\"badge\" [ngClass]=\"'badge-' + item.Relationship.Status.toLowerCase()\">\n {{ item.Relationship.Status }}\n </span>\n </div>\n </div>\n @if (EditMode) {\n <div class=\"rel-timeline-actions\">\n <button class=\"btn-ghost\" title=\"Edit\" (click)=\"onEdit(item.Relationship)\">\n <i class=\"fa-solid fa-pen\"></i>\n </button>\n @if (item.Relationship.Status === 'Active') {\n <button class=\"btn-ghost danger\" title=\"End Relationship\" (click)=\"onEndRelationship(item.Relationship)\">\n <i class=\"fa-solid fa-circle-xmark\"></i>\n </button>\n } @else {\n <button class=\"btn-ghost danger\" title=\"Delete\" (click)=\"onDelete(item.Relationship)\">\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n }\n </div>\n }\n </div>\n }\n }\n </div>\n }\n\n <!-- Add Relationship Form -->\n @if (ShowAddForm) {\n <div class=\"rel-add-form\">\n <div class=\"rel-add-form-title\">\n <i class=\"fa-solid fa-plus\"></i>\n Add Relationship\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-field type-field\">\n <label>Relationship Type</label>\n <select [(ngModel)]=\"AddForm.TypeID\" (ngModelChange)=\"onAddTypeChange()\">\n <option value=\"\">-- Select --</option>\n @for (t of RelationshipTypes; track t.ID) {\n <option [value]=\"t.ID\">{{ t.Name }}</option>\n }\n </select>\n </div>\n <div class=\"form-field category-field\">\n <label>Category</label>\n <div class=\"category-display\">\n <i class=\"fa-solid fa-lock\"></i>\n {{ getAddCategory() }}\n </div>\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-field\">\n <label>{{ getAddTargetLabel() }}</label>\n <input type=\"text\" [(ngModel)]=\"AddForm.TargetSearch\"\n [placeholder]=\"'Search ' + getAddTargetLabel().toLowerCase() + '...'\"\n (input)=\"onTargetSearch()\">\n <!-- Search results dropdown -->\n @if (TargetSearchResults.length > 0) {\n <div style=\"border: 1px solid #e0e0e0; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); margin-top: 4px; overflow: hidden; max-height: 200px; overflow-y: auto;\">\n @for (result of TargetSearchResults; track result.ID) {\n <div style=\"display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; transition: background 0.1s;\"\n [style.background]=\"AddForm.TargetID === result.ID ? '#e3f2fd' : ''\"\n (click)=\"onSelectTarget(result)\">\n <div>\n <div style=\"font-size: 14px; font-weight: 500; color: #333;\">{{ result.Name }}</div>\n @if (result.Detail) {\n <div style=\"font-size: 12px; color: #888;\">{{ result.Detail }}</div>\n }\n </div>\n </div>\n }\n </div>\n }\n @if (AddForm.TargetID && AddForm.TargetName) {\n <div style=\"margin-top: 6px;\">\n <span style=\"display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: #e3f2fd; border-radius: 16px; font-size: 13px; color: #1565c0; font-weight: 500;\">\n {{ AddForm.TargetName }}\n <span style=\"cursor: pointer; color: #999; font-size: 11px;\" (click)=\"onClearTarget()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </span>\n </span>\n </div>\n }\n </div>\n </div>\n\n <div class=\"form-row\">\n <div class=\"form-field\">\n <label>Title / Role</label>\n <input type=\"text\" [(ngModel)]=\"AddForm.Title\" placeholder=\"e.g., CEO, Primary Contact\">\n </div>\n <div class=\"form-field date-field\">\n <label>Start Date</label>\n <input type=\"date\" [(ngModel)]=\"AddForm.StartDate\">\n </div>\n <div class=\"form-field date-field\">\n <label>End Date</label>\n <input type=\"date\" [(ngModel)]=\"AddForm.EndDate\">\n </div>\n </div>\n\n <div class=\"form-actions\">\n <button class=\"btn btn-primary\" (click)=\"onSaveAdd()\" [disabled]=\"Saving || !AddForm.TypeID || !AddForm.TargetID\">\n @if (Saving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n Save\n </button>\n <button class=\"btn btn-cancel\" (click)=\"onCancelAdd()\">Cancel</button>\n </div>\n </div>\n }\n}\n", styles: ["/* ============================================\n RelationshipList - Grouped Timeline Design\n Pixel-perfect match to Option A mockup\n ============================================ */\n\n:host {\n display: block;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;\n color: #333;\n}\n\n.section-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n\n.section-label {\n font-size: 15px;\n font-weight: 600;\n color: #333;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.section-label i {\n color: #1976d2;\n}\n\n/* Category group */\n.rel-category {\n margin-bottom: 24px;\n}\n\n.rel-category:last-child {\n margin-bottom: 0;\n}\n\n.rel-category-header {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 0;\n margin-bottom: 12px;\n border-bottom: 2px solid #e8e8e8;\n}\n\n.rel-category-icon {\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n font-size: 13px;\n}\n\n.rel-category-icon.cat-employment {\n background: #e3f2fd;\n color: #1565c0;\n}\n\n.rel-category-icon.cat-board {\n background: #f3e5f5;\n color: #7b1fa2;\n}\n\n.rel-category-icon.cat-personal {\n background: #fce4ec;\n color: #c62828;\n}\n\n.rel-category-icon.cat-business {\n background: #e8f5e9;\n color: #2e7d32;\n}\n\n.rel-category-icon.cat-default {\n background: #f5f5f5;\n color: #666;\n}\n\n.rel-category-title {\n font-size: 13px;\n font-weight: 600;\n color: #555;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n flex: 1;\n}\n\n.rel-category-count {\n font-size: 12px;\n color: #999;\n}\n\n/* Timeline item */\n.rel-timeline-item {\n display: flex;\n gap: 12px;\n padding: 12px 16px;\n margin-bottom: 8px;\n border: 1px solid #e8e8e8;\n border-radius: 8px;\n transition: all 0.15s;\n position: relative;\n}\n\n.rel-timeline-item:hover {\n border-color: #d0d0d0;\n background: #fafafa;\n}\n\n.rel-timeline-item.status-active {\n border-left: 3px solid #4caf50;\n}\n\n.rel-timeline-item.status-inactive {\n border-left: 3px solid #ff9800;\n opacity: 0.7;\n}\n\n.rel-timeline-item.status-ended {\n border-left: 3px solid #bbb;\n opacity: 0.5;\n}\n\n/* Timeline icon */\n.rel-timeline-icon {\n width: 40px;\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n background: #f0f4f8;\n color: #555;\n font-size: 16px;\n flex-shrink: 0;\n}\n\n/* Content */\n.rel-timeline-content {\n flex: 1;\n}\n\n.rel-timeline-sentence {\n font-size: 14px;\n color: #333;\n line-height: 1.4;\n}\n\n.rel-timeline-label {\n font-weight: 600;\n color: #1976d2;\n}\n\na.rel-timeline-target {\n font-weight: 600;\n color: #1976d2;\n cursor: pointer;\n text-decoration: none;\n}\n\na.rel-timeline-target:hover {\n color: #1565c0;\n text-decoration: underline;\n}\n\nspan.rel-timeline-target {\n font-weight: 600;\n color: #333;\n}\n\n.rel-timeline-meta {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-top: 4px;\n font-size: 12px;\n color: #888;\n flex-wrap: wrap;\n}\n\n.rel-timeline-title {\n font-style: italic;\n color: #555;\n}\n\n.rel-timeline-dates {\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n/* Actions */\n.rel-timeline-actions {\n position: absolute;\n top: 8px;\n right: 8px;\n display: flex;\n gap: 2px;\n opacity: 0;\n transition: opacity 0.15s;\n}\n\n.rel-timeline-item:hover .rel-timeline-actions {\n opacity: 1;\n}\n\n/* Badges */\n.badge {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 10px;\n border-radius: 12px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.badge-active {\n background: #e8f5e9;\n color: #2e7d32;\n}\n\n.badge-inactive {\n background: #fff3e0;\n color: #e65100;\n}\n\n.badge-ended {\n background: #f5f5f5;\n color: #888;\n}\n\n/* Ghost buttons */\n.btn-ghost {\n background: transparent;\n color: #999;\n padding: 6px 8px;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n font-size: 13px;\n transition: all 0.15s ease;\n}\n\n.btn-ghost:hover {\n color: #333;\n background: #f5f5f5;\n}\n\n.btn-ghost.danger:hover {\n color: #c62828;\n background: #ffebee;\n}\n\n/* Buttons */\n.btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 8px 16px;\n border: none;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.btn-primary {\n background: #1976d2;\n color: white;\n}\n\n.btn-primary:hover {\n background: #1565c0;\n}\n\n.btn-outline {\n background: transparent;\n border: 1px dashed #ccc;\n color: #666;\n}\n\n.btn-outline:hover {\n border-color: #1976d2;\n color: #1976d2;\n background: #f5f9ff;\n}\n\n.btn-cancel {\n background: #f5f5f5;\n color: #666;\n border: 1px solid #e0e0e0;\n}\n\n.btn-cancel:hover {\n background: #eeeeee;\n}\n\n/* Add form */\n.rel-add-form {\n border: 2px solid #1976d2;\n border-radius: 10px;\n padding: 20px;\n background: white;\n margin-top: 16px;\n}\n\n.rel-add-form-title {\n font-size: 14px;\n font-weight: 600;\n color: #1976d2;\n margin-bottom: 16px;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.form-row {\n display: flex;\n gap: 12px;\n margin-bottom: 12px;\n}\n\n.form-field {\n flex: 1;\n}\n\n.form-field label {\n display: block;\n font-size: 12px;\n font-weight: 600;\n color: #666;\n margin-bottom: 4px;\n text-transform: uppercase;\n letter-spacing: 0.3px;\n}\n\n.form-field input,\n.form-field select {\n width: 100%;\n padding: 8px 12px;\n border: 1px solid #e0e0e0;\n border-radius: 6px;\n font-size: 14px;\n font-family: inherit;\n background: white;\n}\n\n.form-field input:focus,\n.form-field select:focus {\n outline: none;\n border-color: #1976d2;\n box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);\n}\n\n.form-field.type-field {\n max-width: 200px;\n}\n\n.form-field.category-field {\n max-width: 200px;\n}\n\n.form-field.date-field {\n max-width: 140px;\n}\n\n/* Category auto-fill display */\n.category-display {\n padding: 8px 12px;\n background: #f5f5f5;\n border-radius: 6px;\n font-size: 13px;\n color: #666;\n display: flex;\n align-items: center;\n gap: 4px;\n}\n\n.category-display i {\n font-size: 11px;\n}\n\n.form-actions {\n display: flex;\n gap: 8px;\n margin-top: 4px;\n}\n\n/* Empty state */\n.empty-state {\n text-align: center;\n padding: 32px 16px;\n color: #888;\n font-size: 14px;\n}\n\n.empty-state i {\n font-size: 24px;\n color: #ccc;\n margin-bottom: 8px;\n display: block;\n}\n\n/* Loading */\n.loading-state {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 32px;\n color: #888;\n font-size: 13px;\n gap: 8px;\n}\n\n.loading-state i {\n animation: spin 1s linear infinite;\n}\n\n@keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n"] }]
|
|
1159
|
+
}], null, { Navigate: [{
|
|
1160
|
+
type: Output
|
|
1161
|
+
}], EditMode: [{
|
|
1162
|
+
type: Input
|
|
1163
|
+
}], DataChanged: [{
|
|
1164
|
+
type: Output
|
|
1165
|
+
}], PersonID: [{
|
|
1166
|
+
type: Input
|
|
1167
|
+
}], OrganizationID: [{
|
|
1168
|
+
type: Input
|
|
1169
|
+
}] }); })();
|
|
1170
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RelationshipListComponent, { className: "RelationshipListComponent", filePath: "lib/components/relationship-list/relationship-list.component.ts", lineNumber: 188 }); })();
|
|
1171
|
+
//# sourceMappingURL=relationship-list.component.js.map
|