cloud-ide-core 2.0.135 → 2.0.142
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-page-form.component-B9tSopSN.mjs → cloud-ide-core-page-form.component-DXbHvMOC.mjs} +4 -4
- package/fesm2022/{cloud-ide-core-page-form.component-B9tSopSN.mjs.map → cloud-ide-core-page-form.component-DXbHvMOC.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-core-workflow-registry-list.component-HrnKDaiv.mjs → cloud-ide-core-workflow-registry-list.component-zwz2r0iS.mjs} +7 -7
- package/fesm2022/{cloud-ide-core-workflow-registry-list.component-HrnKDaiv.mjs.map → cloud-ide-core-workflow-registry-list.component-zwz2r0iS.mjs.map} +1 -1
- package/fesm2022/cloud-ide-core.mjs +1305 -250
- package/fesm2022/cloud-ide-core.mjs.map +1 -1
- package/index.d.ts +76 -15
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { authGuard, SharedObjectIdService, CideSharedOrgStructureComponent } from 'cloud-ide-shared';
|
|
1
|
+
import { authGuard, SharedObjectIdService, CideSharedOrgStructureComponent, ENTITY_SERVICE_TOKEN } from 'cloud-ide-shared';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, Component, inject, DestroyRef, viewChild, signal, computed, input, output, ChangeDetectorRef,
|
|
3
|
+
import { Injectable, Component, inject, DestroyRef, viewChild, signal, computed, effect, input, output, ChangeDetectorRef, ViewChild } from '@angular/core';
|
|
4
4
|
import * as i1$1 from '@angular/common';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
6
6
|
import * as i1$2 from '@angular/forms';
|
|
@@ -63,7 +63,7 @@ const coreRoutes = [
|
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
path: 'page-form',
|
|
66
|
-
loadComponent: () => import('./cloud-ide-core-page-form.component-
|
|
66
|
+
loadComponent: () => import('./cloud-ide-core-page-form.component-DXbHvMOC.mjs').then(c => c.CideCorePageFormComponent),
|
|
67
67
|
title: 'Page Form',
|
|
68
68
|
canActivate: [authGuard],
|
|
69
69
|
data: {
|
|
@@ -72,7 +72,7 @@ const coreRoutes = [
|
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
path: 'page-form/:query',
|
|
75
|
-
loadComponent: () => import('./cloud-ide-core-page-form.component-
|
|
75
|
+
loadComponent: () => import('./cloud-ide-core-page-form.component-DXbHvMOC.mjs').then(c => c.CideCorePageFormComponent),
|
|
76
76
|
title: 'Page Form',
|
|
77
77
|
canActivate: [authGuard],
|
|
78
78
|
data: {
|
|
@@ -261,7 +261,7 @@ const coreRoutes = [
|
|
|
261
261
|
// Workflow Management Routes
|
|
262
262
|
{
|
|
263
263
|
path: 'workflow-registry',
|
|
264
|
-
loadComponent: () => import('./cloud-ide-core-workflow-registry-list.component-
|
|
264
|
+
loadComponent: () => import('./cloud-ide-core-workflow-registry-list.component-zwz2r0iS.mjs').then(c => c.CideCoreWorkflowRegistryListComponent),
|
|
265
265
|
title: 'Workflow Registry',
|
|
266
266
|
canActivate: [authGuard],
|
|
267
267
|
data: {
|
|
@@ -272,10 +272,10 @@ const coreRoutes = [
|
|
|
272
272
|
|
|
273
273
|
class CloudIdeCoreService {
|
|
274
274
|
constructor() { }
|
|
275
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
276
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
275
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CloudIdeCoreService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
276
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CloudIdeCoreService, providedIn: 'root' });
|
|
277
277
|
}
|
|
278
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CloudIdeCoreService, decorators: [{
|
|
279
279
|
type: Injectable,
|
|
280
280
|
args: [{
|
|
281
281
|
providedIn: 'root'
|
|
@@ -283,14 +283,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
283
283
|
}], ctorParameters: () => [] });
|
|
284
284
|
|
|
285
285
|
class CloudIdeCoreComponent {
|
|
286
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
287
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
286
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CloudIdeCoreComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
287
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CloudIdeCoreComponent, isStandalone: true, selector: "cide-core", ngImport: i0, template: `
|
|
288
288
|
<p>
|
|
289
289
|
cloud-ide-core works!
|
|
290
290
|
</p>
|
|
291
291
|
`, isInline: true, styles: [""] });
|
|
292
292
|
}
|
|
293
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CloudIdeCoreComponent, decorators: [{
|
|
294
294
|
type: Component,
|
|
295
295
|
args: [{ selector: 'cide-core', standalone: true, imports: [], template: `
|
|
296
296
|
<p>
|
|
@@ -508,10 +508,10 @@ class MenuManagementService {
|
|
|
508
508
|
console.error('Menu Management Service Error:', errorMessage);
|
|
509
509
|
return throwError(() => new Error(errorMessage));
|
|
510
510
|
}
|
|
511
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
512
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
511
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MenuManagementService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
512
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MenuManagementService, providedIn: 'root' });
|
|
513
513
|
}
|
|
514
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
514
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MenuManagementService, decorators: [{
|
|
515
515
|
type: Injectable,
|
|
516
516
|
args: [{
|
|
517
517
|
providedIn: 'root'
|
|
@@ -668,10 +668,10 @@ class CideCoreGeneralMasterService {
|
|
|
668
668
|
console.error('General Master Service Error:', errorMessage);
|
|
669
669
|
return throwError(() => new Error(errorMessage));
|
|
670
670
|
}
|
|
671
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
672
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
671
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
672
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterService, providedIn: 'root' });
|
|
673
673
|
}
|
|
674
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
674
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterService, decorators: [{
|
|
675
675
|
type: Injectable,
|
|
676
676
|
args: [{
|
|
677
677
|
providedIn: 'root'
|
|
@@ -865,10 +865,10 @@ class CideCoreGeneralMasterTypeService {
|
|
|
865
865
|
console.error('General Master Type Service Error:', errorMessage);
|
|
866
866
|
return throwError(() => new Error(errorMessage));
|
|
867
867
|
}
|
|
868
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
869
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
868
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterTypeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
869
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterTypeService, providedIn: 'root' });
|
|
870
870
|
}
|
|
871
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
871
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterTypeService, decorators: [{
|
|
872
872
|
type: Injectable,
|
|
873
873
|
args: [{
|
|
874
874
|
providedIn: 'root'
|
|
@@ -958,10 +958,10 @@ class CideCorePageManagementService {
|
|
|
958
958
|
console.error('Page Management Service Error:', errorMessage);
|
|
959
959
|
return throwError(() => new Error(errorMessage));
|
|
960
960
|
}
|
|
961
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
962
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
961
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageManagementService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
962
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageManagementService, providedIn: 'root' });
|
|
963
963
|
}
|
|
964
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
964
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageManagementService, decorators: [{
|
|
965
965
|
type: Injectable,
|
|
966
966
|
args: [{
|
|
967
967
|
providedIn: 'root'
|
|
@@ -2345,10 +2345,10 @@ class MenuListComponent {
|
|
|
2345
2345
|
break;
|
|
2346
2346
|
}
|
|
2347
2347
|
}
|
|
2348
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2349
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: MenuListComponent, isStandalone: true, selector: "cide-core-app-menu-list", viewQueries: [{ propertyName: "menuDetailsRendererTemplate", first: true, predicate: ["menuDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "menuTypeRendererTemplate", first: true, predicate: ["menuTypeRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "permissionsRendererTemplate", first: true, predicate: ["permissionsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Menu List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_menu_list' }\">\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 (ngModelChange)=\"onMenuTypeChange()\">\n </cide-ele-select>\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 <!-- 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 <!-- Empty div for spacing -->\n <div></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 <!-- Permissions (only show for menu and title types) -->\n @if (quickAddForm.get('syme_type')?.value === 'menu') {\n <div>\n <cide-ele-select \n label=\"Permissions\" \n [options]=\"permissionOptions()\" \n formControlName=\"syme_permissions_id_sygms\"\n placeholder=\"Select permissions for this menu\"\n [multiple]=\"true\"\n size=\"sm\">\n </cide-ele-select>\n </div>\n }\n \n <!-- Pages (multiselect) -->\n <div>\n <cide-ele-select \n label=\"Pages\" \n [options]=\"pageOptions()\" \n formControlName=\"syme_pages_id_sypg\"\n placeholder=\"Select pages to connect\"\n [multiple]=\"true\"\n [loading]=\"pagesLoading()\"\n [searchable]=\"true\"\n size=\"sm\">\n </cide-ele-select>\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 <!-- Active Status and Action Buttons -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <!-- Active Checkbox -->\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 \n <!-- Action Buttons -->\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 <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative tw-p-0\">\n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-w-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<!-- Permissions Renderer Template -->\n<ng-template #permissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-1 tw-max-w-full tw-items-center\">\n @if (row.syme_type === 'menu') {\n @if (row.syme_permissions_id_sygms && row.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row.syme_permissions_id_sygms.slice(0, 3); track permissionId) {\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-bg-blue-100 tw-text-blue-800 tw-whitespace-nowrap tw-h-5\">\n {{ getPermissionById(permissionId)?.sygms_title || getPermissionById(permissionId)?.sygms_code || 'Unknown' }}\n </span>\n }\n @if (row.syme_permissions_id_sygms.length > 3) {\n <span \n 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-bg-gray-100 tw-text-gray-600 tw-whitespace-nowrap tw-cursor-help tw-h-5\"\n [title]=\"getAllPermissionNames(row.syme_permissions_id_sygms)\">\n +{{ row.syme_permissions_id_sygms.length - 3 }} more\n </span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-500 tw-h-5 tw-flex tw-items-center\">No permissions</span>\n }\n } @else {\n <!-- Show N/A for module, section, and title types -->\n <span class=\"tw-text-xs tw-text-gray-400 tw-h-5 tw-flex tw-items-center\">N/A</span>\n }\n </div>\n</ng-template>\n</cide-lyt-shared-wrapper>\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], cide-ele-button", 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", "step", "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", "treeView"], 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"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
2348
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MenuListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2349
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: MenuListComponent, isStandalone: true, selector: "cide-core-app-menu-list", viewQueries: [{ propertyName: "menuDetailsRendererTemplate", first: true, predicate: ["menuDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "menuTypeRendererTemplate", first: true, predicate: ["menuTypeRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "permissionsRendererTemplate", first: true, predicate: ["permissionsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Menu List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_menu_list' }\">\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 (ngModelChange)=\"onMenuTypeChange()\">\n </cide-ele-select>\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 <!-- 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 <!-- Empty div for spacing -->\n <div></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 <!-- Permissions (only show for menu and title types) -->\n @if (quickAddForm.get('syme_type')?.value === 'menu') {\n <div>\n <cide-ele-select \n label=\"Permissions\" \n [options]=\"permissionOptions()\" \n formControlName=\"syme_permissions_id_sygms\"\n placeholder=\"Select permissions for this menu\"\n [multiple]=\"true\"\n size=\"sm\">\n </cide-ele-select>\n </div>\n }\n \n <!-- Pages (multiselect) -->\n <div>\n <cide-ele-select \n label=\"Pages\" \n [options]=\"pageOptions()\" \n formControlName=\"syme_pages_id_sypg\"\n placeholder=\"Select pages to connect\"\n [multiple]=\"true\"\n [loading]=\"pagesLoading()\"\n [searchable]=\"true\"\n size=\"sm\">\n </cide-ele-select>\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 <!-- Active Status and Action Buttons -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <!-- Active Checkbox -->\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 \n <!-- Action Buttons -->\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 <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative tw-p-0\">\n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-w-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<!-- Permissions Renderer Template -->\n<ng-template #permissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-1 tw-max-w-full tw-items-center\">\n @if (row.syme_type === 'menu') {\n @if (row.syme_permissions_id_sygms && row.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row.syme_permissions_id_sygms.slice(0, 3); track permissionId) {\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-bg-blue-100 tw-text-blue-800 tw-whitespace-nowrap tw-h-5\">\n {{ getPermissionById(permissionId)?.sygms_title || getPermissionById(permissionId)?.sygms_code || 'Unknown' }}\n </span>\n }\n @if (row.syme_permissions_id_sygms.length > 3) {\n <span \n 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-bg-gray-100 tw-text-gray-600 tw-whitespace-nowrap tw-cursor-help tw-h-5\"\n [title]=\"getAllPermissionNames(row.syme_permissions_id_sygms)\">\n +{{ row.syme_permissions_id_sygms.length - 3 }} more\n </span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-500 tw-h-5 tw-flex tw-items-center\">No permissions</span>\n }\n } @else {\n <!-- Show N/A for module, section, and title types -->\n <span class=\"tw-text-xs tw-text-gray-400 tw-h-5 tw-flex tw-items-center\">N/A</span>\n }\n </div>\n</ng-template>\n</cide-lyt-shared-wrapper>\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], cide-ele-button", 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", "step", "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", "treeView"], 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"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
2350
2350
|
}
|
|
2351
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2351
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: MenuListComponent, decorators: [{
|
|
2352
2352
|
type: Component,
|
|
2353
2353
|
args: [{ selector: 'cide-core-app-menu-list', standalone: true, imports: [
|
|
2354
2354
|
CommonModule,
|
|
@@ -2363,7 +2363,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
2363
2363
|
CideEleDropdownComponent,
|
|
2364
2364
|
CideLytSharedWrapperComponent
|
|
2365
2365
|
], template: "<!-- Menu List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_menu_list' }\">\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 (ngModelChange)=\"onMenuTypeChange()\">\n </cide-ele-select>\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 <!-- 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 <!-- Empty div for spacing -->\n <div></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 <!-- Permissions (only show for menu and title types) -->\n @if (quickAddForm.get('syme_type')?.value === 'menu') {\n <div>\n <cide-ele-select \n label=\"Permissions\" \n [options]=\"permissionOptions()\" \n formControlName=\"syme_permissions_id_sygms\"\n placeholder=\"Select permissions for this menu\"\n [multiple]=\"true\"\n size=\"sm\">\n </cide-ele-select>\n </div>\n }\n \n <!-- Pages (multiselect) -->\n <div>\n <cide-ele-select \n label=\"Pages\" \n [options]=\"pageOptions()\" \n formControlName=\"syme_pages_id_sypg\"\n placeholder=\"Select pages to connect\"\n [multiple]=\"true\"\n [loading]=\"pagesLoading()\"\n [searchable]=\"true\"\n size=\"sm\">\n </cide-ele-select>\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 <!-- Active Status and Action Buttons -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <!-- Active Checkbox -->\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 \n <!-- Action Buttons -->\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 <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative tw-p-0\">\n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-w-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<!-- Permissions Renderer Template -->\n<ng-template #permissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-1 tw-max-w-full tw-items-center\">\n @if (row.syme_type === 'menu') {\n @if (row.syme_permissions_id_sygms && row.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row.syme_permissions_id_sygms.slice(0, 3); track permissionId) {\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-bg-blue-100 tw-text-blue-800 tw-whitespace-nowrap tw-h-5\">\n {{ getPermissionById(permissionId)?.sygms_title || getPermissionById(permissionId)?.sygms_code || 'Unknown' }}\n </span>\n }\n @if (row.syme_permissions_id_sygms.length > 3) {\n <span \n 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-bg-gray-100 tw-text-gray-600 tw-whitespace-nowrap tw-cursor-help tw-h-5\"\n [title]=\"getAllPermissionNames(row.syme_permissions_id_sygms)\">\n +{{ row.syme_permissions_id_sygms.length - 3 }} more\n </span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-500 tw-h-5 tw-flex tw-items-center\">No permissions</span>\n }\n } @else {\n <!-- Show N/A for module, section, and title types -->\n <span class=\"tw-text-xs tw-text-gray-400 tw-h-5 tw-flex tw-items-center\">N/A</span>\n }\n </div>\n</ng-template>\n</cide-lyt-shared-wrapper>\n" }]
|
|
2366
|
-
}], ctorParameters: () => [] });
|
|
2366
|
+
}], ctorParameters: () => [], propDecorators: { menuDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['menuDetailsRendererTemplate', { isSignal: true }] }], menuTypeRendererTemplate: [{ type: i0.ViewChild, args: ['menuTypeRendererTemplate', { isSignal: true }] }], permissionsRendererTemplate: [{ type: i0.ViewChild, args: ['permissionsRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
2367
2367
|
|
|
2368
2368
|
var menuList_component = /*#__PURE__*/Object.freeze({
|
|
2369
2369
|
__proto__: null,
|
|
@@ -2547,10 +2547,10 @@ class CideCoreDepartmentManagementService {
|
|
|
2547
2547
|
console.error('Department Management Service Error:', errorMessage);
|
|
2548
2548
|
return throwError(() => new Error(errorMessage));
|
|
2549
2549
|
}
|
|
2550
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2551
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
2550
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreDepartmentManagementService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2551
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreDepartmentManagementService, providedIn: 'root' });
|
|
2552
2552
|
}
|
|
2553
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2553
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreDepartmentManagementService, decorators: [{
|
|
2554
2554
|
type: Injectable,
|
|
2555
2555
|
args: [{
|
|
2556
2556
|
providedIn: 'root'
|
|
@@ -2566,6 +2566,7 @@ class CideCoreDepartmentListComponent {
|
|
|
2566
2566
|
router = inject(Router);
|
|
2567
2567
|
confirmationService = inject(ConfirmationService);
|
|
2568
2568
|
notificationService = inject(NotificationService);
|
|
2569
|
+
rightsService = inject(RightsService);
|
|
2569
2570
|
// Modern ViewChild signals for template renderers (Angular 20 approach)
|
|
2570
2571
|
departmentDetailsRendererTemplate = viewChild.required('departmentDetailsRendererTemplate');
|
|
2571
2572
|
departmentStatusRendererTemplate = viewChild.required('departmentStatusRendererTemplate');
|
|
@@ -2732,6 +2733,11 @@ class CideCoreDepartmentListComponent {
|
|
|
2732
2733
|
totalPages = computed(() => Math.ceil(this.totalItems() / this.pageSize()), ...(ngDevMode ? [{ debugName: "totalPages" }] : []));
|
|
2733
2734
|
hasNextPage = computed(() => this.currentPage() < this.totalPages(), ...(ngDevMode ? [{ debugName: "hasNextPage" }] : []));
|
|
2734
2735
|
hasPreviousPage = computed(() => this.currentPage() > 1, ...(ngDevMode ? [{ debugName: "hasPreviousPage" }] : []));
|
|
2736
|
+
// Rights computed signals
|
|
2737
|
+
canCreate = computed(() => this.rightsService.hasRight('CREATE'), ...(ngDevMode ? [{ debugName: "canCreate" }] : []));
|
|
2738
|
+
canEdit = computed(() => this.rightsService.hasRight('EDIT'), ...(ngDevMode ? [{ debugName: "canEdit" }] : []));
|
|
2739
|
+
canDelete = computed(() => this.rightsService.hasRight('DELETE'), ...(ngDevMode ? [{ debugName: "canDelete" }] : []));
|
|
2740
|
+
canView = computed(() => this.rightsService.hasRight('VIEW'), ...(ngDevMode ? [{ debugName: "canView" }] : []));
|
|
2735
2741
|
// Modern constructor with effects for initialization
|
|
2736
2742
|
constructor() {
|
|
2737
2743
|
this.initializeComponent();
|
|
@@ -2744,6 +2750,8 @@ class CideCoreDepartmentListComponent {
|
|
|
2744
2750
|
*/
|
|
2745
2751
|
initializeComponent() {
|
|
2746
2752
|
console.log('CideCoreDepartmentListComponent initialized with modern Angular patterns');
|
|
2753
|
+
// Initialize rights for department management
|
|
2754
|
+
this.rightsService.initializeRights('core_department_list');
|
|
2747
2755
|
this.loadDepartments();
|
|
2748
2756
|
this.setupEventListeners();
|
|
2749
2757
|
this.exposeGlobalFunctions();
|
|
@@ -3232,40 +3240,48 @@ class CideCoreDepartmentListComponent {
|
|
|
3232
3240
|
* Generate dropdown items for department actions
|
|
3233
3241
|
*/
|
|
3234
3242
|
getDropdownItems(row) {
|
|
3235
|
-
|
|
3236
|
-
|
|
3243
|
+
const items = [];
|
|
3244
|
+
if (this.canEdit()) {
|
|
3245
|
+
items.push({
|
|
3237
3246
|
id: 'edit',
|
|
3238
3247
|
label: 'Edit',
|
|
3239
3248
|
icon: 'edit',
|
|
3240
3249
|
iconColor: 'tw-text-gray-400',
|
|
3241
3250
|
textColor: 'tw-text-gray-700',
|
|
3242
3251
|
hoverBgColor: 'hover:tw-bg-gray-100'
|
|
3243
|
-
}
|
|
3244
|
-
|
|
3252
|
+
});
|
|
3253
|
+
}
|
|
3254
|
+
if (this.canCreate()) {
|
|
3255
|
+
items.push({
|
|
3245
3256
|
id: 'addChild',
|
|
3246
3257
|
label: 'Add Child',
|
|
3247
3258
|
icon: 'add',
|
|
3248
3259
|
iconColor: 'tw-text-blue-400',
|
|
3249
3260
|
textColor: 'tw-text-blue-600',
|
|
3250
3261
|
hoverBgColor: 'hover:tw-bg-blue-50'
|
|
3251
|
-
}
|
|
3252
|
-
|
|
3262
|
+
});
|
|
3263
|
+
}
|
|
3264
|
+
if (this.canEdit()) {
|
|
3265
|
+
items.push({
|
|
3253
3266
|
id: 'toggle',
|
|
3254
3267
|
label: row.sydept_isactive ? 'Deactivate' : 'Activate',
|
|
3255
3268
|
icon: 'power_settings_new',
|
|
3256
|
-
iconColor: 'tw-text-
|
|
3257
|
-
textColor: 'tw-text-
|
|
3258
|
-
hoverBgColor: 'hover:tw-bg-
|
|
3259
|
-
}
|
|
3260
|
-
|
|
3269
|
+
iconColor: 'tw-text-orange-400',
|
|
3270
|
+
textColor: 'tw-text-orange-600',
|
|
3271
|
+
hoverBgColor: 'hover:tw-bg-orange-50'
|
|
3272
|
+
});
|
|
3273
|
+
}
|
|
3274
|
+
if (this.canDelete()) {
|
|
3275
|
+
items.push({
|
|
3261
3276
|
id: 'delete',
|
|
3262
3277
|
label: 'Delete',
|
|
3263
3278
|
icon: 'delete',
|
|
3264
3279
|
iconColor: 'tw-text-red-400',
|
|
3265
3280
|
textColor: 'tw-text-red-600',
|
|
3266
3281
|
hoverBgColor: 'hover:tw-bg-red-50'
|
|
3267
|
-
}
|
|
3268
|
-
|
|
3282
|
+
});
|
|
3283
|
+
}
|
|
3284
|
+
return items;
|
|
3269
3285
|
}
|
|
3270
3286
|
/**
|
|
3271
3287
|
* Handle dropdown item click
|
|
@@ -3303,10 +3319,10 @@ class CideCoreDepartmentListComponent {
|
|
|
3303
3319
|
trackByItemId(index, item) {
|
|
3304
3320
|
return item._id || '';
|
|
3305
3321
|
}
|
|
3306
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3307
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreDepartmentListComponent, isStandalone: true, selector: "cide-core-department-list", viewQueries: [{ propertyName: "departmentDetailsRendererTemplate", first: true, predicate: ["departmentDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "departmentStatusRendererTemplate", first: true, predicate: ["departmentStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Department List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_department_list' }\">\n <div class=\"tw-table tw-w-full tw-h-full\">\n\n<!-- Global Notifications -->\n<cide-ele-global-notifications></cide-ele-global-notifications>\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-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-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 Department' : 'Quick Add Department' }}</h6>\n </div>\n @if (selectedParentDepartment()) {\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\">{{ selectedParentDepartment()?.sydept_name }}</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)=\"quickAddDepartment()\">\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 <!-- Department Code -->\n <div>\n <cide-ele-input \n id=\"sydept_code\" \n label=\"Code\" \n formControlName=\"sydept_code\"\n placeholder=\"DEPT001\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n <!-- Department Name -->\n <div>\n <cide-ele-input \n id=\"sydept_name\" \n label=\"Name\" \n formControlName=\"sydept_name\"\n placeholder=\"Department name\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n \n\n \n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input \n id=\"sydept_isactive\"\n type=\"checkbox\"\n label=\"Active\"\n formControlName=\"sydept_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=\"sydept_description\" \n label=\"Description\" \n formControlName=\"sydept_description\"\n placeholder=\"Department description\"\n rows=\"2\"\n size=\"sm\">\n </cide-ele-textarea>\n </div>\n \n\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 <!-- 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 <!-- Search functionality is handled by the data grid -->\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 <!-- 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 (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n</div>\n\n<!-- Department Details Renderer Template -->\n<ng-template #departmentDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Department Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon \n class=\"tw-text-gray-400\" \n size=\"xs\">\n business\n </cide-ele-icon>\n </div>\n \n <!-- Department Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.sydept_name\">\n {{ row.sydept_name || 'Untitled' }}\n </div>\n @if (row.sydept_description) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.sydept_description\">\n {{ row.sydept_description }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Department Status Renderer Template -->\n<ng-template #departmentStatusRendererTemplate 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]=\"getStatusClass(row.sydept_isactive)\">\n {{ getStatusDisplay(row.sydept_isactive) }}\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</cide-lyt-shared-wrapper> ", 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], cide-ele-button", 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", "step", "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: CideEleGlobalNotificationsComponent, selector: "cide-ele-global-notifications" }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
3322
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreDepartmentListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3323
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreDepartmentListComponent, isStandalone: true, selector: "cide-core-department-list", viewQueries: [{ propertyName: "departmentDetailsRendererTemplate", first: true, predicate: ["departmentDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "departmentStatusRendererTemplate", first: true, predicate: ["departmentStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Department List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_department_list' }\">\n <div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Global Notifications -->\n <cide-ele-global-notifications></cide-ele-global-notifications>\n\n <!-- Quick Add Form Section - Show if user has VIEW, CREATE, or EDIT rights -->\n @if (canView() || canCreate() || canEdit()) {\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-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-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 Department' : 'Quick\n Add Department' }}</h6>\n </div>\n @if (selectedParentDepartment()) {\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\n under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ selectedParentDepartment()?.sydept_name\n }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (click)=\"clearSelectedParent()\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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)=\"quickAddDepartment()\">\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 <!-- Department Code -->\n <div>\n <cide-ele-input id=\"sydept_code\" label=\"Code\" formControlName=\"sydept_code\" placeholder=\"DEPT001\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Department Name -->\n <div>\n <cide-ele-input id=\"sydept_name\" label=\"Name\" formControlName=\"sydept_name\" placeholder=\"Department name\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n\n\n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input id=\"sydept_isactive\" type=\"checkbox\" label=\"Active\" formControlName=\"sydept_isactive\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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 id=\"sydept_description\" label=\"Description\" formControlName=\"sydept_description\"\n placeholder=\"Department description\" rows=\"2\" [disabled]=\"canView() && !canCreate() && !canEdit()\"\n size=\"sm\">\n </cide-ele-textarea>\n </div>\n\n\n\n <!-- Action Buttons -->\n @if (canCreate() || canEdit()) {\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-space-x-2\">\n @if (isEditMode() ? canEdit() : canCreate()) {\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"submit\" [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'\n }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Add' }}\n </button>\n }\n <button cideEleButton variant=\"outline\" size=\"sm\" type=\"button\" (click)=\"resetQuickAddForm()\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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 }\n </div>\n </form>\n </div>\n </div>\n }\n\n <!-- Header Section with Filters -->\n\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\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"getTemplateRenderers()\"\n [actionHandlers]=\"actionHandlers\" [serverSidePagination]=\"true\" [totalServerItems]=\"totalItems()\"\n [currentServerPage]=\"currentPage()\" [currentServerPageSize]=\"pageSize()\" (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n </div>\n\n <!-- Department Details Renderer Template -->\n <ng-template #departmentDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Department Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon class=\"tw-text-gray-400\" size=\"xs\">\n business\n </cide-ele-icon>\n </div>\n\n <!-- Department Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"row.sydept_name\">\n {{ row.sydept_name || 'Untitled' }}\n </div>\n @if (row.sydept_description) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" [title]=\"row.sydept_description\">\n {{ row.sydept_description }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n\n <!-- Department Status Renderer Template -->\n <ng-template #departmentStatusRendererTemplate let-row=\"row\" let-value=\"value\">\n <span\n 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]=\"getStatusClass(row.sydept_isactive)\">\n {{ getStatusDisplay(row.sydept_isactive) }}\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 [items]=\"getDropdownItems(row)\" [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>", 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], cide-ele-button", 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", "step", "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: CideEleGlobalNotificationsComponent, selector: "cide-ele-global-notifications" }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
3308
3324
|
}
|
|
3309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3325
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreDepartmentListComponent, decorators: [{
|
|
3310
3326
|
type: Component,
|
|
3311
3327
|
args: [{ selector: 'cide-core-department-list', standalone: true, imports: [
|
|
3312
3328
|
CommonModule,
|
|
@@ -3320,8 +3336,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
3320
3336
|
CideEleDropdownComponent,
|
|
3321
3337
|
CideEleGlobalNotificationsComponent,
|
|
3322
3338
|
CideLytSharedWrapperComponent
|
|
3323
|
-
], template: "<!-- Department List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_department_list' }\">\n <div class=\"tw-table tw-w-full tw-h-full\">\n\n<!-- Global Notifications -->\n<cide-ele-global-notifications></cide-ele-global-notifications>\n\n
|
|
3324
|
-
}], ctorParameters: () => [] });
|
|
3339
|
+
], template: "<!-- Department List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_department_list' }\">\n <div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Global Notifications -->\n <cide-ele-global-notifications></cide-ele-global-notifications>\n\n <!-- Quick Add Form Section - Show if user has VIEW, CREATE, or EDIT rights -->\n @if (canView() || canCreate() || canEdit()) {\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-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-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 Department' : 'Quick\n Add Department' }}</h6>\n </div>\n @if (selectedParentDepartment()) {\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\n under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ selectedParentDepartment()?.sydept_name\n }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (click)=\"clearSelectedParent()\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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)=\"quickAddDepartment()\">\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 <!-- Department Code -->\n <div>\n <cide-ele-input id=\"sydept_code\" label=\"Code\" formControlName=\"sydept_code\" placeholder=\"DEPT001\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Department Name -->\n <div>\n <cide-ele-input id=\"sydept_name\" label=\"Name\" formControlName=\"sydept_name\" placeholder=\"Department name\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n\n\n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input id=\"sydept_isactive\" type=\"checkbox\" label=\"Active\" formControlName=\"sydept_isactive\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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 id=\"sydept_description\" label=\"Description\" formControlName=\"sydept_description\"\n placeholder=\"Department description\" rows=\"2\" [disabled]=\"canView() && !canCreate() && !canEdit()\"\n size=\"sm\">\n </cide-ele-textarea>\n </div>\n\n\n\n <!-- Action Buttons -->\n @if (canCreate() || canEdit()) {\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-space-x-2\">\n @if (isEditMode() ? canEdit() : canCreate()) {\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"submit\" [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'\n }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Add' }}\n </button>\n }\n <button cideEleButton variant=\"outline\" size=\"sm\" type=\"button\" (click)=\"resetQuickAddForm()\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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 }\n </div>\n </form>\n </div>\n </div>\n }\n\n <!-- Header Section with Filters -->\n\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\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"getTemplateRenderers()\"\n [actionHandlers]=\"actionHandlers\" [serverSidePagination]=\"true\" [totalServerItems]=\"totalItems()\"\n [currentServerPage]=\"currentPage()\" [currentServerPageSize]=\"pageSize()\" (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n </div>\n\n <!-- Department Details Renderer Template -->\n <ng-template #departmentDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Department Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon class=\"tw-text-gray-400\" size=\"xs\">\n business\n </cide-ele-icon>\n </div>\n\n <!-- Department Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"row.sydept_name\">\n {{ row.sydept_name || 'Untitled' }}\n </div>\n @if (row.sydept_description) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" [title]=\"row.sydept_description\">\n {{ row.sydept_description }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n\n <!-- Department Status Renderer Template -->\n <ng-template #departmentStatusRendererTemplate let-row=\"row\" let-value=\"value\">\n <span\n 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]=\"getStatusClass(row.sydept_isactive)\">\n {{ getStatusDisplay(row.sydept_isactive) }}\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 [items]=\"getDropdownItems(row)\" [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>" }]
|
|
3340
|
+
}], ctorParameters: () => [], propDecorators: { departmentDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['departmentDetailsRendererTemplate', { isSignal: true }] }], departmentStatusRendererTemplate: [{ type: i0.ViewChild, args: ['departmentStatusRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
3325
3341
|
|
|
3326
3342
|
var departmentList_component = /*#__PURE__*/Object.freeze({
|
|
3327
3343
|
__proto__: null,
|
|
@@ -3509,10 +3525,10 @@ class CideCoreDesignationManagementService {
|
|
|
3509
3525
|
console.error('Designation Management Service Error:', errorMessage);
|
|
3510
3526
|
return throwError(() => new Error(errorMessage));
|
|
3511
3527
|
}
|
|
3512
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3513
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
3528
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreDesignationManagementService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3529
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreDesignationManagementService, providedIn: 'root' });
|
|
3514
3530
|
}
|
|
3515
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreDesignationManagementService, decorators: [{
|
|
3516
3532
|
type: Injectable,
|
|
3517
3533
|
args: [{
|
|
3518
3534
|
providedIn: 'root'
|
|
@@ -3688,10 +3704,10 @@ class CideCoreGradeLevelManagementService {
|
|
|
3688
3704
|
console.error('Grade Level Management Service Error:', errorMessage);
|
|
3689
3705
|
return throwError(() => new Error(errorMessage));
|
|
3690
3706
|
}
|
|
3691
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3692
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
3707
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGradeLevelManagementService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3708
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGradeLevelManagementService, providedIn: 'root' });
|
|
3693
3709
|
}
|
|
3694
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3710
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGradeLevelManagementService, decorators: [{
|
|
3695
3711
|
type: Injectable,
|
|
3696
3712
|
args: [{
|
|
3697
3713
|
providedIn: 'root'
|
|
@@ -3709,6 +3725,7 @@ class CideCoreDesignationListComponent {
|
|
|
3709
3725
|
router = inject(Router);
|
|
3710
3726
|
notificationService = inject(NotificationService);
|
|
3711
3727
|
confirmationService = inject(ConfirmationService);
|
|
3728
|
+
rightsService = inject(RightsService);
|
|
3712
3729
|
// Modern ViewChild signals for template renderers (Angular 20 approach)
|
|
3713
3730
|
designationDetailsRendererTemplate = viewChild.required('designationDetailsRendererTemplate');
|
|
3714
3731
|
designationStatusRendererTemplate = viewChild.required('designationStatusRendererTemplate');
|
|
@@ -3888,6 +3905,11 @@ class CideCoreDesignationListComponent {
|
|
|
3888
3905
|
totalPages = computed(() => Math.ceil(this.totalItems() / this.pageSize()), ...(ngDevMode ? [{ debugName: "totalPages" }] : []));
|
|
3889
3906
|
hasNextPage = computed(() => this.currentPage() < this.totalPages(), ...(ngDevMode ? [{ debugName: "hasNextPage" }] : []));
|
|
3890
3907
|
hasPreviousPage = computed(() => this.currentPage() > 1, ...(ngDevMode ? [{ debugName: "hasPreviousPage" }] : []));
|
|
3908
|
+
// Rights computed signals
|
|
3909
|
+
canCreate = computed(() => this.rightsService.hasRight('CREATE'), ...(ngDevMode ? [{ debugName: "canCreate" }] : []));
|
|
3910
|
+
canEdit = computed(() => this.rightsService.hasRight('EDIT'), ...(ngDevMode ? [{ debugName: "canEdit" }] : []));
|
|
3911
|
+
canDelete = computed(() => this.rightsService.hasRight('DELETE'), ...(ngDevMode ? [{ debugName: "canDelete" }] : []));
|
|
3912
|
+
canView = computed(() => this.rightsService.hasRight('VIEW'), ...(ngDevMode ? [{ debugName: "canView" }] : []));
|
|
3891
3913
|
// Grade level options for dropdown
|
|
3892
3914
|
gradeLevelOptions = computed(() => {
|
|
3893
3915
|
const options = this.gradeLevels()
|
|
@@ -3918,6 +3940,8 @@ class CideCoreDesignationListComponent {
|
|
|
3918
3940
|
*/
|
|
3919
3941
|
initializeComponent() {
|
|
3920
3942
|
console.log('CideCoreDesignationListComponent initialized with modern Angular patterns');
|
|
3943
|
+
// Initialize rights for designation management
|
|
3944
|
+
this.rightsService.initializeRights('core_designation_list');
|
|
3921
3945
|
// Load departments and grade levels first for dropdown options
|
|
3922
3946
|
this.loadDepartments();
|
|
3923
3947
|
this.loadGradeLevels();
|
|
@@ -4962,56 +4986,64 @@ class CideCoreDesignationListComponent {
|
|
|
4962
4986
|
* Generate dropdown items for designation actions
|
|
4963
4987
|
*/
|
|
4964
4988
|
getDropdownItems(row) {
|
|
4989
|
+
const items = [];
|
|
4965
4990
|
// Handle hierarchical data structure
|
|
4966
4991
|
if (row.type === 'department') {
|
|
4967
|
-
|
|
4968
|
-
{
|
|
4992
|
+
if (this.canCreate()) {
|
|
4993
|
+
items.push({
|
|
4969
4994
|
id: 'addDesignation',
|
|
4970
4995
|
label: 'Add Designation',
|
|
4971
4996
|
icon: 'add',
|
|
4972
4997
|
iconColor: 'tw-text-blue-400',
|
|
4973
4998
|
textColor: 'tw-text-blue-600',
|
|
4974
4999
|
hoverBgColor: 'hover:tw-bg-blue-50'
|
|
4975
|
-
}
|
|
4976
|
-
|
|
5000
|
+
});
|
|
5001
|
+
}
|
|
4977
5002
|
}
|
|
4978
5003
|
else {
|
|
4979
5004
|
// For designations
|
|
4980
|
-
|
|
4981
|
-
{
|
|
5005
|
+
if (this.canEdit()) {
|
|
5006
|
+
items.push({
|
|
4982
5007
|
id: 'edit',
|
|
4983
5008
|
label: 'Edit',
|
|
4984
5009
|
icon: 'edit',
|
|
4985
5010
|
iconColor: 'tw-text-gray-400',
|
|
4986
5011
|
textColor: 'tw-text-gray-700',
|
|
4987
5012
|
hoverBgColor: 'hover:tw-bg-gray-100'
|
|
4988
|
-
}
|
|
4989
|
-
|
|
5013
|
+
});
|
|
5014
|
+
}
|
|
5015
|
+
if (this.canCreate()) {
|
|
5016
|
+
items.push({
|
|
4990
5017
|
id: 'addChild',
|
|
4991
5018
|
label: 'Add Child',
|
|
4992
5019
|
icon: 'add',
|
|
4993
5020
|
iconColor: 'tw-text-blue-400',
|
|
4994
5021
|
textColor: 'tw-text-blue-600',
|
|
4995
5022
|
hoverBgColor: 'hover:tw-bg-blue-50'
|
|
4996
|
-
}
|
|
4997
|
-
|
|
5023
|
+
});
|
|
5024
|
+
}
|
|
5025
|
+
if (this.canEdit()) {
|
|
5026
|
+
items.push({
|
|
4998
5027
|
id: 'toggle',
|
|
4999
5028
|
label: row.status ? 'Deactivate' : 'Activate',
|
|
5000
5029
|
icon: 'power_settings_new',
|
|
5001
|
-
iconColor: 'tw-text-
|
|
5002
|
-
textColor: 'tw-text-
|
|
5003
|
-
hoverBgColor: 'hover:tw-bg-
|
|
5004
|
-
}
|
|
5005
|
-
|
|
5030
|
+
iconColor: 'tw-text-orange-400',
|
|
5031
|
+
textColor: 'tw-text-orange-600',
|
|
5032
|
+
hoverBgColor: 'hover:tw-bg-orange-50'
|
|
5033
|
+
});
|
|
5034
|
+
}
|
|
5035
|
+
if (this.canDelete()) {
|
|
5036
|
+
items.push({
|
|
5006
5037
|
id: 'delete',
|
|
5007
5038
|
label: 'Delete',
|
|
5008
5039
|
icon: 'delete',
|
|
5009
5040
|
iconColor: 'tw-text-red-400',
|
|
5010
5041
|
textColor: 'tw-text-red-600',
|
|
5011
5042
|
hoverBgColor: 'hover:tw-bg-red-50'
|
|
5012
|
-
}
|
|
5013
|
-
|
|
5043
|
+
});
|
|
5044
|
+
}
|
|
5014
5045
|
}
|
|
5046
|
+
return items;
|
|
5015
5047
|
}
|
|
5016
5048
|
/**
|
|
5017
5049
|
* Handle dropdown item click
|
|
@@ -5077,10 +5109,10 @@ class CideCoreDesignationListComponent {
|
|
|
5077
5109
|
trackByItemId(index, item) {
|
|
5078
5110
|
return item._id || '';
|
|
5079
5111
|
}
|
|
5080
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
5081
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreDesignationListComponent, isStandalone: true, selector: "cide-core-designation-list", viewQueries: [{ propertyName: "designationDetailsRendererTemplate", first: true, predicate: ["designationDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "designationStatusRendererTemplate", first: true, predicate: ["designationStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Designation List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_designation_list' }\">\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-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-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 Designation' : 'Quick Add Designation' }}</h6>\n </div>\n @if (selectedParentDesignation()) {\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\">{{ selectedParentDesignation()?.sydsg_name\n }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (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 @if (selectedParentDepartment()) {\n <div\n class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-green-50 tw-border tw-border-green-200 tw-px-4 tw-py-1 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">business</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-green-600 tw-font-medium\">{{ isEditMode() ? 'Department:' : 'Department:'\n }}</span>\n <span class=\"tw-text-sm tw-text-green-800 tw-font-semibold\">{{ selectedParentDepartment()?.sydept_name\n }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (click)=\"clearSelectedParentDepartment()\"\n class=\"tw-text-green-400 hover:tw-text-green-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)=\"quickAddDesignation()\">\n <!-- First Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-5 tw-gap-3 tw-mb-3\">\n <!-- Designation Name -->\n <div>\n <cide-ele-input id=\"sydsg_name\" label=\"Name\" formControlName=\"sydsg_name\" placeholder=\"Designation name\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Designation Code -->\n <div>\n <cide-ele-input id=\"sydsg_code\" label=\"Code\" formControlName=\"sydsg_code\" placeholder=\"DESG001\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n <!-- Grade Level -->\n <div>\n <cide-ele-select id=\"sydsg_grade_level_id_sydsgl\" label=\"Grade Level\" [options]=\"gradeLevelOptions()\"\n formControlName=\"sydsg_grade_level_id_sydsgl\" placeholder=\"Select grade level\" size=\"sm\">\n </cide-ele-select>\n </div>\n\n <!-- Department -->\n <div>\n <cide-ele-select id=\"sydsg_department_id_sydpt\" label=\"Department\" [options]=\"departmentOptions()\"\n formControlName=\"sydsg_department_id_sydpt\" placeholder=\"Select department\" size=\"sm\">\n </cide-ele-select>\n </div>\n\n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input id=\"sydsg_isactive\" type=\"checkbox\" label=\"Active\" formControlName=\"sydsg_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 id=\"sydsg_description\" label=\"Description\" formControlName=\"sydsg_description\"\n placeholder=\"Designation description\" rows=\"2\" size=\"sm\">\n </cide-ele-textarea>\n </div>\n\n <!-- Entity ID (Hidden) -->\n <div class=\"tw-hidden\">\n <cide-ele-input id=\"desg_entity_id_syen\" label=\"Entity ID\" formControlName=\"desg_entity_id_syen\"\n placeholder=\"Entity ID\" 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 cideEleButton variant=\"primary\" size=\"sm\" type=\"submit\" [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'\n }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Add' }}\n </button>\n <button cideEleButton variant=\"outline\" size=\"sm\" type=\"button\" (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\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 <!-- 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 <!-- Search functionality is handled by the data grid -->\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\"\n 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 <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"getTemplateRenderers()\"\n [actionHandlers]=\"actionHandlers\" [serverSidePagination]=\"true\" [totalServerItems]=\"totalItems()\"\n [currentServerPage]=\"currentPage()\" [currentServerPageSize]=\"pageSize()\" (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n </div>\n\n <!-- Designation Details Renderer Template -->\n <ng-template #designationDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Dynamic Icon based on type -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon [class]=\"row.type === 'department' ? 'tw-text-green-500' : 'tw-text-blue-500'\" size=\"xs\">\n {{ row.type === 'department' ? 'business' : 'work' }}\n </cide-ele-icon>\n </div>\n\n <!-- Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"row.name\">\n {{ row.name || 'Untitled' }}\n </div>\n @if (row.type === 'department') {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800\">\n Department\n </span>\n }\n </div>\n @if (row.description) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" [title]=\"row.description\">\n {{ row.description }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n\n <!-- Designation Status Renderer Template -->\n <ng-template #designationStatusRendererTemplate let-row=\"row\" let-value=\"value\">\n <span\n 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]=\"getStatusClass(row.status)\">\n {{ getStatusDisplay(row.status) }}\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 [items]=\"getDropdownItems(row)\" [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>", 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], cide-ele-button", 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", "step", "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", "treeView"], 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"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
5112
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreDesignationListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreDesignationListComponent, isStandalone: true, selector: "cide-core-designation-list", viewQueries: [{ propertyName: "designationDetailsRendererTemplate", first: true, predicate: ["designationDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "designationStatusRendererTemplate", first: true, predicate: ["designationStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Designation List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_designation_list' }\">\n <div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section - Show if user has VIEW, CREATE, or EDIT rights -->\n @if (canView() || canCreate() || canEdit()) {\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-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-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 Designation' : 'Quick\n Add Designation' }}</h6>\n </div>\n @if (selectedParentDesignation()) {\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\n under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ selectedParentDesignation()?.sydsg_name\n }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (click)=\"clearSelectedParent()\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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 @if (selectedParentDepartment()) {\n <div\n class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-green-50 tw-border tw-border-green-200 tw-px-4 tw-py-1 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">business</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-green-600 tw-font-medium\">{{ isEditMode() ? 'Department:' : 'Department:'\n }}</span>\n <span class=\"tw-text-sm tw-text-green-800 tw-font-semibold\">{{ selectedParentDepartment()?.sydept_name\n }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (click)=\"clearSelectedParentDepartment()\"\n [disabled]=\"!canCreate() && !canEdit()\"\n class=\"tw-text-green-400 hover:tw-text-green-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)=\"quickAddDesignation()\">\n <!-- First Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-5 tw-gap-3 tw-mb-3\">\n <!-- Designation Name -->\n <div>\n <cide-ele-input id=\"sydsg_name\" label=\"Name\" formControlName=\"sydsg_name\" placeholder=\"Designation name\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Designation Code -->\n <div>\n <cide-ele-input id=\"sydsg_code\" label=\"Code\" formControlName=\"sydsg_code\" placeholder=\"DESG001\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-input>\n </div>\n <!-- Grade Level -->\n <div>\n <cide-ele-select id=\"sydsg_grade_level_id_sydsgl\" label=\"Grade Level\" [options]=\"gradeLevelOptions()\"\n formControlName=\"sydsg_grade_level_id_sydsgl\" placeholder=\"Select grade level\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-select>\n </div>\n\n <!-- Department -->\n <div>\n <cide-ele-select id=\"sydsg_department_id_sydpt\" label=\"Department\" [options]=\"departmentOptions()\"\n formControlName=\"sydsg_department_id_sydpt\" placeholder=\"Select department\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-select>\n </div>\n\n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input id=\"sydsg_isactive\" type=\"checkbox\" label=\"Active\" formControlName=\"sydsg_isactive\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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 id=\"sydsg_description\" label=\"Description\" formControlName=\"sydsg_description\"\n placeholder=\"Designation description\" rows=\"2\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\"\n size=\"sm\">\n </cide-ele-textarea>\n </div>\n\n <!-- Entity ID (Hidden) -->\n <div class=\"tw-hidden\">\n <cide-ele-input id=\"desg_entity_id_syen\" label=\"Entity ID\" formControlName=\"desg_entity_id_syen\"\n placeholder=\"Entity ID\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Action Buttons -->\n @if (canCreate() || canEdit()) {\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-space-x-2\">\n @if (isEditMode() ? canEdit() : canCreate()) {\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"submit\" [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'\n }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Add' }}\n </button>\n }\n <button cideEleButton variant=\"outline\" size=\"sm\" type=\"button\" (click)=\"resetQuickAddForm()\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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 }\n </div>\n </form>\n </div>\n </div>\n }\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\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"getTemplateRenderers()\"\n [actionHandlers]=\"actionHandlers\" [serverSidePagination]=\"true\" [totalServerItems]=\"totalItems()\"\n [currentServerPage]=\"currentPage()\" [currentServerPageSize]=\"pageSize()\" (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n </div>\n\n <!-- Designation Details Renderer Template -->\n <ng-template #designationDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Dynamic Icon based on type -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon [class]=\"row.type === 'department' ? 'tw-text-green-500' : 'tw-text-blue-500'\" size=\"xs\">\n {{ row.type === 'department' ? 'business' : 'work' }}\n </cide-ele-icon>\n </div>\n\n <!-- Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"row.name\">\n {{ row.name || 'Untitled' }}\n </div>\n @if (row.type === 'department') {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800\">\n Department\n </span>\n }\n </div>\n @if (row.description) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" [title]=\"row.description\">\n {{ row.description }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n\n <!-- Designation Status Renderer Template -->\n <ng-template #designationStatusRendererTemplate let-row=\"row\" let-value=\"value\">\n <span\n 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]=\"getStatusClass(row.status)\">\n {{ getStatusDisplay(row.status) }}\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 [items]=\"getDropdownItems(row)\" [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>", 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], cide-ele-button", 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", "step", "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", "treeView"], 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"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
5082
5114
|
}
|
|
5083
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
5115
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreDesignationListComponent, decorators: [{
|
|
5084
5116
|
type: Component,
|
|
5085
5117
|
args: [{ selector: 'cide-core-designation-list', standalone: true, imports: [
|
|
5086
5118
|
CommonModule,
|
|
@@ -5094,8 +5126,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
5094
5126
|
CideIconComponent,
|
|
5095
5127
|
CideEleDropdownComponent,
|
|
5096
5128
|
CideLytSharedWrapperComponent
|
|
5097
|
-
], template: "<!-- Designation List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_designation_list' }\">\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-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-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 Designation' : 'Quick Add Designation' }}</h6>\n </div>\n @if (selectedParentDesignation()) {\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\">{{ selectedParentDesignation()?.sydsg_name\n }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (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 @if (selectedParentDepartment()) {\n <div\n class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-green-50 tw-border tw-border-green-200 tw-px-4 tw-py-1 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">business</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-green-600 tw-font-medium\">{{ isEditMode() ? 'Department:' : 'Department:'\n }}</span>\n <span class=\"tw-text-sm tw-text-green-800 tw-font-semibold\">{{ selectedParentDepartment()?.sydept_name\n }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (click)=\"clearSelectedParentDepartment()\"\n class=\"tw-text-green-400 hover:tw-text-green-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)=\"quickAddDesignation()\">\n <!-- First Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-5 tw-gap-3 tw-mb-3\">\n <!-- Designation Name -->\n <div>\n <cide-ele-input id=\"sydsg_name\" label=\"Name\" formControlName=\"sydsg_name\" placeholder=\"Designation name\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Designation Code -->\n <div>\n <cide-ele-input id=\"sydsg_code\" label=\"Code\" formControlName=\"sydsg_code\" placeholder=\"DESG001\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n <!-- Grade Level -->\n <div>\n <cide-ele-select id=\"sydsg_grade_level_id_sydsgl\" label=\"Grade Level\" [options]=\"gradeLevelOptions()\"\n formControlName=\"sydsg_grade_level_id_sydsgl\" placeholder=\"Select grade level\" size=\"sm\">\n </cide-ele-select>\n </div>\n\n <!-- Department -->\n <div>\n <cide-ele-select id=\"sydsg_department_id_sydpt\" label=\"Department\" [options]=\"departmentOptions()\"\n formControlName=\"sydsg_department_id_sydpt\" placeholder=\"Select department\" size=\"sm\">\n </cide-ele-select>\n </div>\n\n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input id=\"sydsg_isactive\" type=\"checkbox\" label=\"Active\" formControlName=\"sydsg_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 id=\"sydsg_description\" label=\"Description\" formControlName=\"sydsg_description\"\n placeholder=\"Designation description\" rows=\"2\" size=\"sm\">\n </cide-ele-textarea>\n </div>\n\n <!-- Entity ID (Hidden) -->\n <div class=\"tw-hidden\">\n <cide-ele-input id=\"desg_entity_id_syen\" label=\"Entity ID\" formControlName=\"desg_entity_id_syen\"\n placeholder=\"Entity ID\" 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 cideEleButton variant=\"primary\" size=\"sm\" type=\"submit\" [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'\n }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Add' }}\n </button>\n <button cideEleButton variant=\"outline\" size=\"sm\" type=\"button\" (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\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 <!-- 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 <!-- Search functionality is handled by the data grid -->\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\"\n 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 <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"getTemplateRenderers()\"\n [actionHandlers]=\"actionHandlers\" [serverSidePagination]=\"true\" [totalServerItems]=\"totalItems()\"\n [currentServerPage]=\"currentPage()\" [currentServerPageSize]=\"pageSize()\" (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n </div>\n\n <!-- Designation Details Renderer Template -->\n <ng-template #designationDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Dynamic Icon based on type -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon [class]=\"row.type === 'department' ? 'tw-text-green-500' : 'tw-text-blue-500'\" size=\"xs\">\n {{ row.type === 'department' ? 'business' : 'work' }}\n </cide-ele-icon>\n </div>\n\n <!-- Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"row.name\">\n {{ row.name || 'Untitled' }}\n </div>\n @if (row.type === 'department') {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800\">\n Department\n </span>\n }\n </div>\n @if (row.description) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" [title]=\"row.description\">\n {{ row.description }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n\n <!-- Designation Status Renderer Template -->\n <ng-template #designationStatusRendererTemplate let-row=\"row\" let-value=\"value\">\n <span\n 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]=\"getStatusClass(row.status)\">\n {{ getStatusDisplay(row.status) }}\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 [items]=\"getDropdownItems(row)\" [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>" }]
|
|
5098
|
-
}], ctorParameters: () => [] });
|
|
5129
|
+
], template: "<!-- Designation List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_designation_list' }\">\n <div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section - Show if user has VIEW, CREATE, or EDIT rights -->\n @if (canView() || canCreate() || canEdit()) {\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-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-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 Designation' : 'Quick\n Add Designation' }}</h6>\n </div>\n @if (selectedParentDesignation()) {\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\n under:' }}</span>\n <span class=\"tw-text-sm tw-text-blue-800 tw-font-semibold\">{{ selectedParentDesignation()?.sydsg_name\n }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (click)=\"clearSelectedParent()\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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 @if (selectedParentDepartment()) {\n <div\n class=\"tw-flex tw-items-center tw-space-x-3 tw-bg-green-50 tw-border tw-border-green-200 tw-px-4 tw-py-1 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">business</cide-ele-icon>\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span class=\"tw-text-sm tw-text-green-600 tw-font-medium\">{{ isEditMode() ? 'Department:' : 'Department:'\n }}</span>\n <span class=\"tw-text-sm tw-text-green-800 tw-font-semibold\">{{ selectedParentDepartment()?.sydept_name\n }}</span>\n </div>\n <button cideEleButton variant=\"ghost\" size=\"xs\" type=\"button\" (click)=\"clearSelectedParentDepartment()\"\n [disabled]=\"!canCreate() && !canEdit()\"\n class=\"tw-text-green-400 hover:tw-text-green-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)=\"quickAddDesignation()\">\n <!-- First Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-5 tw-gap-3 tw-mb-3\">\n <!-- Designation Name -->\n <div>\n <cide-ele-input id=\"sydsg_name\" label=\"Name\" formControlName=\"sydsg_name\" placeholder=\"Designation name\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Designation Code -->\n <div>\n <cide-ele-input id=\"sydsg_code\" label=\"Code\" formControlName=\"sydsg_code\" placeholder=\"DESG001\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-input>\n </div>\n <!-- Grade Level -->\n <div>\n <cide-ele-select id=\"sydsg_grade_level_id_sydsgl\" label=\"Grade Level\" [options]=\"gradeLevelOptions()\"\n formControlName=\"sydsg_grade_level_id_sydsgl\" placeholder=\"Select grade level\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-select>\n </div>\n\n <!-- Department -->\n <div>\n <cide-ele-select id=\"sydsg_department_id_sydpt\" label=\"Department\" [options]=\"departmentOptions()\"\n formControlName=\"sydsg_department_id_sydpt\" placeholder=\"Select department\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-select>\n </div>\n\n <!-- Active Status -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <cide-ele-input id=\"sydsg_isactive\" type=\"checkbox\" label=\"Active\" formControlName=\"sydsg_isactive\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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 id=\"sydsg_description\" label=\"Description\" formControlName=\"sydsg_description\"\n placeholder=\"Designation description\" rows=\"2\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\"\n size=\"sm\">\n </cide-ele-textarea>\n </div>\n\n <!-- Entity ID (Hidden) -->\n <div class=\"tw-hidden\">\n <cide-ele-input id=\"desg_entity_id_syen\" label=\"Entity ID\" formControlName=\"desg_entity_id_syen\"\n placeholder=\"Entity ID\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Action Buttons -->\n @if (canCreate() || canEdit()) {\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-space-x-2\">\n @if (isEditMode() ? canEdit() : canCreate()) {\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"submit\" [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'\n }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Add' }}\n </button>\n }\n <button cideEleButton variant=\"outline\" size=\"sm\" type=\"button\" (click)=\"resetQuickAddForm()\"\n [disabled]=\"canView() && !canCreate() && !canEdit()\" 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 }\n </div>\n </form>\n </div>\n </div>\n }\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\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"getTemplateRenderers()\"\n [actionHandlers]=\"actionHandlers\" [serverSidePagination]=\"true\" [totalServerItems]=\"totalItems()\"\n [currentServerPage]=\"currentPage()\" [currentServerPageSize]=\"pageSize()\" (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n </div>\n\n <!-- Designation Details Renderer Template -->\n <ng-template #designationDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Dynamic Icon based on type -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon [class]=\"row.type === 'department' ? 'tw-text-green-500' : 'tw-text-blue-500'\" size=\"xs\">\n {{ row.type === 'department' ? 'business' : 'work' }}\n </cide-ele-icon>\n </div>\n\n <!-- Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"row.name\">\n {{ row.name || 'Untitled' }}\n </div>\n @if (row.type === 'department') {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800\">\n Department\n </span>\n }\n </div>\n @if (row.description) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" [title]=\"row.description\">\n {{ row.description }}\n </div>\n }\n </div>\n </div>\n </ng-template>\n\n <!-- Designation Status Renderer Template -->\n <ng-template #designationStatusRendererTemplate let-row=\"row\" let-value=\"value\">\n <span\n 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]=\"getStatusClass(row.status)\">\n {{ getStatusDisplay(row.status) }}\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 [items]=\"getDropdownItems(row)\" [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>" }]
|
|
5130
|
+
}], ctorParameters: () => [], propDecorators: { designationDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['designationDetailsRendererTemplate', { isSignal: true }] }], designationStatusRendererTemplate: [{ type: i0.ViewChild, args: ['designationStatusRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
5099
5131
|
|
|
5100
5132
|
var designationList_component = /*#__PURE__*/Object.freeze({
|
|
5101
5133
|
__proto__: null,
|
|
@@ -5113,6 +5145,7 @@ class CideCoreGradeLevelListComponent {
|
|
|
5113
5145
|
router = inject(Router);
|
|
5114
5146
|
notificationService = inject(NotificationService);
|
|
5115
5147
|
confirmationService = inject(ConfirmationService);
|
|
5148
|
+
rightsService = inject(RightsService);
|
|
5116
5149
|
// Modern ViewChild signals for template renderers (Angular 20 approach)
|
|
5117
5150
|
dragHandleRendererTemplate = viewChild.required('dragHandleRendererTemplate');
|
|
5118
5151
|
gradeLevelDetailsRendererTemplate = viewChild.required('gradeLevelDetailsRendererTemplate');
|
|
@@ -5280,6 +5313,11 @@ class CideCoreGradeLevelListComponent {
|
|
|
5280
5313
|
hasPreviousPage = computed(() => this.currentPage() > 1, ...(ngDevMode ? [{ debugName: "hasPreviousPage" }] : []));
|
|
5281
5314
|
// Computed property for next order
|
|
5282
5315
|
nextOrder = computed(() => this.calculateNextOrder(), ...(ngDevMode ? [{ debugName: "nextOrder" }] : []));
|
|
5316
|
+
// Rights computed signals
|
|
5317
|
+
canCreate = computed(() => this.rightsService.hasRight('CREATE'), ...(ngDevMode ? [{ debugName: "canCreate" }] : []));
|
|
5318
|
+
canEdit = computed(() => this.rightsService.hasRight('EDIT'), ...(ngDevMode ? [{ debugName: "canEdit" }] : []));
|
|
5319
|
+
canDelete = computed(() => this.rightsService.hasRight('DELETE'), ...(ngDevMode ? [{ debugName: "canDelete" }] : []));
|
|
5320
|
+
canView = computed(() => this.rightsService.hasRight('VIEW'), ...(ngDevMode ? [{ debugName: "canView" }] : []));
|
|
5283
5321
|
// Modern constructor with effects for initialization
|
|
5284
5322
|
constructor() {
|
|
5285
5323
|
this.initializeComponent();
|
|
@@ -5292,6 +5330,8 @@ class CideCoreGradeLevelListComponent {
|
|
|
5292
5330
|
*/
|
|
5293
5331
|
initializeComponent() {
|
|
5294
5332
|
console.log('CideCoreGradeLevelListComponent initialized with modern Angular patterns');
|
|
5333
|
+
// Initialize rights for grade level management
|
|
5334
|
+
this.rightsService.initializeRights('core_grade_level_list');
|
|
5295
5335
|
this.loadGradeLevels();
|
|
5296
5336
|
this.setupEventListeners();
|
|
5297
5337
|
this.exposeGlobalFunctions();
|
|
@@ -5884,32 +5924,38 @@ class CideCoreGradeLevelListComponent {
|
|
|
5884
5924
|
* Generate dropdown items for grade level actions
|
|
5885
5925
|
*/
|
|
5886
5926
|
getDropdownItems(row) {
|
|
5887
|
-
|
|
5888
|
-
|
|
5927
|
+
const items = [];
|
|
5928
|
+
if (this.canEdit()) {
|
|
5929
|
+
items.push({
|
|
5889
5930
|
id: 'edit',
|
|
5890
5931
|
label: 'Edit',
|
|
5891
5932
|
icon: 'edit',
|
|
5892
5933
|
iconColor: 'tw-text-gray-400',
|
|
5893
5934
|
textColor: 'tw-text-gray-700',
|
|
5894
5935
|
hoverBgColor: 'hover:tw-bg-gray-100'
|
|
5895
|
-
}
|
|
5896
|
-
|
|
5936
|
+
});
|
|
5937
|
+
}
|
|
5938
|
+
if (this.canEdit()) {
|
|
5939
|
+
items.push({
|
|
5897
5940
|
id: 'toggle',
|
|
5898
5941
|
label: row.sydsgl_isactive ? 'Deactivate' : 'Activate',
|
|
5899
5942
|
icon: 'power_settings_new',
|
|
5900
|
-
iconColor: 'tw-text-
|
|
5901
|
-
textColor: 'tw-text-
|
|
5902
|
-
hoverBgColor: 'hover:tw-bg-
|
|
5903
|
-
}
|
|
5904
|
-
|
|
5943
|
+
iconColor: 'tw-text-orange-400',
|
|
5944
|
+
textColor: 'tw-text-orange-600',
|
|
5945
|
+
hoverBgColor: 'hover:tw-bg-orange-50'
|
|
5946
|
+
});
|
|
5947
|
+
}
|
|
5948
|
+
if (this.canDelete()) {
|
|
5949
|
+
items.push({
|
|
5905
5950
|
id: 'delete',
|
|
5906
5951
|
label: 'Delete',
|
|
5907
5952
|
icon: 'delete',
|
|
5908
5953
|
iconColor: 'tw-text-red-400',
|
|
5909
5954
|
textColor: 'tw-text-red-600',
|
|
5910
5955
|
hoverBgColor: 'hover:tw-bg-red-50'
|
|
5911
|
-
}
|
|
5912
|
-
|
|
5956
|
+
});
|
|
5957
|
+
}
|
|
5958
|
+
return items;
|
|
5913
5959
|
}
|
|
5914
5960
|
/**
|
|
5915
5961
|
* Handle dropdown item click
|
|
@@ -5944,10 +5990,10 @@ class CideCoreGradeLevelListComponent {
|
|
|
5944
5990
|
trackByItemId(index, item) {
|
|
5945
5991
|
return item._id || '';
|
|
5946
5992
|
}
|
|
5947
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
5948
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreGradeLevelListComponent, isStandalone: true, selector: "cide-core-grade-level-list", viewQueries: [{ propertyName: "dragHandleRendererTemplate", first: true, predicate: ["dragHandleRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "gradeLevelDetailsRendererTemplate", first: true, predicate: ["gradeLevelDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "gradeLevelStatusRendererTemplate", first: true, predicate: ["gradeLevelStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Grade Level List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_grade_level_list' }\">\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 Grade Level' : 'Quick Add Grade Level' }}</h6>\n </div>\n </div>\n \n <form [formGroup]=\"quickAddForm\" (ngSubmit)=\"quickAddGradeLevel()\">\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 <!-- Grade Level Name -->\n <div>\n <cide-ele-input \n id=\"sydsgl_name\" \n label=\"Name\" \n formControlName=\"sydsgl_name\"\n placeholder=\"Grade level 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=\"sydsgl_isactive\"\n type=\"checkbox\"\n label=\"Active\"\n formControlName=\"sydsgl_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=\"sydsgl_description\" \n label=\"Description\" \n formControlName=\"sydsgl_description\"\n placeholder=\"Grade level description\"\n rows=\"2\"\n size=\"sm\">\n </cide-ele-textarea>\n </div>\n \n <!-- Entity ID (Hidden) -->\n <div class=\"tw-hidden\">\n <cide-ele-input \n id=\"sydsgl_entity_id_syen\" \n label=\"Entity ID\" \n formControlName=\"sydsgl_entity_id_syen\"\n placeholder=\"Entity ID\"\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 <!-- 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 \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 </div>\n </div>\n\n</div>\n\n<!-- Drag Handle Renderer Template -->\n<ng-template #dragHandleRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-full tw-h-full tw-cursor-move drag-handle\">\n <cide-ele-icon \n class=\"tw-text-gray-400 hover:tw-text-gray-600 tw-transition-colors\" \n size=\"xs\">\n drag_indicator\n </cide-ele-icon>\n </div>\n</ng-template>\n\n<!-- Grade Level Details Renderer Template -->\n<ng-template #gradeLevelDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Grade Level Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon \n class=\"tw-text-gray-400\" \n size=\"xs\">\n school\n </cide-ele-icon>\n </div>\n \n <!-- Grade Level Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.sydsgl_name\">\n {{ row.sydsgl_name || 'Untitled' }}\n </div>\n @if (row.sydsgl_description) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.sydsgl_description\">\n {{ row.sydsgl_description }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Grade Level Status Renderer Template -->\n<ng-template #gradeLevelStatusRendererTemplate 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]=\"getStatusClass(row.sydsgl_isactive)\">\n {{ getStatusDisplay(row.sydsgl_isactive) }}\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<!-- Confirmation Modal -->\n</cide-lyt-shared-wrapper>\n<cide-ele-confirmation-modal></cide-ele-confirmation-modal> ", 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], cide-ele-button", 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", "step", "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: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }, { kind: "component", type: CideEleConfirmationModalComponent, selector: "cide-ele-confirmation-modal" }] });
|
|
5993
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGradeLevelListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5994
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreGradeLevelListComponent, isStandalone: true, selector: "cide-core-grade-level-list", viewQueries: [{ propertyName: "dragHandleRendererTemplate", first: true, predicate: ["dragHandleRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "gradeLevelDetailsRendererTemplate", first: true, predicate: ["gradeLevelDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "gradeLevelStatusRendererTemplate", first: true, predicate: ["gradeLevelStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Grade Level List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_grade_level_list' }\">\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section - Show if user has VIEW, CREATE, or EDIT rights -->\n @if (canView() || canCreate() || canEdit()) {\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 Grade Level' : 'Quick\n Add Grade Level' }}</h6>\n </div>\n </div>\n \n <form [formGroup]=\"quickAddForm\" (ngSubmit)=\"quickAddGradeLevel()\">\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 <!-- Grade Level Name -->\n <div>\n <cide-ele-input \n id=\"sydsgl_name\" \n label=\"Name\" \n formControlName=\"sydsgl_name\"\n placeholder=\"Grade level 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=\"sydsgl_isactive\"\n type=\"checkbox\"\n label=\"Active\"\n formControlName=\"sydsgl_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 id=\"sydsgl_description\" label=\"Description\" formControlName=\"sydsgl_description\"\n placeholder=\"Grade level description\" rows=\"2\" [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-textarea>\n </div>\n \n <!-- Entity ID (Hidden) -->\n <div class=\"tw-hidden\">\n <cide-ele-input \n id=\"sydsgl_entity_id_syen\" \n label=\"Entity ID\" \n formControlName=\"sydsgl_entity_id_syen\"\n placeholder=\"Entity ID\"\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\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 \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 </div>\n </div>\n\n</div>\n\n<!-- Drag Handle Renderer Template -->\n<ng-template #dragHandleRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-full tw-h-full tw-cursor-move drag-handle\">\n <cide-ele-icon \n class=\"tw-text-gray-400 hover:tw-text-gray-600 tw-transition-colors\" \n size=\"xs\">\n drag_indicator\n </cide-ele-icon>\n </div>\n</ng-template>\n\n<!-- Grade Level Details Renderer Template -->\n<ng-template #gradeLevelDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Grade Level Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon \n class=\"tw-text-gray-400\" \n size=\"xs\">\n school\n </cide-ele-icon>\n </div>\n \n <!-- Grade Level Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.sydsgl_name\">\n {{ row.sydsgl_name || 'Untitled' }}\n </div>\n @if (row.sydsgl_description) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.sydsgl_description\">\n {{ row.sydsgl_description }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Grade Level Status Renderer Template -->\n<ng-template #gradeLevelStatusRendererTemplate 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]=\"getStatusClass(row.sydsgl_isactive)\">\n {{ getStatusDisplay(row.sydsgl_isactive) }}\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<!-- Confirmation Modal -->\n</cide-lyt-shared-wrapper>\n<cide-ele-confirmation-modal></cide-ele-confirmation-modal> ", 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], cide-ele-button", 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", "step", "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: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }, { kind: "component", type: CideEleConfirmationModalComponent, selector: "cide-ele-confirmation-modal" }] });
|
|
5949
5995
|
}
|
|
5950
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
5996
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGradeLevelListComponent, decorators: [{
|
|
5951
5997
|
type: Component,
|
|
5952
5998
|
args: [{ selector: 'cide-core-grade-level-list', standalone: true, imports: [
|
|
5953
5999
|
CommonModule,
|
|
@@ -5961,8 +6007,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
5961
6007
|
CideEleDropdownComponent,
|
|
5962
6008
|
CideLytSharedWrapperComponent,
|
|
5963
6009
|
CideEleConfirmationModalComponent
|
|
5964
|
-
], template: "<!-- Grade Level List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_grade_level_list' }\">\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 Grade Level' : 'Quick
|
|
5965
|
-
}], ctorParameters: () => [] });
|
|
6010
|
+
], template: "<!-- Grade Level List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_grade_level_list' }\">\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section - Show if user has VIEW, CREATE, or EDIT rights -->\n @if (canView() || canCreate() || canEdit()) {\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 Grade Level' : 'Quick\n Add Grade Level' }}</h6>\n </div>\n </div>\n \n <form [formGroup]=\"quickAddForm\" (ngSubmit)=\"quickAddGradeLevel()\">\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 <!-- Grade Level Name -->\n <div>\n <cide-ele-input \n id=\"sydsgl_name\" \n label=\"Name\" \n formControlName=\"sydsgl_name\"\n placeholder=\"Grade level 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=\"sydsgl_isactive\"\n type=\"checkbox\"\n label=\"Active\"\n formControlName=\"sydsgl_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 id=\"sydsgl_description\" label=\"Description\" formControlName=\"sydsgl_description\"\n placeholder=\"Grade level description\" rows=\"2\" [disabled]=\"canView() && !canCreate() && !canEdit()\" size=\"sm\">\n </cide-ele-textarea>\n </div>\n \n <!-- Entity ID (Hidden) -->\n <div class=\"tw-hidden\">\n <cide-ele-input \n id=\"sydsgl_entity_id_syen\" \n label=\"Entity ID\" \n formControlName=\"sydsgl_entity_id_syen\"\n placeholder=\"Entity ID\"\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\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 \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 </div>\n </div>\n\n</div>\n\n<!-- Drag Handle Renderer Template -->\n<ng-template #dragHandleRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-full tw-h-full tw-cursor-move drag-handle\">\n <cide-ele-icon \n class=\"tw-text-gray-400 hover:tw-text-gray-600 tw-transition-colors\" \n size=\"xs\">\n drag_indicator\n </cide-ele-icon>\n </div>\n</ng-template>\n\n<!-- Grade Level Details Renderer Template -->\n<ng-template #gradeLevelDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Grade Level Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon \n class=\"tw-text-gray-400\" \n size=\"xs\">\n school\n </cide-ele-icon>\n </div>\n \n <!-- Grade Level Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.sydsgl_name\">\n {{ row.sydsgl_name || 'Untitled' }}\n </div>\n @if (row.sydsgl_description) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.sydsgl_description\">\n {{ row.sydsgl_description }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Grade Level Status Renderer Template -->\n<ng-template #gradeLevelStatusRendererTemplate 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]=\"getStatusClass(row.sydsgl_isactive)\">\n {{ getStatusDisplay(row.sydsgl_isactive) }}\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<!-- Confirmation Modal -->\n</cide-lyt-shared-wrapper>\n<cide-ele-confirmation-modal></cide-ele-confirmation-modal> " }]
|
|
6011
|
+
}], ctorParameters: () => [], propDecorators: { dragHandleRendererTemplate: [{ type: i0.ViewChild, args: ['dragHandleRendererTemplate', { isSignal: true }] }], gradeLevelDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['gradeLevelDetailsRendererTemplate', { isSignal: true }] }], gradeLevelStatusRendererTemplate: [{ type: i0.ViewChild, args: ['gradeLevelStatusRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
5966
6012
|
|
|
5967
6013
|
var gradeLevelList_component = /*#__PURE__*/Object.freeze({
|
|
5968
6014
|
__proto__: null,
|
|
@@ -6373,10 +6419,10 @@ class CideCorePageListComponent {
|
|
|
6373
6419
|
const event = new MouseEvent('click', { bubbles: true });
|
|
6374
6420
|
document.dispatchEvent(event);
|
|
6375
6421
|
}
|
|
6376
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
6377
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
6422
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6423
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCorePageListComponent, isStandalone: true, selector: "cide-core-page-list", viewQueries: [{ propertyName: "pageDetailsRendererTemplate", first: true, predicate: ["pageDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "pageStatusRendererTemplate", first: true, predicate: ["pageStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Page List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_page_list' }\">\n<div class=\"tw-table tw-w-full tw-h-full\">\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 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\">web</cide-ele-icon>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Page 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-3 sm:tw-space-y-0 sm:tw-space-x-3\">\n <!-- Add Page Button -->\n @if (canCreate()) {\n <button\n cideEleButton\n variant=\"primary\"\n size=\"sm\"\n (click)=\"createPage()\"\n leftIcon=\"add\"\n class=\"tw-whitespace-nowrap tw-flex tw-items-center tw-gap-2\">\n Create New Page\n </button>\n }\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 class=\"tw-text-red-400 tw-w-5 tw-h-5 tw-mt-0.5 tw-flex-shrink-0\">error</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 <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\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 (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n</div>\n\n<!-- Page Details Renderer Template -->\n<ng-template #pageDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Page Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon class=\"tw-text-gray-400 tw-w-4 tw-h-4\">web</cide-ele-icon>\n </div>\n \n <!-- Page Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.sypg_title\">\n {{ row.sypg_title || 'Untitled' }}\n </div>\n @if (row.sypg_desc) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.sypg_desc\">\n {{ row.sypg_desc }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Page Status Renderer Template -->\n<ng-template #pageStatusRendererTemplate 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]=\"row.sypg_isactive ? 'tw-bg-green-100 tw-text-green-800' : 'tw-bg-red-100 tw-text-red-800'\">\n {{ row.sypg_isactive ? 'Active' : 'Inactive' }}\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]=\"getActionDropdownItems(row)\"\n [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>\n</cide-lyt-shared-wrapper> ", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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], cide-ele-button", 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: 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: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
6378
6424
|
}
|
|
6379
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
6425
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageListComponent, decorators: [{
|
|
6380
6426
|
type: Component,
|
|
6381
6427
|
args: [{ selector: 'cide-core-page-list', standalone: true, imports: [
|
|
6382
6428
|
CommonModule,
|
|
@@ -6386,7 +6432,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
6386
6432
|
CideEleDropdownComponent,
|
|
6387
6433
|
CideLytSharedWrapperComponent
|
|
6388
6434
|
], template: "<!-- Page List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_page_list' }\">\n<div class=\"tw-table tw-w-full tw-h-full\">\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 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\">web</cide-ele-icon>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Page 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-3 sm:tw-space-y-0 sm:tw-space-x-3\">\n <!-- Add Page Button -->\n @if (canCreate()) {\n <button\n cideEleButton\n variant=\"primary\"\n size=\"sm\"\n (click)=\"createPage()\"\n leftIcon=\"add\"\n class=\"tw-whitespace-nowrap tw-flex tw-items-center tw-gap-2\">\n Create New Page\n </button>\n }\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 class=\"tw-text-red-400 tw-w-5 tw-h-5 tw-mt-0.5 tw-flex-shrink-0\">error</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 <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\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 (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n</div>\n\n<!-- Page Details Renderer Template -->\n<ng-template #pageDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Page Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon class=\"tw-text-gray-400 tw-w-4 tw-h-4\">web</cide-ele-icon>\n </div>\n \n <!-- Page Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.sypg_title\">\n {{ row.sypg_title || 'Untitled' }}\n </div>\n @if (row.sypg_desc) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.sypg_desc\">\n {{ row.sypg_desc }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Page Status Renderer Template -->\n<ng-template #pageStatusRendererTemplate 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]=\"row.sypg_isactive ? 'tw-bg-green-100 tw-text-green-800' : 'tw-bg-red-100 tw-text-red-800'\">\n {{ row.sypg_isactive ? 'Active' : 'Inactive' }}\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]=\"getActionDropdownItems(row)\"\n [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>\n</cide-lyt-shared-wrapper> " }]
|
|
6389
|
-
}], ctorParameters: () => [] });
|
|
6435
|
+
}], ctorParameters: () => [], propDecorators: { pageDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['pageDetailsRendererTemplate', { isSignal: true }] }], pageStatusRendererTemplate: [{ type: i0.ViewChild, args: ['pageStatusRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
6390
6436
|
|
|
6391
6437
|
var pageList_component = /*#__PURE__*/Object.freeze({
|
|
6392
6438
|
__proto__: null,
|
|
@@ -6485,10 +6531,10 @@ class CideCorePageThemeService {
|
|
|
6485
6531
|
console.error('Page Theme Service Error:', errorMessage);
|
|
6486
6532
|
return throwError(() => new Error(errorMessage));
|
|
6487
6533
|
}
|
|
6488
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
6489
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
6534
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageThemeService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
6535
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageThemeService, providedIn: 'root' });
|
|
6490
6536
|
}
|
|
6491
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
6537
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageThemeService, decorators: [{
|
|
6492
6538
|
type: Injectable,
|
|
6493
6539
|
args: [{
|
|
6494
6540
|
providedIn: 'root'
|
|
@@ -7260,10 +7306,10 @@ class CideCorePageThemeComponent {
|
|
|
7260
7306
|
onPreviewImageUploadProgress(progress) {
|
|
7261
7307
|
console.log('Preview image upload progress:', progress + '%');
|
|
7262
7308
|
}
|
|
7263
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
7264
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCorePageThemeComponent, isStandalone: true, selector: "cide-core-page-theme", viewQueries: [{ propertyName: "themeDetailsRendererTemplate", first: true, predicate: ["themeDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "themeStatusRendererTemplate", first: true, predicate: ["themeStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Page Theme Container -->\n<div class=\"tw-flex tw-h-full tw-w-full\">\n \n <!-- Left: Form and header (60%) -->\n <div class=\"tw-w-full lg:tw-w-3/5 tw-flex tw-flex-col tw-border-r tw-border-gray-200\">\n\n <!-- Header Section -->\n <div class=\"tw-px-6 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 and Back Button -->\n <div class=\"tw-flex tw-items-center tw-space-x-4\">\n <button cideEleButton variant=\"ghost\" size=\"sm\" (click)=\"goBack();\" class=\"tw-text-gray-600 hover:tw-text-gray-900\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">arrow_back</cide-ele-icon>\n </button>\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\">palette</cide-ele-icon>\n <div>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Theme Management</h5>\n <p class=\"tw-text-sm tw-text-gray-500 tw-m-0\">Page: {{ pageTitle() }}</p>\n </div>\n </div>\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\n <!-- Quick Add/Edit Form Section -->\n <div class=\"tw-px-6 tw-py-3 tw-bg-white tw-overflow-auto\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\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 Theme' : 'Quick Add Theme' }}</h6>\n </div>\n </div>\n\n <!-- Form (kept as-is) -->\n <form [formGroup]=\"themeForm\" (ngSubmit)=\"saveTheme()\" class=\"tw-space-y-4\">\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-[1fr_200px] tw-gap-4\">\n <!-- Left Side: All Input Fields -->\n <div class=\"tw-space-y-4\">\n <!-- Row 1: Theme Title and Theme Code -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-4\">\n <div class=\"tw-space-y-2\">\n <cide-ele-input id=\"sytm_title\" formControlName=\"sytm_title\" placeholder=\"Enter theme title\" label=\"Theme Title\" size=\"sm\"></cide-ele-input>\n </div>\n <div class=\"tw-space-y-2\">\n <cide-ele-input id=\"sytm_theme_code\" formControlName=\"sytm_theme_code\" placeholder=\"Enter theme code\" label=\"Theme Code\" size=\"sm\"></cide-ele-input>\n </div>\n </div>\n \n <!-- Row 2: Sub Title and Active Status -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-4\">\n <div class=\"tw-space-y-2\">\n <cide-ele-input id=\"sytm_sub_title\" formControlName=\"sytm_sub_title\" placeholder=\"Enter sub title\" label=\"Sub Title\" size=\"sm\"></cide-ele-input>\n </div>\n <div class=\"tw-space-y-2 tw-flex tw-items-center\">\n <cide-ele-input\n id=\"sytm_isactive_cb\"\n type=\"checkbox\"\n label=\"Active\"\n size=\"sm\"\n formControlName=\"sytm_isactive\">\n </cide-ele-input>\n </div>\n </div>\n \n <!-- Row 3: Description -->\n <div class=\"tw-space-y-2\">\n <cide-ele-textarea id=\"sytm_desc\" formControlName=\"sytm_desc\" placeholder=\"Enter theme description\" rows=\"2\" label=\"Description\" size=\"sm\"></cide-ele-textarea>\n </div>\n </div>\n \n <!-- Right Side: File Upload -->\n <div class=\"tw-flex tw-flex-col tw-justify-start tw-items-center tw-p-0\">\n <cide-ele-file-input \n id=\"sytm_preview_id_fm\" \n formControlName=\"sytm_preview_id_fm\"\n accept=\"image/*\"\n [showPreview]=\"true\"\n [previewBoxMode]=\"true\"\n [showFileName]=\"false\"\n previewWidth=\"180px\"\n previewHeight=\"120px\"\n placeholderText=\"Upload Preview Image\"\n placeholderIcon=\"image\"\n [autoUpload]=\"true\"\n [uploadData]=\"getPreviewImageUploadData()\"\n (uploadSuccess)=\"onPreviewImageUploadSuccess($event)\"\n (uploadError)=\"onPreviewImageUploadError($event)\"\n (uploadProgressChange)=\"onPreviewImageUploadProgress($event)\">\n </cide-ele-file-input>\n </div>\n </div>\n \n <!-- Configuration JSON -->\n <div class=\"tw-space-y-2\">\n <cide-ele-json-editor label=\"Configuration JSON\" formControlName=\"sytm_configuration\" [required]=\"true\" [config]=\"{\n showLineNumbers: true,\n autoFormat: true,\n validateOnChange: true,\n minHeight: 150,\n maxHeight: 300,\n placeholder: 'Enter theme configuration JSON...'\n }\" helperText=\"Enter valid JSON configuration for the theme\"></cide-ele-json-editor>\n </div>\n <!-- Layout Configuration + Selection -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-6\">\n <div class=\"tw-space-y-2\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Layout & Selection</div>\n <!-- Selected toggle -->\n <div class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-md tw-px-3 tw-py-2\">\n <cide-ele-input\n id=\"sytm_isselected\"\n type=\"checkbox\"\n label=\"Selected (Default)\"\n size=\"sm\"\n formControlName=\"sytm_isselected\">\n </cide-ele-input>\n </div>\n <div formGroupName=\"sytm_layout\" class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-md tw-divide-y tw-overflow-hidden\">\n <!-- Sidebar -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_sidebar\">\n <cide-ele-input id=\"layout_sidebar_status\" type=\"checkbox\" label=\"Sidebar\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Header -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_header\">\n <cide-ele-input id=\"layout_header_status\" type=\"checkbox\" label=\"Header\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Footer -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_footer\">\n <cide-ele-input id=\"layout_footer_status\" type=\"checkbox\" label=\"Footer\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Breadcrumb -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_breadcrumb\">\n <cide-ele-input id=\"layout_breadcrumb_status\" type=\"checkbox\" label=\"Breadcrumb\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Console -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_console\">\n <cide-ele-input id=\"layout_console_status\" type=\"checkbox\" label=\"Console\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Request -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_request\">\n <cide-ele-input id=\"layout_request_status\" type=\"checkbox\" label=\"Request\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n </div>\n <p class=\"tw-text-xs tw-text-gray-500 tw-pt-1\">Toggle active sections. Only one theme can be selected as default. More options can be added here later.</p>\n </div>\n \n <!-- Drawer Configuration -->\n <div class=\"tw-space-y-2\">\n <div class=\"tw-flex tw-items-center tw-justify-between\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Drawers</div>\n <button cideEleButton type=\"button\" size=\"xs\" variant=\"outline\" (click)=\"addDrawer()\">\n Add Drawer\n </button>\n </div>\n\n <div formGroupName=\"sytm_layout\">\n <div class=\"tw-space-y-2\" formArrayName=\"sytm_layout_drawer\">\n <div *ngFor=\"let drawerGrp of drawerArray.controls; let i = index\" [formGroupName]=\"i\" class=\"tw-border tw-border-gray-200 tw-rounded-md tw-p-3 tw-flex tw-items-center tw-gap-3\">\n <cide-ele-input id=\"drawer_active_{{i}}\" type=\"checkbox\" label=\"Active\" size=\"sm\" formControlName=\"syth_status\"></cide-ele-input>\n <div class=\"tw-flex-1\">\n <cide-ele-select\n id=\"drawer_config_{{i}}\"\n label=\"Drawer For\"\n size=\"sm\"\n [options]=\"drawerConfigOptions\"\n formControlName=\"syth_config_syco_for\">\n </cide-ele-select>\n </div>\n <button cideEleButton type=\"button\" size=\"xs\" variant=\"ghost\" (click)=\"removeDrawer(i)\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">delete</cide-ele-icon>\n </button>\n </div>\n <p class=\"tw-text-xs tw-text-gray-500\">Configure multiple drawers as needed.</p>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-flex tw-flex-col tw-gap-2 tw-pt-4 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-items-center tw-justify-end tw-space-x-3\">\n <button cideEleButton type=\"button\" variant=\"outline\" (click)=\"cancelForm()\" [disabled]=\"loading()\">Cancel</button>\n <button cideEleButton type=\"submit\" variant=\"primary\" leftIcon=\"add\" [disabled]=\"!themeForm.valid || loading()\" [loading]=\"loading()\">\n {{ isEditMode() ? 'Update Theme' : 'Create Theme' }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- Right: Theme gallery (40%) -->\n <div class=\"tw-hidden lg:tw-flex tw-w-2/5 tw-flex-col\">\n <!-- (Header consolidated above) -->\n\n <!-- Gallery list -->\n <div class=\"tw-flex-1 tw-overflow-auto tw-bg-gray-50\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3 tw-p-4\">\n @for (theme of filteredThemes(); track theme._id) {\n <div class=\"tw-rounded-md tw-transition tw-cursor-pointer tw-relative\"\n [ngClass]=\"theme.sytm_isselected\n ? 'tw-border tw-border-blue-500 tw-ring-2 tw-ring-blue-200 tw-bg-blue-50/50'\n : 'tw-bg-white tw-border tw-border-gray-200 hover:tw-shadow-sm'\"\n (click)=\"editTheme(theme)\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-selected]=\"theme.sytm_isselected ? 'true' : 'false'\"\n [attr.aria-label]=\"'Edit theme ' + (theme.sytm_title || theme.sytm_theme_code)\"\n (keydown.enter)=\"editTheme(theme)\"\n (keydown.space)=\"$event.preventDefault(); editTheme(theme)\">\n\n <!-- Selected badge -->\n <div *ngIf=\"theme.sytm_isselected\"\n class=\"tw-absolute tw-top-2 tw-right-2 tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-rounded-full tw-bg-blue-600 tw-text-white\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">check</cide-ele-icon>\n </div>\n \n <div class=\"tw-aspect-[16/9] tw-bg-gray-100 tw-rounded-t-md tw-overflow-hidden tw-flex tw-items-center tw-justify-center\">\n @if (theme.sytm_preview_id_fm) {\n <img \n cideEleFileImage \n [fileId]=\"theme.sytm_preview_id_fm\" \n [altText]=\"'Theme Preview'\"\n class=\"tw-w-full tw-h-full tw-object-cover\" />\n } @else {\n <div class=\"tw-text-gray-400 tw-text-xs\">No preview</div>\n }\n </div>\n <div class=\"tw-p-3 tw-space-y-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"theme.sytm_title\">{{ theme.sytm_title || 'Untitled Theme' }}</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" [title]=\"theme.sytm_theme_code\">{{ theme.sytm_theme_code }}</div>\n <div class=\"tw-flex tw-items-center tw-justify-between tw-pt-1\">\n <span class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs\" [ngClass]=\"theme.sytm_isactive ? 'tw-text-green-700' : 'tw-text-red-700'\">\n <span class=\"tw-w-1.5 tw-h-1.5 tw-rounded-full\" [ngClass]=\"theme.sytm_isactive ? 'tw-bg-green-500' : 'tw-bg-red-500'\"></span>\n {{ theme.sytm_isactive ? 'Active' : 'Inactive' }}\n </span>\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n <!-- Set Selected Button - Clear and Simple -->\n @if (theme.sytm_isselected) {\n <span class=\"tw-inline-flex tw-items-center tw-gap-1 tw-px-2 tw-py-1 tw-bg-green-100 tw-text-green-800 tw-rounded-md tw-text-xs tw-font-medium\">\n <cide-ele-icon class=\"tw-w-3 tw-h-3\">check</cide-ele-icon>\n Selected\n </span>\n } @else {\n <button cideEleButton \n variant=\"outline\" \n size=\"xs\"\n (click)=\"$event.stopPropagation(); setSelectedTheme(theme)\"\n [attr.aria-label]=\"'Select ' + (theme.sytm_title || theme.sytm_theme_code) + ' theme'\"\n class=\"tw-text-xs\">\n Select\n </button>\n }\n <button cideEleButton variant=\"ghost\" size=\"xs\" (click)=\"$event.stopPropagation(); editTheme(theme)\"\n [attr.aria-label]=\"'Edit theme ' + (theme.sytm_title || theme.sytm_theme_code)\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">edit</cide-ele-icon>\n </button>\n <button cideEleButton variant=\"ghost\" size=\"xs\" (click)=\"$event.stopPropagation(); deleteTheme(theme)\"\n [attr.aria-label]=\"'Delete theme ' + (theme.sytm_title || theme.sytm_theme_code)\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">delete</cide-ele-icon>\n </button>\n </div>\n </div>\n </div>\n </div>\n }\n\n @if (!loading() && filteredThemes().length === 0) {\n <div class=\"tw-col-span-full tw-text-center tw-text-xs tw-text-gray-500 tw-py-8\">No themes found</div>\n }\n </div>\n </div>\n </div>\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<!-- Theme Details Renderer Template -->\n<ng-template #themeDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Theme Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon \n class=\"tw-text-purple-600\" \n size=\"xs\">\n palette\n </cide-ele-icon>\n </div>\n \n <!-- Theme Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.sytm_title\">\n {{ row.sytm_title || 'Untitled' }}\n </div>\n @if (row.sytm_desc) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.sytm_desc\">\n {{ row.sytm_desc }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Theme Status Renderer Template -->\n<ng-template #themeStatusRendererTemplate 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]=\"row.sytm_isactive ? 'tw-bg-green-100 tw-text-green-800' : 'tw-bg-red-100 tw-text-red-800'\">\n {{ row.sytm_isactive ? 'Active' : 'Inactive' }}\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]=\"getActionDropdownItems(row)\"\n [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template> ", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: "ngmodule", type: FormsModule }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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", "step", "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", "treeView"], 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"] }, { kind: "component", type: CideEleJsonEditorComponent, selector: "cide-ele-json-editor", inputs: ["label", "helperText", "required", "disabled", "showCharacterCount", "config"], outputs: ["valueChange", "objectChange", "errorsChange", "validChange"] }, { kind: "component", type: CideEleFileInputComponent, selector: "cide-ele-file-input", inputs: ["label", "accept", "multiple", "disabled", "required", "helperText", "errorText", "showPreview", "previewWidth", "previewHeight", "previewBoxMode", "showFileName", "placeholderText", "placeholderIcon", "autoUpload", "uploadData", "showFloatingUploader", "floatingUploaderGroupId"], outputs: ["fileChange", "uploadSuccess", "uploadError", "uploadProgressChange"] }, { kind: "directive", type: CideEleFileImageDirective, selector: "[cideEleFileImage]", inputs: ["fileId", "altText"] }] });
|
|
7309
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageThemeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7310
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCorePageThemeComponent, isStandalone: true, selector: "cide-core-page-theme", viewQueries: [{ propertyName: "themeDetailsRendererTemplate", first: true, predicate: ["themeDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "themeStatusRendererTemplate", first: true, predicate: ["themeStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Page Theme Container -->\n<div class=\"tw-flex tw-h-full tw-w-full\">\n \n <!-- Left: Form and header (60%) -->\n <div class=\"tw-w-full lg:tw-w-3/5 tw-flex tw-flex-col tw-border-r tw-border-gray-200\">\n\n <!-- Header Section -->\n <div class=\"tw-px-6 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 and Back Button -->\n <div class=\"tw-flex tw-items-center tw-space-x-4\">\n <button cideEleButton variant=\"ghost\" size=\"sm\" (click)=\"goBack();\" class=\"tw-text-gray-600 hover:tw-text-gray-900\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">arrow_back</cide-ele-icon>\n </button>\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\">palette</cide-ele-icon>\n <div>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Theme Management</h5>\n <p class=\"tw-text-sm tw-text-gray-500 tw-m-0\">Page: {{ pageTitle() }}</p>\n </div>\n </div>\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\n <!-- Quick Add/Edit Form Section -->\n <div class=\"tw-px-6 tw-py-3 tw-bg-white tw-overflow-auto\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\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 Theme' : 'Quick Add Theme' }}</h6>\n </div>\n </div>\n\n <!-- Form (kept as-is) -->\n <form [formGroup]=\"themeForm\" (ngSubmit)=\"saveTheme()\" class=\"tw-space-y-4\">\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-[1fr_200px] tw-gap-4\">\n <!-- Left Side: All Input Fields -->\n <div class=\"tw-space-y-4\">\n <!-- Row 1: Theme Title and Theme Code -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-4\">\n <div class=\"tw-space-y-2\">\n <cide-ele-input id=\"sytm_title\" formControlName=\"sytm_title\" placeholder=\"Enter theme title\" label=\"Theme Title\" size=\"sm\"></cide-ele-input>\n </div>\n <div class=\"tw-space-y-2\">\n <cide-ele-input id=\"sytm_theme_code\" formControlName=\"sytm_theme_code\" placeholder=\"Enter theme code\" label=\"Theme Code\" size=\"sm\"></cide-ele-input>\n </div>\n </div>\n \n <!-- Row 2: Sub Title and Active Status -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-4\">\n <div class=\"tw-space-y-2\">\n <cide-ele-input id=\"sytm_sub_title\" formControlName=\"sytm_sub_title\" placeholder=\"Enter sub title\" label=\"Sub Title\" size=\"sm\"></cide-ele-input>\n </div>\n <div class=\"tw-space-y-2 tw-flex tw-items-center\">\n <cide-ele-input\n id=\"sytm_isactive_cb\"\n type=\"checkbox\"\n label=\"Active\"\n size=\"sm\"\n formControlName=\"sytm_isactive\">\n </cide-ele-input>\n </div>\n </div>\n \n <!-- Row 3: Description -->\n <div class=\"tw-space-y-2\">\n <cide-ele-textarea id=\"sytm_desc\" formControlName=\"sytm_desc\" placeholder=\"Enter theme description\" rows=\"2\" label=\"Description\" size=\"sm\"></cide-ele-textarea>\n </div>\n </div>\n \n <!-- Right Side: File Upload -->\n <div class=\"tw-flex tw-flex-col tw-justify-start tw-items-center tw-p-0\">\n <cide-ele-file-input \n id=\"sytm_preview_id_fm\" \n formControlName=\"sytm_preview_id_fm\"\n accept=\"image/*\"\n [showPreview]=\"true\"\n [previewBoxMode]=\"true\"\n [showFileName]=\"false\"\n previewWidth=\"180px\"\n previewHeight=\"120px\"\n placeholderText=\"Upload Preview Image\"\n placeholderIcon=\"image\"\n [autoUpload]=\"true\"\n [uploadData]=\"getPreviewImageUploadData()\"\n (uploadSuccess)=\"onPreviewImageUploadSuccess($event)\"\n (uploadError)=\"onPreviewImageUploadError($event)\"\n (uploadProgressChange)=\"onPreviewImageUploadProgress($event)\">\n </cide-ele-file-input>\n </div>\n </div>\n \n <!-- Configuration JSON -->\n <div class=\"tw-space-y-2\">\n <cide-ele-json-editor label=\"Configuration JSON\" formControlName=\"sytm_configuration\" [required]=\"true\" [config]=\"{\n showLineNumbers: true,\n autoFormat: true,\n validateOnChange: true,\n minHeight: 150,\n maxHeight: 300,\n placeholder: 'Enter theme configuration JSON...'\n }\" helperText=\"Enter valid JSON configuration for the theme\"></cide-ele-json-editor>\n </div>\n <!-- Layout Configuration + Selection -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-6\">\n <div class=\"tw-space-y-2\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Layout & Selection</div>\n <!-- Selected toggle -->\n <div class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-md tw-px-3 tw-py-2\">\n <cide-ele-input\n id=\"sytm_isselected\"\n type=\"checkbox\"\n label=\"Selected (Default)\"\n size=\"sm\"\n formControlName=\"sytm_isselected\">\n </cide-ele-input>\n </div>\n <div formGroupName=\"sytm_layout\" class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-md tw-divide-y tw-overflow-hidden\">\n <!-- Sidebar -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_sidebar\">\n <cide-ele-input id=\"layout_sidebar_status\" type=\"checkbox\" label=\"Sidebar\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Header -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_header\">\n <cide-ele-input id=\"layout_header_status\" type=\"checkbox\" label=\"Header\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Footer -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_footer\">\n <cide-ele-input id=\"layout_footer_status\" type=\"checkbox\" label=\"Footer\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Breadcrumb -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_breadcrumb\">\n <cide-ele-input id=\"layout_breadcrumb_status\" type=\"checkbox\" label=\"Breadcrumb\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Console -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_console\">\n <cide-ele-input id=\"layout_console_status\" type=\"checkbox\" label=\"Console\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Request -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_request\">\n <cide-ele-input id=\"layout_request_status\" type=\"checkbox\" label=\"Request\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n </div>\n <p class=\"tw-text-xs tw-text-gray-500 tw-pt-1\">Toggle active sections. Only one theme can be selected as default. More options can be added here later.</p>\n </div>\n \n <!-- Drawer Configuration -->\n <div class=\"tw-space-y-2\">\n <div class=\"tw-flex tw-items-center tw-justify-between\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Drawers</div>\n <button cideEleButton type=\"button\" size=\"xs\" variant=\"outline\" (click)=\"addDrawer()\">\n Add Drawer\n </button>\n </div>\n\n <div formGroupName=\"sytm_layout\">\n <div class=\"tw-space-y-2\" formArrayName=\"sytm_layout_drawer\">\n <div *ngFor=\"let drawerGrp of drawerArray.controls; let i = index\" [formGroupName]=\"i\" class=\"tw-border tw-border-gray-200 tw-rounded-md tw-p-3 tw-flex tw-items-center tw-gap-3\">\n <cide-ele-input id=\"drawer_active_{{i}}\" type=\"checkbox\" label=\"Active\" size=\"sm\" formControlName=\"syth_status\"></cide-ele-input>\n <div class=\"tw-flex-1\">\n <cide-ele-select\n id=\"drawer_config_{{i}}\"\n label=\"Drawer For\"\n size=\"sm\"\n [options]=\"drawerConfigOptions\"\n formControlName=\"syth_config_syco_for\">\n </cide-ele-select>\n </div>\n <button cideEleButton type=\"button\" size=\"xs\" variant=\"ghost\" (click)=\"removeDrawer(i)\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">delete</cide-ele-icon>\n </button>\n </div>\n <p class=\"tw-text-xs tw-text-gray-500\">Configure multiple drawers as needed.</p>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-flex tw-flex-col tw-gap-2 tw-pt-4 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-items-center tw-justify-end tw-space-x-3\">\n <button cideEleButton type=\"button\" variant=\"outline\" (click)=\"cancelForm()\" [disabled]=\"loading()\">Cancel</button>\n <button cideEleButton type=\"submit\" variant=\"primary\" leftIcon=\"add\" [disabled]=\"!themeForm.valid || loading()\" [loading]=\"loading()\">\n {{ isEditMode() ? 'Update Theme' : 'Create Theme' }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- Right: Theme gallery (40%) -->\n <div class=\"tw-hidden lg:tw-flex tw-w-2/5 tw-flex-col\">\n <!-- (Header consolidated above) -->\n\n <!-- Gallery list -->\n <div class=\"tw-flex-1 tw-overflow-auto tw-bg-gray-50\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3 tw-p-4\">\n @for (theme of filteredThemes(); track theme._id) {\n <div class=\"tw-rounded-md tw-transition tw-cursor-pointer tw-relative\"\n [ngClass]=\"theme.sytm_isselected\n ? 'tw-border tw-border-blue-500 tw-ring-2 tw-ring-blue-200 tw-bg-blue-50/50'\n : 'tw-bg-white tw-border tw-border-gray-200 hover:tw-shadow-sm'\"\n (click)=\"editTheme(theme)\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-selected]=\"theme.sytm_isselected ? 'true' : 'false'\"\n [attr.aria-label]=\"'Edit theme ' + (theme.sytm_title || theme.sytm_theme_code)\"\n (keydown.enter)=\"editTheme(theme)\"\n (keydown.space)=\"$event.preventDefault(); editTheme(theme)\">\n\n <!-- Selected badge -->\n <div *ngIf=\"theme.sytm_isselected\"\n class=\"tw-absolute tw-top-2 tw-right-2 tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-rounded-full tw-bg-blue-600 tw-text-white\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">check</cide-ele-icon>\n </div>\n \n <div class=\"tw-aspect-[16/9] tw-bg-gray-100 tw-rounded-t-md tw-overflow-hidden tw-flex tw-items-center tw-justify-center\">\n @if (theme.sytm_preview_id_fm) {\n <img \n cideEleFileImage \n [fileId]=\"theme.sytm_preview_id_fm\" \n [altText]=\"'Theme Preview'\"\n class=\"tw-w-full tw-h-full tw-object-cover\" />\n } @else {\n <div class=\"tw-text-gray-400 tw-text-xs\">No preview</div>\n }\n </div>\n <div class=\"tw-p-3 tw-space-y-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"theme.sytm_title\">{{ theme.sytm_title || 'Untitled Theme' }}</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" [title]=\"theme.sytm_theme_code\">{{ theme.sytm_theme_code }}</div>\n <div class=\"tw-flex tw-items-center tw-justify-between tw-pt-1\">\n <span class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs\" [ngClass]=\"theme.sytm_isactive ? 'tw-text-green-700' : 'tw-text-red-700'\">\n <span class=\"tw-w-1.5 tw-h-1.5 tw-rounded-full\" [ngClass]=\"theme.sytm_isactive ? 'tw-bg-green-500' : 'tw-bg-red-500'\"></span>\n {{ theme.sytm_isactive ? 'Active' : 'Inactive' }}\n </span>\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n <!-- Set Selected Button - Clear and Simple -->\n @if (theme.sytm_isselected) {\n <span class=\"tw-inline-flex tw-items-center tw-gap-1 tw-px-2 tw-py-1 tw-bg-green-100 tw-text-green-800 tw-rounded-md tw-text-xs tw-font-medium\">\n <cide-ele-icon class=\"tw-w-3 tw-h-3\">check</cide-ele-icon>\n Selected\n </span>\n } @else {\n <button cideEleButton \n variant=\"outline\" \n size=\"xs\"\n (click)=\"$event.stopPropagation(); setSelectedTheme(theme)\"\n [attr.aria-label]=\"'Select ' + (theme.sytm_title || theme.sytm_theme_code) + ' theme'\"\n class=\"tw-text-xs\">\n Select\n </button>\n }\n <button cideEleButton variant=\"ghost\" size=\"xs\" (click)=\"$event.stopPropagation(); editTheme(theme)\"\n [attr.aria-label]=\"'Edit theme ' + (theme.sytm_title || theme.sytm_theme_code)\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">edit</cide-ele-icon>\n </button>\n <button cideEleButton variant=\"ghost\" size=\"xs\" (click)=\"$event.stopPropagation(); deleteTheme(theme)\"\n [attr.aria-label]=\"'Delete theme ' + (theme.sytm_title || theme.sytm_theme_code)\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">delete</cide-ele-icon>\n </button>\n </div>\n </div>\n </div>\n </div>\n }\n\n @if (!loading() && filteredThemes().length === 0) {\n <div class=\"tw-col-span-full tw-text-center tw-text-xs tw-text-gray-500 tw-py-8\">No themes found</div>\n }\n </div>\n </div>\n </div>\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<!-- Theme Details Renderer Template -->\n<ng-template #themeDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Theme Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon \n class=\"tw-text-purple-600\" \n size=\"xs\">\n palette\n </cide-ele-icon>\n </div>\n \n <!-- Theme Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.sytm_title\">\n {{ row.sytm_title || 'Untitled' }}\n </div>\n @if (row.sytm_desc) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.sytm_desc\">\n {{ row.sytm_desc }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Theme Status Renderer Template -->\n<ng-template #themeStatusRendererTemplate 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]=\"row.sytm_isactive ? 'tw-bg-green-100 tw-text-green-800' : 'tw-bg-red-100 tw-text-red-800'\">\n {{ row.sytm_isactive ? 'Active' : 'Inactive' }}\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]=\"getActionDropdownItems(row)\"\n [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template> ", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: "ngmodule", type: FormsModule }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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", "step", "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", "treeView"], 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"] }, { kind: "component", type: CideEleJsonEditorComponent, selector: "cide-ele-json-editor", inputs: ["label", "helperText", "required", "disabled", "showCharacterCount", "config"], outputs: ["valueChange", "objectChange", "errorsChange", "validChange"] }, { kind: "component", type: CideEleFileInputComponent, selector: "cide-ele-file-input", inputs: ["label", "accept", "multiple", "disabled", "required", "helperText", "errorText", "showPreview", "previewWidth", "previewHeight", "previewBoxMode", "showFileName", "placeholderText", "placeholderIcon", "autoUpload", "uploadData", "showFloatingUploader", "floatingUploaderGroupId"], outputs: ["fileChange", "uploadSuccess", "uploadError", "uploadProgressChange"] }, { kind: "directive", type: CideEleFileImageDirective, selector: "[cideEleFileImage]", inputs: ["fileId", "altText"] }] });
|
|
7265
7311
|
}
|
|
7266
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
7312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageThemeComponent, decorators: [{
|
|
7267
7313
|
type: Component,
|
|
7268
7314
|
args: [{ selector: 'cide-core-page-theme', standalone: true, imports: [
|
|
7269
7315
|
CommonModule,
|
|
@@ -7279,7 +7325,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
7279
7325
|
CideEleFileInputComponent,
|
|
7280
7326
|
CideEleFileImageDirective,
|
|
7281
7327
|
], template: "<!-- Page Theme Container -->\n<div class=\"tw-flex tw-h-full tw-w-full\">\n \n <!-- Left: Form and header (60%) -->\n <div class=\"tw-w-full lg:tw-w-3/5 tw-flex tw-flex-col tw-border-r tw-border-gray-200\">\n\n <!-- Header Section -->\n <div class=\"tw-px-6 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 and Back Button -->\n <div class=\"tw-flex tw-items-center tw-space-x-4\">\n <button cideEleButton variant=\"ghost\" size=\"sm\" (click)=\"goBack();\" class=\"tw-text-gray-600 hover:tw-text-gray-900\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">arrow_back</cide-ele-icon>\n </button>\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\">palette</cide-ele-icon>\n <div>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Theme Management</h5>\n <p class=\"tw-text-sm tw-text-gray-500 tw-m-0\">Page: {{ pageTitle() }}</p>\n </div>\n </div>\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\n <!-- Quick Add/Edit Form Section -->\n <div class=\"tw-px-6 tw-py-3 tw-bg-white tw-overflow-auto\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-2\">\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 Theme' : 'Quick Add Theme' }}</h6>\n </div>\n </div>\n\n <!-- Form (kept as-is) -->\n <form [formGroup]=\"themeForm\" (ngSubmit)=\"saveTheme()\" class=\"tw-space-y-4\">\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-[1fr_200px] tw-gap-4\">\n <!-- Left Side: All Input Fields -->\n <div class=\"tw-space-y-4\">\n <!-- Row 1: Theme Title and Theme Code -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-4\">\n <div class=\"tw-space-y-2\">\n <cide-ele-input id=\"sytm_title\" formControlName=\"sytm_title\" placeholder=\"Enter theme title\" label=\"Theme Title\" size=\"sm\"></cide-ele-input>\n </div>\n <div class=\"tw-space-y-2\">\n <cide-ele-input id=\"sytm_theme_code\" formControlName=\"sytm_theme_code\" placeholder=\"Enter theme code\" label=\"Theme Code\" size=\"sm\"></cide-ele-input>\n </div>\n </div>\n \n <!-- Row 2: Sub Title and Active Status -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-4\">\n <div class=\"tw-space-y-2\">\n <cide-ele-input id=\"sytm_sub_title\" formControlName=\"sytm_sub_title\" placeholder=\"Enter sub title\" label=\"Sub Title\" size=\"sm\"></cide-ele-input>\n </div>\n <div class=\"tw-space-y-2 tw-flex tw-items-center\">\n <cide-ele-input\n id=\"sytm_isactive_cb\"\n type=\"checkbox\"\n label=\"Active\"\n size=\"sm\"\n formControlName=\"sytm_isactive\">\n </cide-ele-input>\n </div>\n </div>\n \n <!-- Row 3: Description -->\n <div class=\"tw-space-y-2\">\n <cide-ele-textarea id=\"sytm_desc\" formControlName=\"sytm_desc\" placeholder=\"Enter theme description\" rows=\"2\" label=\"Description\" size=\"sm\"></cide-ele-textarea>\n </div>\n </div>\n \n <!-- Right Side: File Upload -->\n <div class=\"tw-flex tw-flex-col tw-justify-start tw-items-center tw-p-0\">\n <cide-ele-file-input \n id=\"sytm_preview_id_fm\" \n formControlName=\"sytm_preview_id_fm\"\n accept=\"image/*\"\n [showPreview]=\"true\"\n [previewBoxMode]=\"true\"\n [showFileName]=\"false\"\n previewWidth=\"180px\"\n previewHeight=\"120px\"\n placeholderText=\"Upload Preview Image\"\n placeholderIcon=\"image\"\n [autoUpload]=\"true\"\n [uploadData]=\"getPreviewImageUploadData()\"\n (uploadSuccess)=\"onPreviewImageUploadSuccess($event)\"\n (uploadError)=\"onPreviewImageUploadError($event)\"\n (uploadProgressChange)=\"onPreviewImageUploadProgress($event)\">\n </cide-ele-file-input>\n </div>\n </div>\n \n <!-- Configuration JSON -->\n <div class=\"tw-space-y-2\">\n <cide-ele-json-editor label=\"Configuration JSON\" formControlName=\"sytm_configuration\" [required]=\"true\" [config]=\"{\n showLineNumbers: true,\n autoFormat: true,\n validateOnChange: true,\n minHeight: 150,\n maxHeight: 300,\n placeholder: 'Enter theme configuration JSON...'\n }\" helperText=\"Enter valid JSON configuration for the theme\"></cide-ele-json-editor>\n </div>\n <!-- Layout Configuration + Selection -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-6\">\n <div class=\"tw-space-y-2\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Layout & Selection</div>\n <!-- Selected toggle -->\n <div class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-md tw-px-3 tw-py-2\">\n <cide-ele-input\n id=\"sytm_isselected\"\n type=\"checkbox\"\n label=\"Selected (Default)\"\n size=\"sm\"\n formControlName=\"sytm_isselected\">\n </cide-ele-input>\n </div>\n <div formGroupName=\"sytm_layout\" class=\"tw-bg-white tw-border tw-border-gray-200 tw-rounded-md tw-divide-y tw-overflow-hidden\">\n <!-- Sidebar -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_sidebar\">\n <cide-ele-input id=\"layout_sidebar_status\" type=\"checkbox\" label=\"Sidebar\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Header -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_header\">\n <cide-ele-input id=\"layout_header_status\" type=\"checkbox\" label=\"Header\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Footer -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_footer\">\n <cide-ele-input id=\"layout_footer_status\" type=\"checkbox\" label=\"Footer\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Breadcrumb -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_breadcrumb\">\n <cide-ele-input id=\"layout_breadcrumb_status\" type=\"checkbox\" label=\"Breadcrumb\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Console -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_console\">\n <cide-ele-input id=\"layout_console_status\" type=\"checkbox\" label=\"Console\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n <!-- Request -->\n <div class=\"tw-px-3 tw-py-2\" formGroupName=\"sytm_layout_request\">\n <cide-ele-input id=\"layout_request_status\" type=\"checkbox\" label=\"Request\" size=\"sm\" formControlName=\"status\"></cide-ele-input>\n </div>\n </div>\n <p class=\"tw-text-xs tw-text-gray-500 tw-pt-1\">Toggle active sections. Only one theme can be selected as default. More options can be added here later.</p>\n </div>\n \n <!-- Drawer Configuration -->\n <div class=\"tw-space-y-2\">\n <div class=\"tw-flex tw-items-center tw-justify-between\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Drawers</div>\n <button cideEleButton type=\"button\" size=\"xs\" variant=\"outline\" (click)=\"addDrawer()\">\n Add Drawer\n </button>\n </div>\n\n <div formGroupName=\"sytm_layout\">\n <div class=\"tw-space-y-2\" formArrayName=\"sytm_layout_drawer\">\n <div *ngFor=\"let drawerGrp of drawerArray.controls; let i = index\" [formGroupName]=\"i\" class=\"tw-border tw-border-gray-200 tw-rounded-md tw-p-3 tw-flex tw-items-center tw-gap-3\">\n <cide-ele-input id=\"drawer_active_{{i}}\" type=\"checkbox\" label=\"Active\" size=\"sm\" formControlName=\"syth_status\"></cide-ele-input>\n <div class=\"tw-flex-1\">\n <cide-ele-select\n id=\"drawer_config_{{i}}\"\n label=\"Drawer For\"\n size=\"sm\"\n [options]=\"drawerConfigOptions\"\n formControlName=\"syth_config_syco_for\">\n </cide-ele-select>\n </div>\n <button cideEleButton type=\"button\" size=\"xs\" variant=\"ghost\" (click)=\"removeDrawer(i)\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">delete</cide-ele-icon>\n </button>\n </div>\n <p class=\"tw-text-xs tw-text-gray-500\">Configure multiple drawers as needed.</p>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-flex tw-flex-col tw-gap-2 tw-pt-4 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-items-center tw-justify-end tw-space-x-3\">\n <button cideEleButton type=\"button\" variant=\"outline\" (click)=\"cancelForm()\" [disabled]=\"loading()\">Cancel</button>\n <button cideEleButton type=\"submit\" variant=\"primary\" leftIcon=\"add\" [disabled]=\"!themeForm.valid || loading()\" [loading]=\"loading()\">\n {{ isEditMode() ? 'Update Theme' : 'Create Theme' }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </div>\n\n <!-- Right: Theme gallery (40%) -->\n <div class=\"tw-hidden lg:tw-flex tw-w-2/5 tw-flex-col\">\n <!-- (Header consolidated above) -->\n\n <!-- Gallery list -->\n <div class=\"tw-flex-1 tw-overflow-auto tw-bg-gray-50\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3 tw-p-4\">\n @for (theme of filteredThemes(); track theme._id) {\n <div class=\"tw-rounded-md tw-transition tw-cursor-pointer tw-relative\"\n [ngClass]=\"theme.sytm_isselected\n ? 'tw-border tw-border-blue-500 tw-ring-2 tw-ring-blue-200 tw-bg-blue-50/50'\n : 'tw-bg-white tw-border tw-border-gray-200 hover:tw-shadow-sm'\"\n (click)=\"editTheme(theme)\"\n role=\"button\"\n tabindex=\"0\"\n [attr.aria-selected]=\"theme.sytm_isselected ? 'true' : 'false'\"\n [attr.aria-label]=\"'Edit theme ' + (theme.sytm_title || theme.sytm_theme_code)\"\n (keydown.enter)=\"editTheme(theme)\"\n (keydown.space)=\"$event.preventDefault(); editTheme(theme)\">\n\n <!-- Selected badge -->\n <div *ngIf=\"theme.sytm_isselected\"\n class=\"tw-absolute tw-top-2 tw-right-2 tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-rounded-full tw-bg-blue-600 tw-text-white\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">check</cide-ele-icon>\n </div>\n \n <div class=\"tw-aspect-[16/9] tw-bg-gray-100 tw-rounded-t-md tw-overflow-hidden tw-flex tw-items-center tw-justify-center\">\n @if (theme.sytm_preview_id_fm) {\n <img \n cideEleFileImage \n [fileId]=\"theme.sytm_preview_id_fm\" \n [altText]=\"'Theme Preview'\"\n class=\"tw-w-full tw-h-full tw-object-cover\" />\n } @else {\n <div class=\"tw-text-gray-400 tw-text-xs\">No preview</div>\n }\n </div>\n <div class=\"tw-p-3 tw-space-y-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"theme.sytm_title\">{{ theme.sytm_title || 'Untitled Theme' }}</div>\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" [title]=\"theme.sytm_theme_code\">{{ theme.sytm_theme_code }}</div>\n <div class=\"tw-flex tw-items-center tw-justify-between tw-pt-1\">\n <span class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs\" [ngClass]=\"theme.sytm_isactive ? 'tw-text-green-700' : 'tw-text-red-700'\">\n <span class=\"tw-w-1.5 tw-h-1.5 tw-rounded-full\" [ngClass]=\"theme.sytm_isactive ? 'tw-bg-green-500' : 'tw-bg-red-500'\"></span>\n {{ theme.sytm_isactive ? 'Active' : 'Inactive' }}\n </span>\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n <!-- Set Selected Button - Clear and Simple -->\n @if (theme.sytm_isselected) {\n <span class=\"tw-inline-flex tw-items-center tw-gap-1 tw-px-2 tw-py-1 tw-bg-green-100 tw-text-green-800 tw-rounded-md tw-text-xs tw-font-medium\">\n <cide-ele-icon class=\"tw-w-3 tw-h-3\">check</cide-ele-icon>\n Selected\n </span>\n } @else {\n <button cideEleButton \n variant=\"outline\" \n size=\"xs\"\n (click)=\"$event.stopPropagation(); setSelectedTheme(theme)\"\n [attr.aria-label]=\"'Select ' + (theme.sytm_title || theme.sytm_theme_code) + ' theme'\"\n class=\"tw-text-xs\">\n Select\n </button>\n }\n <button cideEleButton variant=\"ghost\" size=\"xs\" (click)=\"$event.stopPropagation(); editTheme(theme)\"\n [attr.aria-label]=\"'Edit theme ' + (theme.sytm_title || theme.sytm_theme_code)\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">edit</cide-ele-icon>\n </button>\n <button cideEleButton variant=\"ghost\" size=\"xs\" (click)=\"$event.stopPropagation(); deleteTheme(theme)\"\n [attr.aria-label]=\"'Delete theme ' + (theme.sytm_title || theme.sytm_theme_code)\">\n <cide-ele-icon class=\"tw-w-4 tw-h-4\">delete</cide-ele-icon>\n </button>\n </div>\n </div>\n </div>\n </div>\n }\n\n @if (!loading() && filteredThemes().length === 0) {\n <div class=\"tw-col-span-full tw-text-center tw-text-xs tw-text-gray-500 tw-py-8\">No themes found</div>\n }\n </div>\n </div>\n </div>\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<!-- Theme Details Renderer Template -->\n<ng-template #themeDetailsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-items-center tw-min-w-0\">\n <!-- Theme Icon -->\n <div class=\"tw-flex-shrink-0\">\n <cide-ele-icon \n class=\"tw-text-purple-600\" \n size=\"xs\">\n palette\n </cide-ele-icon>\n </div>\n \n <!-- Theme Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.sytm_title\">\n {{ row.sytm_title || 'Untitled' }}\n </div>\n @if (row.sytm_desc) {\n <div class=\"tw-text-xs tw-text-gray-500 tw-truncate\" \n [title]=\"row.sytm_desc\">\n {{ row.sytm_desc }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n<!-- Theme Status Renderer Template -->\n<ng-template #themeStatusRendererTemplate 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]=\"row.sytm_isactive ? 'tw-bg-green-100 tw-text-green-800' : 'tw-bg-red-100 tw-text-red-800'\">\n {{ row.sytm_isactive ? 'Active' : 'Inactive' }}\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]=\"getActionDropdownItems(row)\"\n [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template> " }]
|
|
7282
|
-
}] });
|
|
7328
|
+
}], propDecorators: { themeDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['themeDetailsRendererTemplate', { isSignal: true }] }], themeStatusRendererTemplate: [{ type: i0.ViewChild, args: ['themeStatusRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
7283
7329
|
|
|
7284
7330
|
var pageTheme_component = /*#__PURE__*/Object.freeze({
|
|
7285
7331
|
__proto__: null,
|
|
@@ -7407,10 +7453,10 @@ class CideCorePageControlsService {
|
|
|
7407
7453
|
console.error('Page Controls Service Error:', errorMessage);
|
|
7408
7454
|
return throwError(() => new Error(errorMessage));
|
|
7409
7455
|
}
|
|
7410
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
7411
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
7456
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageControlsService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
7457
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageControlsService, providedIn: 'root' });
|
|
7412
7458
|
}
|
|
7413
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
7459
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageControlsService, decorators: [{
|
|
7414
7460
|
type: Injectable,
|
|
7415
7461
|
args: [{
|
|
7416
7462
|
providedIn: 'root'
|
|
@@ -7869,10 +7915,10 @@ class CideCorePageControlsComponent {
|
|
|
7869
7915
|
trackByControlId(index, control) {
|
|
7870
7916
|
return control._id || '';
|
|
7871
7917
|
}
|
|
7872
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
7873
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CideCorePageControlsComponent, isStandalone: true, selector: "cide-core-page-controls", ngImport: i0, template: "<!-- Page Controls Container -->\r\n<div class=\"tw-flex tw-flex-col tw-h-full tw-bg-gray-50\">\r\n <!-- Header Section -->\r\n <div class=\"tw-bg-white tw-border-b tw-border-gray-200 tw-px-6 tw-py-4\">\r\n <div class=\"tw-flex tw-items-center tw-justify-between\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-4\">\r\n <button \r\n cideEleButton\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n (click)=\"goBack()\"\r\n class=\"tw-flex tw-items-center tw-justify-center tw-w-8 tw-h-8 tw-text-gray-600 hover:tw-text-gray-900 hover:tw-bg-gray-100 tw-rounded-md tw-transition-colors\">\r\n <cide-ele-icon>arrow_back</cide-ele-icon>\r\n </button>\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n <cide-ele-icon class=\"tw-text-blue-600 tw-text-xl\">settings</cide-ele-icon>\r\n <div>\r\n <h1 class=\"tw-text-xl tw-font-semibold tw-text-gray-900 tw-mb-0\">Control Management</h1>\r\n <p class=\"tw-text-sm tw-text-gray-500 tw-mb-0\">Page: {{ pageTitle() }}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Error Message -->\r\n <div class=\"tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md tw-p-4 tw-mx-6 tw-mt-4 tw-flex tw-items-start tw-space-x-3\" *ngIf=\"error()\">\r\n <cide-ele-icon class=\"tw-text-red-500 tw-flex-shrink-0 tw-mt-0.5\">error</cide-ele-icon>\r\n <div>\r\n <h3 class=\"tw-text-red-800 tw-font-medium tw-mb-1\">Error</h3>\r\n <p class=\"tw-text-red-700 tw-text-sm tw-mb-0\">{{ error() }}</p>\r\n </div>\r\n </div>\r\n\r\n <!-- Main Content Area -->\r\n <div class=\"tw-flex tw-flex-1 tw-gap-6 tw-p-6 tw-overflow-hidden lg:tw-flex-row tw-flex-col\">\r\n <!-- Form Section -->\r\n <div class=\"tw-w-full lg:tw-w-3/5 tw-bg-white tw-rounded-lg tw-border tw-border-gray-200 tw-shadow-sm tw-flex tw-flex-col\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-p-6 tw-border-b tw-border-gray-200\">\r\n <cide-ele-icon class=\"tw-text-blue-600\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\r\n <h3 class=\"tw-text-lg tw-font-medium tw-text-gray-900 tw-mb-0\">{{ isEditMode() ? 'Edit Control' : 'Quick Add Control' }}</h3>\r\n </div>\r\n\r\n <!-- Form -->\r\n <form [formGroup]=\"controlForm\" (ngSubmit)=\"saveControl()\" class=\"tw-flex tw-flex-col tw-flex-1 tw-p-6 tw-overflow-y-auto\">\r\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-4 tw-mb-6\">\r\n \r\n <!-- Basic Information Section -->\r\n <!-- Control Key -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_key\"\r\n formControlName=\"sype_key\"\r\n placeholder=\"Enter control key\"\r\n label=\"Control Key\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Control Label -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_label\"\r\n formControlName=\"sype_label\"\r\n placeholder=\"Enter control label\"\r\n label=\"Control Label\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Control Type -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-select\r\n id=\"sype_type\"\r\n formControlName=\"sype_type\"\r\n [options]=\"[\r\n { value: 'text', label: 'Text Input' },\r\n { value: 'textarea', label: 'Text Area' },\r\n { value: 'select', label: 'Select' },\r\n { value: 'checkbox', label: 'Checkbox' },\r\n { value: 'radio', label: 'Radio' },\r\n { value: 'date', label: 'Date' },\r\n { value: 'number', label: 'Number' },\r\n { value: 'email', label: 'Email' },\r\n { value: 'password', label: 'Password' },\r\n { value: 'file', label: 'File Upload' }\r\n ]\"\r\n label=\"Control Type\"\r\n size=\"sm\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Status - Checkbox aligned properly -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_isactive\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_isactive\"\r\n label=\"Active Status\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Placeholder -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_placeholder\"\r\n formControlName=\"sype_placeholder\"\r\n placeholder=\"Enter placeholder text\"\r\n label=\"Placeholder\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Auto Complete - Checkbox aligned properly -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_auto_complete\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_auto_complete\"\r\n label=\"Auto Complete\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Tooltip -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_tooltip\"\r\n formControlName=\"sype_tooltip\"\r\n placeholder=\"Enter tooltip text\"\r\n label=\"Tooltip\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Validation & Sizing Section -->\r\n <!-- Min/Max Length - Side by side -->\r\n <div class=\"tw-col-span-2 tw-flex tw-gap-4\">\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_min_length\"\r\n type=\"number\"\r\n formControlName=\"sype_min_length\"\r\n placeholder=\"0\"\r\n label=\"Min Length\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_max_length\"\r\n type=\"number\"\r\n formControlName=\"sype_max_length\"\r\n placeholder=\"20\"\r\n label=\"Max Length\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n\r\n <!-- Size & Label Placement - Side by side -->\r\n <div class=\"tw-col-span-2 tw-flex tw-gap-4\">\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-select\r\n id=\"sype_size\"\r\n formControlName=\"sype_size\"\r\n label=\"Size\"\r\n size=\"xs\"\r\n [options]=\"[\r\n { value: 'xs', label: 'XS' },\r\n { value: 'sm', label: 'SM' },\r\n { value: 'md', label: 'MD' },\r\n { value: 'lg', label: 'LG' },\r\n { value: 'xl', label: 'XL' },\r\n { value: 'xxl', label: 'XXL' }\r\n ]\">\r\n </cide-ele-select>\r\n </div>\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-select\r\n id=\"sype_label_placement\"\r\n formControlName=\"sype_label_placement\"\r\n label=\"Label Placement\"\r\n size=\"xs\"\r\n [options]=\"[\r\n { value: 'left', label: 'Left' },\r\n { value: 'floating', label: 'Floating' },\r\n { value: 'fixed', label: 'Fixed' }\r\n ]\">\r\n </cide-ele-select>\r\n </div>\r\n </div>\r\n\r\n <!-- Width & Height - Side by side -->\r\n <div class=\"tw-col-span-2 tw-flex tw-gap-4\">\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_width\"\r\n type=\"text\"\r\n formControlName=\"sype_width\"\r\n placeholder=\"20px\"\r\n label=\"Width\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_height\"\r\n type=\"text\"\r\n formControlName=\"sype_height\"\r\n placeholder=\"20px\"\r\n label=\"Height\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n\r\n <!-- Leading Icon -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_leading_icon\"\r\n formControlName=\"sype_leading_icon\"\r\n placeholder=\"Enter icon name\"\r\n label=\"Leading Icon\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Default Value -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_default\"\r\n formControlName=\"sype_default\"\r\n placeholder=\"Enter default value\"\r\n label=\"Default Value\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Regex Pattern -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_regex\"\r\n formControlName=\"sype_regex\"\r\n placeholder=\"Enter regex pattern\"\r\n label=\"Regex Pattern\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Option Key -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_option_key\"\r\n formControlName=\"sype_option_key\"\r\n placeholder=\"Enter option key\"\r\n label=\"Option Key\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Entity ID (Auto-assigned from AppState) - Hidden -->\r\n <div class=\"tw-space-y-1\" style=\"display: none;\">\r\n <cide-ele-input\r\n id=\"sype_entity_id_syen\"\r\n formControlName=\"sype_entity_id_syen\"\r\n placeholder=\"Auto-assigned from system\"\r\n label=\"Entity ID (Auto-assigned)\"\r\n size=\"sm\"\r\n readonly>\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Control Options -->\r\n <div class=\"tw-col-span-2 tw-space-y-1\">\r\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-mb-3\">Control Options</h6>\r\n <div class=\"tw-grid tw-grid-cols-1 sm:tw-grid-cols-2 lg:tw-grid-cols-3 tw-gap-3\">\r\n \r\n <!-- Required -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input\r\n id=\"sype_required\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_required\"\r\n label=\"Required\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Disabled -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input\r\n id=\"sype_disabled\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_disabled\"\r\n label=\"Disabled\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Hide Label -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input\r\n id=\"sype_label_hide\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_label_hide\"\r\n label=\"Hide Label\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Hide Helper Text -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input\r\n id=\"sype_hide_helper_and_error_text\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_hide_helper_and_error_text\"\r\n label=\"Hide Helper Text\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Helper Text Collapse -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input\r\n id=\"sype_helper_text_collapse\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_helper_text_collapse\"\r\n label=\"Collapse Helper\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- Form Actions -->\r\n <div class=\"tw-flex tw-justify-between tw-items-center tw-pt-4 tw-border-t tw-border-gray-200 tw-mt-auto\">\r\n <!-- Error Message (Left Side) -->\r\n <cide-form-field-error [formGroup]=\"controlForm\"></cide-form-field-error>\r\n \r\n <!-- Action Buttons (Right Side) -->\r\n <div class=\"tw-flex tw-gap-3\">\r\n <button \r\n cideEleButton\r\n type=\"button\"\r\n variant=\"outline\"\r\n (click)=\"cancelForm()\"\r\n [disabled]=\"loading()\">\r\n Cancel\r\n </button>\r\n <button \r\n cideEleButton\r\n type=\"submit\"\r\n variant=\"primary\"\r\n [disabled]=\"loading()\">\r\n {{ isEditMode() ? 'Update Control' : 'Create Control' }}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n <!-- Controls List Section -->\r\n <div class=\"tw-w-full lg:tw-w-2/5 tw-bg-white tw-rounded-lg tw-border tw-border-gray-200 tw-shadow-sm tw-flex tw-flex-col lg:tw-max-h-none tw-max-h-96\">\r\n <div class=\"tw-p-6 tw-border-b tw-border-gray-200\">\r\n <h3 class=\"tw-text-lg tw-font-medium tw-text-gray-900 tw-mb-1\">Page Controls</h3>\r\n <p class=\"tw-text-sm tw-text-gray-500 tw-mb-0\">Controls connected to this page</p>\r\n </div>\r\n \r\n <div class=\"tw-flex-1 tw-overflow-y-auto tw-p-4\" *ngIf=\"!loading() && controls().length > 0\">\r\n <div \r\n class=\"tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg tw-p-4 tw-mb-3 tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-shadow-md hover:tw-border-gray-300 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-ring-offset-2\" \r\n *ngFor=\"let control of controls(); trackBy: trackByControlId\"\r\n [class.tw-bg-blue-50]=\"selectedControlId() === control._id\"\r\n [class.tw-border-blue-300]=\"selectedControlId() === control._id\"\r\n [class.tw-shadow-md]=\"selectedControlId() === control._id\"\r\n (click)=\"selectControl(control)\"\r\n (keyup.enter)=\"selectControl(control)\"\r\n (keyup.space)=\"selectControl(control)\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Select control ' + (control.sype_label || control.sype_key)\">\r\n <div class=\"tw-flex tw-items-start tw-space-x-3\">\r\n <div class=\"tw-flex-shrink-0 tw-w-10 tw-h-10 tw-bg-blue-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\r\n <cide-ele-icon class=\"tw-text-blue-600\">settings_input_component</cide-ele-icon>\r\n </div>\r\n <div class=\"tw-flex-1 tw-min-w-0\">\r\n <h4 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-mb-1 tw-truncate\">{{ control.sype_label || control.sype_key }}</h4>\r\n <p class=\"tw-text-xs tw-text-gray-500 tw-mb-2 tw-truncate\">{{ control.sype_tooltip || 'No tooltip' }}</p>\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-gray-100 tw-text-gray-800\">{{ control.sype_type }}</span>\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium\" \r\n [class.tw-bg-red-100]=\"!control.sype_isactive\"\r\n [class.tw-text-red-800]=\"!control.sype_isactive\"\r\n [class.tw-bg-green-100]=\"control.sype_isactive\"\r\n [class.tw-text-green-800]=\"control.sype_isactive\">\r\n {{ control.sype_isactive ? 'Active' : 'Inactive' }}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"tw-flex tw-items-center tw-space-x-1 tw-opacity-0 tw-transition-opacity tw-duration-200 group-hover:tw-opacity-100\" \r\n [class.tw-opacity-100]=\"selectedControlId() === control._id\">\r\n <button \r\n cideEleButton\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n (click)=\"editControl(control); $event.stopPropagation()\">\r\n <cide-ele-icon>edit</cide-ele-icon>\r\n </button>\r\n <button \r\n cideEleButton\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n (click)=\"deleteControl(control); $event.stopPropagation()\">\r\n <cide-ele-icon>delete</cide-ele-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"tw-flex tw-flex-col tw-items-center tw-justify-center tw-py-12 tw-text-center\" *ngIf=\"!loading() && controls().length === 0\">\r\n <cide-ele-icon class=\"tw-text-4xl tw-text-gray-300 tw-mb-4\">settings_input_component</cide-ele-icon>\r\n <p class=\"tw-text-gray-500 tw-font-medium tw-mb-1\">No controls available</p>\r\n <small class=\"tw-text-gray-400\">Create controls using the form on the left</small>\r\n </div>\r\n\r\n <div class=\"tw-flex tw-flex-col tw-items-center tw-justify-center tw-py-12 tw-text-center\" *ngIf=\"loading()\">\r\n <cide-ele-icon class=\"tw-text-2xl tw-text-blue-500 tw-mb-4 tw-animate-spin\">refresh</cide-ele-icon>\r\n <p class=\"tw-text-gray-500\">Loading controls...</p>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n ", styles: [".checkbox-field{margin:.25rem 0}.checkbox-label{display:flex;flex-direction:column;gap:.25rem;cursor:pointer;padding:.75rem 0;background:transparent;border:none;border-radius:0;transition:all .2s ease}.checkbox-label:hover{background:#667eea05}.checkbox-label .checkbox-input{width:1rem;height:1rem;accent-color:#667eea;border-radius:3px;margin-bottom:.125rem}.checkbox-label .checkbox-text{font-weight:600;color:#374151;font-size:.875rem}.checkbox-label .checkbox-description{font-size:.75rem;color:#6b7280;margin-top:.125rem}@media (max-width: 640px){.main-content{padding:1rem;gap:1rem}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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", "step", "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", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
7918
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageControlsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
7919
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CideCorePageControlsComponent, isStandalone: true, selector: "cide-core-page-controls", ngImport: i0, template: "<!-- Page Controls Container -->\r\n<div class=\"tw-flex tw-flex-col tw-h-full tw-bg-gray-50\">\r\n <!-- Header Section -->\r\n <div class=\"tw-bg-white tw-border-b tw-border-gray-200 tw-px-6 tw-py-4\">\r\n <div class=\"tw-flex tw-items-center tw-justify-between\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-4\">\r\n <button \r\n cideEleButton\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n (click)=\"goBack()\"\r\n class=\"tw-flex tw-items-center tw-justify-center tw-w-8 tw-h-8 tw-text-gray-600 hover:tw-text-gray-900 hover:tw-bg-gray-100 tw-rounded-md tw-transition-colors\">\r\n <cide-ele-icon>arrow_back</cide-ele-icon>\r\n </button>\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n <cide-ele-icon class=\"tw-text-blue-600 tw-text-xl\">settings</cide-ele-icon>\r\n <div>\r\n <h1 class=\"tw-text-xl tw-font-semibold tw-text-gray-900 tw-mb-0\">Control Management</h1>\r\n <p class=\"tw-text-sm tw-text-gray-500 tw-mb-0\">Page: {{ pageTitle() }}</p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Error Message -->\r\n <div class=\"tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md tw-p-4 tw-mx-6 tw-mt-4 tw-flex tw-items-start tw-space-x-3\" *ngIf=\"error()\">\r\n <cide-ele-icon class=\"tw-text-red-500 tw-flex-shrink-0 tw-mt-0.5\">error</cide-ele-icon>\r\n <div>\r\n <h3 class=\"tw-text-red-800 tw-font-medium tw-mb-1\">Error</h3>\r\n <p class=\"tw-text-red-700 tw-text-sm tw-mb-0\">{{ error() }}</p>\r\n </div>\r\n </div>\r\n\r\n <!-- Main Content Area -->\r\n <div class=\"tw-flex tw-flex-1 tw-gap-6 tw-p-6 tw-overflow-hidden lg:tw-flex-row tw-flex-col\">\r\n <!-- Form Section -->\r\n <div class=\"tw-w-full lg:tw-w-3/5 tw-bg-white tw-rounded-lg tw-border tw-border-gray-200 tw-shadow-sm tw-flex tw-flex-col\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-p-6 tw-border-b tw-border-gray-200\">\r\n <cide-ele-icon class=\"tw-text-blue-600\">{{ isEditMode() ? 'edit' : 'add' }}</cide-ele-icon>\r\n <h3 class=\"tw-text-lg tw-font-medium tw-text-gray-900 tw-mb-0\">{{ isEditMode() ? 'Edit Control' : 'Quick Add Control' }}</h3>\r\n </div>\r\n\r\n <!-- Form -->\r\n <form [formGroup]=\"controlForm\" (ngSubmit)=\"saveControl()\" class=\"tw-flex tw-flex-col tw-flex-1 tw-p-6 tw-overflow-y-auto\">\r\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-4 tw-mb-6\">\r\n \r\n <!-- Basic Information Section -->\r\n <!-- Control Key -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_key\"\r\n formControlName=\"sype_key\"\r\n placeholder=\"Enter control key\"\r\n label=\"Control Key\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Control Label -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_label\"\r\n formControlName=\"sype_label\"\r\n placeholder=\"Enter control label\"\r\n label=\"Control Label\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Control Type -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-select\r\n id=\"sype_type\"\r\n formControlName=\"sype_type\"\r\n [options]=\"[\r\n { value: 'text', label: 'Text Input' },\r\n { value: 'textarea', label: 'Text Area' },\r\n { value: 'select', label: 'Select' },\r\n { value: 'checkbox', label: 'Checkbox' },\r\n { value: 'radio', label: 'Radio' },\r\n { value: 'date', label: 'Date' },\r\n { value: 'number', label: 'Number' },\r\n { value: 'email', label: 'Email' },\r\n { value: 'password', label: 'Password' },\r\n { value: 'file', label: 'File Upload' }\r\n ]\"\r\n label=\"Control Type\"\r\n size=\"sm\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Status - Checkbox aligned properly -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_isactive\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_isactive\"\r\n label=\"Active Status\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Placeholder -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_placeholder\"\r\n formControlName=\"sype_placeholder\"\r\n placeholder=\"Enter placeholder text\"\r\n label=\"Placeholder\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Auto Complete - Checkbox aligned properly -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_auto_complete\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_auto_complete\"\r\n label=\"Auto Complete\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Tooltip -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_tooltip\"\r\n formControlName=\"sype_tooltip\"\r\n placeholder=\"Enter tooltip text\"\r\n label=\"Tooltip\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Validation & Sizing Section -->\r\n <!-- Min/Max Length - Side by side -->\r\n <div class=\"tw-col-span-2 tw-flex tw-gap-4\">\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_min_length\"\r\n type=\"number\"\r\n formControlName=\"sype_min_length\"\r\n placeholder=\"0\"\r\n label=\"Min Length\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_max_length\"\r\n type=\"number\"\r\n formControlName=\"sype_max_length\"\r\n placeholder=\"20\"\r\n label=\"Max Length\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n\r\n <!-- Size & Label Placement - Side by side -->\r\n <div class=\"tw-col-span-2 tw-flex tw-gap-4\">\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-select\r\n id=\"sype_size\"\r\n formControlName=\"sype_size\"\r\n label=\"Size\"\r\n size=\"xs\"\r\n [options]=\"[\r\n { value: 'xs', label: 'XS' },\r\n { value: 'sm', label: 'SM' },\r\n { value: 'md', label: 'MD' },\r\n { value: 'lg', label: 'LG' },\r\n { value: 'xl', label: 'XL' },\r\n { value: 'xxl', label: 'XXL' }\r\n ]\">\r\n </cide-ele-select>\r\n </div>\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-select\r\n id=\"sype_label_placement\"\r\n formControlName=\"sype_label_placement\"\r\n label=\"Label Placement\"\r\n size=\"xs\"\r\n [options]=\"[\r\n { value: 'left', label: 'Left' },\r\n { value: 'floating', label: 'Floating' },\r\n { value: 'fixed', label: 'Fixed' }\r\n ]\">\r\n </cide-ele-select>\r\n </div>\r\n </div>\r\n\r\n <!-- Width & Height - Side by side -->\r\n <div class=\"tw-col-span-2 tw-flex tw-gap-4\">\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_width\"\r\n type=\"text\"\r\n formControlName=\"sype_width\"\r\n placeholder=\"20px\"\r\n label=\"Width\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n <div class=\"tw-flex-1 tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_height\"\r\n type=\"text\"\r\n formControlName=\"sype_height\"\r\n placeholder=\"20px\"\r\n label=\"Height\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n\r\n <!-- Leading Icon -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_leading_icon\"\r\n formControlName=\"sype_leading_icon\"\r\n placeholder=\"Enter icon name\"\r\n label=\"Leading Icon\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Default Value -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_default\"\r\n formControlName=\"sype_default\"\r\n placeholder=\"Enter default value\"\r\n label=\"Default Value\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Regex Pattern -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_regex\"\r\n formControlName=\"sype_regex\"\r\n placeholder=\"Enter regex pattern\"\r\n label=\"Regex Pattern\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Option Key -->\r\n <div class=\"tw-space-y-1\">\r\n <cide-ele-input\r\n id=\"sype_option_key\"\r\n formControlName=\"sype_option_key\"\r\n placeholder=\"Enter option key\"\r\n label=\"Option Key\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Entity ID (Auto-assigned from AppState) - Hidden -->\r\n <div class=\"tw-space-y-1\" style=\"display: none;\">\r\n <cide-ele-input\r\n id=\"sype_entity_id_syen\"\r\n formControlName=\"sype_entity_id_syen\"\r\n placeholder=\"Auto-assigned from system\"\r\n label=\"Entity ID (Auto-assigned)\"\r\n size=\"sm\"\r\n readonly>\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Control Options -->\r\n <div class=\"tw-col-span-2 tw-space-y-1\">\r\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-mb-3\">Control Options</h6>\r\n <div class=\"tw-grid tw-grid-cols-1 sm:tw-grid-cols-2 lg:tw-grid-cols-3 tw-gap-3\">\r\n \r\n <!-- Required -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input\r\n id=\"sype_required\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_required\"\r\n label=\"Required\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Disabled -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input\r\n id=\"sype_disabled\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_disabled\"\r\n label=\"Disabled\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Hide Label -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input\r\n id=\"sype_label_hide\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_label_hide\"\r\n label=\"Hide Label\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Hide Helper Text -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input\r\n id=\"sype_hide_helper_and_error_text\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_hide_helper_and_error_text\"\r\n label=\"Hide Helper Text\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Helper Text Collapse -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-input\r\n id=\"sype_helper_text_collapse\"\r\n type=\"checkbox\"\r\n formControlName=\"sype_helper_text_collapse\"\r\n label=\"Collapse Helper\"\r\n size=\"xs\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- Form Actions -->\r\n <div class=\"tw-flex tw-justify-between tw-items-center tw-pt-4 tw-border-t tw-border-gray-200 tw-mt-auto\">\r\n <!-- Error Message (Left Side) -->\r\n <cide-form-field-error [formGroup]=\"controlForm\"></cide-form-field-error>\r\n \r\n <!-- Action Buttons (Right Side) -->\r\n <div class=\"tw-flex tw-gap-3\">\r\n <button \r\n cideEleButton\r\n type=\"button\"\r\n variant=\"outline\"\r\n (click)=\"cancelForm()\"\r\n [disabled]=\"loading()\">\r\n Cancel\r\n </button>\r\n <button \r\n cideEleButton\r\n type=\"submit\"\r\n variant=\"primary\"\r\n [disabled]=\"loading()\">\r\n {{ isEditMode() ? 'Update Control' : 'Create Control' }}\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n <!-- Controls List Section -->\r\n <div class=\"tw-w-full lg:tw-w-2/5 tw-bg-white tw-rounded-lg tw-border tw-border-gray-200 tw-shadow-sm tw-flex tw-flex-col lg:tw-max-h-none tw-max-h-96\">\r\n <div class=\"tw-p-6 tw-border-b tw-border-gray-200\">\r\n <h3 class=\"tw-text-lg tw-font-medium tw-text-gray-900 tw-mb-1\">Page Controls</h3>\r\n <p class=\"tw-text-sm tw-text-gray-500 tw-mb-0\">Controls connected to this page</p>\r\n </div>\r\n \r\n <div class=\"tw-flex-1 tw-overflow-y-auto tw-p-4\" *ngIf=\"!loading() && controls().length > 0\">\r\n <div \r\n class=\"tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg tw-p-4 tw-mb-3 tw-cursor-pointer tw-transition-all tw-duration-200 hover:tw-shadow-md hover:tw-border-gray-300 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-ring-offset-2\" \r\n *ngFor=\"let control of controls(); trackBy: trackByControlId\"\r\n [class.tw-bg-blue-50]=\"selectedControlId() === control._id\"\r\n [class.tw-border-blue-300]=\"selectedControlId() === control._id\"\r\n [class.tw-shadow-md]=\"selectedControlId() === control._id\"\r\n (click)=\"selectControl(control)\"\r\n (keyup.enter)=\"selectControl(control)\"\r\n (keyup.space)=\"selectControl(control)\"\r\n tabindex=\"0\"\r\n role=\"button\"\r\n [attr.aria-label]=\"'Select control ' + (control.sype_label || control.sype_key)\">\r\n <div class=\"tw-flex tw-items-start tw-space-x-3\">\r\n <div class=\"tw-flex-shrink-0 tw-w-10 tw-h-10 tw-bg-blue-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\r\n <cide-ele-icon class=\"tw-text-blue-600\">settings_input_component</cide-ele-icon>\r\n </div>\r\n <div class=\"tw-flex-1 tw-min-w-0\">\r\n <h4 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-mb-1 tw-truncate\">{{ control.sype_label || control.sype_key }}</h4>\r\n <p class=\"tw-text-xs tw-text-gray-500 tw-mb-2 tw-truncate\">{{ control.sype_tooltip || 'No tooltip' }}</p>\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-gray-100 tw-text-gray-800\">{{ control.sype_type }}</span>\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium\" \r\n [class.tw-bg-red-100]=\"!control.sype_isactive\"\r\n [class.tw-text-red-800]=\"!control.sype_isactive\"\r\n [class.tw-bg-green-100]=\"control.sype_isactive\"\r\n [class.tw-text-green-800]=\"control.sype_isactive\">\r\n {{ control.sype_isactive ? 'Active' : 'Inactive' }}\r\n </span>\r\n </div>\r\n </div>\r\n <div class=\"tw-flex tw-items-center tw-space-x-1 tw-opacity-0 tw-transition-opacity tw-duration-200 group-hover:tw-opacity-100\" \r\n [class.tw-opacity-100]=\"selectedControlId() === control._id\">\r\n <button \r\n cideEleButton\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n (click)=\"editControl(control); $event.stopPropagation()\">\r\n <cide-ele-icon>edit</cide-ele-icon>\r\n </button>\r\n <button \r\n cideEleButton\r\n variant=\"ghost\"\r\n size=\"sm\"\r\n (click)=\"deleteControl(control); $event.stopPropagation()\">\r\n <cide-ele-icon>delete</cide-ele-icon>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"tw-flex tw-flex-col tw-items-center tw-justify-center tw-py-12 tw-text-center\" *ngIf=\"!loading() && controls().length === 0\">\r\n <cide-ele-icon class=\"tw-text-4xl tw-text-gray-300 tw-mb-4\">settings_input_component</cide-ele-icon>\r\n <p class=\"tw-text-gray-500 tw-font-medium tw-mb-1\">No controls available</p>\r\n <small class=\"tw-text-gray-400\">Create controls using the form on the left</small>\r\n </div>\r\n\r\n <div class=\"tw-flex tw-flex-col tw-items-center tw-justify-center tw-py-12 tw-text-center\" *ngIf=\"loading()\">\r\n <cide-ele-icon class=\"tw-text-2xl tw-text-blue-500 tw-mb-4 tw-animate-spin\">refresh</cide-ele-icon>\r\n <p class=\"tw-text-gray-500\">Loading controls...</p>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n ", styles: [".checkbox-field{margin:.25rem 0}.checkbox-label{display:flex;flex-direction:column;gap:.25rem;cursor:pointer;padding:.75rem 0;background:transparent;border:none;border-radius:0;transition:all .2s ease}.checkbox-label:hover{background:#667eea05}.checkbox-label .checkbox-input{width:1rem;height:1rem;accent-color:#667eea;border-radius:3px;margin-bottom:.125rem}.checkbox-label .checkbox-text{font-weight:600;color:#374151;font-size:.875rem}.checkbox-label .checkbox-description{font-size:.75rem;color:#6b7280;margin-top:.125rem}@media (max-width: 640px){.main-content{padding:1rem;gap:1rem}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { 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: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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", "step", "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", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
7874
7920
|
}
|
|
7875
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
7921
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePageControlsComponent, decorators: [{
|
|
7876
7922
|
type: Component,
|
|
7877
7923
|
args: [{ selector: 'cide-core-page-controls', standalone: true, imports: [
|
|
7878
7924
|
CommonModule,
|
|
@@ -8018,10 +8064,10 @@ class CideCoreUserMasterService {
|
|
|
8018
8064
|
return throwError(() => error);
|
|
8019
8065
|
}));
|
|
8020
8066
|
}
|
|
8021
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
8022
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
8067
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserMasterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8068
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserMasterService, providedIn: 'root' });
|
|
8023
8069
|
}
|
|
8024
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
8070
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserMasterService, decorators: [{
|
|
8025
8071
|
type: Injectable,
|
|
8026
8072
|
args: [{
|
|
8027
8073
|
providedIn: 'root'
|
|
@@ -8067,10 +8113,10 @@ class CideCoreRoleSelectService {
|
|
|
8067
8113
|
getAllRoles() {
|
|
8068
8114
|
return this.getRoleOptions();
|
|
8069
8115
|
}
|
|
8070
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
8071
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
8116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreRoleSelectService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8117
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreRoleSelectService, providedIn: 'root' });
|
|
8072
8118
|
}
|
|
8073
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
8119
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreRoleSelectService, decorators: [{
|
|
8074
8120
|
type: Injectable,
|
|
8075
8121
|
args: [{
|
|
8076
8122
|
providedIn: 'root'
|
|
@@ -8156,10 +8202,21 @@ class CideCoreUserRoleService {
|
|
|
8156
8202
|
]);
|
|
8157
8203
|
return this.http.patch(url, payload);
|
|
8158
8204
|
}
|
|
8159
|
-
|
|
8160
|
-
|
|
8205
|
+
/**
|
|
8206
|
+
* Get roles by entity ID
|
|
8207
|
+
* @param entityId - Entity ID to filter roles
|
|
8208
|
+
* @returns Observable of user role list response
|
|
8209
|
+
*/
|
|
8210
|
+
getRolesByEntity(entityId) {
|
|
8211
|
+
return this.getUserRoleList({
|
|
8212
|
+
syusrol_role_entity_id_syen: entityId,
|
|
8213
|
+
syusrol_isactive: true
|
|
8214
|
+
});
|
|
8215
|
+
}
|
|
8216
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserRoleService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8217
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserRoleService, providedIn: 'root' });
|
|
8161
8218
|
}
|
|
8162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
8219
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserRoleService, decorators: [{
|
|
8163
8220
|
type: Injectable,
|
|
8164
8221
|
args: [{
|
|
8165
8222
|
providedIn: 'root'
|
|
@@ -8233,10 +8290,10 @@ class CideCoreEntityManagementService {
|
|
|
8233
8290
|
]);
|
|
8234
8291
|
return this.http.delete(url);
|
|
8235
8292
|
}
|
|
8236
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
8237
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
8293
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreEntityManagementService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
8294
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreEntityManagementService, providedIn: 'root' });
|
|
8238
8295
|
}
|
|
8239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
8296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreEntityManagementService, decorators: [{
|
|
8240
8297
|
type: Injectable,
|
|
8241
8298
|
args: [{
|
|
8242
8299
|
providedIn: 'root'
|
|
@@ -8283,6 +8340,17 @@ class CideCoreGeneralMasterTypeComponent {
|
|
|
8283
8340
|
});
|
|
8284
8341
|
// Computed values
|
|
8285
8342
|
isFormDirty = computed(() => this.typeForm.dirty, ...(ngDevMode ? [{ debugName: "isFormDirty" }] : []));
|
|
8343
|
+
// Rights computed signals
|
|
8344
|
+
canCreate = computed(() => this.rightsService.hasRight('CREATE'), ...(ngDevMode ? [{ debugName: "canCreate" }] : []));
|
|
8345
|
+
canEdit = computed(() => this.rightsService.hasRight('EDIT'), ...(ngDevMode ? [{ debugName: "canEdit" }] : []));
|
|
8346
|
+
canDelete = computed(() => this.rightsService.hasRight('DELETE'), ...(ngDevMode ? [{ debugName: "canDelete" }] : []));
|
|
8347
|
+
canView = computed(() => this.rightsService.hasRight('VIEW'), ...(ngDevMode ? [{ debugName: "canView" }] : []));
|
|
8348
|
+
// Computed signal for form disabled state (for JSON editor which requires WritableSignal)
|
|
8349
|
+
isFormDisabled = signal(false, ...(ngDevMode ? [{ debugName: "isFormDisabled" }] : []));
|
|
8350
|
+
// Effect to update the disabled signal when rights change
|
|
8351
|
+
updateDisabledState = effect(() => {
|
|
8352
|
+
this.isFormDisabled.set(this.canView() && !this.canCreate() && !this.canEdit());
|
|
8353
|
+
}, ...(ngDevMode ? [{ debugName: "updateDisabledState" }] : []));
|
|
8286
8354
|
// Grid configuration signal
|
|
8287
8355
|
gridConfig = signal({
|
|
8288
8356
|
id: 'type-list-grid',
|
|
@@ -8372,6 +8440,8 @@ class CideCoreGeneralMasterTypeComponent {
|
|
|
8372
8440
|
onToggleStatus: (item) => this.toggleTypeStatus(item)
|
|
8373
8441
|
};
|
|
8374
8442
|
ngOnInit() {
|
|
8443
|
+
// Initialize rights for general master type management
|
|
8444
|
+
this.rightsService.initializeRights('core_general_master_type');
|
|
8375
8445
|
this.initializeComponent();
|
|
8376
8446
|
// Add form submission debugging
|
|
8377
8447
|
this.typeForm.valueChanges.subscribe(value => {
|
|
@@ -8735,38 +8805,48 @@ class CideCoreGeneralMasterTypeComponent {
|
|
|
8735
8805
|
* Get dropdown items for actions
|
|
8736
8806
|
*/
|
|
8737
8807
|
getActionDropdownItems(type) {
|
|
8738
|
-
const items = [
|
|
8739
|
-
|
|
8808
|
+
const items = [];
|
|
8809
|
+
if (this.canEdit()) {
|
|
8810
|
+
items.push({
|
|
8740
8811
|
id: 'edit',
|
|
8741
8812
|
label: 'Edit',
|
|
8742
8813
|
icon: 'edit',
|
|
8743
8814
|
disabled: false
|
|
8744
|
-
}
|
|
8745
|
-
|
|
8815
|
+
});
|
|
8816
|
+
}
|
|
8817
|
+
if (this.canCreate()) {
|
|
8818
|
+
items.push({
|
|
8746
8819
|
id: 'addChild',
|
|
8747
8820
|
label: 'Add Child',
|
|
8748
8821
|
icon: 'add',
|
|
8749
8822
|
disabled: false
|
|
8750
|
-
}
|
|
8751
|
-
|
|
8823
|
+
});
|
|
8824
|
+
}
|
|
8825
|
+
// General Master navigation - always available if user can view
|
|
8826
|
+
if (this.canView()) {
|
|
8827
|
+
items.push({
|
|
8752
8828
|
id: 'general-master',
|
|
8753
8829
|
label: 'General Master',
|
|
8754
8830
|
icon: 'list',
|
|
8755
8831
|
disabled: false
|
|
8756
|
-
}
|
|
8757
|
-
|
|
8832
|
+
});
|
|
8833
|
+
}
|
|
8834
|
+
if (this.canEdit()) {
|
|
8835
|
+
items.push({
|
|
8758
8836
|
id: 'toggle',
|
|
8759
8837
|
label: type.sygmt_isactive ? 'Deactivate' : 'Activate',
|
|
8760
8838
|
icon: type.sygmt_isactive ? 'block' : 'check_circle',
|
|
8761
8839
|
disabled: false
|
|
8762
|
-
}
|
|
8763
|
-
|
|
8840
|
+
});
|
|
8841
|
+
}
|
|
8842
|
+
if (this.canDelete()) {
|
|
8843
|
+
items.push({
|
|
8764
8844
|
id: 'delete',
|
|
8765
8845
|
label: 'Delete',
|
|
8766
8846
|
icon: 'delete',
|
|
8767
8847
|
disabled: false
|
|
8768
|
-
}
|
|
8769
|
-
|
|
8848
|
+
});
|
|
8849
|
+
}
|
|
8770
8850
|
return items;
|
|
8771
8851
|
}
|
|
8772
8852
|
/**
|
|
@@ -8841,10 +8921,10 @@ class CideCoreGeneralMasterTypeComponent {
|
|
|
8841
8921
|
const event = new MouseEvent('click', { bubbles: true });
|
|
8842
8922
|
document.dispatchEvent(event);
|
|
8843
8923
|
}
|
|
8844
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
8845
|
-
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\n 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\n 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], cide-ele-button", 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", "step", "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"] }] });
|
|
8924
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterTypeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8925
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", 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 - Show if user has VIEW, CREATE, or EDIT rights -->\n @if (canView() || canCreate() || canEdit()) {\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\n Type' }}</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\n 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\" [disabled]=\"canView() && !canCreate() && !canEdit()\">\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\" [disabled]=\"canView() && !canCreate() && !canEdit()\">\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 [disabled]=\"canView() && !canCreate() && !canEdit()\">\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 [disabled]=\"isFormDisabled()\">\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\" [disabled]=\"canView() && !canCreate() && !canEdit()\">\n </cide-ele-textarea>\n </div>\n\n <!-- Action Buttons -->\n @if (canCreate() || canEdit()) {\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() || (canView() && !canCreate() && !canEdit())\" class=\"tw-px-4 tw-py-2\">\n Cancel\n </button>\n @if (isEditMode() ? canEdit() : canCreate()) {\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 }\n </div>\n }\n </div>\n </div>\n </form>\n </div>\n </div>\n }\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], cide-ele-button", 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", "step", "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"] }] });
|
|
8846
8926
|
}
|
|
8847
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
8927
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterTypeComponent, decorators: [{
|
|
8848
8928
|
type: Component,
|
|
8849
8929
|
args: [{ selector: 'cide-core-general-master-type', standalone: true, imports: [
|
|
8850
8930
|
CommonModule,
|
|
@@ -8857,8 +8937,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
8857
8937
|
CideIconComponent,
|
|
8858
8938
|
CideEleDropdownComponent,
|
|
8859
8939
|
CideEleJsonEditorComponent
|
|
8860
|
-
], 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\n Type
|
|
8861
|
-
}] });
|
|
8940
|
+
], template: "<!-- General Master Type Container -->\n<div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Quick Add Form Section - Show if user has VIEW, CREATE, or EDIT rights -->\n @if (canView() || canCreate() || canEdit()) {\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\n Type' }}</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\n 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\" [disabled]=\"canView() && !canCreate() && !canEdit()\">\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\" [disabled]=\"canView() && !canCreate() && !canEdit()\">\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 [disabled]=\"canView() && !canCreate() && !canEdit()\">\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 [disabled]=\"isFormDisabled()\">\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\" [disabled]=\"canView() && !canCreate() && !canEdit()\">\n </cide-ele-textarea>\n </div>\n\n <!-- Action Buttons -->\n @if (canCreate() || canEdit()) {\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() || (canView() && !canCreate() && !canEdit())\" class=\"tw-px-4 tw-py-2\">\n Cancel\n </button>\n @if (isEditMode() ? canEdit() : canCreate()) {\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 }\n </div>\n }\n </div>\n </div>\n </form>\n </div>\n </div>\n }\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>" }]
|
|
8941
|
+
}], propDecorators: { typeDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['typeDetailsRendererTemplate', { isSignal: true }] }], typeStatusRendererTemplate: [{ type: i0.ViewChild, args: ['typeStatusRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
8862
8942
|
|
|
8863
8943
|
var generalMasterType_component = /*#__PURE__*/Object.freeze({
|
|
8864
8944
|
__proto__: null,
|
|
@@ -9685,10 +9765,10 @@ class CideCoreGeneralMasterComponent {
|
|
|
9685
9765
|
const event = new MouseEvent('click', { bubbles: true });
|
|
9686
9766
|
document.dispatchEvent(event);
|
|
9687
9767
|
}
|
|
9688
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
9689
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreGeneralMasterComponent, isStandalone: true, selector: "cide-core-general-master", viewQueries: [{ propertyName: "masterDetailsRendererTemplate", first: true, predicate: ["masterDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "masterStatusRendererTemplate", first: true, predicate: ["masterStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- General Master with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_general_master' }\">\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 <div class=\"tw-flex tw-flex-col\">\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Master' : 'Quick Add Master' }}</h6>\n @if (typeTitle()) {\n <p class=\"tw-text-xs tw-text-gray-500 tw-m-0 tw-mt-0.5\">Type: <span class=\"tw-font-medium tw-text-gray-700\">{{ typeTitle() }}</span></p>\n }\n </div>\n </div>\n \n <!-- Parent Master Info Box -->\n @if (masterForm.get('sygms_id_sygms')?.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 <span class=\"tw-text-sm tw-font-medium tw-text-blue-800\">Adding Child</span>\n <span class=\"tw-text-xs tw-text-blue-700\">\n Parent: <span class=\"tw-font-medium\">{{ getParentMasterDisplay() }}</span>\n </span>\n <button \n type=\"button\"\n (click)=\"clearParentMaster()\"\n class=\"tw-text-sm tw-text-blue-600 hover:tw-text-blue-800 hover:tw-bg-blue-100 tw-rounded tw-px-1\">\n \u00D7\n </button>\n </div>\n }\n </div>\n \n <form [formGroup]=\"masterForm\" class=\"tw-space-y-2\">\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 <!-- Master Code -->\n <div class=\"lg:tw-col-span-1\">\n <cide-ele-input \n formControlName=\"sygms_code\" \n label=\"Master Code\" \n placeholder=\"Enter master code\"\n size=\"sm\"\n [required]=\"true\" \n [maxlength]=\"40\">\n </cide-ele-input>\n </div>\n \n <!-- Master Title -->\n <div class=\"lg:tw-col-span-3\">\n <cide-ele-input \n formControlName=\"sygms_title\" \n label=\"Master Title\" \n placeholder=\"Enter master title\"\n size=\"sm\"\n [required]=\"true\" \n [maxlength]=\"150\">\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=\"sygms_isactive\"\n type=\"checkbox\"\n label=\"Active\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n \n <!-- Third 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=\"sygms_configuration\" \n label=\"Configuration\" \n size=\"sm\"\n [required]=\"true\">\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=\"sygms_desc\" \n label=\"Description\" \n placeholder=\"Enter description\"\n size=\"sm\"\n [maxlength]=\"500\" \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)=\"resetForm()\"\n [disabled]=\"loading()\"\n class=\"tw-px-4 tw-py-2\">\n Reset\n </button>\n @if (isEditMode()) {\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 }\n <button \n cideEleButton \n variant=\"primary\" \n size=\"sm\" \n type=\"submit\"\n (click)=\"saveMaster()\"\n [disabled]=\"!masterForm.valid || loading()\"\n class=\"tw-px-4 tw-py-2\">\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' : '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 and Back Button -->\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n @if (typeTitle()) {\n <div>\n <p class=\"tw-text-xs tw-text-gray-500 tw-m-0\">Type: {{ typeTitle() }}</p>\n </div>\n }\n </div>\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 <!-- Actions can be added here in the future -->\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-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 tw-h-0\">\n <div class=\"tw-table-cell tw-h-full tw-relative tw-p-0\">\n \n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-hidden\">\n <cide-ele-data-grid \n class=\"tw-h-full\"\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 #masterDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-w-full\">\n <div class=\"tw-font-medium tw-text-gray-900\">{{ row.sygms_title || 'N/A' }}</div>\n <div class=\"tw-text-sm tw-text-gray-500 tw-truncate\">{{ row.sygms_desc || 'No description' }}</div>\n </div>\n</ng-template>\n\n<ng-template #masterStatusRendererTemplate 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.sygms_isactive\"\n [class.tw-text-green-800]=\"row.sygms_isactive\"\n [class.tw-bg-red-100]=\"!row.sygms_isactive\"\n [class.tw-text-red-800]=\"!row.sygms_isactive\">\n {{ row.sygms_isactive ? 'Active' : 'Inactive' }}\n </span>\n</ng-template>\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>\n</cide-lyt-shared-wrapper> ", 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { 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", "step", "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"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
9768
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9769
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreGeneralMasterComponent, isStandalone: true, selector: "cide-core-general-master", viewQueries: [{ propertyName: "masterDetailsRendererTemplate", first: true, predicate: ["masterDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "masterStatusRendererTemplate", first: true, predicate: ["masterStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- General Master with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_general_master' }\">\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 <div class=\"tw-flex tw-flex-col\">\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Master' : 'Quick Add Master' }}</h6>\n @if (typeTitle()) {\n <p class=\"tw-text-xs tw-text-gray-500 tw-m-0 tw-mt-0.5\">Type: <span class=\"tw-font-medium tw-text-gray-700\">{{ typeTitle() }}</span></p>\n }\n </div>\n </div>\n \n <!-- Parent Master Info Box -->\n @if (masterForm.get('sygms_id_sygms')?.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 <span class=\"tw-text-sm tw-font-medium tw-text-blue-800\">Adding Child</span>\n <span class=\"tw-text-xs tw-text-blue-700\">\n Parent: <span class=\"tw-font-medium\">{{ getParentMasterDisplay() }}</span>\n </span>\n <button \n type=\"button\"\n (click)=\"clearParentMaster()\"\n class=\"tw-text-sm tw-text-blue-600 hover:tw-text-blue-800 hover:tw-bg-blue-100 tw-rounded tw-px-1\">\n \u00D7\n </button>\n </div>\n }\n </div>\n \n <form [formGroup]=\"masterForm\" class=\"tw-space-y-2\">\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 <!-- Master Code -->\n <div class=\"lg:tw-col-span-1\">\n <cide-ele-input \n formControlName=\"sygms_code\" \n label=\"Master Code\" \n placeholder=\"Enter master code\"\n size=\"sm\"\n [required]=\"true\" \n [maxlength]=\"40\">\n </cide-ele-input>\n </div>\n \n <!-- Master Title -->\n <div class=\"lg:tw-col-span-3\">\n <cide-ele-input \n formControlName=\"sygms_title\" \n label=\"Master Title\" \n placeholder=\"Enter master title\"\n size=\"sm\"\n [required]=\"true\" \n [maxlength]=\"150\">\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=\"sygms_isactive\"\n type=\"checkbox\"\n label=\"Active\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n \n <!-- Third 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=\"sygms_configuration\" \n label=\"Configuration\" \n size=\"sm\"\n [required]=\"true\">\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=\"sygms_desc\" \n label=\"Description\" \n placeholder=\"Enter description\"\n size=\"sm\"\n [maxlength]=\"500\" \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)=\"resetForm()\"\n [disabled]=\"loading()\"\n class=\"tw-px-4 tw-py-2\">\n Reset\n </button>\n @if (isEditMode()) {\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 }\n <button \n cideEleButton \n variant=\"primary\" \n size=\"sm\" \n type=\"submit\"\n (click)=\"saveMaster()\"\n [disabled]=\"!masterForm.valid || loading()\"\n class=\"tw-px-4 tw-py-2\">\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' : '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 and Back Button -->\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n @if (typeTitle()) {\n <div>\n <p class=\"tw-text-xs tw-text-gray-500 tw-m-0\">Type: {{ typeTitle() }}</p>\n </div>\n }\n </div>\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 <!-- Actions can be added here in the future -->\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-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 tw-h-0\">\n <div class=\"tw-table-cell tw-h-full tw-relative tw-p-0\">\n \n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-hidden\">\n <cide-ele-data-grid \n class=\"tw-h-full\"\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 #masterDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-w-full\">\n <div class=\"tw-font-medium tw-text-gray-900\">{{ row.sygms_title || 'N/A' }}</div>\n <div class=\"tw-text-sm tw-text-gray-500 tw-truncate\">{{ row.sygms_desc || 'No description' }}</div>\n </div>\n</ng-template>\n\n<ng-template #masterStatusRendererTemplate 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.sygms_isactive\"\n [class.tw-text-green-800]=\"row.sygms_isactive\"\n [class.tw-bg-red-100]=\"!row.sygms_isactive\"\n [class.tw-text-red-800]=\"!row.sygms_isactive\">\n {{ row.sygms_isactive ? 'Active' : 'Inactive' }}\n </span>\n</ng-template>\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>\n</cide-lyt-shared-wrapper> ", 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { 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", "step", "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"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
9690
9770
|
}
|
|
9691
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
9771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterComponent, decorators: [{
|
|
9692
9772
|
type: Component,
|
|
9693
9773
|
args: [{ selector: 'cide-core-general-master', standalone: true, imports: [
|
|
9694
9774
|
CommonModule,
|
|
@@ -9703,7 +9783,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
9703
9783
|
CideEleJsonEditorComponent,
|
|
9704
9784
|
CideLytSharedWrapperComponent
|
|
9705
9785
|
], template: "<!-- General Master with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_general_master' }\">\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 <div class=\"tw-flex tw-flex-col\">\n <h6 class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">{{ isEditMode() ? 'Edit Master' : 'Quick Add Master' }}</h6>\n @if (typeTitle()) {\n <p class=\"tw-text-xs tw-text-gray-500 tw-m-0 tw-mt-0.5\">Type: <span class=\"tw-font-medium tw-text-gray-700\">{{ typeTitle() }}</span></p>\n }\n </div>\n </div>\n \n <!-- Parent Master Info Box -->\n @if (masterForm.get('sygms_id_sygms')?.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 <span class=\"tw-text-sm tw-font-medium tw-text-blue-800\">Adding Child</span>\n <span class=\"tw-text-xs tw-text-blue-700\">\n Parent: <span class=\"tw-font-medium\">{{ getParentMasterDisplay() }}</span>\n </span>\n <button \n type=\"button\"\n (click)=\"clearParentMaster()\"\n class=\"tw-text-sm tw-text-blue-600 hover:tw-text-blue-800 hover:tw-bg-blue-100 tw-rounded tw-px-1\">\n \u00D7\n </button>\n </div>\n }\n </div>\n \n <form [formGroup]=\"masterForm\" class=\"tw-space-y-2\">\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 <!-- Master Code -->\n <div class=\"lg:tw-col-span-1\">\n <cide-ele-input \n formControlName=\"sygms_code\" \n label=\"Master Code\" \n placeholder=\"Enter master code\"\n size=\"sm\"\n [required]=\"true\" \n [maxlength]=\"40\">\n </cide-ele-input>\n </div>\n \n <!-- Master Title -->\n <div class=\"lg:tw-col-span-3\">\n <cide-ele-input \n formControlName=\"sygms_title\" \n label=\"Master Title\" \n placeholder=\"Enter master title\"\n size=\"sm\"\n [required]=\"true\" \n [maxlength]=\"150\">\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=\"sygms_isactive\"\n type=\"checkbox\"\n label=\"Active\"\n size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n \n <!-- Third 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=\"sygms_configuration\" \n label=\"Configuration\" \n size=\"sm\"\n [required]=\"true\">\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=\"sygms_desc\" \n label=\"Description\" \n placeholder=\"Enter description\"\n size=\"sm\"\n [maxlength]=\"500\" \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)=\"resetForm()\"\n [disabled]=\"loading()\"\n class=\"tw-px-4 tw-py-2\">\n Reset\n </button>\n @if (isEditMode()) {\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 }\n <button \n cideEleButton \n variant=\"primary\" \n size=\"sm\" \n type=\"submit\"\n (click)=\"saveMaster()\"\n [disabled]=\"!masterForm.valid || loading()\"\n class=\"tw-px-4 tw-py-2\">\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' : '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 and Back Button -->\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n @if (typeTitle()) {\n <div>\n <p class=\"tw-text-xs tw-text-gray-500 tw-m-0\">Type: {{ typeTitle() }}</p>\n </div>\n }\n </div>\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 <!-- Actions can be added here in the future -->\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-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 tw-h-0\">\n <div class=\"tw-table-cell tw-h-full tw-relative tw-p-0\">\n \n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-hidden\">\n <cide-ele-data-grid \n class=\"tw-h-full\"\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 #masterDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-w-full\">\n <div class=\"tw-font-medium tw-text-gray-900\">{{ row.sygms_title || 'N/A' }}</div>\n <div class=\"tw-text-sm tw-text-gray-500 tw-truncate\">{{ row.sygms_desc || 'No description' }}</div>\n </div>\n</ng-template>\n\n<ng-template #masterStatusRendererTemplate 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.sygms_isactive\"\n [class.tw-text-green-800]=\"row.sygms_isactive\"\n [class.tw-bg-red-100]=\"!row.sygms_isactive\"\n [class.tw-text-red-800]=\"!row.sygms_isactive\">\n {{ row.sygms_isactive ? 'Active' : 'Inactive' }}\n </span>\n</ng-template>\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>\n</cide-lyt-shared-wrapper> " }]
|
|
9706
|
-
}] });
|
|
9786
|
+
}], propDecorators: { masterDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['masterDetailsRendererTemplate', { isSignal: true }] }], masterStatusRendererTemplate: [{ type: i0.ViewChild, args: ['masterStatusRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
9707
9787
|
|
|
9708
9788
|
var generalMaster_component = /*#__PURE__*/Object.freeze({
|
|
9709
9789
|
__proto__: null,
|
|
@@ -9754,10 +9834,10 @@ class CideCorePinCodeService {
|
|
|
9754
9834
|
};
|
|
9755
9835
|
return this.getPinCodeData(payload);
|
|
9756
9836
|
}
|
|
9757
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
9758
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
9837
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePinCodeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9838
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePinCodeService, providedIn: 'root' });
|
|
9759
9839
|
}
|
|
9760
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
9840
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCorePinCodeService, decorators: [{
|
|
9761
9841
|
type: Injectable,
|
|
9762
9842
|
args: [{
|
|
9763
9843
|
providedIn: 'root'
|
|
@@ -9787,10 +9867,10 @@ class CideCoreCurrencyService {
|
|
|
9787
9867
|
console.log('💰 CURRENCY SERVICE: Payload:', body);
|
|
9788
9868
|
return this.http.get(url);
|
|
9789
9869
|
}
|
|
9790
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
9791
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
9870
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreCurrencyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9871
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreCurrencyService, providedIn: 'root' });
|
|
9792
9872
|
}
|
|
9793
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
9873
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreCurrencyService, decorators: [{
|
|
9794
9874
|
type: Injectable,
|
|
9795
9875
|
args: [{
|
|
9796
9876
|
providedIn: 'root'
|
|
@@ -9860,10 +9940,10 @@ class CideCoreCountryService {
|
|
|
9860
9940
|
}; // Temporary fix - update when MSyctrList interface is available
|
|
9861
9941
|
return this.getAllCountries(payload);
|
|
9862
9942
|
}
|
|
9863
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
9864
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
9943
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreCountryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
9944
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreCountryService, providedIn: 'root' });
|
|
9865
9945
|
}
|
|
9866
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
9946
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreCountryService, decorators: [{
|
|
9867
9947
|
type: Injectable,
|
|
9868
9948
|
args: [{
|
|
9869
9949
|
providedIn: 'root'
|
|
@@ -11144,10 +11224,10 @@ class CideCoreEntityCreateComponent {
|
|
|
11144
11224
|
onBack() {
|
|
11145
11225
|
this.router.navigate(['/control-panel/entity-list']);
|
|
11146
11226
|
}
|
|
11147
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
11148
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreEntityCreateComponent, isStandalone: true, selector: "cide-core-entity-create", viewQueries: [{ propertyName: "userCellRendererTemplate", first: true, predicate: ["userCell"], descendants: true, isSignal: true }, { propertyName: "actionsCellRendererTemplate", first: true, predicate: ["actionsCell"], descendants: true, isSignal: true }], ngImport: i0, template: "<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_entity_form' }\"\r\n [breadcrumb_data]=\"breadcrumbData()\">\r\n <!-- Modern Entity Create Form -->\r\n <div class=\"tw-min-h-screen\">\r\n <div class=\"tw-mx-auto\">\r\n\r\n <form [formGroup]=\"entityForm\" [class.tw-opacity-60]=\"loading()\" [class.tw-pointer-events-none]=\"loading()\"\r\n (ngSubmit)=\"onSubmit()\">\r\n\r\n <!-- Breadcrumb is now rendered by shared wrapper; inline breadcrumb removed -->\r\n\r\n <!-- Basic Information Section -->\r\n <div class=\"tw-p-2 tw-pb-0\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Top Section: Image on Right, Form Fields on Left -->\r\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-[1fr_200px] tw-gap-4\">\r\n <!-- Left Side: Form Fields -->\r\n <div class=\"tw-space-y-6\">\r\n <!-- Institution Name, Entity Type & Active Status -->\r\n <div\r\n class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[1fr_250px_120px] tw-gap-4 tw-items-end\">\r\n <cide-ele-input id=\"syen_name\" type=\"text\" label=\"Institution Name\" formControlName=\"syen_name\"\r\n placeholder=\"Enter institution name\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-select label=\"Entity Type\" labelPlacement=\"floating\" [options]=\"entityTypes()\"\r\n formControlName=\"syen_entity_type_sygms\" placeholder=\"Select institution type\" size=\"sm\">\r\n </cide-ele-select>\r\n\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-gap-1 tw-h-full\">\r\n <cide-ele-input type=\"checkbox\" formControlName=\"syen_isactive\" size=\"sm\" label=\"Is Active\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n\r\n <!-- UDISE, Affiliation & Institution Code -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-3 tw-gap-4\">\r\n <cide-ele-input label=\"UDISE Number\" formControlName=\"syen_udise_no\" placeholder=\"Enter UDISE number\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Affiliation Number\" formControlName=\"syen_affiliation_no\"\r\n placeholder=\"Enter affiliation number\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Institution Code\" formControlName=\"syen_entity_code\"\r\n placeholder=\"Enter unique code\" size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n\r\n <!-- Right Side: Entity Image Upload -->\r\n <div class=\"tw-flex tw-items-start tw-justify-center tw-pt-0\">\r\n <cide-ele-file-input id=\"entity_image_upload\" formControlName=\"syen_photo_id_cyfm\" accept=\"image/*\"\r\n [showPreview]=\"true\" [previewBoxMode]=\"true\" [showFileName]=\"false\" previewWidth=\"180px\"\r\n previewHeight=\"120px\" [required]=\"true\" placeholderText=\"Upload Logo\" placeholderIcon=\"cloud_upload\"\r\n [autoUpload]=\"true\" [uploadData]=\"getUploadData()\" (uploadSuccess)=\"onImageUploadSuccess($event)\"\r\n (uploadError)=\"onImageUploadError($event)\" (uploadProgressChange)=\"onImageUploadProgress($event)\">\r\n </cide-ele-file-input>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Tab Navigation -->\r\n <div class=\"tw-px-4 !tw-mt-0\">\r\n <cide-ele-tab [tabs]=\"entityTabs()\" [activeTabId]=\"activeTab()\" size=\"sm\" variant=\"default\"\r\n (tabChange)=\"onTabChange($event)\">\r\n </cide-ele-tab>\r\n </div>\r\n\r\n <!-- Tab Content -->\r\n <div class=\"tw-transition-all tw-duration-300 tw-ease-in-out !tw-mt-2\" [class.tw-opacity-60]=\"loading()\"\r\n [class.tw-pointer-events-none]=\"loading()\">\r\n @switch (activeTab()) {\r\n\r\n @case ('corporate') {\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Corporate Address - Full Width -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-textarea label=\"Corporate Address\" formControlName=\"syen_corporate_address\"\r\n placeholder=\"Enter complete corporate address\" [rows]=\"4\">\r\n </cide-ele-textarea>\r\n </div>\r\n\r\n <!-- Postal Code, City, State & Country - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[220px_0.8fr_0.7fr_240px] tw-gap-6\">\r\n <cide-ele-select label=\"Postal Code\" [options]=\"postalCodes()\"\r\n formControlName=\"syen_corporate_pin_sypin\" placeholder=\"Select postal code\" [searchable]=\"true\"\r\n [loading]=\"postalCodesLoading()\" (searchChange)=\"onPostalCodeSearch($event)\" size=\"sm\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"City\" formControlName=\"syen_corporate_city_sypin\" placeholder=\"Enter city name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"State\" formControlName=\"syen_corporate_state_sypin\"\r\n placeholder=\"Enter state name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-select label=\"Country\" [options]=\"corporateCountries()\"\r\n formControlName=\"syen_corporate_country_syctr\" placeholder=\"Select country\" [searchable]=\"true\"\r\n (searchChange)=\"onCorporateCountrySearch($event)\" [loading]=\"corporateCountriesLoading()\" size=\"sm\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Contact Person, Phone, Email & Fax - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[1fr_200px_1fr_150px] tw-gap-6\">\r\n <cide-ele-select label=\"Contact Person\" [options]=\"users()\"\r\n formControlName=\"syen_corporate_contact_person_user\" placeholder=\"Select contact person\"\r\n [searchable]=\"true\" [loading]=\"usersLoading()\" (searchChange)=\"onUserSearch($event)\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"Phone\" formControlName=\"syen_corporate_phone\" type=\"tel\"\r\n placeholder=\"Enter phone number\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Email\" formControlName=\"syen_corporate_email\" type=\"email\"\r\n placeholder=\"Enter email address\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Fax\" formControlName=\"syen_corporate_fax\" placeholder=\"Enter fax number\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @case ('contact') {\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Currency Selection -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-select label=\"Currency\" [options]=\"currencies()\" formControlName=\"syen_currency_sycr\"\r\n placeholder=\"Select currency\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Alternate Phone & Website - Two Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input label=\"Alternate Phone\" formControlName=\"syen_corporate_phone_alt\" type=\"tel\"\r\n placeholder=\"Enter alternate phone number\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Website URL\" formControlName=\"syen_website\" type=\"url\"\r\n placeholder=\"https://example.com\" autocomplete=\"url\" leadingIcon=\"language\"\r\n helperText=\"Enter a valid website URL starting with http:// or https://\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Alternate Email - Full Width -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-input label=\"Alternate Email\" formControlName=\"syen_corporate_email_alt\" type=\"email\"\r\n placeholder=\"Enter alternate email address\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @case ('registered') {\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Registered Address - Full Width -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-textarea label=\"Registered Address\" formControlName=\"syen_registered_address\"\r\n placeholder=\"Enter complete registered address\" [rows]=\"4\">\r\n </cide-ele-textarea>\r\n </div>\r\n\r\n <!-- Postal Code, City, State & Country - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[220px_0.8fr_0.7fr_240px] tw-gap-6\">\r\n <cide-ele-select label=\"Postal Code\" [options]=\"postalCodes()\"\r\n formControlName=\"syen_registered_pin_sypin\" placeholder=\"Select postal code\" [searchable]=\"true\"\r\n [loading]=\"postalCodesLoading()\" (searchChange)=\"onPostalCodeSearch($event)\" size=\"sm\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"City\" formControlName=\"syen_registered_city_sypin\" placeholder=\"Enter city name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"State\" formControlName=\"syen_registered_state_sypin\"\r\n placeholder=\"Enter state name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-select label=\"Country\" [options]=\"registeredCountries()\"\r\n formControlName=\"syen_registered_country_syctr\" placeholder=\"Select country\" [searchable]=\"true\"\r\n (searchChange)=\"onRegisteredCountrySearch($event)\" [loading]=\"registeredCountriesLoading()\" size=\"sm\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Contact Person, Phone, Email & Fax - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[1fr_200px_1fr_150px] tw-gap-6\">\r\n <cide-ele-select label=\"Contact Person\" [options]=\"users()\"\r\n formControlName=\"syen_registered_contact_person_user\" placeholder=\"Select contact person\"\r\n [searchable]=\"true\" [loading]=\"usersLoading()\" (searchChange)=\"onUserSearch($event)\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"Phone\" formControlName=\"syen_registered_phone\" type=\"tel\"\r\n placeholder=\"Enter phone number\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Email\" formControlName=\"syen_registered_email\" type=\"email\"\r\n placeholder=\"Enter email address\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Fax\" formControlName=\"syen_registered_fax\" placeholder=\"Enter fax number\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @case ('user-mapping') {\r\n <div class=\"tw-p-2\">\r\n <div class=\"tw-space-y-4\">\r\n <!-- Add User Mapping Form -->\r\n <div class=\"tw-bg-white tw-p-4 tw-rounded-lg tw-border tw-shadow-sm\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mb-3\">\r\n <cide-ele-icon class=\"tw-text-blue-600 tw-text-sm\">person_add</cide-ele-icon>\r\n <h3 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Add User to Entity</h3>\r\n </div>\r\n\r\n <form [formGroup]=\"userMappingForm\" (ngSubmit)=\"addUserMapping()\">\r\n <div class=\"tw-flex tw-items-end tw-gap-3\">\r\n <div class=\"tw-flex-1\">\r\n <cide-ele-select label=\"Select User\" [options]=\"availableUsers()\" formControlName=\"syenm_id_user\"\r\n placeholder=\"Choose user to add to entity\" [searchable]=\"true\"\r\n [loading]=\"availableUsersLoading()\" size=\"md\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Add Button -->\r\n <div class=\"tw-flex tw-items-end\">\r\n <button cideEleButton type=\"submit\" variant=\"primary\" size=\"sm\"\r\n [disabled]=\"userMappingForm.invalid || availableUsersLoading()\"\r\n class=\"tw-shadow-sm tw-h-8 tw-px-3\">\r\n <cide-ele-icon class=\"tw-mr-1 tw-text-xs\">add</cide-ele-icon>\r\n <span class=\"tw-text-xs\">Add</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n <!-- User Mappings Grid -->\r\n <div class=\"tw-bg-white tw-rounded-md tw-border tw-overflow-hidden tw-shadow-sm\">\r\n @if (userEntityMappingsLoading()) {\r\n <div class=\"tw-p-4 tw-text-center\">\r\n <div class=\"tw-inline-flex tw-items-center tw-gap-2 tw-text-gray-500\">\r\n <div class=\"tw-animate-spin tw-rounded-full tw-h-3 tw-w-3 tw-border-b-2 tw-border-gray-500\"></div>\r\n <span class=\"tw-text-xs\">Loading...</span>\r\n </div>\r\n </div>\r\n } @else if (userEntityMappings().length === 0) {\r\n <div class=\"tw-p-4 tw-text-center tw-text-gray-500\">\r\n <cide-ele-icon class=\"tw-text-2xl tw-mb-1 tw-text-gray-300\">people_outline</cide-ele-icon>\r\n <p class=\"tw-text-sm tw-font-medium tw-mb-1\">No users mapped yet</p>\r\n <p class=\"tw-text-xs tw-text-gray-400\">Add users above to grant them access to this entity</p>\r\n </div>\r\n } @else {\r\n <cide-ele-data-grid [config]=\"userMappingsGridConfig\" [templateRenderers]=\"getUserMappingsTemplateRenderers()\">\r\n\r\n <!-- Custom user cell template -->\r\n <ng-template #userCell let-row=\"row\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <div\r\n class=\"tw-w-6 tw-h-6 tw-bg-gradient-to-br tw-from-blue-100 tw-to-indigo-100 tw-rounded-full tw-flex tw-items-center tw-justify-center tw-shadow-sm\">\r\n <cide-ele-icon class=\"tw-text-blue-600 tw-text-xs\">person</cide-ele-icon>\r\n </div>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-font-medium tw-text-gray-900 tw-text-xs\">\r\n {{ row?._displayUserName }}\r\n </span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Custom actions cell template -->\r\n <ng-template #actionsCell let-row=\"row\">\r\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-justify-center\">\r\n <button\r\n (click)=\"updateUserMapping(row._id!, { syenm_isactive: !row.syenm_isactive })\"\r\n class=\"tw-w-8 tw-h-8 tw-flex tw-items-center tw-justify-center tw-rounded-md tw-transition-colors tw-border tw-border-transparent hover:tw-border-gray-300\"\r\n [class.tw-bg-green-100]=\"row.syenm_isactive\"\r\n [class.tw-text-green-700]=\"row.syenm_isactive\"\r\n [class.tw-bg-gray-100]=\"!row.syenm_isactive\"\r\n [class.tw-text-gray-600]=\"!row.syenm_isactive\"\r\n [title]=\"row.syenm_isactive ? 'Deactivate' : 'Activate'\">\r\n <cide-ele-icon class=\"tw-text-sm\">\r\n {{ row.syenm_isactive ? 'pause' : 'play_arrow' }}\r\n </cide-ele-icon>\r\n </button>\r\n\r\n <button (click)=\"removeUserMapping(row._id!)\"\r\n class=\"tw-w-8 tw-h-8 tw-flex tw-items-center tw-justify-center tw-rounded-md tw-bg-red-100 tw-text-red-600 hover:tw-bg-red-200 tw-transition-colors tw-border tw-border-transparent hover:tw-border-red-300\"\r\n title=\"Remove User\">\r\n <cide-ele-icon class=\"tw-text-sm\">delete</cide-ele-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </cide-ele-data-grid>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n }\r\n\r\n <!-- Form Actions -->\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-flex tw-items-center tw-justify-between tw-gap-3\">\r\n <!-- Error Message (Left Side) -->\r\n <cide-form-field-error [formGroup]=\"entityForm\"></cide-form-field-error>\r\n\r\n <!-- Action Buttons (Right Side) -->\r\n <div class=\"tw-flex tw-gap-3\">\r\n <button cideEleButton type=\"button\" variant=\"outline\" size=\"md\" (click)=\"onBack()\"\r\n [disabled]=\"loading()\">\r\n <cide-ele-icon>arrow_back</cide-ele-icon>\r\n Back\r\n </button>\r\n\r\n <button cideEleButton type=\"button\" variant=\"secondary\" size=\"md\" (click)=\"onReset()\"\r\n [disabled]=\"loading()\">\r\n <cide-ele-icon>refresh</cide-ele-icon>\r\n Reset Form\r\n </button>\r\n\r\n <button cideEleButton type=\"submit\" variant=\"primary\" size=\"md\"\r\n [disabled]=\"loading() || entityForm.invalid\" [loading]=\"loading()\">\r\n <cide-ele-icon>{{ isEditMode() ? 'save' : 'add' }}</cide-ele-icon>\r\n {{ isEditMode() ? 'Update Entity' : 'Create Entity' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n</cide-lyt-shared-wrapper>", styles: [""], dependencies: [{ 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }, { 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", "step", "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", "treeView"], 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: CideEleFileInputComponent, selector: "cide-ele-file-input", inputs: ["label", "accept", "multiple", "disabled", "required", "helperText", "errorText", "showPreview", "previewWidth", "previewHeight", "previewBoxMode", "showFileName", "placeholderText", "placeholderIcon", "autoUpload", "uploadData", "showFloatingUploader", "floatingUploaderGroupId"], outputs: ["fileChange", "uploadSuccess", "uploadError", "uploadProgressChange"] }, { kind: "component", type: CideEleTabComponent, selector: "cide-ele-tab", inputs: ["tabs", "activeTabId", "size", "variant", "fullWidth", "disabled"], outputs: ["tabChange"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }] });
|
|
11227
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreEntityCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11228
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreEntityCreateComponent, isStandalone: true, selector: "cide-core-entity-create", viewQueries: [{ propertyName: "userCellRendererTemplate", first: true, predicate: ["userCell"], descendants: true, isSignal: true }, { propertyName: "actionsCellRendererTemplate", first: true, predicate: ["actionsCell"], descendants: true, isSignal: true }], ngImport: i0, template: "<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_entity_form' }\"\r\n [breadcrumb_data]=\"breadcrumbData()\">\r\n <!-- Modern Entity Create Form -->\r\n <div class=\"tw-min-h-screen\">\r\n <div class=\"tw-mx-auto\">\r\n\r\n <form [formGroup]=\"entityForm\" [class.tw-opacity-60]=\"loading()\" [class.tw-pointer-events-none]=\"loading()\"\r\n (ngSubmit)=\"onSubmit()\">\r\n\r\n <!-- Breadcrumb is now rendered by shared wrapper; inline breadcrumb removed -->\r\n\r\n <!-- Basic Information Section -->\r\n <div class=\"tw-p-2 tw-pb-0\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Top Section: Image on Right, Form Fields on Left -->\r\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-[1fr_200px] tw-gap-4\">\r\n <!-- Left Side: Form Fields -->\r\n <div class=\"tw-space-y-6\">\r\n <!-- Institution Name, Entity Type & Active Status -->\r\n <div\r\n class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[1fr_250px_120px] tw-gap-4 tw-items-end\">\r\n <cide-ele-input id=\"syen_name\" type=\"text\" label=\"Institution Name\" formControlName=\"syen_name\"\r\n placeholder=\"Enter institution name\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-select label=\"Entity Type\" labelPlacement=\"floating\" [options]=\"entityTypes()\"\r\n formControlName=\"syen_entity_type_sygms\" placeholder=\"Select institution type\" size=\"sm\">\r\n </cide-ele-select>\r\n\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-gap-1 tw-h-full\">\r\n <cide-ele-input type=\"checkbox\" formControlName=\"syen_isactive\" size=\"sm\" label=\"Is Active\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n\r\n <!-- UDISE, Affiliation & Institution Code -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-3 tw-gap-4\">\r\n <cide-ele-input label=\"UDISE Number\" formControlName=\"syen_udise_no\" placeholder=\"Enter UDISE number\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Affiliation Number\" formControlName=\"syen_affiliation_no\"\r\n placeholder=\"Enter affiliation number\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Institution Code\" formControlName=\"syen_entity_code\"\r\n placeholder=\"Enter unique code\" size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n\r\n <!-- Right Side: Entity Image Upload -->\r\n <div class=\"tw-flex tw-items-start tw-justify-center tw-pt-0\">\r\n <cide-ele-file-input id=\"entity_image_upload\" formControlName=\"syen_photo_id_cyfm\" accept=\"image/*\"\r\n [showPreview]=\"true\" [previewBoxMode]=\"true\" [showFileName]=\"false\" previewWidth=\"180px\"\r\n previewHeight=\"120px\" [required]=\"true\" placeholderText=\"Upload Logo\" placeholderIcon=\"cloud_upload\"\r\n [autoUpload]=\"true\" [uploadData]=\"getUploadData()\" (uploadSuccess)=\"onImageUploadSuccess($event)\"\r\n (uploadError)=\"onImageUploadError($event)\" (uploadProgressChange)=\"onImageUploadProgress($event)\">\r\n </cide-ele-file-input>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Tab Navigation -->\r\n <div class=\"tw-px-4 !tw-mt-0\">\r\n <cide-ele-tab [tabs]=\"entityTabs()\" [activeTabId]=\"activeTab()\" size=\"sm\" variant=\"default\"\r\n (tabChange)=\"onTabChange($event)\">\r\n </cide-ele-tab>\r\n </div>\r\n\r\n <!-- Tab Content -->\r\n <div class=\"tw-transition-all tw-duration-300 tw-ease-in-out !tw-mt-2\" [class.tw-opacity-60]=\"loading()\"\r\n [class.tw-pointer-events-none]=\"loading()\">\r\n @switch (activeTab()) {\r\n\r\n @case ('corporate') {\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Corporate Address - Full Width -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-textarea label=\"Corporate Address\" formControlName=\"syen_corporate_address\"\r\n placeholder=\"Enter complete corporate address\" [rows]=\"4\">\r\n </cide-ele-textarea>\r\n </div>\r\n\r\n <!-- Postal Code, City, State & Country - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[220px_0.8fr_0.7fr_240px] tw-gap-6\">\r\n <cide-ele-select label=\"Postal Code\" [options]=\"postalCodes()\"\r\n formControlName=\"syen_corporate_pin_sypin\" placeholder=\"Select postal code\" [searchable]=\"true\"\r\n [loading]=\"postalCodesLoading()\" (searchChange)=\"onPostalCodeSearch($event)\" size=\"sm\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"City\" formControlName=\"syen_corporate_city_sypin\" placeholder=\"Enter city name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"State\" formControlName=\"syen_corporate_state_sypin\"\r\n placeholder=\"Enter state name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-select label=\"Country\" [options]=\"corporateCountries()\"\r\n formControlName=\"syen_corporate_country_syctr\" placeholder=\"Select country\" [searchable]=\"true\"\r\n (searchChange)=\"onCorporateCountrySearch($event)\" [loading]=\"corporateCountriesLoading()\" size=\"sm\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Contact Person, Phone, Email & Fax - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[1fr_200px_1fr_150px] tw-gap-6\">\r\n <cide-ele-select label=\"Contact Person\" [options]=\"users()\"\r\n formControlName=\"syen_corporate_contact_person_user\" placeholder=\"Select contact person\"\r\n [searchable]=\"true\" [loading]=\"usersLoading()\" (searchChange)=\"onUserSearch($event)\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"Phone\" formControlName=\"syen_corporate_phone\" type=\"tel\"\r\n placeholder=\"Enter phone number\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Email\" formControlName=\"syen_corporate_email\" type=\"email\"\r\n placeholder=\"Enter email address\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Fax\" formControlName=\"syen_corporate_fax\" placeholder=\"Enter fax number\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @case ('contact') {\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Currency Selection -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-select label=\"Currency\" [options]=\"currencies()\" formControlName=\"syen_currency_sycr\"\r\n placeholder=\"Select currency\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Alternate Phone & Website - Two Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input label=\"Alternate Phone\" formControlName=\"syen_corporate_phone_alt\" type=\"tel\"\r\n placeholder=\"Enter alternate phone number\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Website URL\" formControlName=\"syen_website\" type=\"url\"\r\n placeholder=\"https://example.com\" autocomplete=\"url\" leadingIcon=\"language\"\r\n helperText=\"Enter a valid website URL starting with http:// or https://\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Alternate Email - Full Width -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-input label=\"Alternate Email\" formControlName=\"syen_corporate_email_alt\" type=\"email\"\r\n placeholder=\"Enter alternate email address\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @case ('registered') {\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Registered Address - Full Width -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-textarea label=\"Registered Address\" formControlName=\"syen_registered_address\"\r\n placeholder=\"Enter complete registered address\" [rows]=\"4\">\r\n </cide-ele-textarea>\r\n </div>\r\n\r\n <!-- Postal Code, City, State & Country - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[220px_0.8fr_0.7fr_240px] tw-gap-6\">\r\n <cide-ele-select label=\"Postal Code\" [options]=\"postalCodes()\"\r\n formControlName=\"syen_registered_pin_sypin\" placeholder=\"Select postal code\" [searchable]=\"true\"\r\n [loading]=\"postalCodesLoading()\" (searchChange)=\"onPostalCodeSearch($event)\" size=\"sm\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"City\" formControlName=\"syen_registered_city_sypin\" placeholder=\"Enter city name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"State\" formControlName=\"syen_registered_state_sypin\"\r\n placeholder=\"Enter state name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-select label=\"Country\" [options]=\"registeredCountries()\"\r\n formControlName=\"syen_registered_country_syctr\" placeholder=\"Select country\" [searchable]=\"true\"\r\n (searchChange)=\"onRegisteredCountrySearch($event)\" [loading]=\"registeredCountriesLoading()\" size=\"sm\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Contact Person, Phone, Email & Fax - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[1fr_200px_1fr_150px] tw-gap-6\">\r\n <cide-ele-select label=\"Contact Person\" [options]=\"users()\"\r\n formControlName=\"syen_registered_contact_person_user\" placeholder=\"Select contact person\"\r\n [searchable]=\"true\" [loading]=\"usersLoading()\" (searchChange)=\"onUserSearch($event)\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"Phone\" formControlName=\"syen_registered_phone\" type=\"tel\"\r\n placeholder=\"Enter phone number\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Email\" formControlName=\"syen_registered_email\" type=\"email\"\r\n placeholder=\"Enter email address\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Fax\" formControlName=\"syen_registered_fax\" placeholder=\"Enter fax number\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @case ('user-mapping') {\r\n <div class=\"tw-p-2\">\r\n <div class=\"tw-space-y-4\">\r\n <!-- Add User Mapping Form -->\r\n <div class=\"tw-bg-white tw-p-4 tw-rounded-lg tw-border tw-shadow-sm\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mb-3\">\r\n <cide-ele-icon class=\"tw-text-blue-600 tw-text-sm\">person_add</cide-ele-icon>\r\n <h3 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Add User to Entity</h3>\r\n </div>\r\n\r\n <form [formGroup]=\"userMappingForm\" (ngSubmit)=\"addUserMapping()\">\r\n <div class=\"tw-flex tw-items-end tw-gap-3\">\r\n <div class=\"tw-flex-1\">\r\n <cide-ele-select label=\"Select User\" [options]=\"availableUsers()\" formControlName=\"syenm_id_user\"\r\n placeholder=\"Choose user to add to entity\" [searchable]=\"true\"\r\n [loading]=\"availableUsersLoading()\" size=\"md\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Add Button -->\r\n <div class=\"tw-flex tw-items-end\">\r\n <button cideEleButton type=\"submit\" variant=\"primary\" size=\"sm\"\r\n [disabled]=\"userMappingForm.invalid || availableUsersLoading()\"\r\n class=\"tw-shadow-sm tw-h-8 tw-px-3\">\r\n <cide-ele-icon class=\"tw-mr-1 tw-text-xs\">add</cide-ele-icon>\r\n <span class=\"tw-text-xs\">Add</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n <!-- User Mappings Grid -->\r\n <div class=\"tw-bg-white tw-rounded-md tw-border tw-overflow-hidden tw-shadow-sm\">\r\n @if (userEntityMappingsLoading()) {\r\n <div class=\"tw-p-4 tw-text-center\">\r\n <div class=\"tw-inline-flex tw-items-center tw-gap-2 tw-text-gray-500\">\r\n <div class=\"tw-animate-spin tw-rounded-full tw-h-3 tw-w-3 tw-border-b-2 tw-border-gray-500\"></div>\r\n <span class=\"tw-text-xs\">Loading...</span>\r\n </div>\r\n </div>\r\n } @else if (userEntityMappings().length === 0) {\r\n <div class=\"tw-p-4 tw-text-center tw-text-gray-500\">\r\n <cide-ele-icon class=\"tw-text-2xl tw-mb-1 tw-text-gray-300\">people_outline</cide-ele-icon>\r\n <p class=\"tw-text-sm tw-font-medium tw-mb-1\">No users mapped yet</p>\r\n <p class=\"tw-text-xs tw-text-gray-400\">Add users above to grant them access to this entity</p>\r\n </div>\r\n } @else {\r\n <cide-ele-data-grid [config]=\"userMappingsGridConfig\" [templateRenderers]=\"getUserMappingsTemplateRenderers()\">\r\n\r\n <!-- Custom user cell template -->\r\n <ng-template #userCell let-row=\"row\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <div\r\n class=\"tw-w-6 tw-h-6 tw-bg-gradient-to-br tw-from-blue-100 tw-to-indigo-100 tw-rounded-full tw-flex tw-items-center tw-justify-center tw-shadow-sm\">\r\n <cide-ele-icon class=\"tw-text-blue-600 tw-text-xs\">person</cide-ele-icon>\r\n </div>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-font-medium tw-text-gray-900 tw-text-xs\">\r\n {{ row?._displayUserName }}\r\n </span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Custom actions cell template -->\r\n <ng-template #actionsCell let-row=\"row\">\r\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-justify-center\">\r\n <button\r\n (click)=\"updateUserMapping(row._id!, { syenm_isactive: !row.syenm_isactive })\"\r\n class=\"tw-w-8 tw-h-8 tw-flex tw-items-center tw-justify-center tw-rounded-md tw-transition-colors tw-border tw-border-transparent hover:tw-border-gray-300\"\r\n [class.tw-bg-green-100]=\"row.syenm_isactive\"\r\n [class.tw-text-green-700]=\"row.syenm_isactive\"\r\n [class.tw-bg-gray-100]=\"!row.syenm_isactive\"\r\n [class.tw-text-gray-600]=\"!row.syenm_isactive\"\r\n [title]=\"row.syenm_isactive ? 'Deactivate' : 'Activate'\">\r\n <cide-ele-icon class=\"tw-text-sm\">\r\n {{ row.syenm_isactive ? 'pause' : 'play_arrow' }}\r\n </cide-ele-icon>\r\n </button>\r\n\r\n <button (click)=\"removeUserMapping(row._id!)\"\r\n class=\"tw-w-8 tw-h-8 tw-flex tw-items-center tw-justify-center tw-rounded-md tw-bg-red-100 tw-text-red-600 hover:tw-bg-red-200 tw-transition-colors tw-border tw-border-transparent hover:tw-border-red-300\"\r\n title=\"Remove User\">\r\n <cide-ele-icon class=\"tw-text-sm\">delete</cide-ele-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </cide-ele-data-grid>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n }\r\n\r\n <!-- Form Actions -->\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-flex tw-items-center tw-justify-between tw-gap-3\">\r\n <!-- Error Message (Left Side) -->\r\n <cide-form-field-error [formGroup]=\"entityForm\"></cide-form-field-error>\r\n\r\n <!-- Action Buttons (Right Side) -->\r\n <div class=\"tw-flex tw-gap-3\">\r\n <button cideEleButton type=\"button\" variant=\"outline\" size=\"md\" (click)=\"onBack()\"\r\n [disabled]=\"loading()\">\r\n <cide-ele-icon>arrow_back</cide-ele-icon>\r\n Back\r\n </button>\r\n\r\n <button cideEleButton type=\"button\" variant=\"secondary\" size=\"md\" (click)=\"onReset()\"\r\n [disabled]=\"loading()\">\r\n <cide-ele-icon>refresh</cide-ele-icon>\r\n Reset Form\r\n </button>\r\n\r\n <button cideEleButton type=\"submit\" variant=\"primary\" size=\"md\"\r\n [disabled]=\"loading() || entityForm.invalid\" [loading]=\"loading()\">\r\n <cide-ele-icon>{{ isEditMode() ? 'save' : 'add' }}</cide-ele-icon>\r\n {{ isEditMode() ? 'Update Entity' : 'Create Entity' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n</cide-lyt-shared-wrapper>", styles: [""], dependencies: [{ 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.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }, { 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", "step", "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", "treeView"], 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: CideEleFileInputComponent, selector: "cide-ele-file-input", inputs: ["label", "accept", "multiple", "disabled", "required", "helperText", "errorText", "showPreview", "previewWidth", "previewHeight", "previewBoxMode", "showFileName", "placeholderText", "placeholderIcon", "autoUpload", "uploadData", "showFloatingUploader", "floatingUploaderGroupId"], outputs: ["fileChange", "uploadSuccess", "uploadError", "uploadProgressChange"] }, { kind: "component", type: CideEleTabComponent, selector: "cide-ele-tab", inputs: ["tabs", "activeTabId", "size", "variant", "fullWidth", "disabled"], outputs: ["tabChange"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }] });
|
|
11149
11229
|
}
|
|
11150
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
11230
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreEntityCreateComponent, decorators: [{
|
|
11151
11231
|
type: Component,
|
|
11152
11232
|
args: [{ selector: 'cide-core-entity-create', imports: [
|
|
11153
11233
|
ReactiveFormsModule,
|
|
@@ -11162,7 +11242,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
11162
11242
|
CideFormFieldErrorComponent,
|
|
11163
11243
|
CideEleDataGridComponent,
|
|
11164
11244
|
], template: "<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_entity_form' }\"\r\n [breadcrumb_data]=\"breadcrumbData()\">\r\n <!-- Modern Entity Create Form -->\r\n <div class=\"tw-min-h-screen\">\r\n <div class=\"tw-mx-auto\">\r\n\r\n <form [formGroup]=\"entityForm\" [class.tw-opacity-60]=\"loading()\" [class.tw-pointer-events-none]=\"loading()\"\r\n (ngSubmit)=\"onSubmit()\">\r\n\r\n <!-- Breadcrumb is now rendered by shared wrapper; inline breadcrumb removed -->\r\n\r\n <!-- Basic Information Section -->\r\n <div class=\"tw-p-2 tw-pb-0\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Top Section: Image on Right, Form Fields on Left -->\r\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-[1fr_200px] tw-gap-4\">\r\n <!-- Left Side: Form Fields -->\r\n <div class=\"tw-space-y-6\">\r\n <!-- Institution Name, Entity Type & Active Status -->\r\n <div\r\n class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[1fr_250px_120px] tw-gap-4 tw-items-end\">\r\n <cide-ele-input id=\"syen_name\" type=\"text\" label=\"Institution Name\" formControlName=\"syen_name\"\r\n placeholder=\"Enter institution name\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-select label=\"Entity Type\" labelPlacement=\"floating\" [options]=\"entityTypes()\"\r\n formControlName=\"syen_entity_type_sygms\" placeholder=\"Select institution type\" size=\"sm\">\r\n </cide-ele-select>\r\n\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-gap-1 tw-h-full\">\r\n <cide-ele-input type=\"checkbox\" formControlName=\"syen_isactive\" size=\"sm\" label=\"Is Active\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n\r\n <!-- UDISE, Affiliation & Institution Code -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-3 tw-gap-4\">\r\n <cide-ele-input label=\"UDISE Number\" formControlName=\"syen_udise_no\" placeholder=\"Enter UDISE number\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Affiliation Number\" formControlName=\"syen_affiliation_no\"\r\n placeholder=\"Enter affiliation number\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Institution Code\" formControlName=\"syen_entity_code\"\r\n placeholder=\"Enter unique code\" size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n\r\n <!-- Right Side: Entity Image Upload -->\r\n <div class=\"tw-flex tw-items-start tw-justify-center tw-pt-0\">\r\n <cide-ele-file-input id=\"entity_image_upload\" formControlName=\"syen_photo_id_cyfm\" accept=\"image/*\"\r\n [showPreview]=\"true\" [previewBoxMode]=\"true\" [showFileName]=\"false\" previewWidth=\"180px\"\r\n previewHeight=\"120px\" [required]=\"true\" placeholderText=\"Upload Logo\" placeholderIcon=\"cloud_upload\"\r\n [autoUpload]=\"true\" [uploadData]=\"getUploadData()\" (uploadSuccess)=\"onImageUploadSuccess($event)\"\r\n (uploadError)=\"onImageUploadError($event)\" (uploadProgressChange)=\"onImageUploadProgress($event)\">\r\n </cide-ele-file-input>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Tab Navigation -->\r\n <div class=\"tw-px-4 !tw-mt-0\">\r\n <cide-ele-tab [tabs]=\"entityTabs()\" [activeTabId]=\"activeTab()\" size=\"sm\" variant=\"default\"\r\n (tabChange)=\"onTabChange($event)\">\r\n </cide-ele-tab>\r\n </div>\r\n\r\n <!-- Tab Content -->\r\n <div class=\"tw-transition-all tw-duration-300 tw-ease-in-out !tw-mt-2\" [class.tw-opacity-60]=\"loading()\"\r\n [class.tw-pointer-events-none]=\"loading()\">\r\n @switch (activeTab()) {\r\n\r\n @case ('corporate') {\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Corporate Address - Full Width -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-textarea label=\"Corporate Address\" formControlName=\"syen_corporate_address\"\r\n placeholder=\"Enter complete corporate address\" [rows]=\"4\">\r\n </cide-ele-textarea>\r\n </div>\r\n\r\n <!-- Postal Code, City, State & Country - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[220px_0.8fr_0.7fr_240px] tw-gap-6\">\r\n <cide-ele-select label=\"Postal Code\" [options]=\"postalCodes()\"\r\n formControlName=\"syen_corporate_pin_sypin\" placeholder=\"Select postal code\" [searchable]=\"true\"\r\n [loading]=\"postalCodesLoading()\" (searchChange)=\"onPostalCodeSearch($event)\" size=\"sm\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"City\" formControlName=\"syen_corporate_city_sypin\" placeholder=\"Enter city name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"State\" formControlName=\"syen_corporate_state_sypin\"\r\n placeholder=\"Enter state name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-select label=\"Country\" [options]=\"corporateCountries()\"\r\n formControlName=\"syen_corporate_country_syctr\" placeholder=\"Select country\" [searchable]=\"true\"\r\n (searchChange)=\"onCorporateCountrySearch($event)\" [loading]=\"corporateCountriesLoading()\" size=\"sm\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Contact Person, Phone, Email & Fax - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[1fr_200px_1fr_150px] tw-gap-6\">\r\n <cide-ele-select label=\"Contact Person\" [options]=\"users()\"\r\n formControlName=\"syen_corporate_contact_person_user\" placeholder=\"Select contact person\"\r\n [searchable]=\"true\" [loading]=\"usersLoading()\" (searchChange)=\"onUserSearch($event)\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"Phone\" formControlName=\"syen_corporate_phone\" type=\"tel\"\r\n placeholder=\"Enter phone number\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Email\" formControlName=\"syen_corporate_email\" type=\"email\"\r\n placeholder=\"Enter email address\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Fax\" formControlName=\"syen_corporate_fax\" placeholder=\"Enter fax number\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @case ('contact') {\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Currency Selection -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-select label=\"Currency\" [options]=\"currencies()\" formControlName=\"syen_currency_sycr\"\r\n placeholder=\"Select currency\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Alternate Phone & Website - Two Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input label=\"Alternate Phone\" formControlName=\"syen_corporate_phone_alt\" type=\"tel\"\r\n placeholder=\"Enter alternate phone number\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Website URL\" formControlName=\"syen_website\" type=\"url\"\r\n placeholder=\"https://example.com\" autocomplete=\"url\" leadingIcon=\"language\"\r\n helperText=\"Enter a valid website URL starting with http:// or https://\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <!-- Alternate Email - Full Width -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-input label=\"Alternate Email\" formControlName=\"syen_corporate_email_alt\" type=\"email\"\r\n placeholder=\"Enter alternate email address\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @case ('registered') {\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-space-y-6\">\r\n <!-- Registered Address - Full Width -->\r\n <div class=\"tw-w-full\">\r\n <cide-ele-textarea label=\"Registered Address\" formControlName=\"syen_registered_address\"\r\n placeholder=\"Enter complete registered address\" [rows]=\"4\">\r\n </cide-ele-textarea>\r\n </div>\r\n\r\n <!-- Postal Code, City, State & Country - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[220px_0.8fr_0.7fr_240px] tw-gap-6\">\r\n <cide-ele-select label=\"Postal Code\" [options]=\"postalCodes()\"\r\n formControlName=\"syen_registered_pin_sypin\" placeholder=\"Select postal code\" [searchable]=\"true\"\r\n [loading]=\"postalCodesLoading()\" (searchChange)=\"onPostalCodeSearch($event)\" size=\"sm\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"City\" formControlName=\"syen_registered_city_sypin\" placeholder=\"Enter city name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"State\" formControlName=\"syen_registered_state_sypin\"\r\n placeholder=\"Enter state name\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-select label=\"Country\" [options]=\"registeredCountries()\"\r\n formControlName=\"syen_registered_country_syctr\" placeholder=\"Select country\" [searchable]=\"true\"\r\n (searchChange)=\"onRegisteredCountrySearch($event)\" [loading]=\"registeredCountriesLoading()\" size=\"sm\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Contact Person, Phone, Email & Fax - Four Columns -->\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-[1fr_200px_1fr_150px] tw-gap-6\">\r\n <cide-ele-select label=\"Contact Person\" [options]=\"users()\"\r\n formControlName=\"syen_registered_contact_person_user\" placeholder=\"Select contact person\"\r\n [searchable]=\"true\" [loading]=\"usersLoading()\" (searchChange)=\"onUserSearch($event)\">\r\n </cide-ele-select>\r\n\r\n <cide-ele-input label=\"Phone\" formControlName=\"syen_registered_phone\" type=\"tel\"\r\n placeholder=\"Enter phone number\" size=\"sm\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Email\" formControlName=\"syen_registered_email\" type=\"email\"\r\n placeholder=\"Enter email address\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Fax\" formControlName=\"syen_registered_fax\" placeholder=\"Enter fax number\"\r\n size=\"sm\">\r\n </cide-ele-input>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n @case ('user-mapping') {\r\n <div class=\"tw-p-2\">\r\n <div class=\"tw-space-y-4\">\r\n <!-- Add User Mapping Form -->\r\n <div class=\"tw-bg-white tw-p-4 tw-rounded-lg tw-border tw-shadow-sm\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-mb-3\">\r\n <cide-ele-icon class=\"tw-text-blue-600 tw-text-sm\">person_add</cide-ele-icon>\r\n <h3 class=\"tw-text-sm tw-font-semibold tw-text-gray-800\">Add User to Entity</h3>\r\n </div>\r\n\r\n <form [formGroup]=\"userMappingForm\" (ngSubmit)=\"addUserMapping()\">\r\n <div class=\"tw-flex tw-items-end tw-gap-3\">\r\n <div class=\"tw-flex-1\">\r\n <cide-ele-select label=\"Select User\" [options]=\"availableUsers()\" formControlName=\"syenm_id_user\"\r\n placeholder=\"Choose user to add to entity\" [searchable]=\"true\"\r\n [loading]=\"availableUsersLoading()\" size=\"md\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <!-- Add Button -->\r\n <div class=\"tw-flex tw-items-end\">\r\n <button cideEleButton type=\"submit\" variant=\"primary\" size=\"sm\"\r\n [disabled]=\"userMappingForm.invalid || availableUsersLoading()\"\r\n class=\"tw-shadow-sm tw-h-8 tw-px-3\">\r\n <cide-ele-icon class=\"tw-mr-1 tw-text-xs\">add</cide-ele-icon>\r\n <span class=\"tw-text-xs\">Add</span>\r\n </button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n <!-- User Mappings Grid -->\r\n <div class=\"tw-bg-white tw-rounded-md tw-border tw-overflow-hidden tw-shadow-sm\">\r\n @if (userEntityMappingsLoading()) {\r\n <div class=\"tw-p-4 tw-text-center\">\r\n <div class=\"tw-inline-flex tw-items-center tw-gap-2 tw-text-gray-500\">\r\n <div class=\"tw-animate-spin tw-rounded-full tw-h-3 tw-w-3 tw-border-b-2 tw-border-gray-500\"></div>\r\n <span class=\"tw-text-xs\">Loading...</span>\r\n </div>\r\n </div>\r\n } @else if (userEntityMappings().length === 0) {\r\n <div class=\"tw-p-4 tw-text-center tw-text-gray-500\">\r\n <cide-ele-icon class=\"tw-text-2xl tw-mb-1 tw-text-gray-300\">people_outline</cide-ele-icon>\r\n <p class=\"tw-text-sm tw-font-medium tw-mb-1\">No users mapped yet</p>\r\n <p class=\"tw-text-xs tw-text-gray-400\">Add users above to grant them access to this entity</p>\r\n </div>\r\n } @else {\r\n <cide-ele-data-grid [config]=\"userMappingsGridConfig\" [templateRenderers]=\"getUserMappingsTemplateRenderers()\">\r\n\r\n <!-- Custom user cell template -->\r\n <ng-template #userCell let-row=\"row\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <div\r\n class=\"tw-w-6 tw-h-6 tw-bg-gradient-to-br tw-from-blue-100 tw-to-indigo-100 tw-rounded-full tw-flex tw-items-center tw-justify-center tw-shadow-sm\">\r\n <cide-ele-icon class=\"tw-text-blue-600 tw-text-xs\">person</cide-ele-icon>\r\n </div>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-font-medium tw-text-gray-900 tw-text-xs\">\r\n {{ row?._displayUserName }}\r\n </span>\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Custom actions cell template -->\r\n <ng-template #actionsCell let-row=\"row\">\r\n <div class=\"tw-flex tw-items-center tw-gap-1 tw-justify-center\">\r\n <button\r\n (click)=\"updateUserMapping(row._id!, { syenm_isactive: !row.syenm_isactive })\"\r\n class=\"tw-w-8 tw-h-8 tw-flex tw-items-center tw-justify-center tw-rounded-md tw-transition-colors tw-border tw-border-transparent hover:tw-border-gray-300\"\r\n [class.tw-bg-green-100]=\"row.syenm_isactive\"\r\n [class.tw-text-green-700]=\"row.syenm_isactive\"\r\n [class.tw-bg-gray-100]=\"!row.syenm_isactive\"\r\n [class.tw-text-gray-600]=\"!row.syenm_isactive\"\r\n [title]=\"row.syenm_isactive ? 'Deactivate' : 'Activate'\">\r\n <cide-ele-icon class=\"tw-text-sm\">\r\n {{ row.syenm_isactive ? 'pause' : 'play_arrow' }}\r\n </cide-ele-icon>\r\n </button>\r\n\r\n <button (click)=\"removeUserMapping(row._id!)\"\r\n class=\"tw-w-8 tw-h-8 tw-flex tw-items-center tw-justify-center tw-rounded-md tw-bg-red-100 tw-text-red-600 hover:tw-bg-red-200 tw-transition-colors tw-border tw-border-transparent hover:tw-border-red-300\"\r\n title=\"Remove User\">\r\n <cide-ele-icon class=\"tw-text-sm\">delete</cide-ele-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </cide-ele-data-grid>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n\r\n }\r\n\r\n <!-- Form Actions -->\r\n <div class=\"tw-p-4\">\r\n <div class=\"tw-flex tw-items-center tw-justify-between tw-gap-3\">\r\n <!-- Error Message (Left Side) -->\r\n <cide-form-field-error [formGroup]=\"entityForm\"></cide-form-field-error>\r\n\r\n <!-- Action Buttons (Right Side) -->\r\n <div class=\"tw-flex tw-gap-3\">\r\n <button cideEleButton type=\"button\" variant=\"outline\" size=\"md\" (click)=\"onBack()\"\r\n [disabled]=\"loading()\">\r\n <cide-ele-icon>arrow_back</cide-ele-icon>\r\n Back\r\n </button>\r\n\r\n <button cideEleButton type=\"button\" variant=\"secondary\" size=\"md\" (click)=\"onReset()\"\r\n [disabled]=\"loading()\">\r\n <cide-ele-icon>refresh</cide-ele-icon>\r\n Reset Form\r\n </button>\r\n\r\n <button cideEleButton type=\"submit\" variant=\"primary\" size=\"md\"\r\n [disabled]=\"loading() || entityForm.invalid\" [loading]=\"loading()\">\r\n <cide-ele-icon>{{ isEditMode() ? 'save' : 'add' }}</cide-ele-icon>\r\n {{ isEditMode() ? 'Update Entity' : 'Create Entity' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n </div>\r\n</cide-lyt-shared-wrapper>" }]
|
|
11165
|
-
}], ctorParameters: () => [] });
|
|
11245
|
+
}], ctorParameters: () => [], propDecorators: { userCellRendererTemplate: [{ type: i0.ViewChild, args: ['userCell', { isSignal: true }] }], actionsCellRendererTemplate: [{ type: i0.ViewChild, args: ['actionsCell', { isSignal: true }] }] } });
|
|
11166
11246
|
|
|
11167
11247
|
var entityCreate_component = /*#__PURE__*/Object.freeze({
|
|
11168
11248
|
__proto__: null,
|
|
@@ -11193,31 +11273,15 @@ class CideCoreEntityListComponent {
|
|
|
11193
11273
|
currentPage = signal(1, ...(ngDevMode ? [{ debugName: "currentPage" }] : []));
|
|
11194
11274
|
pageSize = signal(10, ...(ngDevMode ? [{ debugName: "pageSize" }] : []));
|
|
11195
11275
|
totalItems = signal(0, ...(ngDevMode ? [{ debugName: "totalItems" }] : []));
|
|
11196
|
-
selectedEntityType = signal('', ...(ngDevMode ? [{ debugName: "selectedEntityType" }] : []));
|
|
11197
11276
|
// Entity type lookup map (ID -> Name)
|
|
11198
11277
|
entityTypeMap = signal(new Map(), ...(ngDevMode ? [{ debugName: "entityTypeMap" }] : []));
|
|
11199
11278
|
entityTypesLoading = signal(false, ...(ngDevMode ? [{ debugName: "entityTypesLoading" }] : []));
|
|
11200
|
-
// Getter and setter for ngModel compatibility
|
|
11201
|
-
get selectedEntityTypeValue() {
|
|
11202
|
-
return this.selectedEntityType();
|
|
11203
|
-
}
|
|
11204
|
-
set selectedEntityTypeValue(value) {
|
|
11205
|
-
this.selectedEntityType.set(value);
|
|
11206
|
-
}
|
|
11207
11279
|
// Pagination calculations
|
|
11208
11280
|
totalPages = signal(0, ...(ngDevMode ? [{ debugName: "totalPages" }] : []));
|
|
11209
11281
|
hasNextPage = signal(false, ...(ngDevMode ? [{ debugName: "hasNextPage" }] : []));
|
|
11210
11282
|
hasPreviousPage = signal(false, ...(ngDevMode ? [{ debugName: "hasPreviousPage" }] : []));
|
|
11211
11283
|
jumpToPage = 1;
|
|
11212
11284
|
loadStartTime = 0;
|
|
11213
|
-
// Filter options
|
|
11214
|
-
entityTypeOptions = signal([
|
|
11215
|
-
{ value: '', label: 'All Entity Types' },
|
|
11216
|
-
{ value: 'school', label: 'School' },
|
|
11217
|
-
{ value: 'college', label: 'College' },
|
|
11218
|
-
{ value: 'university', label: 'University' },
|
|
11219
|
-
{ value: 'institute', label: 'Institute' }
|
|
11220
|
-
], ...(ngDevMode ? [{ debugName: "entityTypeOptions" }] : []));
|
|
11221
11285
|
// Rights computed signals
|
|
11222
11286
|
canCreate = computed(() => this.rightsService.hasRight('CREATE'), ...(ngDevMode ? [{ debugName: "canCreate" }] : []));
|
|
11223
11287
|
canEdit = computed(() => this.rightsService.hasRight('EDIT'), ...(ngDevMode ? [{ debugName: "canEdit" }] : []));
|
|
@@ -11303,7 +11367,7 @@ class CideCoreEntityListComponent {
|
|
|
11303
11367
|
tree: {
|
|
11304
11368
|
enabled: true,
|
|
11305
11369
|
primaryKey: '_id',
|
|
11306
|
-
foreignKey: '
|
|
11370
|
+
foreignKey: 'syen_id_syen',
|
|
11307
11371
|
childrenKey: 'children',
|
|
11308
11372
|
levelKey: 'level',
|
|
11309
11373
|
expandedKey: 'isExpanded',
|
|
@@ -11670,15 +11734,6 @@ class CideCoreEntityListComponent {
|
|
|
11670
11734
|
this.currentPage.set(1);
|
|
11671
11735
|
this.loadEntities();
|
|
11672
11736
|
}
|
|
11673
|
-
/**
|
|
11674
|
-
* Handle entity type selection change
|
|
11675
|
-
*/
|
|
11676
|
-
onEntityTypeChange(value) {
|
|
11677
|
-
const entityType = typeof value === 'string' ? value : (value ? String(value) : '');
|
|
11678
|
-
this.selectedEntityType.set(entityType);
|
|
11679
|
-
this.currentPage.set(1);
|
|
11680
|
-
this.loadEntities();
|
|
11681
|
-
}
|
|
11682
11737
|
onPageChange(page) {
|
|
11683
11738
|
if (parseInt(page) >= 1 && parseInt(page) <= this.totalPages()) {
|
|
11684
11739
|
this.currentPage.set(parseInt(page));
|
|
@@ -11843,22 +11898,21 @@ class CideCoreEntityListComponent {
|
|
|
11843
11898
|
onOrgStructure() {
|
|
11844
11899
|
this.router.navigate(['/control-panel/org-structure']);
|
|
11845
11900
|
}
|
|
11846
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
11847
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
11901
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreEntityListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11902
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreEntityListComponent, isStandalone: true, selector: "cide-core-entity-list", viewQueries: [{ propertyName: "gridComponent", first: true, predicate: CideEleDataGridComponent, descendants: true, isSignal: true }, { propertyName: "entityDetailsRenderer", first: true, predicate: ["entityDetailsRenderer"], descendants: true, isSignal: true }, { propertyName: "entityTypeRenderer", first: true, predicate: ["entityTypeRenderer"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRenderer", first: true, predicate: ["actionsDropdownRenderer"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Entity List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_entity_list' }\">\n <!-- Breadcrumb Actions: Org Structure Button -->\n <div breadcrumb-actions>\n <button cideEleButton variant=\"secondary\" size=\"sm\" (click)=\"onOrgStructure()\"\n class=\"tw-whitespace-nowrap tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-6 tw-h-5\">account_tree</cide-ele-icon>\n Org Structure\n </button>\n\n <!-- Add Entity Button -->\n @if (canCreate()) {\n <button cideEleButton variant=\"primary\" size=\"sm\" (click)=\"router.navigate(['control-panel', 'entity-create'])\"\n class=\"tw-whitespace-nowrap tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-6 tw-h-5\">add</cide-ele-icon>\n Add Entity\n </button>\n }\n </div>\n\n <div class=\"entity-list-container tw-bg-white tw-shadow-lg tw-rounded-lg tw-overflow-hidden\">\n\n <!-- Data Grid Component -->\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"templateRenderers()\"\n [actionHandlers]=\"actionHandlers\" (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n\n </div>\n\n <!-- Custom Renderer Templates -->\n\n <!-- Entity Details Renderer Template -->\n <!-- Context: { $implicit: unknown, row: entityResponseData, value: unknown, column: GridColumn } -->\n <ng-template #entityDetailsRenderer let-value=\"value\" let-entity=\"row\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <div\n class=\"tw-flex-shrink-0 tw-w-10 tw-h-10 tw-bg-blue-100 tw-rounded-full tw-flex tw-items-center tw-justify-center\">\n <span class=\"tw-text-blue-600 tw-font-semibold tw-text-sm\">\n {{ (entity.syen_entity_code || 'NA').substring(0, 2).toUpperCase() }}\n </span>\n </div>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\"\n [title]=\"entity.syen_name || 'Unknown Entity'\">\n {{ entity.syen_name || 'Unknown Entity' }}\n </p>\n <p class=\"tw-text-sm tw-text-gray-500 tw-truncate\" [title]=\"entity.syen_entity_code || 'N/A'\">\n Code: {{ entity.syen_entity_code || 'N/A' }}\n </p>\n </div>\n </div>\n </ng-template>\n\n\n <!-- Entity Type Renderer Template -->\n <!-- Context: { $implicit: unknown, row: entityResponseData, value: unknown, column: GridColumn } -->\n <ng-template #entityTypeRenderer let-value=\"value\" let-entity=\"row\">\n <div class=\"tw-flex tw-flex-col tw-items-center tw-space-y-1\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"getEntityTypeName(entity)\">\n {{ getEntityTypeName(entity) }}\n </span>\n </div>\n </ng-template>\n\n <!-- Actions Dropdown Renderer Template -->\n <!-- Context: { $implicit: unknown, row: entityResponseData, value: unknown, column: GridColumn } -->\n <ng-template #actionsDropdownRenderer let-value=\"value\" let-entity=\"row\">\n <cide-ele-dropdown [items]=\"getDropdownItems(entity)\" [config]=\"getDropdownConfig()\"\n (itemClick)=\"onDropdownItemClick($event, entity)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>", styles: ["", ":host{height:100%;display:flex;flex-direction:column}.entity-list-container{height:100%;display:flex;flex-direction:column;overflow:hidden}.tw-overflow-auto{flex:1;min-height:0}cide-ele-data-grid{flex:1;min-height:0;display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
11848
11903
|
}
|
|
11849
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
11904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreEntityListComponent, decorators: [{
|
|
11850
11905
|
type: Component,
|
|
11851
11906
|
args: [{ selector: 'cide-core-entity-list', imports: [
|
|
11852
11907
|
CommonModule,
|
|
11853
11908
|
FormsModule,
|
|
11854
11909
|
CideIconComponent,
|
|
11855
11910
|
CideEleButtonComponent,
|
|
11856
|
-
CideSelectComponent,
|
|
11857
11911
|
CideEleDataGridComponent,
|
|
11858
11912
|
CideEleDropdownComponent,
|
|
11859
11913
|
CideLytSharedWrapperComponent
|
|
11860
|
-
], template: "<!-- Entity List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_entity_list' }\">\n
|
|
11861
|
-
}] });
|
|
11914
|
+
], template: "<!-- Entity List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_entity_list' }\">\n <!-- Breadcrumb Actions: Org Structure Button -->\n <div breadcrumb-actions>\n <button cideEleButton variant=\"secondary\" size=\"sm\" (click)=\"onOrgStructure()\"\n class=\"tw-whitespace-nowrap tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-6 tw-h-5\">account_tree</cide-ele-icon>\n Org Structure\n </button>\n\n <!-- Add Entity Button -->\n @if (canCreate()) {\n <button cideEleButton variant=\"primary\" size=\"sm\" (click)=\"router.navigate(['control-panel', 'entity-create'])\"\n class=\"tw-whitespace-nowrap tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon size=\"xs\" class=\"tw-w-6 tw-h-5\">add</cide-ele-icon>\n Add Entity\n </button>\n }\n </div>\n\n <div class=\"entity-list-container tw-bg-white tw-shadow-lg tw-rounded-lg tw-overflow-hidden\">\n\n <!-- Data Grid Component -->\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"templateRenderers()\"\n [actionHandlers]=\"actionHandlers\" (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n\n </div>\n\n <!-- Custom Renderer Templates -->\n\n <!-- Entity Details Renderer Template -->\n <!-- Context: { $implicit: unknown, row: entityResponseData, value: unknown, column: GridColumn } -->\n <ng-template #entityDetailsRenderer let-value=\"value\" let-entity=\"row\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <div\n class=\"tw-flex-shrink-0 tw-w-10 tw-h-10 tw-bg-blue-100 tw-rounded-full tw-flex tw-items-center tw-justify-center\">\n <span class=\"tw-text-blue-600 tw-font-semibold tw-text-sm\">\n {{ (entity.syen_entity_code || 'NA').substring(0, 2).toUpperCase() }}\n </span>\n </div>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\"\n [title]=\"entity.syen_name || 'Unknown Entity'\">\n {{ entity.syen_name || 'Unknown Entity' }}\n </p>\n <p class=\"tw-text-sm tw-text-gray-500 tw-truncate\" [title]=\"entity.syen_entity_code || 'N/A'\">\n Code: {{ entity.syen_entity_code || 'N/A' }}\n </p>\n </div>\n </div>\n </ng-template>\n\n\n <!-- Entity Type Renderer Template -->\n <!-- Context: { $implicit: unknown, row: entityResponseData, value: unknown, column: GridColumn } -->\n <ng-template #entityTypeRenderer let-value=\"value\" let-entity=\"row\">\n <div class=\"tw-flex tw-flex-col tw-items-center tw-space-y-1\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"getEntityTypeName(entity)\">\n {{ getEntityTypeName(entity) }}\n </span>\n </div>\n </ng-template>\n\n <!-- Actions Dropdown Renderer Template -->\n <!-- Context: { $implicit: unknown, row: entityResponseData, value: unknown, column: GridColumn } -->\n <ng-template #actionsDropdownRenderer let-value=\"value\" let-entity=\"row\">\n <cide-ele-dropdown [items]=\"getDropdownItems(entity)\" [config]=\"getDropdownConfig()\"\n (itemClick)=\"onDropdownItemClick($event, entity)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>", styles: [":host{height:100%;display:flex;flex-direction:column}.entity-list-container{height:100%;display:flex;flex-direction:column;overflow:hidden}.tw-overflow-auto{flex:1;min-height:0}cide-ele-data-grid{flex:1;min-height:0;display:flex;flex-direction:column}\n"] }]
|
|
11915
|
+
}], propDecorators: { gridComponent: [{ type: i0.ViewChild, args: [i0.forwardRef(() => CideEleDataGridComponent), { isSignal: true }] }], entityDetailsRenderer: [{ type: i0.ViewChild, args: ['entityDetailsRenderer', { isSignal: true }] }], entityTypeRenderer: [{ type: i0.ViewChild, args: ['entityTypeRenderer', { isSignal: true }] }], actionsDropdownRenderer: [{ type: i0.ViewChild, args: ['actionsDropdownRenderer', { isSignal: true }] }] } });
|
|
11862
11916
|
|
|
11863
11917
|
var entityList_component = /*#__PURE__*/Object.freeze({
|
|
11864
11918
|
__proto__: null,
|
|
@@ -11903,8 +11957,8 @@ class CideCoreOrgStructureComponent {
|
|
|
11903
11957
|
onEntityView(entity) {
|
|
11904
11958
|
this.entityView.emit(entity);
|
|
11905
11959
|
}
|
|
11906
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
11907
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.
|
|
11960
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreOrgStructureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11961
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.15", type: CideCoreOrgStructureComponent, isStandalone: true, selector: "cide-core-org-structure", inputs: { allowSwitching: { classPropertyName: "allowSwitching", publicName: "allowSwitching", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { entityClick: "entityClick", entitySelect: "entitySelect", entityView: "entityView" }, ngImport: i0, template: `
|
|
11908
11962
|
<cide-lyt-shared-wrapper [shared_wrapper_setup_param]="{ sypg_page_code: 'org_structure' }">
|
|
11909
11963
|
|
|
11910
11964
|
<!-- Back Button using standard content projection -->
|
|
@@ -11932,7 +11986,7 @@ class CideCoreOrgStructureComponent {
|
|
|
11932
11986
|
</cide-lyt-shared-wrapper>
|
|
11933
11987
|
`, isInline: true, styles: [":host{height:100%;display:flex;flex-direction:column}.tw-overflow-y-auto::-webkit-scrollbar{width:6px}.tw-overflow-y-auto::-webkit-scrollbar-track{background:#f1f5f9;border-radius:3px}.tw-overflow-y-auto::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}.tw-overflow-y-auto::-webkit-scrollbar-thumb:hover{background:#94a3b8}.tw-transition-shadow{transition:box-shadow .2s ease-in-out}.tw-shadow-lg:hover{box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a;transform:translateY(-2px);transition:all .2s ease-in-out}.tw-bg-purple-300,.tw-bg-purple-400{transition:all .3s ease-in-out}.connection-line-compact{display:block;overflow:visible}.connection-line-compact path,.connection-line-compact line{stroke-linecap:round;stroke-linejoin:round;transition:stroke-width .2s ease}.connection-line-compact:hover path,.connection-line-compact:hover line{stroke-width:3}.connection-line-compact circle{transition:all .2s ease}.connection-line-compact circle:hover{filter:drop-shadow(0 2px 4px rgba(147,51,234,.4))}.level-0{border-color:#fb923c!important}.level-1{border-color:#60a5fa!important}.level-2{border-color:#a78bfa!important}.level-3{border-color:#4ade80!important}.level-4{border-color:#818cf8!important}.level-5{border-color:#f472b6!important}@media (max-width: 1200px){.tw-max-w-7xl{max-width:100%}.tw-gap-6{gap:1rem}.tw-min-w-64{min-width:14rem}.tw-max-w-72{max-width:16rem}}@media (max-width: 768px){.tw-min-w-64{min-width:12rem}.tw-max-w-72{max-width:14rem}.tw-max-w-7xl{max-width:100%}.tw-gap-6{gap:.75rem}.tw-p-4{padding:.75rem}.tw-mb-4{margin-bottom:.75rem}.tw-space-x-3{gap:.5rem}.tw-space-x-2{gap:.375rem}.tw-w-12{width:2.5rem}.tw-h-12{height:2.5rem}}@media (max-width: 480px){.tw-min-w-72{min-width:12rem}.tw-max-w-80{max-width:14rem}.tw-p-4{padding:.5rem}.tw-space-x-3{gap:.375rem}.tw-space-x-2{gap:.25rem}.tw-mb-3{margin-bottom:.5rem}.tw-w-12{width:2rem}.tw-h-12{height:2rem}.tw-w-8{width:1.5rem}.tw-h-8{height:1.5rem}}@media print{.tw-bg-gray-50{background:#fff!important}.tw-shadow-lg{box-shadow:none!important;border:1px solid #e5e7eb!important}.tw-bg-purple-300{background:#6b7280!important}.tw-border-purple-300{border-color:#6b7280!important}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CideSharedOrgStructureComponent, selector: "cide-shared-org-structure", inputs: ["allowSwitching", "showActions", "mode"], outputs: ["entityClick", "entitySelect", "entityView"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
11934
11988
|
}
|
|
11935
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
11989
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreOrgStructureComponent, decorators: [{
|
|
11936
11990
|
type: Component,
|
|
11937
11991
|
args: [{ selector: 'cide-core-org-structure', imports: [
|
|
11938
11992
|
CommonModule,
|
|
@@ -11966,7 +12020,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
11966
12020
|
</cide-shared-org-structure>
|
|
11967
12021
|
</cide-lyt-shared-wrapper>
|
|
11968
12022
|
`, styles: [":host{height:100%;display:flex;flex-direction:column}.tw-overflow-y-auto::-webkit-scrollbar{width:6px}.tw-overflow-y-auto::-webkit-scrollbar-track{background:#f1f5f9;border-radius:3px}.tw-overflow-y-auto::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px}.tw-overflow-y-auto::-webkit-scrollbar-thumb:hover{background:#94a3b8}.tw-transition-shadow{transition:box-shadow .2s ease-in-out}.tw-shadow-lg:hover{box-shadow:0 20px 25px -5px #0000001a,0 10px 10px -5px #0000000a;transform:translateY(-2px);transition:all .2s ease-in-out}.tw-bg-purple-300,.tw-bg-purple-400{transition:all .3s ease-in-out}.connection-line-compact{display:block;overflow:visible}.connection-line-compact path,.connection-line-compact line{stroke-linecap:round;stroke-linejoin:round;transition:stroke-width .2s ease}.connection-line-compact:hover path,.connection-line-compact:hover line{stroke-width:3}.connection-line-compact circle{transition:all .2s ease}.connection-line-compact circle:hover{filter:drop-shadow(0 2px 4px rgba(147,51,234,.4))}.level-0{border-color:#fb923c!important}.level-1{border-color:#60a5fa!important}.level-2{border-color:#a78bfa!important}.level-3{border-color:#4ade80!important}.level-4{border-color:#818cf8!important}.level-5{border-color:#f472b6!important}@media (max-width: 1200px){.tw-max-w-7xl{max-width:100%}.tw-gap-6{gap:1rem}.tw-min-w-64{min-width:14rem}.tw-max-w-72{max-width:16rem}}@media (max-width: 768px){.tw-min-w-64{min-width:12rem}.tw-max-w-72{max-width:14rem}.tw-max-w-7xl{max-width:100%}.tw-gap-6{gap:.75rem}.tw-p-4{padding:.75rem}.tw-mb-4{margin-bottom:.75rem}.tw-space-x-3{gap:.5rem}.tw-space-x-2{gap:.375rem}.tw-w-12{width:2.5rem}.tw-h-12{height:2.5rem}}@media (max-width: 480px){.tw-min-w-72{min-width:12rem}.tw-max-w-80{max-width:14rem}.tw-p-4{padding:.5rem}.tw-space-x-3{gap:.375rem}.tw-space-x-2{gap:.25rem}.tw-mb-3{margin-bottom:.5rem}.tw-w-12{width:2rem}.tw-h-12{height:2rem}.tw-w-8{width:1.5rem}.tw-h-8{height:1.5rem}}@media print{.tw-bg-gray-50{background:#fff!important}.tw-shadow-lg{box-shadow:none!important;border:1px solid #e5e7eb!important}.tw-bg-purple-300{background:#6b7280!important}.tw-border-purple-300{border-color:#6b7280!important}}\n"] }]
|
|
11969
|
-
}] });
|
|
12023
|
+
}], propDecorators: { allowSwitching: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowSwitching", required: false }] }], showActions: [{ type: i0.Input, args: [{ isSignal: true, alias: "showActions", required: false }] }], mode: [{ type: i0.Input, args: [{ isSignal: true, alias: "mode", required: false }] }], entityClick: [{ type: i0.Output, args: ["entityClick"] }], entitySelect: [{ type: i0.Output, args: ["entitySelect"] }], entityView: [{ type: i0.Output, args: ["entityView"] }] } });
|
|
11970
12024
|
|
|
11971
12025
|
var orgStructure_component = /*#__PURE__*/Object.freeze({
|
|
11972
12026
|
__proto__: null,
|
|
@@ -11990,8 +12044,8 @@ class EntitySelectionDrawerComponent {
|
|
|
11990
12044
|
// Close the floating container on cancel
|
|
11991
12045
|
this.floatingContainerService.hide('entity-selection-for-mapping');
|
|
11992
12046
|
}
|
|
11993
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
11994
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
12047
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EntitySelectionDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12048
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: EntitySelectionDrawerComponent, isStandalone: true, selector: "cide-entity-selection-drawer", inputs: { entities: { classPropertyName: "entities", publicName: "entities", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { entitySelect: "entitySelect", cancel: "cancel" }, ngImport: i0, template: `
|
|
11995
12049
|
<div class="tw-flex tw-flex-col tw-h-full">
|
|
11996
12050
|
<!-- Content -->
|
|
11997
12051
|
<div class="tw-flex-1 tw-overflow-y-auto tw-p-3">
|
|
@@ -12037,7 +12091,7 @@ class EntitySelectionDrawerComponent {
|
|
|
12037
12091
|
</div>
|
|
12038
12092
|
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }] });
|
|
12039
12093
|
}
|
|
12040
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
12094
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: EntitySelectionDrawerComponent, decorators: [{
|
|
12041
12095
|
type: Component,
|
|
12042
12096
|
args: [{ selector: 'cide-entity-selection-drawer', standalone: true, imports: [CommonModule, CideEleButtonComponent, CideIconComponent], template: `
|
|
12043
12097
|
<div class="tw-flex tw-flex-col tw-h-full">
|
|
@@ -12084,7 +12138,158 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
12084
12138
|
</div>
|
|
12085
12139
|
</div>
|
|
12086
12140
|
` }]
|
|
12087
|
-
}] });
|
|
12141
|
+
}], propDecorators: { entities: [{ type: i0.Input, args: [{ isSignal: true, alias: "entities", required: true }] }], entitySelect: [{ type: i0.Output, args: ["entitySelect"] }], cancel: [{ type: i0.Output, args: ["cancel"] }] } });
|
|
12142
|
+
|
|
12143
|
+
class CopyRoleFromEntityDrawerComponent {
|
|
12144
|
+
entityMappings = input.required(...(ngDevMode ? [{ debugName: "entityMappings" }] : []));
|
|
12145
|
+
mappingSelect = output();
|
|
12146
|
+
cancel = output();
|
|
12147
|
+
floatingContainerService = inject(CideEleFloatingContainerService);
|
|
12148
|
+
onMappingSelect(entityId) {
|
|
12149
|
+
this.mappingSelect.emit(entityId);
|
|
12150
|
+
// Close the floating container after selection
|
|
12151
|
+
this.floatingContainerService.hide('copy-role-from-entity');
|
|
12152
|
+
}
|
|
12153
|
+
onCancel() {
|
|
12154
|
+
this.cancel.emit();
|
|
12155
|
+
// Close the floating container on cancel
|
|
12156
|
+
this.floatingContainerService.hide('copy-role-from-entity');
|
|
12157
|
+
}
|
|
12158
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CopyRoleFromEntityDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12159
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CopyRoleFromEntityDrawerComponent, isStandalone: true, selector: "cide-copy-role-from-entity-drawer", inputs: { entityMappings: { classPropertyName: "entityMappings", publicName: "entityMappings", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { mappingSelect: "mappingSelect", cancel: "cancel" }, ngImport: i0, template: `
|
|
12160
|
+
<div class="tw-flex tw-flex-col tw-h-full">
|
|
12161
|
+
<!-- Header Description -->
|
|
12162
|
+
<div class="tw-px-3 tw-py-2 tw-bg-blue-50 dark:tw-bg-blue-900/20 tw-border-b tw-border-blue-200 dark:tw-border-blue-700">
|
|
12163
|
+
<p class="tw-text-xs tw-text-blue-700 dark:tw-text-blue-300 tw-m-0">
|
|
12164
|
+
Select an entity mapping to copy role, department, designation, and menu rights from.
|
|
12165
|
+
</p>
|
|
12166
|
+
</div>
|
|
12167
|
+
|
|
12168
|
+
<!-- Content -->
|
|
12169
|
+
<div class="tw-flex-1 tw-overflow-y-auto tw-p-3">
|
|
12170
|
+
<!-- Entity Mappings List -->
|
|
12171
|
+
<div class="tw-space-y-2">
|
|
12172
|
+
@for (mapping of entityMappings(); track mapping.entityId) {
|
|
12173
|
+
@if (mapping.entityId) {
|
|
12174
|
+
<button
|
|
12175
|
+
type="button"
|
|
12176
|
+
(click)="onMappingSelect(mapping.entityId)"
|
|
12177
|
+
class="tw-w-full tw-text-left tw-px-3 tw-py-3 tw-border tw-border-gray-200 dark:tw-border-gray-700 tw-rounded-md tw-transition-all hover:tw-border-blue-400 dark:hover:tw-border-blue-500 hover:tw-bg-blue-50 dark:hover:tw-bg-blue-900/20 tw-bg-white dark:tw-bg-gray-800 tw-cursor-pointer">
|
|
12178
|
+
<div class="tw-flex tw-items-start tw-justify-between tw-gap-2">
|
|
12179
|
+
<div class="tw-flex-1 tw-min-w-0">
|
|
12180
|
+
<div class="tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100 tw-mb-1">
|
|
12181
|
+
{{ mapping.entityName }}
|
|
12182
|
+
</div>
|
|
12183
|
+
@if (mapping.entityCode) {
|
|
12184
|
+
<div class="tw-text-xs tw-text-gray-500 dark:tw-text-gray-400 tw-mb-1">
|
|
12185
|
+
{{ mapping.entityCode }}
|
|
12186
|
+
</div>
|
|
12187
|
+
}
|
|
12188
|
+
@if (mapping.roleName) {
|
|
12189
|
+
<div class="tw-flex tw-items-center tw-gap-1 tw-mt-2">
|
|
12190
|
+
<cide-ele-icon variant="blue" size="xs">admin_panel_settings</cide-ele-icon>
|
|
12191
|
+
<span class="tw-text-xs tw-text-blue-600 dark:tw-text-blue-400 tw-font-medium">
|
|
12192
|
+
Role: {{ mapping.roleName }}
|
|
12193
|
+
</span>
|
|
12194
|
+
</div>
|
|
12195
|
+
}
|
|
12196
|
+
</div>
|
|
12197
|
+
<cide-ele-icon variant="blue" size="sm" class="tw-flex-shrink-0">content_copy</cide-ele-icon>
|
|
12198
|
+
</div>
|
|
12199
|
+
</button>
|
|
12200
|
+
}
|
|
12201
|
+
} @empty {
|
|
12202
|
+
<div class="tw-text-center tw-py-8 tw-text-gray-500 dark:tw-text-gray-400">
|
|
12203
|
+
<cide-ele-icon variant="gray" size="lg" class="tw-mb-2">info</cide-ele-icon>
|
|
12204
|
+
<p class="tw-text-sm tw-font-medium tw-mb-1">No Entity Mappings Available</p>
|
|
12205
|
+
<p class="tw-text-xs">You need at least one entity mapping to copy from.</p>
|
|
12206
|
+
</div>
|
|
12207
|
+
}
|
|
12208
|
+
</div>
|
|
12209
|
+
</div>
|
|
12210
|
+
|
|
12211
|
+
<!-- Footer -->
|
|
12212
|
+
<div class="tw-border-t tw-border-gray-200 dark:tw-border-gray-700 tw-px-3 tw-py-2 tw-flex tw-justify-end tw-flex-shrink-0 tw-bg-white dark:tw-bg-gray-800">
|
|
12213
|
+
<button
|
|
12214
|
+
cideEleButton
|
|
12215
|
+
variant="secondary"
|
|
12216
|
+
size="xs"
|
|
12217
|
+
type="button"
|
|
12218
|
+
(click)="onCancel()">
|
|
12219
|
+
Cancel
|
|
12220
|
+
</button>
|
|
12221
|
+
</div>
|
|
12222
|
+
</div>
|
|
12223
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }] });
|
|
12224
|
+
}
|
|
12225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CopyRoleFromEntityDrawerComponent, decorators: [{
|
|
12226
|
+
type: Component,
|
|
12227
|
+
args: [{ selector: 'cide-copy-role-from-entity-drawer', standalone: true, imports: [CommonModule, CideEleButtonComponent, CideIconComponent], template: `
|
|
12228
|
+
<div class="tw-flex tw-flex-col tw-h-full">
|
|
12229
|
+
<!-- Header Description -->
|
|
12230
|
+
<div class="tw-px-3 tw-py-2 tw-bg-blue-50 dark:tw-bg-blue-900/20 tw-border-b tw-border-blue-200 dark:tw-border-blue-700">
|
|
12231
|
+
<p class="tw-text-xs tw-text-blue-700 dark:tw-text-blue-300 tw-m-0">
|
|
12232
|
+
Select an entity mapping to copy role, department, designation, and menu rights from.
|
|
12233
|
+
</p>
|
|
12234
|
+
</div>
|
|
12235
|
+
|
|
12236
|
+
<!-- Content -->
|
|
12237
|
+
<div class="tw-flex-1 tw-overflow-y-auto tw-p-3">
|
|
12238
|
+
<!-- Entity Mappings List -->
|
|
12239
|
+
<div class="tw-space-y-2">
|
|
12240
|
+
@for (mapping of entityMappings(); track mapping.entityId) {
|
|
12241
|
+
@if (mapping.entityId) {
|
|
12242
|
+
<button
|
|
12243
|
+
type="button"
|
|
12244
|
+
(click)="onMappingSelect(mapping.entityId)"
|
|
12245
|
+
class="tw-w-full tw-text-left tw-px-3 tw-py-3 tw-border tw-border-gray-200 dark:tw-border-gray-700 tw-rounded-md tw-transition-all hover:tw-border-blue-400 dark:hover:tw-border-blue-500 hover:tw-bg-blue-50 dark:hover:tw-bg-blue-900/20 tw-bg-white dark:tw-bg-gray-800 tw-cursor-pointer">
|
|
12246
|
+
<div class="tw-flex tw-items-start tw-justify-between tw-gap-2">
|
|
12247
|
+
<div class="tw-flex-1 tw-min-w-0">
|
|
12248
|
+
<div class="tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100 tw-mb-1">
|
|
12249
|
+
{{ mapping.entityName }}
|
|
12250
|
+
</div>
|
|
12251
|
+
@if (mapping.entityCode) {
|
|
12252
|
+
<div class="tw-text-xs tw-text-gray-500 dark:tw-text-gray-400 tw-mb-1">
|
|
12253
|
+
{{ mapping.entityCode }}
|
|
12254
|
+
</div>
|
|
12255
|
+
}
|
|
12256
|
+
@if (mapping.roleName) {
|
|
12257
|
+
<div class="tw-flex tw-items-center tw-gap-1 tw-mt-2">
|
|
12258
|
+
<cide-ele-icon variant="blue" size="xs">admin_panel_settings</cide-ele-icon>
|
|
12259
|
+
<span class="tw-text-xs tw-text-blue-600 dark:tw-text-blue-400 tw-font-medium">
|
|
12260
|
+
Role: {{ mapping.roleName }}
|
|
12261
|
+
</span>
|
|
12262
|
+
</div>
|
|
12263
|
+
}
|
|
12264
|
+
</div>
|
|
12265
|
+
<cide-ele-icon variant="blue" size="sm" class="tw-flex-shrink-0">content_copy</cide-ele-icon>
|
|
12266
|
+
</div>
|
|
12267
|
+
</button>
|
|
12268
|
+
}
|
|
12269
|
+
} @empty {
|
|
12270
|
+
<div class="tw-text-center tw-py-8 tw-text-gray-500 dark:tw-text-gray-400">
|
|
12271
|
+
<cide-ele-icon variant="gray" size="lg" class="tw-mb-2">info</cide-ele-icon>
|
|
12272
|
+
<p class="tw-text-sm tw-font-medium tw-mb-1">No Entity Mappings Available</p>
|
|
12273
|
+
<p class="tw-text-xs">You need at least one entity mapping to copy from.</p>
|
|
12274
|
+
</div>
|
|
12275
|
+
}
|
|
12276
|
+
</div>
|
|
12277
|
+
</div>
|
|
12278
|
+
|
|
12279
|
+
<!-- Footer -->
|
|
12280
|
+
<div class="tw-border-t tw-border-gray-200 dark:tw-border-gray-700 tw-px-3 tw-py-2 tw-flex tw-justify-end tw-flex-shrink-0 tw-bg-white dark:tw-bg-gray-800">
|
|
12281
|
+
<button
|
|
12282
|
+
cideEleButton
|
|
12283
|
+
variant="secondary"
|
|
12284
|
+
size="xs"
|
|
12285
|
+
type="button"
|
|
12286
|
+
(click)="onCancel()">
|
|
12287
|
+
Cancel
|
|
12288
|
+
</button>
|
|
12289
|
+
</div>
|
|
12290
|
+
</div>
|
|
12291
|
+
` }]
|
|
12292
|
+
}], propDecorators: { entityMappings: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityMappings", required: true }] }], mappingSelect: [{ type: i0.Output, args: ["mappingSelect"] }], cancel: [{ type: i0.Output, args: ["cancel"] }] } });
|
|
12088
12293
|
|
|
12089
12294
|
class CideCoreUserCreateComponent {
|
|
12090
12295
|
// Dependency injection
|
|
@@ -12118,6 +12323,12 @@ class CideCoreUserCreateComponent {
|
|
|
12118
12323
|
userId = signal('', ...(ngDevMode ? [{ debugName: "userId" }] : []));
|
|
12119
12324
|
isEditMode = signal(false, ...(ngDevMode ? [{ debugName: "isEditMode" }] : []));
|
|
12120
12325
|
showPasswordFields = signal(false, ...(ngDevMode ? [{ debugName: "showPasswordFields" }] : [])); // Controls password fields visibility in edit mode
|
|
12326
|
+
// Check if viewing own profile (for disabling entity mapping modifications)
|
|
12327
|
+
isViewingOwnProfile = computed(() => {
|
|
12328
|
+
const routeUserId = this.userId();
|
|
12329
|
+
const currentUserId = this.appState.currentUser()?._id;
|
|
12330
|
+
return routeUserId && currentUserId && routeUserId === currentUserId;
|
|
12331
|
+
}, ...(ngDevMode ? [{ debugName: "isViewingOwnProfile" }] : []));
|
|
12121
12332
|
// User type information from route data (TEACHER, STUDENT, USER, etc.)
|
|
12122
12333
|
userType = signal(null, ...(ngDevMode ? [{ debugName: "userType" }] : []));
|
|
12123
12334
|
typeSpecificId = signal(null, ...(ngDevMode ? [{ debugName: "typeSpecificId" }] : []));
|
|
@@ -12169,6 +12380,8 @@ class CideCoreUserCreateComponent {
|
|
|
12169
12380
|
entityMappings = signal([], ...(ngDevMode ? [{ debugName: "entityMappings" }] : []));
|
|
12170
12381
|
menuRightsMap = signal({}, ...(ngDevMode ? [{ debugName: "menuRightsMap" }] : []));
|
|
12171
12382
|
allUserTypeMappings = signal([], ...(ngDevMode ? [{ debugName: "allUserTypeMappings" }] : [])); // All user type mappings across all entities
|
|
12383
|
+
// Track target mapping index for copying role from another entity
|
|
12384
|
+
targetMappingIndexForCopy = signal(null, ...(ngDevMode ? [{ debugName: "targetMappingIndexForCopy" }] : []));
|
|
12172
12385
|
// Cache for role permissions to avoid redundant API calls
|
|
12173
12386
|
rolePermissionsCache = signal({}, ...(ngDevMode ? [{ debugName: "rolePermissionsCache" }] : []));
|
|
12174
12387
|
// Track which mappings have already loaded their data (to avoid redundant loads)
|
|
@@ -13616,6 +13829,211 @@ class CideCoreUserCreateComponent {
|
|
|
13616
13829
|
this.loadRolesForEntity(newIndex, entityId);
|
|
13617
13830
|
});
|
|
13618
13831
|
}
|
|
13832
|
+
/**
|
|
13833
|
+
* Show copy role from entity drawer
|
|
13834
|
+
* @param targetMappingIndex Index of the mapping to copy TO
|
|
13835
|
+
*/
|
|
13836
|
+
showCopyRoleFromEntityDrawer(targetMappingIndex) {
|
|
13837
|
+
const availableMappings = this.getAvailableMappingsForCopy(targetMappingIndex);
|
|
13838
|
+
if (availableMappings.length === 0) {
|
|
13839
|
+
this.notificationService.warning('No other entity mappings available to copy from.');
|
|
13840
|
+
return;
|
|
13841
|
+
}
|
|
13842
|
+
// Store target mapping index
|
|
13843
|
+
this.targetMappingIndexForCopy.set(targetMappingIndex);
|
|
13844
|
+
// Register the copy role drawer component if not already registered
|
|
13845
|
+
if (!this.floatingContainerService.isComponentRegistered('copy-role-from-entity')) {
|
|
13846
|
+
this.floatingContainerService.registerComponent('copy-role-from-entity', CopyRoleFromEntityDrawerComponent);
|
|
13847
|
+
}
|
|
13848
|
+
// Create signal for entity mappings input
|
|
13849
|
+
const mappingsSignal = signal(availableMappings, ...(ngDevMode ? [{ debugName: "mappingsSignal" }] : []));
|
|
13850
|
+
const config = {
|
|
13851
|
+
id: 'copy-role-from-entity',
|
|
13852
|
+
title: 'Copy Role from Entity',
|
|
13853
|
+
icon: 'content_copy',
|
|
13854
|
+
width: '500px',
|
|
13855
|
+
height: '600px',
|
|
13856
|
+
minWidth: '450px',
|
|
13857
|
+
minHeight: '400px',
|
|
13858
|
+
resizable: true,
|
|
13859
|
+
draggable: true,
|
|
13860
|
+
closable: true,
|
|
13861
|
+
minimizable: true,
|
|
13862
|
+
maximizable: true,
|
|
13863
|
+
componentId: 'copy-role-from-entity',
|
|
13864
|
+
componentConfig: {
|
|
13865
|
+
inputs: {
|
|
13866
|
+
entityMappings: mappingsSignal
|
|
13867
|
+
},
|
|
13868
|
+
outputs: {
|
|
13869
|
+
mappingSelect: (event) => {
|
|
13870
|
+
const entityId = typeof event === 'string' ? event : (event?.value || event);
|
|
13871
|
+
if (typeof entityId === 'string') {
|
|
13872
|
+
this.copyRoleFromEntityMapping(entityId);
|
|
13873
|
+
}
|
|
13874
|
+
},
|
|
13875
|
+
cancel: (event) => {
|
|
13876
|
+
this.closeCopyRoleFromEntityDrawer();
|
|
13877
|
+
}
|
|
13878
|
+
}
|
|
13879
|
+
}
|
|
13880
|
+
};
|
|
13881
|
+
this.floatingContainerService.show(config);
|
|
13882
|
+
}
|
|
13883
|
+
/**
|
|
13884
|
+
* Get available entity mappings for copying (excluding the target mapping)
|
|
13885
|
+
* @param excludeIndex Index of mapping to exclude
|
|
13886
|
+
*/
|
|
13887
|
+
getAvailableMappingsForCopy(excludeIndex) {
|
|
13888
|
+
const mappings = this.entityMappings();
|
|
13889
|
+
const availableMappings = [];
|
|
13890
|
+
mappings.forEach((mapping, index) => {
|
|
13891
|
+
// Skip the target mapping
|
|
13892
|
+
if (index === excludeIndex) {
|
|
13893
|
+
return;
|
|
13894
|
+
}
|
|
13895
|
+
// Get entity ID and name
|
|
13896
|
+
const entityId = this.getEntityIdFromMapping(index);
|
|
13897
|
+
if (!entityId) {
|
|
13898
|
+
return;
|
|
13899
|
+
}
|
|
13900
|
+
const entity = this.entityOptions().find(e => e._id === entityId);
|
|
13901
|
+
if (!entity) {
|
|
13902
|
+
return;
|
|
13903
|
+
}
|
|
13904
|
+
// Get role name
|
|
13905
|
+
const roleId = this.getRoleIdFromMapping(index);
|
|
13906
|
+
const roleName = roleId
|
|
13907
|
+
? this.roleOptions()[entityId]?.find(r => r._id === roleId)?.syusrol_role_name
|
|
13908
|
+
: undefined;
|
|
13909
|
+
availableMappings.push({
|
|
13910
|
+
entityId: entityId,
|
|
13911
|
+
entityName: entity.syen_name || 'Unknown Entity',
|
|
13912
|
+
entityCode: entity.syen_entity_code,
|
|
13913
|
+
roleId: roleId,
|
|
13914
|
+
roleName: roleName
|
|
13915
|
+
});
|
|
13916
|
+
});
|
|
13917
|
+
return availableMappings;
|
|
13918
|
+
}
|
|
13919
|
+
/**
|
|
13920
|
+
* Copy role, department, designation, and menu rights from one entity mapping to another
|
|
13921
|
+
* @param sourceEntityId Entity ID of the source mapping to copy FROM
|
|
13922
|
+
*/
|
|
13923
|
+
copyRoleFromEntityMapping(sourceEntityId) {
|
|
13924
|
+
const targetIndex = this.targetMappingIndexForCopy();
|
|
13925
|
+
if (targetIndex === null || targetIndex < 0 || targetIndex >= this.entityMappings().length) {
|
|
13926
|
+
this.notificationService.error('Invalid target mapping index.');
|
|
13927
|
+
this.closeCopyRoleFromEntityDrawer();
|
|
13928
|
+
return;
|
|
13929
|
+
}
|
|
13930
|
+
// Find source mapping index
|
|
13931
|
+
const sourceIndex = this.entityMappings().findIndex((mapping, index) => {
|
|
13932
|
+
if (index === targetIndex)
|
|
13933
|
+
return false; // Skip target
|
|
13934
|
+
const entityId = this.getEntityIdFromMapping(index);
|
|
13935
|
+
return entityId === sourceEntityId;
|
|
13936
|
+
});
|
|
13937
|
+
if (sourceIndex === -1) {
|
|
13938
|
+
this.notificationService.error('Source entity mapping not found.');
|
|
13939
|
+
this.closeCopyRoleFromEntityDrawer();
|
|
13940
|
+
return;
|
|
13941
|
+
}
|
|
13942
|
+
try {
|
|
13943
|
+
// Get source mapping form group
|
|
13944
|
+
const sourceMappingFormGroup = this.entityMappingsFormArray.at(sourceIndex);
|
|
13945
|
+
const targetMappingFormGroup = this.entityMappingsFormArray.at(targetIndex);
|
|
13946
|
+
if (!sourceMappingFormGroup || !targetMappingFormGroup) {
|
|
13947
|
+
this.notificationService.error('Failed to access mapping data.');
|
|
13948
|
+
this.closeCopyRoleFromEntityDrawer();
|
|
13949
|
+
return;
|
|
13950
|
+
}
|
|
13951
|
+
// Get source values and extract IDs (handling both string and object formats)
|
|
13952
|
+
const sourceRoleValue = sourceMappingFormGroup.get('syenm_role_id_syusrol')?.value;
|
|
13953
|
+
const sourceRoleId = sourceRoleValue
|
|
13954
|
+
? (typeof sourceRoleValue === 'string' ? sourceRoleValue : (sourceRoleValue._id || sourceRoleValue))
|
|
13955
|
+
: undefined;
|
|
13956
|
+
const sourceDepartmentValue = sourceMappingFormGroup.get('syenm_department_id_sydept')?.value;
|
|
13957
|
+
const sourceDepartmentId = sourceDepartmentValue
|
|
13958
|
+
? (typeof sourceDepartmentValue === 'string' ? sourceDepartmentValue : (sourceDepartmentValue._id || sourceDepartmentValue))
|
|
13959
|
+
: undefined;
|
|
13960
|
+
const sourceDesignationValue = sourceMappingFormGroup.get('syenm_designation_id_sydsg')?.value;
|
|
13961
|
+
const sourceDesignationId = sourceDesignationValue
|
|
13962
|
+
? (typeof sourceDesignationValue === 'string' ? sourceDesignationValue : (sourceDesignationValue._id || sourceDesignationValue))
|
|
13963
|
+
: undefined;
|
|
13964
|
+
const sourceActiveFrom = sourceMappingFormGroup.get('syenm_activefrom')?.value;
|
|
13965
|
+
const sourceActiveUpto = sourceMappingFormGroup.get('syenm_activeupto')?.value;
|
|
13966
|
+
const sourceIsActive = sourceMappingFormGroup.get('syenm_isactive')?.value;
|
|
13967
|
+
// Get target entity ID
|
|
13968
|
+
const targetEntityId = this.getEntityIdFromMapping(targetIndex);
|
|
13969
|
+
if (!targetEntityId) {
|
|
13970
|
+
this.notificationService.error('Target entity not found.');
|
|
13971
|
+
this.closeCopyRoleFromEntityDrawer();
|
|
13972
|
+
return;
|
|
13973
|
+
}
|
|
13974
|
+
// Copy role if available and valid for target entity
|
|
13975
|
+
if (sourceRoleId) {
|
|
13976
|
+
// Check if role exists for target entity
|
|
13977
|
+
const rolesForTarget = this.roleOptions()[targetEntityId] || [];
|
|
13978
|
+
const roleToCopy = rolesForTarget.find(r => r._id === sourceRoleId);
|
|
13979
|
+
if (roleToCopy) {
|
|
13980
|
+
targetMappingFormGroup.get('syenm_role_id_syusrol')?.setValue(sourceRoleId);
|
|
13981
|
+
// Trigger role change to load menu rights
|
|
13982
|
+
this.onRoleChange(targetIndex, roleToCopy);
|
|
13983
|
+
}
|
|
13984
|
+
else {
|
|
13985
|
+
this.notificationService.warning(`Role is not available for target entity. Other settings copied.`);
|
|
13986
|
+
}
|
|
13987
|
+
}
|
|
13988
|
+
// Copy department if available
|
|
13989
|
+
if (sourceDepartmentId) {
|
|
13990
|
+
const departmentsForTarget = this.getDepartmentOptionsForEntity(targetIndex);
|
|
13991
|
+
const departmentToCopy = departmentsForTarget.find(d => d._id === sourceDepartmentId);
|
|
13992
|
+
if (departmentToCopy) {
|
|
13993
|
+
targetMappingFormGroup.get('syenm_department_id_sydept')?.setValue(sourceDepartmentId);
|
|
13994
|
+
this.onDepartmentChange(departmentToCopy);
|
|
13995
|
+
}
|
|
13996
|
+
}
|
|
13997
|
+
// Copy designation if available
|
|
13998
|
+
if (sourceDesignationId) {
|
|
13999
|
+
const designationsForTarget = this.getDesignationOptionsForEntity(targetIndex);
|
|
14000
|
+
const desigExists = designationsForTarget.some(d => d._id === sourceDesignationId);
|
|
14001
|
+
if (desigExists) {
|
|
14002
|
+
targetMappingFormGroup.get('syenm_designation_id_sydsg')?.setValue(sourceDesignationId);
|
|
14003
|
+
}
|
|
14004
|
+
}
|
|
14005
|
+
// Copy active dates
|
|
14006
|
+
if (sourceActiveFrom) {
|
|
14007
|
+
targetMappingFormGroup.get('syenm_activefrom')?.setValue(sourceActiveFrom);
|
|
14008
|
+
}
|
|
14009
|
+
if (sourceActiveUpto) {
|
|
14010
|
+
targetMappingFormGroup.get('syenm_activeupto')?.setValue(sourceActiveUpto);
|
|
14011
|
+
}
|
|
14012
|
+
// Copy active status
|
|
14013
|
+
if (sourceIsActive !== undefined) {
|
|
14014
|
+
targetMappingFormGroup.get('syenm_isactive')?.setValue(sourceIsActive);
|
|
14015
|
+
}
|
|
14016
|
+
// Note: Menu rights will be automatically loaded when role is set via onRoleChange()
|
|
14017
|
+
// Custom menu right modifications are role-specific and will be reset to default for the copied role
|
|
14018
|
+
this.notificationService.success('Role and settings copied successfully.');
|
|
14019
|
+
this.closeCopyRoleFromEntityDrawer();
|
|
14020
|
+
// Mark form as dirty
|
|
14021
|
+
this.userMasterForm.markAsDirty();
|
|
14022
|
+
this.userMasterForm.markAsTouched();
|
|
14023
|
+
}
|
|
14024
|
+
catch (error) {
|
|
14025
|
+
console.error('Error copying role from entity mapping:', error);
|
|
14026
|
+
this.notificationService.error('Failed to copy role from entity mapping.');
|
|
14027
|
+
this.closeCopyRoleFromEntityDrawer();
|
|
14028
|
+
}
|
|
14029
|
+
}
|
|
14030
|
+
/**
|
|
14031
|
+
* Close copy role from entity drawer
|
|
14032
|
+
*/
|
|
14033
|
+
closeCopyRoleFromEntityDrawer() {
|
|
14034
|
+
this.floatingContainerService.hide('copy-role-from-entity');
|
|
14035
|
+
this.targetMappingIndexForCopy.set(null);
|
|
14036
|
+
}
|
|
13619
14037
|
/**
|
|
13620
14038
|
* Handle entity mapping card state change (expand/collapse)
|
|
13621
14039
|
* Load data lazily when card is expanded
|
|
@@ -15319,6 +15737,41 @@ class CideCoreUserCreateComponent {
|
|
|
15319
15737
|
* @param mappingIndex - Index of the entity mapping
|
|
15320
15738
|
* @returns Entity ID string or undefined
|
|
15321
15739
|
*/
|
|
15740
|
+
/**
|
|
15741
|
+
* Get role ID from mapping by index
|
|
15742
|
+
*/
|
|
15743
|
+
getRoleIdFromMapping(mappingIndex) {
|
|
15744
|
+
// First try to get from form control
|
|
15745
|
+
const mappingFormGroup = this.entityMappingsFormArray.at(mappingIndex);
|
|
15746
|
+
if (mappingFormGroup) {
|
|
15747
|
+
const roleIdValue = mappingFormGroup.get('syenm_role_id_syusrol')?.value;
|
|
15748
|
+
if (roleIdValue) {
|
|
15749
|
+
// Handle both string and object formats
|
|
15750
|
+
const roleId = typeof roleIdValue === 'string'
|
|
15751
|
+
? roleIdValue
|
|
15752
|
+
: (roleIdValue._id || roleIdValue.toString?.() || undefined);
|
|
15753
|
+
if (roleId) {
|
|
15754
|
+
return roleId.toString();
|
|
15755
|
+
}
|
|
15756
|
+
}
|
|
15757
|
+
}
|
|
15758
|
+
// Fallback: try to get from entity mappings signal
|
|
15759
|
+
const entityMappings = this.entityMappings();
|
|
15760
|
+
if (entityMappings && entityMappings[mappingIndex]) {
|
|
15761
|
+
const mapping = entityMappings[mappingIndex];
|
|
15762
|
+
const roleIdFromSignal = mapping.syenm_role_id_syusrol;
|
|
15763
|
+
if (roleIdFromSignal) {
|
|
15764
|
+
// Handle both string and object formats
|
|
15765
|
+
const roleId = typeof roleIdFromSignal === 'string'
|
|
15766
|
+
? roleIdFromSignal
|
|
15767
|
+
: (roleIdFromSignal._id || roleIdFromSignal.toString?.() || undefined);
|
|
15768
|
+
if (roleId) {
|
|
15769
|
+
return roleId.toString();
|
|
15770
|
+
}
|
|
15771
|
+
}
|
|
15772
|
+
}
|
|
15773
|
+
return undefined;
|
|
15774
|
+
}
|
|
15322
15775
|
getEntityIdFromMapping(mappingIndex) {
|
|
15323
15776
|
// First try to get from form control
|
|
15324
15777
|
const mappingFormGroup = this.entityMappingsFormArray.at(mappingIndex);
|
|
@@ -15902,9 +16355,58 @@ class CideCoreUserCreateComponent {
|
|
|
15902
16355
|
const { core_entity_mapping, core_user_contact_addresses, core_user_documents, core_user_family_details, syutm_user_type, syutm_type_specific_id, ...auth_user_mst } = this.userMasterForm.value;
|
|
15903
16356
|
// Process role exceptions using the new permission tracking system
|
|
15904
16357
|
const core_user_role_exceptions = this.processRoleExceptions();
|
|
16358
|
+
// Get entity mappings with raw values (to include disabled controls) and ensure entity IDs are properly extracted
|
|
16359
|
+
const rawEntityMappings = this.entityMappingsFormArray.getRawValue();
|
|
16360
|
+
const processedEntityMappings = rawEntityMappings.map((mapping) => {
|
|
16361
|
+
const processedMapping = { ...mapping };
|
|
16362
|
+
// Extract entity ID - handle both object and string formats
|
|
16363
|
+
if (mapping.syenm_entity_id_syen) {
|
|
16364
|
+
const entityValue = mapping.syenm_entity_id_syen;
|
|
16365
|
+
if (typeof entityValue === 'object' && entityValue !== null && '_id' in entityValue) {
|
|
16366
|
+
// Extract _id from object
|
|
16367
|
+
processedMapping.syenm_entity_id_syen = entityValue._id;
|
|
16368
|
+
}
|
|
16369
|
+
else if (typeof entityValue === 'string' && entityValue.trim() !== '') {
|
|
16370
|
+
// Already a string, use as-is
|
|
16371
|
+
processedMapping.syenm_entity_id_syen = entityValue;
|
|
16372
|
+
}
|
|
16373
|
+
}
|
|
16374
|
+
// Extract role ID if it's an object
|
|
16375
|
+
if (mapping.syenm_role_id_syusrol) {
|
|
16376
|
+
const roleValue = mapping.syenm_role_id_syusrol;
|
|
16377
|
+
if (typeof roleValue === 'object' && roleValue !== null && '_id' in roleValue) {
|
|
16378
|
+
processedMapping.syenm_role_id_syusrol = roleValue._id;
|
|
16379
|
+
}
|
|
16380
|
+
}
|
|
16381
|
+
// Extract designation ID if it's an object
|
|
16382
|
+
if (mapping.syenm_designation_id_sydsg) {
|
|
16383
|
+
const designationValue = mapping.syenm_designation_id_sydsg;
|
|
16384
|
+
if (typeof designationValue === 'object' && designationValue !== null && '_id' in designationValue) {
|
|
16385
|
+
processedMapping.syenm_designation_id_sydsg = designationValue._id;
|
|
16386
|
+
}
|
|
16387
|
+
}
|
|
16388
|
+
// Extract department ID if it's an object
|
|
16389
|
+
if (mapping.syenm_department_id_sydept) {
|
|
16390
|
+
const departmentValue = mapping.syenm_department_id_sydept;
|
|
16391
|
+
if (typeof departmentValue === 'object' && departmentValue !== null && '_id' in departmentValue) {
|
|
16392
|
+
processedMapping.syenm_department_id_sydept = departmentValue._id;
|
|
16393
|
+
}
|
|
16394
|
+
}
|
|
16395
|
+
// Remove empty _id for new mappings (let backend generate it)
|
|
16396
|
+
if (processedMapping._id === '' || processedMapping._id === null || processedMapping._id === undefined) {
|
|
16397
|
+
delete processedMapping._id;
|
|
16398
|
+
}
|
|
16399
|
+
// Remove exceptions array if empty (it's handled separately)
|
|
16400
|
+
// Cast to extended type to safely access exceptions property
|
|
16401
|
+
const mappingWithExceptions = processedMapping;
|
|
16402
|
+
if ('exceptions' in mappingWithExceptions && Array.isArray(mappingWithExceptions.exceptions) && mappingWithExceptions.exceptions.length === 0) {
|
|
16403
|
+
delete mappingWithExceptions.exceptions;
|
|
16404
|
+
}
|
|
16405
|
+
return processedMapping;
|
|
16406
|
+
});
|
|
15905
16407
|
const formData = {
|
|
15906
16408
|
auth_user_mst: auth_user_mst,
|
|
15907
|
-
core_entity_mapping:
|
|
16409
|
+
core_entity_mapping: processedEntityMappings,
|
|
15908
16410
|
core_user_role_exceptions: core_user_role_exceptions,
|
|
15909
16411
|
core_user_contact_addresses: core_user_contact_addresses || [],
|
|
15910
16412
|
core_user_documents: core_user_documents || [],
|
|
@@ -16705,10 +17207,10 @@ class CideCoreUserCreateComponent {
|
|
|
16705
17207
|
throw error;
|
|
16706
17208
|
}
|
|
16707
17209
|
}
|
|
16708
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
16709
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreUserCreateComponent, isStandalone: true, selector: "cide-core-user-create", viewQueries: [{ propertyName: "menuDetailsRendererTemplate", first: true, predicate: ["menuDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "permissionsCheckboxRendererTemplate", first: true, predicate: ["permissionsCheckboxRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "menuTypeRendererTemplate", first: true, predicate: ["menuTypeRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "menuRightsPermissionsRendererTemplate", first: true, predicate: ["menuRightsPermissionsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "permissionsRendererTemplate", first: true, predicate: ["permissionsRendererTemplate"], descendants: true, isSignal: true }], 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<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: pageCode() }\" [breadcrumb_data]=\"breadcrumbData()\">\n <div class=\"tw-w-full tw-h-full tw-p-1 tw-pt-2\">\n <!-- Toast Notifications -->\n <cide-ele-toast-notification></cide-ele-toast-notification>\n \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\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-1 tw-mb-2 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 (userMasterForm.get('user_photo_id_cyfm')?.value) {\n <img cideEleFileImage [fileId]=\"userMasterForm.get('user_photo_id_cyfm')?.value\"\n [altText]=\"'Profile Photo'\" class=\"tw-w-full tw-h-full tw-object-cover\">\n } @else {\n <cide-ele-icon name=\"person\" class=\"tw-w-5 tw-h-5 tw-text-blue-600\">\n </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-1 tw-border-b-0 tw-mb-1\">\n\n <!-- Top Section: Form Fields on Left, Profile Photo on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-[1fr_200px] tw-gap-4 tw-mb-4\">\n <!-- Left Side: Form Fields -->\n <div class=\"tw-space-y-4\">\n <!-- Name Fields - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-4\">\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 Information - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-3 tw-gap-4\">\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 <!-- User Type Mapping -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-4\">\n <cide-ele-select\n id=\"syutm_user_type\"\n label=\"User Type\"\n placeholder=\"Select user type\"\n [options]=\"userTypeOptions\"\n valueKey=\"value\"\n labelKey=\"label\"\n formControlName=\"syutm_user_type\"\n size=\"md\">\n </cide-ele-select>\n\n <cide-ele-input\n id=\"syutm_type_specific_id\"\n label=\"Type-Specific ID\"\n placeholder=\"Enter type-specific ID (e.g., STU001, TCH001)\"\n formControlName=\"syutm_type_specific_id\"\n [maxlength]=\"50\"\n size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n\n <!-- Right Side: Profile Photo Upload -->\n <div class=\"tw-flex tw-items-start tw-justify-center tw-p-0\">\n <cide-ele-file-input id=\"user_photo_id_cyfm\" formControlName=\"user_photo_id_cyfm\" accept=\"image/*\"\n [showPreview]=\"true\" [previewBoxMode]=\"true\" [showFileName]=\"false\" previewWidth=\"180px\"\n previewHeight=\"120px\" placeholderText=\"Upload Photo\" placeholderIcon=\"cloud_upload\" [autoUpload]=\"true\"\n [uploadData]=\"getProfilePhotoUploadData()\" (uploadSuccess)=\"onProfilePhotoUploadSuccess($event)\"\n (uploadError)=\"onProfilePhotoUploadError($event)\"\n (uploadProgressChange)=\"onProfilePhotoUploadProgress($event)\">\n </cide-ele-file-input>\n </div>\n </div>\n\n\n\n <!-- Status Control -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-2\">\n <div class=\"tw-p-2 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-1 tw-border-b-0 tw-mb-1\">\n <!-- Password Fields -->\n @if (shouldShowPasswordFields()) {\n <div class=\"tw-mb-4\">\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-4\">\n <div class=\"tw-p-2 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-4 tw-mb-4\">\n <div class=\"tw-p-2 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 </div>\n }\n\n @case ('roles') {\n <!-- Entity, Roles & Permissions Mapping Section -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\n\n\n\n <!-- Important Note -->\n <div class=\"tw-bg-amber-50 tw-border tw-border-amber-200 tw-rounded-lg tw-p-2 tw-mb-4\">\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-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()\"\n leftIcon=\"add\" [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 mapping.syenm_entity_id_syen?._id || mapping.syenm_entity_id_syen || $index; let i = $index) {\n <cide-ele-card\n [title]=\"getEntityNameFromMapping(i) || 'Entity Mapping ' + (i + 1)\"\n [subtitle]=\"mapping.syenm_isdefault ? 'Primary Entity' : ''\"\n [cardConfig]=\"{\n collapsible: true,\n minimizable: false,\n maximizable: false,\n removable: !mapping?._id,\n defaultState: 'collapsed',\n showHeader: true,\n showFooter: false,\n variant: 'default',\n size: 'sm',\n shadow: true,\n rounded: true,\n bordered: true\n }\"\n (stateChange)=\"onEntityMappingCardStateChange($event, i)\"\n (removed)=\"removeEntityMapping(i)\"\n class=\"tw-mb-2 entity-mapping-card tw-block\">\n \n <div [formGroupName]=\"i\">\n \n <!-- Card Actions (User Type Mappings only) -->\n <div card-actions class=\"tw-flex tw-items-center tw-gap-1.5 tw-flex-wrap tw-max-w-full\">\n @if (getEntityIdFromMapping(i)) {\n @if (getUserTypeMappingsForEntity(getEntityIdFromMapping(i)).length > 0) {\n @for (typeMapping of getUserTypeMappingsForEntity(getEntityIdFromMapping(i)); track typeMapping._id || typeMapping.syutm_type_specific_id) {\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-[10px] tw-font-medium tw-bg-purple-50 dark:tw-bg-purple-900/20 tw-text-purple-700 dark:tw-text-purple-300 tw-border tw-border-purple-200 dark:tw-border-purple-800\">\n <cide-ele-icon variant=\"purple\" size=\"xs\" class=\"tw-mr-1\">person</cide-ele-icon>\n {{ typeMapping.syutm_user_type }}\n @if (typeMapping.syutm_isactive) {\n <span class=\"tw-ml-1 tw-w-1.5 tw-h-1.5 tw-rounded-full tw-bg-green-500\"></span>\n }\n </span>\n }\n }\n }\n </div>\n\n <!-- Card Content -->\n <div class=\"tw-space-y-3\">\n <!-- Hidden form control to maintain form structure for entity -->\n <input type=\"hidden\" [formControlName]=\"'syenm_entity_id_syen'\" />\n \n <!-- Role, Default, and Active in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3\">\n <!-- Role Selection -->\n <cide-ele-select label=\"Role for this Entity\" [options]=\"getRoleOptionsForEntity(i)\"\n formControlName=\"syenm_role_id_syusrol\" valueKey=\"_id\" labelKey=\"syusrol_role_name\"\n placeholder=\"Select role for this entity\" size=\"md\" (change)=\"onRoleChange(i, $event)\">\n </cide-ele-select>\n \n <!-- Primary Entity Checkbox -->\n <div class=\"tw-flex tw-flex-col\">\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-1.5\">Default</label>\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-2 tw-rounded-md tw-border tw-border-green-200 tw-bg-green-50 dark:tw-bg-green-900/20 dark:tw-border-green-800\" (click)=\"$event.stopPropagation()\">\n <input \n type=\"checkbox\" \n [checked]=\"mapping.syenm_isdefault\"\n (change)=\"onDefaultEntityChange(i, $event)\" \n class=\"tw-h-4 tw-w-4 tw-accent-green-600 tw-cursor-pointer\" />\n <label class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs tw-font-semibold tw-text-green-700 dark:tw-text-green-300 tw-cursor-pointer\">\n <cide-ele-icon variant=\"green\" size=\"xs\">star</cide-ele-icon>\n DEFAULT\n </label>\n </div>\n </div>\n \n <!-- Active Mapping Checkbox -->\n <div class=\"tw-flex tw-flex-col\">\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-1.5\">Status</label>\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-2 tw-rounded-md tw-border tw-border-blue-200 tw-bg-blue-50 dark:tw-bg-blue-900/20 dark:tw-border-blue-800\" (click)=\"$event.stopPropagation()\">\n <input \n type=\"checkbox\" \n [checked]=\"mapping.syenm_isactive\"\n (change)=\"onActiveMappingChange(i, $event)\" \n class=\"tw-h-4 tw-w-4 tw-accent-blue-600 tw-cursor-pointer\" />\n <label class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs tw-font-semibold tw-text-blue-700 dark:tw-text-blue-300 tw-cursor-pointer\">\n <cide-ele-icon variant=\"blue\" size=\"xs\">check_circle</cide-ele-icon>\n Active\n </label>\n </div>\n </div>\n </div>\n\n\n <!-- Entity-Specific Details and Active Period - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3\">\n <cide-ele-select label=\"Department for this Entity\" [options]=\"getDepartmentOptionsForEntity(i)\"\n formControlName=\"syenm_department_id_sydept\" (change)=\"onDepartmentChange($event)\" valueKey=\"_id\"\n 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)\"\n valueKey=\"_id\" labelKey=\"sydsg_name\" formControlName=\"syenm_designation_id_sydsg\"\n placeholder=\"Select designation\" size=\"md\">\n </cide-ele-select>\n\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 <!-- Menu Rights Grid for this Entity-Role -->\n <div class=\"tw-border-t tw-border-gray-200\">\n\n @if (getMenuRightsForMapping(i).length > 0) {\n <!-- Menu Rights Tree Grid -->\n\n <cide-ele-data-grid [config]=\"getMenuRightsGridConfig(i)\"\n [templateRenderers]=\"getMenuRightsTemplateRenderers(i)\"\n (gridEvent)=\"onMenuRightsGridEvent($event, i)\" class=\"tw-h-96 tw-w-full\">\n </cide-ele-data-grid>\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\n automatically load\n menu rights for this mapping.</p>\n </div>\n }\n </div>\n </div>\n </div>\n </cide-ele-card>\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 @case ('addresses') {\n <!-- Contact Addresses Section -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\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\" [disabled]=\"!hasAddContactAddressRights()\">\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-4 tw-py-2 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <!-- Use address type as header instead of generic \"Address X\" -->\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">\n {{ getAddressTypeLabel(i) || ('Address ' + (i + 1)) }}\n </h4>\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n @if (isAddressOwner(i)) {\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"shareAddress(i)\"\n leftIcon=\"share\" class=\"tw-text-blue-600 hover:tw-text-blue-700\">\n Share\n </button>\n }\n @if (!address?._id) {\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeContactAddress(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n }\n </div>\n </div>\n <div class=\"tw-p-4\">\n <!-- Main Layout: Inputs on Left, Address Textarea on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n \n <!-- Left Side: Input Fields (3/4 width) -->\n <div class=\"lg:tw-col-span-3\">\n <!-- Row 1: Address Type, Contact Person -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Address Type\" [options]=\"addressTypeOptions()\" id=\"sycad_address_type_id_sygms\"\n formControlName=\"sycad_address_type_id_sygms\" placeholder=\"Select type\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\" (change)=\"onAddressTypeChange(i)\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Contact Person\" formControlName=\"sycad_contact_person_name\"\n placeholder=\"Enter contact person\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 2: Postal Code, City, State, Country -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-4 tw-gap-3\">\n <cide-ele-select label=\"Postal Code\" [options]=\"addressPostalCodes()[i] || []\"\n formControlName=\"sycad_contact_pin_sypin\" placeholder=\"Select postal code\" [searchable]=\"true\"\n [loading]=\"addressPostalCodesLoading()[i] || false\" (searchChange)=\"onPostalCodeSearch($event, i)\"\n (change)=\"onPostalCodeSelection($event, i)\" size=\"sm\">\n </cide-ele-select>\n\n <cide-ele-input label=\"City\" formControlName=\"sycad_contact_city_sypin\" placeholder=\"Enter city\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"State\" formControlName=\"sycad_contact_state_sypin\" placeholder=\"Enter state\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Country\" [options]=\"addressCountries()[i] || []\"\n formControlName=\"sycad_contact_country_syctr\" placeholder=\"Select country\" valueKey=\"_id\"\n labelKey=\"syctr_country_iso_name\" [searchable]=\"true\" (searchChange)=\"onCountrySearch($event, i)\"\n [loading]=\"addressCountriesLoading()[i] || false\" size=\"sm\">\n </cide-ele-select>\n </div>\n </div>\n\n <!-- Right Side: Address Textarea (1/4 width, spans 2 rows) -->\n <div class=\"lg:tw-col-span-1 lg:tw-row-span-2 tw-flex tw-flex-col\">\n <cide-ele-textarea label=\"Complete Address\" formControlName=\"sycad_contact_address\"\n placeholder=\"Enter complete address with area, city, and landmarks\" [rows]=\"4\" size=\"sm\"\n class=\"tw-h-full\">\n </cide-ele-textarea>\n </div>\n </div>\n\n <!-- Contact Details: Primary Phone, Alt Phone, Fax, Primary Email in 4 columns -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Primary Phone\" formControlName=\"sycad_contact_phone\" type=\"tel\"\n placeholder=\"Primary phone\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Alternate Phone\" formControlName=\"sycad_contact_phone_alt\" type=\"tel\"\n placeholder=\"Alternate phone\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Fax Number\" formControlName=\"sycad_contact_fax\" placeholder=\"Fax number\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Primary Email\" formControlName=\"sycad_contact_email\" type=\"email\"\n placeholder=\"Primary email\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Alternate Email in single row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3\">\n <cide-ele-input label=\"Alternate Email\" formControlName=\"sycad_contact_email_alt\" type=\"email\"\n placeholder=\"Alternate email address\" size=\"sm\">\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-1 tw-border-b-0 tw-mb-1\">\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\" [disabled]=\"!hasAddDocumentRights()\">\n Add Document\n </button>\n </div>\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-4 tw-py-2 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\">\n {{ getDocumentTypeLabel(i) || ('Document ' + (i + 1)) }}\n </h4>\n <div class=\"tw-flex tw-gap-2\">\n @if (doc?._id) {\n <button cideEleButton variant=\"secondary\" size=\"sm\" type=\"button\" (click)=\"shareDocumentRights(i)\"\n leftIcon=\"share\">\n Share\n </button>\n }\n </div>\n </div>\n <div class=\"tw-p-4\">\n <!-- Main Layout: Inputs on Left, File Upload on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-3 tw-gap-4\">\n \n <!-- Left Side: Document Information (2/3 width) -->\n <div class=\"lg:tw-col-span-2\">\n <!-- Row 1: Document Type, Document Number, Name as per Document -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Document Type\" [options]=\"documentTypeOptions()\"\n formControlName=\"syusd_document_type_id_sygms\" placeholder=\"Select type\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\" (change)=\"onDocumentTypeChange(i)\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Document Number\" formControlName=\"syusd_doc_number\"\n placeholder=\"Document number\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Name as per Document\" formControlName=\"syusd_doc_name_as_per_doc\"\n placeholder=\"Name on document\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 2: Issue Date, Expiry Date, Photo Group -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Issue Date\" formControlName=\"syusd_doc_issue_date\"\n [id]=\"'syusd_doc_issue_date['+i+']'\" type=\"date\" size=\"sm\">\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=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 3: Verification Status, KYC Status -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3\">\n <cide-ele-select label=\"Verification Status\" [options]=\"documentVerificationStatusOptions()\"\n formControlName=\"syusd_doc_verification_status_id_sygms\" placeholder=\"Select status\"\n size=\"sm\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-select label=\"KYC Status\" [options]=\"documentKycStatusOptions()\"\n formControlName=\"syusd_doc_kyc_status_id_sygms\" placeholder=\"Select KYC status\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n </div>\n\n <!-- Right Side: File Upload (1/3 width) -->\n <div class=\"lg:tw-col-span-1\">\n <div class=\"tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg tw-p-3 tw-h-full\">\n \n <!-- File Upload Input -->\n <cide-ele-file-input\n [id]=\"'document-files-' + i\"\n [multiple]=\"true\"\n formControlName=\"syusd_photo_group_id_cyfm\"\n [accept]=\"'.pdf,.jpg,.jpeg,.png,.doc,.docx'\"\n [autoUpload]=\"true\"\n [uploadData]=\"getDocumentUploadData(i)\"\n (change)=\"onDocumentFilesSelected($event, i)\"\n (uploadSuccess)=\"onDocumentUploadSuccess($event, i)\"\n (uploadError)=\"onDocumentUploadError($event, i)\"\n (uploadProgressChange)=\"onDocumentUploadProgress($event, i)\"\n class=\"tw-mb-3\"\n size=\"sm\">\n </cide-ele-file-input>\n\n <!-- Upload Status -->\n <!-- Upload status is now handled by the file input component itself -->\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @case ('family') {\n <!-- Family Details Section - Compact Design -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-3 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"button\" (click)=\"addFamilyDetail()\" leftIcon=\"add\" [disabled]=\"!hasAddFamilyDetailRights()\">\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-lg tw-mb-4 tw-overflow-hidden tw-transition-all tw-duration-200 hover:tw-shadow-md tw-shadow-sm\">\n \n <!-- Compact Header -->\n <div class=\"tw-bg-gray-50 tw-px-4 tw-py-2 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-medium\">Family Member {{ i + 1 }}</h4>\n <div class=\"tw-flex tw-gap-2\">\n @if (family?._id) {\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"shareFamilyDetailRights(i)\"\n leftIcon=\"share\">\n Share\n </button>\n }\n @if (!family?._id) {\n <button cideEleButton variant=\"danger\" size=\"xs\" type=\"button\" (click)=\"removeFamilyDetail(i)\" leftIcon=\"delete\">\n Remove\n </button>\n }\n </div>\n </div>\n \n <!-- Compact Form Content - 3 inputs per row -->\n <div class=\"tw-p-4\">\n <!-- Row 1: Name, User, and Combined Relationship/Active Status (33.33% each) -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Family Member Name\" formControlName=\"syfdl_family_member_name\"\n placeholder=\"Enter family member full name\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Family Member User\" [options]=\"userOptions(i)\"\n formControlName=\"syfdl_family_member_id_user\" placeholder=\"Select family member user\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"user_fullname\" [searchable]=\"true\"\n [loading]=\"userSearchLoading()[i] || false\" (searchChange)=\"onUserSearchChange($event, i)\"\n (change)=\"onUserSelectionChange($event, i)\">\n </cide-ele-select>\n\n <!-- Combined Relationship and Active Status (33.33%) -->\n <div class=\"tw-flex tw-flex-row tw-gap-2 tw-items-end\">\n <div class=\"tw-flex-1\">\n <cide-ele-select label=\"Relationship\" [options]=\"relationshipOptions()\"\n formControlName=\"syfdl_relationship_id_sygms\" placeholder=\"Select relationship\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-pt-1 tw-flex-shrink-0\">\n <cide-ele-input formControlName=\"syfdl_isactive\" type=\"checkbox\" label=\"Active\" size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n\n <!-- Row 2: Blood Group, DOB, and Phone -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 xl:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Blood Group\" [options]=\"bloodGroupOptions()\"\n formControlName=\"syfdl_blood_group_sygms\" placeholder=\"Select blood group\" size=\"sm\" valueKey=\"_id\"\n labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Date of Birth\" formControlName=\"syfdl_family_member_dob\" type=\"date\" size=\"sm\"\n [id]=\"'syfdl_family_member_dob['+i+']'\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Phone\" formControlName=\"syfdl_contact_phone\" type=\"tel\"\n placeholder=\"Enter contact phone\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 3: Email, Email ID, and Contact Number -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 xl:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Contact Email\" formControlName=\"syfdl_contact_email\" type=\"email\"\n placeholder=\"Enter contact email\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Email ID\" formControlName=\"syfdl_contact_email_id\" type=\"email\"\n placeholder=\"Enter contact email ID\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Number\" formControlName=\"syfdl_contact_number\" type=\"tel\"\n placeholder=\"Enter contact number\" size=\"sm\">\n </cide-ele-input>\n </div>\n\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-between tw-items-center 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 <!-- Error Display Component -->\n <div class=\"tw-flex-1\">\n <cide-form-field-error [formGroup]=\"userMasterForm\"></cide-form-field-error>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-gap-4\">\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 </div>\n </form>\n</div>\n</cide-lyt-shared-wrapper>\n\n<!-- Template Renderers for Role Permissions Grid -->\n<ng-template #menuDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-min-w-0\">\n <!-- Menu Icon -->\n <div class=\"tw-flex-shrink-0\">\n @if (row.syme_type === 'module') {\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">folder</cide-ele-icon>\n } @else if (row.syme_type === 'section') {\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">folder_open</cide-ele-icon>\n } @else if (row.syme_type === 'menu') {\n <cide-ele-icon class=\"tw-text-purple-600 tw-w-4 tw-h-4\">menu</cide-ele-icon>\n } @else {\n <cide-ele-icon class=\"tw-text-gray-600 tw-w-4 tw-h-4\">description</cide-ele-icon>\n }\n </div>\n\n <!-- Menu Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"row.syme_title\">\n {{ row.syme_title || row.menu?.syme_title || row.menu?.syme_menu_name || 'Untitled' }}\n </div>\n <!-- Green pill indicator for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-whitespace-nowrap\">\n Assigned\n </span>\n }\n }\n </div>\n @if (row.permission?.sygms_name) {\n <div class=\"tw-text-xs tw-text-blue-500 tw-truncate\" [title]=\"row.permission?.sygms_name\">\n {{ row.permission?.sygms_name }}\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 <div class=\"tw-flex tw-items-center tw-justify-center\">\n @if (row.syme_type === 'module') {\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-blue-100 tw-text-blue-800\">\n Module\n </span>\n } @else if (row.syme_type === 'section') {\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 Section\n </span>\n } @else if (row.syme_type === 'menu') {\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-purple-100 tw-text-purple-800\">\n Menu\n </span>\n } @else {\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-gray-100 tw-text-gray-800\">\n {{ row.syme_type || 'Unknown' }}\n </span>\n }\n </div>\n</ng-template>\n\n<!-- Permissions Checkbox Renderer Template -->\n<ng-template #permissionsCheckboxRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row.syme_type === 'menu' && row?.syme_permissions_id_sygms && row?.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row?.syme_permissions_id_sygms || []; track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <input type=\"checkbox\" [checked]=\"isPermissionSelected(row._id, permissionId)\" [disabled]=\"true\"\n class=\"tw-h-4 tw-w-4 tw-text-blue-600 tw-bg-gray-100 tw-border-gray-300 tw-rounded focus:tw-ring-blue-500\">\n <label class=\"tw-text-xs tw-text-gray-700\">\n {{ getPermissionById(permissionId)?.sygms_title || 'Unknown' }}\n </label>\n </div>\n </div>\n }\n } @else {\n <!-- Show green checkmark for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section' || row.syme_type === 'title') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-bg-green-100 tw-rounded-full\">\n <cide-ele-icon class=\"tw-text-green-600\" size=\"xs\">\n check\n </cide-ele-icon>\n </div>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n }\n </div>\n</ng-template>\n\n<!-- Menu Rights Permissions Renderer Template -->\n<ng-template #menuRightsPermissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n <!-- Role Rights Display -->\n @if (row.role_rights && row.role_rights.length > 0) {\n <div class=\"tw-mb-2\">\n <div class=\"tw-text-xs tw-text-gray-500 tw-mb-1\">Role Rights:</div>\n <div class=\"tw-flex tw-flex-wrap tw-gap-1\">\n @for (right of row.role_rights; track $index) {\n <span 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 </div>\n }\n\n\n <!-- Exception Indicator -->\n @if (row.hasException) {\n <div class=\"tw-mt-2\">\n <span 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 </div>\n } @else {\n <div class=\"tw-mt-2\">\n <span class=\"tw-text-xs tw-text-gray-400\">Default</span>\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Permissions Renderer Template -->\n<ng-template #permissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row._permissionValues && Object.keys(row._permissionValues).length > 0) {\n @for (permissionId of Object.keys(row._permissionValues); track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-input type=\"checkbox\" [ngModel]=\"row._permissionValues[permissionId].checked\"\n (ngModelChange)=\"onPermissionChangeSafe($event, row, permissionId)\"\n [id]=\"'permission-' + row._id + '-' + permissionId\" class=\"tw-h-4 tw-w-4\">\n </cide-ele-input>\n <label [for]=\"'permission-' + row._id + '-' + permissionId\" \n class=\"tw-text-xs tw-cursor-pointer\"\n [ngClass]=\"{\n 'tw-text-gray-700': row._permissionValues[permissionId].modified === row._permissionValues[permissionId].actual,\n 'tw-text-blue-600 tw-font-semibold': row._permissionValues[permissionId].modified !== row._permissionValues[permissionId].actual\n }\">\n {{ row._permissionValues[permissionId].permission?.sygms_title }}\n @if (row._permissionValues[permissionId].modified !== row._permissionValues[permissionId].actual) {\n <span class=\"tw-text-xs tw-text-orange-500 tw-ml-1\" title=\"Modified from role permission\">\n ({{ row._permissionValues[permissionId].actual ? '\u2713' : '\u2717' }})\n </span>\n }\n </label>\n </div>\n }\n } @else {\n <!-- No permissions to display - show N/A (permissions are already loaded, just empty) -->\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n </div>\n</ng-template>", styles: [":host ::ng-deep .entity-mapping-card{transition:all .2s ease}:host ::ng-deep .entity-mapping-card:hover{transform:translateY(-2px)}:host ::ng-deep .entity-mapping-card .cide-card-header{background:linear-gradient(135deg,#3b82f60d,#9333ea0d);border-bottom:1px solid rgba(59,130,246,.1)}:host ::ng-deep .dark .entity-mapping-card .cide-card-header{background:linear-gradient(135deg,#3b82f61a,#9333ea1a);border-bottom:1px solid rgba(59,130,246,.2)}:host ::ng-deep .entity-mapping-card .cide-card-header-content{font-weight:600}:host ::ng-deep .entity-mapping-card .cide-card-body{background:linear-gradient(180deg,#f9fafb80,#ffffff80)}:host ::ng-deep .dark .entity-mapping-card .cide-card-body{background:linear-gradient(180deg,#11182780,#1f293780)}\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.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: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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", "step", "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", "treeView"], 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], cide-ele-button", 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", "required", "helperText", "errorText", "showPreview", "previewWidth", "previewHeight", "previewBoxMode", "showFileName", "placeholderText", "placeholderIcon", "autoUpload", "uploadData", "showFloatingUploader", "floatingUploaderGroupId"], outputs: ["fileChange", "uploadSuccess", "uploadError", "uploadProgressChange"] }, { kind: "directive", type: CideEleFileImageDirective, selector: "[cideEleFileImage]", inputs: ["fileId", "altText"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideEleToastNotificationComponent, selector: "cide-ele-toast-notification" }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }, { kind: "component", type: CideEleCardComponent, selector: "cide-ele-card", inputs: ["title", "subtitle", "cardConfig"], outputs: ["stateChange", "collapsed", "minimized", "maximized", "removed", "headerClick"] }] });
|
|
17210
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17211
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreUserCreateComponent, isStandalone: true, selector: "cide-core-user-create", viewQueries: [{ propertyName: "menuDetailsRendererTemplate", first: true, predicate: ["menuDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "permissionsCheckboxRendererTemplate", first: true, predicate: ["permissionsCheckboxRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "menuTypeRendererTemplate", first: true, predicate: ["menuTypeRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "menuRightsPermissionsRendererTemplate", first: true, predicate: ["menuRightsPermissionsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "permissionsRendererTemplate", first: true, predicate: ["permissionsRendererTemplate"], descendants: true, isSignal: true }], 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<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: pageCode() }\" [breadcrumb_data]=\"breadcrumbData()\">\n <div class=\"tw-w-full tw-h-full tw-p-1 tw-pt-2\">\n <!-- Toast Notifications -->\n <cide-ele-toast-notification></cide-ele-toast-notification>\n \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\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-1 tw-mb-2 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 (userMasterForm.get('user_photo_id_cyfm')?.value) {\n <img cideEleFileImage [fileId]=\"userMasterForm.get('user_photo_id_cyfm')?.value\"\n [altText]=\"'Profile Photo'\" class=\"tw-w-full tw-h-full tw-object-cover\">\n } @else {\n <cide-ele-icon name=\"person\" class=\"tw-w-5 tw-h-5 tw-text-blue-600\">\n </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-1 tw-border-b-0 tw-mb-1\">\n\n <!-- Top Section: Form Fields on Left, Profile Photo on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-[1fr_200px] tw-gap-4 tw-mb-4\">\n <!-- Left Side: Form Fields -->\n <div class=\"tw-space-y-4\">\n <!-- Name Fields - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-4\">\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 Information - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-3 tw-gap-4\">\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 <!-- User Type Mapping -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-4\">\n <cide-ele-select\n id=\"syutm_user_type\"\n label=\"User Type\"\n placeholder=\"Select user type\"\n [options]=\"userTypeOptions\"\n valueKey=\"value\"\n labelKey=\"label\"\n formControlName=\"syutm_user_type\"\n size=\"md\">\n </cide-ele-select>\n\n <cide-ele-input\n id=\"syutm_type_specific_id\"\n label=\"Type-Specific ID\"\n placeholder=\"Enter type-specific ID (e.g., STU001, TCH001)\"\n formControlName=\"syutm_type_specific_id\"\n [maxlength]=\"50\"\n size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n\n <!-- Right Side: Profile Photo Upload -->\n <div class=\"tw-flex tw-items-start tw-justify-center tw-p-0\">\n <cide-ele-file-input id=\"user_photo_id_cyfm\" formControlName=\"user_photo_id_cyfm\" accept=\"image/*\"\n [showPreview]=\"true\" [previewBoxMode]=\"true\" [showFileName]=\"false\" previewWidth=\"180px\"\n previewHeight=\"120px\" placeholderText=\"Upload Photo\" placeholderIcon=\"cloud_upload\" [autoUpload]=\"true\"\n [uploadData]=\"getProfilePhotoUploadData()\" (uploadSuccess)=\"onProfilePhotoUploadSuccess($event)\"\n (uploadError)=\"onProfilePhotoUploadError($event)\"\n (uploadProgressChange)=\"onProfilePhotoUploadProgress($event)\">\n </cide-ele-file-input>\n </div>\n </div>\n\n\n\n <!-- Status Control -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-2\">\n <div class=\"tw-p-2 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-1 tw-border-b-0 tw-mb-1\">\n <!-- Password Fields -->\n @if (shouldShowPasswordFields()) {\n <div class=\"tw-mb-4\">\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-4\">\n <div class=\"tw-p-2 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-4 tw-mb-4\">\n <div class=\"tw-p-2 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 </div>\n }\n\n @case ('roles') {\n <!-- Entity, Roles & Permissions Mapping Section -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\n\n\n\n <!-- Important Note -->\n <div class=\"tw-bg-amber-50 tw-border tw-border-amber-200 tw-rounded-lg tw-p-2 tw-mb-4\">\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-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()\"\n leftIcon=\"add\" [disabled]=\"isViewingOwnProfile() || isAllEntitiesMapped()\"\n [title]=\"isViewingOwnProfile() ? 'You cannot modify your own entity mappings' : (isAllEntitiesMapped() ? 'All entities are mapped' : 'Add Entity Mapping')\">\n Add Entity Mapping\n </button>\n\n @if (isViewingOwnProfile()) {\n <div class=\"tw-mt-2 tw-p-2 tw-bg-amber-50 tw-border tw-border-amber-200 tw-rounded-md tw-max-w-xs\">\n <p class=\"tw-text-xs tw-text-amber-700\">\n <cide-ele-icon variant=\"warning\" size=\"xs\" class=\"tw-mr-1\">lock</cide-ele-icon>\n You cannot modify your own entity mappings.\n </p>\n </div>\n } @else 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 mapping.syenm_entity_id_syen?._id || mapping.syenm_entity_id_syen || $index; let i = $index) {\n <cide-ele-card\n [title]=\"getEntityNameFromMapping(i) || 'Entity Mapping ' + (i + 1)\"\n [subtitle]=\"mapping.syenm_isdefault ? 'Primary Entity' : ''\"\n [cardConfig]=\"{\n collapsible: true,\n minimizable: false,\n maximizable: false,\n removable: !mapping?._id && !isViewingOwnProfile(),\n defaultState: 'collapsed',\n showHeader: true,\n showFooter: false,\n variant: 'default',\n size: 'sm',\n shadow: true,\n rounded: true,\n bordered: true\n }\"\n (stateChange)=\"onEntityMappingCardStateChange($event, i)\"\n (removed)=\"removeEntityMapping(i)\"\n class=\"tw-mb-2 entity-mapping-card tw-block\">\n \n <div [formGroupName]=\"i\">\n \n <!-- Card Content -->\n <div class=\"tw-space-y-3\">\n <!-- Hidden form control to maintain form structure for entity -->\n <input type=\"hidden\" [formControlName]=\"'syenm_entity_id_syen'\" />\n \n <!-- Role, Default, Active, and User Type in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-4 tw-gap-3\">\n <!-- Role Selection with Copy Button -->\n <div class=\"tw-flex tw-flex-col\">\n <cide-ele-select label=\"Role for this Entity\" [options]=\"getRoleOptionsForEntity(i)\"\n formControlName=\"syenm_role_id_syusrol\" valueKey=\"_id\" labelKey=\"syusrol_role_name\"\n placeholder=\"Select role for this entity\" size=\"md\" (change)=\"onRoleChange(i, $event)\">\n </cide-ele-select>\n @if (!isViewingOwnProfile() && entityMappings().length > 1) {\n <button \n type=\"button\"\n (click)=\"showCopyRoleFromEntityDrawer(i)\"\n class=\"tw-mt-1 tw-text-xs tw-text-blue-600 hover:tw-text-blue-800 tw-flex tw-items-center tw-gap-1 tw-w-fit tw-transition-colors\"\n title=\"Copy role and settings from another entity mapping\">\n <cide-ele-icon variant=\"blue\" size=\"xs\">content_copy</cide-ele-icon>\n <span>Copy from Entity</span>\n </button>\n }\n </div>\n \n <!-- Primary Entity Checkbox -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-2 tw-rounded-md tw-border tw-border-green-300 tw-bg-green-50 dark:tw-bg-green-900/30 dark:tw-border-green-700\" (click)=\"$event.stopPropagation()\">\n <input \n type=\"checkbox\" \n [checked]=\"mapping.syenm_isdefault\"\n (change)=\"onDefaultEntityChange(i, $event)\" \n class=\"tw-h-4 tw-w-4 tw-accent-green-600 tw-cursor-pointer\" />\n <label class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs tw-font-semibold tw-text-green-700 dark:tw-text-green-300 tw-cursor-pointer\">\n <cide-ele-icon variant=\"green\" size=\"xs\" class=\"!tw-text-green-600 dark:!tw-text-green-400\">star</cide-ele-icon>\n DEFAULT\n </label>\n </div>\n </div>\n \n <!-- Active Mapping Checkbox -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-2 tw-rounded-md tw-border tw-border-blue-300 tw-bg-blue-50 dark:tw-bg-blue-900/30 dark:tw-border-blue-700\" (click)=\"$event.stopPropagation()\">\n <input \n type=\"checkbox\" \n [checked]=\"mapping.syenm_isactive\"\n (change)=\"onActiveMappingChange(i, $event)\" \n class=\"tw-h-4 tw-w-4 tw-accent-blue-600 tw-cursor-pointer\" />\n <label class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs tw-font-semibold tw-text-blue-700 dark:tw-text-blue-300 tw-cursor-pointer\">\n <cide-ele-icon variant=\"blue\" size=\"xs\" class=\"!tw-text-blue-600 dark:!tw-text-blue-400\">check_circle</cide-ele-icon>\n Active\n </label>\n </div>\n </div>\n \n <!-- User Type Mappings -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-items-center tw-gap-1.5 tw-flex-wrap\">\n @if (getEntityIdFromMapping(i)) {\n @if (getUserTypeMappingsForEntity(getEntityIdFromMapping(i)).length > 0) {\n @for (typeMapping of getUserTypeMappingsForEntity(getEntityIdFromMapping(i)); track typeMapping._id || typeMapping.syutm_type_specific_id) {\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-[10px] tw-font-medium tw-bg-purple-50 dark:tw-bg-purple-900/30 tw-text-gray-900 dark:tw-text-gray-100 tw-border tw-border-purple-300 dark:tw-border-purple-700\">\n <cide-ele-icon variant=\"purple\" size=\"xs\" class=\"tw-mr-1 !tw-text-purple-600 dark:!tw-text-purple-400\">person</cide-ele-icon>\n {{ typeMapping.syutm_user_type }}\n @if (typeMapping.syutm_isactive) {\n <span class=\"tw-ml-1 tw-w-1.5 tw-h-1.5 tw-rounded-full tw-bg-green-600\"></span>\n }\n </span>\n }\n }\n }\n </div>\n </div>\n </div>\n\n\n <!-- Entity-Specific Details and Active Period - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3\">\n <cide-ele-select label=\"Department for this Entity\" [options]=\"getDepartmentOptionsForEntity(i)\"\n formControlName=\"syenm_department_id_sydept\" (change)=\"onDepartmentChange($event)\" valueKey=\"_id\"\n 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)\"\n valueKey=\"_id\" labelKey=\"sydsg_name\" formControlName=\"syenm_designation_id_sydsg\"\n placeholder=\"Select designation\" size=\"md\">\n </cide-ele-select>\n\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 <!-- Menu Rights Grid for this Entity-Role -->\n <div class=\"tw-border-t tw-border-gray-200\">\n\n @if (getMenuRightsForMapping(i).length > 0) {\n <!-- Menu Rights Tree Grid -->\n\n <cide-ele-data-grid [config]=\"getMenuRightsGridConfig(i)\"\n [templateRenderers]=\"getMenuRightsTemplateRenderers(i)\"\n (gridEvent)=\"onMenuRightsGridEvent($event, i)\" class=\"tw-h-96 tw-w-full\">\n </cide-ele-data-grid>\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\n automatically load\n menu rights for this mapping.</p>\n </div>\n }\n </div>\n </div>\n </div>\n </cide-ele-card>\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 @if (!isViewingOwnProfile()) {\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 } @else {\n <p class=\"tw-text-amber-600 tw-text-sm tw-font-medium\">\n <cide-ele-icon variant=\"warning\" size=\"xs\" class=\"tw-mr-1\">lock</cide-ele-icon>\n You cannot modify your own entity mappings.\n </p>\n }\n </div>\n }\n </div>\n }\n\n @case ('addresses') {\n <!-- Contact Addresses Section -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\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\" [disabled]=\"!hasAddContactAddressRights()\">\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-4 tw-py-2 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <!-- Use address type as header instead of generic \"Address X\" -->\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">\n {{ getAddressTypeLabel(i) || ('Address ' + (i + 1)) }}\n </h4>\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n @if (isAddressOwner(i)) {\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"shareAddress(i)\"\n leftIcon=\"share\" class=\"tw-text-blue-600 hover:tw-text-blue-700\">\n Share\n </button>\n }\n @if (!address?._id) {\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeContactAddress(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n }\n </div>\n </div>\n <div class=\"tw-p-4\">\n <!-- Main Layout: Inputs on Left, Address Textarea on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n \n <!-- Left Side: Input Fields (3/4 width) -->\n <div class=\"lg:tw-col-span-3\">\n <!-- Row 1: Address Type, Contact Person -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Address Type\" [options]=\"addressTypeOptions()\" id=\"sycad_address_type_id_sygms\"\n formControlName=\"sycad_address_type_id_sygms\" placeholder=\"Select type\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\" (change)=\"onAddressTypeChange(i)\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Contact Person\" formControlName=\"sycad_contact_person_name\"\n placeholder=\"Enter contact person\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 2: Postal Code, City, State, Country -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-4 tw-gap-3\">\n <cide-ele-select label=\"Postal Code\" [options]=\"addressPostalCodes()[i] || []\"\n formControlName=\"sycad_contact_pin_sypin\" placeholder=\"Select postal code\" [searchable]=\"true\"\n [loading]=\"addressPostalCodesLoading()[i] || false\" (searchChange)=\"onPostalCodeSearch($event, i)\"\n (change)=\"onPostalCodeSelection($event, i)\" size=\"sm\">\n </cide-ele-select>\n\n <cide-ele-input label=\"City\" formControlName=\"sycad_contact_city_sypin\" placeholder=\"Enter city\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"State\" formControlName=\"sycad_contact_state_sypin\" placeholder=\"Enter state\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Country\" [options]=\"addressCountries()[i] || []\"\n formControlName=\"sycad_contact_country_syctr\" placeholder=\"Select country\" valueKey=\"_id\"\n labelKey=\"syctr_country_iso_name\" [searchable]=\"true\" (searchChange)=\"onCountrySearch($event, i)\"\n [loading]=\"addressCountriesLoading()[i] || false\" size=\"sm\">\n </cide-ele-select>\n </div>\n </div>\n\n <!-- Right Side: Address Textarea (1/4 width, spans 2 rows) -->\n <div class=\"lg:tw-col-span-1 lg:tw-row-span-2 tw-flex tw-flex-col\">\n <cide-ele-textarea label=\"Complete Address\" formControlName=\"sycad_contact_address\"\n placeholder=\"Enter complete address with area, city, and landmarks\" [rows]=\"4\" size=\"sm\"\n class=\"tw-h-full\">\n </cide-ele-textarea>\n </div>\n </div>\n\n <!-- Contact Details: Primary Phone, Alt Phone, Fax, Primary Email in 4 columns -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Primary Phone\" formControlName=\"sycad_contact_phone\" type=\"tel\"\n placeholder=\"Primary phone\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Alternate Phone\" formControlName=\"sycad_contact_phone_alt\" type=\"tel\"\n placeholder=\"Alternate phone\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Fax Number\" formControlName=\"sycad_contact_fax\" placeholder=\"Fax number\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Primary Email\" formControlName=\"sycad_contact_email\" type=\"email\"\n placeholder=\"Primary email\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Alternate Email in single row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3\">\n <cide-ele-input label=\"Alternate Email\" formControlName=\"sycad_contact_email_alt\" type=\"email\"\n placeholder=\"Alternate email address\" size=\"sm\">\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-1 tw-border-b-0 tw-mb-1\">\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\" [disabled]=\"!hasAddDocumentRights()\">\n Add Document\n </button>\n </div>\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-4 tw-py-2 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\">\n {{ getDocumentTypeLabel(i) || ('Document ' + (i + 1)) }}\n </h4>\n <div class=\"tw-flex tw-gap-2\">\n @if (doc?._id) {\n <button cideEleButton variant=\"secondary\" size=\"sm\" type=\"button\" (click)=\"shareDocumentRights(i)\"\n leftIcon=\"share\">\n Share\n </button>\n }\n </div>\n </div>\n <div class=\"tw-p-4\">\n <!-- Main Layout: Inputs on Left, File Upload on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-3 tw-gap-4\">\n \n <!-- Left Side: Document Information (2/3 width) -->\n <div class=\"lg:tw-col-span-2\">\n <!-- Row 1: Document Type, Document Number, Name as per Document -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Document Type\" [options]=\"documentTypeOptions()\"\n formControlName=\"syusd_document_type_id_sygms\" placeholder=\"Select type\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\" (change)=\"onDocumentTypeChange(i)\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Document Number\" formControlName=\"syusd_doc_number\"\n placeholder=\"Document number\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Name as per Document\" formControlName=\"syusd_doc_name_as_per_doc\"\n placeholder=\"Name on document\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 2: Issue Date, Expiry Date, Photo Group -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Issue Date\" formControlName=\"syusd_doc_issue_date\"\n [id]=\"'syusd_doc_issue_date['+i+']'\" type=\"date\" size=\"sm\">\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=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 3: Verification Status, KYC Status -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3\">\n <cide-ele-select label=\"Verification Status\" [options]=\"documentVerificationStatusOptions()\"\n formControlName=\"syusd_doc_verification_status_id_sygms\" placeholder=\"Select status\"\n size=\"sm\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-select label=\"KYC Status\" [options]=\"documentKycStatusOptions()\"\n formControlName=\"syusd_doc_kyc_status_id_sygms\" placeholder=\"Select KYC status\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n </div>\n\n <!-- Right Side: File Upload (1/3 width) -->\n <div class=\"lg:tw-col-span-1\">\n <div class=\"tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg tw-p-3 tw-h-full\">\n \n <!-- File Upload Input -->\n <cide-ele-file-input\n [id]=\"'document-files-' + i\"\n [multiple]=\"true\"\n formControlName=\"syusd_photo_group_id_cyfm\"\n [accept]=\"'.pdf,.jpg,.jpeg,.png,.doc,.docx'\"\n [autoUpload]=\"true\"\n [uploadData]=\"getDocumentUploadData(i)\"\n (change)=\"onDocumentFilesSelected($event, i)\"\n (uploadSuccess)=\"onDocumentUploadSuccess($event, i)\"\n (uploadError)=\"onDocumentUploadError($event, i)\"\n (uploadProgressChange)=\"onDocumentUploadProgress($event, i)\"\n class=\"tw-mb-3\"\n size=\"sm\">\n </cide-ele-file-input>\n\n <!-- Upload Status -->\n <!-- Upload status is now handled by the file input component itself -->\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @case ('family') {\n <!-- Family Details Section - Compact Design -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-3 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"button\" (click)=\"addFamilyDetail()\" leftIcon=\"add\" [disabled]=\"!hasAddFamilyDetailRights()\">\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-lg tw-mb-4 tw-overflow-hidden tw-transition-all tw-duration-200 hover:tw-shadow-md tw-shadow-sm\">\n \n <!-- Compact Header -->\n <div class=\"tw-bg-gray-50 tw-px-4 tw-py-2 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-medium\">Family Member {{ i + 1 }}</h4>\n <div class=\"tw-flex tw-gap-2\">\n @if (family?._id) {\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"shareFamilyDetailRights(i)\"\n leftIcon=\"share\">\n Share\n </button>\n }\n @if (!family?._id) {\n <button cideEleButton variant=\"danger\" size=\"xs\" type=\"button\" (click)=\"removeFamilyDetail(i)\" leftIcon=\"delete\">\n Remove\n </button>\n }\n </div>\n </div>\n \n <!-- Compact Form Content - 3 inputs per row -->\n <div class=\"tw-p-4\">\n <!-- Row 1: Name, User, and Combined Relationship/Active Status (33.33% each) -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Family Member Name\" formControlName=\"syfdl_family_member_name\"\n placeholder=\"Enter family member full name\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Family Member User\" [options]=\"userOptions(i)\"\n formControlName=\"syfdl_family_member_id_user\" placeholder=\"Select family member user\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"user_fullname\" [searchable]=\"true\"\n [loading]=\"userSearchLoading()[i] || false\" (searchChange)=\"onUserSearchChange($event, i)\"\n (change)=\"onUserSelectionChange($event, i)\">\n </cide-ele-select>\n\n <!-- Combined Relationship and Active Status (33.33%) -->\n <div class=\"tw-flex tw-flex-row tw-gap-2 tw-items-end\">\n <div class=\"tw-flex-1\">\n <cide-ele-select label=\"Relationship\" [options]=\"relationshipOptions()\"\n formControlName=\"syfdl_relationship_id_sygms\" placeholder=\"Select relationship\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-pt-1 tw-flex-shrink-0\">\n <cide-ele-input formControlName=\"syfdl_isactive\" type=\"checkbox\" label=\"Active\" size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n\n <!-- Row 2: Blood Group, DOB, and Phone -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 xl:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Blood Group\" [options]=\"bloodGroupOptions()\"\n formControlName=\"syfdl_blood_group_sygms\" placeholder=\"Select blood group\" size=\"sm\" valueKey=\"_id\"\n labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Date of Birth\" formControlName=\"syfdl_family_member_dob\" type=\"date\" size=\"sm\"\n [id]=\"'syfdl_family_member_dob['+i+']'\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Phone\" formControlName=\"syfdl_contact_phone\" type=\"tel\"\n placeholder=\"Enter contact phone\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 3: Email, Email ID, and Contact Number -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 xl:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Contact Email\" formControlName=\"syfdl_contact_email\" type=\"email\"\n placeholder=\"Enter contact email\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Email ID\" formControlName=\"syfdl_contact_email_id\" type=\"email\"\n placeholder=\"Enter contact email ID\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Number\" formControlName=\"syfdl_contact_number\" type=\"tel\"\n placeholder=\"Enter contact number\" size=\"sm\">\n </cide-ele-input>\n </div>\n\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-between tw-items-center 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 <!-- Error Display Component -->\n <div class=\"tw-flex-1\">\n <cide-form-field-error [formGroup]=\"userMasterForm\"></cide-form-field-error>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-gap-4\">\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 </div>\n </form>\n</div>\n</cide-lyt-shared-wrapper>\n\n<!-- Template Renderers for Role Permissions Grid -->\n<ng-template #menuDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-min-w-0\">\n <!-- Menu Icon -->\n <div class=\"tw-flex-shrink-0\">\n @if (row.syme_type === 'module') {\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">folder</cide-ele-icon>\n } @else if (row.syme_type === 'section') {\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">folder_open</cide-ele-icon>\n } @else if (row.syme_type === 'menu') {\n <cide-ele-icon class=\"tw-text-purple-600 tw-w-4 tw-h-4\">menu</cide-ele-icon>\n } @else {\n <cide-ele-icon class=\"tw-text-gray-600 tw-w-4 tw-h-4\">description</cide-ele-icon>\n }\n </div>\n\n <!-- Menu Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"row.syme_title\">\n {{ row.syme_title || row.menu?.syme_title || row.menu?.syme_menu_name || 'Untitled' }}\n </div>\n <!-- Green pill indicator for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-whitespace-nowrap\">\n Assigned\n </span>\n }\n }\n </div>\n @if (row.permission?.sygms_name) {\n <div class=\"tw-text-xs tw-text-blue-500 tw-truncate\" [title]=\"row.permission?.sygms_name\">\n {{ row.permission?.sygms_name }}\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 <div class=\"tw-flex tw-items-center tw-justify-center\">\n @if (row.syme_type === 'module') {\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-blue-100 tw-text-blue-800\">\n Module\n </span>\n } @else if (row.syme_type === 'section') {\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 Section\n </span>\n } @else if (row.syme_type === 'menu') {\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-purple-100 tw-text-purple-800\">\n Menu\n </span>\n } @else {\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-gray-100 tw-text-gray-800\">\n {{ row.syme_type || 'Unknown' }}\n </span>\n }\n </div>\n</ng-template>\n\n<!-- Permissions Checkbox Renderer Template -->\n<ng-template #permissionsCheckboxRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row.syme_type === 'menu' && row?.syme_permissions_id_sygms && row?.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row?.syme_permissions_id_sygms || []; track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <input type=\"checkbox\" [checked]=\"isPermissionSelected(row._id, permissionId)\" [disabled]=\"true\"\n class=\"tw-h-4 tw-w-4 tw-text-blue-600 tw-bg-gray-100 tw-border-gray-300 tw-rounded focus:tw-ring-blue-500\">\n <label class=\"tw-text-xs tw-text-gray-700\">\n {{ getPermissionById(permissionId)?.sygms_title || 'Unknown' }}\n </label>\n </div>\n </div>\n }\n } @else {\n <!-- Show green checkmark for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section' || row.syme_type === 'title') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-bg-green-100 tw-rounded-full\">\n <cide-ele-icon class=\"tw-text-green-600\" size=\"xs\">\n check\n </cide-ele-icon>\n </div>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n }\n </div>\n</ng-template>\n\n<!-- Menu Rights Permissions Renderer Template -->\n<ng-template #menuRightsPermissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n <!-- Role Rights Display -->\n @if (row.role_rights && row.role_rights.length > 0) {\n <div class=\"tw-mb-2\">\n <div class=\"tw-text-xs tw-text-gray-500 tw-mb-1\">Role Rights:</div>\n <div class=\"tw-flex tw-flex-wrap tw-gap-1\">\n @for (right of row.role_rights; track $index) {\n <span 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 </div>\n }\n\n\n <!-- Exception Indicator -->\n @if (row.hasException) {\n <div class=\"tw-mt-2\">\n <span 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 </div>\n } @else {\n <div class=\"tw-mt-2\">\n <span class=\"tw-text-xs tw-text-gray-400\">Default</span>\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Permissions Renderer Template -->\n<ng-template #permissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row._permissionValues && Object.keys(row._permissionValues).length > 0) {\n @for (permissionId of Object.keys(row._permissionValues); track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-input type=\"checkbox\" [ngModel]=\"row._permissionValues[permissionId].checked\"\n (ngModelChange)=\"onPermissionChangeSafe($event, row, permissionId)\"\n [id]=\"'permission-' + row._id + '-' + permissionId\" class=\"tw-h-4 tw-w-4\">\n </cide-ele-input>\n <label [for]=\"'permission-' + row._id + '-' + permissionId\" \n class=\"tw-text-xs tw-cursor-pointer\"\n [ngClass]=\"{\n 'tw-text-gray-700': row._permissionValues[permissionId].modified === row._permissionValues[permissionId].actual,\n 'tw-text-blue-600 tw-font-semibold': row._permissionValues[permissionId].modified !== row._permissionValues[permissionId].actual\n }\">\n {{ row._permissionValues[permissionId].permission?.sygms_title }}\n @if (row._permissionValues[permissionId].modified !== row._permissionValues[permissionId].actual) {\n <span class=\"tw-text-xs tw-text-orange-500 tw-ml-1\" title=\"Modified from role permission\">\n ({{ row._permissionValues[permissionId].actual ? '\u2713' : '\u2717' }})\n </span>\n }\n </label>\n </div>\n }\n } @else {\n <!-- No permissions to display - show N/A (permissions are already loaded, just empty) -->\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n </div>\n</ng-template>", styles: [":host ::ng-deep .entity-mapping-card{transition:all .2s ease}:host ::ng-deep .entity-mapping-card:hover{transform:translateY(-2px)}:host ::ng-deep .entity-mapping-card .cide-card-header{background:linear-gradient(135deg,#3b82f60d,#9333ea0d);border-bottom:1px solid rgba(59,130,246,.1)}:host ::ng-deep .dark .entity-mapping-card .cide-card-header{background:linear-gradient(135deg,#3b82f61a,#9333ea1a);border-bottom:1px solid rgba(59,130,246,.2)}:host ::ng-deep .entity-mapping-card .cide-card-header-content{font-weight:600}:host ::ng-deep .entity-mapping-card .cide-card-body{background:linear-gradient(180deg,#f9fafb80,#ffffff80)}:host ::ng-deep .dark .entity-mapping-card .cide-card-body{background:linear-gradient(180deg,#11182780,#1f293780)}\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.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: "directive", type: i1$2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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", "step", "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", "treeView"], 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], cide-ele-button", 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", "required", "helperText", "errorText", "showPreview", "previewWidth", "previewHeight", "previewBoxMode", "showFileName", "placeholderText", "placeholderIcon", "autoUpload", "uploadData", "showFloatingUploader", "floatingUploaderGroupId"], outputs: ["fileChange", "uploadSuccess", "uploadError", "uploadProgressChange"] }, { kind: "directive", type: CideEleFileImageDirective, selector: "[cideEleFileImage]", inputs: ["fileId", "altText"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideEleToastNotificationComponent, selector: "cide-ele-toast-notification" }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }, { kind: "component", type: CideEleCardComponent, selector: "cide-ele-card", inputs: ["title", "subtitle", "cardConfig"], outputs: ["stateChange", "collapsed", "minimized", "maximized", "removed", "headerClick"] }] });
|
|
16710
17212
|
}
|
|
16711
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
17213
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserCreateComponent, decorators: [{
|
|
16712
17214
|
type: Component,
|
|
16713
17215
|
args: [{ selector: 'cide-core-user-create', standalone: true, imports: [
|
|
16714
17216
|
CommonModule,
|
|
@@ -16727,8 +17229,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
16727
17229
|
CideFormFieldErrorComponent,
|
|
16728
17230
|
CideLytSharedWrapperComponent,
|
|
16729
17231
|
CideEleCardComponent
|
|
16730
|
-
], 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<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: pageCode() }\" [breadcrumb_data]=\"breadcrumbData()\">\n <div class=\"tw-w-full tw-h-full tw-p-1 tw-pt-2\">\n <!-- Toast Notifications -->\n <cide-ele-toast-notification></cide-ele-toast-notification>\n \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\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-1 tw-mb-2 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 (userMasterForm.get('user_photo_id_cyfm')?.value) {\n <img cideEleFileImage [fileId]=\"userMasterForm.get('user_photo_id_cyfm')?.value\"\n [altText]=\"'Profile Photo'\" class=\"tw-w-full tw-h-full tw-object-cover\">\n } @else {\n <cide-ele-icon name=\"person\" class=\"tw-w-5 tw-h-5 tw-text-blue-600\">\n </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-1 tw-border-b-0 tw-mb-1\">\n\n <!-- Top Section: Form Fields on Left, Profile Photo on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-[1fr_200px] tw-gap-4 tw-mb-4\">\n <!-- Left Side: Form Fields -->\n <div class=\"tw-space-y-4\">\n <!-- Name Fields - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-4\">\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 Information - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-3 tw-gap-4\">\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 <!-- User Type Mapping -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-4\">\n <cide-ele-select\n id=\"syutm_user_type\"\n label=\"User Type\"\n placeholder=\"Select user type\"\n [options]=\"userTypeOptions\"\n valueKey=\"value\"\n labelKey=\"label\"\n formControlName=\"syutm_user_type\"\n size=\"md\">\n </cide-ele-select>\n\n <cide-ele-input\n id=\"syutm_type_specific_id\"\n label=\"Type-Specific ID\"\n placeholder=\"Enter type-specific ID (e.g., STU001, TCH001)\"\n formControlName=\"syutm_type_specific_id\"\n [maxlength]=\"50\"\n size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n\n <!-- Right Side: Profile Photo Upload -->\n <div class=\"tw-flex tw-items-start tw-justify-center tw-p-0\">\n <cide-ele-file-input id=\"user_photo_id_cyfm\" formControlName=\"user_photo_id_cyfm\" accept=\"image/*\"\n [showPreview]=\"true\" [previewBoxMode]=\"true\" [showFileName]=\"false\" previewWidth=\"180px\"\n previewHeight=\"120px\" placeholderText=\"Upload Photo\" placeholderIcon=\"cloud_upload\" [autoUpload]=\"true\"\n [uploadData]=\"getProfilePhotoUploadData()\" (uploadSuccess)=\"onProfilePhotoUploadSuccess($event)\"\n (uploadError)=\"onProfilePhotoUploadError($event)\"\n (uploadProgressChange)=\"onProfilePhotoUploadProgress($event)\">\n </cide-ele-file-input>\n </div>\n </div>\n\n\n\n <!-- Status Control -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-2\">\n <div class=\"tw-p-2 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-1 tw-border-b-0 tw-mb-1\">\n <!-- Password Fields -->\n @if (shouldShowPasswordFields()) {\n <div class=\"tw-mb-4\">\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-4\">\n <div class=\"tw-p-2 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-4 tw-mb-4\">\n <div class=\"tw-p-2 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 </div>\n }\n\n @case ('roles') {\n <!-- Entity, Roles & Permissions Mapping Section -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\n\n\n\n <!-- Important Note -->\n <div class=\"tw-bg-amber-50 tw-border tw-border-amber-200 tw-rounded-lg tw-p-2 tw-mb-4\">\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-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()\"\n leftIcon=\"add\" [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 mapping.syenm_entity_id_syen?._id || mapping.syenm_entity_id_syen || $index; let i = $index) {\n <cide-ele-card\n [title]=\"getEntityNameFromMapping(i) || 'Entity Mapping ' + (i + 1)\"\n [subtitle]=\"mapping.syenm_isdefault ? 'Primary Entity' : ''\"\n [cardConfig]=\"{\n collapsible: true,\n minimizable: false,\n maximizable: false,\n removable: !mapping?._id,\n defaultState: 'collapsed',\n showHeader: true,\n showFooter: false,\n variant: 'default',\n size: 'sm',\n shadow: true,\n rounded: true,\n bordered: true\n }\"\n (stateChange)=\"onEntityMappingCardStateChange($event, i)\"\n (removed)=\"removeEntityMapping(i)\"\n class=\"tw-mb-2 entity-mapping-card tw-block\">\n \n <div [formGroupName]=\"i\">\n \n <!-- Card Actions (User Type Mappings only) -->\n <div card-actions class=\"tw-flex tw-items-center tw-gap-1.5 tw-flex-wrap tw-max-w-full\">\n @if (getEntityIdFromMapping(i)) {\n @if (getUserTypeMappingsForEntity(getEntityIdFromMapping(i)).length > 0) {\n @for (typeMapping of getUserTypeMappingsForEntity(getEntityIdFromMapping(i)); track typeMapping._id || typeMapping.syutm_type_specific_id) {\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-[10px] tw-font-medium tw-bg-purple-50 dark:tw-bg-purple-900/20 tw-text-purple-700 dark:tw-text-purple-300 tw-border tw-border-purple-200 dark:tw-border-purple-800\">\n <cide-ele-icon variant=\"purple\" size=\"xs\" class=\"tw-mr-1\">person</cide-ele-icon>\n {{ typeMapping.syutm_user_type }}\n @if (typeMapping.syutm_isactive) {\n <span class=\"tw-ml-1 tw-w-1.5 tw-h-1.5 tw-rounded-full tw-bg-green-500\"></span>\n }\n </span>\n }\n }\n }\n </div>\n\n <!-- Card Content -->\n <div class=\"tw-space-y-3\">\n <!-- Hidden form control to maintain form structure for entity -->\n <input type=\"hidden\" [formControlName]=\"'syenm_entity_id_syen'\" />\n \n <!-- Role, Default, and Active in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3\">\n <!-- Role Selection -->\n <cide-ele-select label=\"Role for this Entity\" [options]=\"getRoleOptionsForEntity(i)\"\n formControlName=\"syenm_role_id_syusrol\" valueKey=\"_id\" labelKey=\"syusrol_role_name\"\n placeholder=\"Select role for this entity\" size=\"md\" (change)=\"onRoleChange(i, $event)\">\n </cide-ele-select>\n \n <!-- Primary Entity Checkbox -->\n <div class=\"tw-flex tw-flex-col\">\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-1.5\">Default</label>\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-2 tw-rounded-md tw-border tw-border-green-200 tw-bg-green-50 dark:tw-bg-green-900/20 dark:tw-border-green-800\" (click)=\"$event.stopPropagation()\">\n <input \n type=\"checkbox\" \n [checked]=\"mapping.syenm_isdefault\"\n (change)=\"onDefaultEntityChange(i, $event)\" \n class=\"tw-h-4 tw-w-4 tw-accent-green-600 tw-cursor-pointer\" />\n <label class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs tw-font-semibold tw-text-green-700 dark:tw-text-green-300 tw-cursor-pointer\">\n <cide-ele-icon variant=\"green\" size=\"xs\">star</cide-ele-icon>\n DEFAULT\n </label>\n </div>\n </div>\n \n <!-- Active Mapping Checkbox -->\n <div class=\"tw-flex tw-flex-col\">\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-1.5\">Status</label>\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-2 tw-rounded-md tw-border tw-border-blue-200 tw-bg-blue-50 dark:tw-bg-blue-900/20 dark:tw-border-blue-800\" (click)=\"$event.stopPropagation()\">\n <input \n type=\"checkbox\" \n [checked]=\"mapping.syenm_isactive\"\n (change)=\"onActiveMappingChange(i, $event)\" \n class=\"tw-h-4 tw-w-4 tw-accent-blue-600 tw-cursor-pointer\" />\n <label class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs tw-font-semibold tw-text-blue-700 dark:tw-text-blue-300 tw-cursor-pointer\">\n <cide-ele-icon variant=\"blue\" size=\"xs\">check_circle</cide-ele-icon>\n Active\n </label>\n </div>\n </div>\n </div>\n\n\n <!-- Entity-Specific Details and Active Period - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3\">\n <cide-ele-select label=\"Department for this Entity\" [options]=\"getDepartmentOptionsForEntity(i)\"\n formControlName=\"syenm_department_id_sydept\" (change)=\"onDepartmentChange($event)\" valueKey=\"_id\"\n 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)\"\n valueKey=\"_id\" labelKey=\"sydsg_name\" formControlName=\"syenm_designation_id_sydsg\"\n placeholder=\"Select designation\" size=\"md\">\n </cide-ele-select>\n\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 <!-- Menu Rights Grid for this Entity-Role -->\n <div class=\"tw-border-t tw-border-gray-200\">\n\n @if (getMenuRightsForMapping(i).length > 0) {\n <!-- Menu Rights Tree Grid -->\n\n <cide-ele-data-grid [config]=\"getMenuRightsGridConfig(i)\"\n [templateRenderers]=\"getMenuRightsTemplateRenderers(i)\"\n (gridEvent)=\"onMenuRightsGridEvent($event, i)\" class=\"tw-h-96 tw-w-full\">\n </cide-ele-data-grid>\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\n automatically load\n menu rights for this mapping.</p>\n </div>\n }\n </div>\n </div>\n </div>\n </cide-ele-card>\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 @case ('addresses') {\n <!-- Contact Addresses Section -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\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\" [disabled]=\"!hasAddContactAddressRights()\">\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-4 tw-py-2 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <!-- Use address type as header instead of generic \"Address X\" -->\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">\n {{ getAddressTypeLabel(i) || ('Address ' + (i + 1)) }}\n </h4>\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n @if (isAddressOwner(i)) {\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"shareAddress(i)\"\n leftIcon=\"share\" class=\"tw-text-blue-600 hover:tw-text-blue-700\">\n Share\n </button>\n }\n @if (!address?._id) {\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeContactAddress(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n }\n </div>\n </div>\n <div class=\"tw-p-4\">\n <!-- Main Layout: Inputs on Left, Address Textarea on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n \n <!-- Left Side: Input Fields (3/4 width) -->\n <div class=\"lg:tw-col-span-3\">\n <!-- Row 1: Address Type, Contact Person -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Address Type\" [options]=\"addressTypeOptions()\" id=\"sycad_address_type_id_sygms\"\n formControlName=\"sycad_address_type_id_sygms\" placeholder=\"Select type\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\" (change)=\"onAddressTypeChange(i)\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Contact Person\" formControlName=\"sycad_contact_person_name\"\n placeholder=\"Enter contact person\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 2: Postal Code, City, State, Country -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-4 tw-gap-3\">\n <cide-ele-select label=\"Postal Code\" [options]=\"addressPostalCodes()[i] || []\"\n formControlName=\"sycad_contact_pin_sypin\" placeholder=\"Select postal code\" [searchable]=\"true\"\n [loading]=\"addressPostalCodesLoading()[i] || false\" (searchChange)=\"onPostalCodeSearch($event, i)\"\n (change)=\"onPostalCodeSelection($event, i)\" size=\"sm\">\n </cide-ele-select>\n\n <cide-ele-input label=\"City\" formControlName=\"sycad_contact_city_sypin\" placeholder=\"Enter city\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"State\" formControlName=\"sycad_contact_state_sypin\" placeholder=\"Enter state\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Country\" [options]=\"addressCountries()[i] || []\"\n formControlName=\"sycad_contact_country_syctr\" placeholder=\"Select country\" valueKey=\"_id\"\n labelKey=\"syctr_country_iso_name\" [searchable]=\"true\" (searchChange)=\"onCountrySearch($event, i)\"\n [loading]=\"addressCountriesLoading()[i] || false\" size=\"sm\">\n </cide-ele-select>\n </div>\n </div>\n\n <!-- Right Side: Address Textarea (1/4 width, spans 2 rows) -->\n <div class=\"lg:tw-col-span-1 lg:tw-row-span-2 tw-flex tw-flex-col\">\n <cide-ele-textarea label=\"Complete Address\" formControlName=\"sycad_contact_address\"\n placeholder=\"Enter complete address with area, city, and landmarks\" [rows]=\"4\" size=\"sm\"\n class=\"tw-h-full\">\n </cide-ele-textarea>\n </div>\n </div>\n\n <!-- Contact Details: Primary Phone, Alt Phone, Fax, Primary Email in 4 columns -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Primary Phone\" formControlName=\"sycad_contact_phone\" type=\"tel\"\n placeholder=\"Primary phone\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Alternate Phone\" formControlName=\"sycad_contact_phone_alt\" type=\"tel\"\n placeholder=\"Alternate phone\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Fax Number\" formControlName=\"sycad_contact_fax\" placeholder=\"Fax number\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Primary Email\" formControlName=\"sycad_contact_email\" type=\"email\"\n placeholder=\"Primary email\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Alternate Email in single row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3\">\n <cide-ele-input label=\"Alternate Email\" formControlName=\"sycad_contact_email_alt\" type=\"email\"\n placeholder=\"Alternate email address\" size=\"sm\">\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-1 tw-border-b-0 tw-mb-1\">\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\" [disabled]=\"!hasAddDocumentRights()\">\n Add Document\n </button>\n </div>\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-4 tw-py-2 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\">\n {{ getDocumentTypeLabel(i) || ('Document ' + (i + 1)) }}\n </h4>\n <div class=\"tw-flex tw-gap-2\">\n @if (doc?._id) {\n <button cideEleButton variant=\"secondary\" size=\"sm\" type=\"button\" (click)=\"shareDocumentRights(i)\"\n leftIcon=\"share\">\n Share\n </button>\n }\n </div>\n </div>\n <div class=\"tw-p-4\">\n <!-- Main Layout: Inputs on Left, File Upload on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-3 tw-gap-4\">\n \n <!-- Left Side: Document Information (2/3 width) -->\n <div class=\"lg:tw-col-span-2\">\n <!-- Row 1: Document Type, Document Number, Name as per Document -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Document Type\" [options]=\"documentTypeOptions()\"\n formControlName=\"syusd_document_type_id_sygms\" placeholder=\"Select type\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\" (change)=\"onDocumentTypeChange(i)\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Document Number\" formControlName=\"syusd_doc_number\"\n placeholder=\"Document number\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Name as per Document\" formControlName=\"syusd_doc_name_as_per_doc\"\n placeholder=\"Name on document\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 2: Issue Date, Expiry Date, Photo Group -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Issue Date\" formControlName=\"syusd_doc_issue_date\"\n [id]=\"'syusd_doc_issue_date['+i+']'\" type=\"date\" size=\"sm\">\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=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 3: Verification Status, KYC Status -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3\">\n <cide-ele-select label=\"Verification Status\" [options]=\"documentVerificationStatusOptions()\"\n formControlName=\"syusd_doc_verification_status_id_sygms\" placeholder=\"Select status\"\n size=\"sm\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-select label=\"KYC Status\" [options]=\"documentKycStatusOptions()\"\n formControlName=\"syusd_doc_kyc_status_id_sygms\" placeholder=\"Select KYC status\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n </div>\n\n <!-- Right Side: File Upload (1/3 width) -->\n <div class=\"lg:tw-col-span-1\">\n <div class=\"tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg tw-p-3 tw-h-full\">\n \n <!-- File Upload Input -->\n <cide-ele-file-input\n [id]=\"'document-files-' + i\"\n [multiple]=\"true\"\n formControlName=\"syusd_photo_group_id_cyfm\"\n [accept]=\"'.pdf,.jpg,.jpeg,.png,.doc,.docx'\"\n [autoUpload]=\"true\"\n [uploadData]=\"getDocumentUploadData(i)\"\n (change)=\"onDocumentFilesSelected($event, i)\"\n (uploadSuccess)=\"onDocumentUploadSuccess($event, i)\"\n (uploadError)=\"onDocumentUploadError($event, i)\"\n (uploadProgressChange)=\"onDocumentUploadProgress($event, i)\"\n class=\"tw-mb-3\"\n size=\"sm\">\n </cide-ele-file-input>\n\n <!-- Upload Status -->\n <!-- Upload status is now handled by the file input component itself -->\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @case ('family') {\n <!-- Family Details Section - Compact Design -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-3 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"button\" (click)=\"addFamilyDetail()\" leftIcon=\"add\" [disabled]=\"!hasAddFamilyDetailRights()\">\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-lg tw-mb-4 tw-overflow-hidden tw-transition-all tw-duration-200 hover:tw-shadow-md tw-shadow-sm\">\n \n <!-- Compact Header -->\n <div class=\"tw-bg-gray-50 tw-px-4 tw-py-2 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-medium\">Family Member {{ i + 1 }}</h4>\n <div class=\"tw-flex tw-gap-2\">\n @if (family?._id) {\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"shareFamilyDetailRights(i)\"\n leftIcon=\"share\">\n Share\n </button>\n }\n @if (!family?._id) {\n <button cideEleButton variant=\"danger\" size=\"xs\" type=\"button\" (click)=\"removeFamilyDetail(i)\" leftIcon=\"delete\">\n Remove\n </button>\n }\n </div>\n </div>\n \n <!-- Compact Form Content - 3 inputs per row -->\n <div class=\"tw-p-4\">\n <!-- Row 1: Name, User, and Combined Relationship/Active Status (33.33% each) -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Family Member Name\" formControlName=\"syfdl_family_member_name\"\n placeholder=\"Enter family member full name\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Family Member User\" [options]=\"userOptions(i)\"\n formControlName=\"syfdl_family_member_id_user\" placeholder=\"Select family member user\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"user_fullname\" [searchable]=\"true\"\n [loading]=\"userSearchLoading()[i] || false\" (searchChange)=\"onUserSearchChange($event, i)\"\n (change)=\"onUserSelectionChange($event, i)\">\n </cide-ele-select>\n\n <!-- Combined Relationship and Active Status (33.33%) -->\n <div class=\"tw-flex tw-flex-row tw-gap-2 tw-items-end\">\n <div class=\"tw-flex-1\">\n <cide-ele-select label=\"Relationship\" [options]=\"relationshipOptions()\"\n formControlName=\"syfdl_relationship_id_sygms\" placeholder=\"Select relationship\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-pt-1 tw-flex-shrink-0\">\n <cide-ele-input formControlName=\"syfdl_isactive\" type=\"checkbox\" label=\"Active\" size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n\n <!-- Row 2: Blood Group, DOB, and Phone -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 xl:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Blood Group\" [options]=\"bloodGroupOptions()\"\n formControlName=\"syfdl_blood_group_sygms\" placeholder=\"Select blood group\" size=\"sm\" valueKey=\"_id\"\n labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Date of Birth\" formControlName=\"syfdl_family_member_dob\" type=\"date\" size=\"sm\"\n [id]=\"'syfdl_family_member_dob['+i+']'\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Phone\" formControlName=\"syfdl_contact_phone\" type=\"tel\"\n placeholder=\"Enter contact phone\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 3: Email, Email ID, and Contact Number -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 xl:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Contact Email\" formControlName=\"syfdl_contact_email\" type=\"email\"\n placeholder=\"Enter contact email\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Email ID\" formControlName=\"syfdl_contact_email_id\" type=\"email\"\n placeholder=\"Enter contact email ID\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Number\" formControlName=\"syfdl_contact_number\" type=\"tel\"\n placeholder=\"Enter contact number\" size=\"sm\">\n </cide-ele-input>\n </div>\n\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-between tw-items-center 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 <!-- Error Display Component -->\n <div class=\"tw-flex-1\">\n <cide-form-field-error [formGroup]=\"userMasterForm\"></cide-form-field-error>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-gap-4\">\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 </div>\n </form>\n</div>\n</cide-lyt-shared-wrapper>\n\n<!-- Template Renderers for Role Permissions Grid -->\n<ng-template #menuDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-min-w-0\">\n <!-- Menu Icon -->\n <div class=\"tw-flex-shrink-0\">\n @if (row.syme_type === 'module') {\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">folder</cide-ele-icon>\n } @else if (row.syme_type === 'section') {\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">folder_open</cide-ele-icon>\n } @else if (row.syme_type === 'menu') {\n <cide-ele-icon class=\"tw-text-purple-600 tw-w-4 tw-h-4\">menu</cide-ele-icon>\n } @else {\n <cide-ele-icon class=\"tw-text-gray-600 tw-w-4 tw-h-4\">description</cide-ele-icon>\n }\n </div>\n\n <!-- Menu Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"row.syme_title\">\n {{ row.syme_title || row.menu?.syme_title || row.menu?.syme_menu_name || 'Untitled' }}\n </div>\n <!-- Green pill indicator for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-whitespace-nowrap\">\n Assigned\n </span>\n }\n }\n </div>\n @if (row.permission?.sygms_name) {\n <div class=\"tw-text-xs tw-text-blue-500 tw-truncate\" [title]=\"row.permission?.sygms_name\">\n {{ row.permission?.sygms_name }}\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 <div class=\"tw-flex tw-items-center tw-justify-center\">\n @if (row.syme_type === 'module') {\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-blue-100 tw-text-blue-800\">\n Module\n </span>\n } @else if (row.syme_type === 'section') {\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 Section\n </span>\n } @else if (row.syme_type === 'menu') {\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-purple-100 tw-text-purple-800\">\n Menu\n </span>\n } @else {\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-gray-100 tw-text-gray-800\">\n {{ row.syme_type || 'Unknown' }}\n </span>\n }\n </div>\n</ng-template>\n\n<!-- Permissions Checkbox Renderer Template -->\n<ng-template #permissionsCheckboxRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row.syme_type === 'menu' && row?.syme_permissions_id_sygms && row?.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row?.syme_permissions_id_sygms || []; track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <input type=\"checkbox\" [checked]=\"isPermissionSelected(row._id, permissionId)\" [disabled]=\"true\"\n class=\"tw-h-4 tw-w-4 tw-text-blue-600 tw-bg-gray-100 tw-border-gray-300 tw-rounded focus:tw-ring-blue-500\">\n <label class=\"tw-text-xs tw-text-gray-700\">\n {{ getPermissionById(permissionId)?.sygms_title || 'Unknown' }}\n </label>\n </div>\n </div>\n }\n } @else {\n <!-- Show green checkmark for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section' || row.syme_type === 'title') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-bg-green-100 tw-rounded-full\">\n <cide-ele-icon class=\"tw-text-green-600\" size=\"xs\">\n check\n </cide-ele-icon>\n </div>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n }\n </div>\n</ng-template>\n\n<!-- Menu Rights Permissions Renderer Template -->\n<ng-template #menuRightsPermissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n <!-- Role Rights Display -->\n @if (row.role_rights && row.role_rights.length > 0) {\n <div class=\"tw-mb-2\">\n <div class=\"tw-text-xs tw-text-gray-500 tw-mb-1\">Role Rights:</div>\n <div class=\"tw-flex tw-flex-wrap tw-gap-1\">\n @for (right of row.role_rights; track $index) {\n <span 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 </div>\n }\n\n\n <!-- Exception Indicator -->\n @if (row.hasException) {\n <div class=\"tw-mt-2\">\n <span 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 </div>\n } @else {\n <div class=\"tw-mt-2\">\n <span class=\"tw-text-xs tw-text-gray-400\">Default</span>\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Permissions Renderer Template -->\n<ng-template #permissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row._permissionValues && Object.keys(row._permissionValues).length > 0) {\n @for (permissionId of Object.keys(row._permissionValues); track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-input type=\"checkbox\" [ngModel]=\"row._permissionValues[permissionId].checked\"\n (ngModelChange)=\"onPermissionChangeSafe($event, row, permissionId)\"\n [id]=\"'permission-' + row._id + '-' + permissionId\" class=\"tw-h-4 tw-w-4\">\n </cide-ele-input>\n <label [for]=\"'permission-' + row._id + '-' + permissionId\" \n class=\"tw-text-xs tw-cursor-pointer\"\n [ngClass]=\"{\n 'tw-text-gray-700': row._permissionValues[permissionId].modified === row._permissionValues[permissionId].actual,\n 'tw-text-blue-600 tw-font-semibold': row._permissionValues[permissionId].modified !== row._permissionValues[permissionId].actual\n }\">\n {{ row._permissionValues[permissionId].permission?.sygms_title }}\n @if (row._permissionValues[permissionId].modified !== row._permissionValues[permissionId].actual) {\n <span class=\"tw-text-xs tw-text-orange-500 tw-ml-1\" title=\"Modified from role permission\">\n ({{ row._permissionValues[permissionId].actual ? '\u2713' : '\u2717' }})\n </span>\n }\n </label>\n </div>\n }\n } @else {\n <!-- No permissions to display - show N/A (permissions are already loaded, just empty) -->\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n </div>\n</ng-template>", styles: [":host ::ng-deep .entity-mapping-card{transition:all .2s ease}:host ::ng-deep .entity-mapping-card:hover{transform:translateY(-2px)}:host ::ng-deep .entity-mapping-card .cide-card-header{background:linear-gradient(135deg,#3b82f60d,#9333ea0d);border-bottom:1px solid rgba(59,130,246,.1)}:host ::ng-deep .dark .entity-mapping-card .cide-card-header{background:linear-gradient(135deg,#3b82f61a,#9333ea1a);border-bottom:1px solid rgba(59,130,246,.2)}:host ::ng-deep .entity-mapping-card .cide-card-header-content{font-weight:600}:host ::ng-deep .entity-mapping-card .cide-card-body{background:linear-gradient(180deg,#f9fafb80,#ffffff80)}:host ::ng-deep .dark .entity-mapping-card .cide-card-body{background:linear-gradient(180deg,#11182780,#1f293780)}\n"] }]
|
|
16731
|
-
}], ctorParameters: () => [] });
|
|
17232
|
+
], 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<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: pageCode() }\" [breadcrumb_data]=\"breadcrumbData()\">\n <div class=\"tw-w-full tw-h-full tw-p-1 tw-pt-2\">\n <!-- Toast Notifications -->\n <cide-ele-toast-notification></cide-ele-toast-notification>\n \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\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-1 tw-mb-2 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 (userMasterForm.get('user_photo_id_cyfm')?.value) {\n <img cideEleFileImage [fileId]=\"userMasterForm.get('user_photo_id_cyfm')?.value\"\n [altText]=\"'Profile Photo'\" class=\"tw-w-full tw-h-full tw-object-cover\">\n } @else {\n <cide-ele-icon name=\"person\" class=\"tw-w-5 tw-h-5 tw-text-blue-600\">\n </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-1 tw-border-b-0 tw-mb-1\">\n\n <!-- Top Section: Form Fields on Left, Profile Photo on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-[1fr_200px] tw-gap-4 tw-mb-4\">\n <!-- Left Side: Form Fields -->\n <div class=\"tw-space-y-4\">\n <!-- Name Fields - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-4\">\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 Information - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-3 tw-gap-4\">\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 <!-- User Type Mapping -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-4\">\n <cide-ele-select\n id=\"syutm_user_type\"\n label=\"User Type\"\n placeholder=\"Select user type\"\n [options]=\"userTypeOptions\"\n valueKey=\"value\"\n labelKey=\"label\"\n formControlName=\"syutm_user_type\"\n size=\"md\">\n </cide-ele-select>\n\n <cide-ele-input\n id=\"syutm_type_specific_id\"\n label=\"Type-Specific ID\"\n placeholder=\"Enter type-specific ID (e.g., STU001, TCH001)\"\n formControlName=\"syutm_type_specific_id\"\n [maxlength]=\"50\"\n size=\"md\">\n </cide-ele-input>\n </div>\n </div>\n\n <!-- Right Side: Profile Photo Upload -->\n <div class=\"tw-flex tw-items-start tw-justify-center tw-p-0\">\n <cide-ele-file-input id=\"user_photo_id_cyfm\" formControlName=\"user_photo_id_cyfm\" accept=\"image/*\"\n [showPreview]=\"true\" [previewBoxMode]=\"true\" [showFileName]=\"false\" previewWidth=\"180px\"\n previewHeight=\"120px\" placeholderText=\"Upload Photo\" placeholderIcon=\"cloud_upload\" [autoUpload]=\"true\"\n [uploadData]=\"getProfilePhotoUploadData()\" (uploadSuccess)=\"onProfilePhotoUploadSuccess($event)\"\n (uploadError)=\"onProfilePhotoUploadError($event)\"\n (uploadProgressChange)=\"onProfilePhotoUploadProgress($event)\">\n </cide-ele-file-input>\n </div>\n </div>\n\n\n\n <!-- Status Control -->\n <div class=\"tw-grid tw-grid-cols-1 tw-mb-2\">\n <div class=\"tw-p-2 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-1 tw-border-b-0 tw-mb-1\">\n <!-- Password Fields -->\n @if (shouldShowPasswordFields()) {\n <div class=\"tw-mb-4\">\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-4\">\n <div class=\"tw-p-2 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-4 tw-mb-4\">\n <div class=\"tw-p-2 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 </div>\n }\n\n @case ('roles') {\n <!-- Entity, Roles & Permissions Mapping Section -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\n\n\n\n <!-- Important Note -->\n <div class=\"tw-bg-amber-50 tw-border tw-border-amber-200 tw-rounded-lg tw-p-2 tw-mb-4\">\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-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()\"\n leftIcon=\"add\" [disabled]=\"isViewingOwnProfile() || isAllEntitiesMapped()\"\n [title]=\"isViewingOwnProfile() ? 'You cannot modify your own entity mappings' : (isAllEntitiesMapped() ? 'All entities are mapped' : 'Add Entity Mapping')\">\n Add Entity Mapping\n </button>\n\n @if (isViewingOwnProfile()) {\n <div class=\"tw-mt-2 tw-p-2 tw-bg-amber-50 tw-border tw-border-amber-200 tw-rounded-md tw-max-w-xs\">\n <p class=\"tw-text-xs tw-text-amber-700\">\n <cide-ele-icon variant=\"warning\" size=\"xs\" class=\"tw-mr-1\">lock</cide-ele-icon>\n You cannot modify your own entity mappings.\n </p>\n </div>\n } @else 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 mapping.syenm_entity_id_syen?._id || mapping.syenm_entity_id_syen || $index; let i = $index) {\n <cide-ele-card\n [title]=\"getEntityNameFromMapping(i) || 'Entity Mapping ' + (i + 1)\"\n [subtitle]=\"mapping.syenm_isdefault ? 'Primary Entity' : ''\"\n [cardConfig]=\"{\n collapsible: true,\n minimizable: false,\n maximizable: false,\n removable: !mapping?._id && !isViewingOwnProfile(),\n defaultState: 'collapsed',\n showHeader: true,\n showFooter: false,\n variant: 'default',\n size: 'sm',\n shadow: true,\n rounded: true,\n bordered: true\n }\"\n (stateChange)=\"onEntityMappingCardStateChange($event, i)\"\n (removed)=\"removeEntityMapping(i)\"\n class=\"tw-mb-2 entity-mapping-card tw-block\">\n \n <div [formGroupName]=\"i\">\n \n <!-- Card Content -->\n <div class=\"tw-space-y-3\">\n <!-- Hidden form control to maintain form structure for entity -->\n <input type=\"hidden\" [formControlName]=\"'syenm_entity_id_syen'\" />\n \n <!-- Role, Default, Active, and User Type in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-4 tw-gap-3\">\n <!-- Role Selection with Copy Button -->\n <div class=\"tw-flex tw-flex-col\">\n <cide-ele-select label=\"Role for this Entity\" [options]=\"getRoleOptionsForEntity(i)\"\n formControlName=\"syenm_role_id_syusrol\" valueKey=\"_id\" labelKey=\"syusrol_role_name\"\n placeholder=\"Select role for this entity\" size=\"md\" (change)=\"onRoleChange(i, $event)\">\n </cide-ele-select>\n @if (!isViewingOwnProfile() && entityMappings().length > 1) {\n <button \n type=\"button\"\n (click)=\"showCopyRoleFromEntityDrawer(i)\"\n class=\"tw-mt-1 tw-text-xs tw-text-blue-600 hover:tw-text-blue-800 tw-flex tw-items-center tw-gap-1 tw-w-fit tw-transition-colors\"\n title=\"Copy role and settings from another entity mapping\">\n <cide-ele-icon variant=\"blue\" size=\"xs\">content_copy</cide-ele-icon>\n <span>Copy from Entity</span>\n </button>\n }\n </div>\n \n <!-- Primary Entity Checkbox -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-2 tw-rounded-md tw-border tw-border-green-300 tw-bg-green-50 dark:tw-bg-green-900/30 dark:tw-border-green-700\" (click)=\"$event.stopPropagation()\">\n <input \n type=\"checkbox\" \n [checked]=\"mapping.syenm_isdefault\"\n (change)=\"onDefaultEntityChange(i, $event)\" \n class=\"tw-h-4 tw-w-4 tw-accent-green-600 tw-cursor-pointer\" />\n <label class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs tw-font-semibold tw-text-green-700 dark:tw-text-green-300 tw-cursor-pointer\">\n <cide-ele-icon variant=\"green\" size=\"xs\" class=\"!tw-text-green-600 dark:!tw-text-green-400\">star</cide-ele-icon>\n DEFAULT\n </label>\n </div>\n </div>\n \n <!-- Active Mapping Checkbox -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-2 tw-rounded-md tw-border tw-border-blue-300 tw-bg-blue-50 dark:tw-bg-blue-900/30 dark:tw-border-blue-700\" (click)=\"$event.stopPropagation()\">\n <input \n type=\"checkbox\" \n [checked]=\"mapping.syenm_isactive\"\n (change)=\"onActiveMappingChange(i, $event)\" \n class=\"tw-h-4 tw-w-4 tw-accent-blue-600 tw-cursor-pointer\" />\n <label class=\"tw-inline-flex tw-items-center tw-gap-1 tw-text-xs tw-font-semibold tw-text-blue-700 dark:tw-text-blue-300 tw-cursor-pointer\">\n <cide-ele-icon variant=\"blue\" size=\"xs\" class=\"!tw-text-blue-600 dark:!tw-text-blue-400\">check_circle</cide-ele-icon>\n Active\n </label>\n </div>\n </div>\n \n <!-- User Type Mappings -->\n <div class=\"tw-flex tw-flex-col tw-justify-end\">\n <div class=\"tw-flex tw-items-center tw-gap-1.5 tw-flex-wrap\">\n @if (getEntityIdFromMapping(i)) {\n @if (getUserTypeMappingsForEntity(getEntityIdFromMapping(i)).length > 0) {\n @for (typeMapping of getUserTypeMappingsForEntity(getEntityIdFromMapping(i)); track typeMapping._id || typeMapping.syutm_type_specific_id) {\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded tw-text-[10px] tw-font-medium tw-bg-purple-50 dark:tw-bg-purple-900/30 tw-text-gray-900 dark:tw-text-gray-100 tw-border tw-border-purple-300 dark:tw-border-purple-700\">\n <cide-ele-icon variant=\"purple\" size=\"xs\" class=\"tw-mr-1 !tw-text-purple-600 dark:!tw-text-purple-400\">person</cide-ele-icon>\n {{ typeMapping.syutm_user_type }}\n @if (typeMapping.syutm_isactive) {\n <span class=\"tw-ml-1 tw-w-1.5 tw-h-1.5 tw-rounded-full tw-bg-green-600\"></span>\n }\n </span>\n }\n }\n }\n </div>\n </div>\n </div>\n\n\n <!-- Entity-Specific Details and Active Period - All in One Row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 lg:tw-grid-cols-4 tw-gap-3\">\n <cide-ele-select label=\"Department for this Entity\" [options]=\"getDepartmentOptionsForEntity(i)\"\n formControlName=\"syenm_department_id_sydept\" (change)=\"onDepartmentChange($event)\" valueKey=\"_id\"\n 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)\"\n valueKey=\"_id\" labelKey=\"sydsg_name\" formControlName=\"syenm_designation_id_sydsg\"\n placeholder=\"Select designation\" size=\"md\">\n </cide-ele-select>\n\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 <!-- Menu Rights Grid for this Entity-Role -->\n <div class=\"tw-border-t tw-border-gray-200\">\n\n @if (getMenuRightsForMapping(i).length > 0) {\n <!-- Menu Rights Tree Grid -->\n\n <cide-ele-data-grid [config]=\"getMenuRightsGridConfig(i)\"\n [templateRenderers]=\"getMenuRightsTemplateRenderers(i)\"\n (gridEvent)=\"onMenuRightsGridEvent($event, i)\" class=\"tw-h-96 tw-w-full\">\n </cide-ele-data-grid>\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\n automatically load\n menu rights for this mapping.</p>\n </div>\n }\n </div>\n </div>\n </div>\n </cide-ele-card>\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 @if (!isViewingOwnProfile()) {\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 } @else {\n <p class=\"tw-text-amber-600 tw-text-sm tw-font-medium\">\n <cide-ele-icon variant=\"warning\" size=\"xs\" class=\"tw-mr-1\">lock</cide-ele-icon>\n You cannot modify your own entity mappings.\n </p>\n }\n </div>\n }\n </div>\n }\n\n @case ('addresses') {\n <!-- Contact Addresses Section -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\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\" [disabled]=\"!hasAddContactAddressRights()\">\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-4 tw-py-2 tw-flex tw-justify-between tw-items-center tw-border-b tw-border-gray-200\">\n <!-- Use address type as header instead of generic \"Address X\" -->\n <h4 class=\"tw-m-0 tw-text-gray-700 tw-text-sm tw-font-semibold tw-tracking-tight\">\n {{ getAddressTypeLabel(i) || ('Address ' + (i + 1)) }}\n </h4>\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n @if (isAddressOwner(i)) {\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"shareAddress(i)\"\n leftIcon=\"share\" class=\"tw-text-blue-600 hover:tw-text-blue-700\">\n Share\n </button>\n }\n @if (!address?._id) {\n <button cideEleButton variant=\"danger\" size=\"sm\" type=\"button\" (click)=\"removeContactAddress(i)\"\n leftIcon=\"delete\">\n Remove\n </button>\n }\n </div>\n </div>\n <div class=\"tw-p-4\">\n <!-- Main Layout: Inputs on Left, Address Textarea on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n \n <!-- Left Side: Input Fields (3/4 width) -->\n <div class=\"lg:tw-col-span-3\">\n <!-- Row 1: Address Type, Contact Person -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Address Type\" [options]=\"addressTypeOptions()\" id=\"sycad_address_type_id_sygms\"\n formControlName=\"sycad_address_type_id_sygms\" placeholder=\"Select type\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\" (change)=\"onAddressTypeChange(i)\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Contact Person\" formControlName=\"sycad_contact_person_name\"\n placeholder=\"Enter contact person\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 2: Postal Code, City, State, Country -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-4 tw-gap-3\">\n <cide-ele-select label=\"Postal Code\" [options]=\"addressPostalCodes()[i] || []\"\n formControlName=\"sycad_contact_pin_sypin\" placeholder=\"Select postal code\" [searchable]=\"true\"\n [loading]=\"addressPostalCodesLoading()[i] || false\" (searchChange)=\"onPostalCodeSearch($event, i)\"\n (change)=\"onPostalCodeSelection($event, i)\" size=\"sm\">\n </cide-ele-select>\n\n <cide-ele-input label=\"City\" formControlName=\"sycad_contact_city_sypin\" placeholder=\"Enter city\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"State\" formControlName=\"sycad_contact_state_sypin\" placeholder=\"Enter state\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Country\" [options]=\"addressCountries()[i] || []\"\n formControlName=\"sycad_contact_country_syctr\" placeholder=\"Select country\" valueKey=\"_id\"\n labelKey=\"syctr_country_iso_name\" [searchable]=\"true\" (searchChange)=\"onCountrySearch($event, i)\"\n [loading]=\"addressCountriesLoading()[i] || false\" size=\"sm\">\n </cide-ele-select>\n </div>\n </div>\n\n <!-- Right Side: Address Textarea (1/4 width, spans 2 rows) -->\n <div class=\"lg:tw-col-span-1 lg:tw-row-span-2 tw-flex tw-flex-col\">\n <cide-ele-textarea label=\"Complete Address\" formControlName=\"sycad_contact_address\"\n placeholder=\"Enter complete address with area, city, and landmarks\" [rows]=\"4\" size=\"sm\"\n class=\"tw-h-full\">\n </cide-ele-textarea>\n </div>\n </div>\n\n <!-- Contact Details: Primary Phone, Alt Phone, Fax, Primary Email in 4 columns -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-4 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Primary Phone\" formControlName=\"sycad_contact_phone\" type=\"tel\"\n placeholder=\"Primary phone\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Alternate Phone\" formControlName=\"sycad_contact_phone_alt\" type=\"tel\"\n placeholder=\"Alternate phone\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Fax Number\" formControlName=\"sycad_contact_fax\" placeholder=\"Fax number\"\n size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Primary Email\" formControlName=\"sycad_contact_email\" type=\"email\"\n placeholder=\"Primary email\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Alternate Email in single row -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3\">\n <cide-ele-input label=\"Alternate Email\" formControlName=\"sycad_contact_email_alt\" type=\"email\"\n placeholder=\"Alternate email address\" size=\"sm\">\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-1 tw-border-b-0 tw-mb-1\">\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\" [disabled]=\"!hasAddDocumentRights()\">\n Add Document\n </button>\n </div>\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-4 tw-py-2 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\">\n {{ getDocumentTypeLabel(i) || ('Document ' + (i + 1)) }}\n </h4>\n <div class=\"tw-flex tw-gap-2\">\n @if (doc?._id) {\n <button cideEleButton variant=\"secondary\" size=\"sm\" type=\"button\" (click)=\"shareDocumentRights(i)\"\n leftIcon=\"share\">\n Share\n </button>\n }\n </div>\n </div>\n <div class=\"tw-p-4\">\n <!-- Main Layout: Inputs on Left, File Upload on Right -->\n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-3 tw-gap-4\">\n \n <!-- Left Side: Document Information (2/3 width) -->\n <div class=\"lg:tw-col-span-2\">\n <!-- Row 1: Document Type, Document Number, Name as per Document -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Document Type\" [options]=\"documentTypeOptions()\"\n formControlName=\"syusd_document_type_id_sygms\" placeholder=\"Select type\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\" (change)=\"onDocumentTypeChange(i)\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Document Number\" formControlName=\"syusd_doc_number\"\n placeholder=\"Document number\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Name as per Document\" formControlName=\"syusd_doc_name_as_per_doc\"\n placeholder=\"Name on document\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 2: Issue Date, Expiry Date, Photo Group -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Issue Date\" formControlName=\"syusd_doc_issue_date\"\n [id]=\"'syusd_doc_issue_date['+i+']'\" type=\"date\" size=\"sm\">\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=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 3: Verification Status, KYC Status -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-3\">\n <cide-ele-select label=\"Verification Status\" [options]=\"documentVerificationStatusOptions()\"\n formControlName=\"syusd_doc_verification_status_id_sygms\" placeholder=\"Select status\"\n size=\"sm\" valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-select label=\"KYC Status\" [options]=\"documentKycStatusOptions()\"\n formControlName=\"syusd_doc_kyc_status_id_sygms\" placeholder=\"Select KYC status\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n </div>\n\n <!-- Right Side: File Upload (1/3 width) -->\n <div class=\"lg:tw-col-span-1\">\n <div class=\"tw-bg-gray-50 tw-border tw-border-gray-200 tw-rounded-lg tw-p-3 tw-h-full\">\n \n <!-- File Upload Input -->\n <cide-ele-file-input\n [id]=\"'document-files-' + i\"\n [multiple]=\"true\"\n formControlName=\"syusd_photo_group_id_cyfm\"\n [accept]=\"'.pdf,.jpg,.jpeg,.png,.doc,.docx'\"\n [autoUpload]=\"true\"\n [uploadData]=\"getDocumentUploadData(i)\"\n (change)=\"onDocumentFilesSelected($event, i)\"\n (uploadSuccess)=\"onDocumentUploadSuccess($event, i)\"\n (uploadError)=\"onDocumentUploadError($event, i)\"\n (uploadProgressChange)=\"onDocumentUploadProgress($event, i)\"\n class=\"tw-mb-3\"\n size=\"sm\">\n </cide-ele-file-input>\n\n <!-- Upload Status -->\n <!-- Upload status is now handled by the file input component itself -->\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n }\n\n @case ('family') {\n <!-- Family Details Section - Compact Design -->\n <div class=\"tw-py-1 tw-border-b-0 tw-mb-1\">\n <div class=\"tw-flex tw-justify-end tw-items-end tw-mb-3 tw-gap-4\">\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"button\" (click)=\"addFamilyDetail()\" leftIcon=\"add\" [disabled]=\"!hasAddFamilyDetailRights()\">\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-lg tw-mb-4 tw-overflow-hidden tw-transition-all tw-duration-200 hover:tw-shadow-md tw-shadow-sm\">\n \n <!-- Compact Header -->\n <div class=\"tw-bg-gray-50 tw-px-4 tw-py-2 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-medium\">Family Member {{ i + 1 }}</h4>\n <div class=\"tw-flex tw-gap-2\">\n @if (family?._id) {\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"shareFamilyDetailRights(i)\"\n leftIcon=\"share\">\n Share\n </button>\n }\n @if (!family?._id) {\n <button cideEleButton variant=\"danger\" size=\"xs\" type=\"button\" (click)=\"removeFamilyDetail(i)\" leftIcon=\"delete\">\n Remove\n </button>\n }\n </div>\n </div>\n \n <!-- Compact Form Content - 3 inputs per row -->\n <div class=\"tw-p-4\">\n <!-- Row 1: Name, User, and Combined Relationship/Active Status (33.33% each) -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Family Member Name\" formControlName=\"syfdl_family_member_name\"\n placeholder=\"Enter family member full name\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-select label=\"Family Member User\" [options]=\"userOptions(i)\"\n formControlName=\"syfdl_family_member_id_user\" placeholder=\"Select family member user\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"user_fullname\" [searchable]=\"true\"\n [loading]=\"userSearchLoading()[i] || false\" (searchChange)=\"onUserSearchChange($event, i)\"\n (change)=\"onUserSelectionChange($event, i)\">\n </cide-ele-select>\n\n <!-- Combined Relationship and Active Status (33.33%) -->\n <div class=\"tw-flex tw-flex-row tw-gap-2 tw-items-end\">\n <div class=\"tw-flex-1\">\n <cide-ele-select label=\"Relationship\" [options]=\"relationshipOptions()\"\n formControlName=\"syfdl_relationship_id_sygms\" placeholder=\"Select relationship\" size=\"sm\"\n valueKey=\"_id\" labelKey=\"sygms_title\">\n </cide-ele-select>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-pt-1 tw-flex-shrink-0\">\n <cide-ele-input formControlName=\"syfdl_isactive\" type=\"checkbox\" label=\"Active\" size=\"sm\">\n </cide-ele-input>\n </div>\n </div>\n </div>\n\n <!-- Row 2: Blood Group, DOB, and Phone -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 xl:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-select label=\"Blood Group\" [options]=\"bloodGroupOptions()\"\n formControlName=\"syfdl_blood_group_sygms\" placeholder=\"Select blood group\" size=\"sm\" valueKey=\"_id\"\n labelKey=\"sygms_title\">\n </cide-ele-select>\n\n <cide-ele-input label=\"Date of Birth\" formControlName=\"syfdl_family_member_dob\" type=\"date\" size=\"sm\"\n [id]=\"'syfdl_family_member_dob['+i+']'\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Phone\" formControlName=\"syfdl_contact_phone\" type=\"tel\"\n placeholder=\"Enter contact phone\" size=\"sm\">\n </cide-ele-input>\n </div>\n\n <!-- Row 3: Email, Email ID, and Contact Number -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 xl:tw-grid-cols-3 tw-gap-3 tw-mb-3\">\n <cide-ele-input label=\"Contact Email\" formControlName=\"syfdl_contact_email\" type=\"email\"\n placeholder=\"Enter contact email\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Email ID\" formControlName=\"syfdl_contact_email_id\" type=\"email\"\n placeholder=\"Enter contact email ID\" size=\"sm\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Contact Number\" formControlName=\"syfdl_contact_number\" type=\"tel\"\n placeholder=\"Enter contact number\" size=\"sm\">\n </cide-ele-input>\n </div>\n\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-between tw-items-center 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 <!-- Error Display Component -->\n <div class=\"tw-flex-1\">\n <cide-form-field-error [formGroup]=\"userMasterForm\"></cide-form-field-error>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-gap-4\">\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 </div>\n </form>\n</div>\n</cide-lyt-shared-wrapper>\n\n<!-- Template Renderers for Role Permissions Grid -->\n<ng-template #menuDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-items-center tw-space-x-3 tw-min-w-0\">\n <!-- Menu Icon -->\n <div class=\"tw-flex-shrink-0\">\n @if (row.syme_type === 'module') {\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">folder</cide-ele-icon>\n } @else if (row.syme_type === 'section') {\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">folder_open</cide-ele-icon>\n } @else if (row.syme_type === 'menu') {\n <cide-ele-icon class=\"tw-text-purple-600 tw-w-4 tw-h-4\">menu</cide-ele-icon>\n } @else {\n <cide-ele-icon class=\"tw-text-gray-600 tw-w-4 tw-h-4\">description</cide-ele-icon>\n }\n </div>\n\n <!-- Menu Details -->\n <div class=\"tw-ml-3 tw-min-w-0 tw-flex-1\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" [title]=\"row.syme_title\">\n {{ row.syme_title || row.menu?.syme_title || row.menu?.syme_menu_name || 'Untitled' }}\n </div>\n <!-- Green pill indicator for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <span\n class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-whitespace-nowrap\">\n Assigned\n </span>\n }\n }\n </div>\n @if (row.permission?.sygms_name) {\n <div class=\"tw-text-xs tw-text-blue-500 tw-truncate\" [title]=\"row.permission?.sygms_name\">\n {{ row.permission?.sygms_name }}\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 <div class=\"tw-flex tw-items-center tw-justify-center\">\n @if (row.syme_type === 'module') {\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-blue-100 tw-text-blue-800\">\n Module\n </span>\n } @else if (row.syme_type === 'section') {\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 Section\n </span>\n } @else if (row.syme_type === 'menu') {\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-purple-100 tw-text-purple-800\">\n Menu\n </span>\n } @else {\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-gray-100 tw-text-gray-800\">\n {{ row.syme_type || 'Unknown' }}\n </span>\n }\n </div>\n</ng-template>\n\n<!-- Permissions Checkbox Renderer Template -->\n<ng-template #permissionsCheckboxRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row.syme_type === 'menu' && row?.syme_permissions_id_sygms && row?.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row?.syme_permissions_id_sygms || []; track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <input type=\"checkbox\" [checked]=\"isPermissionSelected(row._id, permissionId)\" [disabled]=\"true\"\n class=\"tw-h-4 tw-w-4 tw-text-blue-600 tw-bg-gray-100 tw-border-gray-300 tw-rounded focus:tw-ring-blue-500\">\n <label class=\"tw-text-xs tw-text-gray-700\">\n {{ getPermissionById(permissionId)?.sygms_title || 'Unknown' }}\n </label>\n </div>\n </div>\n }\n } @else {\n <!-- Show green checkmark for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section' || row.syme_type === 'title') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-bg-green-100 tw-rounded-full\">\n <cide-ele-icon class=\"tw-text-green-600\" size=\"xs\">\n check\n </cide-ele-icon>\n </div>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n }\n </div>\n</ng-template>\n\n<!-- Menu Rights Permissions Renderer Template -->\n<ng-template #menuRightsPermissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n <!-- Role Rights Display -->\n @if (row.role_rights && row.role_rights.length > 0) {\n <div class=\"tw-mb-2\">\n <div class=\"tw-text-xs tw-text-gray-500 tw-mb-1\">Role Rights:</div>\n <div class=\"tw-flex tw-flex-wrap tw-gap-1\">\n @for (right of row.role_rights; track $index) {\n <span 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 </div>\n }\n\n\n <!-- Exception Indicator -->\n @if (row.hasException) {\n <div class=\"tw-mt-2\">\n <span 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 </div>\n } @else {\n <div class=\"tw-mt-2\">\n <span class=\"tw-text-xs tw-text-gray-400\">Default</span>\n </div>\n }\n </div>\n</ng-template>\n\n<!-- Permissions Renderer Template -->\n<ng-template #permissionsRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row._permissionValues && Object.keys(row._permissionValues).length > 0) {\n @for (permissionId of Object.keys(row._permissionValues); track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-input type=\"checkbox\" [ngModel]=\"row._permissionValues[permissionId].checked\"\n (ngModelChange)=\"onPermissionChangeSafe($event, row, permissionId)\"\n [id]=\"'permission-' + row._id + '-' + permissionId\" class=\"tw-h-4 tw-w-4\">\n </cide-ele-input>\n <label [for]=\"'permission-' + row._id + '-' + permissionId\" \n class=\"tw-text-xs tw-cursor-pointer\"\n [ngClass]=\"{\n 'tw-text-gray-700': row._permissionValues[permissionId].modified === row._permissionValues[permissionId].actual,\n 'tw-text-blue-600 tw-font-semibold': row._permissionValues[permissionId].modified !== row._permissionValues[permissionId].actual\n }\">\n {{ row._permissionValues[permissionId].permission?.sygms_title }}\n @if (row._permissionValues[permissionId].modified !== row._permissionValues[permissionId].actual) {\n <span class=\"tw-text-xs tw-text-orange-500 tw-ml-1\" title=\"Modified from role permission\">\n ({{ row._permissionValues[permissionId].actual ? '\u2713' : '\u2717' }})\n </span>\n }\n </label>\n </div>\n }\n } @else {\n <!-- No permissions to display - show N/A (permissions are already loaded, just empty) -->\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n </div>\n</ng-template>", styles: [":host ::ng-deep .entity-mapping-card{transition:all .2s ease}:host ::ng-deep .entity-mapping-card:hover{transform:translateY(-2px)}:host ::ng-deep .entity-mapping-card .cide-card-header{background:linear-gradient(135deg,#3b82f60d,#9333ea0d);border-bottom:1px solid rgba(59,130,246,.1)}:host ::ng-deep .dark .entity-mapping-card .cide-card-header{background:linear-gradient(135deg,#3b82f61a,#9333ea1a);border-bottom:1px solid rgba(59,130,246,.2)}:host ::ng-deep .entity-mapping-card .cide-card-header-content{font-weight:600}:host ::ng-deep .entity-mapping-card .cide-card-body{background:linear-gradient(180deg,#f9fafb80,#ffffff80)}:host ::ng-deep .dark .entity-mapping-card .cide-card-body{background:linear-gradient(180deg,#11182780,#1f293780)}\n"] }]
|
|
17233
|
+
}], ctorParameters: () => [], propDecorators: { menuDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['menuDetailsRendererTemplate', { isSignal: true }] }], permissionsCheckboxRendererTemplate: [{ type: i0.ViewChild, args: ['permissionsCheckboxRendererTemplate', { isSignal: true }] }], menuTypeRendererTemplate: [{ type: i0.ViewChild, args: ['menuTypeRendererTemplate', { isSignal: true }] }], menuRightsPermissionsRendererTemplate: [{ type: i0.ViewChild, args: ['menuRightsPermissionsRendererTemplate', { isSignal: true }] }], permissionsRendererTemplate: [{ type: i0.ViewChild, args: ['permissionsRendererTemplate', { isSignal: true }] }] } });
|
|
16732
17234
|
|
|
16733
17235
|
var userCreate_component = /*#__PURE__*/Object.freeze({
|
|
16734
17236
|
__proto__: null,
|
|
@@ -16899,13 +17401,40 @@ class CideCoreUserListComponent {
|
|
|
16899
17401
|
console.log('🔧 USER MASTER LIST: Component initializing');
|
|
16900
17402
|
// Initialize rights for user management
|
|
16901
17403
|
this.rightsService.initializeRights(this.pageCode());
|
|
17404
|
+
// Check query params for filtering by user type (from faculty/student list)
|
|
17405
|
+
this.route.queryParams.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(params => {
|
|
17406
|
+
const userTypeParam = params['userType'] || params['filterType'];
|
|
17407
|
+
if (userTypeParam) {
|
|
17408
|
+
const resolvedType = userTypeParam.toString().trim().toUpperCase();
|
|
17409
|
+
// Map common variations
|
|
17410
|
+
if (resolvedType === 'FACULTY' || resolvedType === 'TEACHER') {
|
|
17411
|
+
this.userType.set('TEACHER');
|
|
17412
|
+
}
|
|
17413
|
+
else if (resolvedType === 'STUDENT') {
|
|
17414
|
+
this.userType.set('STUDENT');
|
|
17415
|
+
}
|
|
17416
|
+
else {
|
|
17417
|
+
this.userType.set(resolvedType);
|
|
17418
|
+
}
|
|
17419
|
+
console.log('👤 User type filter set from query params:', this.userType());
|
|
17420
|
+
}
|
|
17421
|
+
});
|
|
16902
17422
|
// Pick up user type and page config from route data/cache (shared wrapper already loaded page API)
|
|
16903
17423
|
this.route.data.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(data => {
|
|
16904
17424
|
const routeUserType = data['userType'] || this.route.snapshot.queryParamMap.get('userType');
|
|
16905
17425
|
const resolvedType = (routeUserType || '').toString().trim().toUpperCase();
|
|
16906
|
-
if (resolvedType) {
|
|
16907
|
-
|
|
16908
|
-
|
|
17426
|
+
if (resolvedType && !this.userType()) {
|
|
17427
|
+
// Only set if not already set from query params
|
|
17428
|
+
if (resolvedType === 'FACULTY' || resolvedType === 'TEACHER') {
|
|
17429
|
+
this.userType.set('TEACHER');
|
|
17430
|
+
}
|
|
17431
|
+
else if (resolvedType === 'STUDENT') {
|
|
17432
|
+
this.userType.set('STUDENT');
|
|
17433
|
+
}
|
|
17434
|
+
else {
|
|
17435
|
+
this.userType.set(resolvedType);
|
|
17436
|
+
}
|
|
17437
|
+
console.log('👤 User type set from route data:', this.userType());
|
|
16909
17438
|
}
|
|
16910
17439
|
const codeFromRoute = data['page']?.sypg_page_code || data['sypg_page_code'];
|
|
16911
17440
|
const codeFromQuery = this.route.snapshot.queryParamMap.get('sypg_page_code');
|
|
@@ -17362,10 +17891,10 @@ class CideCoreUserListComponent {
|
|
|
17362
17891
|
break;
|
|
17363
17892
|
}
|
|
17364
17893
|
}
|
|
17365
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
17366
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
17894
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17895
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreUserListComponent, isStandalone: true, selector: "cide-core-user-list", viewQueries: [{ propertyName: "gridComponent", first: true, predicate: CideEleDataGridComponent, descendants: true }, { propertyName: "actionsTemplate", first: true, predicate: ["actionsTemplate"], descendants: true, static: true }, { propertyName: "userDetailsTemplate", first: true, predicate: ["userDetailsTemplate"], descendants: true, static: true }, { propertyName: "contactInfoTemplate", first: true, predicate: ["contactInfoTemplate"], descendants: true, static: true }, { propertyName: "organizationTemplate", first: true, predicate: ["organizationTemplate"], descendants: true, static: true }, { propertyName: "validityTemplate", first: true, predicate: ["validityTemplate"], descendants: true, static: true }, { propertyName: "statusTemplate", first: true, predicate: ["statusTemplate"], descendants: true, static: true }], ngImport: i0, template: "<!-- User List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'auth_user_mst' }\">\n <!-- Breadcrumb Actions -->\n <div breadcrumb-actions>\n @if (canCreate()) {\n <button cideEleButton variant=\"primary\" size=\"sm\" (click)=\"onAddUser()\" leftIcon=\"add\">\n Add User\n </button>\n }\n </div>\n\n<div class=\"user-master-listing-container tw-bg-white tw-shadow-lg tw-rounded-lg tw-table tw-h-full\">\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\">\n <cide-ele-icon name=\"exclamation-triangle\" class=\"tw-text-red-400\"></cide-ele-icon>\n <div class=\"tw-ml-3\">\n <h3 class=\"tw-text-sm tw-font-medium tw-text-red-800\">Error</h3>\n <p class=\"tw-text-sm tw-text-red-700 tw-mt-1\">{{ error() }}</p>\n </div>\n </div>\n </div>\n }\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n <div class=\"tw-h-full tw-overflow-auto\">\n <!-- Data Grid Component -->\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"templateRenderers\"\n [serverSidePagination]=\"true\" [totalServerItems]=\"totalItems()\" [currentServerPage]=\"currentPage()\"\n [currentServerPageSize]=\"pageSize()\" (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n </div>\n </div>\n\n</div>\n\n<!-- Template Definitions for Grid Renderers -->\n\n<!-- User Details Template -->\n<ng-template #userDetailsTemplate let-value let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <div\n class=\"tw-flex-shrink-0 tw-w-12 tw-h-12 tw-bg-blue-100 tw-rounded-full tw-flex tw-items-center tw-justify-center\">\n <span class=\"tw-text-blue-600 tw-font-semibold tw-text-sm\">\n {{ getUserInitials(row.user_firstname, row.user_lastname) }}\n </span>\n </div>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <p class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate\" [title]=\"row.user_fullname\">\n {{ row.user_fullname || 'Unknown User' }}\n </p>\n <p class=\"tw-text-xs tw-text-blue-600 tw-truncate tw-font-medium\" [title]=\"'Username: ' + row.user_username\">\n @{{ row.user_username || 'No username' }}\n </p>\n <p class=\"tw-text-xs tw-text-gray-400 tw-truncate\" [title]=\"'ID: ' + row._id\">\n ID: {{ row._id?.substring(0, 8) }}...\n </p>\n </div>\n </div>\n</ng-template>\n\n<!-- Contact Info Template -->\n<ng-template #contactInfoTemplate let-value let-row=\"row\" let-column=\"column\">\n <div class=\"tw-space-y-1\">\n <p class=\"tw-text-xs tw-text-gray-900 tw-flex tw-items-center\" [title]=\"'Email: ' + row.user_emailid\">\n <svg class=\"tw-flex-shrink-0 tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path d=\"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z\" />\n <path d=\"M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z\" />\n </svg>\n <span class=\"tw-truncate\">{{ row.user_emailid || 'No email' }}</span>\n </p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-flex tw-items-center\" [title]=\"'Mobile: ' + row.user_mobileno\">\n <svg class=\"tw-flex-shrink-0 tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path\n d=\"M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z\" />\n </svg>\n <span class=\"tw-truncate\">{{ row.user_mobileno || 'No mobile' }}</span>\n </p>\n <p class=\"tw-text-xs tw-text-gray-500 tw-flex tw-items-center\"\n [title]=\"'Password Change: ' + getPasswordChangeText(row.user_passwordchangeonlogin)\">\n <svg class=\"tw-flex-shrink-0 tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path fill-rule=\"evenodd\"\n d=\"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z\"\n clip-rule=\"evenodd\" />\n </svg>\n <span class=\"tw-truncate\">{{ getPasswordChangeText(row.user_passwordchangeonlogin) }}</span>\n </p>\n </div>\n</ng-template>\n\n\n\n<!-- Validity Template -->\n<ng-template #validityTemplate let-value let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-center tw-space-y-1\">\n <p class=\"tw-text-xs tw-text-gray-900 tw-font-medium\">\n Validity managed per entity\n </p>\n <p class=\"tw-text-xs tw-text-gray-600\">\n Check entity mappings for details\n </p>\n </div>\n</ng-template>\n\n<!-- Status Template -->\n<ng-template #statusTemplate let-value let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-justify-center\">\n @if (row.user_isactive) {\n <span\n 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-bg-green-100 tw-text-green-800\">\n <svg class=\"tw-w-1.5 tw-h-1.5 tw-mr-1\" fill=\"currentColor\" viewBox=\"0 0 8 8\">\n <circle cx=\"4\" cy=\"4\" r=\"3\" />\n </svg>\n Active\n </span>\n } @else {\n <span\n 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-bg-red-100 tw-text-red-800\">\n <svg class=\"tw-w-1.5 tw-h-1.5 tw-mr-1\" fill=\"currentColor\" viewBox=\"0 0 8 8\">\n <circle cx=\"4\" cy=\"4\" r=\"3\" />\n </svg>\n Inactive\n </span>\n }\n </div>\n</ng-template>\n\n<!-- Actions Template using cide-ele-dropdown -->\n<ng-template #actionsTemplate let-value let-row=\"row\" let-column=\"column\">\n <cide-ele-dropdown [items]=\"getDropdownItems(row)\" [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm', usePortal: true, minWidth: 200 }\" (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>\n</cide-lyt-shared-wrapper>", styles: [".user-master-listing-container{@apply tw-w-full tw-h-full;}:host{@apply tw-w-full tw-h-full tw-flex tw-flex-col;}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
17367
17896
|
}
|
|
17368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
17897
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserListComponent, decorators: [{
|
|
17369
17898
|
type: Component,
|
|
17370
17899
|
args: [{ selector: 'cide-core-user-list', standalone: true, imports: [
|
|
17371
17900
|
CommonModule,
|
|
@@ -17375,7 +17904,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
17375
17904
|
CideEleDataGridComponent,
|
|
17376
17905
|
CideEleDropdownComponent,
|
|
17377
17906
|
CideLytSharedWrapperComponent
|
|
17378
|
-
], template: "<!-- User List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'auth_user_mst' }\">\n
|
|
17907
|
+
], template: "<!-- User List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'auth_user_mst' }\">\n <!-- Breadcrumb Actions -->\n <div breadcrumb-actions>\n @if (canCreate()) {\n <button cideEleButton variant=\"primary\" size=\"sm\" (click)=\"onAddUser()\" leftIcon=\"add\">\n Add User\n </button>\n }\n </div>\n\n<div class=\"user-master-listing-container tw-bg-white tw-shadow-lg tw-rounded-lg tw-table tw-h-full\">\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\">\n <cide-ele-icon name=\"exclamation-triangle\" class=\"tw-text-red-400\"></cide-ele-icon>\n <div class=\"tw-ml-3\">\n <h3 class=\"tw-text-sm tw-font-medium tw-text-red-800\">Error</h3>\n <p class=\"tw-text-sm tw-text-red-700 tw-mt-1\">{{ error() }}</p>\n </div>\n </div>\n </div>\n }\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n <div class=\"tw-h-full tw-overflow-auto\">\n <!-- Data Grid Component -->\n <cide-ele-data-grid [config]=\"gridConfig()\" [templateRenderers]=\"templateRenderers\"\n [serverSidePagination]=\"true\" [totalServerItems]=\"totalItems()\" [currentServerPage]=\"currentPage()\"\n [currentServerPageSize]=\"pageSize()\" (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n </div>\n </div>\n\n</div>\n\n<!-- Template Definitions for Grid Renderers -->\n\n<!-- User Details Template -->\n<ng-template #userDetailsTemplate let-value let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <div\n class=\"tw-flex-shrink-0 tw-w-12 tw-h-12 tw-bg-blue-100 tw-rounded-full tw-flex tw-items-center tw-justify-center\">\n <span class=\"tw-text-blue-600 tw-font-semibold tw-text-sm\">\n {{ getUserInitials(row.user_firstname, row.user_lastname) }}\n </span>\n </div>\n <div class=\"tw-flex-1 tw-min-w-0\">\n <p class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate\" [title]=\"row.user_fullname\">\n {{ row.user_fullname || 'Unknown User' }}\n </p>\n <p class=\"tw-text-xs tw-text-blue-600 tw-truncate tw-font-medium\" [title]=\"'Username: ' + row.user_username\">\n @{{ row.user_username || 'No username' }}\n </p>\n <p class=\"tw-text-xs tw-text-gray-400 tw-truncate\" [title]=\"'ID: ' + row._id\">\n ID: {{ row._id?.substring(0, 8) }}...\n </p>\n </div>\n </div>\n</ng-template>\n\n<!-- Contact Info Template -->\n<ng-template #contactInfoTemplate let-value let-row=\"row\" let-column=\"column\">\n <div class=\"tw-space-y-1\">\n <p class=\"tw-text-xs tw-text-gray-900 tw-flex tw-items-center\" [title]=\"'Email: ' + row.user_emailid\">\n <svg class=\"tw-flex-shrink-0 tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path d=\"M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884z\" />\n <path d=\"M18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z\" />\n </svg>\n <span class=\"tw-truncate\">{{ row.user_emailid || 'No email' }}</span>\n </p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-flex tw-items-center\" [title]=\"'Mobile: ' + row.user_mobileno\">\n <svg class=\"tw-flex-shrink-0 tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path\n d=\"M2 3a1 1 0 011-1h2.153a1 1 0 01.986.836l.74 4.435a1 1 0 01-.54 1.06l-1.548.773a11.037 11.037 0 006.105 6.105l.774-1.548a1 1 0 011.059-.54l4.435.74a1 1 0 01.836.986V17a1 1 0 01-1 1h-2C7.82 18 2 12.18 2 5V3z\" />\n </svg>\n <span class=\"tw-truncate\">{{ row.user_mobileno || 'No mobile' }}</span>\n </p>\n <p class=\"tw-text-xs tw-text-gray-500 tw-flex tw-items-center\"\n [title]=\"'Password Change: ' + getPasswordChangeText(row.user_passwordchangeonlogin)\">\n <svg class=\"tw-flex-shrink-0 tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path fill-rule=\"evenodd\"\n d=\"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z\"\n clip-rule=\"evenodd\" />\n </svg>\n <span class=\"tw-truncate\">{{ getPasswordChangeText(row.user_passwordchangeonlogin) }}</span>\n </p>\n </div>\n</ng-template>\n\n\n\n<!-- Validity Template -->\n<ng-template #validityTemplate let-value let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-center tw-space-y-1\">\n <p class=\"tw-text-xs tw-text-gray-900 tw-font-medium\">\n Validity managed per entity\n </p>\n <p class=\"tw-text-xs tw-text-gray-600\">\n Check entity mappings for details\n </p>\n </div>\n</ng-template>\n\n<!-- Status Template -->\n<ng-template #statusTemplate let-value let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-justify-center\">\n @if (row.user_isactive) {\n <span\n 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-bg-green-100 tw-text-green-800\">\n <svg class=\"tw-w-1.5 tw-h-1.5 tw-mr-1\" fill=\"currentColor\" viewBox=\"0 0 8 8\">\n <circle cx=\"4\" cy=\"4\" r=\"3\" />\n </svg>\n Active\n </span>\n } @else {\n <span\n 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-bg-red-100 tw-text-red-800\">\n <svg class=\"tw-w-1.5 tw-h-1.5 tw-mr-1\" fill=\"currentColor\" viewBox=\"0 0 8 8\">\n <circle cx=\"4\" cy=\"4\" r=\"3\" />\n </svg>\n Inactive\n </span>\n }\n </div>\n</ng-template>\n\n<!-- Actions Template using cide-ele-dropdown -->\n<ng-template #actionsTemplate let-value let-row=\"row\" let-column=\"column\">\n <cide-ele-dropdown [items]=\"getDropdownItems(row)\" [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm', usePortal: true, minWidth: 200 }\" (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>\n</cide-lyt-shared-wrapper>", styles: [".user-master-listing-container{@apply tw-w-full tw-h-full;}:host{@apply tw-w-full tw-h-full tw-flex tw-flex-col;}\n"] }]
|
|
17379
17908
|
}], ctorParameters: () => [], propDecorators: { gridComponent: [{
|
|
17380
17909
|
type: ViewChild,
|
|
17381
17910
|
args: [CideEleDataGridComponent]
|
|
@@ -17461,8 +17990,8 @@ class CideCoreUserAttributesComponent {
|
|
|
17461
17990
|
goBack() {
|
|
17462
17991
|
this.router.navigate(['/admin/user-master']);
|
|
17463
17992
|
}
|
|
17464
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
17465
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
17993
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserAttributesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17994
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CideCoreUserAttributesComponent, isStandalone: true, selector: "cide-core-user-attributes", ngImport: i0, template: `
|
|
17466
17995
|
<div class="p-5">
|
|
17467
17996
|
<div class="bg-white rounded-lg shadow-md mb-5">
|
|
17468
17997
|
<div class="p-5 border-b border-gray-200 flex justify-between items-center">
|
|
@@ -17596,7 +18125,7 @@ class CideCoreUserAttributesComponent {
|
|
|
17596
18125
|
</div>
|
|
17597
18126
|
`, isInline: true, 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.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
17598
18127
|
}
|
|
17599
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
18128
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserAttributesComponent, decorators: [{
|
|
17600
18129
|
type: Component,
|
|
17601
18130
|
args: [{
|
|
17602
18131
|
selector: 'cide-core-user-attributes',
|
|
@@ -17803,8 +18332,8 @@ class CideCoreUserContactAddressesComponent {
|
|
|
17803
18332
|
goBack() {
|
|
17804
18333
|
this.router.navigate(['/admin/user-master']);
|
|
17805
18334
|
}
|
|
17806
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
17807
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
18335
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserContactAddressesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18336
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreUserContactAddressesComponent, isStandalone: true, selector: "cide-core-user-contact-addresses", ngImport: i0, template: `
|
|
17808
18337
|
<div class="p-5">
|
|
17809
18338
|
<div class="bg-white rounded-lg shadow-md mb-5">
|
|
17810
18339
|
<div class="p-5 border-b border-gray-200 flex justify-between items-center">
|
|
@@ -18057,7 +18586,7 @@ class CideCoreUserContactAddressesComponent {
|
|
|
18057
18586
|
</div>
|
|
18058
18587
|
`, isInline: true, 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.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
18059
18588
|
}
|
|
18060
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
18589
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserContactAddressesComponent, decorators: [{
|
|
18061
18590
|
type: Component,
|
|
18062
18591
|
args: [{
|
|
18063
18592
|
selector: 'cide-core-user-contact-addresses',
|
|
@@ -18379,8 +18908,8 @@ class CideCoreUserDocumentsComponent {
|
|
|
18379
18908
|
goBack() {
|
|
18380
18909
|
this.router.navigate(['/admin/user-master']);
|
|
18381
18910
|
}
|
|
18382
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
18383
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
18911
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserDocumentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18912
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CideCoreUserDocumentsComponent, isStandalone: true, selector: "cide-core-user-documents", ngImport: i0, template: `
|
|
18384
18913
|
<div class="p-5">
|
|
18385
18914
|
<div class="bg-white rounded-lg shadow-md mb-5">
|
|
18386
18915
|
<div class="p-5 border-b border-gray-200 flex justify-between items-center">
|
|
@@ -18570,7 +19099,7 @@ class CideCoreUserDocumentsComponent {
|
|
|
18570
19099
|
</div>
|
|
18571
19100
|
`, isInline: true, 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.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
18572
19101
|
}
|
|
18573
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
19102
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserDocumentsComponent, decorators: [{
|
|
18574
19103
|
type: Component,
|
|
18575
19104
|
args: [{
|
|
18576
19105
|
selector: 'cide-core-user-documents',
|
|
@@ -18838,8 +19367,8 @@ class CideCoreUserEntityAccessComponent {
|
|
|
18838
19367
|
goBack() {
|
|
18839
19368
|
this.router.navigate(['/admin/user-master']);
|
|
18840
19369
|
}
|
|
18841
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
18842
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
19370
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserEntityAccessComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19371
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreUserEntityAccessComponent, isStandalone: true, selector: "cide-core-user-entity-access", ngImport: i0, template: `
|
|
18843
19372
|
<div class="p-5">
|
|
18844
19373
|
<div class="bg-white rounded-lg shadow-md mb-5">
|
|
18845
19374
|
<div class="p-5 border-b border-gray-200 flex justify-between items-center">
|
|
@@ -19004,7 +19533,7 @@ class CideCoreUserEntityAccessComponent {
|
|
|
19004
19533
|
</div>
|
|
19005
19534
|
`, isInline: true, 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.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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"] }] });
|
|
19006
19535
|
}
|
|
19007
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
19536
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserEntityAccessComponent, decorators: [{
|
|
19008
19537
|
type: Component,
|
|
19009
19538
|
args: [{
|
|
19010
19539
|
selector: 'cide-core-user-entity-access',
|
|
@@ -19236,8 +19765,8 @@ class CideCoreUserFamilyDetailsComponent {
|
|
|
19236
19765
|
goBack() {
|
|
19237
19766
|
this.router.navigate(['/admin/user-master']);
|
|
19238
19767
|
}
|
|
19239
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
19240
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.
|
|
19768
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserFamilyDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19769
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.15", type: CideCoreUserFamilyDetailsComponent, isStandalone: true, selector: "cide-core-user-family-details", ngImport: i0, template: `
|
|
19241
19770
|
<div class="p-5">
|
|
19242
19771
|
<div class="bg-white rounded-lg shadow-md mb-5">
|
|
19243
19772
|
<div class="p-5 border-b border-gray-200 flex justify-between items-center">
|
|
@@ -19402,7 +19931,7 @@ class CideCoreUserFamilyDetailsComponent {
|
|
|
19402
19931
|
</div>
|
|
19403
19932
|
`, isInline: true, 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.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { 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: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
19404
19933
|
}
|
|
19405
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
19934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserFamilyDetailsComponent, decorators: [{
|
|
19406
19935
|
type: Component,
|
|
19407
19936
|
args: [{
|
|
19408
19937
|
selector: 'cide-core-user-family-details',
|
|
@@ -19589,7 +20118,6 @@ class CideCoreUserRoleListComponent {
|
|
|
19589
20118
|
rightsService = inject(RightsService);
|
|
19590
20119
|
// Modern ViewChild signals for template renderers (Angular 20 approach)
|
|
19591
20120
|
userRoleDetailsRendererTemplate = viewChild.required('userRoleDetailsRendererTemplate');
|
|
19592
|
-
entityRendererTemplate = viewChild.required('entityRendererTemplate');
|
|
19593
20121
|
statusRendererTemplate = viewChild.required('statusRendererTemplate');
|
|
19594
20122
|
actionsDropdownRendererTemplate = viewChild.required('actionsDropdownRendererTemplate');
|
|
19595
20123
|
// State management using Angular Signals for server-side operations
|
|
@@ -19635,15 +20163,6 @@ class CideCoreUserRoleListComponent {
|
|
|
19635
20163
|
align: 'left',
|
|
19636
20164
|
renderer: 'userRoleDetailsRenderer'
|
|
19637
20165
|
},
|
|
19638
|
-
{
|
|
19639
|
-
key: 'entity',
|
|
19640
|
-
header: 'Entity',
|
|
19641
|
-
type: 'custom',
|
|
19642
|
-
width: '150px',
|
|
19643
|
-
truncate: true,
|
|
19644
|
-
align: 'left',
|
|
19645
|
-
renderer: 'entityRenderer'
|
|
19646
|
-
},
|
|
19647
20166
|
{
|
|
19648
20167
|
key: 'syusrol_isactive',
|
|
19649
20168
|
header: 'Status',
|
|
@@ -19772,7 +20291,6 @@ class CideCoreUserRoleListComponent {
|
|
|
19772
20291
|
// Computed template renderers for grid
|
|
19773
20292
|
templateRenderers = computed(() => ({
|
|
19774
20293
|
userRoleDetailsRenderer: this.userRoleDetailsRendererTemplate(),
|
|
19775
|
-
entityRenderer: this.entityRendererTemplate(),
|
|
19776
20294
|
statusRenderer: this.statusRendererTemplate(),
|
|
19777
20295
|
actionsDropdownRenderer: this.actionsDropdownRendererTemplate()
|
|
19778
20296
|
}), ...(ngDevMode ? [{ debugName: "templateRenderers" }] : []));
|
|
@@ -20039,10 +20557,10 @@ class CideCoreUserRoleListComponent {
|
|
|
20039
20557
|
}
|
|
20040
20558
|
return entity || 'N/A';
|
|
20041
20559
|
}
|
|
20042
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
20043
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
20560
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserRoleListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20561
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreUserRoleListComponent, isStandalone: true, selector: "cide-core-user-role-list", viewQueries: [{ propertyName: "userRoleDetailsRendererTemplate", first: true, predicate: ["userRoleDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "statusRendererTemplate", first: true, predicate: ["statusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- User Role List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_user_role' }\">\n <div class=\"tw-table tw-w-full tw-h-full\">\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\">admin_panel_settings</cide-ele-icon>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">User Role 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 <button cideEleButton variant=\"primary\" size=\"md\" leftIcon=\"add\" (click)=\"createUserRole()\">\n Create User Role\n </button>\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\"\n 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 <!-- 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 #userRoleDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-w-full\">\n <div class=\"tw-font-medium tw-text-gray-900\">{{ row.syusrol_role_name || 'N/A' }}</div>\n <div class=\"tw-text-sm tw-text-gray-500 tw-truncate\">{{ row.syusrol_role_description || 'No description' }}</div>\n </div>\n </ng-template>\n\n <ng-template #statusRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-items-center tw-justify-center\">\n <!-- Active/Inactive Status Badge -->\n <span\n class=\"tw-inline-flex tw-items-center tw-justify-center tw-px-2.5 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-text-center\"\n [ngClass]=\"getStatusBadgeClass(row)\">\n <cide-ele-icon size=\"2xs\" class=\"tw-mr-1\">\n {{ row.syusrol_isactive ? 'check_circle' : 'cancel' }}\n </cide-ele-icon>\n {{ getStatusText(row) }}\n </span>\n </div>\n </ng-template>\n\n <ng-template #actionsDropdownRendererTemplate let-row=\"row\">\n <cide-ele-dropdown [items]=\"getActionDropdownItems(row)\" [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>", styles: [".user-role-listing-container{@apply tw-w-full tw-h-full;}:host{@apply tw-w-full tw-h-full tw-flex tw-flex-col;}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
20044
20562
|
}
|
|
20045
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
20563
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserRoleListComponent, decorators: [{
|
|
20046
20564
|
type: Component,
|
|
20047
20565
|
args: [{ selector: 'cide-core-user-role-list', standalone: true, imports: [
|
|
20048
20566
|
CommonModule,
|
|
@@ -20052,14 +20570,444 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
20052
20570
|
CideEleDataGridComponent,
|
|
20053
20571
|
CideEleDropdownComponent,
|
|
20054
20572
|
CideLytSharedWrapperComponent
|
|
20055
|
-
], template: "<!-- User Role List with Shared Wrapper -->\
|
|
20056
|
-
}] });
|
|
20573
|
+
], template: "<!-- User Role List with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'core_user_role' }\">\n <div class=\"tw-table tw-w-full tw-h-full\">\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\">admin_panel_settings</cide-ele-icon>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">User Role 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 <button cideEleButton variant=\"primary\" size=\"md\" leftIcon=\"add\" (click)=\"createUserRole()\">\n Create User Role\n </button>\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\"\n 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 <!-- 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 #userRoleDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-w-full\">\n <div class=\"tw-font-medium tw-text-gray-900\">{{ row.syusrol_role_name || 'N/A' }}</div>\n <div class=\"tw-text-sm tw-text-gray-500 tw-truncate\">{{ row.syusrol_role_description || 'No description' }}</div>\n </div>\n </ng-template>\n\n <ng-template #statusRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-items-center tw-justify-center\">\n <!-- Active/Inactive Status Badge -->\n <span\n class=\"tw-inline-flex tw-items-center tw-justify-center tw-px-2.5 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-text-center\"\n [ngClass]=\"getStatusBadgeClass(row)\">\n <cide-ele-icon size=\"2xs\" class=\"tw-mr-1\">\n {{ row.syusrol_isactive ? 'check_circle' : 'cancel' }}\n </cide-ele-icon>\n {{ getStatusText(row) }}\n </span>\n </div>\n </ng-template>\n\n <ng-template #actionsDropdownRendererTemplate let-row=\"row\">\n <cide-ele-dropdown [items]=\"getActionDropdownItems(row)\" [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>", styles: [".user-role-listing-container{@apply tw-w-full tw-h-full;}:host{@apply tw-w-full tw-h-full tw-flex tw-flex-col;}\n"] }]
|
|
20574
|
+
}], propDecorators: { userRoleDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['userRoleDetailsRendererTemplate', { isSignal: true }] }], statusRendererTemplate: [{ type: i0.ViewChild, args: ['statusRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
20057
20575
|
|
|
20058
20576
|
var userRoleList_component = /*#__PURE__*/Object.freeze({
|
|
20059
20577
|
__proto__: null,
|
|
20060
20578
|
CideCoreUserRoleListComponent: CideCoreUserRoleListComponent
|
|
20061
20579
|
});
|
|
20062
20580
|
|
|
20581
|
+
class CopyRoleDrawerComponent {
|
|
20582
|
+
floatingContainerService = inject(CideEleFloatingContainerService);
|
|
20583
|
+
userRoleService = inject(CideCoreUserRoleService);
|
|
20584
|
+
entityService = inject(ENTITY_SERVICE_TOKEN);
|
|
20585
|
+
destroyRef = takeUntilDestroyed();
|
|
20586
|
+
// Outputs
|
|
20587
|
+
roleSelect = output();
|
|
20588
|
+
cancel = output();
|
|
20589
|
+
// Signals
|
|
20590
|
+
flattenedEntities = signal([], ...(ngDevMode ? [{ debugName: "flattenedEntities" }] : []));
|
|
20591
|
+
selectedEntityId = signal('', ...(ngDevMode ? [{ debugName: "selectedEntityId" }] : []));
|
|
20592
|
+
selectedRoleId = signal('', ...(ngDevMode ? [{ debugName: "selectedRoleId" }] : []));
|
|
20593
|
+
availableRoles = signal([], ...(ngDevMode ? [{ debugName: "availableRoles" }] : []));
|
|
20594
|
+
rolePreview = signal(null, ...(ngDevMode ? [{ debugName: "rolePreview" }] : []));
|
|
20595
|
+
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
20596
|
+
entitiesLoadAttempted = signal(false, ...(ngDevMode ? [{ debugName: "entitiesLoadAttempted" }] : []));
|
|
20597
|
+
constructor() {
|
|
20598
|
+
console.log('🏗️ [CopyRoleDrawer] Constructor called');
|
|
20599
|
+
console.log('🏗️ [CopyRoleDrawer] EntityService available:', !!this.entityService);
|
|
20600
|
+
}
|
|
20601
|
+
ngOnInit() {
|
|
20602
|
+
console.log('🔄 [CopyRoleDrawer] ngOnInit called, loading entities...');
|
|
20603
|
+
// Defer loading to avoid ExpressionChangedAfterItHasBeenCheckedError
|
|
20604
|
+
setTimeout(() => this.loadEntitiesIfNeeded(), 0);
|
|
20605
|
+
}
|
|
20606
|
+
ngAfterViewInit() {
|
|
20607
|
+
console.log('🔄 [CopyRoleDrawer] ngAfterViewInit called');
|
|
20608
|
+
// Try loading again if it wasn't loaded in ngOnInit
|
|
20609
|
+
setTimeout(() => this.loadEntitiesIfNeeded(), 0);
|
|
20610
|
+
}
|
|
20611
|
+
loadEntitiesIfNeeded() {
|
|
20612
|
+
if (!this.entitiesLoadAttempted()) {
|
|
20613
|
+
this.entitiesLoadAttempted.set(true);
|
|
20614
|
+
this.loadEntities();
|
|
20615
|
+
}
|
|
20616
|
+
}
|
|
20617
|
+
loadEntities() {
|
|
20618
|
+
console.log('📞 [CopyRoleDrawer] Calling entityService.getEntityList()...');
|
|
20619
|
+
this.loading.set(true);
|
|
20620
|
+
if (!this.entityService) {
|
|
20621
|
+
console.error('❌ [CopyRoleDrawer] EntityService is not available!');
|
|
20622
|
+
this.loading.set(false);
|
|
20623
|
+
return;
|
|
20624
|
+
}
|
|
20625
|
+
this.entityService.getEntityList({})
|
|
20626
|
+
.pipe(this.destroyRef)
|
|
20627
|
+
.subscribe({
|
|
20628
|
+
next: (response) => {
|
|
20629
|
+
console.log('✅ [CopyRoleDrawer] Entity list response received:', response);
|
|
20630
|
+
const typedResponse = response;
|
|
20631
|
+
if (typedResponse?.success && typedResponse?.data) {
|
|
20632
|
+
console.log(`✅ [CopyRoleDrawer] Processing ${typedResponse.data.length} entities`);
|
|
20633
|
+
const hierarchical = this.buildEntityHierarchy(typedResponse.data);
|
|
20634
|
+
console.log('✅ [CopyRoleDrawer] Hierarchical entities:', hierarchical);
|
|
20635
|
+
const flattened = this.flattenEntitiesForDropdown(hierarchical);
|
|
20636
|
+
console.log(`✅ [CopyRoleDrawer] Flattened ${flattened.length} entities for dropdown:`, flattened);
|
|
20637
|
+
this.flattenedEntities.set(flattened);
|
|
20638
|
+
console.log('✅ [CopyRoleDrawer] Signal updated. Current value:', this.flattenedEntities());
|
|
20639
|
+
}
|
|
20640
|
+
else {
|
|
20641
|
+
console.warn('⚠️ [CopyRoleDrawer] Invalid response structure:', typedResponse);
|
|
20642
|
+
}
|
|
20643
|
+
this.loading.set(false);
|
|
20644
|
+
},
|
|
20645
|
+
error: (error) => {
|
|
20646
|
+
console.error('❌ [CopyRoleDrawer] Error loading entities:', error);
|
|
20647
|
+
this.loading.set(false);
|
|
20648
|
+
}
|
|
20649
|
+
});
|
|
20650
|
+
}
|
|
20651
|
+
buildEntityHierarchy(entities) {
|
|
20652
|
+
const nodeMap = new Map();
|
|
20653
|
+
const rootNodes = [];
|
|
20654
|
+
entities.forEach(entity => {
|
|
20655
|
+
const node = { ...entity, children: [] };
|
|
20656
|
+
nodeMap.set(entity._id || '', node);
|
|
20657
|
+
});
|
|
20658
|
+
entities.forEach(entity => {
|
|
20659
|
+
const node = nodeMap.get(entity._id || '');
|
|
20660
|
+
if (node) {
|
|
20661
|
+
const parentId = entity.syen_id_syen;
|
|
20662
|
+
if (parentId && parentId !== "" && nodeMap.has(parentId)) {
|
|
20663
|
+
const parent = nodeMap.get(parentId);
|
|
20664
|
+
parent.children = parent.children || [];
|
|
20665
|
+
parent.children.push(node);
|
|
20666
|
+
}
|
|
20667
|
+
else {
|
|
20668
|
+
rootNodes.push(node);
|
|
20669
|
+
}
|
|
20670
|
+
}
|
|
20671
|
+
});
|
|
20672
|
+
return rootNodes;
|
|
20673
|
+
}
|
|
20674
|
+
flattenEntitiesForDropdown(entities, level = 0) {
|
|
20675
|
+
const result = [];
|
|
20676
|
+
entities.forEach(entity => {
|
|
20677
|
+
const indent = '\u00A0\u00A0\u00A0'.repeat(level);
|
|
20678
|
+
const prefix = level > 0 ? '└─ ' : '';
|
|
20679
|
+
const displayName = `${indent}${prefix}${entity.syen_name || 'Unnamed Entity'}`;
|
|
20680
|
+
result.push({ _id: entity._id || '', displayName, entity });
|
|
20681
|
+
if (entity.children && entity.children.length > 0) {
|
|
20682
|
+
const childrenFlattened = this.flattenEntitiesForDropdown(entity.children, level + 1);
|
|
20683
|
+
result.push(...childrenFlattened);
|
|
20684
|
+
}
|
|
20685
|
+
});
|
|
20686
|
+
return result;
|
|
20687
|
+
}
|
|
20688
|
+
onEntityChange(entityIdValue) {
|
|
20689
|
+
// Convert entityId to string
|
|
20690
|
+
const entityId = String(entityIdValue);
|
|
20691
|
+
this.selectedRoleId.set('');
|
|
20692
|
+
this.rolePreview.set(null);
|
|
20693
|
+
this.availableRoles.set([]);
|
|
20694
|
+
if (entityId) {
|
|
20695
|
+
this.loadRolesForEntity(entityId);
|
|
20696
|
+
}
|
|
20697
|
+
}
|
|
20698
|
+
loadRolesForEntity(entityId) {
|
|
20699
|
+
console.log('📞 [CopyRoleDrawer] Loading roles for entity:', entityId);
|
|
20700
|
+
this.loading.set(true);
|
|
20701
|
+
this.userRoleService.getRolesByEntity(entityId)
|
|
20702
|
+
.pipe(this.destroyRef)
|
|
20703
|
+
.subscribe({
|
|
20704
|
+
next: (response) => {
|
|
20705
|
+
console.log('✅ [CopyRoleDrawer] Roles response received:', response);
|
|
20706
|
+
const typedResponse = response;
|
|
20707
|
+
if (typedResponse?.success && typedResponse.data) {
|
|
20708
|
+
console.log(`✅ [CopyRoleDrawer] Loaded ${typedResponse.data.length} roles`);
|
|
20709
|
+
this.availableRoles.set(typedResponse.data);
|
|
20710
|
+
}
|
|
20711
|
+
else {
|
|
20712
|
+
console.warn('⚠️ [CopyRoleDrawer] Invalid roles response:', typedResponse);
|
|
20713
|
+
}
|
|
20714
|
+
this.loading.set(false);
|
|
20715
|
+
},
|
|
20716
|
+
error: (error) => {
|
|
20717
|
+
console.error('❌ [CopyRoleDrawer] Error loading roles:', error);
|
|
20718
|
+
this.loading.set(false);
|
|
20719
|
+
}
|
|
20720
|
+
});
|
|
20721
|
+
}
|
|
20722
|
+
onRoleChange(roleIdValue) {
|
|
20723
|
+
// Convert roleId to string
|
|
20724
|
+
const roleId = String(roleIdValue);
|
|
20725
|
+
this.rolePreview.set(null);
|
|
20726
|
+
if (roleId) {
|
|
20727
|
+
this.loadRolePreview(roleId);
|
|
20728
|
+
}
|
|
20729
|
+
}
|
|
20730
|
+
loadRolePreview(roleId) {
|
|
20731
|
+
console.log('📞 [CopyRoleDrawer] Loading role preview for:', roleId);
|
|
20732
|
+
this.loading.set(true);
|
|
20733
|
+
this.userRoleService.getUserRoleById({ syusrol_id: roleId })
|
|
20734
|
+
.pipe(this.destroyRef)
|
|
20735
|
+
.subscribe({
|
|
20736
|
+
next: (response) => {
|
|
20737
|
+
console.log('✅ [CopyRoleDrawer] Role preview response received:', response);
|
|
20738
|
+
const typedResponse = response;
|
|
20739
|
+
if (typedResponse?.success && typedResponse.data) {
|
|
20740
|
+
console.log('✅ [CopyRoleDrawer] Role preview loaded');
|
|
20741
|
+
this.rolePreview.set(typedResponse.data);
|
|
20742
|
+
}
|
|
20743
|
+
else {
|
|
20744
|
+
console.warn('⚠️ [CopyRoleDrawer] Invalid role preview response:', typedResponse);
|
|
20745
|
+
}
|
|
20746
|
+
this.loading.set(false);
|
|
20747
|
+
},
|
|
20748
|
+
error: (error) => {
|
|
20749
|
+
console.error('❌ [CopyRoleDrawer] Error loading role preview:', error);
|
|
20750
|
+
this.loading.set(false);
|
|
20751
|
+
}
|
|
20752
|
+
});
|
|
20753
|
+
}
|
|
20754
|
+
onApply() {
|
|
20755
|
+
const preview = this.rolePreview();
|
|
20756
|
+
if (preview) {
|
|
20757
|
+
this.roleSelect.emit(preview);
|
|
20758
|
+
this.floatingContainerService.hide('copy-role-drawer');
|
|
20759
|
+
}
|
|
20760
|
+
}
|
|
20761
|
+
onCancel() {
|
|
20762
|
+
this.cancel.emit();
|
|
20763
|
+
this.floatingContainerService.hide('copy-role-drawer');
|
|
20764
|
+
}
|
|
20765
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CopyRoleDrawerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
20766
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CopyRoleDrawerComponent, isStandalone: true, selector: "cide-copy-role-drawer", outputs: { roleSelect: "roleSelect", cancel: "cancel" }, ngImport: i0, template: `
|
|
20767
|
+
<div class="tw-flex tw-flex-col tw-h-full">
|
|
20768
|
+
<!-- Header Description -->
|
|
20769
|
+
<div class="tw-px-3 tw-py-2 tw-bg-blue-50 dark:tw-bg-blue-900/20 tw-border-b tw-border-blue-200 dark:tw-border-blue-700">
|
|
20770
|
+
<p class="tw-text-xs tw-text-blue-700 dark:tw-text-blue-300 tw-m-0">
|
|
20771
|
+
Select an entity and role to copy all permissions to the current role.
|
|
20772
|
+
</p>
|
|
20773
|
+
</div>
|
|
20774
|
+
|
|
20775
|
+
<!-- Content -->
|
|
20776
|
+
<div class="tw-flex-1 tw-overflow-y-auto tw-p-3 tw-space-y-4">
|
|
20777
|
+
<!-- Entity Selection -->
|
|
20778
|
+
<div>
|
|
20779
|
+
<label class="tw-block tw-text-sm tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2">
|
|
20780
|
+
Select Entity
|
|
20781
|
+
</label>
|
|
20782
|
+
<cide-ele-select
|
|
20783
|
+
id="copy_entity_select"
|
|
20784
|
+
[ngModel]="selectedEntityId()"
|
|
20785
|
+
(ngModelChange)="onEntityChange($event)"
|
|
20786
|
+
size="md">
|
|
20787
|
+
<option value="">Select an entity...</option>
|
|
20788
|
+
@for (entity of flattenedEntities(); track entity._id) {
|
|
20789
|
+
<option [value]="entity._id">{{ entity.displayName }}</option>
|
|
20790
|
+
}
|
|
20791
|
+
</cide-ele-select>
|
|
20792
|
+
<!-- Debug info -->
|
|
20793
|
+
<div class="tw-text-xs tw-text-gray-500 tw-mt-1">
|
|
20794
|
+
Debug: {{ flattenedEntities().length }} entities loaded
|
|
20795
|
+
</div>
|
|
20796
|
+
</div>
|
|
20797
|
+
|
|
20798
|
+
<!-- Role Selection -->
|
|
20799
|
+
@if (selectedEntityId() && availableRoles().length > 0) {
|
|
20800
|
+
<div>
|
|
20801
|
+
<label class="tw-block tw-text-sm tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2">
|
|
20802
|
+
Select Role to Copy
|
|
20803
|
+
</label>
|
|
20804
|
+
<cide-ele-select
|
|
20805
|
+
id="copy_role_select"
|
|
20806
|
+
[ngModel]="selectedRoleId()"
|
|
20807
|
+
(ngModelChange)="onRoleChange($event)"
|
|
20808
|
+
size="md">
|
|
20809
|
+
<option value="">Select a role...</option>
|
|
20810
|
+
@for (role of availableRoles(); track role._id) {
|
|
20811
|
+
<option [value]="role._id">{{ role.syusrol_role_name }}</option>
|
|
20812
|
+
}
|
|
20813
|
+
</cide-ele-select>
|
|
20814
|
+
</div>
|
|
20815
|
+
}
|
|
20816
|
+
|
|
20817
|
+
<!-- Role Preview -->
|
|
20818
|
+
@if (rolePreview()) {
|
|
20819
|
+
<div class="tw-bg-blue-50 dark:tw-bg-blue-900/20 tw-border tw-border-blue-200 dark:tw-border-blue-700 tw-rounded-md tw-p-3">
|
|
20820
|
+
<div class="tw-flex tw-items-start tw-gap-2 tw-mb-2">
|
|
20821
|
+
<cide-ele-icon variant="blue" size="sm" class="tw-flex-shrink-0 tw-mt-0.5">info</cide-ele-icon>
|
|
20822
|
+
<div class="tw-flex-1 tw-min-w-0">
|
|
20823
|
+
<div class="tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100 tw-text-sm tw-mb-1">
|
|
20824
|
+
{{ rolePreview()?.core_user_role?.syusrol_role_name }}
|
|
20825
|
+
</div>
|
|
20826
|
+
<div class="tw-text-xs tw-text-gray-600 dark:tw-text-gray-400 tw-mb-2">
|
|
20827
|
+
{{ rolePreview()?.core_user_role?.syusrol_role_description }}
|
|
20828
|
+
</div>
|
|
20829
|
+
<div class="tw-flex tw-items-center tw-gap-2 tw-flex-wrap">
|
|
20830
|
+
<span class="tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-blue-100 dark:tw-bg-blue-800 tw-text-blue-800 dark:tw-text-blue-200">
|
|
20831
|
+
{{ rolePreview()?.core_user_role_rights?.length || 0 }} permissions
|
|
20832
|
+
</span>
|
|
20833
|
+
<span class="tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium"
|
|
20834
|
+
[class]="rolePreview()?.core_user_role?.syusrol_isactive
|
|
20835
|
+
? 'tw-bg-green-100 dark:tw-bg-green-800 tw-text-green-800 dark:tw-text-green-200'
|
|
20836
|
+
: 'tw-bg-red-100 dark:tw-bg-red-800 tw-text-red-800 dark:tw-text-red-200'">
|
|
20837
|
+
{{ rolePreview()?.core_user_role?.syusrol_isactive ? 'Active' : 'Inactive' }}
|
|
20838
|
+
</span>
|
|
20839
|
+
</div>
|
|
20840
|
+
</div>
|
|
20841
|
+
</div>
|
|
20842
|
+
</div>
|
|
20843
|
+
}
|
|
20844
|
+
|
|
20845
|
+
<!-- Loading State -->
|
|
20846
|
+
@if (loading()) {
|
|
20847
|
+
<div class="tw-text-center tw-py-4">
|
|
20848
|
+
<div class="tw-inline-block tw-animate-spin tw-w-6 tw-h-6 tw-border-2 tw-border-blue-600 tw-border-t-transparent tw-rounded-full"></div>
|
|
20849
|
+
<p class="tw-text-sm tw-text-gray-600 dark:tw-text-gray-400 tw-mt-2">Loading...</p>
|
|
20850
|
+
</div>
|
|
20851
|
+
}
|
|
20852
|
+
|
|
20853
|
+
<!-- No Roles Message -->
|
|
20854
|
+
@if (selectedEntityId() && !loading() && availableRoles().length === 0) {
|
|
20855
|
+
<div class="tw-text-center tw-py-6 tw-text-gray-500 dark:tw-text-gray-400">
|
|
20856
|
+
<cide-ele-icon variant="gray" size="lg" class="tw-mb-2">info</cide-ele-icon>
|
|
20857
|
+
<p class="tw-text-sm tw-font-medium tw-mb-1">No Roles Available</p>
|
|
20858
|
+
<p class="tw-text-xs">This entity has no roles to copy from.</p>
|
|
20859
|
+
</div>
|
|
20860
|
+
}
|
|
20861
|
+
</div>
|
|
20862
|
+
|
|
20863
|
+
<!-- Footer -->
|
|
20864
|
+
<div class="tw-border-t tw-border-gray-200 dark:tw-border-gray-700 tw-px-3 tw-py-2 tw-flex tw-justify-end tw-gap-2 tw-flex-shrink-0 tw-bg-white dark:tw-bg-gray-800">
|
|
20865
|
+
<button
|
|
20866
|
+
cideEleButton
|
|
20867
|
+
variant="secondary"
|
|
20868
|
+
size="xs"
|
|
20869
|
+
type="button"
|
|
20870
|
+
(click)="onCancel()">
|
|
20871
|
+
Cancel
|
|
20872
|
+
</button>
|
|
20873
|
+
<button
|
|
20874
|
+
cideEleButton
|
|
20875
|
+
variant="primary"
|
|
20876
|
+
size="xs"
|
|
20877
|
+
type="button"
|
|
20878
|
+
leftIcon="content_copy"
|
|
20879
|
+
[disabled]="!rolePreview()"
|
|
20880
|
+
(click)="onApply()">
|
|
20881
|
+
Apply Copy
|
|
20882
|
+
</button>
|
|
20883
|
+
</div>
|
|
20884
|
+
</div>
|
|
20885
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { 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", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }] });
|
|
20886
|
+
}
|
|
20887
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CopyRoleDrawerComponent, decorators: [{
|
|
20888
|
+
type: Component,
|
|
20889
|
+
args: [{ selector: 'cide-copy-role-drawer', standalone: true, imports: [CommonModule, FormsModule, CideEleButtonComponent, CideIconComponent, CideSelectComponent], template: `
|
|
20890
|
+
<div class="tw-flex tw-flex-col tw-h-full">
|
|
20891
|
+
<!-- Header Description -->
|
|
20892
|
+
<div class="tw-px-3 tw-py-2 tw-bg-blue-50 dark:tw-bg-blue-900/20 tw-border-b tw-border-blue-200 dark:tw-border-blue-700">
|
|
20893
|
+
<p class="tw-text-xs tw-text-blue-700 dark:tw-text-blue-300 tw-m-0">
|
|
20894
|
+
Select an entity and role to copy all permissions to the current role.
|
|
20895
|
+
</p>
|
|
20896
|
+
</div>
|
|
20897
|
+
|
|
20898
|
+
<!-- Content -->
|
|
20899
|
+
<div class="tw-flex-1 tw-overflow-y-auto tw-p-3 tw-space-y-4">
|
|
20900
|
+
<!-- Entity Selection -->
|
|
20901
|
+
<div>
|
|
20902
|
+
<label class="tw-block tw-text-sm tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2">
|
|
20903
|
+
Select Entity
|
|
20904
|
+
</label>
|
|
20905
|
+
<cide-ele-select
|
|
20906
|
+
id="copy_entity_select"
|
|
20907
|
+
[ngModel]="selectedEntityId()"
|
|
20908
|
+
(ngModelChange)="onEntityChange($event)"
|
|
20909
|
+
size="md">
|
|
20910
|
+
<option value="">Select an entity...</option>
|
|
20911
|
+
@for (entity of flattenedEntities(); track entity._id) {
|
|
20912
|
+
<option [value]="entity._id">{{ entity.displayName }}</option>
|
|
20913
|
+
}
|
|
20914
|
+
</cide-ele-select>
|
|
20915
|
+
<!-- Debug info -->
|
|
20916
|
+
<div class="tw-text-xs tw-text-gray-500 tw-mt-1">
|
|
20917
|
+
Debug: {{ flattenedEntities().length }} entities loaded
|
|
20918
|
+
</div>
|
|
20919
|
+
</div>
|
|
20920
|
+
|
|
20921
|
+
<!-- Role Selection -->
|
|
20922
|
+
@if (selectedEntityId() && availableRoles().length > 0) {
|
|
20923
|
+
<div>
|
|
20924
|
+
<label class="tw-block tw-text-sm tw-font-medium tw-text-gray-700 dark:tw-text-gray-300 tw-mb-2">
|
|
20925
|
+
Select Role to Copy
|
|
20926
|
+
</label>
|
|
20927
|
+
<cide-ele-select
|
|
20928
|
+
id="copy_role_select"
|
|
20929
|
+
[ngModel]="selectedRoleId()"
|
|
20930
|
+
(ngModelChange)="onRoleChange($event)"
|
|
20931
|
+
size="md">
|
|
20932
|
+
<option value="">Select a role...</option>
|
|
20933
|
+
@for (role of availableRoles(); track role._id) {
|
|
20934
|
+
<option [value]="role._id">{{ role.syusrol_role_name }}</option>
|
|
20935
|
+
}
|
|
20936
|
+
</cide-ele-select>
|
|
20937
|
+
</div>
|
|
20938
|
+
}
|
|
20939
|
+
|
|
20940
|
+
<!-- Role Preview -->
|
|
20941
|
+
@if (rolePreview()) {
|
|
20942
|
+
<div class="tw-bg-blue-50 dark:tw-bg-blue-900/20 tw-border tw-border-blue-200 dark:tw-border-blue-700 tw-rounded-md tw-p-3">
|
|
20943
|
+
<div class="tw-flex tw-items-start tw-gap-2 tw-mb-2">
|
|
20944
|
+
<cide-ele-icon variant="blue" size="sm" class="tw-flex-shrink-0 tw-mt-0.5">info</cide-ele-icon>
|
|
20945
|
+
<div class="tw-flex-1 tw-min-w-0">
|
|
20946
|
+
<div class="tw-font-semibold tw-text-gray-900 dark:tw-text-gray-100 tw-text-sm tw-mb-1">
|
|
20947
|
+
{{ rolePreview()?.core_user_role?.syusrol_role_name }}
|
|
20948
|
+
</div>
|
|
20949
|
+
<div class="tw-text-xs tw-text-gray-600 dark:tw-text-gray-400 tw-mb-2">
|
|
20950
|
+
{{ rolePreview()?.core_user_role?.syusrol_role_description }}
|
|
20951
|
+
</div>
|
|
20952
|
+
<div class="tw-flex tw-items-center tw-gap-2 tw-flex-wrap">
|
|
20953
|
+
<span class="tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-blue-100 dark:tw-bg-blue-800 tw-text-blue-800 dark:tw-text-blue-200">
|
|
20954
|
+
{{ rolePreview()?.core_user_role_rights?.length || 0 }} permissions
|
|
20955
|
+
</span>
|
|
20956
|
+
<span class="tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium"
|
|
20957
|
+
[class]="rolePreview()?.core_user_role?.syusrol_isactive
|
|
20958
|
+
? 'tw-bg-green-100 dark:tw-bg-green-800 tw-text-green-800 dark:tw-text-green-200'
|
|
20959
|
+
: 'tw-bg-red-100 dark:tw-bg-red-800 tw-text-red-800 dark:tw-text-red-200'">
|
|
20960
|
+
{{ rolePreview()?.core_user_role?.syusrol_isactive ? 'Active' : 'Inactive' }}
|
|
20961
|
+
</span>
|
|
20962
|
+
</div>
|
|
20963
|
+
</div>
|
|
20964
|
+
</div>
|
|
20965
|
+
</div>
|
|
20966
|
+
}
|
|
20967
|
+
|
|
20968
|
+
<!-- Loading State -->
|
|
20969
|
+
@if (loading()) {
|
|
20970
|
+
<div class="tw-text-center tw-py-4">
|
|
20971
|
+
<div class="tw-inline-block tw-animate-spin tw-w-6 tw-h-6 tw-border-2 tw-border-blue-600 tw-border-t-transparent tw-rounded-full"></div>
|
|
20972
|
+
<p class="tw-text-sm tw-text-gray-600 dark:tw-text-gray-400 tw-mt-2">Loading...</p>
|
|
20973
|
+
</div>
|
|
20974
|
+
}
|
|
20975
|
+
|
|
20976
|
+
<!-- No Roles Message -->
|
|
20977
|
+
@if (selectedEntityId() && !loading() && availableRoles().length === 0) {
|
|
20978
|
+
<div class="tw-text-center tw-py-6 tw-text-gray-500 dark:tw-text-gray-400">
|
|
20979
|
+
<cide-ele-icon variant="gray" size="lg" class="tw-mb-2">info</cide-ele-icon>
|
|
20980
|
+
<p class="tw-text-sm tw-font-medium tw-mb-1">No Roles Available</p>
|
|
20981
|
+
<p class="tw-text-xs">This entity has no roles to copy from.</p>
|
|
20982
|
+
</div>
|
|
20983
|
+
}
|
|
20984
|
+
</div>
|
|
20985
|
+
|
|
20986
|
+
<!-- Footer -->
|
|
20987
|
+
<div class="tw-border-t tw-border-gray-200 dark:tw-border-gray-700 tw-px-3 tw-py-2 tw-flex tw-justify-end tw-gap-2 tw-flex-shrink-0 tw-bg-white dark:tw-bg-gray-800">
|
|
20988
|
+
<button
|
|
20989
|
+
cideEleButton
|
|
20990
|
+
variant="secondary"
|
|
20991
|
+
size="xs"
|
|
20992
|
+
type="button"
|
|
20993
|
+
(click)="onCancel()">
|
|
20994
|
+
Cancel
|
|
20995
|
+
</button>
|
|
20996
|
+
<button
|
|
20997
|
+
cideEleButton
|
|
20998
|
+
variant="primary"
|
|
20999
|
+
size="xs"
|
|
21000
|
+
type="button"
|
|
21001
|
+
leftIcon="content_copy"
|
|
21002
|
+
[disabled]="!rolePreview()"
|
|
21003
|
+
(click)="onApply()">
|
|
21004
|
+
Apply Copy
|
|
21005
|
+
</button>
|
|
21006
|
+
</div>
|
|
21007
|
+
</div>
|
|
21008
|
+
` }]
|
|
21009
|
+
}], ctorParameters: () => [], propDecorators: { roleSelect: [{ type: i0.Output, args: ["roleSelect"] }], cancel: [{ type: i0.Output, args: ["cancel"] }] } });
|
|
21010
|
+
|
|
20063
21011
|
class CideCoreUserRoleFormComponent {
|
|
20064
21012
|
// Dependency injection
|
|
20065
21013
|
destroyRef = inject(DestroyRef);
|
|
@@ -20067,6 +21015,7 @@ class CideCoreUserRoleFormComponent {
|
|
|
20067
21015
|
menuService = inject(MenuManagementService);
|
|
20068
21016
|
generalMasterService = inject(CideCoreGeneralMasterService);
|
|
20069
21017
|
generalMasterTypeService = inject(CideCoreGeneralMasterTypeService);
|
|
21018
|
+
floatingContainerService = inject(CideEleFloatingContainerService);
|
|
20070
21019
|
router = inject(Router);
|
|
20071
21020
|
route = inject(ActivatedRoute);
|
|
20072
21021
|
appState = inject(AppStateHelperService);
|
|
@@ -20951,10 +21900,116 @@ class CideCoreUserRoleFormComponent {
|
|
|
20951
21900
|
console.log('🔍 Change detection triggered after auto-checking parent view rights');
|
|
20952
21901
|
}, 100);
|
|
20953
21902
|
}
|
|
20954
|
-
|
|
20955
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideCoreUserRoleFormComponent, isStandalone: true, selector: "cide-core-user-role-form", viewQueries: [{ propertyName: "menuDetailsRendererTemplate", first: true, predicate: ["menuDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "permissionsCheckboxRendererTemplate", first: true, predicate: ["permissionsCheckboxRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- User Role Form Container -->\n<div class=\"tw-w-full tw-h-full\">\n <form class=\"tw-max-w-7xl tw-mx-auto tw-bg-transparent tw-h-full tw-flex tw-flex-col\" [formGroup]=\"userRoleForm\" [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mb-6 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 <!-- User Role Basic Information Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-0 tw-p-3\">\n\n <!-- Basic Fields -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-2 lg:tw-grid-cols-2 md:tw-grid-cols-1 tw-gap-6 tw-mb-0\">\n <!-- Left Column: Role Name -->\n <div>\n <cide-ele-input \n id=\"syusrol_role_name\" \n label=\"Role Name\" \n formControlName=\"syusrol_role_name\"\n placeholder=\"Enter role name\" \n [maxlength]=\"50\" \n size=\"md\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n\n <!-- Right Column: Description -->\n <div>\n <cide-ele-textarea \n id=\"syusrol_role_description\" \n label=\"Description\" \n formControlName=\"syusrol_role_description\"\n placeholder=\"Enter role description\" \n rows=\"3\"\n [maxlength]=\"200\"\n [disabled]=\"isViewMode()\">\n </cide-ele-textarea>\n </div>\n </div>\n\n <!-- Active Status Row -->\n <div class=\"tw-mb-0\">\n <cide-ele-input \n id=\"syusrol_isactive\" \n label=\"Active Status\" \n formControlName=\"syusrol_isactive\"\n type=\"checkbox\" \n size=\"md\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n </div>\n\n <!-- Role Rights Section -->\n <div class=\"tw-pt-2 tw-border-b-0 tw-mb-0 tw-flex-1 tw-flex tw-flex-col tw-min-h-0\">\n\n <!-- Role Rights Grid -->\n <div class=\"tw-flex-1 tw-min-h-0 tw-w-full\" style=\"height: 400px; max-height: 900px;\">\n <cide-ele-data-grid \n [config]=\"roleRightsGridConfig()\" \n [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onRoleRightsGridEvent($event)\"\n class=\"tw-h-full tw-w-full\">\n </cide-ele-data-grid>\n </div>\n\n <!-- Role Rights Form (Hidden but functional) -->\n <div [formGroup]=\"roleRightsForm\" class=\"tw-hidden\">\n <div formArrayName=\"roleRights\">\n @for (right of roleRightsArray.controls; track $index; let i = $index) {\n <div [formGroupName]=\"i\">\n <cide-ele-select formControlName=\"syusrgt_menu_id_syme\">\n <option value=\"\">Select Menu</option>\n @for (menu of menus(); track menu._id) {\n <option [value]=\"menu._id\">{{ menu.syme_title }}</option>\n }\n </cide-ele-select>\n <cide-ele-select formControlName=\"syusrgt_role_permissions_id_sygms\">\n <option value=\"\">Select Permission</option>\n @for (permission of permissions(); track permission._id) {\n <option [value]=\"permission._id\">{{ permission.sygms_name }}</option>\n }\n </cide-ele-select>\n <cide-ele-input formControlName=\"syusrgt_isactive\" type=\"checkbox\"></cide-ele-input>\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-flex tw-justify-between tw-items-center tw-p-3 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 <!-- Error Message (Left Side) -->\n <cide-form-field-error [formGroup]=\"userRoleForm\"></cide-form-field-error>\n \n <!-- Action Buttons (Right Side) -->\n <div class=\"tw-flex tw-gap-4\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"onCancel()\" leftIcon=\"arrow_back\"\n [disabled]=\"loading()\">\n {{ isViewMode() ? 'Close' : 'Cancel' }}\n </button>\n\n @if (!isViewMode()) {\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || !isFormReadyToSave\"\n [loading]=\"loading()\" leftIcon=\"save\">\n {{ submitButtonText }}\n </button>\n }\n </div>\n </div>\n </form>\n</div>\n\n<!-- Template Renderers for Role Rights Grid -->\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-flex tw-items-center tw-gap-2\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.syme_title\">\n {{ row.syme_title || row.menu?.syme_title || row.menu?.syme_menu_name || 'Untitled' }}\n </div>\n <!-- Green pill indicator for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-whitespace-nowrap\">\n Assigned\n </span>\n }\n }\n </div>\n @if (row.permission?.sygms_name) {\n <div class=\"tw-text-xs tw-text-blue-500 tw-truncate\" \n [title]=\"row.permission?.sygms_name\">\n {{ row.permission?.sygms_name }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n\n<!-- Permissions Checkbox Renderer Template -->\n<ng-template #permissionsCheckboxRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row.syme_type === 'menu' && row?.syme_permissions_id_sygms && row?.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row?.syme_permissions_id_sygms || []; track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <cide-ele-input \n type=\"checkbox\"\n [label]=\"getPermissionById(permissionId)?.sygms_name || 'Unknown'\"\n [ngModel]=\"isPermissionSelected(row._id, permissionId)\"\n (ngModelChange)=\"onPermissionCheckboxChange(row._id, permissionId, $event)\"\n size=\"xs\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n }\n } @else {\n <!-- Show green checkmark for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section' || row.syme_type === 'title') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-bg-green-100 tw-rounded-full\" \n [title]=\"hasParentViewRight(row._id) ? 'View right automatically enabled' : 'Child permissions assigned'\">\n <cide-ele-icon \n class=\"tw-text-green-600\" \n size=\"xs\">\n check\n </cide-ele-icon>\n </div>\n } @else if (hasParentViewRight(row._id)) {\n <!-- Show green checkmark for parent with view right -->\n <cide-ele-icon \n class=\"tw-text-green-600\" \n size=\"xs\"\n title=\"View right automatically enabled\">\n check\n </cide-ele-icon>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n }\n </div>\n</ng-template>", styles: [":host{@apply tw-w-full tw-h-full tw-flex tw-flex-col;}\n"], 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.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { 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", "step", "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", "treeView"], 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: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
21903
|
+
// ============================================
|
|
21904
|
+
// Copy Role Feature Methods
|
|
21905
|
+
// ============================================
|
|
21906
|
+
/**
|
|
21907
|
+
* Open copy role drawer using floating container service
|
|
21908
|
+
*/
|
|
21909
|
+
openCopyRoleDialog() {
|
|
21910
|
+
console.log('📋 Opening copy role drawer');
|
|
21911
|
+
// Register the copy role drawer component if not already registered
|
|
21912
|
+
if (!this.floatingContainerService.isComponentRegistered('copy-role-drawer')) {
|
|
21913
|
+
this.floatingContainerService.registerComponent('copy-role-drawer', CopyRoleDrawerComponent);
|
|
21914
|
+
}
|
|
21915
|
+
// Show the floating container with the drawer component
|
|
21916
|
+
const containerId = this.floatingContainerService.show({
|
|
21917
|
+
id: 'copy-role-drawer',
|
|
21918
|
+
title: 'Copy Role from Entity',
|
|
21919
|
+
componentId: 'copy-role-drawer',
|
|
21920
|
+
width: '500px',
|
|
21921
|
+
height: 'auto',
|
|
21922
|
+
maxHeight: '80vh',
|
|
21923
|
+
resizable: false,
|
|
21924
|
+
draggable: true,
|
|
21925
|
+
closable: true,
|
|
21926
|
+
componentConfig: {
|
|
21927
|
+
inputs: {},
|
|
21928
|
+
outputs: {
|
|
21929
|
+
roleSelect: (event) => {
|
|
21930
|
+
// Extract role data from event (handles both direct value and event object)
|
|
21931
|
+
const roleData = typeof event === 'object' && event !== null
|
|
21932
|
+
? (event.value || event)
|
|
21933
|
+
: event;
|
|
21934
|
+
this.onRoleSelected(roleData);
|
|
21935
|
+
},
|
|
21936
|
+
cancel: (event) => {
|
|
21937
|
+
this.floatingContainerService.hide('copy-role-drawer');
|
|
21938
|
+
}
|
|
21939
|
+
}
|
|
21940
|
+
}
|
|
21941
|
+
});
|
|
21942
|
+
console.log('✅ Copy role drawer shown with ID:', containerId);
|
|
21943
|
+
}
|
|
21944
|
+
/**
|
|
21945
|
+
* Handle role selection from drawer
|
|
21946
|
+
*/
|
|
21947
|
+
onRoleSelected(roleData) {
|
|
21948
|
+
console.log('📋 Role selected for copy:', roleData);
|
|
21949
|
+
// Check if form has unsaved changes
|
|
21950
|
+
if (this.userRoleForm.dirty) {
|
|
21951
|
+
this.confirmationService.ask({
|
|
21952
|
+
title: 'Overwrite Current Data',
|
|
21953
|
+
message: 'This will overwrite any unsaved changes in the current form. Are you sure you want to continue?',
|
|
21954
|
+
confirmText: 'Continue',
|
|
21955
|
+
cancelText: 'Cancel',
|
|
21956
|
+
type: 'warning'
|
|
21957
|
+
}).then((confirmed) => {
|
|
21958
|
+
if (confirmed) {
|
|
21959
|
+
this.performRoleCopy(roleData);
|
|
21960
|
+
}
|
|
21961
|
+
});
|
|
21962
|
+
}
|
|
21963
|
+
else {
|
|
21964
|
+
this.performRoleCopy(roleData);
|
|
21965
|
+
}
|
|
21966
|
+
}
|
|
21967
|
+
/**
|
|
21968
|
+
* Perform the actual role copy operation
|
|
21969
|
+
*/
|
|
21970
|
+
performRoleCopy(previewData) {
|
|
21971
|
+
console.log('📋 Applying role copy:', previewData);
|
|
21972
|
+
const roleData = previewData.core_user_role;
|
|
21973
|
+
const currentEntityId = this.appState.activeEntity()?._id;
|
|
21974
|
+
// Populate main form with copied data (append " - Copy" to name)
|
|
21975
|
+
this.userRoleForm.patchValue({
|
|
21976
|
+
syusrol_role_name: `${roleData.syusrol_role_name} - Copy`,
|
|
21977
|
+
syusrol_role_description: roleData.syusrol_role_description,
|
|
21978
|
+
syusrol_role_entity_id_syen: currentEntityId, // Keep current entity
|
|
21979
|
+
syusrol_isactive: roleData.syusrol_isactive
|
|
21980
|
+
});
|
|
21981
|
+
// Clear existing rights
|
|
21982
|
+
const rightsArray = this.roleRightsForm.get('roleRights');
|
|
21983
|
+
rightsArray.clear();
|
|
21984
|
+
// Copy role rights
|
|
21985
|
+
if (previewData.core_user_role_rights && previewData.core_user_role_rights.length > 0) {
|
|
21986
|
+
const copiedRights = previewData.core_user_role_rights.map(right => ({
|
|
21987
|
+
syusrgt_menu_id_syme: typeof right.syusrgt_menu_id_syme === 'object'
|
|
21988
|
+
? right.syusrgt_menu_id_syme?._id
|
|
21989
|
+
: right.syusrgt_menu_id_syme,
|
|
21990
|
+
syusrgt_role_permissions_id_sygms: typeof right.syusrgt_role_permissions_id_sygms === 'object'
|
|
21991
|
+
? right.syusrgt_role_permissions_id_sygms?._id
|
|
21992
|
+
: right.syusrgt_role_permissions_id_sygms,
|
|
21993
|
+
syusrgt_isactive: right.syusrgt_isactive
|
|
21994
|
+
}));
|
|
21995
|
+
// Add each copied right to the form
|
|
21996
|
+
copiedRights.forEach(right => {
|
|
21997
|
+
rightsArray.push(this.createRoleRightFormGroup(right));
|
|
21998
|
+
});
|
|
21999
|
+
console.log('✅ Copied', copiedRights.length, 'role rights');
|
|
22000
|
+
}
|
|
22001
|
+
// Mark form as dirty to enable save
|
|
22002
|
+
this.userRoleForm.markAsDirty();
|
|
22003
|
+
this.roleRightsForm.markAsDirty();
|
|
22004
|
+
// Show success notification
|
|
22005
|
+
this.notificationService.success(`Role "${roleData.syusrol_role_name}" copied successfully. You can now modify and save.`);
|
|
22006
|
+
// Trigger change detection
|
|
22007
|
+
this.cdr.detectChanges();
|
|
22008
|
+
}
|
|
22009
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserRoleFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
22010
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideCoreUserRoleFormComponent, isStandalone: true, selector: "cide-core-user-role-form", viewQueries: [{ propertyName: "menuDetailsRendererTemplate", first: true, predicate: ["menuDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "permissionsCheckboxRendererTemplate", first: true, predicate: ["permissionsCheckboxRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- User Role Form Container -->\n<div class=\"tw-w-full tw-h-full\">\n <form class=\"tw-max-w-7xl tw-mx-auto tw-bg-transparent tw-h-full tw-flex tw-flex-col\" [formGroup]=\"userRoleForm\" [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mb-6 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 <!-- User Role Basic Information Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-0 tw-p-3\">\n\n <!-- Copy Role Button (only in create mode) -->\n @if (!isEditMode() && !isViewMode()) {\n <div class=\"tw-mb-4\">\n <button \n cideEleButton \n type=\"button\"\n variant=\"secondary\" \n leftIcon=\"content_copy\"\n (click)=\"openCopyRoleDialog()\">\n Copy from Existing Role\n </button>\n </div>\n }\n\n <!-- Basic Fields -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-2 lg:tw-grid-cols-2 md:tw-grid-cols-1 tw-gap-6 tw-mb-0\">\n <!-- Left Column: Role Name -->\n <div>\n <cide-ele-input \n id=\"syusrol_role_name\" \n label=\"Role Name\" \n formControlName=\"syusrol_role_name\"\n placeholder=\"Enter role name\" \n [maxlength]=\"50\" \n size=\"md\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n\n <!-- Right Column: Description -->\n <div>\n <cide-ele-textarea \n id=\"syusrol_role_description\" \n label=\"Description\" \n formControlName=\"syusrol_role_description\"\n placeholder=\"Enter role description\" \n rows=\"3\"\n [maxlength]=\"200\"\n [disabled]=\"isViewMode()\">\n </cide-ele-textarea>\n </div>\n </div>\n\n <!-- Active Status Row -->\n <div class=\"tw-mb-0\">\n <cide-ele-input \n id=\"syusrol_isactive\" \n label=\"Active Status\" \n formControlName=\"syusrol_isactive\"\n type=\"checkbox\" \n size=\"md\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n </div>\n\n <!-- Role Rights Section -->\n <div class=\"tw-pt-2 tw-border-b-0 tw-mb-0 tw-flex-1 tw-flex tw-flex-col tw-min-h-0\">\n\n <!-- Role Rights Grid -->\n <div class=\"tw-flex-1 tw-min-h-0 tw-w-full\" style=\"height: 400px; max-height: 900px;\">\n <cide-ele-data-grid \n [config]=\"roleRightsGridConfig()\" \n [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onRoleRightsGridEvent($event)\"\n class=\"tw-h-full tw-w-full\">\n </cide-ele-data-grid>\n </div>\n\n <!-- Role Rights Form (Hidden but functional) -->\n <div [formGroup]=\"roleRightsForm\" class=\"tw-hidden\">\n <div formArrayName=\"roleRights\">\n @for (right of roleRightsArray.controls; track $index; let i = $index) {\n <div [formGroupName]=\"i\">\n <cide-ele-select formControlName=\"syusrgt_menu_id_syme\">\n <option value=\"\">Select Menu</option>\n @for (menu of menus(); track menu._id) {\n <option [value]=\"menu._id\">{{ menu.syme_title }}</option>\n }\n </cide-ele-select>\n <cide-ele-select formControlName=\"syusrgt_role_permissions_id_sygms\">\n <option value=\"\">Select Permission</option>\n @for (permission of permissions(); track permission._id) {\n <option [value]=\"permission._id\">{{ permission.sygms_name }}</option>\n }\n </cide-ele-select>\n <cide-ele-input formControlName=\"syusrgt_isactive\" type=\"checkbox\"></cide-ele-input>\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-flex tw-justify-between tw-items-center tw-p-3 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 <!-- Error Message (Left Side) -->\n <cide-form-field-error [formGroup]=\"userRoleForm\"></cide-form-field-error>\n \n <!-- Action Buttons (Right Side) -->\n <div class=\"tw-flex tw-gap-4\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"onCancel()\" leftIcon=\"arrow_back\"\n [disabled]=\"loading()\">\n {{ isViewMode() ? 'Close' : 'Cancel' }}\n </button>\n\n @if (!isViewMode()) {\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || !isFormReadyToSave\"\n [loading]=\"loading()\" leftIcon=\"save\">\n {{ submitButtonText }}\n </button>\n }\n </div>\n </div>\n </form>\n</div>\n\n<!-- Template Renderers for Role Rights Grid -->\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-flex tw-items-center tw-gap-2\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.syme_title\">\n {{ row.syme_title || row.menu?.syme_title || row.menu?.syme_menu_name || 'Untitled' }}\n </div>\n <!-- Green pill indicator for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-whitespace-nowrap\">\n Assigned\n </span>\n }\n }\n </div>\n @if (row.permission?.sygms_name) {\n <div class=\"tw-text-xs tw-text-blue-500 tw-truncate\" \n [title]=\"row.permission?.sygms_name\">\n {{ row.permission?.sygms_name }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n\n<!-- Permissions Checkbox Renderer Template -->\n<ng-template #permissionsCheckboxRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row.syme_type === 'menu' && row?.syme_permissions_id_sygms && row?.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row?.syme_permissions_id_sygms || []; track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <cide-ele-input \n type=\"checkbox\"\n [label]=\"getPermissionById(permissionId)?.sygms_name || 'Unknown'\"\n [ngModel]=\"isPermissionSelected(row._id, permissionId)\"\n (ngModelChange)=\"onPermissionCheckboxChange(row._id, permissionId, $event)\"\n size=\"xs\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n }\n } @else {\n <!-- Show green checkmark for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section' || row.syme_type === 'title') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-bg-green-100 tw-rounded-full\" \n [title]=\"hasParentViewRight(row._id) ? 'View right automatically enabled' : 'Child permissions assigned'\">\n <cide-ele-icon \n class=\"tw-text-green-600\" \n size=\"xs\">\n check\n </cide-ele-icon>\n </div>\n } @else if (hasParentViewRight(row._id)) {\n <!-- Show green checkmark for parent with view right -->\n <cide-ele-icon \n class=\"tw-text-green-600\" \n size=\"xs\"\n title=\"View right automatically enabled\">\n check\n </cide-ele-icon>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n }\n </div>\n</ng-template>", styles: [":host{@apply tw-w-full tw-h-full tw-flex tw-flex-col;}\n"], 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.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", 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: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { 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", "step", "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", "treeView"], 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: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
20956
22011
|
}
|
|
20957
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
22012
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreUserRoleFormComponent, decorators: [{
|
|
20958
22013
|
type: Component,
|
|
20959
22014
|
args: [{ selector: 'cide-core-user-role-form', standalone: true, imports: [
|
|
20960
22015
|
CommonModule,
|
|
@@ -20967,8 +22022,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
20967
22022
|
CideTextareaComponent,
|
|
20968
22023
|
CideEleDataGridComponent,
|
|
20969
22024
|
CideFormFieldErrorComponent
|
|
20970
|
-
], template: "<!-- User Role Form Container -->\n<div class=\"tw-w-full tw-h-full\">\n <form class=\"tw-max-w-7xl tw-mx-auto tw-bg-transparent tw-h-full tw-flex tw-flex-col\" [formGroup]=\"userRoleForm\" [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mb-6 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 <!-- User Role Basic Information Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-0 tw-p-3\">\n\n <!-- Basic Fields -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-2 lg:tw-grid-cols-2 md:tw-grid-cols-1 tw-gap-6 tw-mb-0\">\n <!-- Left Column: Role Name -->\n <div>\n <cide-ele-input \n id=\"syusrol_role_name\" \n label=\"Role Name\" \n formControlName=\"syusrol_role_name\"\n placeholder=\"Enter role name\" \n [maxlength]=\"50\" \n size=\"md\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n\n <!-- Right Column: Description -->\n <div>\n <cide-ele-textarea \n id=\"syusrol_role_description\" \n label=\"Description\" \n formControlName=\"syusrol_role_description\"\n placeholder=\"Enter role description\" \n rows=\"3\"\n [maxlength]=\"200\"\n [disabled]=\"isViewMode()\">\n </cide-ele-textarea>\n </div>\n </div>\n\n <!-- Active Status Row -->\n <div class=\"tw-mb-0\">\n <cide-ele-input \n id=\"syusrol_isactive\" \n label=\"Active Status\" \n formControlName=\"syusrol_isactive\"\n type=\"checkbox\" \n size=\"md\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n </div>\n\n <!-- Role Rights Section -->\n <div class=\"tw-pt-2 tw-border-b-0 tw-mb-0 tw-flex-1 tw-flex tw-flex-col tw-min-h-0\">\n\n <!-- Role Rights Grid -->\n <div class=\"tw-flex-1 tw-min-h-0 tw-w-full\" style=\"height: 400px; max-height: 900px;\">\n <cide-ele-data-grid \n [config]=\"roleRightsGridConfig()\" \n [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onRoleRightsGridEvent($event)\"\n class=\"tw-h-full tw-w-full\">\n </cide-ele-data-grid>\n </div>\n\n <!-- Role Rights Form (Hidden but functional) -->\n <div [formGroup]=\"roleRightsForm\" class=\"tw-hidden\">\n <div formArrayName=\"roleRights\">\n @for (right of roleRightsArray.controls; track $index; let i = $index) {\n <div [formGroupName]=\"i\">\n <cide-ele-select formControlName=\"syusrgt_menu_id_syme\">\n <option value=\"\">Select Menu</option>\n @for (menu of menus(); track menu._id) {\n <option [value]=\"menu._id\">{{ menu.syme_title }}</option>\n }\n </cide-ele-select>\n <cide-ele-select formControlName=\"syusrgt_role_permissions_id_sygms\">\n <option value=\"\">Select Permission</option>\n @for (permission of permissions(); track permission._id) {\n <option [value]=\"permission._id\">{{ permission.sygms_name }}</option>\n }\n </cide-ele-select>\n <cide-ele-input formControlName=\"syusrgt_isactive\" type=\"checkbox\"></cide-ele-input>\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-flex tw-justify-between tw-items-center tw-p-3 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 <!-- Error Message (Left Side) -->\n <cide-form-field-error [formGroup]=\"userRoleForm\"></cide-form-field-error>\n \n <!-- Action Buttons (Right Side) -->\n <div class=\"tw-flex tw-gap-4\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"onCancel()\" leftIcon=\"arrow_back\"\n [disabled]=\"loading()\">\n {{ isViewMode() ? 'Close' : 'Cancel' }}\n </button>\n\n @if (!isViewMode()) {\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || !isFormReadyToSave\"\n [loading]=\"loading()\" leftIcon=\"save\">\n {{ submitButtonText }}\n </button>\n }\n </div>\n </div>\n </form>\n</div>\n\n<!-- Template Renderers for Role Rights Grid -->\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-flex tw-items-center tw-gap-2\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.syme_title\">\n {{ row.syme_title || row.menu?.syme_title || row.menu?.syme_menu_name || 'Untitled' }}\n </div>\n <!-- Green pill indicator for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-whitespace-nowrap\">\n Assigned\n </span>\n }\n }\n </div>\n @if (row.permission?.sygms_name) {\n <div class=\"tw-text-xs tw-text-blue-500 tw-truncate\" \n [title]=\"row.permission?.sygms_name\">\n {{ row.permission?.sygms_name }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n\n<!-- Permissions Checkbox Renderer Template -->\n<ng-template #permissionsCheckboxRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row.syme_type === 'menu' && row?.syme_permissions_id_sygms && row?.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row?.syme_permissions_id_sygms || []; track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <cide-ele-input \n type=\"checkbox\"\n [label]=\"getPermissionById(permissionId)?.sygms_name || 'Unknown'\"\n [ngModel]=\"isPermissionSelected(row._id, permissionId)\"\n (ngModelChange)=\"onPermissionCheckboxChange(row._id, permissionId, $event)\"\n size=\"xs\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n }\n } @else {\n <!-- Show green checkmark for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section' || row.syme_type === 'title') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-bg-green-100 tw-rounded-full\" \n [title]=\"hasParentViewRight(row._id) ? 'View right automatically enabled' : 'Child permissions assigned'\">\n <cide-ele-icon \n class=\"tw-text-green-600\" \n size=\"xs\">\n check\n </cide-ele-icon>\n </div>\n } @else if (hasParentViewRight(row._id)) {\n <!-- Show green checkmark for parent with view right -->\n <cide-ele-icon \n class=\"tw-text-green-600\" \n size=\"xs\"\n title=\"View right automatically enabled\">\n check\n </cide-ele-icon>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n }\n </div>\n</ng-template>", styles: [":host{@apply tw-w-full tw-h-full tw-flex tw-flex-col;}\n"] }]
|
|
20971
|
-
}] });
|
|
22025
|
+
], template: "<!-- User Role Form Container -->\n<div class=\"tw-w-full tw-h-full\">\n <form class=\"tw-max-w-7xl tw-mx-auto tw-bg-transparent tw-h-full tw-flex tw-flex-col\" [formGroup]=\"userRoleForm\" [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mb-6 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 <!-- User Role Basic Information Section -->\n <div class=\"tw-py-2 tw-border-b-0 tw-mb-0 tw-p-3\">\n\n <!-- Copy Role Button (only in create mode) -->\n @if (!isEditMode() && !isViewMode()) {\n <div class=\"tw-mb-4\">\n <button \n cideEleButton \n type=\"button\"\n variant=\"secondary\" \n leftIcon=\"content_copy\"\n (click)=\"openCopyRoleDialog()\">\n Copy from Existing Role\n </button>\n </div>\n }\n\n <!-- Basic Fields -->\n <div class=\"tw-grid tw-grid-cols-1 xl:tw-grid-cols-2 lg:tw-grid-cols-2 md:tw-grid-cols-1 tw-gap-6 tw-mb-0\">\n <!-- Left Column: Role Name -->\n <div>\n <cide-ele-input \n id=\"syusrol_role_name\" \n label=\"Role Name\" \n formControlName=\"syusrol_role_name\"\n placeholder=\"Enter role name\" \n [maxlength]=\"50\" \n size=\"md\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n\n <!-- Right Column: Description -->\n <div>\n <cide-ele-textarea \n id=\"syusrol_role_description\" \n label=\"Description\" \n formControlName=\"syusrol_role_description\"\n placeholder=\"Enter role description\" \n rows=\"3\"\n [maxlength]=\"200\"\n [disabled]=\"isViewMode()\">\n </cide-ele-textarea>\n </div>\n </div>\n\n <!-- Active Status Row -->\n <div class=\"tw-mb-0\">\n <cide-ele-input \n id=\"syusrol_isactive\" \n label=\"Active Status\" \n formControlName=\"syusrol_isactive\"\n type=\"checkbox\" \n size=\"md\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n </div>\n\n <!-- Role Rights Section -->\n <div class=\"tw-pt-2 tw-border-b-0 tw-mb-0 tw-flex-1 tw-flex tw-flex-col tw-min-h-0\">\n\n <!-- Role Rights Grid -->\n <div class=\"tw-flex-1 tw-min-h-0 tw-w-full\" style=\"height: 400px; max-height: 900px;\">\n <cide-ele-data-grid \n [config]=\"roleRightsGridConfig()\" \n [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onRoleRightsGridEvent($event)\"\n class=\"tw-h-full tw-w-full\">\n </cide-ele-data-grid>\n </div>\n\n <!-- Role Rights Form (Hidden but functional) -->\n <div [formGroup]=\"roleRightsForm\" class=\"tw-hidden\">\n <div formArrayName=\"roleRights\">\n @for (right of roleRightsArray.controls; track $index; let i = $index) {\n <div [formGroupName]=\"i\">\n <cide-ele-select formControlName=\"syusrgt_menu_id_syme\">\n <option value=\"\">Select Menu</option>\n @for (menu of menus(); track menu._id) {\n <option [value]=\"menu._id\">{{ menu.syme_title }}</option>\n }\n </cide-ele-select>\n <cide-ele-select formControlName=\"syusrgt_role_permissions_id_sygms\">\n <option value=\"\">Select Permission</option>\n @for (permission of permissions(); track permission._id) {\n <option [value]=\"permission._id\">{{ permission.sygms_name }}</option>\n }\n </cide-ele-select>\n <cide-ele-input formControlName=\"syusrgt_isactive\" type=\"checkbox\"></cide-ele-input>\n </div>\n }\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-flex tw-justify-between tw-items-center tw-p-3 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 <!-- Error Message (Left Side) -->\n <cide-form-field-error [formGroup]=\"userRoleForm\"></cide-form-field-error>\n \n <!-- Action Buttons (Right Side) -->\n <div class=\"tw-flex tw-gap-4\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"onCancel()\" leftIcon=\"arrow_back\"\n [disabled]=\"loading()\">\n {{ isViewMode() ? 'Close' : 'Cancel' }}\n </button>\n\n @if (!isViewMode()) {\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || !isFormReadyToSave\"\n [loading]=\"loading()\" leftIcon=\"save\">\n {{ submitButtonText }}\n </button>\n }\n </div>\n </div>\n </form>\n</div>\n\n<!-- Template Renderers for Role Rights Grid -->\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-flex tw-items-center tw-gap-2\">\n <div class=\"tw-text-xs tw-font-medium tw-text-gray-900 tw-truncate\" \n [title]=\"row.syme_title\">\n {{ row.syme_title || row.menu?.syme_title || row.menu?.syme_menu_name || 'Untitled' }}\n </div>\n <!-- Green pill indicator for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800 tw-whitespace-nowrap\">\n Assigned\n </span>\n }\n }\n </div>\n @if (row.permission?.sygms_name) {\n <div class=\"tw-text-xs tw-text-blue-500 tw-truncate\" \n [title]=\"row.permission?.sygms_name\">\n {{ row.permission?.sygms_name }}\n </div>\n }\n </div>\n </div>\n</ng-template>\n\n\n<!-- Permissions Checkbox Renderer Template -->\n<ng-template #permissionsCheckboxRendererTemplate let-row=\"row\" let-value=\"value\">\n <div class=\"tw-flex tw-flex-wrap tw-gap-2 tw-max-w-full\">\n @if (row.syme_type === 'menu' && row?.syme_permissions_id_sygms && row?.syme_permissions_id_sygms.length > 0) {\n @for (permissionId of row?.syme_permissions_id_sygms || []; track permissionId) {\n <div class=\"tw-flex tw-items-center tw-space-x-1\">\n <cide-ele-input \n type=\"checkbox\"\n [label]=\"getPermissionById(permissionId)?.sygms_name || 'Unknown'\"\n [ngModel]=\"isPermissionSelected(row._id, permissionId)\"\n (ngModelChange)=\"onPermissionCheckboxChange(row._id, permissionId, $event)\"\n size=\"xs\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n }\n } @else {\n <!-- Show green checkmark for parent menus with child permissions -->\n @if (row.syme_type === 'module' || row.syme_type === 'section' || row.syme_type === 'title') {\n @if (hasChildMenusWithPermissions(row._id)) {\n <div class=\"tw-flex tw-items-center tw-justify-center tw-w-6 tw-h-6 tw-bg-green-100 tw-rounded-full\" \n [title]=\"hasParentViewRight(row._id) ? 'View right automatically enabled' : 'Child permissions assigned'\">\n <cide-ele-icon \n class=\"tw-text-green-600\" \n size=\"xs\">\n check\n </cide-ele-icon>\n </div>\n } @else if (hasParentViewRight(row._id)) {\n <!-- Show green checkmark for parent with view right -->\n <cide-ele-icon \n class=\"tw-text-green-600\" \n size=\"xs\"\n title=\"View right automatically enabled\">\n check\n </cide-ele-icon>\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n } @else {\n <span class=\"tw-text-xs tw-text-gray-400\">N/A</span>\n }\n }\n </div>\n</ng-template>", styles: [":host{@apply tw-w-full tw-h-full tw-flex tw-flex-col;}\n"] }]
|
|
22026
|
+
}], propDecorators: { menuDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['menuDetailsRendererTemplate', { isSignal: true }] }], permissionsCheckboxRendererTemplate: [{ type: i0.ViewChild, args: ['permissionsCheckboxRendererTemplate', { isSignal: true }] }] } });
|
|
20972
22027
|
|
|
20973
22028
|
var userRoleForm_component = /*#__PURE__*/Object.freeze({
|
|
20974
22029
|
__proto__: null,
|
|
@@ -21032,10 +22087,10 @@ class CideCoreNationalityService {
|
|
|
21032
22087
|
};
|
|
21033
22088
|
return this.getAllNationalities(payload);
|
|
21034
22089
|
}
|
|
21035
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
21036
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
22090
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreNationalityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
22091
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreNationalityService, providedIn: 'root' });
|
|
21037
22092
|
}
|
|
21038
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
22093
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreNationalityService, decorators: [{
|
|
21039
22094
|
type: Injectable,
|
|
21040
22095
|
args: [{
|
|
21041
22096
|
providedIn: 'root'
|
|
@@ -21084,10 +22139,10 @@ class CideCoreClassProgramMasterService {
|
|
|
21084
22139
|
pagination: false
|
|
21085
22140
|
});
|
|
21086
22141
|
}
|
|
21087
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
21088
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
22142
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreClassProgramMasterService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
22143
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreClassProgramMasterService, providedIn: 'root' });
|
|
21089
22144
|
}
|
|
21090
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
22145
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreClassProgramMasterService, decorators: [{
|
|
21091
22146
|
type: Injectable,
|
|
21092
22147
|
args: [{
|
|
21093
22148
|
providedIn: 'root'
|