cloud-ide-core 2.0.3 → 2.0.5
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/fesm2022/cloud-ide-core-user-role-form.component-CjoX7xmg.mjs +353 -0
- package/fesm2022/cloud-ide-core-user-role-form.component-CjoX7xmg.mjs.map +1 -0
- package/fesm2022/cloud-ide-core-user-role-list.component-C6h9Zcyp.mjs +475 -0
- package/fesm2022/cloud-ide-core-user-role-list.component-C6h9Zcyp.mjs.map +1 -0
- package/fesm2022/cloud-ide-core-user-role.service-DNI0f0PM.mjs +124 -0
- package/fesm2022/cloud-ide-core-user-role.service-DNI0f0PM.mjs.map +1 -0
- package/fesm2022/cloud-ide-core.mjs +252 -113
- package/fesm2022/cloud-ide-core.mjs.map +1 -1
- package/index.d.ts +458 -9
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { authGuard } from 'cloud-ide-auth';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
3
|
import { Injectable, Component, inject, DestroyRef, viewChild, signal, computed, ViewChild } from '@angular/core';
|
|
3
4
|
import * as i1$1 from '@angular/common';
|
|
@@ -19,6 +20,7 @@ const coreRoutes = [
|
|
|
19
20
|
path: 'menu-management',
|
|
20
21
|
loadComponent: () => Promise.resolve().then(function () { return menuList_component; }).then(c => c.CideCoreMenuListComponent),
|
|
21
22
|
title: 'Menu Management',
|
|
23
|
+
canActivate: [authGuard],
|
|
22
24
|
data: {
|
|
23
25
|
reuseTab: true,
|
|
24
26
|
sypg_page_code: "core_menu_list"
|
|
@@ -27,6 +29,7 @@ const coreRoutes = [
|
|
|
27
29
|
path: 'department',
|
|
28
30
|
loadComponent: () => Promise.resolve().then(function () { return departmentList_component; }).then(c => c.CideCoreDepartmentListComponent),
|
|
29
31
|
title: 'Department Management',
|
|
32
|
+
canActivate: [authGuard],
|
|
30
33
|
data: {
|
|
31
34
|
reuseTab: true,
|
|
32
35
|
sypg_page_code: "core_department_list"
|
|
@@ -36,6 +39,7 @@ const coreRoutes = [
|
|
|
36
39
|
path: 'designation',
|
|
37
40
|
loadComponent: () => Promise.resolve().then(function () { return designationList_component; }).then(c => c.CideCoreDesignationListComponent),
|
|
38
41
|
title: 'Designation Management',
|
|
42
|
+
canActivate: [authGuard],
|
|
39
43
|
data: {
|
|
40
44
|
reuseTab: true,
|
|
41
45
|
sypg_page_code: "core_designation_list"
|
|
@@ -45,6 +49,7 @@ const coreRoutes = [
|
|
|
45
49
|
path: 'grade-level',
|
|
46
50
|
loadComponent: () => Promise.resolve().then(function () { return gradeLevelList_component; }).then(c => c.CideCoreGradeLevelListComponent),
|
|
47
51
|
title: 'Grade Level Management',
|
|
52
|
+
canActivate: [authGuard],
|
|
48
53
|
data: {
|
|
49
54
|
reuseTab: true,
|
|
50
55
|
sypg_page_code: "core_grade_level_list"
|
|
@@ -54,6 +59,7 @@ const coreRoutes = [
|
|
|
54
59
|
path: 'page',
|
|
55
60
|
loadComponent: () => Promise.resolve().then(function () { return pageList_component; }).then(c => c.CideCorePageListComponent),
|
|
56
61
|
title: 'Page Management',
|
|
62
|
+
canActivate: [authGuard],
|
|
57
63
|
data: {
|
|
58
64
|
reuseTab: true,
|
|
59
65
|
sypg_page_code: "core_page_management"
|
|
@@ -63,6 +69,7 @@ const coreRoutes = [
|
|
|
63
69
|
path: 'page-form',
|
|
64
70
|
loadComponent: () => import('./cloud-ide-core-page-form.component-DzBvQ1kV.mjs').then(c => c.CideCorePageFormComponent),
|
|
65
71
|
title: 'Page Form',
|
|
72
|
+
canActivate: [authGuard],
|
|
66
73
|
data: {
|
|
67
74
|
reuseTab: true,
|
|
68
75
|
sypg_page_code: "core_page_management"
|
|
@@ -72,6 +79,7 @@ const coreRoutes = [
|
|
|
72
79
|
path: 'page-form/:query',
|
|
73
80
|
loadComponent: () => import('./cloud-ide-core-page-form.component-DzBvQ1kV.mjs').then(c => c.CideCorePageFormComponent),
|
|
74
81
|
title: 'Page Form',
|
|
82
|
+
canActivate: [authGuard],
|
|
75
83
|
data: {
|
|
76
84
|
reuseTab: true,
|
|
77
85
|
sypg_page_code: "core_page_management"
|
|
@@ -81,6 +89,7 @@ const coreRoutes = [
|
|
|
81
89
|
path: 'page-theme',
|
|
82
90
|
loadComponent: () => Promise.resolve().then(function () { return pageTheme_component; }).then(c => c.CideCorePageThemeComponent),
|
|
83
91
|
title: 'Page Theme Management',
|
|
92
|
+
canActivate: [authGuard],
|
|
84
93
|
data: {
|
|
85
94
|
reuseTab: true,
|
|
86
95
|
sypg_page_code: "core_page_theme"
|
|
@@ -90,6 +99,7 @@ const coreRoutes = [
|
|
|
90
99
|
path: 'page-theme/:query',
|
|
91
100
|
loadComponent: () => Promise.resolve().then(function () { return pageTheme_component; }).then(c => c.CideCorePageThemeComponent),
|
|
92
101
|
title: 'Page Theme Management',
|
|
102
|
+
canActivate: [authGuard],
|
|
93
103
|
data: {
|
|
94
104
|
reuseTab: true,
|
|
95
105
|
sypg_page_code: "core_page_theme"
|
|
@@ -99,6 +109,7 @@ const coreRoutes = [
|
|
|
99
109
|
path: 'page-controls',
|
|
100
110
|
loadComponent: () => Promise.resolve().then(function () { return pageControls_component; }).then(c => c.CideCorePageControlsComponent),
|
|
101
111
|
title: 'Page Controls Management',
|
|
112
|
+
canActivate: [authGuard],
|
|
102
113
|
data: {
|
|
103
114
|
reuseTab: true,
|
|
104
115
|
sypg_page_code: "core_page_controls"
|
|
@@ -108,6 +119,7 @@ const coreRoutes = [
|
|
|
108
119
|
path: 'page-controls/:query',
|
|
109
120
|
loadComponent: () => Promise.resolve().then(function () { return pageControls_component; }).then(c => c.CideCorePageControlsComponent),
|
|
110
121
|
title: 'Page Controls Management',
|
|
122
|
+
canActivate: [authGuard],
|
|
111
123
|
data: {
|
|
112
124
|
reuseTab: true,
|
|
113
125
|
sypg_page_code: "core_page_controls"
|
|
@@ -117,6 +129,7 @@ const coreRoutes = [
|
|
|
117
129
|
path: 'general_master_entry',
|
|
118
130
|
loadComponent: () => Promise.resolve().then(function () { return generalMaster_component; }).then(c => c.CideCoreGeneralMasterComponent),
|
|
119
131
|
title: 'General Master Entry',
|
|
132
|
+
canActivate: [authGuard],
|
|
120
133
|
data: {
|
|
121
134
|
reuseTab: true,
|
|
122
135
|
sypg_page_code: "core_general_master"
|
|
@@ -126,6 +139,7 @@ const coreRoutes = [
|
|
|
126
139
|
path: 'general_master_entry/:query',
|
|
127
140
|
loadComponent: () => Promise.resolve().then(function () { return generalMaster_component; }).then(c => c.CideCoreGeneralMasterComponent),
|
|
128
141
|
title: 'General Master Entry',
|
|
142
|
+
canActivate: [authGuard],
|
|
129
143
|
data: {
|
|
130
144
|
reuseTab: true,
|
|
131
145
|
sypg_page_code: "core_general_master"
|
|
@@ -135,6 +149,7 @@ const coreRoutes = [
|
|
|
135
149
|
path: 'general_type_entry',
|
|
136
150
|
loadComponent: () => Promise.resolve().then(function () { return generalMasterType_component; }).then(c => c.CideCoreGeneralMasterTypeComponent),
|
|
137
151
|
title: 'General Type Entry',
|
|
152
|
+
canActivate: [authGuard],
|
|
138
153
|
data: {
|
|
139
154
|
reuseTab: true,
|
|
140
155
|
sypg_page_code: "core_general_master_type"
|
|
@@ -144,6 +159,7 @@ const coreRoutes = [
|
|
|
144
159
|
path: 'general_type_entry/:query',
|
|
145
160
|
loadComponent: () => Promise.resolve().then(function () { return generalMasterType_component; }).then(c => c.CideCoreGeneralMasterTypeComponent),
|
|
146
161
|
title: 'General Type Entry',
|
|
162
|
+
canActivate: [authGuard],
|
|
147
163
|
data: {
|
|
148
164
|
reuseTab: true,
|
|
149
165
|
sypg_page_code: "core_general_master_type"
|
|
@@ -154,6 +170,7 @@ const coreRoutes = [
|
|
|
154
170
|
path: 'user-master',
|
|
155
171
|
loadComponent: () => Promise.resolve().then(function () { return userList_component; }).then(c => c.CideCoreUserListComponent),
|
|
156
172
|
title: 'User Management',
|
|
173
|
+
canActivate: [authGuard],
|
|
157
174
|
data: {
|
|
158
175
|
reuseTab: true,
|
|
159
176
|
sypg_page_code: "auth_user_mst"
|
|
@@ -163,6 +180,7 @@ const coreRoutes = [
|
|
|
163
180
|
path: 'user-master/create',
|
|
164
181
|
loadComponent: () => Promise.resolve().then(function () { return userCreate_component; }).then(c => c.CideCoreUserCreateComponent),
|
|
165
182
|
title: 'Create User',
|
|
183
|
+
canActivate: [authGuard],
|
|
166
184
|
data: {
|
|
167
185
|
reuseTab: true,
|
|
168
186
|
sypg_page_code: "core_user_management_create"
|
|
@@ -172,6 +190,7 @@ const coreRoutes = [
|
|
|
172
190
|
path: 'user-master/edit/:query',
|
|
173
191
|
loadComponent: () => Promise.resolve().then(function () { return userCreate_component; }).then(c => c.CideCoreUserCreateComponent),
|
|
174
192
|
title: 'Edit User',
|
|
193
|
+
canActivate: [authGuard],
|
|
175
194
|
data: {
|
|
176
195
|
reuseTab: true,
|
|
177
196
|
sypg_page_code: "core_user_management_create"
|
|
@@ -181,6 +200,7 @@ const coreRoutes = [
|
|
|
181
200
|
path: 'user-master/view/:query',
|
|
182
201
|
loadComponent: () => Promise.resolve().then(function () { return userCreate_component; }).then(c => c.CideCoreUserCreateComponent),
|
|
183
202
|
title: 'View User',
|
|
203
|
+
canActivate: [authGuard],
|
|
184
204
|
data: {
|
|
185
205
|
reuseTab: true,
|
|
186
206
|
sypg_page_code: "core_user_management_create"
|
|
@@ -189,7 +209,7 @@ const coreRoutes = [
|
|
|
189
209
|
{
|
|
190
210
|
path: "entity-list",
|
|
191
211
|
loadComponent: () => Promise.resolve().then(function () { return entityList_component; }).then(c => c.CideCoreEntityListComponent),
|
|
192
|
-
|
|
212
|
+
canActivate: [authGuard],
|
|
193
213
|
data: {
|
|
194
214
|
reuseTab: true,
|
|
195
215
|
sypg_page_code: "admin_entity_list"
|
|
@@ -198,7 +218,7 @@ const coreRoutes = [
|
|
|
198
218
|
{
|
|
199
219
|
path: "entity-create",
|
|
200
220
|
loadComponent: () => Promise.resolve().then(function () { return entityCreate_component; }).then(c => c.CideCoreEntityCreateComponent),
|
|
201
|
-
|
|
221
|
+
canActivate: [authGuard],
|
|
202
222
|
data: {
|
|
203
223
|
reuseTab: true,
|
|
204
224
|
sypg_page_code: "core_entity_form"
|
|
@@ -207,11 +227,52 @@ const coreRoutes = [
|
|
|
207
227
|
{
|
|
208
228
|
path: "entity-create/:query",
|
|
209
229
|
loadComponent: () => Promise.resolve().then(function () { return entityCreate_component; }).then(c => c.CideCoreEntityCreateComponent),
|
|
210
|
-
|
|
230
|
+
canActivate: [authGuard],
|
|
211
231
|
data: {
|
|
212
232
|
reuseTab: true,
|
|
213
233
|
sypg_page_code: "core_entity_form"
|
|
214
234
|
}
|
|
235
|
+
},
|
|
236
|
+
// User Role Management Routes
|
|
237
|
+
{
|
|
238
|
+
path: 'user-role',
|
|
239
|
+
loadComponent: () => import('./cloud-ide-core-user-role-list.component-C6h9Zcyp.mjs').then(c => c.CideCoreUserRoleListComponent),
|
|
240
|
+
title: 'User Role Management',
|
|
241
|
+
canActivate: [authGuard],
|
|
242
|
+
data: {
|
|
243
|
+
reuseTab: true,
|
|
244
|
+
sypg_page_code: "core_user_role_list"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
path: 'user-role/create',
|
|
249
|
+
loadComponent: () => import('./cloud-ide-core-user-role-form.component-CjoX7xmg.mjs').then(c => c.CideCoreUserRoleFormComponent),
|
|
250
|
+
title: 'Create User Role',
|
|
251
|
+
canActivate: [authGuard],
|
|
252
|
+
data: {
|
|
253
|
+
reuseTab: true,
|
|
254
|
+
sypg_page_code: "core_user_role_create"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
path: 'user-role/edit/:query',
|
|
259
|
+
loadComponent: () => import('./cloud-ide-core-user-role-form.component-CjoX7xmg.mjs').then(c => c.CideCoreUserRoleFormComponent),
|
|
260
|
+
title: 'Edit User Role',
|
|
261
|
+
canActivate: [authGuard],
|
|
262
|
+
data: {
|
|
263
|
+
reuseTab: true,
|
|
264
|
+
sypg_page_code: "core_user_role_edit"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
path: 'user-role/view/:query',
|
|
269
|
+
loadComponent: () => import('./cloud-ide-core-user-role-form.component-CjoX7xmg.mjs').then(c => c.CideCoreUserRoleFormComponent),
|
|
270
|
+
title: 'View User Role',
|
|
271
|
+
canActivate: [authGuard],
|
|
272
|
+
data: {
|
|
273
|
+
reuseTab: true,
|
|
274
|
+
sypg_page_code: "core_user_role_view"
|
|
275
|
+
}
|
|
215
276
|
}
|
|
216
277
|
];
|
|
217
278
|
|
|
@@ -576,7 +637,7 @@ class CideCoreMenuListComponent {
|
|
|
576
637
|
data: [],
|
|
577
638
|
trackBy: '_id',
|
|
578
639
|
pagination: {
|
|
579
|
-
enabled:
|
|
640
|
+
enabled: false,
|
|
580
641
|
pageSize: 10,
|
|
581
642
|
pageSizeOptions: [10, 25, 50, 100],
|
|
582
643
|
showQuickJump: true,
|
|
@@ -723,10 +784,7 @@ class CideCoreMenuListComponent {
|
|
|
723
784
|
this.error.set(null);
|
|
724
785
|
console.log('📞 Calling menuService.getMenuList()...');
|
|
725
786
|
const requestBody = {
|
|
726
|
-
|
|
727
|
-
pageIndex: this.currentPage(),
|
|
728
|
-
pageSize: this.pageSize(),
|
|
729
|
-
query: this.searchTerm(),
|
|
787
|
+
pagination: false,
|
|
730
788
|
sort: { order: 'asc', key: 'syme_order_by' }
|
|
731
789
|
};
|
|
732
790
|
console.log('📋 Request body:', requestBody);
|
|
@@ -1555,7 +1613,7 @@ class CideCoreMenuListComponent {
|
|
|
1555
1613
|
console.log('✅ Test data loaded successfully');
|
|
1556
1614
|
}
|
|
1557
1615
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideCoreMenuListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1558
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreMenuListComponent, isStandalone: true, selector: "cide-core-menu-list", viewQueries: [{ propertyName: "menuDetailsRendererTemplate", first: true, predicate: ["menuDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "menuTypeRendererTemplate", first: true, predicate: ["menuTypeRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Menu List Container -->\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-6 tw-py-4 tw-border-b tw-border-gray-200 tw-bg-white\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-3\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Menu Item' : 'Quick Add Menu Item' }}</h6>\n </div>\n @if (selectedParentItem()) {\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-px-4 tw-py-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">account_tree</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-blue-600 tw-font-medium\">{{ isEditMode() ? 'Parent:' : 'Creating child under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ selectedParentItem()?.syme_title }}</span>\n </div>\n <button \n cideEleButton \n variant=\"ghost\" \n size=\"xs\" \n type=\"button\" \n (click)=\"clearSelectedParent()\" \n class=\"tw-text-blue-400 hover:tw-text-blue-600\">\n <svg class=\"tw-w-4 tw-h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\"/>\n </svg>\n </button>\n </div>\n }\n </div>\n \n <form [formGroup]=\"quickAddForm\" (ngSubmit)=\"quickAddMenuItem()\">\n <!-- First Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n <!-- Menu Title -->\n <div>\n <cide-ele-input \n id=\"syme_title\" \n label=\"Title\" \n formControlName=\"syme_title\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Menu Type -->\n <div>\n <cide-ele-select \n label=\"Type*\" \n [options]=\"menuTypeOptions()\" \n formControlName=\"syme_type\"\n placeholder=\"Select type\"\n size=\"sm\">\n </cide-ele-select>\n </div>\n \n <!-- Icon -->\n <div>\n <cide-ele-input \n id=\"quickIcon\" \n type=\"text\"\n label=\"Icon\" \n formControlName=\"syme_icon\"\n placeholder=\"Icon name\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input \n id=\"quickIsActive\"\n type=\"checkbox\"\n label=\"Active\"\n formControlName=\"syme_isactive\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n \n <!-- Second Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3 tw-items-end\">\n <!-- Description -->\n <div>\n <cide-ele-textarea \n id=\"syme_desc\" \n label=\"Description\" \n formControlName=\"syme_desc\"\n placeholder=\"Menu description\"\n rows=\"2\"\n size=\"sm\">\n </cide-ele-textarea>\n </div>\n \n <!-- Path -->\n <div>\n <cide-ele-input \n id=\"quickPath\" \n type=\"text\"\n label=\"Path\" \n formControlName=\"syme_path\"\n placeholder=\"/path/to/route\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Link -->\n <div>\n <cide-ele-input \n id=\"quickLink\" \n type=\"text\"\n label=\"Link\" \n formControlName=\"syme_link\"\n placeholder=\"External link\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Action Buttons -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-space-x-2\">\n <button \n cideEleButton \n variant=\"primary\" \n size=\"sm\" \n type=\"submit\"\n [disabled]=\"quickAddForm.invalid\"\n class=\"tw-px-2 tw-py-1 tw-w-20\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-4 tw-h-4 tw-mr-1\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Add' }}\n </button>\n <button \n cideEleButton \n variant=\"outline\" \n size=\"sm\" \n type=\"button\"\n (click)=\"resetQuickAddForm()\"\n class=\"tw-px-2 tw-py-1 tw-w-16\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-4 tw-h-4 tw-mr-1\">refresh</cide-ele-icon>\n Reset\n </button>\n </div>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- Header Section with Filters -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\n\n <!-- Title -->\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">menu</cide-ele-icon>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Menu Management</h5>\n </div>\n\n <!-- Actions -->\n <div\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\n <!-- Actions can be added here if needed -->\n </div>\n </div>\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mt-4 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md\">\n <div class=\"tw-flex tw-items-start\">\n <cide-ele-icon name=\"error\" class=\"tw-text-red-400 tw-w-5 tw-h-5 tw-mt-0.5 tw-flex-shrink-0\"></cide-ele-icon>\n <div class=\"tw-ml-3\">\n <h3 class=\"tw-text-sm tw-font-medium tw-text-red-800 tw-m-0\">Error</h3>\n <p class=\"tw-text-sm tw-text-red-700 tw-mt-1 tw-m-0\">{{ error() }}</p>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n\n <!-- Debug Information: Uncomment for development -->\n <!--\n <div class=\"tw-p-2 tw-bg-yellow-100 tw-text-xs tw-border-b tw-flex tw-justify-between tw-items-center\">\n <span>Debug: Loading: {{ loading() }} | Items Count: {{ menuItems().length }} | Total: {{ totalItems() }} | Error: {{ error() }}</span>\n <button cideEleButton variant=\"outline\" size=\"xs\" (click)=\"loadTestData()\" class=\"tw-ml-2\">\n Load Test Data\n </button>\n </div>\n -->\n \n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n \n <cide-ele-data-grid \n [config]=\"gridConfig()\" \n [templateRenderers]=\"getTemplateRenderers()\"\n [actionHandlers]=\"actionHandlers\"\n [serverSidePagination]=\"true\" \n [totalServerItems]=\"totalItems()\" \n [currentServerPage]=\"currentPage()\"\n [currentServerPageSize]=\"pageSize()\" \n [dragDropEnabled]=\"true\" \n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n\n </div>\n </div>\n\n</div>\n\n<!-- \n Angular Template References for Grid Renderers (Best Practice)\n \n These ng-template elements represent the Angular best practice for custom rendering.\n They provide:\n - Type safety with template context\n - Component lifecycle integration\n - Change detection optimization\n - Proper event handling\n - Accessibility features\n \n Note: Current data grid uses string renderers for compatibility.\n Templates are maintained for future component enhancement.\n-->\n\n\n\n<!-- Menu Details Renderer Template -->\n<ng-template #menuDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Menu Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon \n class=\"tw-text-gray-400\" \n size=\"xs\">\n {{ row.syme_icon || 'folder_open' }}\n </cide-ele-icon>\n </div>\n \n <!-- Menu Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.syme_title\">\n {{ row.syme_title || 'Untitled' }}\n </div>\n @if (row.syme_desc) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.syme_desc\">\n {{ row.syme_desc }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Menu Type Renderer Template -->\n<ng-template #menuTypeRendererTemplate let-row=\"row\" let-value=\"value\">\n <span class=\"tw-inline-flex tw-items-center tw-px-2.5 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-whitespace-nowrap\"\n [ngClass]=\"getMenuTypeClass(row.syme_type)\">\n {{ getMenuTypeLabel(row.syme_type) }}\n </span>\n</ng-template>\n\n<!-- Actions Dropdown Renderer Template -->\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\" let-value=\"value\">\n <cide-ele-dropdown \n [items]=\"getDropdownItems(row)\"\n [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>\n\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideTextareaComponent, selector: "cide-ele-textarea", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "minlength", "maxlength", "rows", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput"], outputs: ["ngModelChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }] });
|
|
1616
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreMenuListComponent, isStandalone: true, selector: "cide-core-menu-list", viewQueries: [{ propertyName: "menuDetailsRendererTemplate", first: true, predicate: ["menuDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "menuTypeRendererTemplate", first: true, predicate: ["menuTypeRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Menu List Container -->\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-6 tw-py-4 tw-border-b tw-border-gray-200 tw-bg-white\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-3\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Menu Item' : 'Quick Add Menu Item' }}</h6>\n </div>\n @if (selectedParentItem()) {\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-px-4 tw-py-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">account_tree</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-blue-600 tw-font-medium\">{{ isEditMode() ? 'Parent:' : 'Creating child under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ selectedParentItem()?.syme_title }}</span>\n </div>\n <button \n cideEleButton \n variant=\"ghost\" \n size=\"xs\" \n type=\"button\" \n (click)=\"clearSelectedParent()\" \n class=\"tw-text-blue-400 hover:tw-text-blue-600\">\n <svg class=\"tw-w-4 tw-h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\"/>\n </svg>\n </button>\n </div>\n }\n </div>\n \n <form [formGroup]=\"quickAddForm\" (ngSubmit)=\"quickAddMenuItem()\">\n <!-- First Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n <!-- Menu Title -->\n <div>\n <cide-ele-input \n id=\"syme_title\" \n label=\"Title\" \n formControlName=\"syme_title\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Menu Type -->\n <div>\n <cide-ele-select \n label=\"Type*\" \n [options]=\"menuTypeOptions()\" \n formControlName=\"syme_type\"\n placeholder=\"Select type\"\n size=\"sm\">\n </cide-ele-select>\n </div>\n \n <!-- Icon -->\n <div>\n <cide-ele-input \n id=\"quickIcon\" \n type=\"text\"\n label=\"Icon\" \n formControlName=\"syme_icon\"\n placeholder=\"Icon name\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input \n id=\"quickIsActive\"\n type=\"checkbox\"\n label=\"Active\"\n formControlName=\"syme_isactive\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n \n <!-- Second Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3 tw-items-end\">\n <!-- Description -->\n <div>\n <cide-ele-textarea \n id=\"syme_desc\" \n label=\"Description\" \n formControlName=\"syme_desc\"\n placeholder=\"Menu description\"\n rows=\"2\"\n size=\"sm\">\n </cide-ele-textarea>\n </div>\n \n <!-- Path -->\n <div>\n <cide-ele-input \n id=\"quickPath\" \n type=\"text\"\n label=\"Path\" \n formControlName=\"syme_path\"\n placeholder=\"/path/to/route\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Link -->\n <div>\n <cide-ele-input \n id=\"quickLink\" \n type=\"text\"\n label=\"Link\" \n formControlName=\"syme_link\"\n placeholder=\"External link\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Action Buttons -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-space-x-2\">\n <button \n cideEleButton \n variant=\"primary\" \n size=\"sm\" \n type=\"submit\"\n [disabled]=\"quickAddForm.invalid\"\n class=\"tw-px-2 tw-py-1 tw-w-20\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-4 tw-h-4 tw-mr-1\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Add' }}\n </button>\n <button \n cideEleButton \n variant=\"outline\" \n size=\"sm\" \n type=\"button\"\n (click)=\"resetQuickAddForm()\"\n class=\"tw-px-2 tw-py-1 tw-w-16\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-4 tw-h-4 tw-mr-1\">refresh</cide-ele-icon>\n Reset\n </button>\n </div>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- Header Section with Filters -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\n\n <!-- Title -->\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">menu</cide-ele-icon>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Menu Management</h5>\n </div>\n\n <!-- Actions -->\n <div\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\n <!-- Actions can be added here if needed -->\n </div>\n </div>\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mt-4 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md\">\n <div class=\"tw-flex tw-items-start\">\n <cide-ele-icon name=\"error\" class=\"tw-text-red-400 tw-w-5 tw-h-5 tw-mt-0.5 tw-flex-shrink-0\"></cide-ele-icon>\n <div class=\"tw-ml-3\">\n <h3 class=\"tw-text-sm tw-font-medium tw-text-red-800 tw-m-0\">Error</h3>\n <p class=\"tw-text-sm tw-text-red-700 tw-mt-1 tw-m-0\">{{ error() }}</p>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n\n <!-- Debug Information: Uncomment for development -->\n <!--\n <div class=\"tw-p-2 tw-bg-yellow-100 tw-text-xs tw-border-b tw-flex tw-justify-between tw-items-center\">\n <span>Debug: Loading: {{ loading() }} | Items Count: {{ menuItems().length }} | Total: {{ totalItems() }} | Error: {{ error() }}</span>\n <button cideEleButton variant=\"outline\" size=\"xs\" (click)=\"loadTestData()\" class=\"tw-ml-2\">\n Load Test Data\n </button>\n </div>\n -->\n \n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n \n <cide-ele-data-grid \n [config]=\"gridConfig()\" \n [templateRenderers]=\"getTemplateRenderers()\"\n [actionHandlers]=\"actionHandlers\"\n [dragDropEnabled]=\"true\" \n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n\n </div>\n </div>\n\n</div>\n\n<!-- \n Angular Template References for Grid Renderers (Best Practice)\n \n These ng-template elements represent the Angular best practice for custom rendering.\n They provide:\n - Type safety with template context\n - Component lifecycle integration\n - Change detection optimization\n - Proper event handling\n - Accessibility features\n \n Note: Current data grid uses string renderers for compatibility.\n Templates are maintained for future component enhancement.\n-->\n\n\n\n<!-- Menu Details Renderer Template -->\n<ng-template #menuDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Menu Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon \n class=\"tw-text-gray-400\" \n size=\"xs\">\n {{ row.syme_icon || 'folder_open' }}\n </cide-ele-icon>\n </div>\n \n <!-- Menu Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.syme_title\">\n {{ row.syme_title || 'Untitled' }}\n </div>\n @if (row.syme_desc) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.syme_desc\">\n {{ row.syme_desc }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Menu Type Renderer Template -->\n<ng-template #menuTypeRendererTemplate let-row=\"row\" let-value=\"value\">\n <span class=\"tw-inline-flex tw-items-center tw-px-2.5 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-whitespace-nowrap\"\n [ngClass]=\"getMenuTypeClass(row.syme_type)\">\n {{ getMenuTypeLabel(row.syme_type) }}\n </span>\n</ng-template>\n\n<!-- Actions Dropdown Renderer Template -->\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\" let-value=\"value\">\n <cide-ele-dropdown \n [items]=\"getDropdownItems(row)\"\n [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>\n\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideTextareaComponent, selector: "cide-ele-textarea", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "minlength", "maxlength", "rows", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput"], outputs: ["ngModelChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }] });
|
|
1559
1617
|
}
|
|
1560
1618
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideCoreMenuListComponent, decorators: [{
|
|
1561
1619
|
type: Component,
|
|
@@ -1570,7 +1628,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1570
1628
|
CideTextareaComponent,
|
|
1571
1629
|
CideIconComponent,
|
|
1572
1630
|
CideEleDropdownComponent
|
|
1573
|
-
], template: "<!-- Menu List Container -->\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-6 tw-py-4 tw-border-b tw-border-gray-200 tw-bg-white\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-3\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Menu Item' : 'Quick Add Menu Item' }}</h6>\n </div>\n @if (selectedParentItem()) {\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-px-4 tw-py-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">account_tree</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-blue-600 tw-font-medium\">{{ isEditMode() ? 'Parent:' : 'Creating child under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ selectedParentItem()?.syme_title }}</span>\n </div>\n <button \n cideEleButton \n variant=\"ghost\" \n size=\"xs\" \n type=\"button\" \n (click)=\"clearSelectedParent()\" \n class=\"tw-text-blue-400 hover:tw-text-blue-600\">\n <svg class=\"tw-w-4 tw-h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\"/>\n </svg>\n </button>\n </div>\n }\n </div>\n \n <form [formGroup]=\"quickAddForm\" (ngSubmit)=\"quickAddMenuItem()\">\n <!-- First Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n <!-- Menu Title -->\n <div>\n <cide-ele-input \n id=\"syme_title\" \n label=\"Title\" \n formControlName=\"syme_title\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Menu Type -->\n <div>\n <cide-ele-select \n label=\"Type*\" \n [options]=\"menuTypeOptions()\" \n formControlName=\"syme_type\"\n placeholder=\"Select type\"\n size=\"sm\">\n </cide-ele-select>\n </div>\n \n <!-- Icon -->\n <div>\n <cide-ele-input \n id=\"quickIcon\" \n type=\"text\"\n label=\"Icon\" \n formControlName=\"syme_icon\"\n placeholder=\"Icon name\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input \n id=\"quickIsActive\"\n type=\"checkbox\"\n label=\"Active\"\n formControlName=\"syme_isactive\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n \n <!-- Second Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3 tw-items-end\">\n <!-- Description -->\n <div>\n <cide-ele-textarea \n id=\"syme_desc\" \n label=\"Description\" \n formControlName=\"syme_desc\"\n placeholder=\"Menu description\"\n rows=\"2\"\n size=\"sm\">\n </cide-ele-textarea>\n </div>\n \n <!-- Path -->\n <div>\n <cide-ele-input \n id=\"quickPath\" \n type=\"text\"\n label=\"Path\" \n formControlName=\"syme_path\"\n placeholder=\"/path/to/route\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Link -->\n <div>\n <cide-ele-input \n id=\"quickLink\" \n type=\"text\"\n label=\"Link\" \n formControlName=\"syme_link\"\n placeholder=\"External link\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Action Buttons -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-space-x-2\">\n <button \n cideEleButton \n variant=\"primary\" \n size=\"sm\" \n type=\"submit\"\n [disabled]=\"quickAddForm.invalid\"\n class=\"tw-px-2 tw-py-1 tw-w-20\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-4 tw-h-4 tw-mr-1\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Add' }}\n </button>\n <button \n cideEleButton \n variant=\"outline\" \n size=\"sm\" \n type=\"button\"\n (click)=\"resetQuickAddForm()\"\n class=\"tw-px-2 tw-py-1 tw-w-16\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-4 tw-h-4 tw-mr-1\">refresh</cide-ele-icon>\n Reset\n </button>\n </div>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- Header Section with Filters -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\n\n <!-- Title -->\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">menu</cide-ele-icon>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Menu Management</h5>\n </div>\n\n <!-- Actions -->\n <div\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\n <!-- Actions can be added here if needed -->\n </div>\n </div>\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mt-4 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md\">\n <div class=\"tw-flex tw-items-start\">\n <cide-ele-icon name=\"error\" class=\"tw-text-red-400 tw-w-5 tw-h-5 tw-mt-0.5 tw-flex-shrink-0\"></cide-ele-icon>\n <div class=\"tw-ml-3\">\n <h3 class=\"tw-text-sm tw-font-medium tw-text-red-800 tw-m-0\">Error</h3>\n <p class=\"tw-text-sm tw-text-red-700 tw-mt-1 tw-m-0\">{{ error() }}</p>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n\n <!-- Debug Information: Uncomment for development -->\n <!--\n <div class=\"tw-p-2 tw-bg-yellow-100 tw-text-xs tw-border-b tw-flex tw-justify-between tw-items-center\">\n <span>Debug: Loading: {{ loading() }} | Items Count: {{ menuItems().length }} | Total: {{ totalItems() }} | Error: {{ error() }}</span>\n <button cideEleButton variant=\"outline\" size=\"xs\" (click)=\"loadTestData()\" class=\"tw-ml-2\">\n Load Test Data\n </button>\n </div>\n -->\n \n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n \n <cide-ele-data-grid \n [config]=\"gridConfig()\" \n [templateRenderers]=\"getTemplateRenderers()\"\n [actionHandlers]=\"actionHandlers\"\n [
|
|
1631
|
+
], template: "<!-- Menu List Container -->\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-6 tw-py-4 tw-border-b tw-border-gray-200 tw-bg-white\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-3\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Menu Item' : 'Quick Add Menu Item' }}</h6>\n </div>\n @if (selectedParentItem()) {\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-px-4 tw-py-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">account_tree</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-blue-600 tw-font-medium\">{{ isEditMode() ? 'Parent:' : 'Creating child under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ selectedParentItem()?.syme_title }}</span>\n </div>\n <button \n cideEleButton \n variant=\"ghost\" \n size=\"xs\" \n type=\"button\" \n (click)=\"clearSelectedParent()\" \n class=\"tw-text-blue-400 hover:tw-text-blue-600\">\n <svg class=\"tw-w-4 tw-h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\"/>\n </svg>\n </button>\n </div>\n }\n </div>\n \n <form [formGroup]=\"quickAddForm\" (ngSubmit)=\"quickAddMenuItem()\">\n <!-- First Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n <!-- Menu Title -->\n <div>\n <cide-ele-input \n id=\"syme_title\" \n label=\"Title\" \n formControlName=\"syme_title\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Menu Type -->\n <div>\n <cide-ele-select \n label=\"Type*\" \n [options]=\"menuTypeOptions()\" \n formControlName=\"syme_type\"\n placeholder=\"Select type\"\n size=\"sm\">\n </cide-ele-select>\n </div>\n \n <!-- Icon -->\n <div>\n <cide-ele-input \n id=\"quickIcon\" \n type=\"text\"\n label=\"Icon\" \n formControlName=\"syme_icon\"\n placeholder=\"Icon name\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input \n id=\"quickIsActive\"\n type=\"checkbox\"\n label=\"Active\"\n formControlName=\"syme_isactive\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n \n <!-- Second Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3 tw-items-end\">\n <!-- Description -->\n <div>\n <cide-ele-textarea \n id=\"syme_desc\" \n label=\"Description\" \n formControlName=\"syme_desc\"\n placeholder=\"Menu description\"\n rows=\"2\"\n size=\"sm\">\n </cide-ele-textarea>\n </div>\n \n <!-- Path -->\n <div>\n <cide-ele-input \n id=\"quickPath\" \n type=\"text\"\n label=\"Path\" \n formControlName=\"syme_path\"\n placeholder=\"/path/to/route\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Link -->\n <div>\n <cide-ele-input \n id=\"quickLink\" \n type=\"text\"\n label=\"Link\" \n formControlName=\"syme_link\"\n placeholder=\"External link\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Action Buttons -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-space-x-2\">\n <button \n cideEleButton \n variant=\"primary\" \n size=\"sm\" \n type=\"submit\"\n [disabled]=\"quickAddForm.invalid\"\n class=\"tw-px-2 tw-py-1 tw-w-20\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-4 tw-h-4 tw-mr-1\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Add' }}\n </button>\n <button \n cideEleButton \n variant=\"outline\" \n size=\"sm\" \n type=\"button\"\n (click)=\"resetQuickAddForm()\"\n class=\"tw-px-2 tw-py-1 tw-w-16\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-4 tw-h-4 tw-mr-1\">refresh</cide-ele-icon>\n Reset\n </button>\n </div>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- Header Section with Filters -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\n\n <!-- Title -->\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">menu</cide-ele-icon>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Menu Management</h5>\n </div>\n\n <!-- Actions -->\n <div\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\n <!-- Actions can be added here if needed -->\n </div>\n </div>\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mt-4 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md\">\n <div class=\"tw-flex tw-items-start\">\n <cide-ele-icon name=\"error\" class=\"tw-text-red-400 tw-w-5 tw-h-5 tw-mt-0.5 tw-flex-shrink-0\"></cide-ele-icon>\n <div class=\"tw-ml-3\">\n <h3 class=\"tw-text-sm tw-font-medium tw-text-red-800 tw-m-0\">Error</h3>\n <p class=\"tw-text-sm tw-text-red-700 tw-mt-1 tw-m-0\">{{ error() }}</p>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n\n <!-- Debug Information: Uncomment for development -->\n <!--\n <div class=\"tw-p-2 tw-bg-yellow-100 tw-text-xs tw-border-b tw-flex tw-justify-between tw-items-center\">\n <span>Debug: Loading: {{ loading() }} | Items Count: {{ menuItems().length }} | Total: {{ totalItems() }} | Error: {{ error() }}</span>\n <button cideEleButton variant=\"outline\" size=\"xs\" (click)=\"loadTestData()\" class=\"tw-ml-2\">\n Load Test Data\n </button>\n </div>\n -->\n \n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n \n <cide-ele-data-grid \n [config]=\"gridConfig()\" \n [templateRenderers]=\"getTemplateRenderers()\"\n [actionHandlers]=\"actionHandlers\"\n [dragDropEnabled]=\"true\" \n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n\n </div>\n </div>\n\n</div>\n\n<!-- \n Angular Template References for Grid Renderers (Best Practice)\n \n These ng-template elements represent the Angular best practice for custom rendering.\n They provide:\n - Type safety with template context\n - Component lifecycle integration\n - Change detection optimization\n - Proper event handling\n - Accessibility features\n \n Note: Current data grid uses string renderers for compatibility.\n Templates are maintained for future component enhancement.\n-->\n\n\n\n<!-- Menu Details Renderer Template -->\n<ng-template #menuDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Menu Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon \n class=\"tw-text-gray-400\" \n size=\"xs\">\n {{ row.syme_icon || 'folder_open' }}\n </cide-ele-icon>\n </div>\n \n <!-- Menu Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.syme_title\">\n {{ row.syme_title || 'Untitled' }}\n </div>\n @if (row.syme_desc) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.syme_desc\">\n {{ row.syme_desc }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Menu Type Renderer Template -->\n<ng-template #menuTypeRendererTemplate let-row=\"row\" let-value=\"value\">\n <span class=\"tw-inline-flex tw-items-center tw-px-2.5 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-whitespace-nowrap\"\n [ngClass]=\"getMenuTypeClass(row.syme_type)\">\n {{ getMenuTypeLabel(row.syme_type) }}\n </span>\n</ng-template>\n\n<!-- Actions Dropdown Renderer Template -->\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\" let-value=\"value\">\n <cide-ele-dropdown \n [items]=\"getDropdownItems(row)\"\n [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>\n\n" }]
|
|
1574
1632
|
}], ctorParameters: () => [] });
|
|
1575
1633
|
|
|
1576
1634
|
var menuList_component = /*#__PURE__*/Object.freeze({
|
|
@@ -7769,7 +7827,7 @@ class CideCoreGeneralMasterTypeComponent {
|
|
|
7769
7827
|
document.dispatchEvent(event);
|
|
7770
7828
|
}
|
|
7771
7829
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideCoreGeneralMasterTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7772
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreGeneralMasterTypeComponent, isStandalone: true, selector: "cide-core-general-master-type", viewQueries: [{ propertyName: "typeDetailsRendererTemplate", first: true, predicate: ["typeDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "typeStatusRendererTemplate", first: true, predicate: ["typeStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- General Master Type Container -->\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-4 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-white\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-0\">\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-mb-3\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Type' : 'Quick Add Type' }}</h6>\n </div>\n \n <!-- Parent Type Info (shown when adding child) -->\n @if (typeForm.get('sygmt_id_sygmt')?.value) {\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-px-4 tw-py-1 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">account_tree</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-blue-600 tw-font-medium\">{{ isEditMode() ? 'Parent:' : 'Creating child under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ getParentTypeDisplay() }}</span>\n </div>\n <button \n cideEleButton \n variant=\"ghost\" \n size=\"xs\" \n type=\"button\" \n (click)=\"clearParentType()\" \n class=\"tw-text-blue-400 hover:tw-text-blue-600\">\n <svg class=\"tw-w-4 tw-h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\"/>\n </svg>\n </button>\n </div>\n }\n </div>\n\n <form [formGroup]=\"typeForm\" (ngSubmit)=\"onSubmit($event)\" class=\"tw-space-y-2 tw-relative\">\n <!-- Hidden field for parent type ID -->\n <input type=\"hidden\" formControlName=\"sygmt_id_sygmt\">\n \n <!-- First Row - Basic fields -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-6 tw-gap-2\">\n <!-- Type Code -->\n <div class=\"lg:tw-col-span-1\">\n <cide-ele-input \n formControlName=\"sygmt_code\" \n label=\"Type Code*\" \n placeholder=\"Enter type code\"\n size=\"sm\"\n [maxlength]=\"40\">\n </cide-ele-input>\n </div>\n \n <!-- Type Title -->\n <div class=\"lg:tw-col-span-2\">\n <cide-ele-input \n formControlName=\"sygmt_title\" \n label=\"Type Title*\" \n placeholder=\"Enter type title\"\n size=\"sm\"\n [maxlength]=\"100\">\n </cide-ele-input>\n </div>\n \n <!-- Active Status -->\n <div class=\"lg:tw-col-span-1 tw-flex tw-items-center tw-pt-0\">\n <cide-ele-input \n formControlName=\"sygmt_isactive\"\n type=\"checkbox\"\n label=\"Active\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n <!-- Second Row - JSON Configuration and Description/Save side by side -->\n <div class=\"tw-flex tw-gap-4\">\n <!-- JSON Configuration (60% width) -->\n <div class=\"tw-w-3/5\">\n <cide-ele-json-editor \n formControlName=\"sygmt_configuration\" \n label=\"Configuration*\" \n size=\"sm\">\n </cide-ele-json-editor>\n </div>\n \n <!-- Description and Save Button (40% width) -->\n <div class=\"tw-w-2/5 tw-flex tw-flex-col tw-space-y-4\">\n <!-- Description -->\n <div class=\"tw-flex-1\">\n <cide-ele-textarea \n formControlName=\"sygmt_desc\" \n label=\"Description\" \n placeholder=\"Enter description\"\n size=\"sm\"\n [maxlength]=\"255\" \n [rows]=\"4\">\n </cide-ele-textarea>\n </div>\n \n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-space-x-2\">\n <button \n cideEleButton \n variant=\"outline\" \n size=\"sm\" \n type=\"button\" \n (click)=\"cancelForm()\"\n [disabled]=\"loading()\"\n class=\"tw-px-4 tw-py-2\">\n Cancel\n </button>\n <button \n cideEleButton \n variant=\"primary\" \n size=\"sm\" \n type=\"submit\"\n [disabled]=\"loading()\"\n class=\"tw-px-4 tw-py-2\" [leftIcon]=\"isEditMode() ? 'edit' : 'add'\">\n {{ isEditMode() ? 'Update' : 'Save' }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- Header Section with Filters -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-4 tw-py-2 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-2 sm:tw-space-y-0\">\n \n <!-- Title -->\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">category</cide-ele-icon>\n <h5 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">General Master Type Management</h5>\n </div>\n\n <!-- Actions -->\n <div class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-2 sm:tw-space-y-0 sm:tw-space-x-3\">\n\n </div>\n </div>\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mt-3 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md\">\n <div class=\"tw-flex tw-items-start\">\n <cide-ele-icon name=\"error\" class=\"tw-text-red-400 tw-w-4 tw-h-4 tw-mt-0.5 tw-flex-shrink-0\"></cide-ele-icon>\n <div class=\"tw-ml-2\">\n <h3 class=\"tw-text-xs tw-font-medium tw-text-red-800 tw-m-0\">Error</h3>\n <p class=\"tw-text-xs tw-text-red-700 tw-mt-1 tw-m-0\">{{ error() }}</p>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n \n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n <cide-ele-data-grid \n [config]=\"gridConfig()\" \n [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n</div>\n\n<!-- Template Renderers -->\n<ng-template #typeDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col\">\n <div class=\"tw-font-medium tw-text-gray-900\">{{ row.sygmt_title || 'N/A' }}</div>\n <div class=\"tw-text-sm tw-text-gray-500 tw-truncate tw-max-w-xs\" title=\"{{ row.sygmt_desc || 'No description' }}\">{{ row.sygmt_desc || 'No description' }}</div>\n </div>\n</ng-template>\n\n<ng-template #typeStatusRendererTemplate let-row=\"row\">\n <span class=\"tw-inline-flex tw-items-center tw-px-2.5 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium\"\n [class.tw-bg-green-100]=\"row.sygmt_isactive\"\n [class.tw-text-green-800]=\"row.sygmt_isactive\"\n [class.tw-bg-red-100]=\"!row.sygmt_isactive\"\n [class.tw-text-red-800]=\"!row.sygmt_isactive\">\n {{ row.sygmt_isactive ? 'Active' : 'Inactive' }}\n </span>\n</ng-template>\n\n\n\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\">\n <cide-ele-dropdown\n [items]=\"getActionDropdownItems(row)\"\n [config]=\"getDropdownConfig()\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideTextareaComponent, selector: "cide-ele-textarea", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "minlength", "maxlength", "rows", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput"], outputs: ["ngModelChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }, { kind: "component", type: CideEleJsonEditorComponent, selector: "cide-ele-json-editor", inputs: ["label", "helperText", "required", "disabled", "showCharacterCount", "config"], outputs: ["valueChange", "objectChange", "errorsChange", "validChange"] }] });
|
|
7830
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreGeneralMasterTypeComponent, isStandalone: true, selector: "cide-core-general-master-type", viewQueries: [{ propertyName: "typeDetailsRendererTemplate", first: true, predicate: ["typeDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "typeStatusRendererTemplate", first: true, predicate: ["typeStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- General Master Type Container -->\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-4 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-white\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-0\">\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-mb-3\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Type' : 'General Master Type Management' }}</h6>\n </div>\n\n <!-- Parent Type Info (shown when adding child) -->\n @if (typeForm.get('sygmt_id_sygmt')?.value) {\n <div\n class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-px-4 tw-py-1 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">account_tree</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-blue-600 tw-font-medium\">{{ isEditMode() ? 'Parent:' : 'Creating child under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ getParentTypeDisplay() }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (click)=\"clearParentType()\"\n class=\"tw-text-blue-400 hover:tw-text-blue-600\">\n <svg class=\"tw-w-4 tw-h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n </div>\n }\n </div>\n\n <form [formGroup]=\"typeForm\" (ngSubmit)=\"onSubmit($event)\" class=\"tw-space-y-2 tw-relative\">\n <!-- Hidden field for parent type ID -->\n <input type=\"hidden\" formControlName=\"sygmt_id_sygmt\">\n\n <!-- First Row - Basic fields -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-6 tw-gap-2\">\n <!-- Type Code -->\n <div class=\"lg:tw-col-span-1\">\n <cide-ele-input formControlName=\"sygmt_code\" label=\"Type Code*\" placeholder=\"Enter type code\" size=\"sm\"\n [maxlength]=\"40\">\n </cide-ele-input>\n </div>\n\n <!-- Type Title -->\n <div class=\"lg:tw-col-span-2\">\n <cide-ele-input formControlName=\"sygmt_title\" label=\"Type Title*\" placeholder=\"Enter type title\" size=\"sm\"\n [maxlength]=\"100\">\n </cide-ele-input>\n </div>\n\n <!-- Active Status -->\n <div class=\"lg:tw-col-span-1 tw-flex tw-items-center tw-pt-0\">\n <cide-ele-input formControlName=\"sygmt_isactive\" type=\"checkbox\" label=\"Active\" size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n <!-- Second Row - JSON Configuration and Description/Save side by side -->\n <div class=\"tw-flex tw-gap-4\">\n <!-- JSON Configuration (60% width) -->\n <div class=\"tw-w-3/5\">\n <cide-ele-json-editor formControlName=\"sygmt_configuration\" label=\"Configuration*\" size=\"sm\">\n </cide-ele-json-editor>\n </div>\n\n <!-- Description and Save Button (40% width) -->\n <div class=\"tw-w-2/5 tw-flex tw-flex-col tw-space-y-4\">\n <!-- Description -->\n <div class=\"tw-flex-1\">\n <cide-ele-textarea formControlName=\"sygmt_desc\" label=\"Description\" placeholder=\"Enter description\"\n size=\"sm\" [maxlength]=\"255\" [rows]=\"4\">\n </cide-ele-textarea>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-space-x-2\">\n <button cideEleButton variant=\"outline\" size=\"sm\" type=\"button\" (click)=\"cancelForm()\"\n [disabled]=\"loading()\" class=\"tw-px-4 tw-py-2\">\n Cancel\n </button>\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"submit\" [disabled]=\"loading()\"\n class=\"tw-px-4 tw-py-2\" [leftIcon]=\"isEditMode() ? 'edit' : 'add'\">\n {{ isEditMode() ? 'Update' : 'Save' }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- Header Section with Filters -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-4 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mt-3 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md\">\n <div class=\"tw-flex tw-items-start\">\n <cide-ele-icon name=\"error\" class=\"tw-text-red-400 tw-w-4 tw-h-4 tw-mt-0.5 tw-flex-shrink-0\"></cide-ele-icon>\n <div class=\"tw-ml-2\">\n <h3 class=\"tw-text-xs tw-font-medium tw-text-red-800 tw-m-0\">Error</h3>\n <p class=\"tw-text-xs tw-text-red-700 tw-mt-1 tw-m-0\">{{ error() }}</p>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n\n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n</div>\n\n<!-- Template Renderers -->\n<ng-template #typeDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col\">\n <div class=\"tw-font-medium tw-text-gray-900\">{{ row.sygmt_title || 'N/A' }}</div>\n <div class=\"tw-text-sm tw-text-gray-500 tw-truncate tw-max-w-xs\" title=\"{{ row.sygmt_desc || 'No description' }}\">{{\n row.sygmt_desc || 'No description' }}</div>\n </div>\n</ng-template>\n\n<ng-template #typeStatusRendererTemplate let-row=\"row\">\n <span class=\"tw-inline-flex tw-items-center tw-px-2.5 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium\"\n [class.tw-bg-green-100]=\"row.sygmt_isactive\" [class.tw-text-green-800]=\"row.sygmt_isactive\"\n [class.tw-bg-red-100]=\"!row.sygmt_isactive\" [class.tw-text-red-800]=\"!row.sygmt_isactive\">\n {{ row.sygmt_isactive ? 'Active' : 'Inactive' }}\n </span>\n</ng-template>\n\n\n\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\">\n <cide-ele-dropdown [items]=\"getActionDropdownItems(row)\" [config]=\"getDropdownConfig()\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideTextareaComponent, selector: "cide-ele-textarea", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "minlength", "maxlength", "rows", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput"], outputs: ["ngModelChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }, { kind: "component", type: CideEleJsonEditorComponent, selector: "cide-ele-json-editor", inputs: ["label", "helperText", "required", "disabled", "showCharacterCount", "config"], outputs: ["valueChange", "objectChange", "errorsChange", "validChange"] }] });
|
|
7773
7831
|
}
|
|
7774
7832
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideCoreGeneralMasterTypeComponent, decorators: [{
|
|
7775
7833
|
type: Component,
|
|
@@ -7784,7 +7842,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
7784
7842
|
CideIconComponent,
|
|
7785
7843
|
CideEleDropdownComponent,
|
|
7786
7844
|
CideEleJsonEditorComponent
|
|
7787
|
-
], template: "<!-- General Master Type Container -->\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-4 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-white\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-0\">\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-mb-3\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Type' : '
|
|
7845
|
+
], template: "<!-- General Master Type Container -->\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-4 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-white\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-0\">\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-mb-3\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Type' : 'General Master Type Management' }}</h6>\n </div>\n\n <!-- Parent Type Info (shown when adding child) -->\n @if (typeForm.get('sygmt_id_sygmt')?.value) {\n <div\n class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-px-4 tw-py-1 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">account_tree</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-blue-600 tw-font-medium\">{{ isEditMode() ? 'Parent:' : 'Creating child under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ getParentTypeDisplay() }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (click)=\"clearParentType()\"\n class=\"tw-text-blue-400 hover:tw-text-blue-600\">\n <svg class=\"tw-w-4 tw-h-4\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n </button>\n </div>\n }\n </div>\n\n <form [formGroup]=\"typeForm\" (ngSubmit)=\"onSubmit($event)\" class=\"tw-space-y-2 tw-relative\">\n <!-- Hidden field for parent type ID -->\n <input type=\"hidden\" formControlName=\"sygmt_id_sygmt\">\n\n <!-- First Row - Basic fields -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-6 tw-gap-2\">\n <!-- Type Code -->\n <div class=\"lg:tw-col-span-1\">\n <cide-ele-input formControlName=\"sygmt_code\" label=\"Type Code*\" placeholder=\"Enter type code\" size=\"sm\"\n [maxlength]=\"40\">\n </cide-ele-input>\n </div>\n\n <!-- Type Title -->\n <div class=\"lg:tw-col-span-2\">\n <cide-ele-input formControlName=\"sygmt_title\" label=\"Type Title*\" placeholder=\"Enter type title\" size=\"sm\"\n [maxlength]=\"100\">\n </cide-ele-input>\n </div>\n\n <!-- Active Status -->\n <div class=\"lg:tw-col-span-1 tw-flex tw-items-center tw-pt-0\">\n <cide-ele-input formControlName=\"sygmt_isactive\" type=\"checkbox\" label=\"Active\" size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n <!-- Second Row - JSON Configuration and Description/Save side by side -->\n <div class=\"tw-flex tw-gap-4\">\n <!-- JSON Configuration (60% width) -->\n <div class=\"tw-w-3/5\">\n <cide-ele-json-editor formControlName=\"sygmt_configuration\" label=\"Configuration*\" size=\"sm\">\n </cide-ele-json-editor>\n </div>\n\n <!-- Description and Save Button (40% width) -->\n <div class=\"tw-w-2/5 tw-flex tw-flex-col tw-space-y-4\">\n <!-- Description -->\n <div class=\"tw-flex-1\">\n <cide-ele-textarea formControlName=\"sygmt_desc\" label=\"Description\" placeholder=\"Enter description\"\n size=\"sm\" [maxlength]=\"255\" [rows]=\"4\">\n </cide-ele-textarea>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-space-x-2\">\n <button cideEleButton variant=\"outline\" size=\"sm\" type=\"button\" (click)=\"cancelForm()\"\n [disabled]=\"loading()\" class=\"tw-px-4 tw-py-2\">\n Cancel\n </button>\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"submit\" [disabled]=\"loading()\"\n class=\"tw-px-4 tw-py-2\" [leftIcon]=\"isEditMode() ? 'edit' : 'add'\">\n {{ isEditMode() ? 'Update' : 'Save' }}\n </button>\n </div>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- Header Section with Filters -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-px-4 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mt-3 tw-p-3 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md\">\n <div class=\"tw-flex tw-items-start\">\n <cide-ele-icon name=\"error\" class=\"tw-text-red-400 tw-w-4 tw-h-4 tw-mt-0.5 tw-flex-shrink-0\"></cide-ele-icon>\n <div class=\"tw-ml-2\">\n <h3 class=\"tw-text-xs tw-font-medium tw-text-red-800 tw-m-0\">Error</h3>\n <p class=\"tw-text-xs tw-text-red-700 tw-mt-1 tw-m-0\">{{ error() }}</p>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n\n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n</div>\n\n<!-- Template Renderers -->\n<ng-template #typeDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col\">\n <div class=\"tw-font-medium tw-text-gray-900\">{{ row.sygmt_title || 'N/A' }}</div>\n <div class=\"tw-text-sm tw-text-gray-500 tw-truncate tw-max-w-xs\" title=\"{{ row.sygmt_desc || 'No description' }}\">{{\n row.sygmt_desc || 'No description' }}</div>\n </div>\n</ng-template>\n\n<ng-template #typeStatusRendererTemplate let-row=\"row\">\n <span class=\"tw-inline-flex tw-items-center tw-px-2.5 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium\"\n [class.tw-bg-green-100]=\"row.sygmt_isactive\" [class.tw-text-green-800]=\"row.sygmt_isactive\"\n [class.tw-bg-red-100]=\"!row.sygmt_isactive\" [class.tw-text-red-800]=\"!row.sygmt_isactive\">\n {{ row.sygmt_isactive ? 'Active' : 'Inactive' }}\n </span>\n</ng-template>\n\n\n\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\">\n <cide-ele-dropdown [items]=\"getActionDropdownItems(row)\" [config]=\"getDropdownConfig()\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>" }]
|
|
7788
7846
|
}] });
|
|
7789
7847
|
|
|
7790
7848
|
var generalMasterType_component = /*#__PURE__*/Object.freeze({
|
|
@@ -10278,7 +10336,6 @@ class CideCoreUserCreateComponent {
|
|
|
10278
10336
|
fb = inject(FormBuilder);
|
|
10279
10337
|
userMasterService = inject(CideCoreUserMasterService);
|
|
10280
10338
|
entityService = inject(CideCoreEntityManagementService);
|
|
10281
|
-
CideCoreRoleSelectService = inject(CideCoreRoleSelectService);
|
|
10282
10339
|
designationService = inject(CideCoreDesignationManagementService);
|
|
10283
10340
|
departmentService = inject(CideCoreDepartmentManagementService);
|
|
10284
10341
|
CideCoreGeneralMasterService = inject(CideCoreGeneralMasterService);
|
|
@@ -10341,6 +10398,11 @@ class CideCoreUserCreateComponent {
|
|
|
10341
10398
|
get familyDetailsFormArray() {
|
|
10342
10399
|
return this.userMasterForm.get('core_user_family_details');
|
|
10343
10400
|
}
|
|
10401
|
+
// User search functionality for family member selection
|
|
10402
|
+
userSearchResults = signal({}, ...(ngDevMode ? [{ debugName: "userSearchResults" }] : []));
|
|
10403
|
+
userSearchLoading = signal({}, ...(ngDevMode ? [{ debugName: "userSearchLoading" }] : []));
|
|
10404
|
+
// Debounce timer for search
|
|
10405
|
+
searchDebounceTimers = {};
|
|
10344
10406
|
// Helper method to create entity mapping FormGroup
|
|
10345
10407
|
createEntityMappingFormGroup() {
|
|
10346
10408
|
const today = new Date().toISOString().split('T')[0];
|
|
@@ -10380,7 +10442,11 @@ class CideCoreUserCreateComponent {
|
|
|
10380
10442
|
return this.fb.group({
|
|
10381
10443
|
_id: [''],
|
|
10382
10444
|
syusd_document_type_id_sygms: [''],
|
|
10445
|
+
syusd_doc_number: [''],
|
|
10446
|
+
syusd_doc_name_as_per_doc: [''],
|
|
10383
10447
|
syusd_photo_group_id_cyfm: [''],
|
|
10448
|
+
syusd_doc_issue_date: [''],
|
|
10449
|
+
syusd_doc_expiry_date: [''],
|
|
10384
10450
|
syusd_doc_verification_status_id_sygms: [''],
|
|
10385
10451
|
syusd_document_kyc_status_id_sygms: [''],
|
|
10386
10452
|
syusd_document_file_id_cyfm: [''],
|
|
@@ -10394,10 +10460,13 @@ class CideCoreUserCreateComponent {
|
|
|
10394
10460
|
_id: [''],
|
|
10395
10461
|
syfdl_family_member_name: [''],
|
|
10396
10462
|
syfdl_family_member_id_user: [''],
|
|
10463
|
+
syfdl_family_member_dob: [''],
|
|
10397
10464
|
syfdl_relationship_id_sygms: [''],
|
|
10398
10465
|
syfdl_blood_group_sygms: [''],
|
|
10399
10466
|
syfdl_contact_email: [''],
|
|
10467
|
+
syfdl_contact_email_id: [''],
|
|
10400
10468
|
syfdl_contact_phone: [''],
|
|
10469
|
+
syfdl_contact_number: [''],
|
|
10401
10470
|
syfdl_isactive: [true]
|
|
10402
10471
|
});
|
|
10403
10472
|
}
|
|
@@ -10411,6 +10480,102 @@ class CideCoreUserCreateComponent {
|
|
|
10411
10480
|
{ id: 'family', label: 'Family Details', icon: 'family_restroom' }
|
|
10412
10481
|
];
|
|
10413
10482
|
}
|
|
10483
|
+
// User search methods for family member selection
|
|
10484
|
+
searchUsers(query = '', familyIndex = 0) {
|
|
10485
|
+
// Update loading state for specific family member
|
|
10486
|
+
this.userSearchLoading.update(loading => ({
|
|
10487
|
+
...loading,
|
|
10488
|
+
[familyIndex]: true
|
|
10489
|
+
}));
|
|
10490
|
+
// Create payload for user search - no pagination, larger page size
|
|
10491
|
+
const searchPayload = {
|
|
10492
|
+
total: 0,
|
|
10493
|
+
pageIndex: 1,
|
|
10494
|
+
pageSize: 100, // Load more users at once since no pagination
|
|
10495
|
+
query: query || '',
|
|
10496
|
+
pagination: false, // Disable pagination
|
|
10497
|
+
sort: {
|
|
10498
|
+
order: 'asc',
|
|
10499
|
+
key: 'user_fullname'
|
|
10500
|
+
}
|
|
10501
|
+
};
|
|
10502
|
+
this.userMasterService.getUserList(searchPayload).subscribe({
|
|
10503
|
+
next: (response) => {
|
|
10504
|
+
if (response?.success) {
|
|
10505
|
+
const userData = response?.data || [];
|
|
10506
|
+
this.userSearchResults.update(results => ({
|
|
10507
|
+
...results,
|
|
10508
|
+
[familyIndex]: userData
|
|
10509
|
+
}));
|
|
10510
|
+
}
|
|
10511
|
+
else {
|
|
10512
|
+
this.userSearchResults.update(results => ({
|
|
10513
|
+
...results,
|
|
10514
|
+
[familyIndex]: []
|
|
10515
|
+
}));
|
|
10516
|
+
}
|
|
10517
|
+
},
|
|
10518
|
+
error: (error) => {
|
|
10519
|
+
console.error('Error searching users:', error);
|
|
10520
|
+
this.userSearchResults.update(results => ({
|
|
10521
|
+
...results,
|
|
10522
|
+
[familyIndex]: []
|
|
10523
|
+
}));
|
|
10524
|
+
},
|
|
10525
|
+
complete: () => {
|
|
10526
|
+
this.userSearchLoading.update(loading => ({
|
|
10527
|
+
...loading,
|
|
10528
|
+
[familyIndex]: false
|
|
10529
|
+
}));
|
|
10530
|
+
}
|
|
10531
|
+
});
|
|
10532
|
+
}
|
|
10533
|
+
// Get user options for the select component
|
|
10534
|
+
userOptions(familyIndex = 0) {
|
|
10535
|
+
return this.userSearchResults()[familyIndex] || [];
|
|
10536
|
+
}
|
|
10537
|
+
// Handle search change from the select component with debouncing
|
|
10538
|
+
onUserSearchChange(searchEvent, familyIndex) {
|
|
10539
|
+
const query = searchEvent?.query || searchEvent || '';
|
|
10540
|
+
// Clear existing debounce timer for this family member
|
|
10541
|
+
if (this.searchDebounceTimers[familyIndex]) {
|
|
10542
|
+
clearTimeout(this.searchDebounceTimers[familyIndex]);
|
|
10543
|
+
}
|
|
10544
|
+
// Set new debounce timer (300ms delay)
|
|
10545
|
+
this.searchDebounceTimers[familyIndex] = setTimeout(() => {
|
|
10546
|
+
if (query) {
|
|
10547
|
+
this.searchUsers(query, familyIndex);
|
|
10548
|
+
}
|
|
10549
|
+
else {
|
|
10550
|
+
// If no query, load all users
|
|
10551
|
+
this.searchUsers('', familyIndex);
|
|
10552
|
+
}
|
|
10553
|
+
}, 300);
|
|
10554
|
+
}
|
|
10555
|
+
// Load initial users for the select component
|
|
10556
|
+
loadInitialUsers() {
|
|
10557
|
+
// Load initial users for all existing family members
|
|
10558
|
+
const familyCount = this.familyDetailsFormArray.length;
|
|
10559
|
+
for (let i = 0; i < familyCount; i++) {
|
|
10560
|
+
this.searchUsers('', i);
|
|
10561
|
+
}
|
|
10562
|
+
}
|
|
10563
|
+
// Handle user selection change in the form
|
|
10564
|
+
onUserSelectionChange(event, familyIndex) {
|
|
10565
|
+
const selectedUserId = event?.value || event;
|
|
10566
|
+
if (selectedUserId) {
|
|
10567
|
+
// Find the selected user from the results for this specific family member
|
|
10568
|
+
const userResults = this.userSearchResults()[familyIndex] || [];
|
|
10569
|
+
const selectedUser = userResults.find((user) => user._id === selectedUserId);
|
|
10570
|
+
if (selectedUser) {
|
|
10571
|
+
// Update the family member name field with the selected user's name
|
|
10572
|
+
const familyGroup = this.familyDetailsFormArray.at(familyIndex);
|
|
10573
|
+
familyGroup.patchValue({
|
|
10574
|
+
syfdl_family_member_name: selectedUser.user_fullname || selectedUser.user_username || ''
|
|
10575
|
+
});
|
|
10576
|
+
}
|
|
10577
|
+
}
|
|
10578
|
+
}
|
|
10414
10579
|
entityOptions = signal([], ...(ngDevMode ? [{ debugName: "entityOptions" }] : []));
|
|
10415
10580
|
roleOptions = signal([], ...(ngDevMode ? [{ debugName: "roleOptions" }] : []));
|
|
10416
10581
|
designationOptions = signal({}, ...(ngDevMode ? [{ debugName: "designationOptions" }] : []));
|
|
@@ -10462,6 +10627,8 @@ class CideCoreUserCreateComponent {
|
|
|
10462
10627
|
this.loadDropdownOptions();
|
|
10463
10628
|
this.setupFormSubscriptions();
|
|
10464
10629
|
this.setEntityIdFromAppState();
|
|
10630
|
+
// Load initial users for family member selection
|
|
10631
|
+
this.loadInitialUsers();
|
|
10465
10632
|
});
|
|
10466
10633
|
}
|
|
10467
10634
|
/**
|
|
@@ -10500,6 +10667,20 @@ class CideCoreUserCreateComponent {
|
|
|
10500
10667
|
// Set password validation based on mode
|
|
10501
10668
|
this.updatePasswordValidation();
|
|
10502
10669
|
}
|
|
10670
|
+
/**
|
|
10671
|
+
* Cleanup when component is destroyed
|
|
10672
|
+
*/
|
|
10673
|
+
ngOnDestroy() {
|
|
10674
|
+
console.log('🧹 CideCoreUserCreateComponent: Cleaning up component state');
|
|
10675
|
+
// Clear all debounce timers
|
|
10676
|
+
Object.values(this.searchDebounceTimers).forEach(timer => {
|
|
10677
|
+
if (timer) {
|
|
10678
|
+
clearTimeout(timer);
|
|
10679
|
+
}
|
|
10680
|
+
});
|
|
10681
|
+
this.searchDebounceTimers = {};
|
|
10682
|
+
console.log('🧹 CideCoreUserCreateComponent: Component state cleaned up');
|
|
10683
|
+
}
|
|
10503
10684
|
/**
|
|
10504
10685
|
* Update password validation based on create/edit mode
|
|
10505
10686
|
*/
|
|
@@ -10688,10 +10869,14 @@ class CideCoreUserCreateComponent {
|
|
|
10688
10869
|
const documentGroup = this.createDocumentFormGroup();
|
|
10689
10870
|
documentGroup.patchValue({
|
|
10690
10871
|
_id: document._id || '',
|
|
10691
|
-
syusd_document_type_id_sygms: document.syusd_document_type_id_sygms || '',
|
|
10872
|
+
syusd_document_type_id_sygms: document.syusd_document_type_id_sygms?._id || '',
|
|
10873
|
+
syusd_doc_number: document.syusd_doc_number || '',
|
|
10874
|
+
syusd_doc_name_as_per_doc: document.syusd_doc_name_as_per_doc || '',
|
|
10692
10875
|
syusd_photo_group_id_cyfm: document.syusd_photo_group_id_cyfm || '',
|
|
10693
|
-
|
|
10694
|
-
|
|
10876
|
+
syusd_doc_issue_date: document.syusd_doc_issue_date || '',
|
|
10877
|
+
syusd_doc_expiry_date: document.syusd_doc_expiry_date || '',
|
|
10878
|
+
syusd_doc_verification_status_id_sygms: document.syusd_doc_verification_status_id_sygms?._id || '',
|
|
10879
|
+
syusd_document_kyc_status_id_sygms: document.syusd_document_kyc_status_id_sygms?._id || '',
|
|
10695
10880
|
syusd_document_file_id_cyfm: document.syusd_document_file_id_cyfm || '',
|
|
10696
10881
|
syusd_document_remarks: document.syusd_document_remarks || '',
|
|
10697
10882
|
syusd_isactive: document.syusd_isactive ?? true
|
|
@@ -10713,11 +10898,14 @@ class CideCoreUserCreateComponent {
|
|
|
10713
10898
|
familyGroup.patchValue({
|
|
10714
10899
|
_id: familyDetail._id || '',
|
|
10715
10900
|
syfdl_family_member_name: familyDetail.syfdl_family_member_name || '',
|
|
10716
|
-
syfdl_family_member_id_user: familyDetail.syfdl_family_member_id_user || '',
|
|
10717
|
-
|
|
10718
|
-
|
|
10901
|
+
syfdl_family_member_id_user: familyDetail.syfdl_family_member_id_user?._id || '',
|
|
10902
|
+
syfdl_family_member_dob: familyDetail.syfdl_family_member_dob || '',
|
|
10903
|
+
syfdl_relationship_id_sygms: familyDetail.syfdl_relationship_id_sygms?._id || '',
|
|
10904
|
+
syfdl_blood_group_sygms: familyDetail.syfdl_blood_group_sygms?._id || '',
|
|
10719
10905
|
syfdl_contact_email: familyDetail.syfdl_contact_email || '',
|
|
10906
|
+
syfdl_contact_email_id: familyDetail.syfdl_contact_email_id || '',
|
|
10720
10907
|
syfdl_contact_phone: familyDetail.syfdl_contact_phone || '',
|
|
10908
|
+
syfdl_contact_number: familyDetail.syfdl_contact_number || '',
|
|
10721
10909
|
syfdl_isactive: familyDetail.syfdl_isactive ?? true
|
|
10722
10910
|
});
|
|
10723
10911
|
this.familyDetailsFormArray.push(familyGroup);
|
|
@@ -10742,7 +10930,6 @@ class CideCoreUserCreateComponent {
|
|
|
10742
10930
|
this.loadAddressTypes();
|
|
10743
10931
|
// Load document and family dropdown options
|
|
10744
10932
|
this.loadDocumentTypes();
|
|
10745
|
-
this.loadPhotoGroups();
|
|
10746
10933
|
this.loadDocumentVerificationStatus();
|
|
10747
10934
|
this.loadDocumentKycStatus();
|
|
10748
10935
|
this.loadBloodGroups();
|
|
@@ -11329,70 +11516,46 @@ class CideCoreUserCreateComponent {
|
|
|
11329
11516
|
});
|
|
11330
11517
|
}
|
|
11331
11518
|
addDocument() {
|
|
11332
|
-
|
|
11333
|
-
|
|
11334
|
-
|
|
11335
|
-
|
|
11336
|
-
|
|
11337
|
-
|
|
11338
|
-
syusd_doc_expiry_date: undefined,
|
|
11339
|
-
syusd_doc_verification_status_id_sygms: {},
|
|
11340
|
-
syusd_doc_kyc_status_id_sygms: {}
|
|
11341
|
-
};
|
|
11342
|
-
this.documents.update(docs => [...docs, newDocument]);
|
|
11343
|
-
// Add form controls for the new document
|
|
11344
|
-
const currentDocuments = this.documents();
|
|
11345
|
-
const index = currentDocuments.length - 1;
|
|
11346
|
-
this.userMasterForm.addControl(`documents.${index}.syusd_document_type_id_sygms`, this.fb.control(''));
|
|
11347
|
-
this.userMasterForm.addControl(`documents.${index}.syusd_doc_number`, this.fb.control(''));
|
|
11348
|
-
this.userMasterForm.addControl(`documents.${index}.syusd_doc_name_as_per_doc`, this.fb.control(''));
|
|
11349
|
-
this.userMasterForm.addControl(`documents.${index}.syusd_photo_group_id_cyfm`, this.fb.control(''));
|
|
11350
|
-
this.userMasterForm.addControl(`documents.${index}.syusd_doc_issue_date`, this.fb.control(''));
|
|
11351
|
-
this.userMasterForm.addControl(`documents.${index}.syusd_doc_expiry_date`, this.fb.control(''));
|
|
11352
|
-
this.userMasterForm.addControl(`documents.${index}.syusd_doc_verification_status_id_sygms`, this.fb.control(''));
|
|
11353
|
-
this.userMasterForm.addControl(`documents.${index}.syusd_doc_kyc_status_id_sygms`, this.fb.control(''));
|
|
11519
|
+
// Create a new document FormGroup using the existing helper method
|
|
11520
|
+
const newDocumentGroup = this.createDocumentFormGroup();
|
|
11521
|
+
// Add the new document FormGroup to the FormArray
|
|
11522
|
+
this.documentsFormArray.push(newDocumentGroup);
|
|
11523
|
+
// Update the documents signal to keep UI in sync
|
|
11524
|
+
this.documents.update(docs => [...docs, newDocumentGroup.value]);
|
|
11354
11525
|
}
|
|
11355
11526
|
removeDocument(index) {
|
|
11356
|
-
// Remove
|
|
11357
|
-
this.
|
|
11358
|
-
|
|
11359
|
-
this.userMasterForm.removeControl(`documents.${index}.syusd_doc_name_as_per_doc`);
|
|
11360
|
-
this.userMasterForm.removeControl(`documents.${index}.syusd_photo_group_id_cyfm`);
|
|
11361
|
-
this.userMasterForm.removeControl(`documents.${index}.syusd_doc_issue_date`);
|
|
11362
|
-
this.userMasterForm.removeControl(`documents.${index}.syusd_doc_expiry_date`);
|
|
11363
|
-
this.userMasterForm.removeControl(`documents.${index}.syusd_doc_verification_status_id_sygms`);
|
|
11364
|
-
this.userMasterForm.removeControl(`documents.${index}.syusd_doc_kyc_status_id_sygms`);
|
|
11527
|
+
// Remove the document from the FormArray
|
|
11528
|
+
this.documentsFormArray.removeAt(index);
|
|
11529
|
+
// Update the documents signal to keep UI in sync
|
|
11365
11530
|
this.documents.update(docs => docs.filter((_, i) => i !== index));
|
|
11366
11531
|
}
|
|
11367
11532
|
addFamilyDetail() {
|
|
11368
|
-
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11374
|
-
|
|
11375
|
-
|
|
11376
|
-
this.
|
|
11377
|
-
// Add form controls for the new family detail
|
|
11378
|
-
const currentFamilies = this.familyDetails();
|
|
11379
|
-
const index = currentFamilies.length - 1;
|
|
11380
|
-
this.userMasterForm.addControl(`family_details.${index}.syfdl_family_member_name`, this.fb.control(''));
|
|
11381
|
-
this.userMasterForm.addControl(`family_details.${index}.syfdl_relationship_id_sygms`, this.fb.control(''));
|
|
11382
|
-
this.userMasterForm.addControl(`family_details.${index}.syfdl_family_member_dob`, this.fb.control(''));
|
|
11383
|
-
this.userMasterForm.addControl(`family_details.${index}.syfdl_blood_group_sygms`, this.fb.control(''));
|
|
11384
|
-
this.userMasterForm.addControl(`family_details.${index}.syfdl_contact_email_id`, this.fb.control(''));
|
|
11385
|
-
this.userMasterForm.addControl(`family_details.${index}.syfdl_contact_number`, this.fb.control(''));
|
|
11533
|
+
// Create a new family detail FormGroup using the existing helper method
|
|
11534
|
+
const newFamilyGroup = this.createFamilyDetailFormGroup();
|
|
11535
|
+
// Add the new family detail FormGroup to the FormArray
|
|
11536
|
+
this.familyDetailsFormArray.push(newFamilyGroup);
|
|
11537
|
+
// Update the family details signal to keep UI in sync
|
|
11538
|
+
this.familyDetails.update(families => [...families, newFamilyGroup.value]);
|
|
11539
|
+
// Load initial users for the new family member
|
|
11540
|
+
const newIndex = this.familyDetailsFormArray.length - 1;
|
|
11541
|
+
this.searchUsers('', newIndex);
|
|
11386
11542
|
}
|
|
11387
11543
|
removeFamilyDetail(index) {
|
|
11388
|
-
// Remove
|
|
11389
|
-
this.
|
|
11390
|
-
|
|
11391
|
-
this.userMasterForm.removeControl(`family_details.${index}.syfdl_family_member_dob`);
|
|
11392
|
-
this.userMasterForm.removeControl(`family_details.${index}.syfdl_blood_group_sygms`);
|
|
11393
|
-
this.userMasterForm.removeControl(`family_details.${index}.syfdl_contact_email_id`);
|
|
11394
|
-
this.userMasterForm.removeControl(`family_details.${index}.syfdl_contact_number`);
|
|
11544
|
+
// Remove the family detail from the FormArray
|
|
11545
|
+
this.familyDetailsFormArray.removeAt(index);
|
|
11546
|
+
// Update the family details signal to keep UI in sync
|
|
11395
11547
|
this.familyDetails.update(families => families.filter((_, i) => i !== index));
|
|
11548
|
+
// Clean up user search data for the removed family member
|
|
11549
|
+
this.userSearchResults.update(results => {
|
|
11550
|
+
const newResults = { ...results };
|
|
11551
|
+
delete newResults[index];
|
|
11552
|
+
return newResults;
|
|
11553
|
+
});
|
|
11554
|
+
this.userSearchLoading.update(loading => {
|
|
11555
|
+
const newLoading = { ...loading };
|
|
11556
|
+
delete newLoading[index];
|
|
11557
|
+
return newLoading;
|
|
11558
|
+
});
|
|
11396
11559
|
}
|
|
11397
11560
|
onSubmit() {
|
|
11398
11561
|
// Custom validation: ensure at least one entity mapping exists
|
|
@@ -11408,14 +11571,14 @@ class CideCoreUserCreateComponent {
|
|
|
11408
11571
|
if (this.userMasterForm.valid) {
|
|
11409
11572
|
this.loading.set(true);
|
|
11410
11573
|
// Prepare form data with entity mappings and menu rights
|
|
11411
|
-
const { core_entity_mapping, menu_rights, core_user_contact_addresses, ...auth_user_mst } = this.userMasterForm.value;
|
|
11574
|
+
const { core_entity_mapping, menu_rights, core_user_contact_addresses, core_user_documents, core_user_family_details, ...auth_user_mst } = this.userMasterForm.value;
|
|
11412
11575
|
const formData = {
|
|
11413
11576
|
auth_user_mst: auth_user_mst,
|
|
11414
11577
|
core_entity_mapping: core_entity_mapping || [],
|
|
11415
11578
|
menu_rights: this.menuRightsMap() || {},
|
|
11416
11579
|
core_user_contact_addresses: core_user_contact_addresses || [],
|
|
11417
|
-
core_user_documents: [],
|
|
11418
|
-
core_user_family_details: [],
|
|
11580
|
+
core_user_documents: core_user_documents || [],
|
|
11581
|
+
core_user_family_details: core_user_family_details || [],
|
|
11419
11582
|
core_user_attributes: []
|
|
11420
11583
|
};
|
|
11421
11584
|
if (this.userId()) {
|
|
@@ -11491,25 +11654,13 @@ class CideCoreUserCreateComponent {
|
|
|
11491
11654
|
while (this.contactAddressesFormArray.length !== 0) {
|
|
11492
11655
|
this.contactAddressesFormArray.removeAt(0);
|
|
11493
11656
|
}
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
this.
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
this.
|
|
11501
|
-
this.userMasterForm.removeControl(`documents.${i}.syusd_doc_expiry_date`);
|
|
11502
|
-
this.userMasterForm.removeControl(`documents.${i}.syusd_doc_verification_status_id_sygms`);
|
|
11503
|
-
this.userMasterForm.removeControl(`documents.${i}.syusd_doc_kyc_status_id_sygms`);
|
|
11504
|
-
}
|
|
11505
|
-
const familyCount = this.familyDetails().length;
|
|
11506
|
-
for (let i = 0; i < familyCount; i++) {
|
|
11507
|
-
this.userMasterForm.removeControl(`family_details.${i}.syfdl_family_member_name`);
|
|
11508
|
-
this.userMasterForm.removeControl(`family_details.${i}.syfdl_relationship_id_sygms`);
|
|
11509
|
-
this.userMasterForm.removeControl(`family_details.${i}.syfdl_family_member_dob`);
|
|
11510
|
-
this.userMasterForm.removeControl(`family_details.${i}.syfdl_blood_group_sygms`);
|
|
11511
|
-
this.userMasterForm.removeControl(`family_details.${i}.syfdl_contact_email_id`);
|
|
11512
|
-
this.userMasterForm.removeControl(`family_details.${i}.syfdl_contact_number`);
|
|
11657
|
+
// Clear documents FormArray
|
|
11658
|
+
while (this.documentsFormArray.length !== 0) {
|
|
11659
|
+
this.documentsFormArray.removeAt(0);
|
|
11660
|
+
}
|
|
11661
|
+
// Clear family details FormArray
|
|
11662
|
+
while (this.familyDetailsFormArray.length !== 0) {
|
|
11663
|
+
this.familyDetailsFormArray.removeAt(0);
|
|
11513
11664
|
}
|
|
11514
11665
|
// Clear entity mapping FormArray
|
|
11515
11666
|
while (this.entityMappingsFormArray.length !== 0) {
|
|
@@ -11852,18 +12003,6 @@ class CideCoreUserCreateComponent {
|
|
|
11852
12003
|
}
|
|
11853
12004
|
});
|
|
11854
12005
|
}
|
|
11855
|
-
/**
|
|
11856
|
-
* Load photo groups
|
|
11857
|
-
*/
|
|
11858
|
-
loadPhotoGroups() {
|
|
11859
|
-
// TODO: Implement photo group service call
|
|
11860
|
-
// For now, using mock data
|
|
11861
|
-
this.photoGroupOptions.set([
|
|
11862
|
-
{ _id: '1', cyfm_name: 'Profile Photos' },
|
|
11863
|
-
{ _id: '2', cyfm_name: 'Document Photos' },
|
|
11864
|
-
{ _id: '3', cyfm_name: 'ID Card Photos' }
|
|
11865
|
-
]);
|
|
11866
|
-
}
|
|
11867
12006
|
/**
|
|
11868
12007
|
* Load document verification status from general master service
|
|
11869
12008
|
*/
|
|
@@ -11977,7 +12116,7 @@ class CideCoreUserCreateComponent {
|
|
|
11977
12116
|
});
|
|
11978
12117
|
}
|
|
11979
12118
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideCoreUserCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11980
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreUserCreateComponent, isStandalone: true, selector: "cide-core-user-create", ngImport: i0, template: "<!-- \n ENTERPRISE USER MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<div class=\"tw-w-full tw-h-full tw-p-3\">\n <form class=\"tw-max-w-7xl tw-mx-auto tw-bg-transparent\" [formGroup]=\"userMasterForm\" [class.tw-opacity-60]=\"loading()\"\n (ngSubmit)=\"onSubmit()\">\n\n <!-- User Context Header -->\n <div\n class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-indigo-50 tw-border tw-border-blue-200 tw-rounded-md tw-p-2 tw-mb-3 tw-shadow-sm\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-flex-wrap tw-gap-2\">\n <!-- User Basic Info Display -->\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-flex-wrap\">\n <!-- Profile Photo Preview -->\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-full tw-bg-blue-100 tw-border tw-border-blue-200 tw-flex tw-items-center tw-justify-center tw-overflow-hidden\">\n @if (getUserPhoto()) {\n <img [src]=\"getUserPhoto()\" alt=\"Profile\" class=\"tw-w-full tw-h-full tw-object-cover\">\n } @else {\n <cide-ele-icon variant=\"blue\" size=\"xs\">person</cide-ele-icon>\n }\n </div>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-xs tw-font-medium tw-text-blue-900\">\n {{ getUserFullName() || 'New User' }}\n </span>\n <span class=\"tw-text-xs tw-text-blue-600\">\n {{ getUserUsername() || 'Username not set' }}\n </span>\n </div>\n </div>\n\n <!-- Contact Info -->\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-700\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">email</cide-ele-icon>\n <span>{{ getUserEmail() || 'Email not set' }}</span>\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-700\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">phone</cide-ele-icon>\n <span>{{ getUserMobile() || 'Mobile not set' }}</span>\n </div>\n </div>\n\n <!-- Active Status -->\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n @if (getUserActiveStatus()) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-700\">\n <cide-ele-icon variant=\"green\" size=\"xs\" class=\"tw-mr-1\">check_circle</cide-ele-icon>\n Active\n </span>\n } @else {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-xs tw-font-medium tw-bg-red-100 tw-text-red-700\">\n <cide-ele-icon variant=\"red\" size=\"xs\" class=\"tw-mr-1\">cancel</cide-ele-icon>\n Inactive\n </span>\n }\n </div>\n </div>\n\n <!-- Entity Info -->\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n @if (hasDefaultEntity()) {\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-blue-700\">\n <cide-ele-icon variant=\"blue\" size=\"xs\">business</cide-ele-icon>\n <span class=\"tw-font-medium\">{{ getDefaultEntityName() }}</span>\n </div>\n } @else {\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-500\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">business</cide-ele-icon>\n <span class=\"tw-italic\">No entity</span>\n </div>\n }\n\n <span class=\"tw-text-xs tw-text-gray-600 tw-px-2 tw-py-1 tw-bg-gray-100 tw-rounded\">\n {{ getEntityMappingCount() }} mapping(s)\n </span>\n </div>\n </div>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"tw-p-0 tw-mb-2 tw-border-b tw-border-gray-200\">\n <cide-ele-tab [tabs]=\"userTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- User Basic Information Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n\n <!-- Name Fields -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-4 lg:tw-grid-cols-2 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input id=\"user_firstname\" label=\"First Name *\" formControlName=\"user_firstname\"\n placeholder=\"Enter first name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_middlename\" label=\"Middle Name\" formControlName=\"user_middlename\"\n placeholder=\"Enter middle name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_lastname\" label=\"Last Name *\" formControlName=\"user_lastname\"\n placeholder=\"Enter last name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_fullname\" label=\"Full Name * (Auto-generated)\" formControlName=\"user_fullname\"\n placeholder=\"Auto-generated from name fields or enter manually\" [maxlength]=\"62\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Contact and Login Information -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-3 lg:tw-grid-cols-2 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input id=\"user_username\" label=\"Username *\" formControlName=\"user_username\"\n placeholder=\"Enter unique username\" [maxlength]=\"20\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_emailid\" label=\"Email ID *\" formControlName=\"user_emailid\" type=\"email\"\n placeholder=\"Enter valid email address\" [maxlength]=\"320\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_mobileno\" label=\"Mobile Number *\" formControlName=\"user_mobileno\" type=\"tel\"\n placeholder=\"Enter mobile number\" [maxlength]=\"15\" size=\"md\">\n </cide-ele-input>\n </div>\n\n\n\n <!-- Status Control -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-4\">\n <div class=\"tw-p-4 tw-bg-blue-50 tw-border tw-border-blue-100 tw-rounded-lg\">\n <label\n class=\"tw-flex tw-flex-col tw-cursor-pointer tw-py-2 tw-bg-transparent tw-border-none tw-rounded-none tw-transition-all tw-duration-200 hover:tw-bg-blue-75\">\n <cide-ele-input type=\"checkbox\" label=\"Active User Status\" formControlName=\"user_isactive\"\n class=\"tw-h-5 tw-accent-blue-500 tw-rounded tw-mb-1\" />\n <span class=\"tw-font-semibold tw-text-gray-700 tw-text-base\"></span>\n <span class=\"tw-text-sm tw-text-gray-600 tw-mt-1 tw-leading-relaxed\">Enable this user account for system\n access and operations</span>\n </label>\n </div>\n </div>\n </div>\n }\n\n @case ('auth') {\n <!-- Authentication Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <!-- Password Fields -->\n @if (shouldShowPasswordFields()) {\n <div class=\"tw-mb-6\">\n <!-- Password Fields Header for Edit Mode -->\n @if (isEditMode()) {\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-3\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Update Password</h6>\n <button type=\"button\"\n class=\"tw-px-3 tw-py-1 tw-bg-gray-100 tw-text-gray-600 tw-border tw-border-gray-300 tw-rounded-md tw-text-xs tw-font-medium hover:tw-bg-gray-200 tw-transition-colors\"\n (click)=\"cancelPasswordUpdate()\">\n Cancel Password Update\n </button>\n </div>\n }\n\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 md:tw-grid-cols-1 tw-gap-6\">\n <cide-ele-input id=\"user_password\" [label]=\"getPasswordFieldLabel()\" formControlName=\"user_password\"\n type=\"password\" placeholder=\"Enter secure password (min 8 characters)\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_confirm_password\" [label]=\"getPasswordConfirmLabel()\"\n formControlName=\"user_confirm_password\" type=\"password\" placeholder=\"Confirm your password\" size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n }\n\n <!-- Password Update Option for Edit Mode -->\n @if (isEditMode() && !shouldShowPasswordFields()) {\n <div class=\"tw-mb-6\">\n <div class=\"tw-p-4 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-blue-800 tw-mb-2\">Password Update</h6>\n <p class=\"tw-text-sm tw-text-blue-600 tw-mb-3\">Current password will be kept. Click below to change\n password.</p>\n\n @if (hasPasswordInput()) {\n <div\n class=\"tw-mb-3 tw-p-2 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded tw-text-sm tw-text-yellow-700\">\n <cide-ele-icon variant=\"yellow\" size=\"xs\" class=\"tw-mr-1\">warning</cide-ele-icon>\n Password fields contain text. Click \"Change Password\" to manage existing input.\n </div>\n }\n\n <button type=\"button\"\n class=\"tw-px-4 tw-py-2 tw-bg-blue-100 tw-text-blue-700 tw-border tw-border-blue-300 tw-rounded-md tw-text-sm tw-font-medium hover:tw-bg-blue-200 tw-transition-colors\"\n (click)=\"triggerPasswordUpdate()\">\n @if (hasPasswordInput()) {\n Manage Password Fields\n } @else {\n Change Password\n }\n </button>\n </div>\n </div>\n }\n\n <!-- Password Options -->\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-6 tw-mb-6\">\n <div class=\"tw-p-4 tw-bg-yellow-50 tw-border tw-border-yellow-100 tw-rounded-lg\">\n <label\n class=\"tw-flex tw-flex-col tw-gap-2 tw-cursor-pointer tw-py-2 tw-bg-transparent tw-border-none tw-rounded-none tw-transition-all tw-duration-200\">\n <cide-ele-input type=\"checkbox\" label=\"Force Password Change on Login\"\n formControlName=\"user_passwordchangeonlogin\" class=\"tw-h-5 tw-accent-yellow-500 tw-rounded tw-mb-1\" />\n <span class=\"tw-text-sm tw-text-gray-600 tw-mt-1 tw-leading-relaxed\">User will be required to change\n password on next login</span>\n </label>\n </div>\n </div>\n\n <!-- Photo Upload -->\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-6 tw-mb-6\">\n <div class=\"tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg tw-p-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800 tw-mb-3\">Profile Photo</h6>\n <div class=\"tw-flex tw-flex-col tw-items-center tw-gap-4\">\n <cide-ele-file-input id=\"user_photo_upload\" formControlName=\"user_photo_id_cyfm\" accept=\"image/*\"\n [showPreview]=\"true\" [previewBoxMode]=\"true\" previewWidth=\"150px\" previewHeight=\"150px\"\n placeholderText=\"Click to upload photo\" placeholderIcon=\"\uD83D\uDC64\">\n </cide-ele-file-input>\n <div class=\"tw-text-xs tw-text-gray-500 tw-text-center tw-max-w-sm\">\n Supported formats: JPG, PNG, GIF. Maximum size: 2MB. Recommended size: 150x150px for best results.\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('roles') {\n <!-- Entity, Roles & Permissions Mapping Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n\n\n\n <!-- Important Note -->\n <div class=\"tw-bg-amber-50 tw-border tw-border-amber-200 tw-rounded-lg tw-p-4 tw-mb-6\">\n <div class=\"tw-flex tw-items-start tw-gap-3\">\n <cide-ele-icon variant=\"amber\" size=\"lg\">info</cide-ele-icon>\n <div class=\"tw-flex-1\">\n <h4 class=\"tw-text-sm tw-font-semibold tw-text-amber-800 tw-mb-1\">Entity-Role Based Access</h4>\n <p class=\"tw-text-sm tw-text-amber-700 tw-mb-2\">User access is completely managed through entity-role\n mappings below. At least one entity mapping is required for user access.</p>\n @if (hasDefaultEntity()) {\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mt-2 tw-p-2 tw-bg-amber-100 tw-rounded\">\n <cide-ele-icon variant=\"amber\" size=\"sm\">star</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-amber-800\">\n <strong>Default Entity:</strong> {{ getDefaultEntityName() }}\n </span>\n </div>\n } @else {\n <div class=\"tw-text-sm tw-text-amber-600 tw-mt-2 tw-italic\">\n \u26A0\uFE0F No default entity selected. Please set one entity as default.\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Entity-Role Mapping Section -->\n <div class=\"tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg tw-p-6 tw-mb-6\">\n <div class=\"tw-flex tw-text-center tw-justify-between tw-items-center tw-mb-4\">\n <div>\n <h4 class=\"tw-text-sm tw-text-left tw-font-semibold tw-text-blue-900 tw-mb-1\">Entity-Role Mapping</h4>\n <p class=\"tw-text-sm tw-text-blue-700\">Map user to entities with specific roles and permissions</p>\n </div>\n <div class=\"tw-flex tw-flex-col tw-items-end\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addEntityMapping()\" leftIcon=\"add\"\n [disabled]=\"isAllEntitiesMapped()\">\n Add Entity Mapping\n </button>\n \n @if (isAllEntitiesMapped()) {\n <div class=\"tw-mt-2 tw-p-2 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-md tw-max-w-xs\">\n <p class=\"tw-text-xs tw-text-blue-700\">\n <cide-ele-icon variant=\"info\" size=\"xs\" class=\"tw-mr-1\">info</cide-ele-icon>\n All available entities are already mapped.\n </p>\n </div>\n }\n </div>\n </div>\n\n <div formArrayName=\"core_entity_mapping\">\n @for (mapping of entityMappings(); track $index; let i = $index) {\n <div class=\"tw-bg-white tw-border tw-border-blue-200 tw-rounded-xl tw-mb-6 tw-overflow-hidden tw-shadow-sm\"\n [formGroupName]=\"i\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-blue-100 tw-px-6 tw-py-3 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-blue-200\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <h5 class=\"tw-m-0 tw-text-blue-800 tw-text-sm tw-font-semibold\">Entity Mapping {{ i + 1 }}</h5>\n @if (mapping.syenm_isdefault) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800\">\n <cide-ele-icon variant=\"green\" size=\"xs\" class=\"tw-mr-1\">star</cide-ele-icon>\n Default\n </span>\n }\n </div>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeEntityMapping(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n\n <div class=\"tw-p-6\">\n <!-- Entity and Role Selection -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <div>\n <cide-ele-select label=\"Entity *\" [options]=\"getFilteredEntityOptions(i)\" formControlName=\"syenm_entity_id_syen\"\n valueKey=\"_id\" labelKey=\"syen_name\" placeholder=\"Select entity\" size=\"md\"\n (change)=\"onEntityChange(i, $event)\">\n </cide-ele-select>\n \n @if (isAllEntitiesSelected(i)) {\n <div class=\"tw-mt-2 tw-p-2 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded-md\">\n <p class=\"tw-text-xs tw-text-yellow-700\">\n <cide-ele-icon variant=\"warning\" size=\"xs\" class=\"tw-mr-1\">info</cide-ele-icon>\n All entities are already mapped. Remove another mapping to add this one.\n </p>\n </div>\n }\n </div>\n\n <cide-ele-select label=\"Role for this Entity\" [options]=\"getRoleOptionsForEntity(i)\"\n formControlName=\"syenm_role_id_syusrol\" placeholder=\"Select role for this entity\" size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Entity-Specific Details -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Department for this Entity\" [options]=\"getDepartmentOptionsForEntity(i)\"\n formControlName=\"syenm_department_id_sydept\" (change)=\"onDepartmentChange($event)\" valueKey=\"_id\" labelKey=\"sydept_name\" placeholder=\"Select department\" size=\"md\">\n </cide-ele-select>\n\n <cide-ele-select label=\"Designation for this Entity\" [options]=\"getDesignationOptionsForEntity(i)\" valueKey=\"_id\" labelKey=\"sydsg_name\"\n formControlName=\"syenm_designation_id_sydsg\" placeholder=\"Select designation\" size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Active Period for Entity Mapping -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Active From *\" [id]=\"'syenm_activefrom['+i+']'\"\n formControlName=\"syenm_activefrom\" type=\"date\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Active Until\" [id]=\"'syenm_activeupto['+i+']'\"\n formControlName=\"syenm_activeupto\" type=\"date\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Mapping Settings -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6 tw-mb-6\">\n <div class=\"tw-p-3 tw-bg-green-50 tw-border tw-border-green-200 tw-rounded-lg\">\n <cide-ele-input type=\"checkbox\" label=\"Default Entity\" formControlName=\"syenm_isdefault\"\n (change)=\"onDefaultEntityChange(i, $event)\" class=\"tw-h-5 tw-accent-green-500\" />\n <span class=\"tw-text-xs tw-text-green-600 tw-block tw-mt-1\">Set as user's default entity (only one\n allowed)</span>\n </div>\n\n <div class=\"tw-p-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\n <cide-ele-input type=\"checkbox\" label=\"Active Mapping\" formControlName=\"syenm_isactive\"\n class=\"tw-h-5 tw-accent-blue-500\" />\n <span class=\"tw-text-xs tw-text-blue-600 tw-block tw-mt-1\">Enable this entity mapping</span>\n </div>\n </div>\n\n <!-- Menu Rights Grid for this Entity-Role -->\n <div class=\"tw-border-t tw-border-gray-200 tw-pt-4\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Menu Rights & Permissions</h6>\n <div class=\"tw-flex tw-gap-2\">\n <button cideEleButton variant=\"secondary\" size=\"sm\" type=\"button\" (click)=\"refreshMenuRights(i)\"\n leftIcon=\"refresh\">\n Refresh Rights\n </button>\n </div>\n </div>\n\n @if (getMenuRightsForMapping(i).length > 0) {\n <!-- Menu Rights Grid -->\n <div class=\"tw-overflow-x-auto tw-bg-white tw-border tw-border-gray-200 tw-rounded-lg\">\n <table class=\"tw-w-full tw-text-sm\">\n <thead class=\"tw-bg-gray-50 tw-border-b tw-border-gray-200\">\n <tr>\n <th class=\"tw-px-4 tw-py-3 tw-text-left tw-font-medium tw-text-gray-700\">Menu</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Role Rights</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Create</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Read</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Update</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Delete</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Exception</th>\n </tr>\n </thead>\n <tbody>\n @for (menuRight of getMenuRightsForMapping(i); track $index; let j = $index) {\n <tr class=\"tw-border-b tw-border-gray-100 hover:tw-bg-gray-50\">\n <td class=\"tw-px-4 tw-py-3 tw-font-medium tw-text-gray-900\">\n {{ menuRight.menu_name }}\n <div class=\"tw-text-xs tw-text-gray-500\">{{ menuRight.menu_code }}</div>\n </td>\n\n <!-- Role Rights Display -->\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <div class=\"tw-flex tw-flex-wrap tw-justify-center tw-gap-1\">\n @for (right of menuRight.role_rights; track $index) {\n <span\n class=\"tw-inline-block tw-px-2 tw-py-1 tw-text-xs tw-bg-blue-100 tw-text-blue-800 tw-rounded\">\n {{ right }}\n </span>\n }\n </div>\n </td>\n\n <!-- Individual Permission Controls -->\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.create'\"\n class=\"tw-h-4 tw-accent-green-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.read'\"\n class=\"tw-h-4 tw-accent-blue-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.update'\"\n class=\"tw-h-4 tw-accent-yellow-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.delete'\"\n class=\"tw-h-4 tw-accent-red-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n @if (hasExceptionForMenu(i, menuRight.menu_id)) {\n <span\n class=\"tw-inline-block tw-px-2 tw-py-1 tw-text-xs tw-bg-yellow-100 tw-text-yellow-800 tw-rounded\">\n Override\n </span>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">Default</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <!-- Legend -->\n <div class=\"tw-mt-4 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <h6 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 tw-mb-2\">Legend:</h6>\n <div class=\"tw-grid tw-grid-cols-2 md:tw-grid-cols-4 tw-gap-3 tw-text-xs tw-text-gray-600\">\n <div><span class=\"tw-w-3 tw-h-3 tw-bg-blue-100 tw-inline-block tw-rounded tw-mr-2\"></span>Role\n Rights: Inherited from role</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-yellow-100 tw-inline-block tw-rounded tw-mr-2\"></span>Override:\n User-specific exception</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-green-100 tw-inline-block tw-rounded tw-mr-2\"></span>Enabled:\n Permission granted</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-gray-100 tw-inline-block tw-rounded tw-mr-2\"></span>Disabled:\n Permission restricted</div>\n </div>\n </div>\n\n } @else {\n <div class=\"tw-text-center tw-py-8 tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg\">\n <div class=\"tw-text-gray-400 tw-mb-3\">\n <cide-ele-icon variant=\"gray\" size=\"lg\">menu</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-600 tw-mb-2\">No Menu Rights Available</h6>\n <p class=\"tw-text-xs tw-text-gray-500 tw-mb-3 tw-text-center\">Select both entity and role to load\n menu rights for this mapping.</p>\n @if (mapping.syenm_entity_id_syen?._id && mapping.syenm_role_id_syusrol) {\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"button\" (click)=\"loadMenuRights(i)\"\n leftIcon=\"refresh\">\n Load Menu Rights\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (entityMappings().length === 0) {\n <div class=\"tw-text-center tw-py-8 tw-bg-white tw-border tw-border-blue-200 tw-rounded-lg\">\n <div class=\"tw-text-blue-400 tw-mb-3\">\n <cide-ele-icon variant=\"blue\" size=\"lg\">business</cide-ele-icon>\n </div>\n <h4 class=\"tw-text-sm tw-font-medium tw-text-blue-800 tw-mb-2\">No Entity Mappings</h4>\n <p class=\"tw-text-blue-600 tw-mb-4 tw-text-center\">Add entity mappings to assign specific roles and\n permissions for different entities.</p>\n <button class=\"tw-mx-auto\" cideEleButton variant=\"primary\" size=\"md\" type=\"button\"\n (click)=\"addEntityMapping()\" leftIcon=\"add\">\n Add First Entity Mapping\n </button>\n </div>\n }\n </div>\n\n\n </div>\n }\n\n @case ('addresses') {\n <!-- Contact Addresses Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end\">\n <div class=\"tw-flex tw-justify-between tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addContactAddress()\"\n leftIcon=\"add\">\n Add New Address\n </button>\n </div>\n </div>\n\n <div formArrayName=\"core_user_contact_addresses\">\n @for (address of contactAddresses(); track $index; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Address {{ i + 1 }}</h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeContactAddress(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Address Type\" [options]=\"addressTypeOptions()\"\n formControlName=\"sycad_address_type_id_sygms\" placeholder=\"Select address type\" size=\"md\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Contact Person Name\" formControlName=\"sycad_contact_person_name\"\n placeholder=\"Enter contact person name\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-6\">\n <cide-ele-textarea label=\"Complete Address\" formControlName=\"sycad_contact_address\"\n placeholder=\"Enter complete address with area, city, and landmarks\" [rows]=\"3\" size=\"md\">\n </cide-ele-textarea>\n </div>\n\n <!-- Postal Code & City -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select \n label=\"Postal Code\"\n [options]=\"addressPostalCodes()[i] || []\" \n formControlName=\"sycad_contact_pin_sypin\"\n placeholder=\"Select postal code\"\n [searchable]=\"true\"\n [loading]=\"addressPostalCodesLoading()[i] || false\"\n (searchChange)=\"onPostalCodeSearch($event, i)\"\n (change)=\"onPostalCodeSelection($event, i)\"\n size=\"md\">\n </cide-ele-select>\n \n <cide-ele-input \n label=\"City\" \n formControlName=\"sycad_contact_city_sypin\"\n placeholder=\"Enter city\"\n size=\"md\">\n </cide-ele-input>\n </div>\n \n <!-- State & Country -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"State\" \n formControlName=\"sycad_contact_state_sypin\"\n placeholder=\"Enter state\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select \n label=\"Country\" \n [options]=\"addressCountries()[i] || []\" \n formControlName=\"sycad_contact_country_syctr\"\n placeholder=\"Select country\"\n valueKey=\"_id\"\n labelKey=\"syctr_country_iso_name\"\n [searchable]=\"true\"\n (searchChange)=\"onCountrySearch($event, i)\"\n [loading]=\"addressCountriesLoading()[i] || false\"\n size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Phone Numbers -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"Primary Phone\" \n formControlName=\"sycad_contact_phone\"\n type=\"tel\"\n placeholder=\"Enter primary phone number\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input \n label=\"Alternate Phone\" \n formControlName=\"sycad_contact_phone_alt\"\n type=\"tel\"\n placeholder=\"Enter alternate phone number\"\n size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Fax & Email -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"Fax Number\" \n formControlName=\"sycad_contact_fax\"\n placeholder=\"Enter fax number\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input \n label=\"Primary Email\" \n formControlName=\"sycad_contact_email\"\n type=\"email\"\n placeholder=\"Enter primary email address\"\n size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Alternate Email -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-6\">\n <cide-ele-input \n label=\"Alternate Email\" \n formControlName=\"sycad_contact_email_alt\"\n type=\"email\"\n placeholder=\"Enter alternate email address\"\n size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @case ('documents') {\n <!-- Documents Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addDocument()\" leftIcon=\"add\">\n Add Document\n </button>\n </div>\n\n @for (doc of documents(); track $index; let i = $index) {\n <div\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Document {{ i + 1 }}</h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeDocument(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Document Type\" [options]=\"documentTypeOptions()\"\n [formControlName]=\"'documents.' + i + '.syusd_document_type_id_sygms'\"\n placeholder=\"Select document type\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Document Number\" [formControlName]=\"'documents.' + i + '.syusd_doc_number'\"\n placeholder=\"Enter document number\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Name as per Document\"\n [formControlName]=\"'documents.' + i + '.syusd_doc_name_as_per_doc'\"\n placeholder=\"Enter name exactly as shown on document\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Photo Group\" [options]=\"photoGroupOptions()\"\n [formControlName]=\"'documents.' + i + '.syusd_photo_group_id_cyfm'\"\n placeholder=\"Select photo group\" size=\"md\" valueKey=\"_id\" labelKey=\"cyfm_name\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Issue Date\" [formControlName]=\"'documents.' + i + '.syusd_doc_issue_date'\"\n [id]=\"'syusd_doc_issue_date['+i+']'\" type=\"date\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Expiry Date\" [formControlName]=\"'documents.' + i + '.syusd_doc_expiry_date'\"\n [id]=\"'syusd_doc_expiry_date['+i+']'\" type=\"date\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-select label=\"Document Verification Status\" [options]=\"documentVerificationStatusOptions()\"\n [formControlName]=\"'documents.' + i + '.syusd_doc_verification_status_id_sygms'\"\n placeholder=\"Select verification status\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-select label=\"Document KYC Status\" [options]=\"documentKycStatusOptions()\"\n [formControlName]=\"'documents.' + i + '.syusd_doc_kyc_status_id_sygms'\"\n placeholder=\"Select KYC status\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n @case ('family') {\n <!-- Family Details Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addFamilyDetail()\" leftIcon=\"add\">\n Add Family Member\n </button>\n </div>\n\n @for (family of familyDetails(); track $index; let i = $index) {\n <div\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Family Member {{ i + 1 }}\n </h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeFamilyDetail(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Family Member Name\"\n [formControlName]=\"'family_details.' + i + '.syfdl_family_member_name'\"\n placeholder=\"Enter family member full name\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Relationship\" [options]=\"relationshipOptions()\"\n [formControlName]=\"'family_details.' + i + '.syfdl_relationship_id_sygms'\"\n placeholder=\"Select relationship\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Date of Birth\"\n [formControlName]=\"'family_details.' + i + '.syfdl_family_member_dob'\" type=\"date\" size=\"md\"\n [id]=\"'syfdl_family_member_dob['+i+']'\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Blood Group\" [options]=\"bloodGroupOptions()\"\n [formControlName]=\"'family_details.' + i + '.syfdl_blood_group_sygms'\"\n placeholder=\"Select blood group\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Contact Email\" [formControlName]=\"'family_details.' + i + '.syfdl_contact_email_id'\"\n type=\"email\" placeholder=\"Enter contact email\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Number\" [formControlName]=\"'family_details.' + i + '.syfdl_contact_number'\"\n type=\"tel\" placeholder=\"Enter contact number\" size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n\n <!-- Form Actions -->\n <div\n class=\"tw-flex tw-justify-end tw-gap-4 tw-py-2 tw-bg-white tw-border-t tw-border-gray-200 tw-sticky tw-bottom-0 tw-z-10\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || userMasterForm.invalid\"\n [loading]=\"loading()\" leftIcon=\"save\">\n Save User Master\n </button>\n </div>\n </form>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideTextareaComponent, selector: "cide-ele-textarea", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "minlength", "maxlength", "rows", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput"], outputs: ["ngModelChange"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideEleTabComponent, selector: "cide-ele-tab", inputs: ["tabs", "activeTabId", "size", "variant", "fullWidth", "disabled"], outputs: ["tabChange"] }, { kind: "component", type: CideEleFileInputComponent, selector: "cide-ele-file-input", inputs: ["label", "accept", "multiple", "disabled", "helperText", "errorText", "showPreview", "previewWidth", "previewHeight", "previewBoxMode", "placeholderText", "placeholderIcon"], outputs: ["fileChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }] });
|
|
12119
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreUserCreateComponent, isStandalone: true, selector: "cide-core-user-create", ngImport: i0, template: "<!-- \n ENTERPRISE USER MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<div class=\"tw-w-full tw-h-full tw-p-3\">\n <form class=\"tw-max-w-7xl tw-mx-auto tw-bg-transparent\" [formGroup]=\"userMasterForm\" [class.tw-opacity-60]=\"loading()\"\n (ngSubmit)=\"onSubmit()\">\n\n <!-- User Context Header -->\n <div\n class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-indigo-50 tw-border tw-border-blue-200 tw-rounded-md tw-p-2 tw-mb-3 tw-shadow-sm\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-flex-wrap tw-gap-2\">\n <!-- User Basic Info Display -->\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-flex-wrap\">\n <!-- Profile Photo Preview -->\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-full tw-bg-blue-100 tw-border tw-border-blue-200 tw-flex tw-items-center tw-justify-center tw-overflow-hidden\">\n @if (getUserPhoto()) {\n <img [src]=\"getUserPhoto()\" alt=\"Profile\" class=\"tw-w-full tw-h-full tw-object-cover\">\n } @else {\n <cide-ele-icon variant=\"blue\" size=\"xs\">person</cide-ele-icon>\n }\n </div>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-xs tw-font-medium tw-text-blue-900\">\n {{ getUserFullName() || 'New User' }}\n </span>\n <span class=\"tw-text-xs tw-text-blue-600\">\n {{ getUserUsername() || 'Username not set' }}\n </span>\n </div>\n </div>\n\n <!-- Contact Info -->\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-700\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">email</cide-ele-icon>\n <span>{{ getUserEmail() || 'Email not set' }}</span>\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-700\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">phone</cide-ele-icon>\n <span>{{ getUserMobile() || 'Mobile not set' }}</span>\n </div>\n </div>\n\n <!-- Active Status -->\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n @if (getUserActiveStatus()) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-700\">\n <cide-ele-icon variant=\"green\" size=\"xs\" class=\"tw-mr-1\">check_circle</cide-ele-icon>\n Active\n </span>\n } @else {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-xs tw-font-medium tw-bg-red-100 tw-text-red-700\">\n <cide-ele-icon variant=\"red\" size=\"xs\" class=\"tw-mr-1\">cancel</cide-ele-icon>\n Inactive\n </span>\n }\n </div>\n </div>\n\n <!-- Entity Info -->\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n @if (hasDefaultEntity()) {\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-blue-700\">\n <cide-ele-icon variant=\"blue\" size=\"xs\">business</cide-ele-icon>\n <span class=\"tw-font-medium\">{{ getDefaultEntityName() }}</span>\n </div>\n } @else {\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-500\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">business</cide-ele-icon>\n <span class=\"tw-italic\">No entity</span>\n </div>\n }\n\n <span class=\"tw-text-xs tw-text-gray-600 tw-px-2 tw-py-1 tw-bg-gray-100 tw-rounded\">\n {{ getEntityMappingCount() }} mapping(s)\n </span>\n </div>\n </div>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"tw-p-0 tw-mb-2 tw-border-b tw-border-gray-200\">\n <cide-ele-tab [tabs]=\"userTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- User Basic Information Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n\n <!-- Name Fields -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-4 lg:tw-grid-cols-2 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input id=\"user_firstname\" label=\"First Name *\" formControlName=\"user_firstname\"\n placeholder=\"Enter first name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_middlename\" label=\"Middle Name\" formControlName=\"user_middlename\"\n placeholder=\"Enter middle name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_lastname\" label=\"Last Name *\" formControlName=\"user_lastname\"\n placeholder=\"Enter last name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_fullname\" label=\"Full Name * (Auto-generated)\" formControlName=\"user_fullname\"\n placeholder=\"Auto-generated from name fields or enter manually\" [maxlength]=\"62\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Contact and Login Information -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-3 lg:tw-grid-cols-2 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input id=\"user_username\" label=\"Username *\" formControlName=\"user_username\"\n placeholder=\"Enter unique username\" [maxlength]=\"20\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_emailid\" label=\"Email ID *\" formControlName=\"user_emailid\" type=\"email\"\n placeholder=\"Enter valid email address\" [maxlength]=\"320\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_mobileno\" label=\"Mobile Number *\" formControlName=\"user_mobileno\" type=\"tel\"\n placeholder=\"Enter mobile number\" [maxlength]=\"15\" size=\"md\">\n </cide-ele-input>\n </div>\n\n\n\n <!-- Status Control -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-4\">\n <div class=\"tw-p-4 tw-bg-blue-50 tw-border tw-border-blue-100 tw-rounded-lg\">\n <label\n class=\"tw-flex tw-flex-col tw-cursor-pointer tw-py-2 tw-bg-transparent tw-border-none tw-rounded-none tw-transition-all tw-duration-200 hover:tw-bg-blue-75\">\n <cide-ele-input type=\"checkbox\" label=\"Active User Status\" formControlName=\"user_isactive\"\n class=\"tw-h-5 tw-accent-blue-500 tw-rounded tw-mb-1\" />\n <span class=\"tw-font-semibold tw-text-gray-700 tw-text-base\"></span>\n <span class=\"tw-text-sm tw-text-gray-600 tw-mt-1 tw-leading-relaxed\">Enable this user account for system\n access and operations</span>\n </label>\n </div>\n </div>\n </div>\n }\n\n @case ('auth') {\n <!-- Authentication Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <!-- Password Fields -->\n @if (shouldShowPasswordFields()) {\n <div class=\"tw-mb-6\">\n <!-- Password Fields Header for Edit Mode -->\n @if (isEditMode()) {\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-3\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Update Password</h6>\n <button type=\"button\"\n class=\"tw-px-3 tw-py-1 tw-bg-gray-100 tw-text-gray-600 tw-border tw-border-gray-300 tw-rounded-md tw-text-xs tw-font-medium hover:tw-bg-gray-200 tw-transition-colors\"\n (click)=\"cancelPasswordUpdate()\">\n Cancel Password Update\n </button>\n </div>\n }\n\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 md:tw-grid-cols-1 tw-gap-6\">\n <cide-ele-input id=\"user_password\" [label]=\"getPasswordFieldLabel()\" formControlName=\"user_password\"\n type=\"password\" placeholder=\"Enter secure password (min 8 characters)\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_confirm_password\" [label]=\"getPasswordConfirmLabel()\"\n formControlName=\"user_confirm_password\" type=\"password\" placeholder=\"Confirm your password\" size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n }\n\n <!-- Password Update Option for Edit Mode -->\n @if (isEditMode() && !shouldShowPasswordFields()) {\n <div class=\"tw-mb-6\">\n <div class=\"tw-p-4 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-blue-800 tw-mb-2\">Password Update</h6>\n <p class=\"tw-text-sm tw-text-blue-600 tw-mb-3\">Current password will be kept. Click below to change\n password.</p>\n\n @if (hasPasswordInput()) {\n <div\n class=\"tw-mb-3 tw-p-2 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded tw-text-sm tw-text-yellow-700\">\n <cide-ele-icon variant=\"yellow\" size=\"xs\" class=\"tw-mr-1\">warning</cide-ele-icon>\n Password fields contain text. Click \"Change Password\" to manage existing input.\n </div>\n }\n\n <button type=\"button\"\n class=\"tw-px-4 tw-py-2 tw-bg-blue-100 tw-text-blue-700 tw-border tw-border-blue-300 tw-rounded-md tw-text-sm tw-font-medium hover:tw-bg-blue-200 tw-transition-colors\"\n (click)=\"triggerPasswordUpdate()\">\n @if (hasPasswordInput()) {\n Manage Password Fields\n } @else {\n Change Password\n }\n </button>\n </div>\n </div>\n }\n\n <!-- Password Options -->\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-6 tw-mb-6\">\n <div class=\"tw-p-4 tw-bg-yellow-50 tw-border tw-border-yellow-100 tw-rounded-lg\">\n <label\n class=\"tw-flex tw-flex-col tw-gap-2 tw-cursor-pointer tw-py-2 tw-bg-transparent tw-border-none tw-rounded-none tw-transition-all tw-duration-200\">\n <cide-ele-input type=\"checkbox\" label=\"Force Password Change on Login\"\n formControlName=\"user_passwordchangeonlogin\" class=\"tw-h-5 tw-accent-yellow-500 tw-rounded tw-mb-1\" />\n <span class=\"tw-text-sm tw-text-gray-600 tw-mt-1 tw-leading-relaxed\">User will be required to change\n password on next login</span>\n </label>\n </div>\n </div>\n\n <!-- Photo Upload -->\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-6 tw-mb-6\">\n <div class=\"tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg tw-p-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800 tw-mb-3\">Profile Photo</h6>\n <div class=\"tw-flex tw-flex-col tw-items-center tw-gap-4\">\n <cide-ele-file-input id=\"user_photo_upload\" formControlName=\"user_photo_id_cyfm\" accept=\"image/*\"\n [showPreview]=\"true\" [previewBoxMode]=\"true\" previewWidth=\"150px\" previewHeight=\"150px\"\n placeholderText=\"Click to upload photo\" placeholderIcon=\"\uD83D\uDC64\">\n </cide-ele-file-input>\n <div class=\"tw-text-xs tw-text-gray-500 tw-text-center tw-max-w-sm\">\n Supported formats: JPG, PNG, GIF. Maximum size: 2MB. Recommended size: 150x150px for best results.\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('roles') {\n <!-- Entity, Roles & Permissions Mapping Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n\n\n\n <!-- Important Note -->\n <div class=\"tw-bg-amber-50 tw-border tw-border-amber-200 tw-rounded-lg tw-p-4 tw-mb-6\">\n <div class=\"tw-flex tw-items-start tw-gap-3\">\n <cide-ele-icon variant=\"amber\" size=\"lg\">info</cide-ele-icon>\n <div class=\"tw-flex-1\">\n <h4 class=\"tw-text-sm tw-font-semibold tw-text-amber-800 tw-mb-1\">Entity-Role Based Access</h4>\n <p class=\"tw-text-sm tw-text-amber-700 tw-mb-2\">User access is completely managed through entity-role\n mappings below. At least one entity mapping is required for user access.</p>\n @if (hasDefaultEntity()) {\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mt-2 tw-p-2 tw-bg-amber-100 tw-rounded\">\n <cide-ele-icon variant=\"amber\" size=\"sm\">star</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-amber-800\">\n <strong>Default Entity:</strong> {{ getDefaultEntityName() }}\n </span>\n </div>\n } @else {\n <div class=\"tw-text-sm tw-text-amber-600 tw-mt-2 tw-italic\">\n \u26A0\uFE0F No default entity selected. Please set one entity as default.\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Entity-Role Mapping Section -->\n <div class=\"tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg tw-p-6 tw-mb-6\">\n <div class=\"tw-flex tw-text-center tw-justify-between tw-items-center tw-mb-4\">\n <div>\n <h4 class=\"tw-text-sm tw-text-left tw-font-semibold tw-text-blue-900 tw-mb-1\">Entity-Role Mapping</h4>\n <p class=\"tw-text-sm tw-text-blue-700\">Map user to entities with specific roles and permissions</p>\n </div>\n <div class=\"tw-flex tw-flex-col tw-items-end\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addEntityMapping()\" leftIcon=\"add\"\n [disabled]=\"isAllEntitiesMapped()\">\n Add Entity Mapping\n </button>\n \n @if (isAllEntitiesMapped()) {\n <div class=\"tw-mt-2 tw-p-2 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-md tw-max-w-xs\">\n <p class=\"tw-text-xs tw-text-blue-700\">\n <cide-ele-icon variant=\"info\" size=\"xs\" class=\"tw-mr-1\">info</cide-ele-icon>\n All available entities are already mapped.\n </p>\n </div>\n }\n </div>\n </div>\n\n <div formArrayName=\"core_entity_mapping\">\n @for (mapping of entityMappings(); track $index; let i = $index) {\n <div class=\"tw-bg-white tw-border tw-border-blue-200 tw-rounded-xl tw-mb-6 tw-overflow-hidden tw-shadow-sm\"\n [formGroupName]=\"i\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-blue-100 tw-px-6 tw-py-3 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-blue-200\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <h5 class=\"tw-m-0 tw-text-blue-800 tw-text-sm tw-font-semibold\">Entity Mapping {{ i + 1 }}</h5>\n @if (mapping.syenm_isdefault) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800\">\n <cide-ele-icon variant=\"green\" size=\"xs\" class=\"tw-mr-1\">star</cide-ele-icon>\n Default\n </span>\n }\n </div>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeEntityMapping(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n\n <div class=\"tw-p-6\">\n <!-- Entity and Role Selection -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <div>\n <cide-ele-select label=\"Entity *\" [options]=\"getFilteredEntityOptions(i)\" formControlName=\"syenm_entity_id_syen\"\n valueKey=\"_id\" labelKey=\"syen_name\" placeholder=\"Select entity\" size=\"md\"\n (change)=\"onEntityChange(i, $event)\">\n </cide-ele-select>\n \n @if (isAllEntitiesSelected(i)) {\n <div class=\"tw-mt-2 tw-p-2 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded-md\">\n <p class=\"tw-text-xs tw-text-yellow-700\">\n <cide-ele-icon variant=\"warning\" size=\"xs\" class=\"tw-mr-1\">info</cide-ele-icon>\n All entities are already mapped. Remove another mapping to add this one.\n </p>\n </div>\n }\n </div>\n\n <cide-ele-select label=\"Role for this Entity\" [options]=\"getRoleOptionsForEntity(i)\"\n formControlName=\"syenm_role_id_syusrol\" placeholder=\"Select role for this entity\" size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Entity-Specific Details -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Department for this Entity\" [options]=\"getDepartmentOptionsForEntity(i)\"\n formControlName=\"syenm_department_id_sydept\" (change)=\"onDepartmentChange($event)\" valueKey=\"_id\" labelKey=\"sydept_name\" placeholder=\"Select department\" size=\"md\">\n </cide-ele-select>\n\n <cide-ele-select label=\"Designation for this Entity\" [options]=\"getDesignationOptionsForEntity(i)\" valueKey=\"_id\" labelKey=\"sydsg_name\"\n formControlName=\"syenm_designation_id_sydsg\" placeholder=\"Select designation\" size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Active Period for Entity Mapping -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Active From *\" [id]=\"'syenm_activefrom['+i+']'\"\n formControlName=\"syenm_activefrom\" type=\"date\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Active Until\" [id]=\"'syenm_activeupto['+i+']'\"\n formControlName=\"syenm_activeupto\" type=\"date\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Mapping Settings -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6 tw-mb-6\">\n <div class=\"tw-p-3 tw-bg-green-50 tw-border tw-border-green-200 tw-rounded-lg\">\n <cide-ele-input type=\"checkbox\" label=\"Default Entity\" formControlName=\"syenm_isdefault\"\n (change)=\"onDefaultEntityChange(i, $event)\" class=\"tw-h-5 tw-accent-green-500\" />\n <span class=\"tw-text-xs tw-text-green-600 tw-block tw-mt-1\">Set as user's default entity (only one\n allowed)</span>\n </div>\n\n <div class=\"tw-p-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\n <cide-ele-input type=\"checkbox\" label=\"Active Mapping\" formControlName=\"syenm_isactive\"\n class=\"tw-h-5 tw-accent-blue-500\" />\n <span class=\"tw-text-xs tw-text-blue-600 tw-block tw-mt-1\">Enable this entity mapping</span>\n </div>\n </div>\n\n <!-- Menu Rights Grid for this Entity-Role -->\n <div class=\"tw-border-t tw-border-gray-200 tw-pt-4\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Menu Rights & Permissions</h6>\n <div class=\"tw-flex tw-gap-2\">\n <button cideEleButton variant=\"secondary\" size=\"sm\" type=\"button\" (click)=\"refreshMenuRights(i)\"\n leftIcon=\"refresh\">\n Refresh Rights\n </button>\n </div>\n </div>\n\n @if (getMenuRightsForMapping(i).length > 0) {\n <!-- Menu Rights Grid -->\n <div class=\"tw-overflow-x-auto tw-bg-white tw-border tw-border-gray-200 tw-rounded-lg\">\n <table class=\"tw-w-full tw-text-sm\">\n <thead class=\"tw-bg-gray-50 tw-border-b tw-border-gray-200\">\n <tr>\n <th class=\"tw-px-4 tw-py-3 tw-text-left tw-font-medium tw-text-gray-700\">Menu</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Role Rights</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Create</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Read</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Update</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Delete</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Exception</th>\n </tr>\n </thead>\n <tbody>\n @for (menuRight of getMenuRightsForMapping(i); track $index; let j = $index) {\n <tr class=\"tw-border-b tw-border-gray-100 hover:tw-bg-gray-50\">\n <td class=\"tw-px-4 tw-py-3 tw-font-medium tw-text-gray-900\">\n {{ menuRight.menu_name }}\n <div class=\"tw-text-xs tw-text-gray-500\">{{ menuRight.menu_code }}</div>\n </td>\n\n <!-- Role Rights Display -->\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <div class=\"tw-flex tw-flex-wrap tw-justify-center tw-gap-1\">\n @for (right of menuRight.role_rights; track $index) {\n <span\n class=\"tw-inline-block tw-px-2 tw-py-1 tw-text-xs tw-bg-blue-100 tw-text-blue-800 tw-rounded\">\n {{ right }}\n </span>\n }\n </div>\n </td>\n\n <!-- Individual Permission Controls -->\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.create'\"\n class=\"tw-h-4 tw-accent-green-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.read'\"\n class=\"tw-h-4 tw-accent-blue-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.update'\"\n class=\"tw-h-4 tw-accent-yellow-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.delete'\"\n class=\"tw-h-4 tw-accent-red-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n @if (hasExceptionForMenu(i, menuRight.menu_id)) {\n <span\n class=\"tw-inline-block tw-px-2 tw-py-1 tw-text-xs tw-bg-yellow-100 tw-text-yellow-800 tw-rounded\">\n Override\n </span>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">Default</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <!-- Legend -->\n <div class=\"tw-mt-4 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <h6 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 tw-mb-2\">Legend:</h6>\n <div class=\"tw-grid tw-grid-cols-2 md:tw-grid-cols-4 tw-gap-3 tw-text-xs tw-text-gray-600\">\n <div><span class=\"tw-w-3 tw-h-3 tw-bg-blue-100 tw-inline-block tw-rounded tw-mr-2\"></span>Role\n Rights: Inherited from role</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-yellow-100 tw-inline-block tw-rounded tw-mr-2\"></span>Override:\n User-specific exception</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-green-100 tw-inline-block tw-rounded tw-mr-2\"></span>Enabled:\n Permission granted</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-gray-100 tw-inline-block tw-rounded tw-mr-2\"></span>Disabled:\n Permission restricted</div>\n </div>\n </div>\n\n } @else {\n <div class=\"tw-text-center tw-py-8 tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg\">\n <div class=\"tw-text-gray-400 tw-mb-3\">\n <cide-ele-icon variant=\"gray\" size=\"lg\">menu</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-600 tw-mb-2\">No Menu Rights Available</h6>\n <p class=\"tw-text-xs tw-text-gray-500 tw-mb-3 tw-text-center\">Select both entity and role to load\n menu rights for this mapping.</p>\n @if (mapping.syenm_entity_id_syen?._id && mapping.syenm_role_id_syusrol) {\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"button\" (click)=\"loadMenuRights(i)\"\n leftIcon=\"refresh\">\n Load Menu Rights\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (entityMappings().length === 0) {\n <div class=\"tw-text-center tw-py-8 tw-bg-white tw-border tw-border-blue-200 tw-rounded-lg\">\n <div class=\"tw-text-blue-400 tw-mb-3\">\n <cide-ele-icon variant=\"blue\" size=\"lg\">business</cide-ele-icon>\n </div>\n <h4 class=\"tw-text-sm tw-font-medium tw-text-blue-800 tw-mb-2\">No Entity Mappings</h4>\n <p class=\"tw-text-blue-600 tw-mb-4 tw-text-center\">Add entity mappings to assign specific roles and\n permissions for different entities.</p>\n <button class=\"tw-mx-auto\" cideEleButton variant=\"primary\" size=\"md\" type=\"button\"\n (click)=\"addEntityMapping()\" leftIcon=\"add\">\n Add First Entity Mapping\n </button>\n </div>\n }\n </div>\n\n\n </div>\n }\n\n @case ('addresses') {\n <!-- Contact Addresses Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end\">\n <div class=\"tw-flex tw-justify-between tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addContactAddress()\"\n leftIcon=\"add\">\n Add New Address\n </button>\n </div>\n </div>\n\n <div formArrayName=\"core_user_contact_addresses\">\n @for (address of contactAddresses(); track $index; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Address {{ i + 1 }}</h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeContactAddress(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Address Type\" [options]=\"addressTypeOptions()\" id=\"sycad_address_type_id_sygms\"\n formControlName=\"sycad_address_type_id_sygms\" placeholder=\"Select address type\" size=\"md\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Contact Person Name\" formControlName=\"sycad_contact_person_name\"\n placeholder=\"Enter contact person name\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-6\">\n <cide-ele-textarea label=\"Complete Address\" formControlName=\"sycad_contact_address\"\n placeholder=\"Enter complete address with area, city, and landmarks\" [rows]=\"3\" size=\"md\">\n </cide-ele-textarea>\n </div>\n\n <!-- Postal Code & City -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select \n label=\"Postal Code\"\n [options]=\"addressPostalCodes()[i] || []\" \n formControlName=\"sycad_contact_pin_sypin\"\n placeholder=\"Select postal code\"\n [searchable]=\"true\"\n [loading]=\"addressPostalCodesLoading()[i] || false\"\n (searchChange)=\"onPostalCodeSearch($event, i)\"\n (change)=\"onPostalCodeSelection($event, i)\"\n size=\"md\">\n </cide-ele-select>\n \n <cide-ele-input \n label=\"City\" \n formControlName=\"sycad_contact_city_sypin\"\n placeholder=\"Enter city\"\n size=\"md\">\n </cide-ele-input>\n </div>\n \n <!-- State & Country -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"State\" \n formControlName=\"sycad_contact_state_sypin\"\n placeholder=\"Enter state\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select \n label=\"Country\" \n [options]=\"addressCountries()[i] || []\" \n formControlName=\"sycad_contact_country_syctr\"\n placeholder=\"Select country\"\n valueKey=\"_id\"\n labelKey=\"syctr_country_iso_name\"\n [searchable]=\"true\"\n (searchChange)=\"onCountrySearch($event, i)\"\n [loading]=\"addressCountriesLoading()[i] || false\"\n size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Phone Numbers -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"Primary Phone\" \n formControlName=\"sycad_contact_phone\"\n type=\"tel\"\n placeholder=\"Enter primary phone number\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input \n label=\"Alternate Phone\" \n formControlName=\"sycad_contact_phone_alt\"\n type=\"tel\"\n placeholder=\"Enter alternate phone number\"\n size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Fax & Email -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"Fax Number\" \n formControlName=\"sycad_contact_fax\"\n placeholder=\"Enter fax number\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input \n label=\"Primary Email\" \n formControlName=\"sycad_contact_email\"\n type=\"email\"\n placeholder=\"Enter primary email address\"\n size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Alternate Email -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-6\">\n <cide-ele-input \n label=\"Alternate Email\" \n formControlName=\"sycad_contact_email_alt\"\n type=\"email\"\n placeholder=\"Enter alternate email address\"\n size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @case ('documents') {\n <!-- Documents Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addDocument()\" leftIcon=\"add\">\n Add Document\n </button>\n </div>\n\n <div formArrayName=\"core_user_documents\">\n @for (doc of documents(); track $index; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Document {{ i + 1 }}</h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeDocument(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Document Type\" [options]=\"documentTypeOptions()\"\n formControlName=\"syusd_document_type_id_sygms\"\n placeholder=\"Select document type\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Document Number\" formControlName=\"syusd_doc_number\"\n placeholder=\"Enter document number\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Name as per Document\"\n formControlName=\"syusd_doc_name_as_per_doc\"\n placeholder=\"Enter name exactly as shown on document\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Photo Group\" [options]=\"photoGroupOptions()\"\n formControlName=\"syusd_photo_group_id_cyfm\"\n placeholder=\"Select photo group\" size=\"md\" valueKey=\"_id\" labelKey=\"cyfm_name\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Issue Date\" formControlName=\"syusd_doc_issue_date\"\n [id]=\"'syusd_doc_issue_date['+i+']'\" type=\"date\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Expiry Date\" formControlName=\"syusd_doc_expiry_date\"\n [id]=\"'syusd_doc_expiry_date['+i+']'\" type=\"date\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-select label=\"Document Verification Status\" [options]=\"documentVerificationStatusOptions()\"\n formControlName=\"syusd_doc_verification_status_id_sygms\"\n placeholder=\"Select verification status\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-select label=\"Document KYC Status\" [options]=\"documentKycStatusOptions()\"\n formControlName=\"syusd_doc_kyc_status_id_sygms\"\n placeholder=\"Select KYC status\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @case ('family') {\n <!-- Family Details Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addFamilyDetail()\" leftIcon=\"add\">\n Add Family Member\n </button>\n </div>\n\n <div formArrayName=\"core_user_family_details\">\n @for (family of familyDetails(); track $index; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Family Member {{ i + 1 }}\n </h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeFamilyDetail(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Family Member Name\"\n formControlName=\"syfdl_family_member_name\"\n placeholder=\"Enter family member full name\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select \n label=\"Family Member User\"\n [options]=\"userOptions(i)\"\n formControlName=\"syfdl_family_member_id_user\"\n placeholder=\"Select family member user\" \n size=\"md\" \n valueKey=\"_id\" \n labelKey=\"user_fullname\"\n [searchable]=\"true\"\n [loading]=\"userSearchLoading()[i] || false\"\n (searchChange)=\"onUserSearchChange($event, i)\"\n (change)=\"onUserSelectionChange($event, i)\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Relationship\" [options]=\"relationshipOptions()\"\n formControlName=\"syfdl_relationship_id_sygms\"\n placeholder=\"Select relationship\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-select label=\"Blood Group\" [options]=\"bloodGroupOptions()\"\n formControlName=\"syfdl_blood_group_sygms\"\n placeholder=\"Select blood group\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Date of Birth\"\n formControlName=\"syfdl_family_member_dob\" type=\"date\" size=\"md\"\n [id]=\"'syfdl_family_member_dob['+i+']'\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Phone\"\n formControlName=\"syfdl_contact_phone\"\n type=\"tel\" placeholder=\"Enter contact phone\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Contact Email\" formControlName=\"syfdl_contact_email\"\n type=\"email\" placeholder=\"Enter contact email\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Email ID\" formControlName=\"syfdl_contact_email_id\"\n type=\"email\" placeholder=\"Enter contact email ID\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Contact Number\" formControlName=\"syfdl_contact_number\"\n type=\"tel\" placeholder=\"Enter contact number\" size=\"md\">\n </cide-ele-input>\n\n <div class=\"tw-flex tw-items-center tw-pt-6\">\n <cide-ele-input \n formControlName=\"syfdl_isactive\"\n type=\"checkbox\"\n label=\"Active\"\n size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n }\n </div>\n\n <!-- Form Actions -->\n <div\n class=\"tw-flex tw-justify-end tw-gap-4 tw-py-2 tw-bg-white tw-border-t tw-border-gray-200 tw-sticky tw-bottom-0 tw-z-10\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || userMasterForm.invalid\"\n [loading]=\"loading()\" leftIcon=\"save\">\n Save User Master\n </button>\n </div>\n </form>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideTextareaComponent, selector: "cide-ele-textarea", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "minlength", "maxlength", "rows", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput"], outputs: ["ngModelChange"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideEleTabComponent, selector: "cide-ele-tab", inputs: ["tabs", "activeTabId", "size", "variant", "fullWidth", "disabled"], outputs: ["tabChange"] }, { kind: "component", type: CideEleFileInputComponent, selector: "cide-ele-file-input", inputs: ["label", "accept", "multiple", "disabled", "helperText", "errorText", "showPreview", "previewWidth", "previewHeight", "previewBoxMode", "placeholderText", "placeholderIcon"], outputs: ["fileChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }] });
|
|
11981
12120
|
}
|
|
11982
12121
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideCoreUserCreateComponent, decorators: [{
|
|
11983
12122
|
type: Component,
|
|
@@ -11991,7 +12130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
11991
12130
|
CideEleTabComponent,
|
|
11992
12131
|
CideEleFileInputComponent,
|
|
11993
12132
|
CideIconComponent
|
|
11994
|
-
], template: "<!-- \n ENTERPRISE USER MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<div class=\"tw-w-full tw-h-full tw-p-3\">\n <form class=\"tw-max-w-7xl tw-mx-auto tw-bg-transparent\" [formGroup]=\"userMasterForm\" [class.tw-opacity-60]=\"loading()\"\n (ngSubmit)=\"onSubmit()\">\n\n <!-- User Context Header -->\n <div\n class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-indigo-50 tw-border tw-border-blue-200 tw-rounded-md tw-p-2 tw-mb-3 tw-shadow-sm\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-flex-wrap tw-gap-2\">\n <!-- User Basic Info Display -->\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-flex-wrap\">\n <!-- Profile Photo Preview -->\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-full tw-bg-blue-100 tw-border tw-border-blue-200 tw-flex tw-items-center tw-justify-center tw-overflow-hidden\">\n @if (getUserPhoto()) {\n <img [src]=\"getUserPhoto()\" alt=\"Profile\" class=\"tw-w-full tw-h-full tw-object-cover\">\n } @else {\n <cide-ele-icon variant=\"blue\" size=\"xs\">person</cide-ele-icon>\n }\n </div>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-xs tw-font-medium tw-text-blue-900\">\n {{ getUserFullName() || 'New User' }}\n </span>\n <span class=\"tw-text-xs tw-text-blue-600\">\n {{ getUserUsername() || 'Username not set' }}\n </span>\n </div>\n </div>\n\n <!-- Contact Info -->\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-700\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">email</cide-ele-icon>\n <span>{{ getUserEmail() || 'Email not set' }}</span>\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-700\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">phone</cide-ele-icon>\n <span>{{ getUserMobile() || 'Mobile not set' }}</span>\n </div>\n </div>\n\n <!-- Active Status -->\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n @if (getUserActiveStatus()) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-700\">\n <cide-ele-icon variant=\"green\" size=\"xs\" class=\"tw-mr-1\">check_circle</cide-ele-icon>\n Active\n </span>\n } @else {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-xs tw-font-medium tw-bg-red-100 tw-text-red-700\">\n <cide-ele-icon variant=\"red\" size=\"xs\" class=\"tw-mr-1\">cancel</cide-ele-icon>\n Inactive\n </span>\n }\n </div>\n </div>\n\n <!-- Entity Info -->\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n @if (hasDefaultEntity()) {\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-blue-700\">\n <cide-ele-icon variant=\"blue\" size=\"xs\">business</cide-ele-icon>\n <span class=\"tw-font-medium\">{{ getDefaultEntityName() }}</span>\n </div>\n } @else {\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-500\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">business</cide-ele-icon>\n <span class=\"tw-italic\">No entity</span>\n </div>\n }\n\n <span class=\"tw-text-xs tw-text-gray-600 tw-px-2 tw-py-1 tw-bg-gray-100 tw-rounded\">\n {{ getEntityMappingCount() }} mapping(s)\n </span>\n </div>\n </div>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"tw-p-0 tw-mb-2 tw-border-b tw-border-gray-200\">\n <cide-ele-tab [tabs]=\"userTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- User Basic Information Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n\n <!-- Name Fields -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-4 lg:tw-grid-cols-2 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input id=\"user_firstname\" label=\"First Name *\" formControlName=\"user_firstname\"\n placeholder=\"Enter first name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_middlename\" label=\"Middle Name\" formControlName=\"user_middlename\"\n placeholder=\"Enter middle name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_lastname\" label=\"Last Name *\" formControlName=\"user_lastname\"\n placeholder=\"Enter last name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_fullname\" label=\"Full Name * (Auto-generated)\" formControlName=\"user_fullname\"\n placeholder=\"Auto-generated from name fields or enter manually\" [maxlength]=\"62\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Contact and Login Information -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-3 lg:tw-grid-cols-2 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input id=\"user_username\" label=\"Username *\" formControlName=\"user_username\"\n placeholder=\"Enter unique username\" [maxlength]=\"20\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_emailid\" label=\"Email ID *\" formControlName=\"user_emailid\" type=\"email\"\n placeholder=\"Enter valid email address\" [maxlength]=\"320\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_mobileno\" label=\"Mobile Number *\" formControlName=\"user_mobileno\" type=\"tel\"\n placeholder=\"Enter mobile number\" [maxlength]=\"15\" size=\"md\">\n </cide-ele-input>\n </div>\n\n\n\n <!-- Status Control -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-4\">\n <div class=\"tw-p-4 tw-bg-blue-50 tw-border tw-border-blue-100 tw-rounded-lg\">\n <label\n class=\"tw-flex tw-flex-col tw-cursor-pointer tw-py-2 tw-bg-transparent tw-border-none tw-rounded-none tw-transition-all tw-duration-200 hover:tw-bg-blue-75\">\n <cide-ele-input type=\"checkbox\" label=\"Active User Status\" formControlName=\"user_isactive\"\n class=\"tw-h-5 tw-accent-blue-500 tw-rounded tw-mb-1\" />\n <span class=\"tw-font-semibold tw-text-gray-700 tw-text-base\"></span>\n <span class=\"tw-text-sm tw-text-gray-600 tw-mt-1 tw-leading-relaxed\">Enable this user account for system\n access and operations</span>\n </label>\n </div>\n </div>\n </div>\n }\n\n @case ('auth') {\n <!-- Authentication Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <!-- Password Fields -->\n @if (shouldShowPasswordFields()) {\n <div class=\"tw-mb-6\">\n <!-- Password Fields Header for Edit Mode -->\n @if (isEditMode()) {\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-3\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Update Password</h6>\n <button type=\"button\"\n class=\"tw-px-3 tw-py-1 tw-bg-gray-100 tw-text-gray-600 tw-border tw-border-gray-300 tw-rounded-md tw-text-xs tw-font-medium hover:tw-bg-gray-200 tw-transition-colors\"\n (click)=\"cancelPasswordUpdate()\">\n Cancel Password Update\n </button>\n </div>\n }\n\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 md:tw-grid-cols-1 tw-gap-6\">\n <cide-ele-input id=\"user_password\" [label]=\"getPasswordFieldLabel()\" formControlName=\"user_password\"\n type=\"password\" placeholder=\"Enter secure password (min 8 characters)\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_confirm_password\" [label]=\"getPasswordConfirmLabel()\"\n formControlName=\"user_confirm_password\" type=\"password\" placeholder=\"Confirm your password\" size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n }\n\n <!-- Password Update Option for Edit Mode -->\n @if (isEditMode() && !shouldShowPasswordFields()) {\n <div class=\"tw-mb-6\">\n <div class=\"tw-p-4 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-blue-800 tw-mb-2\">Password Update</h6>\n <p class=\"tw-text-sm tw-text-blue-600 tw-mb-3\">Current password will be kept. Click below to change\n password.</p>\n\n @if (hasPasswordInput()) {\n <div\n class=\"tw-mb-3 tw-p-2 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded tw-text-sm tw-text-yellow-700\">\n <cide-ele-icon variant=\"yellow\" size=\"xs\" class=\"tw-mr-1\">warning</cide-ele-icon>\n Password fields contain text. Click \"Change Password\" to manage existing input.\n </div>\n }\n\n <button type=\"button\"\n class=\"tw-px-4 tw-py-2 tw-bg-blue-100 tw-text-blue-700 tw-border tw-border-blue-300 tw-rounded-md tw-text-sm tw-font-medium hover:tw-bg-blue-200 tw-transition-colors\"\n (click)=\"triggerPasswordUpdate()\">\n @if (hasPasswordInput()) {\n Manage Password Fields\n } @else {\n Change Password\n }\n </button>\n </div>\n </div>\n }\n\n <!-- Password Options -->\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-6 tw-mb-6\">\n <div class=\"tw-p-4 tw-bg-yellow-50 tw-border tw-border-yellow-100 tw-rounded-lg\">\n <label\n class=\"tw-flex tw-flex-col tw-gap-2 tw-cursor-pointer tw-py-2 tw-bg-transparent tw-border-none tw-rounded-none tw-transition-all tw-duration-200\">\n <cide-ele-input type=\"checkbox\" label=\"Force Password Change on Login\"\n formControlName=\"user_passwordchangeonlogin\" class=\"tw-h-5 tw-accent-yellow-500 tw-rounded tw-mb-1\" />\n <span class=\"tw-text-sm tw-text-gray-600 tw-mt-1 tw-leading-relaxed\">User will be required to change\n password on next login</span>\n </label>\n </div>\n </div>\n\n <!-- Photo Upload -->\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-6 tw-mb-6\">\n <div class=\"tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg tw-p-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800 tw-mb-3\">Profile Photo</h6>\n <div class=\"tw-flex tw-flex-col tw-items-center tw-gap-4\">\n <cide-ele-file-input id=\"user_photo_upload\" formControlName=\"user_photo_id_cyfm\" accept=\"image/*\"\n [showPreview]=\"true\" [previewBoxMode]=\"true\" previewWidth=\"150px\" previewHeight=\"150px\"\n placeholderText=\"Click to upload photo\" placeholderIcon=\"\uD83D\uDC64\">\n </cide-ele-file-input>\n <div class=\"tw-text-xs tw-text-gray-500 tw-text-center tw-max-w-sm\">\n Supported formats: JPG, PNG, GIF. Maximum size: 2MB. Recommended size: 150x150px for best results.\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('roles') {\n <!-- Entity, Roles & Permissions Mapping Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n\n\n\n <!-- Important Note -->\n <div class=\"tw-bg-amber-50 tw-border tw-border-amber-200 tw-rounded-lg tw-p-4 tw-mb-6\">\n <div class=\"tw-flex tw-items-start tw-gap-3\">\n <cide-ele-icon variant=\"amber\" size=\"lg\">info</cide-ele-icon>\n <div class=\"tw-flex-1\">\n <h4 class=\"tw-text-sm tw-font-semibold tw-text-amber-800 tw-mb-1\">Entity-Role Based Access</h4>\n <p class=\"tw-text-sm tw-text-amber-700 tw-mb-2\">User access is completely managed through entity-role\n mappings below. At least one entity mapping is required for user access.</p>\n @if (hasDefaultEntity()) {\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mt-2 tw-p-2 tw-bg-amber-100 tw-rounded\">\n <cide-ele-icon variant=\"amber\" size=\"sm\">star</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-amber-800\">\n <strong>Default Entity:</strong> {{ getDefaultEntityName() }}\n </span>\n </div>\n } @else {\n <div class=\"tw-text-sm tw-text-amber-600 tw-mt-2 tw-italic\">\n \u26A0\uFE0F No default entity selected. Please set one entity as default.\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Entity-Role Mapping Section -->\n <div class=\"tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg tw-p-6 tw-mb-6\">\n <div class=\"tw-flex tw-text-center tw-justify-between tw-items-center tw-mb-4\">\n <div>\n <h4 class=\"tw-text-sm tw-text-left tw-font-semibold tw-text-blue-900 tw-mb-1\">Entity-Role Mapping</h4>\n <p class=\"tw-text-sm tw-text-blue-700\">Map user to entities with specific roles and permissions</p>\n </div>\n <div class=\"tw-flex tw-flex-col tw-items-end\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addEntityMapping()\" leftIcon=\"add\"\n [disabled]=\"isAllEntitiesMapped()\">\n Add Entity Mapping\n </button>\n \n @if (isAllEntitiesMapped()) {\n <div class=\"tw-mt-2 tw-p-2 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-md tw-max-w-xs\">\n <p class=\"tw-text-xs tw-text-blue-700\">\n <cide-ele-icon variant=\"info\" size=\"xs\" class=\"tw-mr-1\">info</cide-ele-icon>\n All available entities are already mapped.\n </p>\n </div>\n }\n </div>\n </div>\n\n <div formArrayName=\"core_entity_mapping\">\n @for (mapping of entityMappings(); track $index; let i = $index) {\n <div class=\"tw-bg-white tw-border tw-border-blue-200 tw-rounded-xl tw-mb-6 tw-overflow-hidden tw-shadow-sm\"\n [formGroupName]=\"i\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-blue-100 tw-px-6 tw-py-3 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-blue-200\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <h5 class=\"tw-m-0 tw-text-blue-800 tw-text-sm tw-font-semibold\">Entity Mapping {{ i + 1 }}</h5>\n @if (mapping.syenm_isdefault) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800\">\n <cide-ele-icon variant=\"green\" size=\"xs\" class=\"tw-mr-1\">star</cide-ele-icon>\n Default\n </span>\n }\n </div>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeEntityMapping(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n\n <div class=\"tw-p-6\">\n <!-- Entity and Role Selection -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <div>\n <cide-ele-select label=\"Entity *\" [options]=\"getFilteredEntityOptions(i)\" formControlName=\"syenm_entity_id_syen\"\n valueKey=\"_id\" labelKey=\"syen_name\" placeholder=\"Select entity\" size=\"md\"\n (change)=\"onEntityChange(i, $event)\">\n </cide-ele-select>\n \n @if (isAllEntitiesSelected(i)) {\n <div class=\"tw-mt-2 tw-p-2 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded-md\">\n <p class=\"tw-text-xs tw-text-yellow-700\">\n <cide-ele-icon variant=\"warning\" size=\"xs\" class=\"tw-mr-1\">info</cide-ele-icon>\n All entities are already mapped. Remove another mapping to add this one.\n </p>\n </div>\n }\n </div>\n\n <cide-ele-select label=\"Role for this Entity\" [options]=\"getRoleOptionsForEntity(i)\"\n formControlName=\"syenm_role_id_syusrol\" placeholder=\"Select role for this entity\" size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Entity-Specific Details -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Department for this Entity\" [options]=\"getDepartmentOptionsForEntity(i)\"\n formControlName=\"syenm_department_id_sydept\" (change)=\"onDepartmentChange($event)\" valueKey=\"_id\" labelKey=\"sydept_name\" placeholder=\"Select department\" size=\"md\">\n </cide-ele-select>\n\n <cide-ele-select label=\"Designation for this Entity\" [options]=\"getDesignationOptionsForEntity(i)\" valueKey=\"_id\" labelKey=\"sydsg_name\"\n formControlName=\"syenm_designation_id_sydsg\" placeholder=\"Select designation\" size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Active Period for Entity Mapping -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Active From *\" [id]=\"'syenm_activefrom['+i+']'\"\n formControlName=\"syenm_activefrom\" type=\"date\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Active Until\" [id]=\"'syenm_activeupto['+i+']'\"\n formControlName=\"syenm_activeupto\" type=\"date\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Mapping Settings -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6 tw-mb-6\">\n <div class=\"tw-p-3 tw-bg-green-50 tw-border tw-border-green-200 tw-rounded-lg\">\n <cide-ele-input type=\"checkbox\" label=\"Default Entity\" formControlName=\"syenm_isdefault\"\n (change)=\"onDefaultEntityChange(i, $event)\" class=\"tw-h-5 tw-accent-green-500\" />\n <span class=\"tw-text-xs tw-text-green-600 tw-block tw-mt-1\">Set as user's default entity (only one\n allowed)</span>\n </div>\n\n <div class=\"tw-p-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\n <cide-ele-input type=\"checkbox\" label=\"Active Mapping\" formControlName=\"syenm_isactive\"\n class=\"tw-h-5 tw-accent-blue-500\" />\n <span class=\"tw-text-xs tw-text-blue-600 tw-block tw-mt-1\">Enable this entity mapping</span>\n </div>\n </div>\n\n <!-- Menu Rights Grid for this Entity-Role -->\n <div class=\"tw-border-t tw-border-gray-200 tw-pt-4\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Menu Rights & Permissions</h6>\n <div class=\"tw-flex tw-gap-2\">\n <button cideEleButton variant=\"secondary\" size=\"sm\" type=\"button\" (click)=\"refreshMenuRights(i)\"\n leftIcon=\"refresh\">\n Refresh Rights\n </button>\n </div>\n </div>\n\n @if (getMenuRightsForMapping(i).length > 0) {\n <!-- Menu Rights Grid -->\n <div class=\"tw-overflow-x-auto tw-bg-white tw-border tw-border-gray-200 tw-rounded-lg\">\n <table class=\"tw-w-full tw-text-sm\">\n <thead class=\"tw-bg-gray-50 tw-border-b tw-border-gray-200\">\n <tr>\n <th class=\"tw-px-4 tw-py-3 tw-text-left tw-font-medium tw-text-gray-700\">Menu</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Role Rights</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Create</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Read</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Update</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Delete</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Exception</th>\n </tr>\n </thead>\n <tbody>\n @for (menuRight of getMenuRightsForMapping(i); track $index; let j = $index) {\n <tr class=\"tw-border-b tw-border-gray-100 hover:tw-bg-gray-50\">\n <td class=\"tw-px-4 tw-py-3 tw-font-medium tw-text-gray-900\">\n {{ menuRight.menu_name }}\n <div class=\"tw-text-xs tw-text-gray-500\">{{ menuRight.menu_code }}</div>\n </td>\n\n <!-- Role Rights Display -->\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <div class=\"tw-flex tw-flex-wrap tw-justify-center tw-gap-1\">\n @for (right of menuRight.role_rights; track $index) {\n <span\n class=\"tw-inline-block tw-px-2 tw-py-1 tw-text-xs tw-bg-blue-100 tw-text-blue-800 tw-rounded\">\n {{ right }}\n </span>\n }\n </div>\n </td>\n\n <!-- Individual Permission Controls -->\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.create'\"\n class=\"tw-h-4 tw-accent-green-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.read'\"\n class=\"tw-h-4 tw-accent-blue-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.update'\"\n class=\"tw-h-4 tw-accent-yellow-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.delete'\"\n class=\"tw-h-4 tw-accent-red-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n @if (hasExceptionForMenu(i, menuRight.menu_id)) {\n <span\n class=\"tw-inline-block tw-px-2 tw-py-1 tw-text-xs tw-bg-yellow-100 tw-text-yellow-800 tw-rounded\">\n Override\n </span>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">Default</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <!-- Legend -->\n <div class=\"tw-mt-4 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <h6 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 tw-mb-2\">Legend:</h6>\n <div class=\"tw-grid tw-grid-cols-2 md:tw-grid-cols-4 tw-gap-3 tw-text-xs tw-text-gray-600\">\n <div><span class=\"tw-w-3 tw-h-3 tw-bg-blue-100 tw-inline-block tw-rounded tw-mr-2\"></span>Role\n Rights: Inherited from role</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-yellow-100 tw-inline-block tw-rounded tw-mr-2\"></span>Override:\n User-specific exception</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-green-100 tw-inline-block tw-rounded tw-mr-2\"></span>Enabled:\n Permission granted</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-gray-100 tw-inline-block tw-rounded tw-mr-2\"></span>Disabled:\n Permission restricted</div>\n </div>\n </div>\n\n } @else {\n <div class=\"tw-text-center tw-py-8 tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg\">\n <div class=\"tw-text-gray-400 tw-mb-3\">\n <cide-ele-icon variant=\"gray\" size=\"lg\">menu</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-600 tw-mb-2\">No Menu Rights Available</h6>\n <p class=\"tw-text-xs tw-text-gray-500 tw-mb-3 tw-text-center\">Select both entity and role to load\n menu rights for this mapping.</p>\n @if (mapping.syenm_entity_id_syen?._id && mapping.syenm_role_id_syusrol) {\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"button\" (click)=\"loadMenuRights(i)\"\n leftIcon=\"refresh\">\n Load Menu Rights\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (entityMappings().length === 0) {\n <div class=\"tw-text-center tw-py-8 tw-bg-white tw-border tw-border-blue-200 tw-rounded-lg\">\n <div class=\"tw-text-blue-400 tw-mb-3\">\n <cide-ele-icon variant=\"blue\" size=\"lg\">business</cide-ele-icon>\n </div>\n <h4 class=\"tw-text-sm tw-font-medium tw-text-blue-800 tw-mb-2\">No Entity Mappings</h4>\n <p class=\"tw-text-blue-600 tw-mb-4 tw-text-center\">Add entity mappings to assign specific roles and\n permissions for different entities.</p>\n <button class=\"tw-mx-auto\" cideEleButton variant=\"primary\" size=\"md\" type=\"button\"\n (click)=\"addEntityMapping()\" leftIcon=\"add\">\n Add First Entity Mapping\n </button>\n </div>\n }\n </div>\n\n\n </div>\n }\n\n @case ('addresses') {\n <!-- Contact Addresses Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end\">\n <div class=\"tw-flex tw-justify-between tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addContactAddress()\"\n leftIcon=\"add\">\n Add New Address\n </button>\n </div>\n </div>\n\n <div formArrayName=\"core_user_contact_addresses\">\n @for (address of contactAddresses(); track $index; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Address {{ i + 1 }}</h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeContactAddress(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Address Type\" [options]=\"addressTypeOptions()\"\n formControlName=\"sycad_address_type_id_sygms\" placeholder=\"Select address type\" size=\"md\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Contact Person Name\" formControlName=\"sycad_contact_person_name\"\n placeholder=\"Enter contact person name\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-6\">\n <cide-ele-textarea label=\"Complete Address\" formControlName=\"sycad_contact_address\"\n placeholder=\"Enter complete address with area, city, and landmarks\" [rows]=\"3\" size=\"md\">\n </cide-ele-textarea>\n </div>\n\n <!-- Postal Code & City -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select \n label=\"Postal Code\"\n [options]=\"addressPostalCodes()[i] || []\" \n formControlName=\"sycad_contact_pin_sypin\"\n placeholder=\"Select postal code\"\n [searchable]=\"true\"\n [loading]=\"addressPostalCodesLoading()[i] || false\"\n (searchChange)=\"onPostalCodeSearch($event, i)\"\n (change)=\"onPostalCodeSelection($event, i)\"\n size=\"md\">\n </cide-ele-select>\n \n <cide-ele-input \n label=\"City\" \n formControlName=\"sycad_contact_city_sypin\"\n placeholder=\"Enter city\"\n size=\"md\">\n </cide-ele-input>\n </div>\n \n <!-- State & Country -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"State\" \n formControlName=\"sycad_contact_state_sypin\"\n placeholder=\"Enter state\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select \n label=\"Country\" \n [options]=\"addressCountries()[i] || []\" \n formControlName=\"sycad_contact_country_syctr\"\n placeholder=\"Select country\"\n valueKey=\"_id\"\n labelKey=\"syctr_country_iso_name\"\n [searchable]=\"true\"\n (searchChange)=\"onCountrySearch($event, i)\"\n [loading]=\"addressCountriesLoading()[i] || false\"\n size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Phone Numbers -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"Primary Phone\" \n formControlName=\"sycad_contact_phone\"\n type=\"tel\"\n placeholder=\"Enter primary phone number\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input \n label=\"Alternate Phone\" \n formControlName=\"sycad_contact_phone_alt\"\n type=\"tel\"\n placeholder=\"Enter alternate phone number\"\n size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Fax & Email -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"Fax Number\" \n formControlName=\"sycad_contact_fax\"\n placeholder=\"Enter fax number\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input \n label=\"Primary Email\" \n formControlName=\"sycad_contact_email\"\n type=\"email\"\n placeholder=\"Enter primary email address\"\n size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Alternate Email -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-6\">\n <cide-ele-input \n label=\"Alternate Email\" \n formControlName=\"sycad_contact_email_alt\"\n type=\"email\"\n placeholder=\"Enter alternate email address\"\n size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @case ('documents') {\n <!-- Documents Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addDocument()\" leftIcon=\"add\">\n Add Document\n </button>\n </div>\n\n @for (doc of documents(); track $index; let i = $index) {\n <div\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Document {{ i + 1 }}</h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeDocument(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Document Type\" [options]=\"documentTypeOptions()\"\n [formControlName]=\"'documents.' + i + '.syusd_document_type_id_sygms'\"\n placeholder=\"Select document type\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Document Number\" [formControlName]=\"'documents.' + i + '.syusd_doc_number'\"\n placeholder=\"Enter document number\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Name as per Document\"\n [formControlName]=\"'documents.' + i + '.syusd_doc_name_as_per_doc'\"\n placeholder=\"Enter name exactly as shown on document\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Photo Group\" [options]=\"photoGroupOptions()\"\n [formControlName]=\"'documents.' + i + '.syusd_photo_group_id_cyfm'\"\n placeholder=\"Select photo group\" size=\"md\" valueKey=\"_id\" labelKey=\"cyfm_name\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Issue Date\" [formControlName]=\"'documents.' + i + '.syusd_doc_issue_date'\"\n [id]=\"'syusd_doc_issue_date['+i+']'\" type=\"date\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Expiry Date\" [formControlName]=\"'documents.' + i + '.syusd_doc_expiry_date'\"\n [id]=\"'syusd_doc_expiry_date['+i+']'\" type=\"date\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-select label=\"Document Verification Status\" [options]=\"documentVerificationStatusOptions()\"\n [formControlName]=\"'documents.' + i + '.syusd_doc_verification_status_id_sygms'\"\n placeholder=\"Select verification status\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-select label=\"Document KYC Status\" [options]=\"documentKycStatusOptions()\"\n [formControlName]=\"'documents.' + i + '.syusd_doc_kyc_status_id_sygms'\"\n placeholder=\"Select KYC status\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n @case ('family') {\n <!-- Family Details Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addFamilyDetail()\" leftIcon=\"add\">\n Add Family Member\n </button>\n </div>\n\n @for (family of familyDetails(); track $index; let i = $index) {\n <div\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Family Member {{ i + 1 }}\n </h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeFamilyDetail(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Family Member Name\"\n [formControlName]=\"'family_details.' + i + '.syfdl_family_member_name'\"\n placeholder=\"Enter family member full name\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Relationship\" [options]=\"relationshipOptions()\"\n [formControlName]=\"'family_details.' + i + '.syfdl_relationship_id_sygms'\"\n placeholder=\"Select relationship\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Date of Birth\"\n [formControlName]=\"'family_details.' + i + '.syfdl_family_member_dob'\" type=\"date\" size=\"md\"\n [id]=\"'syfdl_family_member_dob['+i+']'\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Blood Group\" [options]=\"bloodGroupOptions()\"\n [formControlName]=\"'family_details.' + i + '.syfdl_blood_group_sygms'\"\n placeholder=\"Select blood group\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Contact Email\" [formControlName]=\"'family_details.' + i + '.syfdl_contact_email_id'\"\n type=\"email\" placeholder=\"Enter contact email\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Number\" [formControlName]=\"'family_details.' + i + '.syfdl_contact_number'\"\n type=\"tel\" placeholder=\"Enter contact number\" size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n\n <!-- Form Actions -->\n <div\n class=\"tw-flex tw-justify-end tw-gap-4 tw-py-2 tw-bg-white tw-border-t tw-border-gray-200 tw-sticky tw-bottom-0 tw-z-10\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || userMasterForm.invalid\"\n [loading]=\"loading()\" leftIcon=\"save\">\n Save User Master\n </button>\n </div>\n </form>\n</div>" }]
|
|
12133
|
+
], template: "<!-- \n ENTERPRISE USER MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<div class=\"tw-w-full tw-h-full tw-p-3\">\n <form class=\"tw-max-w-7xl tw-mx-auto tw-bg-transparent\" [formGroup]=\"userMasterForm\" [class.tw-opacity-60]=\"loading()\"\n (ngSubmit)=\"onSubmit()\">\n\n <!-- User Context Header -->\n <div\n class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-indigo-50 tw-border tw-border-blue-200 tw-rounded-md tw-p-2 tw-mb-3 tw-shadow-sm\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-flex-wrap tw-gap-2\">\n <!-- User Basic Info Display -->\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-flex-wrap\">\n <!-- Profile Photo Preview -->\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div\n class=\"tw-w-8 tw-h-8 tw-rounded-full tw-bg-blue-100 tw-border tw-border-blue-200 tw-flex tw-items-center tw-justify-center tw-overflow-hidden\">\n @if (getUserPhoto()) {\n <img [src]=\"getUserPhoto()\" alt=\"Profile\" class=\"tw-w-full tw-h-full tw-object-cover\">\n } @else {\n <cide-ele-icon variant=\"blue\" size=\"xs\">person</cide-ele-icon>\n }\n </div>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-xs tw-font-medium tw-text-blue-900\">\n {{ getUserFullName() || 'New User' }}\n </span>\n <span class=\"tw-text-xs tw-text-blue-600\">\n {{ getUserUsername() || 'Username not set' }}\n </span>\n </div>\n </div>\n\n <!-- Contact Info -->\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-700\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">email</cide-ele-icon>\n <span>{{ getUserEmail() || 'Email not set' }}</span>\n </div>\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-700\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">phone</cide-ele-icon>\n <span>{{ getUserMobile() || 'Mobile not set' }}</span>\n </div>\n </div>\n\n <!-- Active Status -->\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n @if (getUserActiveStatus()) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-700\">\n <cide-ele-icon variant=\"green\" size=\"xs\" class=\"tw-mr-1\">check_circle</cide-ele-icon>\n Active\n </span>\n } @else {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-xs tw-font-medium tw-bg-red-100 tw-text-red-700\">\n <cide-ele-icon variant=\"red\" size=\"xs\" class=\"tw-mr-1\">cancel</cide-ele-icon>\n Inactive\n </span>\n }\n </div>\n </div>\n\n <!-- Entity Info -->\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n @if (hasDefaultEntity()) {\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-blue-700\">\n <cide-ele-icon variant=\"blue\" size=\"xs\">business</cide-ele-icon>\n <span class=\"tw-font-medium\">{{ getDefaultEntityName() }}</span>\n </div>\n } @else {\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-text-xs tw-text-gray-500\">\n <cide-ele-icon variant=\"gray\" size=\"xs\">business</cide-ele-icon>\n <span class=\"tw-italic\">No entity</span>\n </div>\n }\n\n <span class=\"tw-text-xs tw-text-gray-600 tw-px-2 tw-py-1 tw-bg-gray-100 tw-rounded\">\n {{ getEntityMappingCount() }} mapping(s)\n </span>\n </div>\n </div>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"tw-p-0 tw-mb-2 tw-border-b tw-border-gray-200\">\n <cide-ele-tab [tabs]=\"userTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- User Basic Information Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n\n <!-- Name Fields -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-4 lg:tw-grid-cols-2 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input id=\"user_firstname\" label=\"First Name *\" formControlName=\"user_firstname\"\n placeholder=\"Enter first name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_middlename\" label=\"Middle Name\" formControlName=\"user_middlename\"\n placeholder=\"Enter middle name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_lastname\" label=\"Last Name *\" formControlName=\"user_lastname\"\n placeholder=\"Enter last name\" [maxlength]=\"20\" size=\"md\" (ngModelChange)=\"onNameFieldChange()\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_fullname\" label=\"Full Name * (Auto-generated)\" formControlName=\"user_fullname\"\n placeholder=\"Auto-generated from name fields or enter manually\" [maxlength]=\"62\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Contact and Login Information -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-3 lg:tw-grid-cols-2 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input id=\"user_username\" label=\"Username *\" formControlName=\"user_username\"\n placeholder=\"Enter unique username\" [maxlength]=\"20\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_emailid\" label=\"Email ID *\" formControlName=\"user_emailid\" type=\"email\"\n placeholder=\"Enter valid email address\" [maxlength]=\"320\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_mobileno\" label=\"Mobile Number *\" formControlName=\"user_mobileno\" type=\"tel\"\n placeholder=\"Enter mobile number\" [maxlength]=\"15\" size=\"md\">\n </cide-ele-input>\n </div>\n\n\n\n <!-- Status Control -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-4\">\n <div class=\"tw-p-4 tw-bg-blue-50 tw-border tw-border-blue-100 tw-rounded-lg\">\n <label\n class=\"tw-flex tw-flex-col tw-cursor-pointer tw-py-2 tw-bg-transparent tw-border-none tw-rounded-none tw-transition-all tw-duration-200 hover:tw-bg-blue-75\">\n <cide-ele-input type=\"checkbox\" label=\"Active User Status\" formControlName=\"user_isactive\"\n class=\"tw-h-5 tw-accent-blue-500 tw-rounded tw-mb-1\" />\n <span class=\"tw-font-semibold tw-text-gray-700 tw-text-base\"></span>\n <span class=\"tw-text-sm tw-text-gray-600 tw-mt-1 tw-leading-relaxed\">Enable this user account for system\n access and operations</span>\n </label>\n </div>\n </div>\n </div>\n }\n\n @case ('auth') {\n <!-- Authentication Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <!-- Password Fields -->\n @if (shouldShowPasswordFields()) {\n <div class=\"tw-mb-6\">\n <!-- Password Fields Header for Edit Mode -->\n @if (isEditMode()) {\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-3\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Update Password</h6>\n <button type=\"button\"\n class=\"tw-px-3 tw-py-1 tw-bg-gray-100 tw-text-gray-600 tw-border tw-border-gray-300 tw-rounded-md tw-text-xs tw-font-medium hover:tw-bg-gray-200 tw-transition-colors\"\n (click)=\"cancelPasswordUpdate()\">\n Cancel Password Update\n </button>\n </div>\n }\n\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 md:tw-grid-cols-1 tw-gap-6\">\n <cide-ele-input id=\"user_password\" [label]=\"getPasswordFieldLabel()\" formControlName=\"user_password\"\n type=\"password\" placeholder=\"Enter secure password (min 8 characters)\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input id=\"user_confirm_password\" [label]=\"getPasswordConfirmLabel()\"\n formControlName=\"user_confirm_password\" type=\"password\" placeholder=\"Confirm your password\" size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n }\n\n <!-- Password Update Option for Edit Mode -->\n @if (isEditMode() && !shouldShowPasswordFields()) {\n <div class=\"tw-mb-6\">\n <div class=\"tw-p-4 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-blue-800 tw-mb-2\">Password Update</h6>\n <p class=\"tw-text-sm tw-text-blue-600 tw-mb-3\">Current password will be kept. Click below to change\n password.</p>\n\n @if (hasPasswordInput()) {\n <div\n class=\"tw-mb-3 tw-p-2 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded tw-text-sm tw-text-yellow-700\">\n <cide-ele-icon variant=\"yellow\" size=\"xs\" class=\"tw-mr-1\">warning</cide-ele-icon>\n Password fields contain text. Click \"Change Password\" to manage existing input.\n </div>\n }\n\n <button type=\"button\"\n class=\"tw-px-4 tw-py-2 tw-bg-blue-100 tw-text-blue-700 tw-border tw-border-blue-300 tw-rounded-md tw-text-sm tw-font-medium hover:tw-bg-blue-200 tw-transition-colors\"\n (click)=\"triggerPasswordUpdate()\">\n @if (hasPasswordInput()) {\n Manage Password Fields\n } @else {\n Change Password\n }\n </button>\n </div>\n </div>\n }\n\n <!-- Password Options -->\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-6 tw-mb-6\">\n <div class=\"tw-p-4 tw-bg-yellow-50 tw-border tw-border-yellow-100 tw-rounded-lg\">\n <label\n class=\"tw-flex tw-flex-col tw-gap-2 tw-cursor-pointer tw-py-2 tw-bg-transparent tw-border-none tw-rounded-none tw-transition-all tw-duration-200\">\n <cide-ele-input type=\"checkbox\" label=\"Force Password Change on Login\"\n formControlName=\"user_passwordchangeonlogin\" class=\"tw-h-5 tw-accent-yellow-500 tw-rounded tw-mb-1\" />\n <span class=\"tw-text-sm tw-text-gray-600 tw-mt-1 tw-leading-relaxed\">User will be required to change\n password on next login</span>\n </label>\n </div>\n </div>\n\n <!-- Photo Upload -->\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-6 tw-mb-6\">\n <div class=\"tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg tw-p-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800 tw-mb-3\">Profile Photo</h6>\n <div class=\"tw-flex tw-flex-col tw-items-center tw-gap-4\">\n <cide-ele-file-input id=\"user_photo_upload\" formControlName=\"user_photo_id_cyfm\" accept=\"image/*\"\n [showPreview]=\"true\" [previewBoxMode]=\"true\" previewWidth=\"150px\" previewHeight=\"150px\"\n placeholderText=\"Click to upload photo\" placeholderIcon=\"\uD83D\uDC64\">\n </cide-ele-file-input>\n <div class=\"tw-text-xs tw-text-gray-500 tw-text-center tw-max-w-sm\">\n Supported formats: JPG, PNG, GIF. Maximum size: 2MB. Recommended size: 150x150px for best results.\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('roles') {\n <!-- Entity, Roles & Permissions Mapping Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n\n\n\n <!-- Important Note -->\n <div class=\"tw-bg-amber-50 tw-border tw-border-amber-200 tw-rounded-lg tw-p-4 tw-mb-6\">\n <div class=\"tw-flex tw-items-start tw-gap-3\">\n <cide-ele-icon variant=\"amber\" size=\"lg\">info</cide-ele-icon>\n <div class=\"tw-flex-1\">\n <h4 class=\"tw-text-sm tw-font-semibold tw-text-amber-800 tw-mb-1\">Entity-Role Based Access</h4>\n <p class=\"tw-text-sm tw-text-amber-700 tw-mb-2\">User access is completely managed through entity-role\n mappings below. At least one entity mapping is required for user access.</p>\n @if (hasDefaultEntity()) {\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mt-2 tw-p-2 tw-bg-amber-100 tw-rounded\">\n <cide-ele-icon variant=\"amber\" size=\"sm\">star</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-amber-800\">\n <strong>Default Entity:</strong> {{ getDefaultEntityName() }}\n </span>\n </div>\n } @else {\n <div class=\"tw-text-sm tw-text-amber-600 tw-mt-2 tw-italic\">\n \u26A0\uFE0F No default entity selected. Please set one entity as default.\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Entity-Role Mapping Section -->\n <div class=\"tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg tw-p-6 tw-mb-6\">\n <div class=\"tw-flex tw-text-center tw-justify-between tw-items-center tw-mb-4\">\n <div>\n <h4 class=\"tw-text-sm tw-text-left tw-font-semibold tw-text-blue-900 tw-mb-1\">Entity-Role Mapping</h4>\n <p class=\"tw-text-sm tw-text-blue-700\">Map user to entities with specific roles and permissions</p>\n </div>\n <div class=\"tw-flex tw-flex-col tw-items-end\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addEntityMapping()\" leftIcon=\"add\"\n [disabled]=\"isAllEntitiesMapped()\">\n Add Entity Mapping\n </button>\n \n @if (isAllEntitiesMapped()) {\n <div class=\"tw-mt-2 tw-p-2 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-md tw-max-w-xs\">\n <p class=\"tw-text-xs tw-text-blue-700\">\n <cide-ele-icon variant=\"info\" size=\"xs\" class=\"tw-mr-1\">info</cide-ele-icon>\n All available entities are already mapped.\n </p>\n </div>\n }\n </div>\n </div>\n\n <div formArrayName=\"core_entity_mapping\">\n @for (mapping of entityMappings(); track $index; let i = $index) {\n <div class=\"tw-bg-white tw-border tw-border-blue-200 tw-rounded-xl tw-mb-6 tw-overflow-hidden tw-shadow-sm\"\n [formGroupName]=\"i\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-blue-100 tw-px-6 tw-py-3 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-blue-200\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <h5 class=\"tw-m-0 tw-text-blue-800 tw-text-sm tw-font-semibold\">Entity Mapping {{ i + 1 }}</h5>\n @if (mapping.syenm_isdefault) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800\">\n <cide-ele-icon variant=\"green\" size=\"xs\" class=\"tw-mr-1\">star</cide-ele-icon>\n Default\n </span>\n }\n </div>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeEntityMapping(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n\n <div class=\"tw-p-6\">\n <!-- Entity and Role Selection -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <div>\n <cide-ele-select label=\"Entity *\" [options]=\"getFilteredEntityOptions(i)\" formControlName=\"syenm_entity_id_syen\"\n valueKey=\"_id\" labelKey=\"syen_name\" placeholder=\"Select entity\" size=\"md\"\n (change)=\"onEntityChange(i, $event)\">\n </cide-ele-select>\n \n @if (isAllEntitiesSelected(i)) {\n <div class=\"tw-mt-2 tw-p-2 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded-md\">\n <p class=\"tw-text-xs tw-text-yellow-700\">\n <cide-ele-icon variant=\"warning\" size=\"xs\" class=\"tw-mr-1\">info</cide-ele-icon>\n All entities are already mapped. Remove another mapping to add this one.\n </p>\n </div>\n }\n </div>\n\n <cide-ele-select label=\"Role for this Entity\" [options]=\"getRoleOptionsForEntity(i)\"\n formControlName=\"syenm_role_id_syusrol\" placeholder=\"Select role for this entity\" size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Entity-Specific Details -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Department for this Entity\" [options]=\"getDepartmentOptionsForEntity(i)\"\n formControlName=\"syenm_department_id_sydept\" (change)=\"onDepartmentChange($event)\" valueKey=\"_id\" labelKey=\"sydept_name\" placeholder=\"Select department\" size=\"md\">\n </cide-ele-select>\n\n <cide-ele-select label=\"Designation for this Entity\" [options]=\"getDesignationOptionsForEntity(i)\" valueKey=\"_id\" labelKey=\"sydsg_name\"\n formControlName=\"syenm_designation_id_sydsg\" placeholder=\"Select designation\" size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Active Period for Entity Mapping -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Active From *\" [id]=\"'syenm_activefrom['+i+']'\"\n formControlName=\"syenm_activefrom\" type=\"date\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Active Until\" [id]=\"'syenm_activeupto['+i+']'\"\n formControlName=\"syenm_activeupto\" type=\"date\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Mapping Settings -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6 tw-mb-6\">\n <div class=\"tw-p-3 tw-bg-green-50 tw-border tw-border-green-200 tw-rounded-lg\">\n <cide-ele-input type=\"checkbox\" label=\"Default Entity\" formControlName=\"syenm_isdefault\"\n (change)=\"onDefaultEntityChange(i, $event)\" class=\"tw-h-5 tw-accent-green-500\" />\n <span class=\"tw-text-xs tw-text-green-600 tw-block tw-mt-1\">Set as user's default entity (only one\n allowed)</span>\n </div>\n\n <div class=\"tw-p-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\n <cide-ele-input type=\"checkbox\" label=\"Active Mapping\" formControlName=\"syenm_isactive\"\n class=\"tw-h-5 tw-accent-blue-500\" />\n <span class=\"tw-text-xs tw-text-blue-600 tw-block tw-mt-1\">Enable this entity mapping</span>\n </div>\n </div>\n\n <!-- Menu Rights Grid for this Entity-Role -->\n <div class=\"tw-border-t tw-border-gray-200 tw-pt-4\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Menu Rights & Permissions</h6>\n <div class=\"tw-flex tw-gap-2\">\n <button cideEleButton variant=\"secondary\" size=\"sm\" type=\"button\" (click)=\"refreshMenuRights(i)\"\n leftIcon=\"refresh\">\n Refresh Rights\n </button>\n </div>\n </div>\n\n @if (getMenuRightsForMapping(i).length > 0) {\n <!-- Menu Rights Grid -->\n <div class=\"tw-overflow-x-auto tw-bg-white tw-border tw-border-gray-200 tw-rounded-lg\">\n <table class=\"tw-w-full tw-text-sm\">\n <thead class=\"tw-bg-gray-50 tw-border-b tw-border-gray-200\">\n <tr>\n <th class=\"tw-px-4 tw-py-3 tw-text-left tw-font-medium tw-text-gray-700\">Menu</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Role Rights</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Create</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Read</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Update</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Delete</th>\n <th class=\"tw-px-3 tw-py-3 tw-text-center tw-font-medium tw-text-gray-700\">Exception</th>\n </tr>\n </thead>\n <tbody>\n @for (menuRight of getMenuRightsForMapping(i); track $index; let j = $index) {\n <tr class=\"tw-border-b tw-border-gray-100 hover:tw-bg-gray-50\">\n <td class=\"tw-px-4 tw-py-3 tw-font-medium tw-text-gray-900\">\n {{ menuRight.menu_name }}\n <div class=\"tw-text-xs tw-text-gray-500\">{{ menuRight.menu_code }}</div>\n </td>\n\n <!-- Role Rights Display -->\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <div class=\"tw-flex tw-flex-wrap tw-justify-center tw-gap-1\">\n @for (right of menuRight.role_rights; track $index) {\n <span\n class=\"tw-inline-block tw-px-2 tw-py-1 tw-text-xs tw-bg-blue-100 tw-text-blue-800 tw-rounded\">\n {{ right }}\n </span>\n }\n </div>\n </td>\n\n <!-- Individual Permission Controls -->\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.create'\"\n class=\"tw-h-4 tw-accent-green-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.read'\"\n class=\"tw-h-4 tw-accent-blue-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.update'\"\n class=\"tw-h-4 tw-accent-yellow-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n <cide-ele-input type=\"checkbox\"\n [formControlName]=\"'core_entity_mapping.' + i + '.menu_rights.' + j + '.delete'\"\n class=\"tw-h-4 tw-accent-red-500\" />\n </td>\n\n <td class=\"tw-px-3 tw-py-3 tw-text-center\">\n @if (hasExceptionForMenu(i, menuRight.menu_id)) {\n <span\n class=\"tw-inline-block tw-px-2 tw-py-1 tw-text-xs tw-bg-yellow-100 tw-text-yellow-800 tw-rounded\">\n Override\n </span>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">Default</span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <!-- Legend -->\n <div class=\"tw-mt-4 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <h6 class=\"tw-text-xs tw-font-semibold tw-text-gray-700 tw-mb-2\">Legend:</h6>\n <div class=\"tw-grid tw-grid-cols-2 md:tw-grid-cols-4 tw-gap-3 tw-text-xs tw-text-gray-600\">\n <div><span class=\"tw-w-3 tw-h-3 tw-bg-blue-100 tw-inline-block tw-rounded tw-mr-2\"></span>Role\n Rights: Inherited from role</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-yellow-100 tw-inline-block tw-rounded tw-mr-2\"></span>Override:\n User-specific exception</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-green-100 tw-inline-block tw-rounded tw-mr-2\"></span>Enabled:\n Permission granted</div>\n <div><span\n class=\"tw-w-3 tw-h-3 tw-bg-gray-100 tw-inline-block tw-rounded tw-mr-2\"></span>Disabled:\n Permission restricted</div>\n </div>\n </div>\n\n } @else {\n <div class=\"tw-text-center tw-py-8 tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg\">\n <div class=\"tw-text-gray-400 tw-mb-3\">\n <cide-ele-icon variant=\"gray\" size=\"lg\">menu</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-600 tw-mb-2\">No Menu Rights Available</h6>\n <p class=\"tw-text-xs tw-text-gray-500 tw-mb-3 tw-text-center\">Select both entity and role to load\n menu rights for this mapping.</p>\n @if (mapping.syenm_entity_id_syen?._id && mapping.syenm_role_id_syusrol) {\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"button\" (click)=\"loadMenuRights(i)\"\n leftIcon=\"refresh\">\n Load Menu Rights\n </button>\n }\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n\n @if (entityMappings().length === 0) {\n <div class=\"tw-text-center tw-py-8 tw-bg-white tw-border tw-border-blue-200 tw-rounded-lg\">\n <div class=\"tw-text-blue-400 tw-mb-3\">\n <cide-ele-icon variant=\"blue\" size=\"lg\">business</cide-ele-icon>\n </div>\n <h4 class=\"tw-text-sm tw-font-medium tw-text-blue-800 tw-mb-2\">No Entity Mappings</h4>\n <p class=\"tw-text-blue-600 tw-mb-4 tw-text-center\">Add entity mappings to assign specific roles and\n permissions for different entities.</p>\n <button class=\"tw-mx-auto\" cideEleButton variant=\"primary\" size=\"md\" type=\"button\"\n (click)=\"addEntityMapping()\" leftIcon=\"add\">\n Add First Entity Mapping\n </button>\n </div>\n }\n </div>\n\n\n </div>\n }\n\n @case ('addresses') {\n <!-- Contact Addresses Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end\">\n <div class=\"tw-flex tw-justify-between tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addContactAddress()\"\n leftIcon=\"add\">\n Add New Address\n </button>\n </div>\n </div>\n\n <div formArrayName=\"core_user_contact_addresses\">\n @for (address of contactAddresses(); track $index; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Address {{ i + 1 }}</h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeContactAddress(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Address Type\" [options]=\"addressTypeOptions()\" id=\"sycad_address_type_id_sygms\"\n formControlName=\"sycad_address_type_id_sygms\" placeholder=\"Select address type\" size=\"md\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Contact Person Name\" formControlName=\"sycad_contact_person_name\"\n placeholder=\"Enter contact person name\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-6\">\n <cide-ele-textarea label=\"Complete Address\" formControlName=\"sycad_contact_address\"\n placeholder=\"Enter complete address with area, city, and landmarks\" [rows]=\"3\" size=\"md\">\n </cide-ele-textarea>\n </div>\n\n <!-- Postal Code & City -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select \n label=\"Postal Code\"\n [options]=\"addressPostalCodes()[i] || []\" \n formControlName=\"sycad_contact_pin_sypin\"\n placeholder=\"Select postal code\"\n [searchable]=\"true\"\n [loading]=\"addressPostalCodesLoading()[i] || false\"\n (searchChange)=\"onPostalCodeSearch($event, i)\"\n (change)=\"onPostalCodeSelection($event, i)\"\n size=\"md\">\n </cide-ele-select>\n \n <cide-ele-input \n label=\"City\" \n formControlName=\"sycad_contact_city_sypin\"\n placeholder=\"Enter city\"\n size=\"md\">\n </cide-ele-input>\n </div>\n \n <!-- State & Country -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"State\" \n formControlName=\"sycad_contact_state_sypin\"\n placeholder=\"Enter state\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select \n label=\"Country\" \n [options]=\"addressCountries()[i] || []\" \n formControlName=\"sycad_contact_country_syctr\"\n placeholder=\"Select country\"\n valueKey=\"_id\"\n labelKey=\"syctr_country_iso_name\"\n [searchable]=\"true\"\n (searchChange)=\"onCountrySearch($event, i)\"\n [loading]=\"addressCountriesLoading()[i] || false\"\n size=\"md\">\n </cide-ele-select>\n </div>\n\n <!-- Phone Numbers -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"Primary Phone\" \n formControlName=\"sycad_contact_phone\"\n type=\"tel\"\n placeholder=\"Enter primary phone number\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input \n label=\"Alternate Phone\" \n formControlName=\"sycad_contact_phone_alt\"\n type=\"tel\"\n placeholder=\"Enter alternate phone number\"\n size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Fax & Email -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input \n label=\"Fax Number\" \n formControlName=\"sycad_contact_fax\"\n placeholder=\"Enter fax number\"\n size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input \n label=\"Primary Email\" \n formControlName=\"sycad_contact_email\"\n type=\"email\"\n placeholder=\"Enter primary email address\"\n size=\"md\">\n </cide-ele-input>\n </div>\n\n <!-- Alternate Email -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-6\">\n <cide-ele-input \n label=\"Alternate Email\" \n formControlName=\"sycad_contact_email_alt\"\n type=\"email\"\n placeholder=\"Enter alternate email address\"\n size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @case ('documents') {\n <!-- Documents Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addDocument()\" leftIcon=\"add\">\n Add Document\n </button>\n </div>\n\n <div formArrayName=\"core_user_documents\">\n @for (doc of documents(); track $index; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Document {{ i + 1 }}</h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeDocument(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Document Type\" [options]=\"documentTypeOptions()\"\n formControlName=\"syusd_document_type_id_sygms\"\n placeholder=\"Select document type\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Document Number\" formControlName=\"syusd_doc_number\"\n placeholder=\"Enter document number\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Name as per Document\"\n formControlName=\"syusd_doc_name_as_per_doc\"\n placeholder=\"Enter name exactly as shown on document\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Photo Group\" [options]=\"photoGroupOptions()\"\n formControlName=\"syusd_photo_group_id_cyfm\"\n placeholder=\"Select photo group\" size=\"md\" valueKey=\"_id\" labelKey=\"cyfm_name\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Issue Date\" formControlName=\"syusd_doc_issue_date\"\n [id]=\"'syusd_doc_issue_date['+i+']'\" type=\"date\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Expiry Date\" formControlName=\"syusd_doc_expiry_date\"\n [id]=\"'syusd_doc_expiry_date['+i+']'\" type=\"date\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-select label=\"Document Verification Status\" [options]=\"documentVerificationStatusOptions()\"\n formControlName=\"syusd_doc_verification_status_id_sygms\"\n placeholder=\"Select verification status\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-select label=\"Document KYC Status\" [options]=\"documentKycStatusOptions()\"\n formControlName=\"syusd_doc_kyc_status_id_sygms\"\n placeholder=\"Select KYC status\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @case ('family') {\n <!-- Family Details Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-2\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-2 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"md\" type=\"button\" (click)=\"addFamilyDetail()\" leftIcon=\"add\">\n Add Family Member\n </button>\n </div>\n\n <div formArrayName=\"core_user_family_details\">\n @for (family of familyDetails(); track $index; let i = $index) {\n <div [formGroupName]=\"i\"\n class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-xl tw-mb-8 tw-overflow-hidden tw-transition-all tw-duration-300 hover:tw-shadow-lg tw-shadow-sm\">\n <div\n class=\"tw-bg-gradient-to-r tw-from-gray-50 tw-to-gray-100 tw-px-6 tw-py-1 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">Family Member {{ i + 1 }}\n </h4>\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeFamilyDetail(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n </div>\n <div class=\"tw-p-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Family Member Name\"\n formControlName=\"syfdl_family_member_name\"\n placeholder=\"Enter family member full name\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-select \n label=\"Family Member User\"\n [options]=\"userOptions(i)\"\n formControlName=\"syfdl_family_member_id_user\"\n placeholder=\"Select family member user\" \n size=\"md\" \n valueKey=\"_id\" \n labelKey=\"user_fullname\"\n [searchable]=\"true\"\n [loading]=\"userSearchLoading()[i] || false\"\n (searchChange)=\"onUserSearchChange($event, i)\"\n (change)=\"onUserSelectionChange($event, i)\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-select label=\"Relationship\" [options]=\"relationshipOptions()\"\n formControlName=\"syfdl_relationship_id_sygms\"\n placeholder=\"Select relationship\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-select label=\"Blood Group\" [options]=\"bloodGroupOptions()\"\n formControlName=\"syfdl_blood_group_sygms\"\n placeholder=\"Select blood group\" size=\"md\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Date of Birth\"\n formControlName=\"syfdl_family_member_dob\" type=\"date\" size=\"md\"\n [id]=\"'syfdl_family_member_dob['+i+']'\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Phone\"\n formControlName=\"syfdl_contact_phone\"\n type=\"tel\" placeholder=\"Enter contact phone\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6 tw-mb-6\">\n <cide-ele-input label=\"Contact Email\" formControlName=\"syfdl_contact_email\"\n type=\"email\" placeholder=\"Enter contact email\" size=\"md\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Email ID\" formControlName=\"syfdl_contact_email_id\"\n type=\"email\" placeholder=\"Enter contact email ID\" size=\"md\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Contact Number\" formControlName=\"syfdl_contact_number\"\n type=\"tel\" placeholder=\"Enter contact number\" size=\"md\">\n </cide-ele-input>\n\n <div class=\"tw-flex tw-items-center tw-pt-6\">\n <cide-ele-input \n formControlName=\"syfdl_isactive\"\n type=\"checkbox\"\n label=\"Active\"\n size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n }\n </div>\n\n <!-- Form Actions -->\n <div\n class=\"tw-flex tw-justify-end tw-gap-4 tw-py-2 tw-bg-white tw-border-t tw-border-gray-200 tw-sticky tw-bottom-0 tw-z-10\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || userMasterForm.invalid\"\n [loading]=\"loading()\" leftIcon=\"save\">\n Save User Master\n </button>\n </div>\n </form>\n</div>" }]
|
|
11995
12134
|
}], ctorParameters: () => [] });
|
|
11996
12135
|
|
|
11997
12136
|
var userCreate_component = /*#__PURE__*/Object.freeze({
|
|
@@ -14744,5 +14883,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
14744
14883
|
* Generated bundle index. Do not edit.
|
|
14745
14884
|
*/
|
|
14746
14885
|
|
|
14747
|
-
export { CideCoreDepartmentListComponent, CideCoreDepartmentManagementService, CideCoreDesignationListComponent, CideCoreDesignationManagementService, CideCoreEntityCreateComponent, CideCoreEntityListComponent, CideCoreEntityManagementService, CideCoreGradeLevelListComponent, CideCoreGradeLevelManagementService, CideCoreMenuListComponent, CideCoreMenuManagementService, CideCorePageControlsComponent, CideCorePageControlsService, CideCorePageListComponent, CideCorePageManagementService, CideCorePageThemeComponent, CideCorePageThemeService, CideCoreRoleSelectService, CideCoreUserAttributesComponent, CideCoreUserContactAddressesComponent, CideCoreUserCreateComponent, CideCoreUserDocumentsComponent, CideCoreUserEntityAccessComponent, CideCoreUserFamilyDetailsComponent, CideCoreUserListComponent, CideCoreUserMasterService, CloudIdeCoreComponent, CloudIdeCoreService, coreRoutes };
|
|
14886
|
+
export { CideCoreDepartmentListComponent, CideCoreDepartmentManagementService, CideCoreDesignationListComponent, CideCoreDesignationManagementService, CideCoreEntityCreateComponent, CideCoreEntityListComponent, CideCoreEntityManagementService, CideCoreGeneralMasterComponent, CideCoreGeneralMasterService, CideCoreGeneralMasterTypeComponent, CideCoreGeneralMasterTypeService, CideCoreGradeLevelListComponent, CideCoreGradeLevelManagementService, CideCoreMenuListComponent, CideCoreMenuManagementService, CideCorePageControlsComponent, CideCorePageControlsService, CideCorePageListComponent, CideCorePageManagementService, CideCorePageThemeComponent, CideCorePageThemeService, CideCoreRoleSelectService, CideCoreUserAttributesComponent, CideCoreUserContactAddressesComponent, CideCoreUserCreateComponent, CideCoreUserDocumentsComponent, CideCoreUserEntityAccessComponent, CideCoreUserFamilyDetailsComponent, CideCoreUserListComponent, CideCoreUserMasterService, CloudIdeCoreComponent, CloudIdeCoreService, coreRoutes };
|
|
14748
14887
|
//# sourceMappingURL=cloud-ide-core.mjs.map
|