@flusys/ng-iam 1.0.0-beta → 1.0.0-rc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/README.md +225 -24
  2. package/fesm2022/{flusys-ng-iam-action-form-page.component-0b9GwJqa.mjs → flusys-ng-iam-action-form-page.component-C_BRrrWW.mjs} +175 -203
  3. package/fesm2022/flusys-ng-iam-action-form-page.component-C_BRrrWW.mjs.map +1 -0
  4. package/fesm2022/flusys-ng-iam-action-list-page.component-Daf93zpS.mjs +289 -0
  5. package/fesm2022/flusys-ng-iam-action-list-page.component-Daf93zpS.mjs.map +1 -0
  6. package/fesm2022/{flusys-ng-iam-flusys-ng-iam-C-MQjakK.mjs → flusys-ng-iam-flusys-ng-iam-BPIpfrjN.mjs} +892 -818
  7. package/fesm2022/flusys-ng-iam-flusys-ng-iam-BPIpfrjN.mjs.map +1 -0
  8. package/fesm2022/flusys-ng-iam-iam-container.component-Bn4kQtxW.mjs +92 -0
  9. package/fesm2022/flusys-ng-iam-iam-container.component-Bn4kQtxW.mjs.map +1 -0
  10. package/fesm2022/{flusys-ng-iam-permission-page.component-e_RX5mky.mjs → flusys-ng-iam-permission-page.component-CmxOBJPu.mjs} +42 -13
  11. package/fesm2022/flusys-ng-iam-permission-page.component-CmxOBJPu.mjs.map +1 -0
  12. package/fesm2022/{flusys-ng-iam-role-form-page.component-eZM1EPps.mjs → flusys-ng-iam-role-form-page.component-ByNueI1a.mjs} +107 -135
  13. package/fesm2022/flusys-ng-iam-role-form-page.component-ByNueI1a.mjs.map +1 -0
  14. package/fesm2022/flusys-ng-iam-role-list-page.component-CFly5KnH.mjs +316 -0
  15. package/fesm2022/flusys-ng-iam-role-list-page.component-CFly5KnH.mjs.map +1 -0
  16. package/fesm2022/flusys-ng-iam.mjs +1 -1
  17. package/package.json +5 -5
  18. package/types/flusys-ng-iam.d.ts +87 -23
  19. package/fesm2022/flusys-ng-iam-action-form-page.component-0b9GwJqa.mjs.map +0 -1
  20. package/fesm2022/flusys-ng-iam-action-list-page.component-BpvewEGL.mjs +0 -281
  21. package/fesm2022/flusys-ng-iam-action-list-page.component-BpvewEGL.mjs.map +0 -1
  22. package/fesm2022/flusys-ng-iam-flusys-ng-iam-C-MQjakK.mjs.map +0 -1
  23. package/fesm2022/flusys-ng-iam-iam-container.component-Chl5MDkV.mjs +0 -97
  24. package/fesm2022/flusys-ng-iam-iam-container.component-Chl5MDkV.mjs.map +0 -1
  25. package/fesm2022/flusys-ng-iam-permission-page.component-e_RX5mky.mjs.map +0 -1
  26. package/fesm2022/flusys-ng-iam-role-form-page.component-eZM1EPps.mjs.map +0 -1
  27. package/fesm2022/flusys-ng-iam-role-list-page.component-BgzxmHjk.mjs +0 -266
  28. package/fesm2022/flusys-ng-iam-role-list-page.component-BgzxmHjk.mjs.map +0 -1
@@ -1,8 +1,9 @@
1
- import { IBaseEntity, ILogicNode, ApiResourceService, ISingleResponse } from '@flusys/ng-shared';
1
+ import { IBaseEntity, ILogicNode, ApiResourceService, ISingleResponse, IProfilePermissionProvider, IProfileRoleInfo, IProfileActionInfo } from '@flusys/ng-shared';
2
2
  import * as _angular_core from '@angular/core';
3
- import { Signal, OnDestroy } from '@angular/core';
3
+ import { Signal, Provider } from '@angular/core';
4
4
  import { Observable } from 'rxjs';
5
5
  import { BaseApiService } from '@flusys/ng-core';
6
+ export { PermissionMode } from '@flusys/ng-core';
6
7
  import * as primeng_api from 'primeng/api';
7
8
  import { Routes } from '@angular/router';
8
9
 
@@ -46,7 +47,7 @@ interface IRole extends IBaseEntity {
46
47
  companyId: string | null;
47
48
  isActive: boolean;
48
49
  serial: number | null;
49
- metadata: Record<string, any> | null;
50
+ metadata: Record<string, unknown> | null;
50
51
  }
51
52
  /**
52
53
  * Create Role DTO
@@ -58,7 +59,7 @@ interface ICreateRoleDto {
58
59
  companyId?: string;
59
60
  isActive?: boolean;
60
61
  serial?: number;
61
- metadata?: Record<string, any>;
62
+ metadata?: Record<string, unknown>;
62
63
  }
63
64
  /**
64
65
  * Update Role DTO
@@ -99,7 +100,7 @@ interface IAction extends IBaseEntity {
99
100
  parentId: string | null;
100
101
  serial: number | null;
101
102
  isActive: boolean;
102
- metadata: Record<string, any> | null;
103
+ metadata: Record<string, unknown> | null;
103
104
  }
104
105
  /**
105
106
  * Action Tree DTO
@@ -121,7 +122,7 @@ interface ICreateActionDto {
121
122
  parentId?: string;
122
123
  serial?: number;
123
124
  isActive?: boolean;
124
- metadata?: Record<string, any>;
125
+ metadata?: Record<string, unknown>;
125
126
  }
126
127
  /**
127
128
  * Update Action DTO
@@ -135,10 +136,6 @@ interface IUpdateActionDto extends Partial<ICreateActionDto> {
135
136
  * Permission Action - 'add' or 'remove'
136
137
  */
137
138
  type PermissionAction = 'add' | 'remove';
