cloud-ide-core 2.0.151 → 2.0.153
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.mjs +116 -82
- package/fesm2022/cloud-ide-core.mjs.map +1 -1
- package/index.d.ts +13 -5
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ import { coreRoutesUrl, generateStringFromObject, cidePath, hostManagerRoutesUrl
|
|
|
13
13
|
import * as i1 from '@angular/common/http';
|
|
14
14
|
import { HttpClient } from '@angular/common/http';
|
|
15
15
|
import { NotificationService, CideEleDataGridComponent, CideEleButtonComponent, CideInputComponent, CideSelectComponent, CideTextareaComponent, CideIconComponent, CideEleDropdownComponent, ConfirmationService, CideEleGlobalNotificationsComponent, CideEleConfirmationModalComponent, CideEleJsonEditorComponent, CideEleFileInputComponent, CideEleFileImageDirective, CideFormFieldErrorComponent, CideEleFileManagerService, CideEleTabComponent, CideEleFloatingContainerService, CideEleFloatingFeaturesService, CideEleToastNotificationComponent, CideEleCardComponent } from 'cloud-ide-element';
|
|
16
|
-
import { RightsService, CideLytSharedWrapperComponent, AppStateHelperService, CideLytFloatingEntityRightsSharingService, CideLytSharedService } from 'cloud-ide-layout';
|
|
16
|
+
import { RightsService, CideLytSharedWrapperComponent, AppStateHelperService, CideLytRequestService, CideLytFloatingEntityRightsSharingService, CideLytSharedService } from 'cloud-ide-layout';
|
|
17
17
|
|
|
18
18
|
const coreRoutes = [
|
|
19
19
|
{
|
|
@@ -9018,14 +9018,19 @@ class CideCoreGeneralMasterComponent {
|
|
|
9018
9018
|
});
|
|
9019
9019
|
// Computed values
|
|
9020
9020
|
isFormDirty = computed(() => this.masterForm.dirty, ...(ngDevMode ? [{ debugName: "isFormDirty" }] : []));
|
|
9021
|
+
// Permissions signals based on rights
|
|
9022
|
+
canCreate = computed(() => this.rightsService.hasRight('CREATE'), ...(ngDevMode ? [{ debugName: "canCreate" }] : []));
|
|
9023
|
+
canEdit = computed(() => this.rightsService.hasRight('EDIT'), ...(ngDevMode ? [{ debugName: "canEdit" }] : []));
|
|
9024
|
+
canDelete = computed(() => this.rightsService.hasRight('DELETE'), ...(ngDevMode ? [{ debugName: "canDelete" }] : []));
|
|
9025
|
+
canToggleStatus = computed(() => this.rightsService.hasRight('TOGGLE_STATUS'), ...(ngDevMode ? [{ debugName: "canToggleStatus" }] : []));
|
|
9026
|
+
canResetToParent = computed(() => this.rightsService.hasRight('RESET_TO_PARENT') || this.rightsService.hasRight('DELETE'), ...(ngDevMode ? [{ debugName: "canResetToParent" }] : [])); // Often shared or fallback
|
|
9027
|
+
// Overall can perform any action
|
|
9028
|
+
canPerformActions = computed(() => this.canEdit() || this.canDelete() || this.canToggleStatus() || this.canResetToParent(), ...(ngDevMode ? [{ debugName: "canPerformActions" }] : []));
|
|
9021
9029
|
// Parent master options for dropdown
|
|
9022
9030
|
parentMasterOptions = signal([], ...(ngDevMode ? [{ debugName: "parentMasterOptions" }] : []));
|
|
9023
|
-
// Grid configuration signal
|
|
9024
|
-
gridConfig =
|
|
9025
|
-
|
|
9026
|
-
title: '',
|
|
9027
|
-
subtitle: '',
|
|
9028
|
-
columns: [
|
|
9031
|
+
// Grid configuration computed signal
|
|
9032
|
+
gridConfig = computed(() => {
|
|
9033
|
+
const columns = [
|
|
9029
9034
|
{
|
|
9030
9035
|
key: 'details',
|
|
9031
9036
|
header: 'Master Details',
|
|
@@ -9051,8 +9056,11 @@ class CideCoreGeneralMasterComponent {
|
|
|
9051
9056
|
truncate: false,
|
|
9052
9057
|
align: 'center',
|
|
9053
9058
|
renderer: 'masterStatusRenderer'
|
|
9054
|
-
}
|
|
9055
|
-
|
|
9059
|
+
}
|
|
9060
|
+
];
|
|
9061
|
+
// Conditionally add actions column if user has any action rights
|
|
9062
|
+
if (this.canPerformActions()) {
|
|
9063
|
+
columns.push({
|
|
9056
9064
|
key: 'actions',
|
|
9057
9065
|
header: '',
|
|
9058
9066
|
type: 'custom',
|
|
@@ -9060,52 +9068,58 @@ class CideCoreGeneralMasterComponent {
|
|
|
9060
9068
|
truncate: false,
|
|
9061
9069
|
align: 'center',
|
|
9062
9070
|
renderer: 'actionsDropdownRenderer'
|
|
9063
|
-
}
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9076
|
-
|
|
9077
|
-
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9092
|
-
|
|
9093
|
-
|
|
9094
|
-
|
|
9095
|
-
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9105
|
-
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9071
|
+
});
|
|
9072
|
+
}
|
|
9073
|
+
return {
|
|
9074
|
+
id: 'master-list-grid',
|
|
9075
|
+
title: '',
|
|
9076
|
+
subtitle: '',
|
|
9077
|
+
columns: columns,
|
|
9078
|
+
data: this.normalizedMasters(),
|
|
9079
|
+
trackBy: '_id',
|
|
9080
|
+
pagination: {
|
|
9081
|
+
enabled: true,
|
|
9082
|
+
pageSize: 10,
|
|
9083
|
+
pageSizeOptions: [10, 25, 50, 100],
|
|
9084
|
+
showQuickJump: true,
|
|
9085
|
+
showPageInfo: true,
|
|
9086
|
+
showRefresh: true
|
|
9087
|
+
},
|
|
9088
|
+
search: {
|
|
9089
|
+
enabled: true,
|
|
9090
|
+
placeholder: 'Search masters...',
|
|
9091
|
+
searchableColumns: ['sygms_title', 'sygms_desc', 'sygms_code'],
|
|
9092
|
+
debounceMs: 300
|
|
9093
|
+
},
|
|
9094
|
+
loading: {
|
|
9095
|
+
useDefer: true,
|
|
9096
|
+
skeletonRows: 5,
|
|
9097
|
+
showOverlay: false
|
|
9098
|
+
},
|
|
9099
|
+
scroll: {
|
|
9100
|
+
enabled: true,
|
|
9101
|
+
maxHeight: undefined,
|
|
9102
|
+
minHeight: '',
|
|
9103
|
+
stickyHeader: true,
|
|
9104
|
+
virtualScroll: false,
|
|
9105
|
+
rowHeight: 50
|
|
9106
|
+
},
|
|
9107
|
+
fullHeight: true,
|
|
9108
|
+
tree: {
|
|
9109
|
+
enabled: true,
|
|
9110
|
+
primaryKey: '_id',
|
|
9111
|
+
foreignKey: 'sygms_id_sygms',
|
|
9112
|
+
childrenKey: 'children',
|
|
9113
|
+
levelKey: 'level',
|
|
9114
|
+
expandedKey: 'expanded',
|
|
9115
|
+
hasChildrenKey: 'hasChildren'
|
|
9116
|
+
},
|
|
9117
|
+
responsive: true,
|
|
9118
|
+
striped: false,
|
|
9119
|
+
bordered: true,
|
|
9120
|
+
compact: false,
|
|
9121
|
+
tableClass: 'tw-table-fixed tw-w-full tw-rounded-none'
|
|
9122
|
+
};
|
|
9109
9123
|
}, ...(ngDevMode ? [{ debugName: "gridConfig" }] : []));
|
|
9110
9124
|
// Action handlers for grid
|
|
9111
9125
|
actionHandlers = {
|
|
@@ -9126,6 +9140,7 @@ class CideCoreGeneralMasterComponent {
|
|
|
9126
9140
|
this.typeId.set(payload.sygmt_id || '');
|
|
9127
9141
|
this.typeTitle.set(payload.sygmt_title || '');
|
|
9128
9142
|
if (this.typeId()) {
|
|
9143
|
+
this.rightsService.initializeRights('core_general_master');
|
|
9129
9144
|
this.loadTypeDetails();
|
|
9130
9145
|
this.loadMasters();
|
|
9131
9146
|
this.loadParentMasterOptions();
|
|
@@ -9280,12 +9295,11 @@ class CideCoreGeneralMasterComponent {
|
|
|
9280
9295
|
/**
|
|
9281
9296
|
* Update grid data
|
|
9282
9297
|
*/
|
|
9298
|
+
normalizedMasters = computed(() => {
|
|
9299
|
+
return this.normalizeParentField(this.masters());
|
|
9300
|
+
}, ...(ngDevMode ? [{ debugName: "normalizedMasters" }] : []));
|
|
9283
9301
|
updateGridData() {
|
|
9284
|
-
|
|
9285
|
-
this.gridConfig.update(config => ({
|
|
9286
|
-
...config,
|
|
9287
|
-
data: normalizedMasters
|
|
9288
|
-
}));
|
|
9302
|
+
// gridConfig is now a computed signal based on normalizedMasters
|
|
9289
9303
|
}
|
|
9290
9304
|
// Computed template renderers for grid
|
|
9291
9305
|
templateRenderers = computed(() => ({
|
|
@@ -9667,34 +9681,39 @@ class CideCoreGeneralMasterComponent {
|
|
|
9667
9681
|
* Get dropdown items for actions
|
|
9668
9682
|
*/
|
|
9669
9683
|
getActionDropdownItems(master) {
|
|
9670
|
-
const items = [
|
|
9671
|
-
|
|
9684
|
+
const items = [];
|
|
9685
|
+
if (this.canEdit()) {
|
|
9686
|
+
items.push({
|
|
9672
9687
|
id: 'edit',
|
|
9673
9688
|
label: 'Edit',
|
|
9674
9689
|
icon: 'edit',
|
|
9675
9690
|
disabled: false
|
|
9676
|
-
}
|
|
9677
|
-
{
|
|
9691
|
+
});
|
|
9692
|
+
items.push({
|
|
9678
9693
|
id: 'copy',
|
|
9679
9694
|
label: 'Copy',
|
|
9680
9695
|
icon: 'content_copy',
|
|
9681
9696
|
disabled: false
|
|
9682
|
-
}
|
|
9683
|
-
|
|
9697
|
+
});
|
|
9698
|
+
}
|
|
9699
|
+
if (this.canCreate()) {
|
|
9700
|
+
items.push({
|
|
9684
9701
|
id: 'addChild',
|
|
9685
9702
|
label: 'Add Child',
|
|
9686
9703
|
icon: 'add',
|
|
9687
9704
|
disabled: false
|
|
9688
|
-
}
|
|
9689
|
-
|
|
9705
|
+
});
|
|
9706
|
+
}
|
|
9707
|
+
if (this.canToggleStatus()) {
|
|
9708
|
+
items.push({
|
|
9690
9709
|
id: 'toggle',
|
|
9691
9710
|
label: master.sygms_isactive ? 'Deactivate' : 'Activate',
|
|
9692
9711
|
icon: master.sygms_isactive ? 'block' : 'check_circle',
|
|
9693
9712
|
disabled: false
|
|
9694
|
-
}
|
|
9695
|
-
|
|
9713
|
+
});
|
|
9714
|
+
}
|
|
9696
9715
|
// Add reset to parent option if entity-specific
|
|
9697
|
-
if (master.sygms_entity_id_syen) {
|
|
9716
|
+
if (master.sygms_entity_id_syen && this.canResetToParent()) {
|
|
9698
9717
|
items.push({
|
|
9699
9718
|
id: 'reset',
|
|
9700
9719
|
label: 'Reset to Parent',
|
|
@@ -9702,12 +9721,14 @@ class CideCoreGeneralMasterComponent {
|
|
|
9702
9721
|
disabled: false
|
|
9703
9722
|
});
|
|
9704
9723
|
}
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9724
|
+
if (this.canDelete()) {
|
|
9725
|
+
items.push({
|
|
9726
|
+
id: 'delete',
|
|
9727
|
+
label: 'Delete',
|
|
9728
|
+
icon: 'delete',
|
|
9729
|
+
disabled: false
|
|
9730
|
+
});
|
|
9731
|
+
}
|
|
9711
9732
|
return items;
|
|
9712
9733
|
}
|
|
9713
9734
|
/**
|
|
@@ -9795,7 +9816,7 @@ class CideCoreGeneralMasterComponent {
|
|
|
9795
9816
|
document.dispatchEvent(event);
|
|
9796
9817
|
}
|
|
9797
9818
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9798
|
-
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"] }] });
|
|
9819
|
+
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 @if (canCreate() || (isEditMode() && 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 <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\n Master' }}</h6>\n @if (typeTitle()) {\n <p class=\"tw-text-xs tw-text-gray-500 tw-m-0 tw-mt-0.5\">Type: <span\n 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\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 <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 type=\"button\" (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 formControlName=\"sygms_code\" label=\"Master Code\" placeholder=\"Enter master code\" size=\"sm\"\n [required]=\"true\" [maxlength]=\"40\">\n </cide-ele-input>\n </div>\n\n <!-- Master Title -->\n <div class=\"lg:tw-col-span-3\">\n <cide-ele-input formControlName=\"sygms_title\" label=\"Master Title\" placeholder=\"Enter master title\"\n size=\"sm\" [required]=\"true\" [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 formControlName=\"sygms_isactive\" type=\"checkbox\" label=\"Active\" 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 formControlName=\"sygms_configuration\" label=\"Configuration\" 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 formControlName=\"sygms_desc\" label=\"Description\" placeholder=\"Enter description\"\n size=\"sm\" [maxlength]=\"500\" [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)=\"resetForm()\"\n [disabled]=\"loading()\" class=\"tw-px-4 tw-py-2\">\n Reset\n </button>\n @if (isEditMode()) {\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 }\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"submit\" (click)=\"saveMaster()\"\n [disabled]=\"!masterForm.valid || loading()\" 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'\n }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Save' }}\n </button>\n </div>\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-py-2 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-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\n 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\"\n 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 class=\"tw-h-full\" [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 #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\" [class.tw-text-green-800]=\"row.sygms_isactive\"\n [class.tw-bg-red-100]=\"!row.sygms_isactive\" [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 [items]=\"getActionDropdownItems(row)\" [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"] }] });
|
|
9799
9820
|
}
|
|
9800
9821
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideCoreGeneralMasterComponent, decorators: [{
|
|
9801
9822
|
type: Component,
|
|
@@ -9811,7 +9832,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
9811
9832
|
CideEleDropdownComponent,
|
|
9812
9833
|
CideEleJsonEditorComponent,
|
|
9813
9834
|
CideLytSharedWrapperComponent
|
|
9814
|
-
], 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
|
|
9835
|
+
], 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 @if (canCreate() || (isEditMode() && 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 <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\n Master' }}</h6>\n @if (typeTitle()) {\n <p class=\"tw-text-xs tw-text-gray-500 tw-m-0 tw-mt-0.5\">Type: <span\n 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\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 <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 type=\"button\" (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 formControlName=\"sygms_code\" label=\"Master Code\" placeholder=\"Enter master code\" size=\"sm\"\n [required]=\"true\" [maxlength]=\"40\">\n </cide-ele-input>\n </div>\n\n <!-- Master Title -->\n <div class=\"lg:tw-col-span-3\">\n <cide-ele-input formControlName=\"sygms_title\" label=\"Master Title\" placeholder=\"Enter master title\"\n size=\"sm\" [required]=\"true\" [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 formControlName=\"sygms_isactive\" type=\"checkbox\" label=\"Active\" 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 formControlName=\"sygms_configuration\" label=\"Configuration\" 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 formControlName=\"sygms_desc\" label=\"Description\" placeholder=\"Enter description\"\n size=\"sm\" [maxlength]=\"500\" [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)=\"resetForm()\"\n [disabled]=\"loading()\" class=\"tw-px-4 tw-py-2\">\n Reset\n </button>\n @if (isEditMode()) {\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 }\n <button cideEleButton variant=\"primary\" size=\"sm\" type=\"submit\" (click)=\"saveMaster()\"\n [disabled]=\"!masterForm.valid || loading()\" 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'\n }}</cide-ele-icon>\n {{ isEditMode() ? 'Update' : 'Save' }}\n </button>\n </div>\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-py-2 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-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\n 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\"\n 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 class=\"tw-h-full\" [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 #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\" [class.tw-text-green-800]=\"row.sygms_isactive\"\n [class.tw-bg-red-100]=\"!row.sygms_isactive\" [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 [items]=\"getActionDropdownItems(row)\" [config]=\"getDropdownConfig()\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </ng-template>\n</cide-lyt-shared-wrapper>" }]
|
|
9815
9836
|
}], 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 }] }] } });
|
|
9816
9837
|
|
|
9817
9838
|
var generalMaster_component = /*#__PURE__*/Object.freeze({
|
|
@@ -10101,6 +10122,7 @@ class CideCoreEntityCreateComponent {
|
|
|
10101
10122
|
fileManagerService = inject(CideEleFileManagerService);
|
|
10102
10123
|
sharedObjectIdService = inject(SharedObjectIdService);
|
|
10103
10124
|
rightsService = inject(RightsService);
|
|
10125
|
+
requestService = inject(CideLytRequestService);
|
|
10104
10126
|
destroy$ = new Subject();
|
|
10105
10127
|
globalErrorHandler;
|
|
10106
10128
|
globalRejectionHandler;
|
|
@@ -11156,8 +11178,20 @@ class CideCoreEntityCreateComponent {
|
|
|
11156
11178
|
this.isEditMode.set(true);
|
|
11157
11179
|
}
|
|
11158
11180
|
}
|
|
11159
|
-
//
|
|
11160
|
-
this.
|
|
11181
|
+
// Success handling - show notification and manage tabs
|
|
11182
|
+
this.notificationService.success(`${isEdit ? 'Updated' : 'Created'} successfully!`);
|
|
11183
|
+
// Get current active tab ID to close it after navigation
|
|
11184
|
+
const activeTabId = this.requestService.activeTabId();
|
|
11185
|
+
// Force refresh list route to ensure new data is loaded when tab becomes active
|
|
11186
|
+
this.requestService.forceRefreshRoute('/control-panel/entity-list');
|
|
11187
|
+
if (activeTabId) {
|
|
11188
|
+
// Close current tab - this will handle navigation back to the previous active tab (usually the list)
|
|
11189
|
+
this.requestService.closeTab(activeTabId);
|
|
11190
|
+
}
|
|
11191
|
+
else {
|
|
11192
|
+
// Fallback: regular navigation if tab ID not found
|
|
11193
|
+
this.router.navigate(['/control-panel/entity-list']);
|
|
11194
|
+
}
|
|
11161
11195
|
}
|
|
11162
11196
|
else {
|
|
11163
11197
|
this.error.set(response?.message || `Failed to ${isEdit ? 'update' : 'create'} entity. Please try again.`);
|
|
@@ -16465,7 +16499,7 @@ class CideCoreUserCreateComponent {
|
|
|
16465
16499
|
if (this.userMasterForm.valid) {
|
|
16466
16500
|
this.loading.set(true);
|
|
16467
16501
|
// Prepare form data with entity mappings and exceptions
|
|
16468
|
-
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.
|
|
16502
|
+
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.getRawValue();
|
|
16469
16503
|
// Process role exceptions using the new permission tracking system
|
|
16470
16504
|
const core_user_role_exceptions = this.processRoleExceptions();
|
|
16471
16505
|
// Get entity mappings with raw values (to include disabled controls) and ensure entity IDs are properly extracted
|