cloud-ide-core 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -0
- package/esm2022/cloud-ide-core.mjs +5 -0
- package/esm2022/lib/cloud-ide-core.component.mjs +19 -0
- package/esm2022/lib/cloud-ide-core.service.mjs +14 -0
- package/esm2022/lib/core/department-management/components/department-list/department-list.component.mjs +768 -0
- package/esm2022/lib/core/department-management/index.mjs +5 -0
- package/esm2022/lib/core/department-management/services/department-management.service.mjs +187 -0
- package/esm2022/lib/core/designation-management/components/designation-list/designation-list.component.mjs +1122 -0
- package/esm2022/lib/core/designation-management/index.mjs +5 -0
- package/esm2022/lib/core/designation-management/services/designation-management.service.mjs +194 -0
- package/esm2022/lib/core/grade-level-management/components/grade-level-list/grade-level-list.component.mjs +794 -0
- package/esm2022/lib/core/grade-level-management/index.mjs +5 -0
- package/esm2022/lib/core/grade-level-management/services/grade-level-management.service.mjs +172 -0
- package/esm2022/lib/core/menu-management/components/menu-list/menu-list.component.mjs +1135 -0
- package/esm2022/lib/core/menu-management/index.mjs +10 -0
- package/esm2022/lib/core/menu-management/interfaces/menu-item.interface.mjs +11 -0
- package/esm2022/lib/core/menu-management/mock-data/menu-items.json +311 -0
- package/esm2022/lib/core/menu-management/services/menu-management.service.mjs +230 -0
- package/esm2022/lib/core/page-management/components/page-controls/page-controls.component.mjs +483 -0
- package/esm2022/lib/core/page-management/components/page-list/page-list.component.mjs +393 -0
- package/esm2022/lib/core/page-management/components/page-theme/page-theme.component.mjs +767 -0
- package/esm2022/lib/core/page-management/index.mjs +10 -0
- package/esm2022/lib/core/page-management/services/page-controls.service.mjs +136 -0
- package/esm2022/lib/core/page-management/services/page-management.service.mjs +98 -0
- package/esm2022/lib/core/page-management/services/page-theme.service.mjs +107 -0
- package/esm2022/public-api.mjs +16 -0
- package/fesm2022/cloud-ide-core.mjs +6859 -0
- package/fesm2022/cloud-ide-core.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/cloud-ide-core.component.d.ts +5 -0
- package/lib/cloud-ide-core.service.d.ts +6 -0
- package/lib/core/department-management/components/department-list/department-list.component.d.ts +178 -0
- package/lib/core/department-management/index.d.ts +2 -0
- package/lib/core/department-management/services/department-management.service.d.ts +68 -0
- package/lib/core/designation-management/components/designation-list/designation-list.component.d.ts +242 -0
- package/lib/core/designation-management/index.d.ts +2 -0
- package/lib/core/designation-management/services/designation-management.service.d.ts +69 -0
- package/lib/core/grade-level-management/components/grade-level-list/grade-level-list.component.d.ts +199 -0
- package/lib/core/grade-level-management/index.d.ts +2 -0
- package/lib/core/grade-level-management/services/grade-level-management.service.d.ts +69 -0
- package/lib/core/menu-management/components/menu-list/menu-list.component.d.ts +278 -0
- package/lib/core/menu-management/index.d.ts +3 -0
- package/lib/core/menu-management/interfaces/menu-item.interface.d.ts +30 -0
- package/lib/core/menu-management/services/menu-management.service.d.ts +85 -0
- package/lib/core/page-management/components/page-controls/page-controls.component.d.ts +126 -0
- package/lib/core/page-management/components/page-list/page-list.component.d.ts +91 -0
- package/lib/core/page-management/components/page-theme/page-theme.component.d.ts +189 -0
- package/lib/core/page-management/index.d.ts +6 -0
- package/lib/core/page-management/services/page-controls.service.d.ts +54 -0
- package/lib/core/page-management/services/page-management.service.d.ts +42 -0
- package/lib/core/page-management/services/page-theme.service.d.ts +43 -0
- package/package.json +25 -0
- package/public-api.d.ts +7 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class CloudIdeCoreComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CloudIdeCoreComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CloudIdeCoreComponent, "cide-core", never, {}, {}, never, never, true, never>;
|
|
5
|
+
}
|
package/lib/core/department-management/components/department-list/department-list.component.d.ts
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { ICoreSydept } from 'cloud-ide-lms-model';
|
|
3
|
+
import { GridConfiguration, GridEvent, DropdownItem } from 'cloud-ide-element';
|
|
4
|
+
import { TemplateContext } from 'cloud-ide-element';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DepartmentListComponent {
|
|
7
|
+
private destroyRef;
|
|
8
|
+
private departmentService;
|
|
9
|
+
private appState;
|
|
10
|
+
private fb;
|
|
11
|
+
private router;
|
|
12
|
+
private confirmationService;
|
|
13
|
+
private notificationService;
|
|
14
|
+
departmentDetailsRendererTemplate: import("@angular/core").Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
15
|
+
departmentStatusRendererTemplate: import("@angular/core").Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
16
|
+
actionsDropdownRendererTemplate: import("@angular/core").Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
17
|
+
Math: Math;
|
|
18
|
+
departments: import("@angular/core").WritableSignal<ICoreSydept[]>;
|
|
19
|
+
loading: import("@angular/core").WritableSignal<boolean>;
|
|
20
|
+
error: import("@angular/core").WritableSignal<string | null>;
|
|
21
|
+
selectedItems: import("@angular/core").WritableSignal<string[]>;
|
|
22
|
+
searchTerm: import("@angular/core").WritableSignal<string>;
|
|
23
|
+
selectedParentDepartment: import("@angular/core").WritableSignal<ICoreSydept | null>;
|
|
24
|
+
retrievedDepartment: import("@angular/core").WritableSignal<ICoreSydept | null>;
|
|
25
|
+
isEditMode: import("@angular/core").WritableSignal<boolean>;
|
|
26
|
+
currentPage: import("@angular/core").WritableSignal<number>;
|
|
27
|
+
pageSize: import("@angular/core").WritableSignal<number>;
|
|
28
|
+
totalItems: import("@angular/core").WritableSignal<number>;
|
|
29
|
+
quickAddForm: import("@angular/forms").FormGroup<{
|
|
30
|
+
sydept_code: import("@angular/forms").FormControl<string>;
|
|
31
|
+
sydept_name: import("@angular/forms").FormControl<string>;
|
|
32
|
+
sydept_description: import("@angular/forms").FormControl<string>;
|
|
33
|
+
sydept_isactive: import("@angular/forms").FormControl<boolean>;
|
|
34
|
+
sydept_department_id_sydept: import("@angular/forms").FormControl<string>;
|
|
35
|
+
sydept_entity_id_syen: import("@angular/forms").FormControl<string>;
|
|
36
|
+
}>;
|
|
37
|
+
gridConfig: import("@angular/core").WritableSignal<GridConfiguration<ICoreSydept>>;
|
|
38
|
+
templateRenderers: import("@angular/core").Signal<Record<string, TemplateRef<TemplateContext<Record<string, unknown>>>>>;
|
|
39
|
+
/**
|
|
40
|
+
* Get template renderers for data grid
|
|
41
|
+
*/
|
|
42
|
+
getTemplateRenderers(): Record<string, TemplateRef<TemplateContext>>;
|
|
43
|
+
customRenderers: import("@angular/core").Signal<{
|
|
44
|
+
[x: string]: TemplateRef<TemplateContext<Record<string, unknown>>>;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Get custom renderers adapted for current data grid compatibility
|
|
48
|
+
*/
|
|
49
|
+
getCustomRenderers(): Record<string, (value: unknown, row: ICoreSydept) => string>;
|
|
50
|
+
actionHandlers: {
|
|
51
|
+
onEditDepartment: (row: ICoreSydept) => void;
|
|
52
|
+
onToggleDepartment: (row: ICoreSydept) => void;
|
|
53
|
+
onDeleteDepartment: (row: ICoreSydept) => Promise<void>;
|
|
54
|
+
onDepartmentRowClick: (row: ICoreSydept) => void;
|
|
55
|
+
onDepartmentRefresh: () => void;
|
|
56
|
+
onAddChild: (row: ICoreSydept) => void;
|
|
57
|
+
};
|
|
58
|
+
filteredItems: import("@angular/core").Signal<ICoreSydept[]>;
|
|
59
|
+
hasSelection: import("@angular/core").Signal<boolean>;
|
|
60
|
+
totalPages: import("@angular/core").Signal<number>;
|
|
61
|
+
hasNextPage: import("@angular/core").Signal<boolean>;
|
|
62
|
+
hasPreviousPage: import("@angular/core").Signal<boolean>;
|
|
63
|
+
constructor();
|
|
64
|
+
/**
|
|
65
|
+
* Initialize component with modern patterns
|
|
66
|
+
*/
|
|
67
|
+
private initializeComponent;
|
|
68
|
+
/**
|
|
69
|
+
* Setup event listeners for dropdown interactions
|
|
70
|
+
*/
|
|
71
|
+
private setupEventListeners;
|
|
72
|
+
/**
|
|
73
|
+
* Cleanup event listeners
|
|
74
|
+
*/
|
|
75
|
+
private cleanupEventListeners;
|
|
76
|
+
/**
|
|
77
|
+
* Expose global functions for dropdown interactions
|
|
78
|
+
*/
|
|
79
|
+
private exposeGlobalFunctions;
|
|
80
|
+
/**
|
|
81
|
+
* Load departments from service
|
|
82
|
+
*/
|
|
83
|
+
loadDepartments(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Update grid data
|
|
86
|
+
*/
|
|
87
|
+
private updateGridData;
|
|
88
|
+
/**
|
|
89
|
+
* Handle grid events
|
|
90
|
+
*/
|
|
91
|
+
onGridEvent(event: GridEvent<ICoreSydept>): void;
|
|
92
|
+
/**
|
|
93
|
+
* Handle department refresh
|
|
94
|
+
*/
|
|
95
|
+
onDepartmentRefresh(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Handle department row click
|
|
98
|
+
*/
|
|
99
|
+
onDepartmentRowClick(department: ICoreSydept): void;
|
|
100
|
+
/**
|
|
101
|
+
* Navigate to edit department form
|
|
102
|
+
*/
|
|
103
|
+
editDepartment(itemId: string): void;
|
|
104
|
+
/**
|
|
105
|
+
* Get department by ID using the API
|
|
106
|
+
*/
|
|
107
|
+
getDepartmentById(itemId: string): void;
|
|
108
|
+
/**
|
|
109
|
+
* Populate form with department data for editing
|
|
110
|
+
*/
|
|
111
|
+
populateFormForEdit(department: ICoreSydept): void;
|
|
112
|
+
/**
|
|
113
|
+
* Delete department
|
|
114
|
+
*/
|
|
115
|
+
deleteDepartment(itemId: string): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* Toggle department status
|
|
118
|
+
*/
|
|
119
|
+
toggleDepartmentStatus(itemId: string): void;
|
|
120
|
+
/**
|
|
121
|
+
* Quick add or update department using reactive form
|
|
122
|
+
*/
|
|
123
|
+
quickAddDepartment(): void;
|
|
124
|
+
/**
|
|
125
|
+
* Reset the quick add form to default values
|
|
126
|
+
*/
|
|
127
|
+
resetQuickAddForm(): void;
|
|
128
|
+
/**
|
|
129
|
+
* Handle adding a child department
|
|
130
|
+
*/
|
|
131
|
+
onAddChild(parentItem: ICoreSydept): void;
|
|
132
|
+
/**
|
|
133
|
+
* Clear selected parent department
|
|
134
|
+
*/
|
|
135
|
+
clearSelectedParent(): void;
|
|
136
|
+
/**
|
|
137
|
+
* Handle click outside dropdown
|
|
138
|
+
*/
|
|
139
|
+
private handleClickOutside;
|
|
140
|
+
/**
|
|
141
|
+
* Handle dropdown action clicks
|
|
142
|
+
*/
|
|
143
|
+
private handleDropdownAction;
|
|
144
|
+
/**
|
|
145
|
+
* Toggle dropdown visibility
|
|
146
|
+
*/
|
|
147
|
+
toggleDropdown(itemId: string): void;
|
|
148
|
+
/**
|
|
149
|
+
* Handle department action clicks
|
|
150
|
+
*/
|
|
151
|
+
handleDepartmentAction(action: string, itemId: string): void;
|
|
152
|
+
/**
|
|
153
|
+
* Get status display
|
|
154
|
+
*/
|
|
155
|
+
getStatusDisplay(isActive: boolean): string;
|
|
156
|
+
/**
|
|
157
|
+
* Get status class for styling
|
|
158
|
+
*/
|
|
159
|
+
getStatusClass(isActive: boolean): string;
|
|
160
|
+
/**
|
|
161
|
+
* Generate dropdown items for department actions
|
|
162
|
+
*/
|
|
163
|
+
getDropdownItems(row: ICoreSydept): DropdownItem[];
|
|
164
|
+
/**
|
|
165
|
+
* Handle dropdown item click
|
|
166
|
+
*/
|
|
167
|
+
onDropdownItemClick(item: DropdownItem, row: ICoreSydept): void;
|
|
168
|
+
/**
|
|
169
|
+
* Close all dropdowns
|
|
170
|
+
*/
|
|
171
|
+
private closeAllDropdowns;
|
|
172
|
+
/**
|
|
173
|
+
* Track by function for ngFor
|
|
174
|
+
*/
|
|
175
|
+
trackByItemId(index: number, item: ICoreSydept): string;
|
|
176
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DepartmentListComponent, never>;
|
|
177
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DepartmentListComponent, "cide-core-app-department-list", never, {}, {}, never, never, true, never>;
|
|
178
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ICoreSydept, departmentByIdControllerResponse, departmentDeleteControllerResponse, departmentControllerResponse, MDepartment, MDepartmentToggleStatusPayload, departmentToggleStatusControllerResponse } from 'cloud-ide-lms-model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DepartmentManagementService {
|
|
6
|
+
private http;
|
|
7
|
+
private departmentListSubject;
|
|
8
|
+
departmentList$: Observable<ICoreSydept[]>;
|
|
9
|
+
constructor(http: HttpClient);
|
|
10
|
+
/**
|
|
11
|
+
* Get department list from API
|
|
12
|
+
*/
|
|
13
|
+
getDepartmentList(body: MDepartment): Observable<departmentControllerResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Get department list from cache (if available)
|
|
16
|
+
*/
|
|
17
|
+
getDepartmentListFromCache(): ICoreSydept[];
|
|
18
|
+
/**
|
|
19
|
+
* Create new department
|
|
20
|
+
* POST ${coreRoutesUrl?.department} - payload: MDepartmentInsertUpdatePayload, response: departmentInsertUpdateControllerResponse
|
|
21
|
+
*/
|
|
22
|
+
createDepartment(department: ICoreSydept): Observable<departmentControllerResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Update existing department
|
|
25
|
+
* POST ${coreRoutesUrl?.department} - payload: MDepartmentInsertUpdatePayload, response: departmentInsertUpdateControllerResponse
|
|
26
|
+
*/
|
|
27
|
+
updateDepartment(id: string, department: ICoreSydept): Observable<departmentControllerResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Get department by ID
|
|
30
|
+
* GET ${coreRoutesUrl?.department}/byId/:query - payload: MDepartmentGetByIdPayload, response: departmentByIdControllerResponse
|
|
31
|
+
*/
|
|
32
|
+
getDepartmentById(id: string): Observable<departmentByIdControllerResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Delete department
|
|
35
|
+
* DELETE ${coreRoutesUrl?.department}/:query - payload: MDepartmentDeletePayload, response: departmentDeleteControllerResponse
|
|
36
|
+
*/
|
|
37
|
+
deleteDepartment(id: string): Observable<departmentDeleteControllerResponse>;
|
|
38
|
+
/**
|
|
39
|
+
* Delete multiple departments
|
|
40
|
+
*/
|
|
41
|
+
deleteMultipleDepartments(ids: string[]): Observable<{
|
|
42
|
+
success: boolean;
|
|
43
|
+
message?: string;
|
|
44
|
+
data?: unknown;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Toggle department active status
|
|
48
|
+
*/
|
|
49
|
+
toggleDepartmentStatus(payload: MDepartmentToggleStatusPayload): Observable<departmentToggleStatusControllerResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Find department by ID
|
|
52
|
+
*/
|
|
53
|
+
findDepartmentById(id: string, items?: ICoreSydept[]): ICoreSydept | null;
|
|
54
|
+
/**
|
|
55
|
+
* Get parent departments for dropdown selection
|
|
56
|
+
*/
|
|
57
|
+
getParentDepartments(excludeId?: string): ICoreSydept[];
|
|
58
|
+
/**
|
|
59
|
+
* Refresh department list from server
|
|
60
|
+
*/
|
|
61
|
+
private refreshDepartmentList;
|
|
62
|
+
/**
|
|
63
|
+
* Handle errors
|
|
64
|
+
*/
|
|
65
|
+
private handleError;
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DepartmentManagementService, never>;
|
|
67
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DepartmentManagementService>;
|
|
68
|
+
}
|
package/lib/core/designation-management/components/designation-list/designation-list.component.d.ts
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import { ICoreSydsg, ICoreSydsgl, ICoreSydept } from 'cloud-ide-lms-model';
|
|
3
|
+
import { GridConfiguration, GridEvent, DropdownItem } from 'cloud-ide-element';
|
|
4
|
+
import { TemplateContext } from 'cloud-ide-element';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
interface HierarchicalNode {
|
|
7
|
+
_id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
code: string;
|
|
10
|
+
description: string;
|
|
11
|
+
type: 'department' | 'designation';
|
|
12
|
+
level: number;
|
|
13
|
+
expanded: boolean;
|
|
14
|
+
hasChildren: boolean;
|
|
15
|
+
children: HierarchicalNode[];
|
|
16
|
+
status: boolean;
|
|
17
|
+
grade_level: string;
|
|
18
|
+
parentId: string | null;
|
|
19
|
+
}
|
|
20
|
+
export declare class DesignationListComponent {
|
|
21
|
+
private destroyRef;
|
|
22
|
+
private designationService;
|
|
23
|
+
private gradeLevelService;
|
|
24
|
+
private departmentService;
|
|
25
|
+
private appState;
|
|
26
|
+
private fb;
|
|
27
|
+
private router;
|
|
28
|
+
designationDetailsRendererTemplate: import("@angular/core").Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
29
|
+
designationStatusRendererTemplate: import("@angular/core").Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
30
|
+
actionsDropdownRendererTemplate: import("@angular/core").Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
31
|
+
Math: Math;
|
|
32
|
+
designations: import("@angular/core").WritableSignal<ICoreSydsg[]>;
|
|
33
|
+
departments: import("@angular/core").WritableSignal<ICoreSydept[]>;
|
|
34
|
+
gradeLevels: import("@angular/core").WritableSignal<ICoreSydsgl[]>;
|
|
35
|
+
loading: import("@angular/core").WritableSignal<boolean>;
|
|
36
|
+
error: import("@angular/core").WritableSignal<string | null>;
|
|
37
|
+
selectedItems: import("@angular/core").WritableSignal<string[]>;
|
|
38
|
+
searchTerm: import("@angular/core").WritableSignal<string>;
|
|
39
|
+
selectedParentDesignation: import("@angular/core").WritableSignal<ICoreSydsg | null>;
|
|
40
|
+
selectedParentDepartment: import("@angular/core").WritableSignal<ICoreSydept | null>;
|
|
41
|
+
retrievedDesignation: import("@angular/core").WritableSignal<ICoreSydsg | null>;
|
|
42
|
+
isEditMode: import("@angular/core").WritableSignal<boolean>;
|
|
43
|
+
currentPage: import("@angular/core").WritableSignal<number>;
|
|
44
|
+
pageSize: import("@angular/core").WritableSignal<number>;
|
|
45
|
+
totalItems: import("@angular/core").WritableSignal<number>;
|
|
46
|
+
quickAddForm: import("@angular/forms").FormGroup<{
|
|
47
|
+
sydsg_name: import("@angular/forms").FormControl<string>;
|
|
48
|
+
sydsg_code: import("@angular/forms").FormControl<string>;
|
|
49
|
+
sydsg_description: import("@angular/forms").FormControl<string>;
|
|
50
|
+
sydsg_prent_id_desg: import("@angular/forms").FormControl<string>;
|
|
51
|
+
sydsg_department_id_sydpt: import("@angular/forms").FormControl<string>;
|
|
52
|
+
sydsg_grade_level_id_sydsgl: import("@angular/forms").FormControl<string>;
|
|
53
|
+
sydsg_isactive: import("@angular/forms").FormControl<boolean>;
|
|
54
|
+
desg_entity_id_syen: import("@angular/forms").FormControl<string>;
|
|
55
|
+
}>;
|
|
56
|
+
gridConfig: import("@angular/core").WritableSignal<GridConfiguration<ICoreSydsg>>;
|
|
57
|
+
templateRenderers: import("@angular/core").Signal<Record<string, TemplateRef<TemplateContext<Record<string, unknown>>>>>;
|
|
58
|
+
/**
|
|
59
|
+
* Get template renderers for data grid
|
|
60
|
+
*/
|
|
61
|
+
getTemplateRenderers(): Record<string, TemplateRef<TemplateContext>>;
|
|
62
|
+
customRenderers: import("@angular/core").Signal<{
|
|
63
|
+
[x: string]: TemplateRef<TemplateContext<Record<string, unknown>>>;
|
|
64
|
+
}>;
|
|
65
|
+
/**
|
|
66
|
+
* Get custom renderers adapted for current data grid compatibility
|
|
67
|
+
*/
|
|
68
|
+
getCustomRenderers(): Record<string, (value: unknown, row: ICoreSydsg) => string>;
|
|
69
|
+
actionHandlers: {
|
|
70
|
+
onEditDesignation: (row: ICoreSydsg) => void;
|
|
71
|
+
onToggleDesignation: (row: ICoreSydsg) => void;
|
|
72
|
+
onDeleteDesignation: (row: ICoreSydsg) => void;
|
|
73
|
+
onDesignationRowClick: (row: ICoreSydsg) => void;
|
|
74
|
+
onDesignationRefresh: () => void;
|
|
75
|
+
onAddChild: (row: ICoreSydsg) => void;
|
|
76
|
+
};
|
|
77
|
+
filteredItems: import("@angular/core").Signal<ICoreSydsg[]>;
|
|
78
|
+
hasSelection: import("@angular/core").Signal<boolean>;
|
|
79
|
+
totalPages: import("@angular/core").Signal<number>;
|
|
80
|
+
hasNextPage: import("@angular/core").Signal<boolean>;
|
|
81
|
+
hasPreviousPage: import("@angular/core").Signal<boolean>;
|
|
82
|
+
gradeLevelOptions: import("@angular/core").Signal<{
|
|
83
|
+
value: string;
|
|
84
|
+
label: string;
|
|
85
|
+
}[]>;
|
|
86
|
+
departmentOptions: import("@angular/core").Signal<{
|
|
87
|
+
value: string;
|
|
88
|
+
label: string;
|
|
89
|
+
}[]>;
|
|
90
|
+
constructor();
|
|
91
|
+
/**
|
|
92
|
+
* Initialize component with modern patterns
|
|
93
|
+
*/
|
|
94
|
+
private initializeComponent;
|
|
95
|
+
/**
|
|
96
|
+
* Setup event listeners for dropdown interactions
|
|
97
|
+
*/
|
|
98
|
+
private setupEventListeners;
|
|
99
|
+
/**
|
|
100
|
+
* Cleanup event listeners
|
|
101
|
+
*/
|
|
102
|
+
private cleanupEventListeners;
|
|
103
|
+
/**
|
|
104
|
+
* Expose global functions for dropdown interactions
|
|
105
|
+
*/
|
|
106
|
+
private exposeGlobalFunctions;
|
|
107
|
+
/**
|
|
108
|
+
* Load designations from service
|
|
109
|
+
*/
|
|
110
|
+
loadDesignations(): void;
|
|
111
|
+
/**
|
|
112
|
+
* Load departments from service
|
|
113
|
+
*/
|
|
114
|
+
loadDepartments(): void;
|
|
115
|
+
/**
|
|
116
|
+
* Load grade levels from service
|
|
117
|
+
*/
|
|
118
|
+
loadGradeLevels(): void;
|
|
119
|
+
/**
|
|
120
|
+
* Build hierarchical tree structure from departments and designations
|
|
121
|
+
*/
|
|
122
|
+
private buildHierarchicalData;
|
|
123
|
+
/**
|
|
124
|
+
* Build department hierarchy with parent-child relationships
|
|
125
|
+
*/
|
|
126
|
+
private buildDepartmentHierarchy;
|
|
127
|
+
/**
|
|
128
|
+
* Add designations to their respective departments in the hierarchy
|
|
129
|
+
*/
|
|
130
|
+
private addDesignationsToDepartments;
|
|
131
|
+
/**
|
|
132
|
+
* Get grade level name by ID
|
|
133
|
+
*/
|
|
134
|
+
private getGradeLevelName;
|
|
135
|
+
/**
|
|
136
|
+
* Update grid data with hierarchical structure
|
|
137
|
+
*/
|
|
138
|
+
private updateGridData;
|
|
139
|
+
/**
|
|
140
|
+
* Flatten hierarchical data for grid display
|
|
141
|
+
*/
|
|
142
|
+
private flattenHierarchicalData;
|
|
143
|
+
/**
|
|
144
|
+
* Handle grid events
|
|
145
|
+
*/
|
|
146
|
+
onGridEvent(event: GridEvent<ICoreSydsg>): void;
|
|
147
|
+
/**
|
|
148
|
+
* Handle designation refresh
|
|
149
|
+
*/
|
|
150
|
+
onDesignationRefresh(): void;
|
|
151
|
+
/**
|
|
152
|
+
* Handle designation row click
|
|
153
|
+
*/
|
|
154
|
+
onDesignationRowClick(designation: ICoreSydsg): void;
|
|
155
|
+
/**
|
|
156
|
+
* Navigate to edit designation form
|
|
157
|
+
*/
|
|
158
|
+
editDesignation(itemId: string): void;
|
|
159
|
+
/**
|
|
160
|
+
* Get designation by ID using the API
|
|
161
|
+
*/
|
|
162
|
+
getDesignationById(itemId: string): void;
|
|
163
|
+
/**
|
|
164
|
+
* Populate form with designation data for editing
|
|
165
|
+
*/
|
|
166
|
+
populateFormForEdit(designation: ICoreSydsg): void;
|
|
167
|
+
/**
|
|
168
|
+
* Delete designation
|
|
169
|
+
*/
|
|
170
|
+
deleteDesignation(itemId: string): void;
|
|
171
|
+
/**
|
|
172
|
+
* Toggle designation status
|
|
173
|
+
*/
|
|
174
|
+
toggleDesignationStatus(itemId: string): void;
|
|
175
|
+
/**
|
|
176
|
+
* Quick add or update designation using reactive form
|
|
177
|
+
*/
|
|
178
|
+
quickAddDesignation(): void;
|
|
179
|
+
/**
|
|
180
|
+
* Reset the quick add form to default values
|
|
181
|
+
*/
|
|
182
|
+
resetQuickAddForm(): void;
|
|
183
|
+
/**
|
|
184
|
+
* Handle adding a child designation
|
|
185
|
+
*/
|
|
186
|
+
onAddChild(parentItem: ICoreSydsg): void;
|
|
187
|
+
/**
|
|
188
|
+
* Clear selected parent designation
|
|
189
|
+
*/
|
|
190
|
+
clearSelectedParent(): void;
|
|
191
|
+
/**
|
|
192
|
+
* Clear selected parent department
|
|
193
|
+
*/
|
|
194
|
+
clearSelectedParentDepartment(): void;
|
|
195
|
+
/**
|
|
196
|
+
* Handle department selection
|
|
197
|
+
*/
|
|
198
|
+
onDepartmentSelect(department: ICoreSydept): void;
|
|
199
|
+
/**
|
|
200
|
+
* Handle click outside dropdown
|
|
201
|
+
*/
|
|
202
|
+
private handleClickOutside;
|
|
203
|
+
/**
|
|
204
|
+
* Handle dropdown action clicks
|
|
205
|
+
*/
|
|
206
|
+
private handleDropdownAction;
|
|
207
|
+
/**
|
|
208
|
+
* Toggle dropdown visibility
|
|
209
|
+
*/
|
|
210
|
+
toggleDropdown(itemId: string): void;
|
|
211
|
+
/**
|
|
212
|
+
* Handle designation action clicks
|
|
213
|
+
*/
|
|
214
|
+
handleDesignationAction(action: string, itemId: string): void;
|
|
215
|
+
/**
|
|
216
|
+
* Get status display
|
|
217
|
+
*/
|
|
218
|
+
getStatusDisplay(isActive: boolean): string;
|
|
219
|
+
/**
|
|
220
|
+
* Get status class for styling
|
|
221
|
+
*/
|
|
222
|
+
getStatusClass(isActive: boolean): string;
|
|
223
|
+
/**
|
|
224
|
+
* Generate dropdown items for designation actions
|
|
225
|
+
*/
|
|
226
|
+
getDropdownItems(row: HierarchicalNode): DropdownItem[];
|
|
227
|
+
/**
|
|
228
|
+
* Handle dropdown item click
|
|
229
|
+
*/
|
|
230
|
+
onDropdownItemClick(item: DropdownItem, row: HierarchicalNode): void;
|
|
231
|
+
/**
|
|
232
|
+
* Close all dropdowns
|
|
233
|
+
*/
|
|
234
|
+
private closeAllDropdowns;
|
|
235
|
+
/**
|
|
236
|
+
* Track by function for ngFor
|
|
237
|
+
*/
|
|
238
|
+
trackByItemId(index: number, item: ICoreSydsg): string;
|
|
239
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DesignationListComponent, never>;
|
|
240
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DesignationListComponent, "cide-core-app-designation-list", never, {}, {}, never, never, true, never>;
|
|
241
|
+
}
|
|
242
|
+
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ICoreSydsg, designationByIdControllerResponse, designationDeleteControllerResponse, designationControllerResponse, designationInsertUpdateControllerResponse, MDesignation } from 'cloud-ide-lms-model';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DesignationManagementService {
|
|
6
|
+
private http;
|
|
7
|
+
private apiUrl;
|
|
8
|
+
private designationListSubject;
|
|
9
|
+
designationList$: Observable<ICoreSydsg[]>;
|
|
10
|
+
constructor(http: HttpClient);
|
|
11
|
+
/**
|
|
12
|
+
* Get designation list from API
|
|
13
|
+
*/
|
|
14
|
+
getDesignationList(body: MDesignation): Observable<designationControllerResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Get designation list from cache (if available)
|
|
17
|
+
*/
|
|
18
|
+
getDesignationListFromCache(): ICoreSydsg[];
|
|
19
|
+
/**
|
|
20
|
+
* Create new designation
|
|
21
|
+
* POST ${coreRoutesUrl?.designation} - payload: MDesignationInsertUpdatePayload, response: designationInsertUpdateControllerResponse
|
|
22
|
+
*/
|
|
23
|
+
createDesignation(designation: ICoreSydsg): Observable<designationInsertUpdateControllerResponse>;
|
|
24
|
+
/**
|
|
25
|
+
* Update existing designation
|
|
26
|
+
* POST ${coreRoutesUrl?.designation} - payload: MDesignationInsertUpdatePayload, response: designationInsertUpdateControllerResponse
|
|
27
|
+
*/
|
|
28
|
+
updateDesignation(id: string, designation: ICoreSydsg): Observable<designationInsertUpdateControllerResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* Get designation by ID
|
|
31
|
+
* GET ${coreRoutesUrl?.designation}/byId/:query - payload: MDesignationGetByIdPayload, response: designationByIdControllerResponse
|
|
32
|
+
*/
|
|
33
|
+
getDesignationById(id: string): Observable<designationByIdControllerResponse>;
|
|
34
|
+
/**
|
|
35
|
+
* Delete designation
|
|
36
|
+
* DELETE ${coreRoutesUrl?.designation}/:query - payload: MDesignationDeletePayload, response: designationDeleteControllerResponse
|
|
37
|
+
*/
|
|
38
|
+
deleteDesignation(id: string): Observable<designationDeleteControllerResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Delete multiple designations
|
|
41
|
+
*/
|
|
42
|
+
deleteMultipleDesignations(ids: string[]): Observable<{
|
|
43
|
+
success: boolean;
|
|
44
|
+
message?: string;
|
|
45
|
+
data?: unknown;
|
|
46
|
+
}>;
|
|
47
|
+
/**
|
|
48
|
+
* Toggle designation active status
|
|
49
|
+
*/
|
|
50
|
+
toggleDesignationStatus(id: string): Observable<designationControllerResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* Find designation by ID
|
|
53
|
+
*/
|
|
54
|
+
findDesignationById(id: string, items?: ICoreSydsg[]): ICoreSydsg | null;
|
|
55
|
+
/**
|
|
56
|
+
* Get parent designations for dropdown selection
|
|
57
|
+
*/
|
|
58
|
+
getParentDesignations(excludeId?: string): ICoreSydsg[];
|
|
59
|
+
/**
|
|
60
|
+
* Refresh designation list from server
|
|
61
|
+
*/
|
|
62
|
+
private refreshDesignationList;
|
|
63
|
+
/**
|
|
64
|
+
* Handle errors
|
|
65
|
+
*/
|
|
66
|
+
private handleError;
|
|
67
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DesignationManagementService, never>;
|
|
68
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DesignationManagementService>;
|
|
69
|
+
}
|