138
- /**
139
- * Permission Mode - matches backend IAMPermissionMode
140
- */
141
- type PermissionMode = 'rbac' | 'direct' | 'full';
142
139
  /**
143
140
  * Permission Item DTO
144
141
  * Used in all assignment operations
@@ -364,7 +361,7 @@ declare class ActionApiService extends ApiResourceService<IUpdateActionDto, IAct
364
361
  constructor();
365
362
  /**
366
363
  * Get actions for permission assignment
367
- * GET /iam/actions/tree-for-permission
364
+ * POST /iam/actions/tree-for-permission
368
365
  * Returns actions filtered by company whitelist if enabled
369
366
  */
370
367
  getActionsForPermission(): Observable<ISingleResponse<IActionTreeDto[]>>;
@@ -551,7 +548,7 @@ declare class PermissionApiService extends BaseApiService {
551
548
  assignUserActions(data: IAssignUserActionsDto): Observable<ISingleResponse<IPermissionOperationResultDto>>;
552
549
  /**
553
550
  * Get user's direct action permissions
554
- * GET /permissions/user-actions/:userId
551
+ * POST /iam/permissions/get-user-actions
555
552
  */
556
553
  getUserActions(userId: string, query?: IGetUserActionsDto): Observable<ISingleResponse<IUserActionResponseDto[]>>;
557
554
  /**
@@ -561,7 +558,7 @@ declare class PermissionApiService extends BaseApiService {
561
558
  assignUserRoles(data: IAssignUserRolesDto): Observable<ISingleResponse<IPermissionOperationResultDto>>;
562
559
  /**
563
560
  * Get user's role assignments
564
- * GET /permissions/user-roles/:userId
561
+ * POST /iam/permissions/get-user-roles
565
562
  */
566
563
  getUserRoles(userId: string, query?: IGetUserRolesDto): Observable<ISingleResponse<IUserRoleResponseDto[]>>;
567
564
  /**
@@ -571,7 +568,7 @@ declare class PermissionApiService extends BaseApiService {
571
568
  assignRoleActions(data: IAssignRoleActionsDto): Observable<ISingleResponse<IPermissionOperationResultDto>>;
572
569
  /**
573
570
  * Get role's action permissions
574
- * GET /permissions/role-actions/:roleId
571
+ * POST /iam/permissions/get-role-actions
575
572
  */
576
573
  getRoleActions(roleId: string, query?: IGetRoleActionsDto): Observable<ISingleResponse<IRoleActionResponseDto[]>>;
577
574
  /**
@@ -581,7 +578,7 @@ declare class PermissionApiService extends BaseApiService {
581
578
  assignCompanyActions(data: IAssignCompanyActionsDto): Observable<ISingleResponse<IPermissionOperationResultDto>>;
582
579
  /**
583
580
  * Get company's whitelisted actions
584
- * GET /permissions/company-actions/:companyId
581
+ * POST /iam/permissions/get-company-actions
585
582
  */
586
583
  getCompanyActions(companyId: string): Observable<ISingleResponse<ICompanyActionResponseDto[]>>;
587
584
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<PermissionApiService, never>;
@@ -674,8 +671,10 @@ declare class LogicBuilderComponent {
674
671
  id: string;
675
672
  name: string;
676
673
  }[]>;
677
- private builderTree;
674
+ /** Internal builder tree state (private writable + public readonly pattern) */
675
+ private readonly _builderTree;
678
676
  readonly builderLogic: _angular_core.Signal<IBuilderNode | null>;
677
+ constructor();
679
678
  initializeLogic(): void;
680
679
  clearLogic(): void;
681
680
  toggleOperator(nodeId: string): void;
@@ -723,7 +722,12 @@ declare class LogicBuilderComponent {
723
722
  * <flusys-role-action-selector />
724
723
  * ```
725
724
  */
726
- declare class RoleActionSelectorComponent implements OnDestroy {
725
+ declare class RoleActionSelectorComponent {
726
+ readonly ROLE_ACTION_PERMISSIONS: {
727
+ readonly READ: "role-action.read";
728
+ readonly ASSIGN: "role-action.assign";
729
+ };
730
+ private readonly destroyRef;
727
731
  private readonly roleApi;
728
732
  private readonly actionApi;
729
733
  private readonly permissionApi;
@@ -751,7 +755,6 @@ declare class RoleActionSelectorComponent implements OnDestroy {
751
755
  readonly canSave: _angular_core.Signal<boolean>;
752
756
  private loadDataAbortController;
753
757
  constructor();
754
- ngOnDestroy(): void;
755
758
  /**
756
759
  * Load roles from API
757
760
  */
@@ -830,13 +833,18 @@ declare class RoleActionSelectorComponent implements OnDestroy {
830
833
  * <flusys-company-action-selector />
831
834
  * ```
832
835
  */
833
- declare class CompanyActionSelectorComponent implements OnDestroy {
836
+ declare class CompanyActionSelectorComponent {
837
+ readonly COMPANY_ACTION_PERMISSIONS: {
838
+ readonly READ: "company-action.read";
839
+ readonly ASSIGN: "company-action.assign";
840
+ };
834
841
  private readonly companyApiProvider;
835
842
  private readonly actionApi;
836
843
  private readonly permissionApi;
837
844
  private readonly messageService;
838
845
  private readonly confirmationService;
839
846
  private readonly permissionLogic;
847
+ private readonly destroyRef;
840
848
  readonly selectedCompanyId: _angular_core.WritableSignal<string | undefined>;
841
849
  readonly companies: _angular_core.WritableSignal<ICompany[]>;
842
850
  readonly loading: _angular_core.WritableSignal<boolean>;
@@ -859,7 +867,6 @@ declare class CompanyActionSelectorComponent implements OnDestroy {
859
867
  readonly canSave: _angular_core.Signal<boolean>;
860
868
  private loadDataAbortController;
861
869
  constructor();
862
- ngOnDestroy(): void;
863
870
  /**
864
871
  * Load companies from API
865
872
  */
@@ -940,12 +947,18 @@ declare class CompanyActionSelectorComponent implements OnDestroy {
940
947
  * ```
941
948
  */
942
949
  declare class UserRoleSelectorComponent {
950
+ readonly USER_ROLE_PERMISSIONS: {
951
+ readonly READ: "user-role.read";
952
+ readonly ASSIGN: "user-role.assign";
953
+ };
943
954
  private readonly appConfig;
944
955
  private readonly companyContext;
945
956
  private readonly userPermissionProvider;
946
957
  private readonly roleApi;
947
958
  private readonly permissionApi;
948
959
  private readonly messageService;
960
+ private readonly destroyRef;
961
+ private loadDataAbortController;
949
962
  readonly selectedUserId: _angular_core.WritableSignal<string | null>;
950
963
  readonly selectedBranchId: _angular_core.WritableSignal<string | undefined>;
951
964
  readonly branches: _angular_core.WritableSignal<IBranch[]>;
@@ -1037,6 +1050,10 @@ declare class UserRoleSelectorComponent {
1037
1050
  * ```
1038
1051
  */
1039
1052
  declare class UserActionSelectorComponent {
1053
+ readonly USER_ACTION_PERMISSIONS: {
1054
+ readonly READ: "user-action.read";
1055
+ readonly ASSIGN: "user-action.assign";
1056
+ };
1040
1057
  private readonly appConfig;
1041
1058
  private readonly companyContext;
1042
1059
  private readonly userPermissionProvider;
@@ -1044,6 +1061,8 @@ declare class UserActionSelectorComponent {
1044
1061
  private readonly permissionApi;
1045
1062
  private readonly permissionLogic;
1046
1063
  private readonly messageService;
1064
+ private readonly destroyRef;
1065
+ private loadDataAbortController;
1047
1066
  readonly selectedUserId: _angular_core.WritableSignal<string | null>;
1048
1067
  readonly selectedBranchId: _angular_core.WritableSignal<string | undefined>;
1049
1068
  readonly branches: _angular_core.WritableSignal<IBranch[]>;
@@ -1085,7 +1104,7 @@ declare class UserActionSelectorComponent {
1085
1104
  */
1086
1105
  hasUnmetPrerequisites(action: IAction): boolean;
1087
1106
  /**
1088
- * Handle action checkbox toggle
1107
+ * Handle action toggle with dependency management
1089
1108
  */
1090
1109
  onActionToggle(action: IAction, newValue: boolean): void;
1091
1110
  /**
@@ -1112,6 +1131,51 @@ declare class UserActionSelectorComponent {
1112
1131
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserActionSelectorComponent, "flusys-user-action-selector", never, {}, {}, never, never, true, never>;
1113
1132
  }
1114
1133
 
1134
+ /**
1135
+ * Profile Permission Provider Adapter
1136
+ *
1137
+ * Implements IProfilePermissionProvider using ng-iam's PermissionApiService.
1138
+ * Allows ng-auth profile page to display user permissions without
1139
+ * depending on ng-iam directly.
1140
+ *
1141
+ * @example
1142
+ * // In app.config.ts
1143
+ * providers: [
1144
+ * ...provideIamProviders()
1145
+ * ]
1146
+ *
1147
+ * // In profile component
1148
+ * private readonly permissionProvider = inject(PROFILE_PERMISSION_PROVIDER, { optional: true });
1149
+ */
1150
+ declare class ProfilePermissionProviderAdapter implements IProfilePermissionProvider {
1151
+ private readonly permissionApi;
1152
+ getUserRoles(userId: string, branchId?: string): Observable<ISingleResponse<IProfileRoleInfo[]>>;
1153
+ getUserActions(userId: string, branchId?: string): Observable<ISingleResponse<IProfileActionInfo[]>>;
1154
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ProfilePermissionProviderAdapter, never>;
1155
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ProfilePermissionProviderAdapter>;
1156
+ }
1157
+
1158
+ /**
1159
+ * Provide IAM Provider Adapters
1160
+ *
1161
+ * Registers IAM implementations for provider interfaces from ng-shared.
1162
+ * This allows ng-auth profile page to display permissions without direct dependencies.
1163
+ *
1164
+ * @example
1165
+ * // In app.config.ts
1166
+ * import { provideIamProviders } from '@flusys/ng-iam';
1167
+ *
1168
+ * export const appConfig: ApplicationConfig = {
1169
+ * providers: [
1170
+ * ...provideIamProviders(),
1171
+ * // ... other providers
1172
+ * ]
1173
+ * };
1174
+ *
1175
+ * @returns Array of Angular providers
1176
+ */
1177
+ declare function provideIamProviders(): Provider[];
1178
+
1115
1179
  /**
1116
1180
  * IAM Routes Configuration
1117
1181
  *
@@ -1124,5 +1188,5 @@ declare class UserActionSelectorComponent {
1124
1188
  */
1125
1189
  declare const IAM_ROUTES: Routes;
1126
1190
 
1127
- export { ActionApiService, ActionPermissionLogicService, ActionType, CompanyActionSelectorComponent, IAM_ROUTES, LogicBuilderComponent, MAX_DROPDOWN_ITEMS, MyPermissionsApiService, PermissionApiService, PermissionStateService, RoleActionSelectorComponent, RoleApiService, UserActionSelectorComponent, UserRoleSelectorComponent };
1128
- export type { IAction, IActionTreeDto, IAssignCompanyActionsDto, IAssignRoleActionsDto, IAssignUserActionsDto, IAssignUserRolesDto, IBranch, ICompany, ICompanyActionResponseDto, ICreateActionDto, ICreateRoleDto, IGetMyPermissionsDto, IGetRoleActionsDto, IGetUserActionsDto, IGetUserRolesDto, IMenuAction, IMyPermissionsResponseDto, IPermissionItemDto, IPermissionOperationResultDto, IPrerequisiteActionDto, IPrerequisiteValidationError, IRole, IRoleActionResponseDto, IRoleQueryDto, IUpdateActionDto, IUpdateRoleDto, IUser, IUserActionResponseDto, IUserRoleResponseDto, PermissionAction, PermissionMode };
1191
+ export { ActionApiService, ActionPermissionLogicService, ActionType, CompanyActionSelectorComponent, IAM_ROUTES, LogicBuilderComponent, MAX_DROPDOWN_ITEMS, MyPermissionsApiService, PermissionApiService, PermissionStateService, ProfilePermissionProviderAdapter, RoleActionSelectorComponent, RoleApiService, UserActionSelectorComponent, UserRoleSelectorComponent, provideIamProviders };
1192
+ export type { IAction, IActionTreeDto, IAssignCompanyActionsDto, IAssignRoleActionsDto, IAssignUserActionsDto, IAssignUserRolesDto, IBranch, ICompany, ICompanyActionResponseDto, ICreateActionDto, ICreateRoleDto, IGetMyPermissionsDto, IGetRoleActionsDto, IGetUserActionsDto, IGetUserRolesDto, IMenuAction, IMyPermissionsResponseDto, IPermissionItemDto, IPermissionOperationResultDto, IPrerequisiteActionDto, IPrerequisiteValidationError, IRole, IRoleActionResponseDto, IRoleQueryDto, IUpdateActionDto, IUpdateRoleDto, IUser, IUserActionResponseDto, IUserRoleResponseDto, PermissionAction };
@@ -1 +0,0 @@
1
- {"version":3,"file":"flusys-ng-iam-action-form-page.component-0b9GwJqa.mjs","sources":["../../../projects/ng-iam/pages/action/action-form-page.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, inject, OnInit, signal } from '@angular/core';\nimport { form, FormField, required } from '@angular/forms/signals';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { AngularModule, ILogicNode, PrimeModule } from '@flusys/ng-shared';\nimport { MessageService } from 'primeng/api';\nimport { firstValueFrom } from 'rxjs';\nimport { ActionApiService } from '../../services/action-api.service';\nimport { IAction, ActionType } from '../../interfaces/action.interface';\nimport { LogicBuilderComponent } from '../../components/logic-builder.component';\n\n/** Action form model interface */\ninterface IActionFormModel {\n id: string;\n name: string;\n description: string;\n code: string;\n actionType: ActionType;\n permissionLogic: any | null;\n parentId: string;\n serial: string;\n isActive: boolean;\n metadata: any | null;\n}\n\n/**\n * Action Form Page Component\n * Create/Edit action with signal-based form pattern (matches ng-auth)\n */\n@Component({\n selector: 'lib-action-form-page',\n standalone: true,\n imports: [AngularModule, PrimeModule, FormField, LogicBuilderComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"card\">\n <div class=\"flex justify-between items-center mb-4\">\n <h3 class=\"text-xl font-semibold\">\n {{ isEditMode() ? 'Edit Action' : 'New Action' }}\n </h3>\n <p-button\n label=\"Back\"\n icon=\"pi pi-arrow-left\"\n [outlined]=\"true\"\n (onClick)=\"onBack()\" />\n </div>\n\n <form (ngSubmit)=\"onSubmit()\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 gap-4\">\n <!-- Name -->\n <div>\n <label for=\"name\" class=\"block font-medium mb-2\">Name *</label>\n <input\n pInputText\n id=\"name\"\n [formField]=\"actionForm.name\"\n class=\"w-full\"\n placeholder=\"Enter action name\" />\n </div>\n\n <!-- Code -->\n <div>\n <label for=\"code\" class=\"block font-medium mb-2\">Code</label>\n <input\n pInputText\n id=\"code\"\n [formField]=\"actionForm.code\"\n class=\"w-full\"\n placeholder=\"Enter action code\" />\n </div>\n\n <!-- Description -->\n <div class=\"md:col-span-2\">\n <label for=\"description\" class=\"block font-medium mb-2\">Description</label>\n <input\n pInputText\n id=\"description\"\n [formField]=\"actionForm.description\"\n class=\"w-full\"\n placeholder=\"Enter description\" />\n </div>\n\n <!-- Action Type -->\n <div>\n <label for=\"actionType\" class=\"block font-medium mb-2\">Action Type *</label>\n <select\n id=\"actionType\"\n class=\"p-select-native\"\n [formField]=\"actionForm.actionType\">\n @for (type of actionTypes; track type.value) {\n <option [value]=\"type.value\">{{ type.label }}</option>\n }\n </select>\n </div>\n\n <!-- Parent Action -->\n <div>\n <label for=\"parentId\" class=\"block font-medium mb-2\">Parent Action</label>\n <select\n id=\"parentId\"\n class=\"p-select-native\"\n [formField]=\"actionForm.parentId\">\n <option value=\"\">Select parent action</option>\n @for (action of availableActions(); track action.id) {\n <option [value]=\"action.id\">{{ action.name }}</option>\n }\n </select>\n </div>\n\n <!-- Order -->\n <div>\n <label for=\"serial\" class=\"block font-medium mb-2\">Display Order</label>\n <input\n pInputText\n id=\"serial\"\n type=\"number\"\n [formField]=\"actionForm.serial\"\n class=\"w-full\"\n placeholder=\"Enter display order\" />\n </div>\n\n <!-- Is Active -->\n <div class=\"flex items-center pt-6\">\n <label class=\"p-checkbox-native\">\n <input\n type=\"checkbox\"\n [formField]=\"actionForm.isActive\" />\n <span>Active</span>\n </label>\n </div>\n </div>\n\n <!-- Permission Logic Builder -->\n <div class=\"mt-6\">\n <lib-logic-builder\n [logic]=\"formModel().permissionLogic\"\n [actions]=\"allActionsForLogic()\"\n (logicChange)=\"onLogicChange($event)\" />\n </div>\n\n <!-- Actions -->\n <div class=\"flex justify-end gap-2 mt-6\">\n <p-button\n label=\"Cancel\"\n severity=\"secondary\"\n [outlined]=\"true\"\n (onClick)=\"onBack()\" />\n <p-button\n [label]=\"isEditMode() ? 'Update' : 'Create'\"\n type=\"submit\"\n [loading]=\"isLoading()\"\n [disabled]=\"!isFormValid() || isLoading()\" />\n </div>\n </form>\n </div>\n `,\n})\nexport class ActionFormPageComponent implements OnInit {\n private readonly route = inject(ActivatedRoute);\n private readonly router = inject(Router);\n private readonly actionApi = inject(ActionApiService);\n private readonly messageService = inject(MessageService);\n\n /** Loading state */\n readonly isLoading = signal(false);\n\n /** Existing action data when editing */\n readonly existingAction = signal<IAction | null>(null);\n\n /** Whether in edit mode */\n readonly isEditMode = computed(() => !!this.existingAction());\n\n /** All actions for LogicBuilder */\n readonly allActionsForLogic = signal<Array<{ id: string; name: string }>>([]);\n\n /** All loaded actions for parent dropdown */\n readonly allActions = signal<IAction[]>([]);\n\n /** Available actions for parent dropdown (excludes current action to prevent circular reference) */\n readonly availableActions = computed(() => {\n const actions = this.allActions();\n const currentId = this.existingAction()?.id;\n return currentId ? actions.filter(a => a.id !== currentId) : actions;\n });\n\n // ============================================\n // Form (Signal Forms)\n // ============================================\n\n /** Form model */\n readonly formModel = signal<IActionFormModel>({\n id: '',\n name: '',\n description: '',\n code: '',\n actionType: ActionType.BACKEND,\n permissionLogic: null,\n parentId: '',\n serial: '',\n isActive: true,\n metadata: null,\n });\n\n /** Available action types for dropdown */\n readonly actionTypes = [\n { label: 'Backend (API Endpoints)', value: ActionType.BACKEND },\n { label: 'Frontend (UI Features)', value: ActionType.FRONTEND },\n { label: 'Both (Backend + Frontend)', value: ActionType.BOTH },\n ];\n\n /** Form with validation schema */\n readonly actionForm = form(this.formModel, (f) => {\n required(f.name, { message: 'Name is required' });\n });\n\n /** Check if form is valid */\n readonly isFormValid = computed(() => {\n const model = this.formModel();\n return model.name.trim().length > 0;\n });\n\n async ngOnInit(): Promise<void> {\n const id = this.route.snapshot.paramMap.get('id');\n\n // Load ALL actions FIRST - critical for LogicBuilder to display action names\n try {\n const response = await firstValueFrom(\n this.actionApi.getAll('', {\n pagination: { currentPage: 0, pageSize: 10000 },\n select: ['id', 'name', 'code', 'actionType', 'permissionLogic'],\n })\n );\n\n if (response?.success && response.data) {\n // Set actions for LogicBuilder dropdown\n this.allActionsForLogic.set(\n response.data.map(a => ({ id: a.id!, name: a.name ?? 'Unnamed' }))\n );\n\n // Store loaded actions locally for parent dropdown\n this.allActions.set(response.data);\n }\n } catch {\n // Actions load failed - form will show empty parent dropdown\n }\n\n // THEN load the specific action (ensures actions are loaded before setting permissionLogic)\n if (id && id !== 'new') {\n await this.loadAction(id);\n }\n }\n\n async loadAction(id: string): Promise<void> {\n this.isLoading.set(true);\n try {\n // Load fresh data from API to ensure permissionLogic is included\n const response = await this.actionApi.findByIdAsync(id, [\n 'id',\n 'name',\n 'description',\n 'code',\n 'actionType',\n 'permissionLogic',\n 'parentId',\n 'serial',\n 'isActive',\n 'metadata',\n ]);\n\n if (response?.success && response.data) {\n const action = response.data;\n\n // Set existing action for reference\n this.existingAction.set(action);\n\n // Populate form with action data\n this.formModel.set({\n id: action.id ?? '',\n name: action.name ?? '',\n description: action.description ?? '',\n code: action.code ?? '',\n actionType: action.actionType ?? ActionType.BACKEND,\n permissionLogic: action.permissionLogic ?? null,\n parentId: action.parentId ?? '',\n serial: action.serial?.toString() ?? '',\n isActive: action.isActive ?? true,\n metadata: action.metadata ?? null,\n });\n } else {\n this.messageService.add({\n severity: 'error',\n summary: 'Error',\n detail: 'Action not found.',\n });\n this.router.navigate(['/iam/actions']);\n }\n } catch {\n this.messageService.add({\n severity: 'error',\n summary: 'Error',\n detail: 'Failed to load action.',\n });\n this.router.navigate(['/iam/actions']);\n } finally {\n this.isLoading.set(false);\n }\n }\n\n async onSubmit(): Promise<void> {\n if (!this.isFormValid()) {\n this.messageService.add({\n severity: 'error',\n summary: 'Validation Error',\n detail: 'Please fill in all required fields.',\n });\n return;\n }\n\n this.isLoading.set(true);\n\n try {\n const formValue = this.formModel();\n\n // Convert empty strings to undefined for DTO compatibility\n const dto = {\n ...formValue,\n description: formValue.description || undefined,\n code: formValue.code || undefined,\n parentId: formValue.parentId || undefined,\n serial: formValue.serial ? parseInt(formValue.serial, 10) : undefined,\n metadata: formValue.metadata ?? undefined,\n permissionLogic: formValue.permissionLogic ?? undefined,\n };\n\n if (this.isEditMode()) {\n await this.actionApi.updateAsync(dto);\n this.messageService.add({\n severity: 'success',\n summary: 'Success',\n detail: 'Action updated successfully.',\n });\n } else {\n await this.actionApi.insertAsync(dto);\n this.messageService.add({\n severity: 'success',\n summary: 'Success',\n detail: 'Action created successfully.',\n });\n }\n\n this.router.navigate(['/iam/actions']);\n } catch (error: any) {\n this.messageService.add({\n severity: 'error',\n summary: 'Error',\n detail: error.message || 'Failed to save action.',\n });\n } finally {\n this.isLoading.set(false);\n }\n }\n\n onBack(): void {\n this.router.navigate(['/iam/actions']);\n }\n\n /**\n * Handle permission logic changes from LogicBuilder\n */\n onLogicChange(logic: ILogicNode | null): void {\n this.formModel.update(model => ({\n ...model,\n permissionLogic: logic\n }));\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAwBA;;;AAGG;MAiIU,uBAAuB,CAAA;AACjB,IAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACpC,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;;AAG/C,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,qDAAC;;AAGzB,IAAA,cAAc,GAAG,MAAM,CAAiB,IAAI,0DAAC;;AAG7C,IAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,cAAc,EAAE,sDAAC;;AAGpD,IAAA,kBAAkB,GAAG,MAAM,CAAsC,EAAE,8DAAC;;AAGpE,IAAA,UAAU,GAAG,MAAM,CAAY,EAAE,sDAAC;;AAGlC,IAAA,gBAAgB,GAAG,QAAQ,CAAC,MAAK;AACxC,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,EAAE;QACjC,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,EAAE,EAAE,EAAE;QAC3C,OAAO,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,GAAG,OAAO;AACtE,IAAA,CAAC,4DAAC;;;;;IAOO,SAAS,GAAG,MAAM,CAAmB;AAC5C,QAAA,EAAE,EAAE,EAAE;AACN,QAAA,IAAI,EAAE,EAAE;AACR,QAAA,WAAW,EAAE,EAAE;AACf,QAAA,IAAI,EAAE,EAAE;QACR,UAAU,EA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AAA,EAAA,UAAA,EAAA,MAAA,EAAA,UAAA,EAAA,MAAA,EAAA,SAAA,EAAA,OAAA,EAAA,YAAA,EAAA,YAAA,EAAA,eAAA,EAAA,WAAA,EAAA,WAAA,EAAA,SAAA,EAAA,MAAA,EAAA,OAAA,EAAA,SAAA,EAAA,aAAA,EAAA,UAAA,EAAA,aAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAAA,QAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,SAAS,+EAAE,qBAAqB,EAAA,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FA6H3D,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAhInC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,sBAAsB;AAChC,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,qBAAqB,CAAC;oBACvE,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyHT,EAAA,CAAA;AACF,iBAAA;;;;;"}
@@ -1,281 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, signal, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { Router } from '@angular/router';
4
- import { LAYOUT_AUTH_STATE } from '@flusys/ng-layout';
5
- import { AngularModule, PrimeModule } from '@flusys/ng-shared';
6
- import * as i3 from 'primeng/api';
7
- import { MessageService, ConfirmationService } from 'primeng/api';
8
- import * as i2 from 'primeng/tag';
9
- import { TagModule } from 'primeng/tag';
10
- import { firstValueFrom } from 'rxjs';
11
- import { A as ActionApiService, c as convertActionToTreeNode, a as ActionType } from './flusys-ng-iam-flusys-ng-iam-C-MQjakK.mjs';
12
- import * as i3$1 from 'primeng/button';
13
- import * as i8 from 'primeng/treetable';
14
-
15
- /**
16
- * Action List Page Component
17
- *
18
- * Displays hierarchical tree of actions with search, filter, and CRUD operations
19
- */
20
- class ActionListPageComponent {
21
- router = inject(Router);
22
- companyContext = inject(LAYOUT_AUTH_STATE);
23
- actionApi = inject(ActionApiService);
24
- messageService = inject(MessageService);
25
- confirmationService = inject(ConfirmationService);
26
- isLoading = signal(false, ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
27
- treeNodes = signal([], ...(ngDevMode ? [{ debugName: "treeNodes" }] : []));
28
- constructor() {
29
- effect(() => {
30
- this.companyContext.currentCompanyInfo();
31
- untracked(() => this.loadActions());
32
- });
33
- }
34
- async loadActions() {
35
- this.isLoading.set(true);
36
- try {
37
- const response = await firstValueFrom(this.actionApi.getTree());
38
- const tree = response?.success ? response.data ?? [] : [];
39
- this.treeNodes.set(convertActionToTreeNode(tree));
40
- }
41
- catch {
42
- this.messageService.add({
43
- severity: 'error',
44
- summary: 'Error',
45
- detail: 'Failed to load actions',
46
- });
47
- }
48
- finally {
49
- this.isLoading.set(false);
50
- }
51
- }
52
- /**
53
- * Get action type label
54
- */
55
- getActionTypeLabel(type) {
56
- switch (type) {
57
- case ActionType.BACKEND:
58
- return 'Backend';
59
- case ActionType.FRONTEND:
60
- return 'Frontend';
61
- case ActionType.BOTH:
62
- return 'Both';
63
- default:
64
- return 'Unknown';
65
- }
66
- }
67
- /**
68
- * Get action type severity for tag styling
69
- */
70
- getActionTypeSeverity(type) {
71
- switch (type) {
72
- case ActionType.BACKEND:
73
- return 'info';
74
- case ActionType.FRONTEND:
75
- return 'success';
76
- case ActionType.BOTH:
77
- return 'warn';
78
- default:
79
- return 'info';
80
- }
81
- }
82
- onCreate() {
83
- this.router.navigate(['/iam/actions/new']);
84
- }
85
- onEdit(action) {
86
- this.router.navigate(['/iam/actions', action.id]);
87
- }
88
- onDelete(action) {
89
- if (!action?.id || !action?.name) {
90
- return;
91
- }
92
- this.confirmationService.confirm({
93
- message: `Are you sure you want to delete action "${action.name}"?`,
94
- header: 'Confirm Delete',
95
- icon: 'pi pi-exclamation-triangle',
96
- accept: async () => {
97
- try {
98
- await this.actionApi.deleteAsync({ id: action.id, type: 'delete' });
99
- await this.loadActions();
100
- this.messageService.add({
101
- severity: 'success',
102
- summary: 'Success',
103
- detail: 'Action deleted successfully',
104
- });
105
- }
106
- catch (error) {
107
- this.messageService.add({
108
- severity: 'error',
109
- summary: 'Error',
110
- detail: error instanceof Error ? error.message : 'Failed to delete action',
111
- });
112
- }
113
- },
114
- });
115
- }
116
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ActionListPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
117
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.3", type: ActionListPageComponent, isStandalone: true, selector: "lib-action-list-page", ngImport: i0, template: `
118
- <div class="card">
119
- <div class="flex justify-between items-center mb-4">
120
- <h3 class="text-xl font-semibold">Actions</h3>
121
- <p-button
122
- label="New Action"
123
- icon="pi pi-plus"
124
- (onClick)="onCreate()" />
125
- </div>
126
-
127
- <p-treeTable
128
- [value]="treeNodes()"
129
- [loading]="isLoading()"
130
- [scrollable]="true"
131
- scrollHeight="flex"
132
- dataKey="id"
133
- styleClass="p-treetable-sm">
134
- <ng-template pTemplate="header">
135
- <tr>
136
- <th>Name</th>
137
- <th>Code</th>
138
- <th>Action Type</th>
139
- <th>Active</th>
140
- <th>Read Only</th>
141
- <th style="width: 150px">Actions</th>
142
- </tr>
143
- </ng-template>
144
- <ng-template pTemplate="body" let-rowNode let-rowData="rowData">
145
- <tr>
146
- <td>
147
- <p-treeTableToggler [rowNode]="rowNode" />
148
- {{ rowData.name }}
149
- </td>
150
- <td>{{ rowData.code ?? '-' }}</td>
151
- <td>
152
- <p-tag
153
- [value]="getActionTypeLabel(rowData.actionType)"
154
- [severity]="getActionTypeSeverity(rowData.actionType)" />
155
- </td>
156
- <td>
157
- <p-tag
158
- [value]="rowData.isActive ? 'Active' : 'Inactive'"
159
- [severity]="rowData.isActive ? 'success' : 'secondary'" />
160
- </td>
161
- <td>
162
- <p-tag
163
- [value]="rowData.readOnly ? 'Yes' : 'No'"
164
- [severity]="rowData.readOnly ? 'warn' : 'secondary'" />
165
- </td>
166
- <td>
167
- <div class="flex gap-2">
168
- <p-button
169
- icon="pi pi-pencil"
170
- [outlined]="true"
171
- severity="info"
172
- size="small"
173
- (onClick)="onEdit(rowData)" />
174
- <p-button
175
- icon="pi pi-trash"
176
- [outlined]="true"
177
- severity="danger"
178
- size="small"
179
- [disabled]="rowData.readOnly"
180
- (onClick)="onDelete(rowData)" />
181
- </div>
182
- </td>
183
- </tr>
184
- </ng-template>
185
- <ng-template pTemplate="emptymessage">
186
- <tr>
187
- <td colspan="6" class="text-center">No actions found.</td>
188
- </tr>
189
- </ng-template>
190
- </p-treeTable>
191
- </div>
192
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: AngularModule }, { kind: "ngmodule", type: PrimeModule }, { kind: "component", type: i2.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "directive", type: i3.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i3$1.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i8.TreeTable, selector: "p-treeTable, p-treetable, p-tree-table", inputs: ["columns", "styleClass", "tableStyle", "tableStyleClass", "autoLayout", "lazy", "lazyLoadOnInit", "paginator", "rows", "first", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "customSort", "selectionMode", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "compareSelectionBy", "rowHover", "loading", "loadingIcon", "showLoader", "scrollable", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "frozenColumns", "resizableColumns", "columnResizeMode", "reorderableColumns", "contextMenu", "rowTrackBy", "filters", "globalFilterFields", "filterDelay", "filterMode", "filterLocale", "paginatorLocale", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "value", "virtualRowHeight", "selectionKeys", "showGridlines"], outputs: ["selectionChange", "contextMenuSelectionChange", "onFilter", "onNodeExpand", "onNodeCollapse", "onPage", "onSort", "onLazyLoad", "sortFunction", "onColResize", "onColReorder", "onNodeSelect", "onNodeUnselect", "onContextMenuSelect", "onHeaderCheckboxToggle", "onEditInit", "onEditComplete", "onEditCancel", "selectionKeysChange"] }, { kind: "component", type: i8.TreeTableToggler, selector: "p-treeTableToggler, p-treetabletoggler, p-treetable-toggler", inputs: ["rowNode"] }, { kind: "ngmodule", type: TagModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
193
- }
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: ActionListPageComponent, decorators: [{
195
- type: Component,
196
- args: [{
197
- selector: 'lib-action-list-page',
198
- standalone: true,
199
- imports: [AngularModule, PrimeModule, TagModule],
200
- changeDetection: ChangeDetectionStrategy.OnPush,
201
- template: `
202
- <div class="card">
203
- <div class="flex justify-between items-center mb-4">
204
- <h3 class="text-xl font-semibold">Actions</h3>
205
- <p-button
206
- label="New Action"
207
- icon="pi pi-plus"
208
- (onClick)="onCreate()" />
209
- </div>
210
-
211
- <p-treeTable
212
- [value]="treeNodes()"
213
- [loading]="isLoading()"
214
- [scrollable]="true"
215
- scrollHeight="flex"
216
- dataKey="id"
217
- styleClass="p-treetable-sm">
218
- <ng-template pTemplate="header">
219
- <tr>
220
- <th>Name</th>
221
- <th>Code</th>
222
- <th>Action Type</th>
223
- <th>Active</th>
224
- <th>Read Only</th>
225
- <th style="width: 150px">Actions</th>
226
- </tr>
227
- </ng-template>
228
- <ng-template pTemplate="body" let-rowNode let-rowData="rowData">
229
- <tr>
230
- <td>
231
- <p-treeTableToggler [rowNode]="rowNode" />
232
- {{ rowData.name }}
233
- </td>
234
- <td>{{ rowData.code ?? '-' }}</td>
235
- <td>
236
- <p-tag
237
- [value]="getActionTypeLabel(rowData.actionType)"
238
- [severity]="getActionTypeSeverity(rowData.actionType)" />
239
- </td>
240
- <td>
241
- <p-tag
242
- [value]="rowData.isActive ? 'Active' : 'Inactive'"
243
- [severity]="rowData.isActive ? 'success' : 'secondary'" />
244
- </td>
245
- <td>
246
- <p-tag
247
- [value]="rowData.readOnly ? 'Yes' : 'No'"
248
- [severity]="rowData.readOnly ? 'warn' : 'secondary'" />
249
- </td>
250
- <td>
251
- <div class="flex gap-2">
252
- <p-button
253
- icon="pi pi-pencil"
254
- [outlined]="true"
255
- severity="info"
256
- size="small"
257
- (onClick)="onEdit(rowData)" />
258
- <p-button
259
- icon="pi pi-trash"
260
- [outlined]="true"
261
- severity="danger"
262
- size="small"
263
- [disabled]="rowData.readOnly"
264
- (onClick)="onDelete(rowData)" />
265
- </div>
266
- </td>
267
- </tr>
268
- </ng-template>
269
- <ng-template pTemplate="emptymessage">
270
- <tr>
271
- <td colspan="6" class="text-center">No actions found.</td>
272
- </tr>
273
- </ng-template>
274
- </p-treeTable>
275
- </div>
276
- `,
277
- }]
278
- }], ctorParameters: () => [] });
279
-
280
- export { ActionListPageComponent };
281
- //# sourceMappingURL=flusys-ng-iam-action-list-page.component-BpvewEGL.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"flusys-ng-iam-action-list-page.component-BpvewEGL.mjs","sources":["../../../projects/ng-iam/pages/action/action-list-page.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, effect, inject, signal, untracked } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { LAYOUT_AUTH_STATE } from '@flusys/ng-layout';\nimport { AngularModule, PrimeModule } from '@flusys/ng-shared';\nimport { MessageService, ConfirmationService, TreeNode } from 'primeng/api';\nimport { TagModule } from 'primeng/tag';\nimport { firstValueFrom } from 'rxjs';\nimport { ActionApiService } from '../../services/action-api.service';\nimport { ActionType, IAction } from '../../interfaces/action.interface';\nimport { convertActionToTreeNode } from '../../utils/tree-utils';\n\n/**\n * Action List Page Component\n *\n * Displays hierarchical tree of actions with search, filter, and CRUD operations\n */\n@Component({\n selector: 'lib-action-list-page',\n standalone: true,\n imports: [AngularModule, PrimeModule, TagModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div class=\"card\">\n <div class=\"flex justify-between items-center mb-4\">\n <h3 class=\"text-xl font-semibold\">Actions</h3>\n <p-button\n label=\"New Action\"\n icon=\"pi pi-plus\"\n (onClick)=\"onCreate()\" />\n </div>\n\n <p-treeTable\n [value]=\"treeNodes()\"\n [loading]=\"isLoading()\"\n [scrollable]=\"true\"\n scrollHeight=\"flex\"\n dataKey=\"id\"\n styleClass=\"p-treetable-sm\">\n <ng-template pTemplate=\"header\">\n <tr>\n <th>Name</th>\n <th>Code</th>\n <th>Action Type</th>\n <th>Active</th>\n <th>Read Only</th>\n <th style=\"width: 150px\">Actions</th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowNode let-rowData=\"rowData\">\n <tr>\n <td>\n <p-treeTableToggler [rowNode]=\"rowNode\" />\n {{ rowData.name }}\n </td>\n <td>{{ rowData.code ?? '-' }}</td>\n <td>\n <p-tag\n [value]=\"getActionTypeLabel(rowData.actionType)\"\n [severity]=\"getActionTypeSeverity(rowData.actionType)\" />\n </td>\n <td>\n <p-tag\n [value]=\"rowData.isActive ? 'Active' : 'Inactive'\"\n [severity]=\"rowData.isActive ? 'success' : 'secondary'\" />\n </td>\n <td>\n <p-tag\n [value]=\"rowData.readOnly ? 'Yes' : 'No'\"\n [severity]=\"rowData.readOnly ? 'warn' : 'secondary'\" />\n </td>\n <td>\n <div class=\"flex gap-2\">\n <p-button\n icon=\"pi pi-pencil\"\n [outlined]=\"true\"\n severity=\"info\"\n size=\"small\"\n (onClick)=\"onEdit(rowData)\" />\n <p-button\n icon=\"pi pi-trash\"\n [outlined]=\"true\"\n severity=\"danger\"\n size=\"small\"\n [disabled]=\"rowData.readOnly\"\n (onClick)=\"onDelete(rowData)\" />\n </div>\n </td>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"emptymessage\">\n <tr>\n <td colspan=\"6\" class=\"text-center\">No actions found.</td>\n </tr>\n </ng-template>\n </p-treeTable>\n </div>\n `,\n})\nexport class ActionListPageComponent {\n private readonly router = inject(Router);\n private readonly companyContext = inject(LAYOUT_AUTH_STATE);\n private readonly actionApi = inject(ActionApiService);\n private readonly messageService = inject(MessageService);\n private readonly confirmationService = inject(ConfirmationService);\n\n readonly isLoading = signal(false);\n readonly treeNodes = signal<TreeNode<IAction>[]>([]);\n\n constructor() {\n effect(() => {\n this.companyContext.currentCompanyInfo();\n untracked(() => this.loadActions());\n });\n }\n\n private async loadActions(): Promise<void> {\n this.isLoading.set(true);\n try {\n const response = await firstValueFrom(this.actionApi.getTree());\n const tree = response?.success ? response.data ?? [] : [];\n this.treeNodes.set(convertActionToTreeNode(tree));\n } catch {\n this.messageService.add({\n severity: 'error',\n summary: 'Error',\n detail: 'Failed to load actions',\n });\n } finally {\n this.isLoading.set(false);\n }\n }\n\n /**\n * Get action type label\n */\n getActionTypeLabel(type: ActionType): string {\n switch (type) {\n case ActionType.BACKEND:\n return 'Backend';\n case ActionType.FRONTEND:\n return 'Frontend';\n case ActionType.BOTH:\n return 'Both';\n default:\n return 'Unknown';\n }\n }\n\n /**\n * Get action type severity for tag styling\n */\n getActionTypeSeverity(type: ActionType): 'info' | 'success' | 'warn' {\n switch (type) {\n case ActionType.BACKEND:\n return 'info';\n case ActionType.FRONTEND:\n return 'success';\n case ActionType.BOTH:\n return 'warn';\n default:\n return 'info';\n }\n }\n\n onCreate(): void {\n this.router.navigate(['/iam/actions/new']);\n }\n\n onEdit(action: IAction): void {\n this.router.navigate(['/iam/actions', action.id]);\n }\n\n onDelete(action: IAction): void {\n if (!action?.id || !action?.name) {\n return;\n }\n\n this.confirmationService.confirm({\n message: `Are you sure you want to delete action \"${action.name}\"?`,\n header: 'Confirm Delete',\n icon: 'pi pi-exclamation-triangle',\n accept: async () => {\n try {\n await this.actionApi.deleteAsync({ id: action.id, type: 'delete' });\n await this.loadActions();\n this.messageService.add({\n severity: 'success',\n summary: 'Success',\n detail: 'Action deleted successfully',\n });\n } catch (error) {\n this.messageService.add({\n severity: 'error',\n summary: 'Error',\n detail: error instanceof Error ? error.message : 'Failed to delete action',\n });\n }\n },\n });\n }\n}\n"],"names":["i1","i2","i3","i4"],"mappings":";;;;;;;;;;;;;;AAWA;;;;AAIG;MAmFU,uBAAuB,CAAA;AACjB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAC1C,IAAA,SAAS,GAAG,MAAM,CAAC,gBAAgB,CAAC;AACpC,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;AACvC,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AAEzD,IAAA,SAAS,GAAG,MAAM,CAAC,KAAK,qDAAC;AACzB,IAAA,SAAS,GAAG,MAAM,CAAsB,EAAE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