cloud-ide-academics 0.0.35 → 0.0.36
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-academics-class-program-term-create.component-CvjHi7-O.mjs → cloud-ide-academics-class-program-term-create.component-DJQTpKeq.mjs} +37 -19
- package/fesm2022/cloud-ide-academics-class-program-term-create.component-DJQTpKeq.mjs.map +1 -0
- package/fesm2022/{cloud-ide-academics-class-program-term-list.component-BEfiCtrg.mjs → cloud-ide-academics-class-program-term-list.component-BpjWSltB.mjs} +29 -5
- package/fesm2022/cloud-ide-academics-class-program-term-list.component-BpjWSltB.mjs.map +1 -0
- package/fesm2022/{cloud-ide-academics-cloud-ide-academics-B3bMr7K9.mjs → cloud-ide-academics-cloud-ide-academics-DTKiLHAW.mjs} +231 -42
- package/fesm2022/cloud-ide-academics-cloud-ide-academics-DTKiLHAW.mjs.map +1 -0
- package/fesm2022/{cloud-ide-academics-program-class-create.component-CRkNKdub.mjs → cloud-ide-academics-program-class-create.component-B6xB_hrJ.mjs} +24 -12
- package/fesm2022/cloud-ide-academics-program-class-create.component-B6xB_hrJ.mjs.map +1 -0
- package/fesm2022/{cloud-ide-academics-program-class-list.component-D1qFXuRT.mjs → cloud-ide-academics-program-class-list.component-BLR9XYoZ.mjs} +25 -5
- package/fesm2022/cloud-ide-academics-program-class-list.component-BLR9XYoZ.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics-student-list.component-DwweQJh-.mjs +445 -0
- package/fesm2022/cloud-ide-academics-student-list.component-DwweQJh-.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics-teacher-list.component-BaWKpb8C.mjs +453 -0
- package/fesm2022/cloud-ide-academics-teacher-list.component-BaWKpb8C.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics.mjs +1 -1
- package/index.d.ts +19 -0
- package/package.json +1 -1
- package/fesm2022/cloud-ide-academics-class-program-term-create.component-CvjHi7-O.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-class-program-term-list.component-BEfiCtrg.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-cloud-ide-academics-B3bMr7K9.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-program-class-create.component-CRkNKdub.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-program-class-list.component-D1qFXuRT.mjs.map +0 -1
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, viewChild, signal, computed, Component } from '@angular/core';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { FormsModule } from '@angular/forms';
|
|
5
|
+
import { Router, ActivatedRoute } from '@angular/router';
|
|
6
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
+
import { NotificationService, ConfirmationService, CideIconComponent, CideEleDropdownComponent, CideEleButtonComponent, CideEleDataGridComponent } from 'cloud-ide-element';
|
|
8
|
+
import { ComponentContextService, RightsService, CideLytSharedWrapperComponent } from 'cloud-ide-layout';
|
|
9
|
+
import { USER_SERVICE_TOKEN } from 'cloud-ide-shared';
|
|
10
|
+
import { generateStringFromObject } from 'cloud-ide-lms-model';
|
|
11
|
+
|
|
12
|
+
class TeacherListComponent {
|
|
13
|
+
shared_wrapper_setup_param = { sypg_page_code: "academics_teacher_list" };
|
|
14
|
+
destroyRef = inject(DestroyRef);
|
|
15
|
+
userMasterService = inject(USER_SERVICE_TOKEN);
|
|
16
|
+
router = inject(Router);
|
|
17
|
+
route = inject(ActivatedRoute);
|
|
18
|
+
notificationService = inject(NotificationService);
|
|
19
|
+
confirmationService = inject(ConfirmationService);
|
|
20
|
+
componentContextService = inject(ComponentContextService);
|
|
21
|
+
rightsService = inject(RightsService);
|
|
22
|
+
// ViewChild for templates
|
|
23
|
+
teacherDetailsRendererTemplate = viewChild('teacherDetailsRendererTemplate', ...(ngDevMode ? [{ debugName: "teacherDetailsRendererTemplate" }] : []));
|
|
24
|
+
contactInfoRendererTemplate = viewChild('contactInfoRendererTemplate', ...(ngDevMode ? [{ debugName: "contactInfoRendererTemplate" }] : []));
|
|
25
|
+
statusRendererTemplate = viewChild('statusRendererTemplate', ...(ngDevMode ? [{ debugName: "statusRendererTemplate" }] : []));
|
|
26
|
+
actionsDropdownRendererTemplate = viewChild('actionsDropdownRendererTemplate', ...(ngDevMode ? [{ debugName: "actionsDropdownRendererTemplate" }] : []));
|
|
27
|
+
// State
|
|
28
|
+
teachers = signal([], ...(ngDevMode ? [{ debugName: "teachers" }] : []));
|
|
29
|
+
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
30
|
+
pageIndex = signal(1, ...(ngDevMode ? [{ debugName: "pageIndex" }] : []));
|
|
31
|
+
pageSize = signal(10, ...(ngDevMode ? [{ debugName: "pageSize" }] : []));
|
|
32
|
+
total = signal(0, ...(ngDevMode ? [{ debugName: "total" }] : []));
|
|
33
|
+
searchQuery = signal('', ...(ngDevMode ? [{ debugName: "searchQuery" }] : []));
|
|
34
|
+
// Rights computed signals
|
|
35
|
+
canCreate = computed(() => this.rightsService.hasRight('CREATE'), ...(ngDevMode ? [{ debugName: "canCreate" }] : []));
|
|
36
|
+
canEdit = computed(() => this.rightsService.hasRight('EDIT'), ...(ngDevMode ? [{ debugName: "canEdit" }] : []));
|
|
37
|
+
canDelete = computed(() => this.rightsService.hasRight('DELETE'), ...(ngDevMode ? [{ debugName: "canDelete" }] : []));
|
|
38
|
+
canView = computed(() => this.rightsService.hasRight('VIEW'), ...(ngDevMode ? [{ debugName: "canView" }] : []));
|
|
39
|
+
// Grid configuration
|
|
40
|
+
gridConfig = computed(() => ({
|
|
41
|
+
id: 'teachers-grid',
|
|
42
|
+
responsive: true,
|
|
43
|
+
data: this.teachers(),
|
|
44
|
+
columns: [
|
|
45
|
+
{
|
|
46
|
+
key: 'teacher_details',
|
|
47
|
+
header: 'Teacher Details',
|
|
48
|
+
type: 'custom',
|
|
49
|
+
width: '300px',
|
|
50
|
+
sortable: true,
|
|
51
|
+
renderer: 'teacherDetailsRendererTemplate'
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
key: 'contact_info',
|
|
55
|
+
header: 'Contact Information',
|
|
56
|
+
type: 'custom',
|
|
57
|
+
width: '250px',
|
|
58
|
+
sortable: false,
|
|
59
|
+
renderer: 'contactInfoRendererTemplate'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
key: 'user_isactive',
|
|
63
|
+
header: 'Status',
|
|
64
|
+
type: 'custom',
|
|
65
|
+
width: '120px',
|
|
66
|
+
sortable: true,
|
|
67
|
+
renderer: 'statusRendererTemplate'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: 'actions',
|
|
71
|
+
header: 'Actions',
|
|
72
|
+
type: 'actions',
|
|
73
|
+
width: '100px',
|
|
74
|
+
sortable: false,
|
|
75
|
+
renderer: 'actionsDropdownRendererTemplate'
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
pagination: {
|
|
79
|
+
enabled: true,
|
|
80
|
+
pageSize: this.pageSize(),
|
|
81
|
+
pageSizeOptions: [10, 25, 50, 100],
|
|
82
|
+
showQuickJump: true,
|
|
83
|
+
showPageInfo: true,
|
|
84
|
+
showRefresh: true
|
|
85
|
+
},
|
|
86
|
+
search: {
|
|
87
|
+
enabled: true,
|
|
88
|
+
placeholder: 'Search teachers by name, ID, email...',
|
|
89
|
+
searchableColumns: ['user_fullname', 'user_username', 'user_emailid'],
|
|
90
|
+
debounceMs: 300
|
|
91
|
+
},
|
|
92
|
+
loading: {
|
|
93
|
+
useDefer: true,
|
|
94
|
+
skeletonRows: 5,
|
|
95
|
+
showOverlay: false
|
|
96
|
+
},
|
|
97
|
+
rowHeight: 70
|
|
98
|
+
}), ...(ngDevMode ? [{ debugName: "gridConfig" }] : []));
|
|
99
|
+
templateRenderers = computed(() => ({
|
|
100
|
+
teacherDetailsRendererTemplate: this.teacherDetailsRendererTemplate(),
|
|
101
|
+
contactInfoRendererTemplate: this.contactInfoRendererTemplate(),
|
|
102
|
+
statusRendererTemplate: this.statusRendererTemplate(),
|
|
103
|
+
actionsDropdownRendererTemplate: this.actionsDropdownRendererTemplate()
|
|
104
|
+
}), ...(ngDevMode ? [{ debugName: "templateRenderers" }] : []));
|
|
105
|
+
ngOnInit() {
|
|
106
|
+
// Initialize rights for teacher management
|
|
107
|
+
this.rightsService.initializeRights('teacher_list');
|
|
108
|
+
this.loadTeachers();
|
|
109
|
+
}
|
|
110
|
+
ngOnDestroy() {
|
|
111
|
+
// Cleanup handled by takeUntilDestroyed
|
|
112
|
+
}
|
|
113
|
+
loadTeachers() {
|
|
114
|
+
this.loading.set(true);
|
|
115
|
+
const payload = {
|
|
116
|
+
pageIndex: this.pageIndex(),
|
|
117
|
+
pageSize: this.pageSize(),
|
|
118
|
+
query: this.searchQuery() || undefined,
|
|
119
|
+
pagination: true
|
|
120
|
+
};
|
|
121
|
+
this.userMasterService.getUserList(payload)
|
|
122
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
123
|
+
.subscribe({
|
|
124
|
+
next: (response) => {
|
|
125
|
+
if (response.success && response.data) {
|
|
126
|
+
// Filter for teachers only based on user_type_mapping
|
|
127
|
+
const teachers = response.data.filter(user => user.user_type_mapping?.syutm_user_type === 'TEACHER');
|
|
128
|
+
this.teachers.set(teachers);
|
|
129
|
+
this.total.set(teachers.length);
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
this.teachers.set([]);
|
|
133
|
+
this.total.set(0);
|
|
134
|
+
}
|
|
135
|
+
this.loading.set(false);
|
|
136
|
+
},
|
|
137
|
+
error: (error) => {
|
|
138
|
+
console.error('Error loading teachers:', error);
|
|
139
|
+
this.notificationService.error('Failed to load teachers. Please try again.');
|
|
140
|
+
this.loading.set(false);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
onGridEvent(event) {
|
|
145
|
+
if (event.type === 'pageChange') {
|
|
146
|
+
if (event.data && typeof event.data === 'object' && 'pageIndex' in event.data) {
|
|
147
|
+
this.pageIndex.set(event.data['pageIndex']);
|
|
148
|
+
this.loadTeachers();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
else if (event.type === 'search') {
|
|
152
|
+
if (event.data && typeof event.data === 'object' && 'query' in event.data) {
|
|
153
|
+
this.searchQuery.set(event.data['query']);
|
|
154
|
+
this.pageIndex.set(1);
|
|
155
|
+
this.loadTeachers();
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
else if (event.type === 'refresh') {
|
|
159
|
+
this.loadTeachers();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
getActionDropdownItems(row) {
|
|
163
|
+
return [
|
|
164
|
+
{ id: 'view', label: 'View Profile', icon: 'visibility' },
|
|
165
|
+
{ id: 'edit', label: 'Edit', icon: 'edit' },
|
|
166
|
+
{ id: 'delete', label: 'Delete', icon: 'delete' }
|
|
167
|
+
];
|
|
168
|
+
}
|
|
169
|
+
onDropdownItemClick(item, row) {
|
|
170
|
+
switch (item.id) {
|
|
171
|
+
case 'view':
|
|
172
|
+
this.viewTeacher(row);
|
|
173
|
+
break;
|
|
174
|
+
case 'edit':
|
|
175
|
+
this.editTeacher(row);
|
|
176
|
+
break;
|
|
177
|
+
case 'delete':
|
|
178
|
+
this.deleteTeacher(row);
|
|
179
|
+
break;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
createNewTeacher() {
|
|
183
|
+
if (!this.rightsService.hasRight('CREATE')) {
|
|
184
|
+
this.notificationService.error('You do not have permission to create teachers');
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
this.router.navigate(['/control-panel/academics/teacher/create']);
|
|
188
|
+
}
|
|
189
|
+
viewTeacher(teacher) {
|
|
190
|
+
if (!this.rightsService.hasRight('VIEW')) {
|
|
191
|
+
this.notificationService.error('You do not have permission to view teachers');
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
const query = generateStringFromObject({ user_id: teacher._id });
|
|
195
|
+
this.router.navigate(['/control-panel/academics/teacher/view', query]);
|
|
196
|
+
}
|
|
197
|
+
editTeacher(teacher) {
|
|
198
|
+
if (!this.rightsService.hasRight('EDIT')) {
|
|
199
|
+
this.notificationService.error('You do not have permission to edit teachers');
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
const query = generateStringFromObject({ user_id: teacher._id });
|
|
203
|
+
this.router.navigate(['/control-panel/academics/teacher/edit', query]);
|
|
204
|
+
}
|
|
205
|
+
deleteTeacher(teacher) {
|
|
206
|
+
if (!this.rightsService.hasRight('DELETE')) {
|
|
207
|
+
this.notificationService.error('You do not have permission to delete teachers');
|
|
208
|
+
return;
|
|
209
|
+
}
|
|
210
|
+
this.confirmationService.confirmDelete(teacher.user_fullname || 'Unknown')
|
|
211
|
+
.then((confirmed) => {
|
|
212
|
+
if (confirmed && teacher._id) {
|
|
213
|
+
this.userMasterService.deleteUserMaster(teacher._id)
|
|
214
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
215
|
+
.subscribe({
|
|
216
|
+
next: () => {
|
|
217
|
+
this.notificationService.success('Teacher deleted successfully');
|
|
218
|
+
this.loadTeachers();
|
|
219
|
+
},
|
|
220
|
+
error: () => {
|
|
221
|
+
this.notificationService.error('Failed to delete teacher');
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
})
|
|
226
|
+
.catch(() => {
|
|
227
|
+
// User cancelled - no action needed
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
getFullName(user) {
|
|
231
|
+
const parts = [user.user_firstname, user.user_middlename, user.user_lastname].filter(Boolean);
|
|
232
|
+
return parts.length > 0 ? parts.join(' ') : 'Unknown';
|
|
233
|
+
}
|
|
234
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: TeacherListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
235
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: TeacherListComponent, isStandalone: true, selector: "cide-academics-teacher-list", viewQueries: [{ propertyName: "teacherDetailsRendererTemplate", first: true, predicate: ["teacherDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "contactInfoRendererTemplate", first: true, predicate: ["contactInfoRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "statusRendererTemplate", first: true, predicate: ["statusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
236
|
+
<cide-lyt-shared-wrapper [shared_wrapper_setup_param]="shared_wrapper_setup_param">
|
|
237
|
+
<div class="tw-w-full tw-h-full tw-flex tw-flex-col tw-overflow-hidden">
|
|
238
|
+
<!-- Header Section -->
|
|
239
|
+
<div class="tw-flex-shrink-0 tw-w-full tw-px-4 sm:tw-px-6 tw-py-3 tw-bg-gray-50 tw-border-b tw-border-gray-200">
|
|
240
|
+
<div class="tw-flex tw-items-center tw-justify-between">
|
|
241
|
+
<div class="tw-flex tw-items-center tw-gap-3">
|
|
242
|
+
<cide-ele-icon class="tw-text-purple-600 tw-w-5 tw-h-5">person</cide-ele-icon>
|
|
243
|
+
<div>
|
|
244
|
+
<h5 class="tw-text-sm tw-font-semibold tw-text-gray-900">Teacher Management</h5>
|
|
245
|
+
<p class="tw-text-xs tw-text-gray-600">Manage and view all teacher profiles</p>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
@if (canCreate()) {
|
|
249
|
+
<button cideEleButton variant="primary" size="sm" (click)="createNewTeacher()" leftIcon="add">
|
|
250
|
+
Add Teacher
|
|
251
|
+
</button>
|
|
252
|
+
}
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
|
|
256
|
+
<!-- Data Grid Section -->
|
|
257
|
+
<div class="tw-flex-1 tw-h-auto tw-w-full tw-min-h-0 tw-relative tw-z-0 tw-overflow-hidden">
|
|
258
|
+
<cide-ele-data-grid
|
|
259
|
+
[config]="gridConfig()"
|
|
260
|
+
[templateRenderers]="templateRenderers()"
|
|
261
|
+
(gridEvent)="onGridEvent($event)">
|
|
262
|
+
</cide-ele-data-grid>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
<!-- Teacher Details Template -->
|
|
267
|
+
<ng-template #teacherDetailsRendererTemplate let-value="value" let-row="row" let-column="column">
|
|
268
|
+
<div class="tw-flex tw-items-start tw-space-x-3 tw-py-3">
|
|
269
|
+
<div class="tw-flex-shrink-0 tw-mt-0.5">
|
|
270
|
+
<div class="tw-w-10 tw-h-10 tw-bg-purple-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center">
|
|
271
|
+
<cide-ele-icon class="tw-text-purple-600 tw-w-5 tw-h-5">person</cide-ele-icon>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
<div class="tw-min-w-0 tw-flex-1 tw-space-y-1">
|
|
275
|
+
<div class="tw-text-sm tw-font-semibold tw-text-gray-900 tw-leading-5">
|
|
276
|
+
{{ row?.user_fullname || getFullName(row) }}
|
|
277
|
+
</div>
|
|
278
|
+
@if (row?.user_type_mapping?.syutm_type_specific_id) {
|
|
279
|
+
<div class="tw-text-xs tw-text-gray-600 tw-leading-4 tw-font-mono">
|
|
280
|
+
<span class="tw-font-medium">Teacher ID:</span> {{ row.user_type_mapping.syutm_type_specific_id }}
|
|
281
|
+
</div>
|
|
282
|
+
}
|
|
283
|
+
@if (row?.user_username) {
|
|
284
|
+
<div class="tw-text-xs tw-text-gray-500 tw-leading-4">
|
|
285
|
+
Username: {{ row.user_username }}
|
|
286
|
+
</div>
|
|
287
|
+
}
|
|
288
|
+
</div>
|
|
289
|
+
</div>
|
|
290
|
+
</ng-template>
|
|
291
|
+
|
|
292
|
+
<!-- Contact Info Template -->
|
|
293
|
+
<ng-template #contactInfoRendererTemplate let-value="value" let-row="row" let-column="column">
|
|
294
|
+
<div class="tw-py-3 tw-space-y-1">
|
|
295
|
+
@if (row?.user_emailid) {
|
|
296
|
+
<div class="tw-text-xs tw-text-gray-900 tw-flex tw-items-center">
|
|
297
|
+
<cide-ele-icon class="tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2">email</cide-ele-icon>
|
|
298
|
+
<span class="tw-truncate">{{ row.user_emailid }}</span>
|
|
299
|
+
</div>
|
|
300
|
+
}
|
|
301
|
+
@if (row?.user_mobileno) {
|
|
302
|
+
<div class="tw-text-xs tw-text-gray-600 tw-flex tw-items-center">
|
|
303
|
+
<cide-ele-icon class="tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2">phone</cide-ele-icon>
|
|
304
|
+
<span class="tw-truncate">{{ row.user_mobileno }}</span>
|
|
305
|
+
</div>
|
|
306
|
+
}
|
|
307
|
+
</div>
|
|
308
|
+
</ng-template>
|
|
309
|
+
|
|
310
|
+
<!-- Status Template -->
|
|
311
|
+
<ng-template #statusRendererTemplate let-value="value" let-row="row" let-column="column">
|
|
312
|
+
<div class="tw-flex tw-items-center tw-justify-center tw-py-3">
|
|
313
|
+
@if (row?.user_isactive) {
|
|
314
|
+
<span class="tw-inline-flex tw-items-center tw-px-2.5 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800">
|
|
315
|
+
Active
|
|
316
|
+
</span>
|
|
317
|
+
} @else {
|
|
318
|
+
<span class="tw-inline-flex tw-items-center tw-px-2.5 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-red-100 tw-text-red-800">
|
|
319
|
+
Inactive
|
|
320
|
+
</span>
|
|
321
|
+
}
|
|
322
|
+
</div>
|
|
323
|
+
</ng-template>
|
|
324
|
+
|
|
325
|
+
<!-- Actions Template -->
|
|
326
|
+
<ng-template #actionsDropdownRendererTemplate let-row="row" let-value="value" let-column="column">
|
|
327
|
+
<cide-ele-dropdown
|
|
328
|
+
[items]="getActionDropdownItems(row)"
|
|
329
|
+
(itemClick)="onDropdownItemClick($event, row)"
|
|
330
|
+
size="sm"
|
|
331
|
+
variant="ghost"
|
|
332
|
+
icon="more_vert">
|
|
333
|
+
</cide-ele-dropdown>
|
|
334
|
+
</ng-template>
|
|
335
|
+
</cide-lyt-shared-wrapper>
|
|
336
|
+
`, isInline: true, styles: [":host{@apply tw-w-full tw-h-full tw-flex tw-flex-col;}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }, { 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: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
337
|
+
}
|
|
338
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: TeacherListComponent, decorators: [{
|
|
339
|
+
type: Component,
|
|
340
|
+
args: [{ selector: 'cide-academics-teacher-list', standalone: true, imports: [
|
|
341
|
+
CommonModule,
|
|
342
|
+
FormsModule,
|
|
343
|
+
CideIconComponent,
|
|
344
|
+
CideEleDropdownComponent,
|
|
345
|
+
CideEleButtonComponent,
|
|
346
|
+
CideEleDataGridComponent,
|
|
347
|
+
CideLytSharedWrapperComponent
|
|
348
|
+
], template: `
|
|
349
|
+
<cide-lyt-shared-wrapper [shared_wrapper_setup_param]="shared_wrapper_setup_param">
|
|
350
|
+
<div class="tw-w-full tw-h-full tw-flex tw-flex-col tw-overflow-hidden">
|
|
351
|
+
<!-- Header Section -->
|
|
352
|
+
<div class="tw-flex-shrink-0 tw-w-full tw-px-4 sm:tw-px-6 tw-py-3 tw-bg-gray-50 tw-border-b tw-border-gray-200">
|
|
353
|
+
<div class="tw-flex tw-items-center tw-justify-between">
|
|
354
|
+
<div class="tw-flex tw-items-center tw-gap-3">
|
|
355
|
+
<cide-ele-icon class="tw-text-purple-600 tw-w-5 tw-h-5">person</cide-ele-icon>
|
|
356
|
+
<div>
|
|
357
|
+
<h5 class="tw-text-sm tw-font-semibold tw-text-gray-900">Teacher Management</h5>
|
|
358
|
+
<p class="tw-text-xs tw-text-gray-600">Manage and view all teacher profiles</p>
|
|
359
|
+
</div>
|
|
360
|
+
</div>
|
|
361
|
+
@if (canCreate()) {
|
|
362
|
+
<button cideEleButton variant="primary" size="sm" (click)="createNewTeacher()" leftIcon="add">
|
|
363
|
+
Add Teacher
|
|
364
|
+
</button>
|
|
365
|
+
}
|
|
366
|
+
</div>
|
|
367
|
+
</div>
|
|
368
|
+
|
|
369
|
+
<!-- Data Grid Section -->
|
|
370
|
+
<div class="tw-flex-1 tw-h-auto tw-w-full tw-min-h-0 tw-relative tw-z-0 tw-overflow-hidden">
|
|
371
|
+
<cide-ele-data-grid
|
|
372
|
+
[config]="gridConfig()"
|
|
373
|
+
[templateRenderers]="templateRenderers()"
|
|
374
|
+
(gridEvent)="onGridEvent($event)">
|
|
375
|
+
</cide-ele-data-grid>
|
|
376
|
+
</div>
|
|
377
|
+
</div>
|
|
378
|
+
|
|
379
|
+
<!-- Teacher Details Template -->
|
|
380
|
+
<ng-template #teacherDetailsRendererTemplate let-value="value" let-row="row" let-column="column">
|
|
381
|
+
<div class="tw-flex tw-items-start tw-space-x-3 tw-py-3">
|
|
382
|
+
<div class="tw-flex-shrink-0 tw-mt-0.5">
|
|
383
|
+
<div class="tw-w-10 tw-h-10 tw-bg-purple-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center">
|
|
384
|
+
<cide-ele-icon class="tw-text-purple-600 tw-w-5 tw-h-5">person</cide-ele-icon>
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
<div class="tw-min-w-0 tw-flex-1 tw-space-y-1">
|
|
388
|
+
<div class="tw-text-sm tw-font-semibold tw-text-gray-900 tw-leading-5">
|
|
389
|
+
{{ row?.user_fullname || getFullName(row) }}
|
|
390
|
+
</div>
|
|
391
|
+
@if (row?.user_type_mapping?.syutm_type_specific_id) {
|
|
392
|
+
<div class="tw-text-xs tw-text-gray-600 tw-leading-4 tw-font-mono">
|
|
393
|
+
<span class="tw-font-medium">Teacher ID:</span> {{ row.user_type_mapping.syutm_type_specific_id }}
|
|
394
|
+
</div>
|
|
395
|
+
}
|
|
396
|
+
@if (row?.user_username) {
|
|
397
|
+
<div class="tw-text-xs tw-text-gray-500 tw-leading-4">
|
|
398
|
+
Username: {{ row.user_username }}
|
|
399
|
+
</div>
|
|
400
|
+
}
|
|
401
|
+
</div>
|
|
402
|
+
</div>
|
|
403
|
+
</ng-template>
|
|
404
|
+
|
|
405
|
+
<!-- Contact Info Template -->
|
|
406
|
+
<ng-template #contactInfoRendererTemplate let-value="value" let-row="row" let-column="column">
|
|
407
|
+
<div class="tw-py-3 tw-space-y-1">
|
|
408
|
+
@if (row?.user_emailid) {
|
|
409
|
+
<div class="tw-text-xs tw-text-gray-900 tw-flex tw-items-center">
|
|
410
|
+
<cide-ele-icon class="tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2">email</cide-ele-icon>
|
|
411
|
+
<span class="tw-truncate">{{ row.user_emailid }}</span>
|
|
412
|
+
</div>
|
|
413
|
+
}
|
|
414
|
+
@if (row?.user_mobileno) {
|
|
415
|
+
<div class="tw-text-xs tw-text-gray-600 tw-flex tw-items-center">
|
|
416
|
+
<cide-ele-icon class="tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2">phone</cide-ele-icon>
|
|
417
|
+
<span class="tw-truncate">{{ row.user_mobileno }}</span>
|
|
418
|
+
</div>
|
|
419
|
+
}
|
|
420
|
+
</div>
|
|
421
|
+
</ng-template>
|
|
422
|
+
|
|
423
|
+
<!-- Status Template -->
|
|
424
|
+
<ng-template #statusRendererTemplate let-value="value" let-row="row" let-column="column">
|
|
425
|
+
<div class="tw-flex tw-items-center tw-justify-center tw-py-3">
|
|
426
|
+
@if (row?.user_isactive) {
|
|
427
|
+
<span class="tw-inline-flex tw-items-center tw-px-2.5 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800">
|
|
428
|
+
Active
|
|
429
|
+
</span>
|
|
430
|
+
} @else {
|
|
431
|
+
<span class="tw-inline-flex tw-items-center tw-px-2.5 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-red-100 tw-text-red-800">
|
|
432
|
+
Inactive
|
|
433
|
+
</span>
|
|
434
|
+
}
|
|
435
|
+
</div>
|
|
436
|
+
</ng-template>
|
|
437
|
+
|
|
438
|
+
<!-- Actions Template -->
|
|
439
|
+
<ng-template #actionsDropdownRendererTemplate let-row="row" let-value="value" let-column="column">
|
|
440
|
+
<cide-ele-dropdown
|
|
441
|
+
[items]="getActionDropdownItems(row)"
|
|
442
|
+
(itemClick)="onDropdownItemClick($event, row)"
|
|
443
|
+
size="sm"
|
|
444
|
+
variant="ghost"
|
|
445
|
+
icon="more_vert">
|
|
446
|
+
</cide-ele-dropdown>
|
|
447
|
+
</ng-template>
|
|
448
|
+
</cide-lyt-shared-wrapper>
|
|
449
|
+
`, styles: [":host{@apply tw-w-full tw-h-full tw-flex tw-flex-col;}\n"] }]
|
|
450
|
+
}] });
|
|
451
|
+
|
|
452
|
+
export { TeacherListComponent };
|
|
453
|
+
//# sourceMappingURL=cloud-ide-academics-teacher-list.component-BaWKpb8C.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-ide-academics-teacher-list.component-BaWKpb8C.mjs","sources":["../../../projects/cloud-ide-academics/src/lib/collection/teacher-management/components/teacher-list/teacher-list.component.ts"],"sourcesContent":["import { Component, OnInit, OnDestroy, inject, signal, computed, viewChild, TemplateRef } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { DestroyRef } from '@angular/core';\r\nimport {\r\n CideIconComponent,\r\n CideEleDropdownComponent,\r\n CideEleButtonComponent,\r\n CideEleDataGridComponent,\r\n CideSelectComponent,\r\n TemplateContext,\r\n DropdownItem,\r\n NotificationService,\r\n GridEvent,\r\n ConfirmationService\r\n} from 'cloud-ide-element';\r\nimport { CideLytSharedWrapperComponent, ComponentContextService, RightsService } from 'cloud-ide-layout';\r\nimport { USER_SERVICE_TOKEN, IUserMasterService } from 'cloud-ide-shared';\r\nimport {\r\n AuthUserMst,\r\n AuthUserMstListPayload,\r\n authUserMstListControllerResponse,\r\n generateStringFromObject,\r\n CoreUserTypeMapping\r\n} from 'cloud-ide-lms-model';\r\n\r\ninterface Teacher extends AuthUserMst, Record<string, unknown> {\r\n user_type_mapping?: CoreUserTypeMapping;\r\n teacher_id?: string;\r\n department?: string;\r\n subject?: string;\r\n specialization?: string;\r\n}\r\n\r\n@Component({\r\n selector: 'cide-academics-teacher-list',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n CideIconComponent,\r\n CideEleDropdownComponent,\r\n CideEleButtonComponent,\r\n CideEleDataGridComponent,\r\n CideLytSharedWrapperComponent\r\n ],\r\n template: `\r\n <cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"shared_wrapper_setup_param\">\r\n <div class=\"tw-w-full tw-h-full tw-flex tw-flex-col tw-overflow-hidden\">\r\n <!-- Header Section -->\r\n <div class=\"tw-flex-shrink-0 tw-w-full tw-px-4 sm:tw-px-6 tw-py-3 tw-bg-gray-50 tw-border-b tw-border-gray-200\">\r\n <div class=\"tw-flex tw-items-center tw-justify-between\">\r\n <div class=\"tw-flex tw-items-center tw-gap-3\">\r\n <cide-ele-icon class=\"tw-text-purple-600 tw-w-5 tw-h-5\">person</cide-ele-icon>\r\n <div>\r\n <h5 class=\"tw-text-sm tw-font-semibold tw-text-gray-900\">Teacher Management</h5>\r\n <p class=\"tw-text-xs tw-text-gray-600\">Manage and view all teacher profiles</p>\r\n </div>\r\n </div>\r\n @if (canCreate()) {\r\n <button cideEleButton variant=\"primary\" size=\"sm\" (click)=\"createNewTeacher()\" leftIcon=\"add\">\r\n Add Teacher\r\n </button>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid Section -->\r\n <div class=\"tw-flex-1 tw-h-auto tw-w-full tw-min-h-0 tw-relative tw-z-0 tw-overflow-hidden\">\r\n <cide-ele-data-grid\r\n [config]=\"gridConfig()\"\r\n [templateRenderers]=\"templateRenderers()\"\r\n (gridEvent)=\"onGridEvent($event)\">\r\n </cide-ele-data-grid>\r\n </div>\r\n </div>\r\n\r\n <!-- Teacher Details Template -->\r\n <ng-template #teacherDetailsRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-start tw-space-x-3 tw-py-3\">\r\n <div class=\"tw-flex-shrink-0 tw-mt-0.5\">\r\n <div class=\"tw-w-10 tw-h-10 tw-bg-purple-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\r\n <cide-ele-icon class=\"tw-text-purple-600 tw-w-5 tw-h-5\">person</cide-ele-icon>\r\n </div>\r\n </div>\r\n <div class=\"tw-min-w-0 tw-flex-1 tw-space-y-1\">\r\n <div class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-leading-5\">\r\n {{ row?.user_fullname || getFullName(row) }}\r\n </div>\r\n @if (row?.user_type_mapping?.syutm_type_specific_id) {\r\n <div class=\"tw-text-xs tw-text-gray-600 tw-leading-4 tw-font-mono\">\r\n <span class=\"tw-font-medium\">Teacher ID:</span> {{ row.user_type_mapping.syutm_type_specific_id }}\r\n </div>\r\n }\r\n @if (row?.user_username) {\r\n <div class=\"tw-text-xs tw-text-gray-500 tw-leading-4\">\r\n Username: {{ row.user_username }}\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Contact Info Template -->\r\n <ng-template #contactInfoRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\r\n <div class=\"tw-py-3 tw-space-y-1\">\r\n @if (row?.user_emailid) {\r\n <div class=\"tw-text-xs tw-text-gray-900 tw-flex tw-items-center\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2\">email</cide-ele-icon>\r\n <span class=\"tw-truncate\">{{ row.user_emailid }}</span>\r\n </div>\r\n }\r\n @if (row?.user_mobileno) {\r\n <div class=\"tw-text-xs tw-text-gray-600 tw-flex tw-items-center\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-text-gray-400 tw-mr-2\">phone</cide-ele-icon>\r\n <span class=\"tw-truncate\">{{ row.user_mobileno }}</span>\r\n </div>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Status Template -->\r\n <ng-template #statusRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-justify-center tw-py-3\">\r\n @if (row?.user_isactive) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2.5 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-green-100 tw-text-green-800\">\r\n Active\r\n </span>\r\n } @else {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2.5 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-red-100 tw-text-red-800\">\r\n Inactive\r\n </span>\r\n }\r\n </div>\r\n </ng-template>\r\n\r\n <!-- Actions Template -->\r\n <ng-template #actionsDropdownRendererTemplate let-row=\"row\" let-value=\"value\" let-column=\"column\">\r\n <cide-ele-dropdown\r\n [items]=\"getActionDropdownItems(row)\"\r\n (itemClick)=\"onDropdownItemClick($event, row)\"\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n icon=\"more_vert\">\r\n </cide-ele-dropdown>\r\n </ng-template>\r\n </cide-lyt-shared-wrapper>\r\n `,\r\n styles: [`\r\n :host {\r\n @apply tw-w-full tw-h-full tw-flex tw-flex-col;\r\n }\r\n `]\r\n})\r\nexport class TeacherListComponent implements OnInit, OnDestroy {\r\n shared_wrapper_setup_param = { sypg_page_code: \"academics_teacher_list\" };\r\n\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly userMasterService = inject(USER_SERVICE_TOKEN) as IUserMasterService;\r\n private readonly router = inject(Router);\r\n private readonly route = inject(ActivatedRoute);\r\n private readonly notificationService = inject(NotificationService);\r\n private readonly confirmationService = inject(ConfirmationService);\r\n private readonly componentContextService = inject(ComponentContextService);\r\n private readonly rightsService = inject(RightsService);\r\n\r\n // ViewChild for templates\r\n teacherDetailsRendererTemplate = viewChild<TemplateRef<TemplateContext>>('teacherDetailsRendererTemplate');\r\n contactInfoRendererTemplate = viewChild<TemplateRef<TemplateContext>>('contactInfoRendererTemplate');\r\n statusRendererTemplate = viewChild<TemplateRef<TemplateContext>>('statusRendererTemplate');\r\n actionsDropdownRendererTemplate = viewChild<TemplateRef<TemplateContext>>('actionsDropdownRendererTemplate');\r\n\r\n // State\r\n teachers = signal<Teacher[]>([]);\r\n loading = signal<boolean>(false);\r\n pageIndex = signal<number>(1);\r\n pageSize = signal<number>(10);\r\n total = signal<number>(0);\r\n searchQuery = signal<string>('');\r\n\r\n // Rights computed signals\r\n canCreate = computed(() => this.rightsService.hasRight('CREATE'));\r\n canEdit = computed(() => this.rightsService.hasRight('EDIT'));\r\n canDelete = computed(() => this.rightsService.hasRight('DELETE'));\r\n canView = computed(() => this.rightsService.hasRight('VIEW'));\r\n\r\n // Grid configuration\r\n gridConfig = computed(() => ({\r\n id: 'teachers-grid',\r\n responsive: true,\r\n data: this.teachers(),\r\n columns: [\r\n {\r\n key: 'teacher_details',\r\n header: 'Teacher Details',\r\n type: 'custom' as any,\r\n width: '300px',\r\n sortable: true,\r\n renderer: 'teacherDetailsRendererTemplate'\r\n },\r\n {\r\n key: 'contact_info',\r\n header: 'Contact Information',\r\n type: 'custom' as any,\r\n width: '250px',\r\n sortable: false,\r\n renderer: 'contactInfoRendererTemplate'\r\n },\r\n {\r\n key: 'user_isactive',\r\n header: 'Status',\r\n type: 'custom' as any,\r\n width: '120px',\r\n sortable: true,\r\n renderer: 'statusRendererTemplate'\r\n },\r\n {\r\n key: 'actions',\r\n header: 'Actions',\r\n type: 'actions' as any,\r\n width: '100px',\r\n sortable: false,\r\n renderer: 'actionsDropdownRendererTemplate'\r\n }\r\n ],\r\n pagination: {\r\n enabled: true,\r\n pageSize: this.pageSize(),\r\n pageSizeOptions: [10, 25, 50, 100],\r\n showQuickJump: true,\r\n showPageInfo: true,\r\n showRefresh: true\r\n },\r\n search: {\r\n enabled: true,\r\n placeholder: 'Search teachers by name, ID, email...',\r\n searchableColumns: ['user_fullname', 'user_username', 'user_emailid'],\r\n debounceMs: 300\r\n },\r\n loading: {\r\n useDefer: true,\r\n skeletonRows: 5,\r\n showOverlay: false\r\n },\r\n rowHeight: 70\r\n }));\r\n\r\n templateRenderers = computed(() => ({\r\n teacherDetailsRendererTemplate: this.teacherDetailsRendererTemplate(),\r\n contactInfoRendererTemplate: this.contactInfoRendererTemplate(),\r\n statusRendererTemplate: this.statusRendererTemplate(),\r\n actionsDropdownRendererTemplate: this.actionsDropdownRendererTemplate()\r\n }));\r\n\r\n ngOnInit(): void {\r\n // Initialize rights for teacher management\r\n this.rightsService.initializeRights('teacher_list');\r\n this.loadTeachers();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n // Cleanup handled by takeUntilDestroyed\r\n }\r\n\r\n loadTeachers(): void {\r\n this.loading.set(true);\r\n const payload: AuthUserMstListPayload = {\r\n pageIndex: this.pageIndex(),\r\n pageSize: this.pageSize(),\r\n query: this.searchQuery() || undefined,\r\n pagination: true\r\n };\r\n\r\n this.userMasterService.getUserList(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response: authUserMstListControllerResponse) => {\r\n if (response.success && response.data) {\r\n // Filter for teachers only based on user_type_mapping\r\n const teachers = (response.data as Teacher[]).filter(user => \r\n user.user_type_mapping?.syutm_user_type === 'TEACHER'\r\n );\r\n this.teachers.set(teachers);\r\n this.total.set(teachers.length);\r\n } else {\r\n this.teachers.set([]);\r\n this.total.set(0);\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error) => {\r\n console.error('Error loading teachers:', error);\r\n this.notificationService.error('Failed to load teachers. Please try again.');\r\n this.loading.set(false);\r\n }\r\n });\r\n }\r\n\r\n onGridEvent(event: GridEvent): void {\r\n if (event.type === 'pageChange') {\r\n if (event.data && typeof event.data === 'object' && 'pageIndex' in event.data) {\r\n this.pageIndex.set(event.data['pageIndex'] as number);\r\n this.loadTeachers();\r\n }\r\n } else if (event.type === 'search') {\r\n if (event.data && typeof event.data === 'object' && 'query' in event.data) {\r\n this.searchQuery.set(event.data['query'] as string);\r\n this.pageIndex.set(1);\r\n this.loadTeachers();\r\n }\r\n } else if (event.type === 'refresh') {\r\n this.loadTeachers();\r\n }\r\n }\r\n\r\n getActionDropdownItems(row: Teacher): DropdownItem[] {\r\n return [\r\n { id: 'view', label: 'View Profile', icon: 'visibility' },\r\n { id: 'edit', label: 'Edit', icon: 'edit' },\r\n { id: 'delete', label: 'Delete', icon: 'delete' }\r\n ];\r\n }\r\n\r\n onDropdownItemClick(item: DropdownItem, row: Teacher): void {\r\n switch (item.id) {\r\n case 'view':\r\n this.viewTeacher(row);\r\n break;\r\n case 'edit':\r\n this.editTeacher(row);\r\n break;\r\n case 'delete':\r\n this.deleteTeacher(row);\r\n break;\r\n }\r\n }\r\n\r\n createNewTeacher(): void {\r\n if (!this.rightsService.hasRight('CREATE')) {\r\n this.notificationService.error('You do not have permission to create teachers');\r\n return;\r\n }\r\n this.router.navigate(['/control-panel/academics/teacher/create']);\r\n }\r\n\r\n viewTeacher(teacher: Teacher): void {\r\n if (!this.rightsService.hasRight('VIEW')) {\r\n this.notificationService.error('You do not have permission to view teachers');\r\n return;\r\n }\r\n const query = generateStringFromObject({ user_id: teacher._id });\r\n this.router.navigate(['/control-panel/academics/teacher/view', query]);\r\n }\r\n\r\n editTeacher(teacher: Teacher): void {\r\n if (!this.rightsService.hasRight('EDIT')) {\r\n this.notificationService.error('You do not have permission to edit teachers');\r\n return;\r\n }\r\n const query = generateStringFromObject({ user_id: teacher._id });\r\n this.router.navigate(['/control-panel/academics/teacher/edit', query]);\r\n }\r\n\r\n deleteTeacher(teacher: Teacher): void {\r\n if (!this.rightsService.hasRight('DELETE')) {\r\n this.notificationService.error('You do not have permission to delete teachers');\r\n return;\r\n }\r\n this.confirmationService.confirmDelete(teacher.user_fullname || 'Unknown')\r\n .then((confirmed) => {\r\n if (confirmed && teacher._id) {\r\n this.userMasterService.deleteUserMaster(teacher._id)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: () => {\r\n this.notificationService.success('Teacher deleted successfully');\r\n this.loadTeachers();\r\n },\r\n error: () => {\r\n this.notificationService.error('Failed to delete teacher');\r\n }\r\n });\r\n }\r\n })\r\n .catch(() => {\r\n // User cancelled - no action needed\r\n });\r\n }\r\n\r\n getFullName(user: any): string {\r\n const parts = [user.user_firstname, user.user_middlename, user.user_lastname].filter(Boolean);\r\n return parts.length > 0 ? parts.join(' ') : 'Unknown';\r\n }\r\n}\r\n\r\n"],"names":[],"mappings":";;;;;;;;;;;MA4Ja,oBAAoB,CAAA;AAC/B,IAAA,0BAA0B,GAAG,EAAE,cAAc,EAAE,wBAAwB,EAAE;AAExD,IAA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appingService, a as CideLytAcademicYearService, h as CideLytClassProgramBranchFormComponent, g as CideLytClassProgramBranchListComponent, b as CideLytClassProgramBranchService, k as CideLytProgramSectionSelectorComponent, j as CideLytProgramTermSectionService, P as ProgramTermSectionCreateComponent, i as ProgramTermSectionListComponent, d as academicsRoutes } from './cloud-ide-academics-cloud-ide-academics-
|
|
1
|
+
export { A as AcademicYearCreateComponent, e as AcademicYearListComponent, f as CideLytAcademicYearMappingService, a as CideLytAcademicYearService, h as CideLytClassProgramBranchFormComponent, g as CideLytClassProgramBranchListComponent, b as CideLytClassProgramBranchService, k as CideLytProgramSectionSelectorComponent, j as CideLytProgramTermSectionService, P as ProgramTermSectionCreateComponent, i as ProgramTermSectionListComponent, d as academicsRoutes } from './cloud-ide-academics-cloud-ide-academics-DTKiLHAW.mjs';
|
|
2
2
|
//# sourceMappingURL=cloud-ide-academics.mjs.map
|
package/index.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ declare class AcademicYearCreateComponent implements OnInit, OnDestroy {
|
|
|
28
28
|
private readonly router;
|
|
29
29
|
private readonly route;
|
|
30
30
|
private readonly componentContextService;
|
|
31
|
+
private readonly rightsService;
|
|
31
32
|
academicYearForm: FormGroup;
|
|
32
33
|
readonly activeTab: _angular_core.WritableSignal<string>;
|
|
33
34
|
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
@@ -198,6 +199,7 @@ declare class AcademicYearListComponent implements OnInit, OnDestroy {
|
|
|
198
199
|
private readonly appState;
|
|
199
200
|
private readonly confirmationService;
|
|
200
201
|
private readonly notificationService;
|
|
202
|
+
private readonly rightsService;
|
|
201
203
|
readonly academicYearDetailsRendererTemplate: _angular_core.Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
202
204
|
readonly dateRangeRendererTemplate: _angular_core.Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
203
205
|
readonly statusRendererTemplate: _angular_core.Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
@@ -217,6 +219,10 @@ declare class AcademicYearListComponent implements OnInit, OnDestroy {
|
|
|
217
219
|
value: string;
|
|
218
220
|
label: string;
|
|
219
221
|
}[]>;
|
|
222
|
+
readonly canCreate: _angular_core.Signal<boolean>;
|
|
223
|
+
readonly canEdit: _angular_core.Signal<boolean>;
|
|
224
|
+
readonly canDelete: _angular_core.Signal<boolean>;
|
|
225
|
+
readonly canView: _angular_core.Signal<boolean>;
|
|
220
226
|
readonly gridConfig: _angular_core.Signal<GridConfiguration<AcademicYear>>;
|
|
221
227
|
ngOnInit(): void;
|
|
222
228
|
ngOnDestroy(): void;
|
|
@@ -409,6 +415,7 @@ declare class CideLytClassProgramBranchListComponent implements OnInit {
|
|
|
409
415
|
private confirmationService;
|
|
410
416
|
private classProgramBranchService;
|
|
411
417
|
private programClassService;
|
|
418
|
+
private rightsService;
|
|
412
419
|
loading: _angular_core.WritableSignal<boolean>;
|
|
413
420
|
error: _angular_core.WritableSignal<string | null>;
|
|
414
421
|
branches: _angular_core.WritableSignal<ClassProgramBranch$2[]>;
|
|
@@ -427,6 +434,10 @@ declare class CideLytClassProgramBranchListComponent implements OnInit {
|
|
|
427
434
|
actionsDropdownRendererTemplate: _angular_core.Signal<TemplateRef<TemplateContext<Record<string, unknown>>> | undefined>;
|
|
428
435
|
gridConfig: _angular_core.WritableSignal<GridConfiguration<ClassProgramBranch$2>>;
|
|
429
436
|
templateRenderers: _angular_core.Signal<Record<string, TemplateRef<TemplateContext<Record<string, unknown>>>>>;
|
|
437
|
+
canCreate: _angular_core.Signal<boolean>;
|
|
438
|
+
canEdit: _angular_core.Signal<boolean>;
|
|
439
|
+
canDelete: _angular_core.Signal<boolean>;
|
|
440
|
+
canView: _angular_core.Signal<boolean>;
|
|
430
441
|
ngOnInit(): void;
|
|
431
442
|
/**
|
|
432
443
|
* Initialize breadcrumb data for list view
|
|
@@ -558,6 +569,7 @@ declare class CideLytClassProgramBranchFormComponent implements OnInit, OnDestro
|
|
|
558
569
|
private classProgramBranchService;
|
|
559
570
|
private programClassService;
|
|
560
571
|
private generalMasterService;
|
|
572
|
+
private rightsService;
|
|
561
573
|
branchForm: FormGroup;
|
|
562
574
|
loading: _angular_core.WritableSignal<boolean>;
|
|
563
575
|
error: _angular_core.WritableSignal<string | null>;
|
|
@@ -750,6 +762,8 @@ declare class ProgramTermSectionCreateComponent implements OnInit, OnDestroy {
|
|
|
750
762
|
private classProgramBranchService;
|
|
751
763
|
private classProgramTermService;
|
|
752
764
|
private programTermSectionService;
|
|
765
|
+
private componentContextService;
|
|
766
|
+
private rightsService;
|
|
753
767
|
programTermSectionForm: FormGroup;
|
|
754
768
|
activeTab: _angular_core.WritableSignal<string>;
|
|
755
769
|
loading: _angular_core.WritableSignal<boolean>;
|
|
@@ -911,6 +925,7 @@ declare class ProgramTermSectionListComponent implements OnInit {
|
|
|
911
925
|
private classProgramMasterService;
|
|
912
926
|
private classProgramBranchService;
|
|
913
927
|
private classProgramTermService;
|
|
928
|
+
private rightsService;
|
|
914
929
|
programTermSectionDetailsRendererTemplate: _angular_core.Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
915
930
|
programTermSectionStatusRendererTemplate: _angular_core.Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
916
931
|
actionsDropdownRendererTemplate: _angular_core.Signal<TemplateRef<TemplateContext<Record<string, unknown>>>>;
|
|
@@ -970,6 +985,10 @@ declare class ProgramTermSectionListComponent implements OnInit {
|
|
|
970
985
|
* Handle dropdown item click
|
|
971
986
|
*/
|
|
972
987
|
onDropdownItemClick(item: DropdownItem, programTermSection: ProgramTermSection): void;
|
|
988
|
+
canCreate: _angular_core.Signal<boolean>;
|
|
989
|
+
canEdit: _angular_core.Signal<boolean>;
|
|
990
|
+
canDelete: _angular_core.Signal<boolean>;
|
|
991
|
+
canView: _angular_core.Signal<boolean>;
|
|
973
992
|
ngOnInit(): void;
|
|
974
993
|
/**
|
|
975
994
|
* Initialize breadcrumb data for list view
|