cloud-ide-academics 0.0.54 → 0.0.56
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-bonafide-request-detail.component-BRG6AkHZ.mjs → cloud-ide-academics-bonafide-request-detail.component-Mh9qdY6v.mjs} +6 -6
- package/fesm2022/cloud-ide-academics-bonafide-request-detail.component-Mh9qdY6v.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics-bonafide-request-form.component-GiVehOPg.mjs +317 -0
- package/fesm2022/cloud-ide-academics-bonafide-request-form.component-GiVehOPg.mjs.map +1 -0
- package/fesm2022/{cloud-ide-academics-bonafide-request-list.component-DKYKgplL.mjs → cloud-ide-academics-bonafide-request-list.component-CldJcpVL.mjs} +7 -7
- package/fesm2022/cloud-ide-academics-bonafide-request-list.component-CldJcpVL.mjs.map +1 -0
- package/fesm2022/{cloud-ide-academics-bonafide.service-DB6ySuGe.mjs → cloud-ide-academics-bonafide.service-CHPe3MPl.mjs} +4 -4
- package/fesm2022/{cloud-ide-academics-bonafide.service-DB6ySuGe.mjs.map → cloud-ide-academics-bonafide.service-CHPe3MPl.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-academics-class-program-term-create.component-1IuTrJUo.mjs → cloud-ide-academics-class-program-term-create.component-B-gGKnpJ.mjs} +9 -6
- package/fesm2022/cloud-ide-academics-class-program-term-create.component-B-gGKnpJ.mjs.map +1 -0
- package/fesm2022/{cloud-ide-academics-class-program-term-list.component-C1JWoKus.mjs → cloud-ide-academics-class-program-term-list.component-BFfAhZrq.mjs} +9 -8
- package/fesm2022/cloud-ide-academics-class-program-term-list.component-BFfAhZrq.mjs.map +1 -0
- package/fesm2022/{cloud-ide-academics-cloud-ide-academics-Dd-B1hBe.mjs → cloud-ide-academics-cloud-ide-academics-BVQ8sA0L.mjs} +404 -116
- package/fesm2022/cloud-ide-academics-cloud-ide-academics-BVQ8sA0L.mjs.map +1 -0
- package/fesm2022/{cloud-ide-academics-program-class-create.component-DT_-sBiQ.mjs → cloud-ide-academics-program-class-create.component-DIG3K1WR.mjs} +53 -26
- package/fesm2022/cloud-ide-academics-program-class-create.component-DIG3K1WR.mjs.map +1 -0
- package/fesm2022/{cloud-ide-academics-program-class-list.component-CaVWRJfR.mjs → cloud-ide-academics-program-class-list.component-DZrSl_02.mjs} +188 -28
- package/fesm2022/cloud-ide-academics-program-class-list.component-DZrSl_02.mjs.map +1 -0
- package/fesm2022/cloud-ide-academics.mjs +1 -1
- package/index.d.ts +40 -0
- package/package.json +1 -1
- package/fesm2022/cloud-ide-academics-bonafide-request-detail.component-BRG6AkHZ.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-bonafide-request-form.component-CM3ISuhU.mjs +0 -317
- package/fesm2022/cloud-ide-academics-bonafide-request-form.component-CM3ISuhU.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-bonafide-request-list.component-DKYKgplL.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-class-program-term-create.component-1IuTrJUo.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-class-program-term-list.component-C1JWoKus.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-cloud-ide-academics-Dd-B1hBe.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-program-class-create.component-DT_-sBiQ.mjs.map +0 -1
- package/fesm2022/cloud-ide-academics-program-class-list.component-CaVWRJfR.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, DestroyRef, signal, viewChild, computed, Component } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, DestroyRef, signal, viewChild, computed, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import { Router } from '@angular/router';
|
|
@@ -7,7 +7,151 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
7
7
|
import { NotificationService, ConfirmationService, CideEleDataGridComponent, CideIconComponent, CideEleButtonComponent, CideEleDropdownComponent } from 'cloud-ide-element';
|
|
8
8
|
import { AppStateHelperService, RightsService, CideLytSharedWrapperComponent } from 'cloud-ide-layout';
|
|
9
9
|
import { generateStringFromObject } from 'cloud-ide-lms-model';
|
|
10
|
-
import { C as CideLytProgramClassService } from './cloud-ide-academics-cloud-ide-academics-
|
|
10
|
+
import { C as CideLytProgramClassService } from './cloud-ide-academics-cloud-ide-academics-BVQ8sA0L.mjs';
|
|
11
|
+
import { of, map, catchError } from 'rxjs';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Shared service for checking class program configuration features
|
|
15
|
+
* Supports two modes:
|
|
16
|
+
* 1. By ID: Makes API call to fetch program class, then checks configuration
|
|
17
|
+
* 2. By Configuration: Directly checks provided configuration object
|
|
18
|
+
*/
|
|
19
|
+
class ClassProgramConfigurationService {
|
|
20
|
+
programClassService = inject(CideLytProgramClassService);
|
|
21
|
+
/**
|
|
22
|
+
* Parse configuration from general master
|
|
23
|
+
* Handles both string (JSON) and object formats
|
|
24
|
+
* @param generalMaster - General master object containing sygms_configuration
|
|
25
|
+
* @returns Parsed configuration object or undefined
|
|
26
|
+
*/
|
|
27
|
+
parseConfiguration(generalMaster) {
|
|
28
|
+
if (!generalMaster || typeof generalMaster !== 'object') {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
if (!('sygms_configuration' in generalMaster)) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
const configValue = generalMaster.sygms_configuration;
|
|
35
|
+
if (!configValue) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
if (typeof configValue === 'string') {
|
|
39
|
+
try {
|
|
40
|
+
return JSON.parse(configValue);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else if (typeof configValue === 'object' && configValue !== null) {
|
|
47
|
+
return configValue;
|
|
48
|
+
}
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Check if branch functionality is enabled from configuration object
|
|
53
|
+
* @param config - Configuration object
|
|
54
|
+
* @returns true if branchType is true, false otherwise
|
|
55
|
+
*/
|
|
56
|
+
hasBranchFunctionalityFromConfig(config) {
|
|
57
|
+
return config?.branchType === true;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Check if branch functionality is enabled from general master object
|
|
61
|
+
* @param generalMaster - General master object containing sygms_configuration
|
|
62
|
+
* @returns true if branchType is true, false otherwise
|
|
63
|
+
*/
|
|
64
|
+
hasBranchFunctionalityFromGeneralMaster(generalMaster) {
|
|
65
|
+
const config = this.parseConfiguration(generalMaster);
|
|
66
|
+
return this.hasBranchFunctionalityFromConfig(config);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Check if branch functionality is enabled from program class object
|
|
70
|
+
* @param programClass - Program class object containing acacpm_class_program_id_sygms
|
|
71
|
+
* @returns true if branchType is true, false otherwise
|
|
72
|
+
*/
|
|
73
|
+
hasBranchFunctionalityFromProgramClass(programClass) {
|
|
74
|
+
if (!programClass) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
const generalMaster = programClass.acacpm_class_program_id_sygms;
|
|
78
|
+
return this.hasBranchFunctionalityFromGeneralMaster(generalMaster);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Check if branch functionality is enabled by fetching program class by ID
|
|
82
|
+
* Makes an API call to get the program class, then checks the configuration
|
|
83
|
+
* @param programClassId - ID of the program class
|
|
84
|
+
* @returns Observable<boolean> - true if branchType is true, false otherwise
|
|
85
|
+
*/
|
|
86
|
+
hasBranchFunctionalityById(programClassId) {
|
|
87
|
+
if (!programClassId || programClassId.trim() === '') {
|
|
88
|
+
return of(false);
|
|
89
|
+
}
|
|
90
|
+
const payload = {
|
|
91
|
+
acacpm_id: programClassId
|
|
92
|
+
};
|
|
93
|
+
return this.programClassService.getProgramClassById(payload).pipe(map((response) => {
|
|
94
|
+
if (!response?.success || !response.data) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
const programClass = response.data;
|
|
98
|
+
return this.hasBranchFunctionalityFromProgramClass(programClass);
|
|
99
|
+
}), catchError(() => {
|
|
100
|
+
return of(false);
|
|
101
|
+
}));
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Get configuration from general master
|
|
105
|
+
* @param generalMaster - General master object containing sygms_configuration
|
|
106
|
+
* @returns Configuration object or undefined
|
|
107
|
+
*/
|
|
108
|
+
getConfiguration(generalMaster) {
|
|
109
|
+
return this.parseConfiguration(generalMaster);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Get configuration from program class object
|
|
113
|
+
* @param programClass - Program class object containing acacpm_class_program_id_sygms
|
|
114
|
+
* @returns Configuration object or undefined
|
|
115
|
+
*/
|
|
116
|
+
getConfigurationFromProgramClass(programClass) {
|
|
117
|
+
if (!programClass) {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
const generalMaster = programClass.acacpm_class_program_id_sygms;
|
|
121
|
+
return this.getConfiguration(generalMaster);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Get configuration by fetching program class by ID
|
|
125
|
+
* Makes an API call to get the program class, then extracts the configuration
|
|
126
|
+
* @param programClassId - ID of the program class
|
|
127
|
+
* @returns Observable<ClassProgramConfiguration | undefined> - Configuration object or undefined
|
|
128
|
+
*/
|
|
129
|
+
getConfigurationById(programClassId) {
|
|
130
|
+
if (!programClassId || programClassId.trim() === '') {
|
|
131
|
+
return of(undefined);
|
|
132
|
+
}
|
|
133
|
+
const payload = {
|
|
134
|
+
acacpm_id: programClassId
|
|
135
|
+
};
|
|
136
|
+
return this.programClassService.getProgramClassById(payload).pipe(map((response) => {
|
|
137
|
+
if (!response?.success || !response.data) {
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
const programClass = response.data;
|
|
141
|
+
return this.getConfigurationFromProgramClass(programClass);
|
|
142
|
+
}), catchError(() => {
|
|
143
|
+
return of(undefined);
|
|
144
|
+
}));
|
|
145
|
+
}
|
|
146
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ClassProgramConfigurationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
147
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ClassProgramConfigurationService, providedIn: 'root' });
|
|
148
|
+
}
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ClassProgramConfigurationService, decorators: [{
|
|
150
|
+
type: Injectable,
|
|
151
|
+
args: [{
|
|
152
|
+
providedIn: 'root'
|
|
153
|
+
}]
|
|
154
|
+
}] });
|
|
11
155
|
|
|
12
156
|
class ProgramClassListComponent {
|
|
13
157
|
// Dependency injection
|
|
@@ -18,6 +162,7 @@ class ProgramClassListComponent {
|
|
|
18
162
|
confirmationService = inject(ConfirmationService);
|
|
19
163
|
programClassService = inject(CideLytProgramClassService);
|
|
20
164
|
rightsService = inject(RightsService);
|
|
165
|
+
classProgramConfigService = inject(ClassProgramConfigurationService);
|
|
21
166
|
// Signal for breadcrumb data that will be passed to shared wrapper
|
|
22
167
|
breadcrumbData = signal([], ...(ngDevMode ? [{ debugName: "breadcrumbData" }] : []));
|
|
23
168
|
// Modern ViewChild signals for template renderers (Angular 20 approach)
|
|
@@ -50,7 +195,10 @@ class ProgramClassListComponent {
|
|
|
50
195
|
return items;
|
|
51
196
|
return items.filter(pc => {
|
|
52
197
|
const title = (pc.acacpm_alise_title || '').toLowerCase();
|
|
53
|
-
|
|
198
|
+
// Handle union type: ClassProgramGeneralMaster | { _id, acacpm_name, sygms_configuration }
|
|
199
|
+
const generalMaster = pc.acacpm_class_program_id_sygms;
|
|
200
|
+
const classProgramTitle = ((generalMaster && 'sygms_title' in generalMaster ? generalMaster.sygms_title :
|
|
201
|
+
generalMaster && 'acacpm_name' in generalMaster ? generalMaster.acacpm_name : '') || '').toLowerCase();
|
|
54
202
|
const academicYearName = (pc.acacpm_academic_year_id_acayr?.acayr_name || '').toLowerCase();
|
|
55
203
|
const entityName = (pc.acacpm_entity_id_syen?.syen_name || '').toLowerCase();
|
|
56
204
|
return title.includes(q) || classProgramTitle.includes(q) || academicYearName.includes(q) || entityName.includes(q);
|
|
@@ -141,6 +289,16 @@ class ProgramClassListComponent {
|
|
|
141
289
|
compact: false,
|
|
142
290
|
tableClass: 'tw-table-fixed tw-w-full tw-rounded-none'
|
|
143
291
|
}, ...(ngDevMode ? [{ debugName: "gridConfig" }] : []));
|
|
292
|
+
/**
|
|
293
|
+
* Check if a program class has branch functionality enabled
|
|
294
|
+
* Uses the shared ClassProgramConfigurationService
|
|
295
|
+
* @param programClass - Program class object
|
|
296
|
+
* @returns true if branchType is true in the general master configuration
|
|
297
|
+
*/
|
|
298
|
+
hasBranchFunctionality(programClass) {
|
|
299
|
+
// Cast to ProgramClassWithGeneralMaster to match service interface (includes index signature)
|
|
300
|
+
return this.classProgramConfigService.hasBranchFunctionalityFromProgramClass(programClass);
|
|
301
|
+
}
|
|
144
302
|
/**
|
|
145
303
|
* Get action dropdown items
|
|
146
304
|
*/
|
|
@@ -159,29 +317,31 @@ class ProgramClassListComponent {
|
|
|
159
317
|
icon: 'edit',
|
|
160
318
|
iconColor: 'tw-text-blue-400',
|
|
161
319
|
textColor: 'tw-text-blue-700'
|
|
162
|
-
}
|
|
163
|
-
|
|
320
|
+
}
|
|
321
|
+
];
|
|
322
|
+
// Only show "Manage Branches" option if the program class has branch functionality enabled
|
|
323
|
+
if (this.hasBranchFunctionality(programClass)) {
|
|
324
|
+
items.push({
|
|
164
325
|
id: 'branch',
|
|
165
326
|
label: 'Manage Branches',
|
|
166
327
|
icon: 'account_tree',
|
|
167
328
|
iconColor: 'tw-text-purple-400',
|
|
168
329
|
textColor: 'tw-text-purple-700'
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
];
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
items.push({
|
|
333
|
+
id: 'toggleStatus',
|
|
334
|
+
label: programClass?.acacpm_isactive ? 'Deactivate' : 'Activate',
|
|
335
|
+
icon: programClass?.acacpm_isactive ? 'toggle_off' : 'toggle_on',
|
|
336
|
+
iconColor: programClass?.acacpm_isactive ? 'tw-text-orange-400' : 'tw-text-green-400',
|
|
337
|
+
textColor: programClass?.acacpm_isactive ? 'tw-text-orange-700' : 'tw-text-green-700'
|
|
338
|
+
}, {
|
|
339
|
+
id: 'delete',
|
|
340
|
+
label: 'Delete',
|
|
341
|
+
icon: 'delete',
|
|
342
|
+
iconColor: 'tw-text-red-400',
|
|
343
|
+
textColor: 'tw-text-red-700'
|
|
344
|
+
});
|
|
185
345
|
return items;
|
|
186
346
|
}
|
|
187
347
|
/**
|
|
@@ -250,7 +410,7 @@ class ProgramClassListComponent {
|
|
|
250
410
|
next: (response) => {
|
|
251
411
|
if (response?.success && response.data) {
|
|
252
412
|
console.log('📚 Program classes loaded:', response.data);
|
|
253
|
-
this.programClasses.set(response.data);
|
|
413
|
+
this.programClasses.set(response.data || []);
|
|
254
414
|
this.updateGridData();
|
|
255
415
|
this.notificationService.success(`Loaded ${response.data.length} program class(es) successfully.`);
|
|
256
416
|
}
|
|
@@ -438,10 +598,10 @@ class ProgramClassListComponent {
|
|
|
438
598
|
refreshData() {
|
|
439
599
|
this.loadProgramClasses();
|
|
440
600
|
}
|
|
441
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
442
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
601
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ProgramClassListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
602
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ProgramClassListComponent, isStandalone: true, selector: "cide-academics-program-class-list", viewQueries: [{ propertyName: "programClassDetailsRendererTemplate", first: true, predicate: ["programClassDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "programClassStatusRendererTemplate", first: true, predicate: ["programClassStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "classProgramRendererTemplate", first: true, predicate: ["classProgramRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "academicYearRendererTemplate", first: true, predicate: ["academicYearRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Program Class Management Container -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_class' }\"\n [breadcrumb_data]=\"breadcrumbData()\">\n \n <!-- Action Buttons in Breadcrumb Area -->\n <div breadcrumb-actions>\n @if (canCreate()) {\n <button cideEleButton type=\"button\" variant=\"primary\" size=\"sm\" leftIcon=\"add\" (btnClick)=\"createProgramClass()\">\n Create Program Class\n </button>\n }\n </div>\n\n <!-- Main Content -->\n <div class=\"tw-flex tw-flex-col tw-w-full tw-h-full tw-overflow-hidden\">\n <!-- Data Grid Section -->\n <div class=\"tw-flex-1 tw-min-h-0 tw-p-0\">\n <cide-ele-data-grid\n class=\"tw-h-full\"\n [config]=\"gridConfig()\"\n [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n </div>\n</cide-lyt-shared-wrapper>\n\n<!-- Template Renderers -->\n<ng-template #programClassDetailsRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <div class=\"tw-flex-shrink-0\">\n <div class=\"tw-w-10 tw-h-10 tw-bg-purple-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-text-purple-600 tw-w-5 tw-h-5\">school</cide-ele-icon>\n </div>\n </div>\n <div class=\"tw-min-w-0 tw-flex-1\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-m-0\">\n {{ row?.acacpm_alise_title }}\n </h6>\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\n {{ row?.acacpm_class_program_id_sygms?.sygms_title }}\n </p>\n </div>\n </div>\n</ng-template>\n\n<ng-template #programClassStatusRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span [ngClass]=\"{\n 'tw-bg-green-100 tw-text-green-800': row?.acacpm_isactive,\n 'tw-bg-red-100 tw-text-red-800': !row?.acacpm_isactive\n }\" class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium\">\n <cide-ele-icon [ngClass]=\"{\n 'tw-text-green-600': row?.acacpm_isactive,\n 'tw-text-red-600': !row?.acacpm_isactive\n }\" class=\"tw-w-3 tw-h-3 tw-mr-2\">\n {{ row?.acacpm_isactive ? 'check_circle' : 'cancel' }}\n </cide-ele-icon>\n {{ row?.acacpm_isactive ? 'Active' : 'Inactive' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #classProgramRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">school</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-900 tw-truncate\">\n {{ row?.acacpm_class_program_id_sygms?.sygms_title || 'N/A' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #academicYearRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">calendar_today</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-900 tw-truncate\">\n {{ row?.acacpm_academic_year_id_acayr?.acayr_name || 'N/A' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\" let-value=\"value\" let-column=\"column\">\n <cide-ele-dropdown\n [items]=\"getActionDropdownItems(row)\"\n (itemClick)=\"onDropdownItemClick($event, row)\"\n size=\"sm\"\n variant=\"ghost\"\n icon=\"more_vert\">\n </cide-ele-dropdown>\n</ng-template>\n", styles: [""], 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], 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: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
443
603
|
}
|
|
444
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ProgramClassListComponent, decorators: [{
|
|
445
605
|
type: Component,
|
|
446
606
|
args: [{ selector: 'cide-academics-program-class-list', standalone: true, imports: [
|
|
447
607
|
CommonModule,
|
|
@@ -450,8 +610,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
450
610
|
CideEleButtonComponent,
|
|
451
611
|
CideEleDropdownComponent,
|
|
452
612
|
CideLytSharedWrapperComponent
|
|
453
|
-
], template: "<!-- Program Class Management Container -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_class' }\"\n [breadcrumb_data]=\"breadcrumbData()\">\n \n <!-- Action Buttons in Breadcrumb Area -->\n <div breadcrumb-actions>\n <button cideEleButton type=\"button\" variant=\"primary\" size=\"sm\" leftIcon=\"add\" (btnClick)=\"createProgramClass()\">\n
|
|
454
|
-
}] });
|
|
613
|
+
], template: "<!-- Program Class Management Container -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_class' }\"\n [breadcrumb_data]=\"breadcrumbData()\">\n \n <!-- Action Buttons in Breadcrumb Area -->\n <div breadcrumb-actions>\n @if (canCreate()) {\n <button cideEleButton type=\"button\" variant=\"primary\" size=\"sm\" leftIcon=\"add\" (btnClick)=\"createProgramClass()\">\n Create Program Class\n </button>\n }\n </div>\n\n <!-- Main Content -->\n <div class=\"tw-flex tw-flex-col tw-w-full tw-h-full tw-overflow-hidden\">\n <!-- Data Grid Section -->\n <div class=\"tw-flex-1 tw-min-h-0 tw-p-0\">\n <cide-ele-data-grid\n class=\"tw-h-full\"\n [config]=\"gridConfig()\"\n [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n </div>\n</cide-lyt-shared-wrapper>\n\n<!-- Template Renderers -->\n<ng-template #programClassDetailsRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <div class=\"tw-flex-shrink-0\">\n <div class=\"tw-w-10 tw-h-10 tw-bg-purple-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-text-purple-600 tw-w-5 tw-h-5\">school</cide-ele-icon>\n </div>\n </div>\n <div class=\"tw-min-w-0 tw-flex-1\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-m-0\">\n {{ row?.acacpm_alise_title }}\n </h6>\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\n {{ row?.acacpm_class_program_id_sygms?.sygms_title }}\n </p>\n </div>\n </div>\n</ng-template>\n\n<ng-template #programClassStatusRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span [ngClass]=\"{\n 'tw-bg-green-100 tw-text-green-800': row?.acacpm_isactive,\n 'tw-bg-red-100 tw-text-red-800': !row?.acacpm_isactive\n }\" class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium\">\n <cide-ele-icon [ngClass]=\"{\n 'tw-text-green-600': row?.acacpm_isactive,\n 'tw-text-red-600': !row?.acacpm_isactive\n }\" class=\"tw-w-3 tw-h-3 tw-mr-2\">\n {{ row?.acacpm_isactive ? 'check_circle' : 'cancel' }}\n </cide-ele-icon>\n {{ row?.acacpm_isactive ? 'Active' : 'Inactive' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #classProgramRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">school</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-900 tw-truncate\">\n {{ row?.acacpm_class_program_id_sygms?.sygms_title || 'N/A' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #academicYearRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">calendar_today</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-900 tw-truncate\">\n {{ row?.acacpm_academic_year_id_acayr?.acayr_name || 'N/A' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\" let-value=\"value\" let-column=\"column\">\n <cide-ele-dropdown\n [items]=\"getActionDropdownItems(row)\"\n (itemClick)=\"onDropdownItemClick($event, row)\"\n size=\"sm\"\n variant=\"ghost\"\n icon=\"more_vert\">\n </cide-ele-dropdown>\n</ng-template>\n" }]
|
|
614
|
+
}], propDecorators: { programClassDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['programClassDetailsRendererTemplate', { isSignal: true }] }], programClassStatusRendererTemplate: [{ type: i0.ViewChild, args: ['programClassStatusRendererTemplate', { isSignal: true }] }], classProgramRendererTemplate: [{ type: i0.ViewChild, args: ['classProgramRendererTemplate', { isSignal: true }] }], academicYearRendererTemplate: [{ type: i0.ViewChild, args: ['academicYearRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
455
615
|
|
|
456
616
|
export { ProgramClassListComponent };
|
|
457
|
-
//# sourceMappingURL=cloud-ide-academics-program-class-list.component-
|
|
617
|
+
//# sourceMappingURL=cloud-ide-academics-program-class-list.component-DZrSl_02.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-ide-academics-program-class-list.component-DZrSl_02.mjs","sources":["../../../projects/cloud-ide-academics/src/lib/shared/services/class-program-configuration.service.ts","../../../projects/cloud-ide-academics/src/lib/collection/program-class-management/components/program-class-list/program-class-list.component.ts","../../../projects/cloud-ide-academics/src/lib/collection/program-class-management/components/program-class-list/program-class-list.component.html"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\r\nimport { Observable, map, catchError, of } from 'rxjs';\r\nimport { CideLytProgramClassService } from '../../collection/program-class-management/services/program-class.service';\r\nimport type { MClassProgramMasterGetByIdPayload, classProgramMasterByIdControllerResponse } from 'cloud-ide-lms-model';\r\n\r\n/**\r\n * Interface for class program configuration\r\n * This matches the configuration structure stored in general master's sygms_configuration field\r\n */\r\nexport interface ClassProgramConfiguration {\r\n semesterType?: boolean; // Legacy property name\r\n termType?: boolean; // Current property name\r\n branchType?: boolean;\r\n termLevelUpTo?: number; // Number of term hierarchy levels\r\n termAdmissionLevelUpTo?: number; // For admission forms\r\n termProgramLevelOneConnected?: boolean; // Whether term is connected at program level\r\n getAdmission?: boolean; // For admission forms\r\n [key: string]: unknown;\r\n}\r\n\r\n/**\r\n * Interface for general master object that contains configuration\r\n */\r\nexport interface GeneralMasterWithConfiguration {\r\n _id?: string;\r\n sygms_id_sygmt?: string;\r\n sygms_code?: string;\r\n sygms_title?: string;\r\n sygms_desc?: string;\r\n sygms_entity_id_syen?: string;\r\n sygms_isactive?: boolean;\r\n sygms_configuration?: ClassProgramConfiguration | string;\r\n __v?: number;\r\n}\r\n\r\n/**\r\n * Interface for program class object that contains general master\r\n */\r\nexport interface ProgramClassWithGeneralMaster {\r\n _id?: string;\r\n acacpm_class_program_id_sygms?: GeneralMasterWithConfiguration;\r\n [key: string]: unknown;\r\n}\r\n\r\n/**\r\n * Shared service for checking class program configuration features\r\n * Supports two modes:\r\n * 1. By ID: Makes API call to fetch program class, then checks configuration\r\n * 2. By Configuration: Directly checks provided configuration object\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ClassProgramConfigurationService {\r\n private programClassService = inject(CideLytProgramClassService);\r\n\r\n /**\r\n * Parse configuration from general master\r\n * Handles both string (JSON) and object formats\r\n * @param generalMaster - General master object containing sygms_configuration\r\n * @returns Parsed configuration object or undefined\r\n */\r\n private parseConfiguration(generalMaster: GeneralMasterWithConfiguration | null | undefined): ClassProgramConfiguration | undefined {\r\n if (!generalMaster || typeof generalMaster !== 'object') {\r\n return undefined;\r\n }\r\n\r\n if (!('sygms_configuration' in generalMaster)) {\r\n return undefined;\r\n }\r\n\r\n const configValue = generalMaster.sygms_configuration;\r\n if (!configValue) {\r\n return undefined;\r\n }\r\n\r\n if (typeof configValue === 'string') {\r\n try {\r\n return JSON.parse(configValue) as ClassProgramConfiguration;\r\n } catch {\r\n return undefined;\r\n }\r\n } else if (typeof configValue === 'object' && configValue !== null) {\r\n return configValue as ClassProgramConfiguration;\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n /**\r\n * Check if branch functionality is enabled from configuration object\r\n * @param config - Configuration object\r\n * @returns true if branchType is true, false otherwise\r\n */\r\n hasBranchFunctionalityFromConfig(config: ClassProgramConfiguration | null | undefined): boolean {\r\n return config?.branchType === true;\r\n }\r\n\r\n /**\r\n * Check if branch functionality is enabled from general master object\r\n * @param generalMaster - General master object containing sygms_configuration\r\n * @returns true if branchType is true, false otherwise\r\n */\r\n hasBranchFunctionalityFromGeneralMaster(generalMaster: GeneralMasterWithConfiguration | null | undefined): boolean {\r\n const config = this.parseConfiguration(generalMaster);\r\n return this.hasBranchFunctionalityFromConfig(config);\r\n }\r\n\r\n /**\r\n * Check if branch functionality is enabled from program class object\r\n * @param programClass - Program class object containing acacpm_class_program_id_sygms\r\n * @returns true if branchType is true, false otherwise\r\n */\r\n hasBranchFunctionalityFromProgramClass(programClass: ProgramClassWithGeneralMaster | null | undefined): boolean {\r\n if (!programClass) {\r\n return false;\r\n }\r\n\r\n const generalMaster = programClass.acacpm_class_program_id_sygms;\r\n return this.hasBranchFunctionalityFromGeneralMaster(generalMaster);\r\n }\r\n\r\n /**\r\n * Check if branch functionality is enabled by fetching program class by ID\r\n * Makes an API call to get the program class, then checks the configuration\r\n * @param programClassId - ID of the program class\r\n * @returns Observable<boolean> - true if branchType is true, false otherwise\r\n */\r\n hasBranchFunctionalityById(programClassId: string): Observable<boolean> {\r\n if (!programClassId || programClassId.trim() === '') {\r\n return of(false);\r\n }\r\n\r\n const payload: MClassProgramMasterGetByIdPayload = {\r\n acacpm_id: programClassId\r\n };\r\n\r\n return this.programClassService.getProgramClassById(payload).pipe(\r\n map((response: classProgramMasterByIdControllerResponse) => {\r\n if (!response?.success || !response.data) {\r\n return false;\r\n }\r\n\r\n const programClass = response.data as ProgramClassWithGeneralMaster;\r\n return this.hasBranchFunctionalityFromProgramClass(programClass);\r\n }),\r\n catchError(() => {\r\n return of(false);\r\n })\r\n );\r\n }\r\n\r\n /**\r\n * Get configuration from general master\r\n * @param generalMaster - General master object containing sygms_configuration\r\n * @returns Configuration object or undefined\r\n */\r\n getConfiguration(generalMaster: GeneralMasterWithConfiguration | null | undefined): ClassProgramConfiguration | undefined {\r\n return this.parseConfiguration(generalMaster);\r\n }\r\n\r\n /**\r\n * Get configuration from program class object\r\n * @param programClass - Program class object containing acacpm_class_program_id_sygms\r\n * @returns Configuration object or undefined\r\n */\r\n getConfigurationFromProgramClass(programClass: ProgramClassWithGeneralMaster | null | undefined): ClassProgramConfiguration | undefined {\r\n if (!programClass) {\r\n return undefined;\r\n }\r\n\r\n const generalMaster = programClass.acacpm_class_program_id_sygms;\r\n return this.getConfiguration(generalMaster);\r\n }\r\n\r\n /**\r\n * Get configuration by fetching program class by ID\r\n * Makes an API call to get the program class, then extracts the configuration\r\n * @param programClassId - ID of the program class\r\n * @returns Observable<ClassProgramConfiguration | undefined> - Configuration object or undefined\r\n */\r\n getConfigurationById(programClassId: string): Observable<ClassProgramConfiguration | undefined> {\r\n if (!programClassId || programClassId.trim() === '') {\r\n return of(undefined);\r\n }\r\n\r\n const payload: MClassProgramMasterGetByIdPayload = {\r\n acacpm_id: programClassId\r\n };\r\n\r\n return this.programClassService.getProgramClassById(payload).pipe(\r\n map((response: classProgramMasterByIdControllerResponse) => {\r\n if (!response?.success || !response.data) {\r\n return undefined;\r\n }\r\n\r\n const programClass = response.data as ProgramClassWithGeneralMaster;\r\n return this.getConfigurationFromProgramClass(programClass);\r\n }),\r\n catchError(() => {\r\n return of(undefined);\r\n })\r\n );\r\n }\r\n}\r\n\r\n","import { Component, signal, computed, viewChild, TemplateRef, DestroyRef, inject, OnInit } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { Router } from '@angular/router';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { CideEleDataGridComponent, CideIconComponent, CideEleButtonComponent, GridConfiguration, GridEvent, CideEleDropdownComponent, DropdownItem, NotificationService, ConfirmationService } from 'cloud-ide-element';\nimport { TemplateContext } from 'cloud-ide-element';\nimport { AppStateHelperService, CideLytSharedWrapperComponent, RightsService } from 'cloud-ide-layout';\nimport { \n type MClassProgramMaster,\n type MClassProgramMasterDeletePayload,\n type MClassProgramMasterToggleStatusPayload,\n type AcaClassProgramMasterResponse,\n generateStringFromObject\n} from 'cloud-ide-lms-model';\nimport { CideLytProgramClassService } from '../../services/program-class.service';\nimport { ClassProgramConfigurationService } from '../../../../shared/services';\n\n@Component({\n selector: 'cide-academics-program-class-list',\n standalone: true,\n imports: [\n CommonModule,\n CideEleDataGridComponent,\n CideIconComponent,\n CideEleButtonComponent,\n CideEleDropdownComponent,\n CideLytSharedWrapperComponent\n ],\n templateUrl: './program-class-list.component.html',\n styles: [``]\n})\nexport class ProgramClassListComponent implements OnInit {\n // Dependency injection\n private destroyRef = inject(DestroyRef);\n private router = inject(Router);\n private appState = inject(AppStateHelperService);\n private notificationService = inject(NotificationService);\n private confirmationService = inject(ConfirmationService);\n private programClassService = inject(CideLytProgramClassService);\n private rightsService = inject(RightsService);\n private classProgramConfigService = inject(ClassProgramConfigurationService);\n\n // Signal for breadcrumb data that will be passed to shared wrapper\n breadcrumbData = signal<{ id: string; label: string; icon?: string; url?: string }[]>([]);\n\n // Modern ViewChild signals for template renderers (Angular 20 approach)\n programClassDetailsRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('programClassDetailsRendererTemplate');\n programClassStatusRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('programClassStatusRendererTemplate');\n classProgramRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('classProgramRendererTemplate');\n academicYearRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('academicYearRendererTemplate');\n actionsDropdownRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('actionsDropdownRendererTemplate');\n\n // Computed template renderers for grid\n templateRenderers = computed((): Record<string, TemplateRef<TemplateContext>> => ({\n programClassDetailsRenderer: this.programClassDetailsRendererTemplate(),\n programClassStatusRenderer: this.programClassStatusRendererTemplate(),\n classProgramRenderer: this.classProgramRendererTemplate(),\n academicYearRenderer: this.academicYearRendererTemplate(),\n actionsDropdownRenderer: this.actionsDropdownRendererTemplate()\n }));\n\n // Make Math available in template\n Math = Math;\n\n // Signals for reactive state management\n programClasses = signal<AcaClassProgramMasterResponse[]>([]);\n loading = signal(false);\n error = signal<string | null>(null);\n selectedItems = signal<string[]>([]);\n searchTerm = signal('');\n\n // Derived list filtered by searchTerm\n filteredProgramClasses = computed(() => {\n const q = (this.searchTerm() || '').toLowerCase().trim();\n const items = this.programClasses() || [];\n if (!q) return items;\n return items.filter(pc => {\n const title = (pc.acacpm_alise_title || '').toLowerCase();\n // Handle union type: ClassProgramGeneralMaster | { _id, acacpm_name, sygms_configuration }\n const generalMaster = pc.acacpm_class_program_id_sygms;\n const classProgramTitle = (\n (generalMaster && 'sygms_title' in generalMaster ? generalMaster.sygms_title : \n generalMaster && 'acacpm_name' in generalMaster ? generalMaster.acacpm_name : '') || ''\n ).toLowerCase();\n const academicYearName = (pc.acacpm_academic_year_id_acayr?.acayr_name || '').toLowerCase();\n const entityName = (pc.acacpm_entity_id_syen?.syen_name || '').toLowerCase();\n return title.includes(q) || classProgramTitle.includes(q) || academicYearName.includes(q) || entityName.includes(q);\n });\n });\n\n // Grid configuration signal\n gridConfig = signal<GridConfiguration<AcaClassProgramMasterResponse>>({\n id: 'program-class-list-grid',\n columns: [\n {\n key: 'details',\n header: 'Program Class Details',\n type: 'custom',\n width: '250px',\n truncate: true,\n align: 'left',\n renderer: 'programClassDetailsRenderer'\n },\n {\n key: 'acacpm_class_program_id_sygms',\n header: 'Class Program',\n type: 'custom',\n width: '250px',\n truncate: true,\n align: 'left',\n renderer: 'classProgramRenderer'\n },\n {\n key: 'acacpm_academic_year_id_acayr',\n header: 'Academic Year',\n type: 'custom',\n width: '220px',\n truncate: true,\n align: 'left',\n renderer: 'academicYearRenderer'\n },\n {\n key: 'acacpm_isactive',\n header: 'Status',\n type: 'custom',\n width: '140px',\n truncate: false,\n align: 'center',\n renderer: 'programClassStatusRenderer'\n },\n {\n key: 'actions',\n header: '',\n type: 'custom',\n width: '150px',\n truncate: false,\n align: 'center',\n renderer: 'actionsDropdownRenderer'\n }\n ],\n data: [],\n trackBy: '_id',\n pagination: {\n enabled: true,\n pageSize: 10,\n pageSizeOptions: [10, 25, 50, 100],\n showQuickJump: true,\n showPageInfo: true,\n showRefresh: true\n },\n search: {\n enabled: true,\n placeholder: 'Search program classes...',\n searchableColumns: ['acacpm_alise_title'],\n debounceMs: 300\n },\n loading: {\n useDefer: true,\n skeletonRows: 5,\n showOverlay: false\n },\n scroll: {\n enabled: true,\n stickyHeader: true,\n virtualScroll: false,\n rowHeight: 50,\n maxHeight: undefined // Explicitly no max-height - grid should fill available space\n },\n fullHeight: true,\n responsive: true,\n striped: false,\n bordered: true,\n compact: false,\n tableClass: 'tw-table-fixed tw-w-full tw-rounded-none'\n });\n\n /**\n * Check if a program class has branch functionality enabled\n * Uses the shared ClassProgramConfigurationService\n * @param programClass - Program class object\n * @returns true if branchType is true in the general master configuration\n */\n hasBranchFunctionality(programClass: AcaClassProgramMasterResponse): boolean {\n // Cast to ProgramClassWithGeneralMaster to match service interface (includes index signature)\n return this.classProgramConfigService.hasBranchFunctionalityFromProgramClass(programClass as any);\n }\n\n /**\n * Get action dropdown items\n */\n getActionDropdownItems(programClass: AcaClassProgramMasterResponse): DropdownItem[] {\n const items: DropdownItem[] = [\n {\n id: 'view',\n label: 'View Details',\n icon: 'visibility',\n iconColor: 'tw-text-gray-400',\n textColor: 'tw-text-gray-700'\n },\n {\n id: 'edit',\n label: 'Edit Program Class',\n icon: 'edit',\n iconColor: 'tw-text-blue-400',\n textColor: 'tw-text-blue-700'\n }\n ];\n\n // Only show \"Manage Branches\" option if the program class has branch functionality enabled\n if (this.hasBranchFunctionality(programClass)) {\n items.push({\n id: 'branch',\n label: 'Manage Branches',\n icon: 'account_tree',\n iconColor: 'tw-text-purple-400',\n textColor: 'tw-text-purple-700'\n });\n }\n\n items.push(\n {\n id: 'toggleStatus',\n label: programClass?.acacpm_isactive ? 'Deactivate' : 'Activate',\n icon: programClass?.acacpm_isactive ? 'toggle_off' : 'toggle_on',\n iconColor: programClass?.acacpm_isactive ? 'tw-text-orange-400' : 'tw-text-green-400',\n textColor: programClass?.acacpm_isactive ? 'tw-text-orange-700' : 'tw-text-green-700'\n },\n {\n id: 'delete',\n label: 'Delete',\n icon: 'delete',\n iconColor: 'tw-text-red-400',\n textColor: 'tw-text-red-700'\n }\n );\n\n return items;\n }\n\n /**\n * Handle dropdown item click\n */\n onDropdownItemClick(item: DropdownItem, programClass: AcaClassProgramMasterResponse): void {\n console.log('🔍 onDropdownItemClick called with:', { item, programClass });\n \n if (!item || !item.id) {\n console.error('Dropdown item is undefined:', item);\n return;\n }\n \n if (!programClass) {\n console.error('Program class is undefined:', programClass);\n this.notificationService.error('Unable to perform action: Invalid data');\n return;\n }\n\n switch (item.id) {\n case 'view':\n this.viewProgramClass(programClass);\n break;\n case 'edit':\n this.editProgramClass(programClass);\n break;\n case 'branch':\n this.manageBranches(programClass);\n break;\n case 'toggleStatus':\n this.toggleProgramClassStatus(programClass);\n break;\n case 'delete':\n this.deleteProgramClass(programClass);\n break;\n default:\n console.warn('Unknown dropdown action:', item.id);\n }\n }\n\n ngOnInit(): void {\n // Initialize rights for program class management\n this.rightsService.initializeRights('program_class');\n this.loadProgramClasses();\n }\n\n // Rights computed signals\n canCreate = computed(() => this.rightsService.hasRight('CREATE'));\n canEdit = computed(() => this.rightsService.hasRight('EDIT'));\n canDelete = computed(() => this.rightsService.hasRight('DELETE'));\n canView = computed(() => this.rightsService.hasRight('VIEW'));\n\n /**\n * Load program classes data\n */\n private loadProgramClasses(): void {\n this.loading.set(true);\n this.error.set(null);\n\n const payload: MClassProgramMaster = {\n acacpm_entity_id_syen: this.appState.getActiveEntityId(),\n pageIndex: 0,\n pageSize: 100,\n query: this.searchTerm() || \"\",\n sort: {\n key: 'acacpm_alise_title',\n order: 'asc'\n }\n };\n\n this.programClassService.getProgramClassList(payload)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response?.success && response.data) {\n console.log('📚 Program classes loaded:', response.data);\n this.programClasses.set(response.data || []);\n this.updateGridData();\n this.notificationService.success(`Loaded ${response.data.length} program class(es) successfully.`);\n } else {\n console.warn('⚠️ No program class data received');\n this.programClasses.set([]);\n this.updateGridData();\n this.notificationService.warning('No program classes found.');\n }\n this.loading.set(false);\n },\n error: (error) => {\n console.error('❌ Error loading program classes:', error);\n this.error.set('Failed to load program classes');\n this.loading.set(false);\n this.notificationService.error('Failed to load program classes');\n }\n });\n }\n\n /**\n * Update grid data\n */\n private updateGridData(): void {\n this.gridConfig.update(config => ({\n ...config,\n data: this.filteredProgramClasses()\n }));\n }\n\n /**\n * Handle grid events\n */\n onGridEvent(event: GridEvent<AcaClassProgramMasterResponse>): void {\n switch (event.type) {\n case 'pageChange':\n if (event.data && typeof event.data === 'object' && 'pageIndex' in event.data && 'pageSize' in event.data) {\n this.loadProgramClasses();\n }\n break;\n case 'search':\n this.searchTerm.set(event.data as string);\n this.updateGridData();\n break;\n case 'refresh':\n this.loadProgramClasses();\n break;\n }\n }\n\n /**\n * Create new program class\n */\n createProgramClass(): void {\n if (!this.rightsService.hasRight('CREATE')) {\n this.notificationService.error('You do not have permission to create program classes');\n return;\n }\n this.router.navigate(['/control-panel/program-class-management/create']);\n }\n\n /**\n * View program class details\n */\n viewProgramClass(programClass: AcaClassProgramMasterResponse): void {\n if (!programClass || !programClass._id) {\n console.error('Program class or ID is undefined:', programClass);\n this.notificationService.error('Unable to view program class: Invalid data');\n return;\n }\n console.log('👁️ Viewing program class:', programClass);\n this.notificationService.info(`Opening program class \"${programClass.acacpm_alise_title}\" for viewing.`);\n const queryParams = generateStringFromObject({ acacpm_id: programClass._id });\n this.router.navigate(['/control-panel/program-class-management/view', queryParams]);\n }\n\n /**\n * Edit program class\n */\n editProgramClass(programClass: AcaClassProgramMasterResponse): void {\n if (!this.rightsService.hasRight('EDIT')) {\n this.notificationService.error('You do not have permission to edit program classes');\n return;\n }\n if (!programClass || !programClass._id) {\n console.error('Program class or ID is undefined:', programClass);\n this.notificationService.error('Unable to edit program class: Invalid data');\n return;\n }\n console.log('✏️ Editing program class:', programClass);\n this.notificationService.info(`Opening program class \"${programClass.acacpm_alise_title}\" for editing.`);\n const queryParams = generateStringFromObject({ acacpm_id: programClass._id });\n this.router.navigate(['/control-panel/program-class-management/edit', queryParams]);\n }\n\n /**\n * Manage branches for program class\n */\n manageBranches(programClass: AcaClassProgramMasterResponse): void {\n if (!programClass || !programClass._id) {\n console.error('Program class or ID is undefined:', programClass);\n this.notificationService.error('Unable to manage branches: Invalid data');\n return;\n }\n console.log('🌿 Managing branches for program class:', programClass);\n this.notificationService.info(`Opening branch management for \"${programClass.acacpm_alise_title}\".`);\n const queryParams = generateStringFromObject({ programId: programClass._id });\n this.router.navigate(['/control-panel/program_specialization', queryParams]);\n }\n\n /**\n * Delete program class\n */\n deleteProgramClass(programClass: AcaClassProgramMasterResponse): void {\n if (!programClass || !programClass._id) {\n console.error('Program class or ID is undefined:', programClass);\n this.notificationService.error('Unable to delete program class: Invalid data');\n return;\n }\n this.confirmationService.confirmDelete(programClass.acacpm_alise_title).then((confirmed: boolean) => {\n if (confirmed) {\n this.loading.set(true);\n const payload: MClassProgramMasterDeletePayload = {\n acacpm_id: programClass._id!\n };\n\n this.programClassService.deleteProgramClass(payload)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response?.success) {\n this.programClasses.update(classes => \n classes.filter(pc => pc._id !== programClass._id)\n );\n this.updateGridData();\n this.notificationService.success('Program class deleted successfully.');\n } else {\n this.notificationService.error('Failed to delete program class.');\n }\n this.loading.set(false);\n },\n error: (error) => {\n console.error('❌ Error deleting program class:', error);\n this.notificationService.error('Failed to delete program class.');\n this.loading.set(false);\n }\n });\n }\n });\n }\n\n /**\n * Toggle program class status\n */\n toggleProgramClassStatus(programClass: AcaClassProgramMasterResponse): void {\n if (!this.rightsService.hasRight('EDIT')) {\n this.notificationService.error('You do not have permission to change program class status');\n return;\n }\n if (!programClass || !programClass._id) {\n console.error('Program class or ID is undefined:', programClass);\n this.notificationService.error('Unable to toggle program class status: Invalid data');\n return;\n }\n this.loading.set(true);\n const payload: MClassProgramMasterToggleStatusPayload = {\n acacpm_id: programClass._id!\n };\n\n this.programClassService.toggleProgramClassStatus(payload)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response?.success) {\n this.programClasses.update(classes => \n classes.map(pc => \n pc._id === programClass._id \n ? { ...pc, acacpm_isactive: !pc.acacpm_isactive }\n : pc\n )\n );\n this.updateGridData();\n this.notificationService.success(`Program class ${programClass.acacpm_isactive ? 'deactivated' : 'activated'} successfully.`);\n } else {\n this.notificationService.error('Failed to toggle program class status.');\n }\n this.loading.set(false);\n },\n error: (error) => {\n console.error('❌ Error toggling program class status:', error);\n this.notificationService.error('Failed to toggle program class status.');\n this.loading.set(false);\n }\n });\n }\n\n /**\n * Refresh data\n */\n refreshData(): void {\n this.loadProgramClasses();\n }\n}\n","<!-- Program Class Management Container -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_class' }\"\n [breadcrumb_data]=\"breadcrumbData()\">\n \n <!-- Action Buttons in Breadcrumb Area -->\n <div breadcrumb-actions>\n @if (canCreate()) {\n <button cideEleButton type=\"button\" variant=\"primary\" size=\"sm\" leftIcon=\"add\" (btnClick)=\"createProgramClass()\">\n Create Program Class\n </button>\n }\n </div>\n\n <!-- Main Content -->\n <div class=\"tw-flex tw-flex-col tw-w-full tw-h-full tw-overflow-hidden\">\n <!-- Data Grid Section -->\n <div class=\"tw-flex-1 tw-min-h-0 tw-p-0\">\n <cide-ele-data-grid\n class=\"tw-h-full\"\n [config]=\"gridConfig()\"\n [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n </div>\n</cide-lyt-shared-wrapper>\n\n<!-- Template Renderers -->\n<ng-template #programClassDetailsRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\n <div class=\"tw-flex-shrink-0\">\n <div class=\"tw-w-10 tw-h-10 tw-bg-purple-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-text-purple-600 tw-w-5 tw-h-5\">school</cide-ele-icon>\n </div>\n </div>\n <div class=\"tw-min-w-0 tw-flex-1\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-m-0\">\n {{ row?.acacpm_alise_title }}\n </h6>\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\n {{ row?.acacpm_class_program_id_sygms?.sygms_title }}\n </p>\n </div>\n </div>\n</ng-template>\n\n<ng-template #programClassStatusRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <span [ngClass]=\"{\n 'tw-bg-green-100 tw-text-green-800': row?.acacpm_isactive,\n 'tw-bg-red-100 tw-text-red-800': !row?.acacpm_isactive\n }\" class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium\">\n <cide-ele-icon [ngClass]=\"{\n 'tw-text-green-600': row?.acacpm_isactive,\n 'tw-text-red-600': !row?.acacpm_isactive\n }\" class=\"tw-w-3 tw-h-3 tw-mr-2\">\n {{ row?.acacpm_isactive ? 'check_circle' : 'cancel' }}\n </cide-ele-icon>\n {{ row?.acacpm_isactive ? 'Active' : 'Inactive' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #classProgramRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-4 tw-h-4\">school</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-900 tw-truncate\">\n {{ row?.acacpm_class_program_id_sygms?.sygms_title || 'N/A' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #academicYearRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-green-600 tw-w-4 tw-h-4\">calendar_today</cide-ele-icon>\n <span class=\"tw-text-sm tw-text-gray-900 tw-truncate\">\n {{ row?.acacpm_academic_year_id_acayr?.acayr_name || 'N/A' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\" let-value=\"value\" let-column=\"column\">\n <cide-ele-dropdown\n [items]=\"getActionDropdownItems(row)\"\n (itemClick)=\"onDropdownItemClick($event, row)\"\n size=\"sm\"\n variant=\"ghost\"\n icon=\"more_vert\">\n </cide-ele-dropdown>\n</ng-template>\n"],"names":[],"mappings":";;;;;;;;;;;;AA4CA;;;;;AAKG;MAIU,gCAAgC,CAAA;AACnC,IAAA,mBAAmB,GAAG,MAAM,CAAC,0BAA0B,CAAC;AAEhE;;;;;AAKG;AACK,IAAA,kBAAkB,CAAC,aAAgE,E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yB,EAAA,UAAA,EAAA,CAAA;kBAdrC,SAAS;+BACE,mCAAmC,EAAA,UAAA,EACjC,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,wBAAwB;wBACxB,iBAAiB;wBACjB,sBAAsB;wBACtB,wBAAwB;wBACxB;AACD,qBAAA,EAAA,QAAA,EAAA,opHAAA,EAAA;AAmBsF,SAAA,CAAA,EAAA,cAAA,EAAA,EAAA,mCAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,qCAAqC,4FACtC,oCAAoC,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,4BAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAC1C,8BAA8B,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,4BAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAC9B,8BAA8B,yFAC3B,iCAAiC,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AcademicYearCreateComponent, f as AcademicYearListComponent, g as CideLytAcademicYearMappingService, a as CideLytAcademicYearService, i as CideLytClassProgramBranchFormComponent, h as CideLytClassProgramBranchListComponent, b as CideLytClassProgramBranchService, d as CideLytProgramSectionSelectorComponent, k as CideLytProgramTermSectionService, P as ProgramTermSectionCreateComponent, j as ProgramTermSectionListComponent, e as academicsRoutes } from './cloud-ide-academics-cloud-ide-academics-
|
|
1
|
+
export { A as AcademicYearCreateComponent, f as AcademicYearListComponent, g as CideLytAcademicYearMappingService, a as CideLytAcademicYearService, i as CideLytClassProgramBranchFormComponent, h as CideLytClassProgramBranchListComponent, b as CideLytClassProgramBranchService, d as CideLytProgramSectionSelectorComponent, k as CideLytProgramTermSectionService, P as ProgramTermSectionCreateComponent, j as ProgramTermSectionListComponent, e as academicsRoutes } from './cloud-ide-academics-cloud-ide-academics-BVQ8sA0L.mjs';
|
|
2
2
|
//# sourceMappingURL=cloud-ide-academics.mjs.map
|
package/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import * as _angular_core from '@angular/core';
|
|
|
3
3
|
import { OnInit, OnDestroy, TemplateRef } from '@angular/core';
|
|
4
4
|
import { FormGroup, FormArray, FormControl } from '@angular/forms';
|
|
5
5
|
import { TabItem, TemplateContext, GridConfiguration, GridEvent, DropdownConfig, DropdownItem, SelectOption as SelectOption$1 } from 'cloud-ide-element';
|
|
6
|
+
import { CideLytSharedWrapperSetupParam, BreadcrumbItem } from 'cloud-ide-layout';
|
|
6
7
|
import { Observable } from 'rxjs';
|
|
7
8
|
import { MAcademicYear, academicYearControllerResponse, MAcademicYearGetByIdPayload, academicYearByIdControllerResponse, MAcademicYearInsertUpdatePayload, academicYearInsertUpdateControllerResponse, MAcademicYearDeletePayload, academicYearDeleteControllerResponse, MAcademicYearToggleStatusPayload, academicYearToggleStatusControllerResponse, academicYearMappingInsertUpdateControllerResponse, MAcademicYearMapping, academicYearMappingControllerResponse, MAcademicYearMappingGetByIdPayload, academicYearMappingByIdControllerResponse, MAcademicYearMappingInsertUpdatePayload, MAcademicYearMappingDeletePayload, academicYearMappingDeleteControllerResponse, MAcademicYearMappingToggleStatusPayload, academicYearMappingToggleStatusControllerResponse, AcaClassPrgBranchResponse, ICoreSygms, AcaClassPrgBranchListPayload, classPrgBranchControllerResponse, AcaClassPrgBranchGetByIdPayload, classPrgBranchByIdControllerResponse, AcaClassPrgBranchInsertUpdatePayload, classPrgBranchInsertUpdateControllerResponse, AcaClassPrgBranchDeletePayload, classPrgBranchDeleteControllerResponse, AcaClassPrgBranchToggleStatusPayload, classPrgBranchToggleStatusControllerResponse, AcaClassPrgBranchToggleLockPayload, classPrgBranchToggleLockControllerResponse, AcaPrgTrmSectionResponse, MPrgTrmSection, prgTrmSectionControllerResponse, MPrgTrmSectionGetByIdPayload, prgTrmSectionByIdControllerResponse, MPrgTrmSectionInsertUpdatePayload, prgTrmSectionInsertUpdateControllerResponse, MPrgTrmSectionDeletePayload, prgTrmSectionDeleteControllerResponse, MPrgTrmSectionToggleStatusPayload, prgTrmSectionToggleStatusControllerResponse, MPrgTrmSectionToggleLockPayload, prgTrmSectionToggleLockControllerResponse, AcaClassProgramMasterResponse, selectSearchType } from 'cloud-ide-lms-model';
|
|
8
9
|
|
|
@@ -20,6 +21,8 @@ interface Entity {
|
|
|
20
21
|
syen_code?: string;
|
|
21
22
|
}
|
|
22
23
|
declare class AcademicYearCreateComponent implements OnInit, OnDestroy {
|
|
24
|
+
readonly shared_wrapper_setup_param: _angular_core.WritableSignal<Partial<CideLytSharedWrapperSetupParam>>;
|
|
25
|
+
readonly breadcrumb_data: _angular_core.WritableSignal<BreadcrumbItem[]>;
|
|
23
26
|
private readonly destroyRef;
|
|
24
27
|
private readonly fb;
|
|
25
28
|
private readonly academicYearService;
|
|
@@ -29,29 +32,53 @@ declare class AcademicYearCreateComponent implements OnInit, OnDestroy {
|
|
|
29
32
|
private readonly route;
|
|
30
33
|
private readonly componentContextService;
|
|
31
34
|
private readonly rightsService;
|
|
35
|
+
private readonly notificationService;
|
|
36
|
+
private readonly cdr;
|
|
37
|
+
private mappingsChangeTrigger;
|
|
32
38
|
academicYearForm: FormGroup;
|
|
33
39
|
readonly activeTab: _angular_core.WritableSignal<string>;
|
|
34
40
|
readonly loading: _angular_core.WritableSignal<boolean>;
|
|
35
41
|
readonly academicYearId: _angular_core.WritableSignal<string>;
|
|
36
42
|
readonly isEditMode: _angular_core.WritableSignal<boolean>;
|
|
43
|
+
readonly isViewMode: _angular_core.WritableSignal<boolean>;
|
|
37
44
|
readonly originalMappings: _angular_core.WritableSignal<AcademicYearMapping$1[]>;
|
|
38
45
|
readonly entityOptions: _angular_core.WritableSignal<Entity[]>;
|
|
46
|
+
readonly isFormValidForSubmit: _angular_core.Signal<boolean>;
|
|
47
|
+
readonly submitButtonDisabledReason: _angular_core.Signal<string>;
|
|
48
|
+
/**
|
|
49
|
+
* Get user-friendly field label
|
|
50
|
+
*/
|
|
51
|
+
private getFieldLabel;
|
|
39
52
|
constructor();
|
|
40
53
|
ngOnInit(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Setup breadcrumb based on component mode
|
|
56
|
+
*/
|
|
57
|
+
private setupBreadcrumb;
|
|
41
58
|
/**
|
|
42
59
|
* Initialize component
|
|
43
60
|
*/
|
|
44
61
|
private initializeComponent;
|
|
62
|
+
/**
|
|
63
|
+
* Load academic year for viewing
|
|
64
|
+
*/
|
|
65
|
+
private loadAcademicYearForView;
|
|
66
|
+
/**
|
|
67
|
+
* Load academic year for editing
|
|
68
|
+
*/
|
|
69
|
+
private loadAcademicYearForEdit;
|
|
45
70
|
/**
|
|
46
71
|
* Load dropdown options
|
|
47
72
|
*/
|
|
48
73
|
private loadDropdownOptions;
|
|
49
74
|
/**
|
|
50
75
|
* Load academic year data for edit mode
|
|
76
|
+
* Note: API will automatically filter by entity ID from token, no need to send entity ID from UI
|
|
51
77
|
*/
|
|
52
78
|
private loadAcademicYearData;
|
|
53
79
|
/**
|
|
54
80
|
* Load academic year mappings for edit mode
|
|
81
|
+
* Note: API will automatically filter by entity ID from token, no need to send entity ID from UI
|
|
55
82
|
*/
|
|
56
83
|
private loadAcademicYearMappings;
|
|
57
84
|
/**
|
|
@@ -116,6 +143,8 @@ declare class AcademicYearCreateComponent implements OnInit, OnDestroy {
|
|
|
116
143
|
setAcademicYearIdForMappings(academicYearId: string): void;
|
|
117
144
|
/**
|
|
118
145
|
* Validate that all mappings have required fields
|
|
146
|
+
* For create mode: At least one mapping is required
|
|
147
|
+
* For edit mode: Mappings are optional (can have zero mappings)
|
|
119
148
|
*/
|
|
120
149
|
validateMappings(): boolean;
|
|
121
150
|
/**
|
|
@@ -193,6 +222,7 @@ interface AcademicYear {
|
|
|
193
222
|
acayr_islocked?: boolean;
|
|
194
223
|
}
|
|
195
224
|
declare class AcademicYearListComponent implements OnInit, OnDestroy {
|
|
225
|
+
readonly shared_wrapper_setup_param: CideLytSharedWrapperSetupParam;
|
|
196
226
|
private readonly destroyRef;
|
|
197
227
|
private readonly academicYearService;
|
|
198
228
|
private readonly router;
|
|
@@ -223,11 +253,13 @@ declare class AcademicYearListComponent implements OnInit, OnDestroy {
|
|
|
223
253
|
readonly canEdit: _angular_core.Signal<boolean>;
|
|
224
254
|
readonly canDelete: _angular_core.Signal<boolean>;
|
|
225
255
|
readonly canView: _angular_core.Signal<boolean>;
|
|
256
|
+
readonly canToggleStatus: _angular_core.Signal<boolean>;
|
|
226
257
|
readonly gridConfig: _angular_core.Signal<GridConfiguration<AcademicYear>>;
|
|
227
258
|
ngOnInit(): void;
|
|
228
259
|
ngOnDestroy(): void;
|
|
229
260
|
/**
|
|
230
261
|
* Load academic years from API
|
|
262
|
+
* Note: API will automatically filter by entity ID from token, no need to send entity ID from UI
|
|
231
263
|
*/
|
|
232
264
|
loadAcademicYears(): void;
|
|
233
265
|
templateRenderers: _angular_core.Signal<Record<string, TemplateRef<TemplateContext<Record<string, unknown>>>>>;
|
|
@@ -350,6 +382,12 @@ declare class CideLytAcademicYearMappingService {
|
|
|
350
382
|
* Get list of academic year mappings
|
|
351
383
|
* @param payload - Query parameters for filtering/pagination
|
|
352
384
|
* @returns Observable of academic year mapping list response
|
|
385
|
+
*
|
|
386
|
+
* Note: The JWT token is automatically sent via the auth interceptor in the Authorization header.
|
|
387
|
+
* The API should:
|
|
388
|
+
* 1. Extract the entity ID from the JWT token (from core_system_entity._id in the decoded token)
|
|
389
|
+
* 2. Filter mappings to return only those where acayrmp_entity_id_syen matches the entity ID from the token
|
|
390
|
+
* 3. Do NOT rely on entity ID from the request payload - it should come from the token only
|
|
353
391
|
*/
|
|
354
392
|
getAcademicYearMappingList(payload: MAcademicYearMapping): Observable<academicYearMappingControllerResponse>;
|
|
355
393
|
/**
|
|
@@ -798,6 +836,8 @@ declare class ProgramTermSectionCreateComponent implements OnInit, OnDestroy {
|
|
|
798
836
|
url?: string;
|
|
799
837
|
}[]>;
|
|
800
838
|
constructor();
|
|
839
|
+
canCreate: _angular_core.Signal<boolean>;
|
|
840
|
+
canEdit: _angular_core.Signal<boolean>;
|
|
801
841
|
ngOnInit(): void;
|
|
802
842
|
/**
|
|
803
843
|
* Update breadcrumb data based on mode
|