cloud-ide-academics 0.0.1 → 0.0.2
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-D3PfbSMN.mjs +578 -0
- package/fesm2022/cloud-ide-academics-class-program-term-create.component-D3PfbSMN.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics-class-program-term-list.component-Cpbyavgd.mjs +404 -0
- package/fesm2022/cloud-ide-academics-class-program-term-list.component-Cpbyavgd.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics-class-program-term.service-BW4PJQEM.mjs +111 -0
- package/fesm2022/cloud-ide-academics-class-program-term.service-BW4PJQEM.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics-cloud-ide-academics-BP1hZ-yx.mjs +2802 -0
- package/fesm2022/cloud-ide-academics-cloud-ide-academics-BP1hZ-yx.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics-program-class-create.component-Ds8vN9sL.mjs +391 -0
- package/fesm2022/cloud-ide-academics-program-class-create.component-Ds8vN9sL.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics-program-class-list.component-C6VyX4hH.mjs +433 -0
- package/fesm2022/cloud-ide-academics-program-class-list.component-C6VyX4hH.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics-program-term-section-create.component-Dg9Pjwj5.mjs +211 -0
- package/fesm2022/cloud-ide-academics-program-term-section-create.component-Dg9Pjwj5.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics-program-term-section-list.component-xVeeeGDV.mjs +478 -0
- package/fesm2022/cloud-ide-academics-program-term-section-list.component-xVeeeGDV.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics.mjs +1 -1535
- package/fesm2022/cloud-ide-academics.mjs.map +1 -1
- package/index.d.ts +239 -2
- package/package.json +1 -1
|
@@ -0,0 +1,478 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Injectable, DestroyRef, viewChild, computed, signal, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import { Router } from '@angular/router';
|
|
6
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
+
import { NotificationService, ConfirmationService, CideEleDataGridComponent, CideIconComponent, CideEleButtonComponent, CideEleDropdownComponent } from 'cloud-ide-element';
|
|
8
|
+
import { AppStateHelperService } from 'cloud-ide-layout';
|
|
9
|
+
import { HttpClient } from '@angular/common/http';
|
|
10
|
+
import { generateStringFromObject, cidePath, hostManagerRoutesUrl, academicsRoutesUrl } from 'cloud-ide-lms-model';
|
|
11
|
+
|
|
12
|
+
class CideLytProgramTermSectionService {
|
|
13
|
+
http = inject(HttpClient);
|
|
14
|
+
/**
|
|
15
|
+
* Get list of program term sections
|
|
16
|
+
* @param payload - Query parameters for filtering/pagination
|
|
17
|
+
* @returns Observable of program term section list response
|
|
18
|
+
*/
|
|
19
|
+
getProgramTermSectionList(payload) {
|
|
20
|
+
console.log("Program Term Section List Payload:", payload);
|
|
21
|
+
const query = generateStringFromObject(payload);
|
|
22
|
+
const url = cidePath.join([
|
|
23
|
+
hostManagerRoutesUrl.cideSuiteHost,
|
|
24
|
+
academicsRoutesUrl.module,
|
|
25
|
+
academicsRoutesUrl.programTermSection,
|
|
26
|
+
query
|
|
27
|
+
]);
|
|
28
|
+
return this.http.get(url);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Get program term section by ID
|
|
32
|
+
* @param payload - Program term section ID payload
|
|
33
|
+
* @returns Observable of program term section data
|
|
34
|
+
*/
|
|
35
|
+
getProgramTermSectionById(payload) {
|
|
36
|
+
const query = generateStringFromObject(payload);
|
|
37
|
+
const url = cidePath.join([
|
|
38
|
+
hostManagerRoutesUrl.cideSuiteHost,
|
|
39
|
+
academicsRoutesUrl.module,
|
|
40
|
+
academicsRoutesUrl.programTermSection,
|
|
41
|
+
'byId',
|
|
42
|
+
query
|
|
43
|
+
]);
|
|
44
|
+
return this.http.get(url);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Create or update program term section
|
|
48
|
+
* @param data - Program term section data to save
|
|
49
|
+
* @returns Observable of the save response
|
|
50
|
+
*/
|
|
51
|
+
saveProgramTermSection(data) {
|
|
52
|
+
const url = cidePath.join([
|
|
53
|
+
hostManagerRoutesUrl.cideSuiteHost,
|
|
54
|
+
academicsRoutesUrl.module,
|
|
55
|
+
academicsRoutesUrl.programTermSection
|
|
56
|
+
]);
|
|
57
|
+
return this.http.post(url, data);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Delete program term section
|
|
61
|
+
* @param payload - Program term section delete payload
|
|
62
|
+
* @returns Observable of the delete response
|
|
63
|
+
*/
|
|
64
|
+
deleteProgramTermSection(payload) {
|
|
65
|
+
const query = generateStringFromObject(payload);
|
|
66
|
+
const url = cidePath.join([
|
|
67
|
+
hostManagerRoutesUrl.cideSuiteHost,
|
|
68
|
+
academicsRoutesUrl.module,
|
|
69
|
+
academicsRoutesUrl.programTermSection,
|
|
70
|
+
query
|
|
71
|
+
]);
|
|
72
|
+
return this.http.delete(url);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Toggle program term section status (active/inactive)
|
|
76
|
+
* @param payload - Program term section toggle status payload
|
|
77
|
+
* @returns Observable of the toggle status response
|
|
78
|
+
*/
|
|
79
|
+
toggleProgramTermSectionStatus(payload) {
|
|
80
|
+
const query = generateStringFromObject(payload);
|
|
81
|
+
const url = cidePath.join([
|
|
82
|
+
hostManagerRoutesUrl.cideSuiteHost,
|
|
83
|
+
academicsRoutesUrl.module,
|
|
84
|
+
academicsRoutesUrl.programTermSection,
|
|
85
|
+
'toggleStatus',
|
|
86
|
+
query
|
|
87
|
+
]);
|
|
88
|
+
return this.http.put(url, {});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Toggle program term section lock status
|
|
92
|
+
* @param payload - Program term section toggle lock payload
|
|
93
|
+
* @returns Observable of the toggle lock response
|
|
94
|
+
*/
|
|
95
|
+
toggleProgramTermSectionLock(payload) {
|
|
96
|
+
const query = generateStringFromObject(payload);
|
|
97
|
+
const url = cidePath.join([
|
|
98
|
+
hostManagerRoutesUrl.cideSuiteHost,
|
|
99
|
+
academicsRoutesUrl.module,
|
|
100
|
+
academicsRoutesUrl.programTermSection,
|
|
101
|
+
'toggleLock',
|
|
102
|
+
query
|
|
103
|
+
]);
|
|
104
|
+
return this.http.put(url, {});
|
|
105
|
+
}
|
|
106
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytProgramTermSectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
107
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytProgramTermSectionService, providedIn: 'root' });
|
|
108
|
+
}
|
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytProgramTermSectionService, decorators: [{
|
|
110
|
+
type: Injectable,
|
|
111
|
+
args: [{
|
|
112
|
+
providedIn: 'root'
|
|
113
|
+
}]
|
|
114
|
+
}] });
|
|
115
|
+
|
|
116
|
+
class ProgramTermSectionListComponent {
|
|
117
|
+
// Dependency injection
|
|
118
|
+
destroyRef = inject(DestroyRef);
|
|
119
|
+
router = inject(Router);
|
|
120
|
+
appState = inject(AppStateHelperService);
|
|
121
|
+
notificationService = inject(NotificationService);
|
|
122
|
+
confirmationService = inject(ConfirmationService);
|
|
123
|
+
programTermSectionService = inject(CideLytProgramTermSectionService);
|
|
124
|
+
// Modern ViewChild signals for template renderers (Angular 20 approach)
|
|
125
|
+
programTermSectionDetailsRendererTemplate = viewChild.required('programTermSectionDetailsRendererTemplate');
|
|
126
|
+
programTermSectionStatusRendererTemplate = viewChild.required('programTermSectionStatusRendererTemplate');
|
|
127
|
+
actionsDropdownRendererTemplate = viewChild.required('actionsDropdownRendererTemplate');
|
|
128
|
+
// Computed template renderers for grid
|
|
129
|
+
templateRenderers = computed(() => ({
|
|
130
|
+
programTermSectionDetailsRenderer: this.programTermSectionDetailsRendererTemplate(),
|
|
131
|
+
programTermSectionStatusRenderer: this.programTermSectionStatusRendererTemplate(),
|
|
132
|
+
actionsDropdownRenderer: this.actionsDropdownRendererTemplate()
|
|
133
|
+
}), ...(ngDevMode ? [{ debugName: "templateRenderers" }] : []));
|
|
134
|
+
// Make Math available in template
|
|
135
|
+
Math = Math;
|
|
136
|
+
// Signals for reactive state management
|
|
137
|
+
programTermSections = signal([], ...(ngDevMode ? [{ debugName: "programTermSections" }] : []));
|
|
138
|
+
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
139
|
+
error = signal(null, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
140
|
+
selectedItems = signal([], ...(ngDevMode ? [{ debugName: "selectedItems" }] : []));
|
|
141
|
+
searchTerm = signal('', ...(ngDevMode ? [{ debugName: "searchTerm" }] : []));
|
|
142
|
+
// Derived list filtered by searchTerm
|
|
143
|
+
filteredProgramTermSections = computed(() => {
|
|
144
|
+
const q = (this.searchTerm() || '').toLowerCase().trim();
|
|
145
|
+
const items = this.programTermSections() || [];
|
|
146
|
+
if (!q)
|
|
147
|
+
return items;
|
|
148
|
+
return items.filter(pts => {
|
|
149
|
+
const name = (pts.acapts_name || '').toLowerCase();
|
|
150
|
+
const code = (pts.acapts_code || '').toLowerCase();
|
|
151
|
+
const description = (pts.acapts_description || '').toLowerCase();
|
|
152
|
+
return name.includes(q) || code.includes(q) || description.includes(q);
|
|
153
|
+
});
|
|
154
|
+
}, ...(ngDevMode ? [{ debugName: "filteredProgramTermSections" }] : []));
|
|
155
|
+
// Grid configuration signal
|
|
156
|
+
gridConfig = signal({
|
|
157
|
+
id: 'program-term-section-list-grid',
|
|
158
|
+
columns: [
|
|
159
|
+
{
|
|
160
|
+
key: 'details',
|
|
161
|
+
header: 'Section Details',
|
|
162
|
+
type: 'custom',
|
|
163
|
+
width: 'auto',
|
|
164
|
+
truncate: true,
|
|
165
|
+
align: 'left',
|
|
166
|
+
renderer: 'programTermSectionDetailsRenderer'
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
key: 'acapts_code',
|
|
170
|
+
header: 'Code',
|
|
171
|
+
type: 'text',
|
|
172
|
+
width: '120px',
|
|
173
|
+
truncate: true,
|
|
174
|
+
align: 'left'
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
key: 'acapts_class_program_id_acacpm',
|
|
178
|
+
header: 'Program Class',
|
|
179
|
+
type: 'custom',
|
|
180
|
+
width: '200px',
|
|
181
|
+
truncate: true,
|
|
182
|
+
align: 'left',
|
|
183
|
+
renderer: 'programClassRenderer'
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
key: 'acapts_parent_class_prog_term_acapt',
|
|
187
|
+
header: 'Class Program Term',
|
|
188
|
+
type: 'custom',
|
|
189
|
+
width: '200px',
|
|
190
|
+
truncate: true,
|
|
191
|
+
align: 'left',
|
|
192
|
+
renderer: 'classProgramTermRenderer'
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
key: 'acapts_isactive',
|
|
196
|
+
header: 'Status',
|
|
197
|
+
type: 'custom',
|
|
198
|
+
width: '120px',
|
|
199
|
+
truncate: false,
|
|
200
|
+
align: 'center',
|
|
201
|
+
renderer: 'programTermSectionStatusRenderer'
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
key: 'actions',
|
|
205
|
+
header: '',
|
|
206
|
+
type: 'custom',
|
|
207
|
+
width: '150px',
|
|
208
|
+
truncate: false,
|
|
209
|
+
align: 'center',
|
|
210
|
+
renderer: 'actionsDropdownRenderer'
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
data: [],
|
|
214
|
+
trackBy: '_id',
|
|
215
|
+
pagination: {
|
|
216
|
+
enabled: true,
|
|
217
|
+
pageSize: 10,
|
|
218
|
+
pageSizeOptions: [10, 25, 50, 100],
|
|
219
|
+
showQuickJump: true,
|
|
220
|
+
showPageInfo: true,
|
|
221
|
+
showRefresh: true
|
|
222
|
+
},
|
|
223
|
+
search: {
|
|
224
|
+
enabled: true,
|
|
225
|
+
placeholder: 'Search program term sections...',
|
|
226
|
+
searchableColumns: ['acapts_name', 'acapts_code', 'acapts_description'],
|
|
227
|
+
debounceMs: 300
|
|
228
|
+
},
|
|
229
|
+
loading: {
|
|
230
|
+
useDefer: true,
|
|
231
|
+
skeletonRows: 5,
|
|
232
|
+
showOverlay: false
|
|
233
|
+
},
|
|
234
|
+
scroll: {
|
|
235
|
+
enabled: true,
|
|
236
|
+
maxHeight: '',
|
|
237
|
+
minHeight: '',
|
|
238
|
+
stickyHeader: true,
|
|
239
|
+
virtualScroll: false,
|
|
240
|
+
rowHeight: 50
|
|
241
|
+
},
|
|
242
|
+
responsive: true,
|
|
243
|
+
striped: false,
|
|
244
|
+
bordered: true,
|
|
245
|
+
compact: false,
|
|
246
|
+
tableClass: 'tw-table-fixed tw-w-full tw-rounded-none'
|
|
247
|
+
}, ...(ngDevMode ? [{ debugName: "gridConfig" }] : []));
|
|
248
|
+
/**
|
|
249
|
+
* Get action dropdown items
|
|
250
|
+
*/
|
|
251
|
+
getActionDropdownItems(programTermSection) {
|
|
252
|
+
const items = [
|
|
253
|
+
{
|
|
254
|
+
id: 'view',
|
|
255
|
+
label: 'View Details',
|
|
256
|
+
icon: 'visibility',
|
|
257
|
+
iconColor: 'tw-text-gray-400',
|
|
258
|
+
textColor: 'tw-text-gray-700'
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
id: 'edit',
|
|
262
|
+
label: 'Edit Section',
|
|
263
|
+
icon: 'edit',
|
|
264
|
+
iconColor: 'tw-text-blue-400',
|
|
265
|
+
textColor: 'tw-text-blue-700'
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: 'toggleStatus',
|
|
269
|
+
label: programTermSection?.acapts_isactive ? 'Deactivate' : 'Activate',
|
|
270
|
+
icon: programTermSection?.acapts_isactive ? 'toggle_off' : 'toggle_on',
|
|
271
|
+
iconColor: programTermSection?.acapts_isactive ? 'tw-text-orange-400' : 'tw-text-green-400',
|
|
272
|
+
textColor: programTermSection?.acapts_isactive ? 'tw-text-orange-700' : 'tw-text-green-700'
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
id: 'delete',
|
|
276
|
+
label: 'Delete',
|
|
277
|
+
icon: 'delete',
|
|
278
|
+
iconColor: 'tw-text-red-400',
|
|
279
|
+
textColor: 'tw-text-red-700'
|
|
280
|
+
}
|
|
281
|
+
];
|
|
282
|
+
return items;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Handle dropdown item click
|
|
286
|
+
*/
|
|
287
|
+
onDropdownItemClick(item, programTermSection) {
|
|
288
|
+
switch (item.id) {
|
|
289
|
+
case 'view':
|
|
290
|
+
this.viewProgramTermSection(programTermSection);
|
|
291
|
+
break;
|
|
292
|
+
case 'edit':
|
|
293
|
+
this.editProgramTermSection(programTermSection);
|
|
294
|
+
break;
|
|
295
|
+
case 'toggleStatus':
|
|
296
|
+
this.toggleProgramTermSectionStatus(programTermSection);
|
|
297
|
+
break;
|
|
298
|
+
case 'delete':
|
|
299
|
+
this.deleteProgramTermSection(programTermSection);
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
ngOnInit() {
|
|
304
|
+
this.loadProgramTermSections();
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Load program term sections data
|
|
308
|
+
*/
|
|
309
|
+
loadProgramTermSections() {
|
|
310
|
+
this.loading.set(true);
|
|
311
|
+
this.error.set(null);
|
|
312
|
+
const payload = {
|
|
313
|
+
pageIndex: 0,
|
|
314
|
+
pageSize: 100,
|
|
315
|
+
query: this.searchTerm() || "",
|
|
316
|
+
sort: {
|
|
317
|
+
key: 'acapts_name',
|
|
318
|
+
order: 'asc'
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
this.programTermSectionService.getProgramTermSectionList(payload)
|
|
322
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
323
|
+
.subscribe({
|
|
324
|
+
next: (response) => {
|
|
325
|
+
if (response?.success && response.data) {
|
|
326
|
+
console.log('📚 Program term sections loaded:', response.data);
|
|
327
|
+
this.programTermSections.set(response.data);
|
|
328
|
+
this.updateGridData();
|
|
329
|
+
this.notificationService.success(`Loaded ${response.data.length} program term section(s) successfully.`);
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
console.warn('⚠️ No program term section data received');
|
|
333
|
+
this.programTermSections.set([]);
|
|
334
|
+
this.updateGridData();
|
|
335
|
+
this.notificationService.warning('No program term sections found.');
|
|
336
|
+
}
|
|
337
|
+
this.loading.set(false);
|
|
338
|
+
},
|
|
339
|
+
error: (error) => {
|
|
340
|
+
console.error('❌ Error loading program term sections:', error);
|
|
341
|
+
this.error.set('Failed to load program term sections');
|
|
342
|
+
this.loading.set(false);
|
|
343
|
+
this.notificationService.error('Failed to load program term sections');
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Update grid data
|
|
349
|
+
*/
|
|
350
|
+
updateGridData() {
|
|
351
|
+
this.gridConfig.update(config => ({
|
|
352
|
+
...config,
|
|
353
|
+
data: this.filteredProgramTermSections()
|
|
354
|
+
}));
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Handle grid events
|
|
358
|
+
*/
|
|
359
|
+
onGridEvent(event) {
|
|
360
|
+
switch (event.type) {
|
|
361
|
+
case 'pageChange':
|
|
362
|
+
if (event.data && typeof event.data === 'object' && 'pageIndex' in event.data && 'pageSize' in event.data) {
|
|
363
|
+
this.loadProgramTermSections();
|
|
364
|
+
}
|
|
365
|
+
break;
|
|
366
|
+
case 'search':
|
|
367
|
+
this.searchTerm.set(event.data);
|
|
368
|
+
this.updateGridData();
|
|
369
|
+
break;
|
|
370
|
+
case 'refresh':
|
|
371
|
+
this.loadProgramTermSections();
|
|
372
|
+
break;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Create new program term section
|
|
377
|
+
*/
|
|
378
|
+
createProgramTermSection() {
|
|
379
|
+
this.router.navigate(['/control-panel/program-term-section/create']);
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* View program term section details
|
|
383
|
+
*/
|
|
384
|
+
viewProgramTermSection(programTermSection) {
|
|
385
|
+
this.router.navigate(['/control-panel/program-term-section/view', programTermSection._id]);
|
|
386
|
+
}
|
|
387
|
+
/**
|
|
388
|
+
* Edit program term section
|
|
389
|
+
*/
|
|
390
|
+
editProgramTermSection(programTermSection) {
|
|
391
|
+
this.router.navigate(['/control-panel/program-term-section/edit', programTermSection._id]);
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Delete program term section
|
|
395
|
+
*/
|
|
396
|
+
deleteProgramTermSection(programTermSection) {
|
|
397
|
+
this.confirmationService.confirmDelete(programTermSection?.acapts_name).then((confirmed) => {
|
|
398
|
+
if (confirmed) {
|
|
399
|
+
this.loading.set(true);
|
|
400
|
+
const payload = {
|
|
401
|
+
acapts_id: programTermSection._id
|
|
402
|
+
};
|
|
403
|
+
this.programTermSectionService.deleteProgramTermSection(payload)
|
|
404
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
405
|
+
.subscribe({
|
|
406
|
+
next: (response) => {
|
|
407
|
+
if (response?.success) {
|
|
408
|
+
this.programTermSections.update(sections => sections.filter(pts => pts._id !== programTermSection._id));
|
|
409
|
+
this.updateGridData();
|
|
410
|
+
this.notificationService.success('Program term section deleted successfully.');
|
|
411
|
+
}
|
|
412
|
+
else {
|
|
413
|
+
this.notificationService.error('Failed to delete program term section.');
|
|
414
|
+
}
|
|
415
|
+
this.loading.set(false);
|
|
416
|
+
},
|
|
417
|
+
error: (error) => {
|
|
418
|
+
console.error('❌ Error deleting program term section:', error);
|
|
419
|
+
this.notificationService.error('Failed to delete program term section.');
|
|
420
|
+
this.loading.set(false);
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Toggle program term section status
|
|
428
|
+
*/
|
|
429
|
+
toggleProgramTermSectionStatus(programTermSection) {
|
|
430
|
+
this.loading.set(true);
|
|
431
|
+
const payload = {
|
|
432
|
+
acapts_id: programTermSection._id
|
|
433
|
+
};
|
|
434
|
+
this.programTermSectionService.toggleProgramTermSectionStatus(payload)
|
|
435
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
436
|
+
.subscribe({
|
|
437
|
+
next: (response) => {
|
|
438
|
+
if (response?.success) {
|
|
439
|
+
this.programTermSections.update(sections => sections.map(pts => pts._id === programTermSection._id
|
|
440
|
+
? { ...pts, acapts_isactive: !pts.acapts_isactive }
|
|
441
|
+
: pts));
|
|
442
|
+
this.updateGridData();
|
|
443
|
+
this.notificationService.success(`Program term section ${programTermSection?.acapts_isactive ? 'deactivated' : 'activated'} successfully.`);
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
this.notificationService.error('Failed to toggle program term section status.');
|
|
447
|
+
}
|
|
448
|
+
this.loading.set(false);
|
|
449
|
+
},
|
|
450
|
+
error: (error) => {
|
|
451
|
+
console.error('❌ Error toggling program term section status:', error);
|
|
452
|
+
this.notificationService.error('Failed to toggle program term section status.');
|
|
453
|
+
this.loading.set(false);
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* Refresh data
|
|
459
|
+
*/
|
|
460
|
+
refreshData() {
|
|
461
|
+
this.loadProgramTermSections();
|
|
462
|
+
}
|
|
463
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ProgramTermSectionListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
464
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: ProgramTermSectionListComponent, isStandalone: true, selector: "cide-academics-program-term-section-list", viewQueries: [{ propertyName: "programTermSectionDetailsRendererTemplate", first: true, predicate: ["programTermSectionDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "programTermSectionStatusRendererTemplate", first: true, predicate: ["programTermSectionStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Program Term Section Management Container -->\r\n<div class=\"tw-table tw-w-full tw-h-full\">\r\n\r\n <!-- Header Section -->\r\n <div class=\"tw-table-row tw-h-0\">\r\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">group</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Program Term Section Management</h5>\r\n </div>\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <button cideEleButton variant=\"primary\" size=\"sm\" leftIcon=\"add\" (click)=\"createProgramTermSection()\">\r\n Create Program Term Section\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid Section -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-p-0\">\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</div>\r\n\r\n<!-- Template Renderers -->\r\n<ng-template #programTermSectionDetailsRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n <div class=\"tw-flex-shrink-0\">\r\n <div class=\"tw-w-10 tw-h-10 tw-bg-teal-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\r\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">group</cide-ele-icon>\r\n </div>\r\n </div>\r\n <div class=\"tw-min-w-0 tw-flex-1\">\r\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-m-0\">\r\n {{ item?.acapts_name }}\r\n </h6>\r\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\r\n {{ item?.acapts_description }}\r\n </p>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #programTermSectionStatusRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n @if (item?.acapts_iscurrent) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-blue-100 tw-text-blue-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">star</cide-ele-icon>\r\n Current\r\n </span>\r\n }\r\n @if (item?.acapts_islocked) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-yellow-100 tw-text-yellow-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">lock</cide-ele-icon>\r\n Locked\r\n </span>\r\n }\r\n <span [ngClass]=\"{\r\n 'tw-bg-green-100 tw-text-green-800': item?.acapts_isactive,\r\n 'tw-bg-red-100 tw-text-red-800': !item?.acapts_isactive\r\n }\" class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium\">\r\n <cide-ele-icon [ngClass]=\"{\r\n 'tw-text-green-600': item?.acapts_isactive,\r\n 'tw-text-red-600': !item?.acapts_isactive\r\n }\" class=\"tw-w-3 tw-h-3 tw-mr-1\">\r\n {{ item?.acapts_isactive ? 'check_circle' : 'cancel' }}\r\n </cide-ele-icon>\r\n {{ item?.acapts_isactive ? 'Active' : 'Inactive' }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #actionsDropdownRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <cide-ele-dropdown\r\n [items]=\"getActionDropdownItems(item)\"\r\n (itemClick)=\"onDropdownItemClick($event, item)\"\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n icon=\"more_vert\">\r\n </cide-ele-dropdown>\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", 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: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }] });
|
|
465
|
+
}
|
|
466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ProgramTermSectionListComponent, decorators: [{
|
|
467
|
+
type: Component,
|
|
468
|
+
args: [{ selector: 'cide-academics-program-term-section-list', standalone: true, imports: [
|
|
469
|
+
CommonModule,
|
|
470
|
+
CideEleDataGridComponent,
|
|
471
|
+
CideIconComponent,
|
|
472
|
+
CideEleButtonComponent,
|
|
473
|
+
CideEleDropdownComponent
|
|
474
|
+
], template: "<!-- Program Term Section Management Container -->\r\n<div class=\"tw-table tw-w-full tw-h-full\">\r\n\r\n <!-- Header Section -->\r\n <div class=\"tw-table-row tw-h-0\">\r\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">group</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Program Term Section Management</h5>\r\n </div>\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <button cideEleButton variant=\"primary\" size=\"sm\" leftIcon=\"add\" (click)=\"createProgramTermSection()\">\r\n Create Program Term Section\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid Section -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-p-0\">\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</div>\r\n\r\n<!-- Template Renderers -->\r\n<ng-template #programTermSectionDetailsRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n <div class=\"tw-flex-shrink-0\">\r\n <div class=\"tw-w-10 tw-h-10 tw-bg-teal-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\r\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">group</cide-ele-icon>\r\n </div>\r\n </div>\r\n <div class=\"tw-min-w-0 tw-flex-1\">\r\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-m-0\">\r\n {{ item?.acapts_name }}\r\n </h6>\r\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\r\n {{ item?.acapts_description }}\r\n </p>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #programTermSectionStatusRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n @if (item?.acapts_iscurrent) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-blue-100 tw-text-blue-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">star</cide-ele-icon>\r\n Current\r\n </span>\r\n }\r\n @if (item?.acapts_islocked) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-yellow-100 tw-text-yellow-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">lock</cide-ele-icon>\r\n Locked\r\n </span>\r\n }\r\n <span [ngClass]=\"{\r\n 'tw-bg-green-100 tw-text-green-800': item?.acapts_isactive,\r\n 'tw-bg-red-100 tw-text-red-800': !item?.acapts_isactive\r\n }\" class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium\">\r\n <cide-ele-icon [ngClass]=\"{\r\n 'tw-text-green-600': item?.acapts_isactive,\r\n 'tw-text-red-600': !item?.acapts_isactive\r\n }\" class=\"tw-w-3 tw-h-3 tw-mr-1\">\r\n {{ item?.acapts_isactive ? 'check_circle' : 'cancel' }}\r\n </cide-ele-icon>\r\n {{ item?.acapts_isactive ? 'Active' : 'Inactive' }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #actionsDropdownRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <cide-ele-dropdown\r\n [items]=\"getActionDropdownItems(item)\"\r\n (itemClick)=\"onDropdownItemClick($event, item)\"\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n icon=\"more_vert\">\r\n </cide-ele-dropdown>\r\n</ng-template>\r\n" }]
|
|
475
|
+
}] });
|
|
476
|
+
|
|
477
|
+
export { ProgramTermSectionListComponent };
|
|
478
|
+
//# sourceMappingURL=cloud-ide-academics-program-term-section-list.component-xVeeeGDV.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-ide-academics-program-term-section-list.component-xVeeeGDV.mjs","sources":["../../../projects/cloud-ide-academics/src/lib/collection/program-term-section-management/services/program-term-section.service.ts","../../../projects/cloud-ide-academics/src/lib/collection/program-term-section-management/components/program-term-section-list/program-term-section-list.component.ts","../../../projects/cloud-ide-academics/src/lib/collection/program-term-section-management/components/program-term-section-list/program-term-section-list.component.html"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport {\r\n cidePath,\r\n academicsRoutesUrl,\r\n hostManagerRoutesUrl,\r\n generateStringFromObject,\r\n type prgTrmSectionControllerResponse,\r\n type MPrgTrmSection,\r\n type prgTrmSectionByIdControllerResponse,\r\n type MPrgTrmSectionGetByIdPayload,\r\n type prgTrmSectionInsertUpdateControllerResponse,\r\n type MPrgTrmSectionInsertUpdatePayload,\r\n type prgTrmSectionDeleteControllerResponse,\r\n type MPrgTrmSectionDeletePayload,\r\n type prgTrmSectionToggleStatusControllerResponse,\r\n type MPrgTrmSectionToggleStatusPayload,\r\n type prgTrmSectionToggleLockControllerResponse,\r\n type MPrgTrmSectionToggleLockPayload\r\n} from 'cloud-ide-lms-model';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CideLytProgramTermSectionService {\r\n private http = inject(HttpClient);\r\n\r\n /**\r\n * Get list of program term sections\r\n * @param payload - Query parameters for filtering/pagination\r\n * @returns Observable of program term section list response\r\n */\r\n getProgramTermSectionList(payload: MPrgTrmSection): Observable<prgTrmSectionControllerResponse> {\r\n console.log(\"Program Term Section List Payload:\", payload);\r\n const query = generateStringFromObject(payload);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n academicsRoutesUrl.module,\r\n academicsRoutesUrl.programTermSection,\r\n query\r\n ]);\r\n\r\n return this.http.get(url);\r\n }\r\n\r\n /**\r\n * Get program term section by ID\r\n * @param payload - Program term section ID payload\r\n * @returns Observable of program term section data\r\n */\r\n getProgramTermSectionById(payload: MPrgTrmSectionGetByIdPayload): Observable<prgTrmSectionByIdControllerResponse> {\r\n const query = generateStringFromObject(payload);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n academicsRoutesUrl.module,\r\n academicsRoutesUrl.programTermSection,\r\n 'byId',\r\n query\r\n ]);\r\n\r\n return this.http.get(url);\r\n }\r\n\r\n /**\r\n * Create or update program term section\r\n * @param data - Program term section data to save\r\n * @returns Observable of the save response\r\n */\r\n saveProgramTermSection(data: MPrgTrmSectionInsertUpdatePayload): Observable<prgTrmSectionInsertUpdateControllerResponse> {\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n academicsRoutesUrl.module,\r\n academicsRoutesUrl.programTermSection\r\n ]);\r\n\r\n return this.http.post(url, data);\r\n }\r\n\r\n /**\r\n * Delete program term section\r\n * @param payload - Program term section delete payload\r\n * @returns Observable of the delete response\r\n */\r\n deleteProgramTermSection(payload: MPrgTrmSectionDeletePayload): Observable<prgTrmSectionDeleteControllerResponse> {\r\n const query = generateStringFromObject(payload);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n academicsRoutesUrl.module,\r\n academicsRoutesUrl.programTermSection,\r\n query\r\n ]);\r\n\r\n return this.http.delete(url);\r\n }\r\n\r\n /**\r\n * Toggle program term section status (active/inactive)\r\n * @param payload - Program term section toggle status payload\r\n * @returns Observable of the toggle status response\r\n */\r\n toggleProgramTermSectionStatus(payload: MPrgTrmSectionToggleStatusPayload): Observable<prgTrmSectionToggleStatusControllerResponse> {\r\n const query = generateStringFromObject(payload);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n academicsRoutesUrl.module,\r\n academicsRoutesUrl.programTermSection,\r\n 'toggleStatus',\r\n query\r\n ]);\r\n\r\n return this.http.put(url, {});\r\n }\r\n\r\n /**\r\n * Toggle program term section lock status\r\n * @param payload - Program term section toggle lock payload\r\n * @returns Observable of the toggle lock response\r\n */\r\n toggleProgramTermSectionLock(payload: MPrgTrmSectionToggleLockPayload): Observable<prgTrmSectionToggleLockControllerResponse> {\r\n const query = generateStringFromObject(payload);\r\n const url = cidePath.join([\r\n hostManagerRoutesUrl.cideSuiteHost,\r\n academicsRoutesUrl.module,\r\n academicsRoutesUrl.programTermSection,\r\n 'toggleLock',\r\n query\r\n ]);\r\n\r\n return this.http.put(url, {});\r\n }\r\n}\r\n","import { Component, signal, computed, viewChild, TemplateRef, DestroyRef, inject, OnInit } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Router } from '@angular/router';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { CideEleDataGridComponent, CideIconComponent, CideEleButtonComponent, GridConfiguration, GridEvent, CideEleDropdownComponent, DropdownItem, NotificationService, ConfirmationService } from 'cloud-ide-element';\r\nimport { TemplateContext } from 'cloud-ide-element';\r\nimport { AppStateHelperService } from 'cloud-ide-layout';\r\nimport { \r\n type MPrgTrmSection,\r\n type MPrgTrmSectionDeletePayload,\r\n type MPrgTrmSectionToggleStatusPayload\r\n} from 'cloud-ide-lms-model';\r\nimport { CideLytProgramTermSectionService } from '../../services/program-term-section.service';\r\n\r\n// Interfaces based on the model files\r\ninterface ProgramTermSection {\r\n _id?: string;\r\n acapts_code?: string;\r\n acapts_name?: string;\r\n acapts_description?: string;\r\n acapts_class_program_id_acacpm?: {\r\n _id?: string;\r\n acacpm_name?: string;\r\n };\r\n acapts_parent_class_prog_term_acapt?: {\r\n _id?: string;\r\n acapt_name?: string;\r\n };\r\n acapts_isactive?: boolean;\r\n acapts_iscurrent?: boolean;\r\n acapts_islocked?: boolean;\r\n}\r\n\r\n@Component({\r\n selector: 'cide-academics-program-term-section-list',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n CideEleDataGridComponent,\r\n CideIconComponent,\r\n CideEleButtonComponent,\r\n CideEleDropdownComponent\r\n ],\r\n templateUrl: './program-term-section-list.component.html'\r\n})\r\nexport class ProgramTermSectionListComponent implements OnInit {\r\n // Dependency injection\r\n private destroyRef = inject(DestroyRef);\r\n private router = inject(Router);\r\n private appState = inject(AppStateHelperService);\r\n private notificationService = inject(NotificationService);\r\n private confirmationService = inject(ConfirmationService);\r\n private programTermSectionService = inject(CideLytProgramTermSectionService);\r\n\r\n // Modern ViewChild signals for template renderers (Angular 20 approach)\r\n programTermSectionDetailsRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('programTermSectionDetailsRendererTemplate');\r\n programTermSectionStatusRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('programTermSectionStatusRendererTemplate');\r\n actionsDropdownRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('actionsDropdownRendererTemplate');\r\n\r\n // Computed template renderers for grid\r\n templateRenderers = computed((): Record<string, TemplateRef<TemplateContext>> => ({\r\n programTermSectionDetailsRenderer: this.programTermSectionDetailsRendererTemplate(),\r\n programTermSectionStatusRenderer: this.programTermSectionStatusRendererTemplate(),\r\n actionsDropdownRenderer: this.actionsDropdownRendererTemplate()\r\n }));\r\n\r\n // Make Math available in template\r\n Math = Math;\r\n\r\n // Signals for reactive state management\r\n programTermSections = signal<ProgramTermSection[]>([]);\r\n loading = signal(false);\r\n error = signal<string | null>(null);\r\n selectedItems = signal<string[]>([]);\r\n searchTerm = signal('');\r\n\r\n // Derived list filtered by searchTerm\r\n filteredProgramTermSections = computed(() => {\r\n const q = (this.searchTerm() || '').toLowerCase().trim();\r\n const items = this.programTermSections() || [];\r\n if (!q) return items;\r\n return items.filter(pts => {\r\n const name = (pts.acapts_name || '').toLowerCase();\r\n const code = (pts.acapts_code || '').toLowerCase();\r\n const description = (pts.acapts_description || '').toLowerCase();\r\n return name.includes(q) || code.includes(q) || description.includes(q);\r\n });\r\n });\r\n\r\n // Grid configuration signal\r\n gridConfig = signal<GridConfiguration<ProgramTermSection>>({\r\n id: 'program-term-section-list-grid',\r\n columns: [\r\n {\r\n key: 'details',\r\n header: 'Section Details',\r\n type: 'custom',\r\n width: 'auto',\r\n truncate: true,\r\n align: 'left',\r\n renderer: 'programTermSectionDetailsRenderer'\r\n },\r\n {\r\n key: 'acapts_code',\r\n header: 'Code',\r\n type: 'text',\r\n width: '120px',\r\n truncate: true,\r\n align: 'left'\r\n },\r\n {\r\n key: 'acapts_class_program_id_acacpm',\r\n header: 'Program Class',\r\n type: 'custom',\r\n width: '200px',\r\n truncate: true,\r\n align: 'left',\r\n renderer: 'programClassRenderer'\r\n },\r\n {\r\n key: 'acapts_parent_class_prog_term_acapt',\r\n header: 'Class Program Term',\r\n type: 'custom',\r\n width: '200px',\r\n truncate: true,\r\n align: 'left',\r\n renderer: 'classProgramTermRenderer'\r\n },\r\n {\r\n key: 'acapts_isactive',\r\n header: 'Status',\r\n type: 'custom',\r\n width: '120px',\r\n truncate: false,\r\n align: 'center',\r\n renderer: 'programTermSectionStatusRenderer'\r\n },\r\n {\r\n key: 'actions',\r\n header: '',\r\n type: 'custom',\r\n width: '150px',\r\n truncate: false,\r\n align: 'center',\r\n renderer: 'actionsDropdownRenderer'\r\n }\r\n ],\r\n data: [],\r\n trackBy: '_id',\r\n pagination: {\r\n enabled: true,\r\n pageSize: 10,\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 program term sections...',\r\n searchableColumns: ['acapts_name', 'acapts_code', 'acapts_description'],\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 scroll: {\r\n enabled: true,\r\n maxHeight: '',\r\n minHeight: '',\r\n stickyHeader: true,\r\n virtualScroll: false,\r\n rowHeight: 50\r\n },\r\n responsive: true,\r\n striped: false,\r\n bordered: true,\r\n compact: false,\r\n tableClass: 'tw-table-fixed tw-w-full tw-rounded-none'\r\n });\r\n\r\n /**\r\n * Get action dropdown items\r\n */\r\n getActionDropdownItems(programTermSection: ProgramTermSection): DropdownItem[] {\r\n const items: DropdownItem[] = [\r\n {\r\n id: 'view',\r\n label: 'View Details',\r\n icon: 'visibility',\r\n iconColor: 'tw-text-gray-400',\r\n textColor: 'tw-text-gray-700'\r\n },\r\n {\r\n id: 'edit',\r\n label: 'Edit Section',\r\n icon: 'edit',\r\n iconColor: 'tw-text-blue-400',\r\n textColor: 'tw-text-blue-700'\r\n },\r\n {\r\n id: 'toggleStatus',\r\n label: programTermSection?.acapts_isactive ? 'Deactivate' : 'Activate',\r\n icon: programTermSection?.acapts_isactive ? 'toggle_off' : 'toggle_on',\r\n iconColor: programTermSection?.acapts_isactive ? 'tw-text-orange-400' : 'tw-text-green-400',\r\n textColor: programTermSection?.acapts_isactive ? 'tw-text-orange-700' : 'tw-text-green-700'\r\n },\r\n {\r\n id: 'delete',\r\n label: 'Delete',\r\n icon: 'delete',\r\n iconColor: 'tw-text-red-400',\r\n textColor: 'tw-text-red-700'\r\n }\r\n ];\r\n\r\n return items;\r\n }\r\n\r\n /**\r\n * Handle dropdown item click\r\n */\r\n onDropdownItemClick(item: DropdownItem, programTermSection: ProgramTermSection): void {\r\n switch (item.id) {\r\n case 'view':\r\n this.viewProgramTermSection(programTermSection);\r\n break;\r\n case 'edit':\r\n this.editProgramTermSection(programTermSection);\r\n break;\r\n case 'toggleStatus':\r\n this.toggleProgramTermSectionStatus(programTermSection);\r\n break;\r\n case 'delete':\r\n this.deleteProgramTermSection(programTermSection);\r\n break;\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.loadProgramTermSections();\r\n }\r\n\r\n /**\r\n * Load program term sections data\r\n */\r\n private loadProgramTermSections(): void {\r\n this.loading.set(true);\r\n this.error.set(null);\r\n\r\n const payload: MPrgTrmSection = {\r\n pageIndex: 0,\r\n pageSize: 100,\r\n query: this.searchTerm() || \"\",\r\n sort: {\r\n key: 'acapts_name',\r\n order: 'asc'\r\n }\r\n };\r\n\r\n this.programTermSectionService.getProgramTermSectionList(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n if (response?.success && response.data) {\r\n console.log('📚 Program term sections loaded:', response.data);\r\n this.programTermSections.set(response.data);\r\n this.updateGridData();\r\n this.notificationService.success(`Loaded ${response.data.length} program term section(s) successfully.`);\r\n } else {\r\n console.warn('⚠️ No program term section data received');\r\n this.programTermSections.set([]);\r\n this.updateGridData();\r\n this.notificationService.warning('No program term sections found.');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error) => {\r\n console.error('❌ Error loading program term sections:', error);\r\n this.error.set('Failed to load program term sections');\r\n this.loading.set(false);\r\n this.notificationService.error('Failed to load program term sections');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Update grid data\r\n */\r\n private updateGridData(): void {\r\n this.gridConfig.update(config => ({\r\n ...config,\r\n data: this.filteredProgramTermSections()\r\n }));\r\n }\r\n\r\n /**\r\n * Handle grid events\r\n */\r\n onGridEvent(event: GridEvent<ProgramTermSection>): void {\r\n switch (event.type) {\r\n case 'pageChange':\r\n if (event.data && typeof event.data === 'object' && 'pageIndex' in event.data && 'pageSize' in event.data) {\r\n this.loadProgramTermSections();\r\n }\r\n break;\r\n case 'search':\r\n this.searchTerm.set(event.data as string);\r\n this.updateGridData();\r\n break;\r\n case 'refresh':\r\n this.loadProgramTermSections();\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Create new program term section\r\n */\r\n createProgramTermSection(): void {\r\n this.router.navigate(['/control-panel/program-term-section/create']);\r\n }\r\n\r\n /**\r\n * View program term section details\r\n */\r\n viewProgramTermSection(programTermSection: ProgramTermSection): void {\r\n this.router.navigate(['/control-panel/program-term-section/view', programTermSection._id]);\r\n }\r\n\r\n /**\r\n * Edit program term section\r\n */\r\n editProgramTermSection(programTermSection: ProgramTermSection): void {\r\n this.router.navigate(['/control-panel/program-term-section/edit', programTermSection._id]);\r\n }\r\n\r\n /**\r\n * Delete program term section\r\n */\r\n deleteProgramTermSection(programTermSection: ProgramTermSection): void {\r\n this.confirmationService.confirmDelete(programTermSection?.acapts_name).then((confirmed: boolean) => {\r\n if (confirmed) {\r\n this.loading.set(true);\r\n const payload: MPrgTrmSectionDeletePayload = {\r\n acapts_id: programTermSection._id!\r\n };\r\n\r\n this.programTermSectionService.deleteProgramTermSection(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n if (response?.success) {\r\n this.programTermSections.update(sections => \r\n sections.filter(pts => pts._id !== programTermSection._id)\r\n );\r\n this.updateGridData();\r\n this.notificationService.success('Program term section deleted successfully.');\r\n } else {\r\n this.notificationService.error('Failed to delete program term section.');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error) => {\r\n console.error('❌ Error deleting program term section:', error);\r\n this.notificationService.error('Failed to delete program term section.');\r\n this.loading.set(false);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Toggle program term section status\r\n */\r\n toggleProgramTermSectionStatus(programTermSection: ProgramTermSection): void {\r\n this.loading.set(true);\r\n const payload: MPrgTrmSectionToggleStatusPayload = {\r\n acapts_id: programTermSection._id!\r\n };\r\n\r\n this.programTermSectionService.toggleProgramTermSectionStatus(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n if (response?.success) {\r\n this.programTermSections.update(sections => \r\n sections.map(pts => \r\n pts._id === programTermSection._id \r\n ? { ...pts, acapts_isactive: !pts.acapts_isactive }\r\n : pts\r\n )\r\n );\r\n this.updateGridData();\r\n this.notificationService.success(`Program term section ${programTermSection?.acapts_isactive ? 'deactivated' : 'activated'} successfully.`);\r\n } else {\r\n this.notificationService.error('Failed to toggle program term section status.');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error) => {\r\n console.error('❌ Error toggling program term section status:', error);\r\n this.notificationService.error('Failed to toggle program term section status.');\r\n this.loading.set(false);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Refresh data\r\n */\r\n refreshData(): void {\r\n this.loadProgramTermSections();\r\n }\r\n}\r\n","<!-- Program Term Section Management Container -->\r\n<div class=\"tw-table tw-w-full tw-h-full\">\r\n\r\n <!-- Header Section -->\r\n <div class=\"tw-table-row tw-h-0\">\r\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">group</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Program Term Section Management</h5>\r\n </div>\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <button cideEleButton variant=\"primary\" size=\"sm\" leftIcon=\"add\" (click)=\"createProgramTermSection()\">\r\n Create Program Term Section\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid Section -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-p-0\">\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</div>\r\n\r\n<!-- Template Renderers -->\r\n<ng-template #programTermSectionDetailsRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n <div class=\"tw-flex-shrink-0\">\r\n <div class=\"tw-w-10 tw-h-10 tw-bg-teal-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\r\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">group</cide-ele-icon>\r\n </div>\r\n </div>\r\n <div class=\"tw-min-w-0 tw-flex-1\">\r\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-m-0\">\r\n {{ item?.acapts_name }}\r\n </h6>\r\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\r\n {{ item?.acapts_description }}\r\n </p>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #programTermSectionStatusRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n @if (item?.acapts_iscurrent) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-blue-100 tw-text-blue-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">star</cide-ele-icon>\r\n Current\r\n </span>\r\n }\r\n @if (item?.acapts_islocked) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-yellow-100 tw-text-yellow-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">lock</cide-ele-icon>\r\n Locked\r\n </span>\r\n }\r\n <span [ngClass]=\"{\r\n 'tw-bg-green-100 tw-text-green-800': item?.acapts_isactive,\r\n 'tw-bg-red-100 tw-text-red-800': !item?.acapts_isactive\r\n }\" class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium\">\r\n <cide-ele-icon [ngClass]=\"{\r\n 'tw-text-green-600': item?.acapts_isactive,\r\n 'tw-text-red-600': !item?.acapts_isactive\r\n }\" class=\"tw-w-3 tw-h-3 tw-mr-1\">\r\n {{ item?.acapts_isactive ? 'check_circle' : 'cancel' }}\r\n </cide-ele-icon>\r\n {{ item?.acapts_isactive ? 'Active' : 'Inactive' }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #actionsDropdownRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <cide-ele-dropdown\r\n [items]=\"getActionDropdownItems(item)\"\r\n (itemClick)=\"onDropdownItemClick($event, item)\"\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n icon=\"more_vert\">\r\n </cide-ele-dropdown>\r\n</ng-template>\r\n"],"names":[],"mappings":";;;;;;;;;;;MAyBa,gCAAgC,CAAA;AACnC,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AAEjC;;;;AAIG;AACH,IAAA,yBAAyB,CAAC,OAAuB,EAAA;AAC/C,QAAA,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,OAAO,CAAC;AAC1D,QAAA,MAAM,KAAK,GAAG,wBAAwB,CAAC,OAAO,CAAC;AAC/C,QAAA,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC;AACxB,YAAA,oBAAoB,CAAC,aAAa;AAClC,YAAA,kBAAkB,CAAC,MAA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