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,19 +1,19 @@
|
|
|
1
1
|
import { authGuard } from 'cloud-ide-auth';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { inject, Injectable, DestroyRef,
|
|
3
|
+
import { inject, Injectable, signal, DestroyRef, ChangeDetectorRef, computed, Component, viewChild, input, output, effect } from '@angular/core';
|
|
4
4
|
import * as i1$1 from '@angular/common';
|
|
5
5
|
import { CommonModule, Location, NgClass } from '@angular/common';
|
|
6
6
|
import * as i1 from '@angular/forms';
|
|
7
|
-
import { FormBuilder,
|
|
7
|
+
import { FormBuilder, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
|
|
8
8
|
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
|
|
9
9
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
10
10
|
import { of, forkJoin, filter as filter$1 } from 'rxjs';
|
|
11
11
|
import { switchMap, catchError, map, filter } from 'rxjs/operators';
|
|
12
|
-
import { CideInputComponent, CideTextareaComponent, CideEleButtonComponent, CideEleTabComponent, CideIconComponent, CideSelectComponent, CideFormFieldErrorComponent, ConfirmationService,
|
|
12
|
+
import { NotificationService, CideInputComponent, CideTextareaComponent, CideEleButtonComponent, CideEleTabComponent, CideIconComponent, CideSelectComponent, CideFormFieldErrorComponent, ConfirmationService, CideEleDataGridComponent, CideEleDropdownComponent } from 'cloud-ide-element';
|
|
13
13
|
import { HttpClient } from '@angular/common/http';
|
|
14
14
|
import { generateStringFromObject, cidePath, hostManagerRoutesUrl, academicsRoutesUrl, generateObjectFromString, AcaClassPrgBranchListPayload, MClassProgramTerm, MPrgTrmSectionInsertUpdatePayload, MPrgTrmSection } from 'cloud-ide-lms-model';
|
|
15
15
|
import { ENTITY_SERVICE_TOKEN, CideCoreGeneralMasterService, CLASS_PROGRAM_MASTER_SERVICE_TOKEN, PROGRAM_TERM_SECTION_SERVICE_TOKEN } from 'cloud-ide-shared';
|
|
16
|
-
import { ComponentContextService, RightsService,
|
|
16
|
+
import { ComponentContextService, RightsService, CideLytSharedWrapperComponent, AppStateHelperService } from 'cloud-ide-layout';
|
|
17
17
|
|
|
18
18
|
const academicsRoutes = [
|
|
19
19
|
// Academic Year Management Routes
|
|
@@ -55,7 +55,7 @@ const academicsRoutes = [
|
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
path: 'program-class-management',
|
|
58
|
-
loadComponent: () => import('./cloud-ide-academics-program-class-list.component-
|
|
58
|
+
loadComponent: () => import('./cloud-ide-academics-program-class-list.component-DZrSl_02.mjs').then(c => c.ProgramClassListComponent),
|
|
59
59
|
title: 'Program Class Management',
|
|
60
60
|
canActivate: [authGuard],
|
|
61
61
|
data: {
|
|
@@ -64,7 +64,7 @@ const academicsRoutes = [
|
|
|
64
64
|
},
|
|
65
65
|
{
|
|
66
66
|
path: 'program-class-management/create',
|
|
67
|
-
loadComponent: () => import('./cloud-ide-academics-program-class-create.component-
|
|
67
|
+
loadComponent: () => import('./cloud-ide-academics-program-class-create.component-DIG3K1WR.mjs').then(c => c.ProgramClassCreateComponent),
|
|
68
68
|
title: 'Create Program Class',
|
|
69
69
|
canActivate: [authGuard],
|
|
70
70
|
data: {
|
|
@@ -73,7 +73,7 @@ const academicsRoutes = [
|
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
path: 'program-class-management/edit/:query',
|
|
76
|
-
loadComponent: () => import('./cloud-ide-academics-program-class-create.component-
|
|
76
|
+
loadComponent: () => import('./cloud-ide-academics-program-class-create.component-DIG3K1WR.mjs').then(c => c.ProgramClassCreateComponent),
|
|
77
77
|
title: 'Edit Program Class',
|
|
78
78
|
canActivate: [authGuard],
|
|
79
79
|
data: {
|
|
@@ -82,7 +82,7 @@ const academicsRoutes = [
|
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
path: 'program-class-management/view/:query',
|
|
85
|
-
loadComponent: () => import('./cloud-ide-academics-program-class-create.component-
|
|
85
|
+
loadComponent: () => import('./cloud-ide-academics-program-class-create.component-DIG3K1WR.mjs').then(c => c.ProgramClassCreateComponent),
|
|
86
86
|
title: 'View Program Class',
|
|
87
87
|
canActivate: [authGuard],
|
|
88
88
|
data: {
|
|
@@ -91,7 +91,7 @@ const academicsRoutes = [
|
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
path: 'program-term-management/create',
|
|
94
|
-
loadComponent: () => import('./cloud-ide-academics-class-program-term-create.component-
|
|
94
|
+
loadComponent: () => import('./cloud-ide-academics-class-program-term-create.component-B-gGKnpJ.mjs').then(c => c.ClassProgramTermCreateComponent),
|
|
95
95
|
title: 'Create Class Program Term',
|
|
96
96
|
canActivate: [authGuard],
|
|
97
97
|
data: {
|
|
@@ -100,7 +100,7 @@ const academicsRoutes = [
|
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
102
|
path: 'program-term-management/create/:query',
|
|
103
|
-
loadComponent: () => import('./cloud-ide-academics-class-program-term-create.component-
|
|
103
|
+
loadComponent: () => import('./cloud-ide-academics-class-program-term-create.component-B-gGKnpJ.mjs').then(c => c.ClassProgramTermCreateComponent),
|
|
104
104
|
title: 'Create Class Program Term',
|
|
105
105
|
canActivate: [authGuard],
|
|
106
106
|
data: {
|
|
@@ -109,7 +109,7 @@ const academicsRoutes = [
|
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
111
|
path: 'program-term-management/edit/:query',
|
|
112
|
-
loadComponent: () => import('./cloud-ide-academics-class-program-term-create.component-
|
|
112
|
+
loadComponent: () => import('./cloud-ide-academics-class-program-term-create.component-B-gGKnpJ.mjs').then(c => c.ClassProgramTermCreateComponent),
|
|
113
113
|
title: 'Edit Class Program Term',
|
|
114
114
|
canActivate: [authGuard],
|
|
115
115
|
data: {
|
|
@@ -118,7 +118,7 @@ const academicsRoutes = [
|
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
path: 'program-term-management/view/:query',
|
|
121
|
-
loadComponent: () => import('./cloud-ide-academics-class-program-term-create.component-
|
|
121
|
+
loadComponent: () => import('./cloud-ide-academics-class-program-term-create.component-B-gGKnpJ.mjs').then(c => c.ClassProgramTermCreateComponent),
|
|
122
122
|
title: 'View Class Program Term',
|
|
123
123
|
canActivate: [authGuard],
|
|
124
124
|
data: {
|
|
@@ -127,7 +127,7 @@ const academicsRoutes = [
|
|
|
127
127
|
},
|
|
128
128
|
{
|
|
129
129
|
path: 'program-term-management',
|
|
130
|
-
loadComponent: () => import('./cloud-ide-academics-class-program-term-list.component-
|
|
130
|
+
loadComponent: () => import('./cloud-ide-academics-class-program-term-list.component-BFfAhZrq.mjs').then(c => c.ClassProgramTermListComponent),
|
|
131
131
|
title: 'Class Program Term Management',
|
|
132
132
|
canActivate: [authGuard],
|
|
133
133
|
data: {
|
|
@@ -136,7 +136,7 @@ const academicsRoutes = [
|
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
path: 'program-term-management/:query',
|
|
139
|
-
loadComponent: () => import('./cloud-ide-academics-class-program-term-list.component-
|
|
139
|
+
loadComponent: () => import('./cloud-ide-academics-class-program-term-list.component-BFfAhZrq.mjs').then(c => c.ClassProgramTermListComponent),
|
|
140
140
|
title: 'Class Program Term Management',
|
|
141
141
|
canActivate: [authGuard],
|
|
142
142
|
data: {
|
|
@@ -296,22 +296,22 @@ const academicsRoutes = [
|
|
|
296
296
|
}
|
|
297
297
|
},
|
|
298
298
|
{
|
|
299
|
-
path: 'teacher
|
|
299
|
+
path: 'teacher-create',
|
|
300
300
|
loadComponent: () => import('cloud-ide-core').then(m => m.CideCoreUserCreateComponent),
|
|
301
301
|
title: 'Create Faculty',
|
|
302
302
|
canActivate: [authGuard],
|
|
303
303
|
data: {
|
|
304
|
-
sypg_page_code: "
|
|
304
|
+
sypg_page_code: "academics_teacher_create",
|
|
305
305
|
userType: 'TEACHER'
|
|
306
306
|
}
|
|
307
307
|
},
|
|
308
308
|
{
|
|
309
|
-
path: 'teacher
|
|
309
|
+
path: 'teacher-edit/:query',
|
|
310
310
|
loadComponent: () => import('cloud-ide-core').then(m => m.CideCoreUserCreateComponent),
|
|
311
311
|
title: 'Edit Faculty',
|
|
312
312
|
canActivate: [authGuard],
|
|
313
313
|
data: {
|
|
314
|
-
sypg_page_code: "
|
|
314
|
+
sypg_page_code: "academics_teacher_create",
|
|
315
315
|
userType: 'TEACHER'
|
|
316
316
|
}
|
|
317
317
|
},
|
|
@@ -321,14 +321,14 @@ const academicsRoutes = [
|
|
|
321
321
|
title: 'View Teacher',
|
|
322
322
|
canActivate: [authGuard],
|
|
323
323
|
data: {
|
|
324
|
-
sypg_page_code: "
|
|
324
|
+
sypg_page_code: "academics_teacher_create",
|
|
325
325
|
userType: 'TEACHER'
|
|
326
326
|
}
|
|
327
327
|
},
|
|
328
328
|
// Bonafide Management Routes
|
|
329
329
|
{
|
|
330
330
|
path: 'bonafide',
|
|
331
|
-
loadComponent: () => import('./cloud-ide-academics-bonafide-request-list.component-
|
|
331
|
+
loadComponent: () => import('./cloud-ide-academics-bonafide-request-list.component-CldJcpVL.mjs').then(c => c.CideAcademicsBonafideRequestListComponent),
|
|
332
332
|
title: 'Bonafide Requests',
|
|
333
333
|
canActivate: [authGuard],
|
|
334
334
|
data: {
|
|
@@ -337,7 +337,7 @@ const academicsRoutes = [
|
|
|
337
337
|
},
|
|
338
338
|
{
|
|
339
339
|
path: 'bonafide/create',
|
|
340
|
-
loadComponent: () => import('./cloud-ide-academics-bonafide-request-form.component-
|
|
340
|
+
loadComponent: () => import('./cloud-ide-academics-bonafide-request-form.component-GiVehOPg.mjs').then(c => c.CideAcademicsBonafideRequestFormComponent),
|
|
341
341
|
title: 'Create Bonafide Request',
|
|
342
342
|
canActivate: [authGuard],
|
|
343
343
|
data: {
|
|
@@ -346,7 +346,7 @@ const academicsRoutes = [
|
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
348
|
path: 'bonafide/view/:query',
|
|
349
|
-
loadComponent: () => import('./cloud-ide-academics-bonafide-request-detail.component-
|
|
349
|
+
loadComponent: () => import('./cloud-ide-academics-bonafide-request-detail.component-Mh9qdY6v.mjs').then(c => c.CideAcademicsBonafideRequestDetailComponent),
|
|
350
350
|
title: 'Bonafide Request Details',
|
|
351
351
|
canActivate: [authGuard],
|
|
352
352
|
data: {
|
|
@@ -528,10 +528,10 @@ class CideLytAcademicYearService {
|
|
|
528
528
|
console.log('🔄 Making PATCH request to toggle academic year mapping status:', { url, payload });
|
|
529
529
|
return this.http.patch(url, payload);
|
|
530
530
|
}
|
|
531
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
532
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
531
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytAcademicYearService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
532
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytAcademicYearService, providedIn: 'root' });
|
|
533
533
|
}
|
|
534
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
534
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytAcademicYearService, decorators: [{
|
|
535
535
|
type: Injectable,
|
|
536
536
|
args: [{
|
|
537
537
|
providedIn: 'root'
|
|
@@ -544,6 +544,12 @@ class CideLytAcademicYearMappingService {
|
|
|
544
544
|
* Get list of academic year mappings
|
|
545
545
|
* @param payload - Query parameters for filtering/pagination
|
|
546
546
|
* @returns Observable of academic year mapping list response
|
|
547
|
+
*
|
|
548
|
+
* Note: The JWT token is automatically sent via the auth interceptor in the Authorization header.
|
|
549
|
+
* The API should:
|
|
550
|
+
* 1. Extract the entity ID from the JWT token (from core_system_entity._id in the decoded token)
|
|
551
|
+
* 2. Filter mappings to return only those where acayrmp_entity_id_syen matches the entity ID from the token
|
|
552
|
+
* 3. Do NOT rely on entity ID from the request payload - it should come from the token only
|
|
547
553
|
*/
|
|
548
554
|
getAcademicYearMappingList(payload) {
|
|
549
555
|
const query = generateStringFromObject(payload);
|
|
@@ -614,10 +620,10 @@ class CideLytAcademicYearMappingService {
|
|
|
614
620
|
]);
|
|
615
621
|
return this.http.post(url, payload);
|
|
616
622
|
}
|
|
617
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
618
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
623
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytAcademicYearMappingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
624
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytAcademicYearMappingService, providedIn: 'root' });
|
|
619
625
|
}
|
|
620
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
626
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytAcademicYearMappingService, decorators: [{
|
|
621
627
|
type: Injectable,
|
|
622
628
|
args: [{
|
|
623
629
|
providedIn: 'root'
|
|
@@ -625,6 +631,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
625
631
|
}] });
|
|
626
632
|
|
|
627
633
|
class AcademicYearCreateComponent {
|
|
634
|
+
// Shared wrapper setup for breadcrumbs
|
|
635
|
+
shared_wrapper_setup_param = signal({
|
|
636
|
+
sypg_page_code: "academic_year_list"
|
|
637
|
+
}, ...(ngDevMode ? [{ debugName: "shared_wrapper_setup_param" }] : []));
|
|
638
|
+
breadcrumb_data = signal([], ...(ngDevMode ? [{ debugName: "breadcrumb_data" }] : []));
|
|
628
639
|
// Modern Angular 20+ dependency injection
|
|
629
640
|
destroyRef = inject(DestroyRef);
|
|
630
641
|
fb = inject(FormBuilder);
|
|
@@ -635,6 +646,10 @@ class AcademicYearCreateComponent {
|
|
|
635
646
|
route = inject(ActivatedRoute);
|
|
636
647
|
componentContextService = inject(ComponentContextService);
|
|
637
648
|
rightsService = inject(RightsService);
|
|
649
|
+
notificationService = inject(NotificationService);
|
|
650
|
+
cdr = inject(ChangeDetectorRef);
|
|
651
|
+
// Signal to track mapping changes and trigger computed signal updates
|
|
652
|
+
mappingsChangeTrigger = signal(0, ...(ngDevMode ? [{ debugName: "mappingsChangeTrigger" }] : []));
|
|
638
653
|
// Form and state management with proper typing
|
|
639
654
|
academicYearForm;
|
|
640
655
|
activeTab = signal('basic', ...(ngDevMode ? [{ debugName: "activeTab" }] : []));
|
|
@@ -642,17 +657,111 @@ class AcademicYearCreateComponent {
|
|
|
642
657
|
// Academic year information from route
|
|
643
658
|
academicYearId = signal('', ...(ngDevMode ? [{ debugName: "academicYearId" }] : []));
|
|
644
659
|
isEditMode = signal(false, ...(ngDevMode ? [{ debugName: "isEditMode" }] : []));
|
|
660
|
+
isViewMode = signal(false, ...(ngDevMode ? [{ debugName: "isViewMode" }] : []));
|
|
645
661
|
originalMappings = signal([], ...(ngDevMode ? [{ debugName: "originalMappings" }] : [])); // Track original mappings for deletion
|
|
646
662
|
// Entity options for dropdown
|
|
647
663
|
entityOptions = signal([], ...(ngDevMode ? [{ debugName: "entityOptions" }] : []));
|
|
664
|
+
// Computed signal to check if form is valid for submission (including mapping validation)
|
|
665
|
+
isFormValidForSubmit = computed(() => {
|
|
666
|
+
// Access the trigger signal to make this computed reactive to mapping changes
|
|
667
|
+
this.mappingsChangeTrigger();
|
|
668
|
+
const formValid = this.academicYearForm.valid;
|
|
669
|
+
const mappings = this.academicYearMappingsArray.controls;
|
|
670
|
+
// For create mode: require at least one mapping with valid entity
|
|
671
|
+
if (!this.isEditMode()) {
|
|
672
|
+
if (mappings.length === 0) {
|
|
673
|
+
return false;
|
|
674
|
+
}
|
|
675
|
+
// Check if at least one mapping has an entity selected
|
|
676
|
+
const hasValidMapping = mappings.some((mapping) => {
|
|
677
|
+
const entityId = mapping.get('acayrmp_entity_id_syen')?.value;
|
|
678
|
+
return entityId && entityId.trim() !== '';
|
|
679
|
+
});
|
|
680
|
+
return formValid && hasValidMapping;
|
|
681
|
+
}
|
|
682
|
+
// For edit mode: mappings are optional, but if they exist, they should be valid
|
|
683
|
+
if (mappings.length > 0) {
|
|
684
|
+
const allMappingsValid = mappings.every((mapping) => {
|
|
685
|
+
const entityId = mapping.get('acayrmp_entity_id_syen')?.value;
|
|
686
|
+
return entityId && entityId.trim() !== '';
|
|
687
|
+
});
|
|
688
|
+
return formValid && allMappingsValid;
|
|
689
|
+
}
|
|
690
|
+
return formValid;
|
|
691
|
+
}, ...(ngDevMode ? [{ debugName: "isFormValidForSubmit" }] : []));
|
|
692
|
+
// Computed signal to get the reason why the button is disabled
|
|
693
|
+
submitButtonDisabledReason = computed(() => {
|
|
694
|
+
// Access the trigger signal to make this computed reactive to mapping changes
|
|
695
|
+
this.mappingsChangeTrigger();
|
|
696
|
+
if (this.loading()) {
|
|
697
|
+
return 'Saving...';
|
|
698
|
+
}
|
|
699
|
+
if (!this.academicYearForm.valid) {
|
|
700
|
+
// Get first invalid field
|
|
701
|
+
const invalidFields = [];
|
|
702
|
+
Object.keys(this.academicYearForm.controls).forEach(key => {
|
|
703
|
+
const control = this.academicYearForm.get(key);
|
|
704
|
+
if (control && control.invalid && control.errors) {
|
|
705
|
+
const fieldLabel = this.getFieldLabel(key);
|
|
706
|
+
invalidFields.push(fieldLabel);
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
if (invalidFields.length > 0) {
|
|
710
|
+
return `Please fix: ${invalidFields.slice(0, 2).join(', ')}${invalidFields.length > 2 ? '...' : ''}`;
|
|
711
|
+
}
|
|
712
|
+
return 'Please fill in all required fields';
|
|
713
|
+
}
|
|
714
|
+
// Check mapping validation
|
|
715
|
+
const mappings = this.academicYearMappingsArray.controls;
|
|
716
|
+
if (!this.isEditMode() && mappings.length === 0) {
|
|
717
|
+
return 'At least one entity mapping is required';
|
|
718
|
+
}
|
|
719
|
+
// Check if mappings exist but none have entity selected (for create mode)
|
|
720
|
+
if (!this.isEditMode() && mappings.length > 0) {
|
|
721
|
+
const hasValidMapping = mappings.some((mapping) => {
|
|
722
|
+
const entityId = mapping.get('acayrmp_entity_id_syen')?.value;
|
|
723
|
+
return entityId && entityId.trim() !== '';
|
|
724
|
+
});
|
|
725
|
+
if (!hasValidMapping) {
|
|
726
|
+
return 'At least one entity mapping must have an entity selected';
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
// Check if mappings have errors
|
|
730
|
+
for (let i = 0; i < mappings.length; i++) {
|
|
731
|
+
const mapping = mappings[i];
|
|
732
|
+
const entityId = mapping.get('acayrmp_entity_id_syen')?.value;
|
|
733
|
+
if (!entityId || entityId.trim() === '') {
|
|
734
|
+
return `Mapping ${i + 1} is missing entity selection`;
|
|
735
|
+
}
|
|
736
|
+
// Check for duplicates
|
|
737
|
+
const currentEntityId = mapping.get('acayrmp_entity_id_syen')?.value;
|
|
738
|
+
const duplicateIndex = this.findDuplicateEntitySelection(currentEntityId, i);
|
|
739
|
+
if (duplicateIndex !== -1) {
|
|
740
|
+
return `Duplicate entity in mappings ${i + 1} and ${duplicateIndex + 1}`;
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
return '';
|
|
744
|
+
}, ...(ngDevMode ? [{ debugName: "submitButtonDisabledReason" }] : []));
|
|
745
|
+
/**
|
|
746
|
+
* Get user-friendly field label
|
|
747
|
+
*/
|
|
748
|
+
getFieldLabel(fieldName) {
|
|
749
|
+
const labels = {
|
|
750
|
+
'acayr_code': 'Academic Year Code',
|
|
751
|
+
'acayr_name': 'Academic Year Name',
|
|
752
|
+
'acayr_from_date': 'From Date',
|
|
753
|
+
'acayr_to_date': 'To Date'
|
|
754
|
+
};
|
|
755
|
+
return labels[fieldName] || fieldName;
|
|
756
|
+
}
|
|
648
757
|
constructor() {
|
|
649
758
|
this.academicYearForm = this.fb.group({
|
|
650
759
|
// Basic Academic Year Information
|
|
651
|
-
acayr_code: [''
|
|
652
|
-
acayr_name: [''
|
|
760
|
+
acayr_code: [''],
|
|
761
|
+
acayr_name: [''],
|
|
653
762
|
acayr_description: [''],
|
|
654
|
-
acayr_from_date: [''
|
|
655
|
-
acayr_to_date: [''
|
|
763
|
+
acayr_from_date: [''],
|
|
764
|
+
acayr_to_date: [''],
|
|
656
765
|
acayr_isactive: [true],
|
|
657
766
|
acayr_iscurrent: [false],
|
|
658
767
|
acayr_islocked: [false],
|
|
@@ -663,32 +772,101 @@ class AcademicYearCreateComponent {
|
|
|
663
772
|
ngOnInit() {
|
|
664
773
|
// Initialize rights for academic year management
|
|
665
774
|
this.rightsService.initializeRights('academic_year_list');
|
|
666
|
-
|
|
775
|
+
// Set up breadcrumb based on mode
|
|
776
|
+
this.setupBreadcrumb();
|
|
777
|
+
// Subscribe to route params reactively to get the query parameter
|
|
778
|
+
this.route.params
|
|
779
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
780
|
+
.subscribe(params => {
|
|
781
|
+
const queryString = params['query'] || '';
|
|
782
|
+
this.initializeComponent(queryString);
|
|
783
|
+
});
|
|
784
|
+
// Always load dropdown options
|
|
785
|
+
this.loadDropdownOptions();
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* Setup breadcrumb based on component mode
|
|
789
|
+
*/
|
|
790
|
+
setupBreadcrumb() {
|
|
791
|
+
const url = this.router.url;
|
|
792
|
+
const breadcrumbItems = [
|
|
793
|
+
{ id: 'academic-year-list', label: 'Academic Year Management', url: '/control-panel/academic_year' }
|
|
794
|
+
];
|
|
795
|
+
if (url.includes('/view/')) {
|
|
796
|
+
breadcrumbItems.push({ id: 'view', label: 'View Academic Year' });
|
|
797
|
+
}
|
|
798
|
+
else if (url.includes('/edit/')) {
|
|
799
|
+
breadcrumbItems.push({ id: 'edit', label: 'Edit Academic Year' });
|
|
800
|
+
}
|
|
801
|
+
else {
|
|
802
|
+
breadcrumbItems.push({ id: 'create', label: 'Create Academic Year' });
|
|
803
|
+
}
|
|
804
|
+
this.breadcrumb_data.set(breadcrumbItems);
|
|
667
805
|
}
|
|
668
806
|
/**
|
|
669
807
|
* Initialize component
|
|
670
808
|
*/
|
|
671
|
-
initializeComponent() {
|
|
672
|
-
//
|
|
673
|
-
this.
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
809
|
+
initializeComponent(queryString) {
|
|
810
|
+
// Check route parameters to determine mode
|
|
811
|
+
const url = this.router.url;
|
|
812
|
+
if (url.includes('/view/')) {
|
|
813
|
+
this.isViewMode.set(true);
|
|
814
|
+
this.setupBreadcrumb(); // Update breadcrumb for view mode
|
|
815
|
+
this.loadAcademicYearForView(queryString);
|
|
816
|
+
}
|
|
817
|
+
else if (url.includes('/edit/')) {
|
|
818
|
+
this.isEditMode.set(true);
|
|
819
|
+
this.setupBreadcrumb(); // Update breadcrumb for edit mode
|
|
820
|
+
console.log('🏢 edit mode queryString:', queryString);
|
|
821
|
+
this.loadAcademicYearForEdit(queryString);
|
|
822
|
+
}
|
|
823
|
+
else {
|
|
824
|
+
// Create mode
|
|
825
|
+
this.isEditMode.set(false);
|
|
826
|
+
this.isViewMode.set(false);
|
|
827
|
+
this.setupBreadcrumb(); // Update breadcrumb for create mode
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
/**
|
|
831
|
+
* Load academic year for viewing
|
|
832
|
+
*/
|
|
833
|
+
loadAcademicYearForView(queryString) {
|
|
834
|
+
if (!queryString || queryString.trim() === '') {
|
|
835
|
+
console.warn('⚠️ No query string provided for view mode');
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
try {
|
|
839
|
+
const params = generateObjectFromString(queryString);
|
|
840
|
+
if (params?.acayr_id) {
|
|
841
|
+
this.academicYearId.set(params.acayr_id);
|
|
842
|
+
this.loadAcademicYearData(params.acayr_id);
|
|
843
|
+
// Disable form for view mode
|
|
844
|
+
this.academicYearForm.disable();
|
|
684
845
|
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
846
|
+
}
|
|
847
|
+
catch (error) {
|
|
848
|
+
console.error('❌ Error parsing query string for view mode:', error);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
/**
|
|
852
|
+
* Load academic year for editing
|
|
853
|
+
*/
|
|
854
|
+
loadAcademicYearForEdit(queryString) {
|
|
855
|
+
if (!queryString || queryString.trim() === '') {
|
|
856
|
+
console.warn('⚠️ No query string provided for edit mode');
|
|
857
|
+
return;
|
|
858
|
+
}
|
|
859
|
+
console.log('🏢 queryString:', queryString);
|
|
860
|
+
try {
|
|
861
|
+
const params = generateObjectFromString(queryString);
|
|
862
|
+
if (params?.acayr_id) {
|
|
863
|
+
this.academicYearId.set(params.acayr_id);
|
|
864
|
+
this.loadAcademicYearData(params.acayr_id);
|
|
688
865
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
866
|
+
}
|
|
867
|
+
catch (error) {
|
|
868
|
+
console.error('❌ Error parsing query string for edit mode:', error);
|
|
869
|
+
}
|
|
692
870
|
}
|
|
693
871
|
/**
|
|
694
872
|
* Load dropdown options
|
|
@@ -708,6 +886,7 @@ class AcademicYearCreateComponent {
|
|
|
708
886
|
}
|
|
709
887
|
/**
|
|
710
888
|
* Load academic year data for edit mode
|
|
889
|
+
* Note: API will automatically filter by entity ID from token, no need to send entity ID from UI
|
|
711
890
|
*/
|
|
712
891
|
loadAcademicYearData(academicYearId) {
|
|
713
892
|
this.loading.set(true);
|
|
@@ -736,6 +915,7 @@ class AcademicYearCreateComponent {
|
|
|
736
915
|
}
|
|
737
916
|
/**
|
|
738
917
|
* Load academic year mappings for edit mode
|
|
918
|
+
* Note: API will automatically filter by entity ID from token, no need to send entity ID from UI
|
|
739
919
|
*/
|
|
740
920
|
loadAcademicYearMappings(academicYearId) {
|
|
741
921
|
const mappingPayload = {
|
|
@@ -790,8 +970,8 @@ class AcademicYearCreateComponent {
|
|
|
790
970
|
mappings.forEach((mapping) => {
|
|
791
971
|
const mappingGroup = this.fb.group({
|
|
792
972
|
_id: [mapping._id || ''],
|
|
793
|
-
acayrmp_academic_year_id_acayr: [mapping.acayrmp_academic_year_id_acayr || this.academicYearId() || ''
|
|
794
|
-
acayrmp_entity_id_syen: [mapping.acayrmp_entity_id_syen || ''
|
|
973
|
+
acayrmp_academic_year_id_acayr: [mapping.acayrmp_academic_year_id_acayr || this.academicYearId() || ''],
|
|
974
|
+
acayrmp_entity_id_syen: [mapping.acayrmp_entity_id_syen || ''],
|
|
795
975
|
acayrmp_islocked: [mapping.acayrmp_islocked ?? false],
|
|
796
976
|
acayrmp_iscurrent: [mapping.acayrmp_iscurrent ?? false]
|
|
797
977
|
});
|
|
@@ -812,12 +992,28 @@ class AcademicYearCreateComponent {
|
|
|
812
992
|
this.activeTab.set(tab.id);
|
|
813
993
|
}
|
|
814
994
|
onSubmit() {
|
|
995
|
+
if (this.isViewMode()) {
|
|
996
|
+
this.componentContextService.close(['/control-panel/academic_year']);
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
815
999
|
const requiredRight = this.isEditMode() ? 'EDIT' : 'CREATE';
|
|
816
1000
|
if (!this.rightsService.hasRight(requiredRight)) {
|
|
817
1001
|
console.error(`You do not have permission to ${this.isEditMode() ? 'edit' : 'create'} academic years`);
|
|
818
1002
|
return;
|
|
819
1003
|
}
|
|
820
|
-
|
|
1004
|
+
// Validate mappings first - for create mode, at least one mapping is required
|
|
1005
|
+
if (!this.validateMappings()) {
|
|
1006
|
+
const mappings = this.academicYearMappingsArray.controls;
|
|
1007
|
+
if (!this.isEditMode() && mappings.length === 0) {
|
|
1008
|
+
this.notificationService.error('At least one entity mapping is required when creating an academic year. Please add at least one mapping in the Mapping Configuration tab.');
|
|
1009
|
+
// Switch to mapping tab to help user
|
|
1010
|
+
this.activeTab.set('mapping');
|
|
1011
|
+
return;
|
|
1012
|
+
}
|
|
1013
|
+
this.notificationService.error('Please fix the mapping errors before saving. Make sure all mappings have an entity selected and there are no duplicate entities.');
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
if (this.academicYearForm.valid) {
|
|
821
1017
|
this.loading.set(true);
|
|
822
1018
|
const formData = this.academicYearForm.value;
|
|
823
1019
|
// Prepare payload with mappings
|
|
@@ -896,14 +1092,14 @@ class AcademicYearCreateComponent {
|
|
|
896
1092
|
* Go back to academic year list
|
|
897
1093
|
*/
|
|
898
1094
|
goBackToAcademicYearList() {
|
|
899
|
-
this.router.navigate(['/control-panel/
|
|
1095
|
+
this.router.navigate(['/control-panel/academic_year']);
|
|
900
1096
|
}
|
|
901
1097
|
/**
|
|
902
1098
|
* Cancel form and optionally navigate back
|
|
903
1099
|
*/
|
|
904
1100
|
cancelForm() {
|
|
905
1101
|
// Use ComponentContextService to close tab or floating container
|
|
906
|
-
this.componentContextService.close(['/control-panel/
|
|
1102
|
+
this.componentContextService.close(['/control-panel/academic_year']);
|
|
907
1103
|
}
|
|
908
1104
|
/**
|
|
909
1105
|
* Get page title based on mode
|
|
@@ -931,8 +1127,8 @@ class AcademicYearCreateComponent {
|
|
|
931
1127
|
const tempId = 'temp_' + Date.now() + '_' + Math.random().toString(36).substr(2, 9);
|
|
932
1128
|
const academicYearMapping = this.fb.group({
|
|
933
1129
|
_id: [tempId],
|
|
934
|
-
acayrmp_academic_year_id_acayr: [this.academicYearId() || ''
|
|
935
|
-
acayrmp_entity_id_syen: [''
|
|
1130
|
+
acayrmp_academic_year_id_acayr: [this.academicYearId() || ''],
|
|
1131
|
+
acayrmp_entity_id_syen: [''],
|
|
936
1132
|
acayrmp_islocked: [false],
|
|
937
1133
|
acayrmp_iscurrent: [false]
|
|
938
1134
|
});
|
|
@@ -971,12 +1167,19 @@ class AcademicYearCreateComponent {
|
|
|
971
1167
|
}
|
|
972
1168
|
/**
|
|
973
1169
|
* Validate that all mappings have required fields
|
|
1170
|
+
* For create mode: At least one mapping is required
|
|
1171
|
+
* For edit mode: Mappings are optional (can have zero mappings)
|
|
974
1172
|
*/
|
|
975
1173
|
validateMappings() {
|
|
976
1174
|
const mappings = this.academicYearMappingsArray.controls;
|
|
977
|
-
//
|
|
978
|
-
if (mappings.length === 0) {
|
|
979
|
-
|
|
1175
|
+
// For create mode: At least one mapping is required
|
|
1176
|
+
if (!this.isEditMode() && mappings.length === 0) {
|
|
1177
|
+
console.warn('At least one entity mapping is required when creating an academic year');
|
|
1178
|
+
return false;
|
|
1179
|
+
}
|
|
1180
|
+
// For edit mode: No mappings is valid (existing mappings can be removed)
|
|
1181
|
+
if (this.isEditMode() && mappings.length === 0) {
|
|
1182
|
+
return true;
|
|
980
1183
|
}
|
|
981
1184
|
// Validate each mapping
|
|
982
1185
|
for (let i = 0; i < mappings.length; i++) {
|
|
@@ -1026,6 +1229,15 @@ class AcademicYearCreateComponent {
|
|
|
1026
1229
|
const selectedEntityId = event?.value || event;
|
|
1027
1230
|
if (selectedEntityId) {
|
|
1028
1231
|
console.log(`🏢 Entity selected for mapping ${mappingIndex}:`, selectedEntityId);
|
|
1232
|
+
// Mark the mapping as touched to trigger validation
|
|
1233
|
+
const mappingControl = this.academicYearMappingsArray.at(mappingIndex);
|
|
1234
|
+
if (mappingControl) {
|
|
1235
|
+
mappingControl.markAllAsTouched();
|
|
1236
|
+
}
|
|
1237
|
+
// Update the trigger signal to force computed signals to re-evaluate
|
|
1238
|
+
this.mappingsChangeTrigger.update(v => v + 1);
|
|
1239
|
+
// Trigger change detection to update computed signals
|
|
1240
|
+
this.cdr.detectChanges();
|
|
1029
1241
|
// Trigger change detection to update other mappings' entity options
|
|
1030
1242
|
this.updateEntityOptionsForMappings();
|
|
1031
1243
|
}
|
|
@@ -1183,10 +1395,10 @@ class AcademicYearCreateComponent {
|
|
|
1183
1395
|
});
|
|
1184
1396
|
return forkJoin(deleteObservables);
|
|
1185
1397
|
}
|
|
1186
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1187
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: AcademicYearCreateComponent, isStandalone: true, selector: "cide-core-academic-year-create", ngImport: i0, template: "<!-- \n ACADEMIC YEAR MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<div class=\"tw-w-full tw-h-full\">\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\" [formGroup]=\"academicYearForm\" [class.tw-opacity-60]=\"loading()\"\n (ngSubmit)=\"onSubmit()\">\n\n <!-- Simple Header Section -->\n <div class=\"tw-table-row tw-w-full tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div 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\">\n \n <!-- Title -->\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">school</cide-ele-icon>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">\n {{ isEditMode() ? 'Edit Academic Year' : 'Create Academic Year' }}\n </h5>\n </div>\n\n <!-- Actions -->\n <div 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\">\n <!-- Back button or other actions can be added here if needed -->\n </div>\n </div>\n </div>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-2 tw-py-0\">\n <cide-ele-tab [tabs]=\"academicYearTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6\">\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- Basic Academic Year Information -->\n <div class=\"tw-space-y-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Academic Year Code\" formControlName=\"acayr_code\"\n placeholder=\"e.g., AY2024-25\" size=\"md\" leadingIcon=\"code\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Academic Year Name\" formControlName=\"acayr_name\"\n placeholder=\"e.g., Academic Year 2024-2025\" size=\"md\" leadingIcon=\"school\">\n </cide-ele-input>\n </div>\n\n <div>\n <cide-ele-textarea label=\"Description\" formControlName=\"acayr_description\"\n placeholder=\"Enter detailed description of the academic year...\"\n rows=\"3\" size=\"md\">\n </cide-ele-textarea>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"From Date\" formControlName=\"acayr_from_date\" type=\"date\" size=\"md\"\n leadingIcon=\"calendar_today\" id=\"acayr_from_date\">\n </cide-ele-input>\n\n <cide-ele-input label=\"To Date\" formControlName=\"acayr_to_date\" type=\"date\" size=\"md\"\n leadingIcon=\"calendar_today\" id=\"acayr_to_date\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_isactive\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this academic year</span>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_iscurrent\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current academic year</span>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_islocked\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('mapping') {\n <!-- Academic Year Mapping Configuration -->\n <div class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-indigo-50 tw-border tw-border-blue-200 tw-rounded-xl tw-p-6\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-bg-blue-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-6 tw-h-6\">link</cide-ele-icon>\n </div>\n <div>\n <h6 class=\"tw-text-lg tw-font-semibold tw-text-blue-900 tw-m-0\">Academic Year Mapping</h6>\n <p class=\"tw-text-sm tw-text-blue-600 tw-m-0\">Configure entity mappings for this academic year</p>\n </div>\n </div>\n <button cideEleButton type=\"button\" variant=\"primary\" size=\"md\" leftIcon=\"add\"\n (click)=\"addAcademicYearMapping()\"\n class=\"tw-shadow-md hover:tw-shadow-lg tw-transition-shadow\">\n Add New Mapping\n </button>\n </div>\n \n @if (academicYearMappingsArray.length === 0) {\n <div class=\"tw-text-center tw-py-12 tw-text-gray-500\">\n <div class=\"tw-bg-white tw-p-4 tw-rounded-full tw-w-16 tw-h-16 tw-mx-auto tw-mb-4 tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-w-8 tw-h-8 tw-text-gray-400\">link</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-base tw-font-medium tw-text-gray-600 tw-mb-2\">No Mappings Yet</h6>\n <p class=\"tw-text-sm tw-text-gray-500\">Click \"Add New Mapping\" to start configuring entity relationships for this academic year.</p>\n </div>\n } @else {\n <div class=\"tw-space-y-4\" formArrayName=\"acayr_academic_year_mappings\">\n @for (mapping of academicYearMappingsArray.controls; track $index) {\n <div class=\"tw-bg-white tw-rounded-xl tw-border tw-border-gray-200 tw-shadow-sm hover:tw-shadow-md tw-transition-shadow tw-p-6\">\n <div class=\"tw-flex tw-items-start tw-justify-between tw-mb-4\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div class=\"tw-bg-blue-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">settings</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900\">Mapping #{{ $index + 1 }}</h6>\n </div>\n <button cideEleButton type=\"button\" variant=\"danger\" size=\"sm\" leftIcon=\"delete\"\n (click)=\"removeAcademicYearMapping($index)\"\n class=\"tw-opacity-80 hover:tw-opacity-100 tw-transition-opacity\">\n Remove\n </button>\n </div>\n \n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-4\" [formGroupName]=\"$index\">\n <!-- Hidden Academic Year ID field (internal use only) -->\n <input type=\"hidden\" formControlName=\"acayrmp_academic_year_id_acayr\">\n \n <!-- Entity Selection -->\n <div class=\"tw-space-y-2\">\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Select Entity</label>\n <cide-ele-select \n [options]=\"entityOptions()\"\n formControlName=\"acayrmp_entity_id_syen\"\n placeholder=\"Choose entity for this mapping\" \n size=\"md\"\n valueKey=\"_id\"\n labelKey=\"syen_name\"\n class=\"tw-min-w-full\"\n (change)=\"onMappingEntityChange($event, $index)\">\n </cide-ele-select>\n </div>\n \n <!-- Status Controls -->\n <div class=\"tw-space-y-2\">\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-3\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-p-3 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input \n formControlName=\"acayrmp_islocked\" \n type=\"checkbox\" \n size=\"sm\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n \n <div class=\"tw-flex tw-items-center tw-gap-2 tw-p-3 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input \n formControlName=\"acayrmp_iscurrent\" \n type=\"checkbox\" \n size=\"sm\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current mapping</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Mapping Validation Messages -->\n @if (academicYearMappingsArray.length > 0 && !isMappingsArrayValid()) {\n <div class=\"tw-mt-4 tw-p-4 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded-lg\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon variant=\"warning\" size=\"sm\">warning</cide-ele-icon>\n <span class=\"tw-text-sm tw-font-medium tw-text-yellow-800\">\n Please ensure all mappings have required fields filled in.\n </span>\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-2 tw-bg-gray-50 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-gap-4\">\n <!-- Form Validation Errors -->\n <cide-form-field-error [formGroup]=\"academicYearForm\"></cide-form-field-error>\n \n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\n @if (!isEditMode()) {\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n }\n\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n Cancel\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || academicYearForm.invalid\"\n [loading]=\"loading()\" leftIcon=\"save\">\n {{ isEditMode() ? 'Update Academic Year' : 'Create Academic Year' }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "step", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideTextareaComponent, selector: "cide-ele-textarea", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "minlength", "maxlength", "rows", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput"], outputs: ["ngModelChange"] }, { 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: CideEleTabComponent, selector: "cide-ele-tab", inputs: ["tabs", "activeTabId", "size", "variant", "fullWidth", "disabled"], outputs: ["tabChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
1398
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AcademicYearCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1399
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AcademicYearCreateComponent, isStandalone: true, selector: "cide-core-academic-year-create", ngImport: i0, template: "<!-- \n ACADEMIC YEAR MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<cide-lyt-shared-wrapper \n [shared_wrapper_setup_param]=\"shared_wrapper_setup_param()\"\n [breadcrumb_data]=\"breadcrumb_data()\">\n \n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\" [formGroup]=\"academicYearForm\" [class.tw-opacity-60]=\"loading()\"\n (ngSubmit)=\"onSubmit()\">\n\n <!-- Tab Navigation -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-2 tw-py-0\">\n <cide-ele-tab [tabs]=\"academicYearTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6\">\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- Basic Academic Year Information -->\n <div class=\"tw-space-y-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Academic Year Code\" formControlName=\"acayr_code\"\n placeholder=\"e.g., AY2024-25\" size=\"md\" leadingIcon=\"code\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Academic Year Name\" formControlName=\"acayr_name\"\n placeholder=\"e.g., Academic Year 2024-2025\" size=\"md\" leadingIcon=\"school\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n\n <div>\n <cide-ele-textarea label=\"Description\" formControlName=\"acayr_description\"\n placeholder=\"Enter detailed description of the academic year...\"\n rows=\"3\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-textarea>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"From Date\" formControlName=\"acayr_from_date\" type=\"date\" size=\"md\"\n leadingIcon=\"calendar_today\" id=\"acayr_from_date\">\n </cide-ele-input>\n\n <cide-ele-input label=\"To Date\" formControlName=\"acayr_to_date\" type=\"date\" size=\"md\"\n leadingIcon=\"calendar_today\" id=\"acayr_to_date\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_isactive\" type=\"checkbox\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this academic year</span>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_iscurrent\" type=\"checkbox\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current academic year</span>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_islocked\" type=\"checkbox\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('mapping') {\n <!-- Academic Year Mapping Configuration -->\n <div class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-indigo-50 tw-border tw-border-blue-200 tw-rounded-xl tw-p-6\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-bg-blue-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-6 tw-h-6\">link</cide-ele-icon>\n </div>\n <div>\n <h6 class=\"tw-text-lg tw-font-semibold tw-text-blue-900 tw-m-0\">Academic Year Mapping</h6>\n <p class=\"tw-text-sm tw-text-blue-600 tw-m-0\">Configure entity mappings for this academic year</p>\n </div>\n </div>\n @if (!isViewMode()) {\n <button cideEleButton type=\"button\" variant=\"primary\" size=\"md\" leftIcon=\"add\"\n (click)=\"addAcademicYearMapping()\"\n class=\"tw-shadow-md hover:tw-shadow-lg tw-transition-shadow\">\n Add New Mapping\n </button>\n }\n </div>\n \n @if (academicYearMappingsArray.length === 0) {\n <div class=\"tw-text-center tw-py-12 tw-text-gray-500\">\n <div class=\"tw-bg-white tw-p-4 tw-rounded-full tw-w-16 tw-h-16 tw-mx-auto tw-mb-4 tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-w-8 tw-h-8 tw-text-gray-400\">link</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-base tw-font-medium tw-text-gray-600 tw-mb-2\">No Mappings Yet</h6>\n <p class=\"tw-text-sm tw-text-gray-500\">Click \"Add New Mapping\" to start configuring entity relationships for this academic year.</p>\n </div>\n } @else {\n <div class=\"tw-space-y-4\" formArrayName=\"acayr_academic_year_mappings\">\n @for (mapping of academicYearMappingsArray.controls; track $index) {\n <div class=\"tw-bg-white tw-rounded-xl tw-border tw-border-gray-200 tw-shadow-sm hover:tw-shadow-md tw-transition-shadow tw-p-6\">\n <div class=\"tw-flex tw-items-start tw-justify-between tw-mb-4\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div class=\"tw-bg-blue-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">settings</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900\">Mapping #{{ $index + 1 }}</h6>\n </div>\n <button cideEleButton type=\"button\" variant=\"danger\" size=\"sm\" leftIcon=\"delete\"\n (click)=\"removeAcademicYearMapping($index)\"\n class=\"tw-opacity-80 hover:tw-opacity-100 tw-transition-opacity\">\n Remove\n </button>\n </div>\n \n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-4\" [formGroupName]=\"$index\">\n <!-- Hidden Academic Year ID field (internal use only) -->\n <input type=\"hidden\" formControlName=\"acayrmp_academic_year_id_acayr\">\n \n <!-- Entity Selection -->\n <div class=\"tw-space-y-2\">\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Select Entity</label>\n <cide-ele-select \n [options]=\"getFilteredEntityOptions($index)\"\n formControlName=\"acayrmp_entity_id_syen\"\n placeholder=\"Choose entity for this mapping\" \n size=\"md\"\n valueKey=\"_id\"\n labelKey=\"syen_name\"\n class=\"tw-min-w-full\"\n (change)=\"onMappingEntityChange($event, $index)\">\n </cide-ele-select>\n </div>\n \n <!-- Status Controls -->\n <div class=\"tw-space-y-2\">\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-3\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-p-3 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input \n formControlName=\"acayrmp_islocked\" \n type=\"checkbox\" \n size=\"sm\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n \n <div class=\"tw-flex tw-items-center tw-gap-2 tw-p-3 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input \n formControlName=\"acayrmp_iscurrent\" \n type=\"checkbox\" \n size=\"sm\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current mapping</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Mapping Validation Messages -->\n @if (academicYearMappingsArray.length > 0 && !isMappingsArrayValid()) {\n <div class=\"tw-mt-4 tw-p-4 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded-lg\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon variant=\"warning\" size=\"sm\">warning</cide-ele-icon>\n <span class=\"tw-text-sm tw-font-medium tw-text-yellow-800\">\n Please ensure all mappings have required fields filled in.\n </span>\n </div>\n </div>\n }\n \n <!-- Require at least one mapping for create mode -->\n @if (!isEditMode() && academicYearMappingsArray.length === 0) {\n <div class=\"tw-mt-4 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon variant=\"error\" size=\"sm\">error</cide-ele-icon>\n <span class=\"tw-text-sm tw-font-medium tw-text-red-800\">\n At least one entity mapping is required when creating an academic year. Please add a mapping below.\n </span>\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-2 tw-bg-gray-50 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-gap-4\">\n <!-- Form Validation Errors -->\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <cide-form-field-error [formGroup]=\"academicYearForm\"></cide-form-field-error>\n </div>\n \n <!-- Action Buttons with Error Message -->\n <div class=\"tw-flex tw-items-center tw-gap-4\">\n <!-- Error Message (shown when button is disabled) -->\n @if (!isFormValidForSubmit()) {\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-1.5 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md\">\n <cide-ele-icon variant=\"error\" size=\"xs\" class=\"tw-text-red-600\">error</cide-ele-icon>\n <span class=\"tw-text-xs tw-font-medium tw-text-red-700\">{{ submitButtonDisabledReason() }}</span>\n </div>\n }\n \n <!-- Action Buttons -->\n <div class=\"tw-flex tw-gap-4\">\n @if (isViewMode()) {\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n Close\n </button>\n } @else {\n @if (!isEditMode()) {\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n }\n\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n Cancel\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || !isFormValidForSubmit()\"\n [loading]=\"loading()\" leftIcon=\"save\">\n {{ isEditMode() ? 'Update Academic Year' : 'Create Academic Year' }}\n </button>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </form>\n</cide-lyt-shared-wrapper>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "step", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideTextareaComponent, selector: "cide-ele-textarea", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "minlength", "maxlength", "rows", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput"], outputs: ["ngModelChange"] }, { 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: CideEleTabComponent, selector: "cide-ele-tab", inputs: ["tabs", "activeTabId", "size", "variant", "fullWidth", "disabled"], outputs: ["tabChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
1188
1400
|
}
|
|
1189
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AcademicYearCreateComponent, decorators: [{
|
|
1190
1402
|
type: Component,
|
|
1191
1403
|
args: [{ selector: 'cide-core-academic-year-create', standalone: true, imports: [
|
|
1192
1404
|
CommonModule,
|
|
@@ -1197,8 +1409,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1197
1409
|
CideEleTabComponent,
|
|
1198
1410
|
CideIconComponent,
|
|
1199
1411
|
CideSelectComponent,
|
|
1200
|
-
CideFormFieldErrorComponent
|
|
1201
|
-
], template: "<!-- \n ACADEMIC YEAR MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<div class=\"tw-w-full tw-h-full\">\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\" [formGroup]=\"academicYearForm\" [class.tw-opacity-60]=\"loading()\"\n (ngSubmit)=\"onSubmit()\">\n\n <!-- Simple Header Section -->\n <div class=\"tw-table-row tw-w-full tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div 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\">\n \n <!-- Title -->\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">school</cide-ele-icon>\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">\n {{ isEditMode() ? 'Edit Academic Year' : 'Create Academic Year' }}\n </h5>\n </div>\n\n <!-- Actions -->\n <div 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\">\n <!-- Back button or other actions can be added here if needed -->\n </div>\n </div>\n </div>\n </div>\n\n <!-- Tab Navigation -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-2 tw-py-0\">\n <cide-ele-tab [tabs]=\"academicYearTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6\">\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- Basic Academic Year Information -->\n <div class=\"tw-space-y-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Academic Year Code\" formControlName=\"acayr_code\"\n placeholder=\"e.g., AY2024-25\" size=\"md\" leadingIcon=\"code\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Academic Year Name\" formControlName=\"acayr_name\"\n placeholder=\"e.g., Academic Year 2024-2025\" size=\"md\" leadingIcon=\"school\">\n </cide-ele-input>\n </div>\n\n <div>\n <cide-ele-textarea label=\"Description\" formControlName=\"acayr_description\"\n placeholder=\"Enter detailed description of the academic year...\"\n rows=\"3\" size=\"md\">\n </cide-ele-textarea>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"From Date\" formControlName=\"acayr_from_date\" type=\"date\" size=\"md\"\n leadingIcon=\"calendar_today\" id=\"acayr_from_date\">\n </cide-ele-input>\n\n <cide-ele-input label=\"To Date\" formControlName=\"acayr_to_date\" type=\"date\" size=\"md\"\n leadingIcon=\"calendar_today\" id=\"acayr_to_date\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_isactive\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this academic year</span>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_iscurrent\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current academic year</span>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_islocked\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('mapping') {\n <!-- Academic Year Mapping Configuration -->\n <div class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-indigo-50 tw-border tw-border-blue-200 tw-rounded-xl tw-p-6\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-bg-blue-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-6 tw-h-6\">link</cide-ele-icon>\n </div>\n <div>\n <h6 class=\"tw-text-lg tw-font-semibold tw-text-blue-900 tw-m-0\">Academic Year Mapping</h6>\n <p class=\"tw-text-sm tw-text-blue-600 tw-m-0\">Configure entity mappings for this academic year</p>\n </div>\n </div>\n <button cideEleButton type=\"button\" variant=\"primary\" size=\"md\" leftIcon=\"add\"\n (click)=\"addAcademicYearMapping()\"\n class=\"tw-shadow-md hover:tw-shadow-lg tw-transition-shadow\">\n Add New Mapping\n </button>\n </div>\n \n @if (academicYearMappingsArray.length === 0) {\n <div class=\"tw-text-center tw-py-12 tw-text-gray-500\">\n <div class=\"tw-bg-white tw-p-4 tw-rounded-full tw-w-16 tw-h-16 tw-mx-auto tw-mb-4 tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-w-8 tw-h-8 tw-text-gray-400\">link</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-base tw-font-medium tw-text-gray-600 tw-mb-2\">No Mappings Yet</h6>\n <p class=\"tw-text-sm tw-text-gray-500\">Click \"Add New Mapping\" to start configuring entity relationships for this academic year.</p>\n </div>\n } @else {\n <div class=\"tw-space-y-4\" formArrayName=\"acayr_academic_year_mappings\">\n @for (mapping of academicYearMappingsArray.controls; track $index) {\n <div class=\"tw-bg-white tw-rounded-xl tw-border tw-border-gray-200 tw-shadow-sm hover:tw-shadow-md tw-transition-shadow tw-p-6\">\n <div class=\"tw-flex tw-items-start tw-justify-between tw-mb-4\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div class=\"tw-bg-blue-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">settings</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900\">Mapping #{{ $index + 1 }}</h6>\n </div>\n <button cideEleButton type=\"button\" variant=\"danger\" size=\"sm\" leftIcon=\"delete\"\n (click)=\"removeAcademicYearMapping($index)\"\n class=\"tw-opacity-80 hover:tw-opacity-100 tw-transition-opacity\">\n Remove\n </button>\n </div>\n \n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-4\" [formGroupName]=\"$index\">\n <!-- Hidden Academic Year ID field (internal use only) -->\n <input type=\"hidden\" formControlName=\"acayrmp_academic_year_id_acayr\">\n \n <!-- Entity Selection -->\n <div class=\"tw-space-y-2\">\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Select Entity</label>\n <cide-ele-select \n [options]=\"entityOptions()\"\n formControlName=\"acayrmp_entity_id_syen\"\n placeholder=\"Choose entity for this mapping\" \n size=\"md\"\n valueKey=\"_id\"\n labelKey=\"syen_name\"\n class=\"tw-min-w-full\"\n (change)=\"onMappingEntityChange($event, $index)\">\n </cide-ele-select>\n </div>\n \n <!-- Status Controls -->\n <div class=\"tw-space-y-2\">\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-3\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-p-3 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input \n formControlName=\"acayrmp_islocked\" \n type=\"checkbox\" \n size=\"sm\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n \n <div class=\"tw-flex tw-items-center tw-gap-2 tw-p-3 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input \n formControlName=\"acayrmp_iscurrent\" \n type=\"checkbox\" \n size=\"sm\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current mapping</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Mapping Validation Messages -->\n @if (academicYearMappingsArray.length > 0 && !isMappingsArrayValid()) {\n <div class=\"tw-mt-4 tw-p-4 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded-lg\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon variant=\"warning\" size=\"sm\">warning</cide-ele-icon>\n <span class=\"tw-text-sm tw-font-medium tw-text-yellow-800\">\n Please ensure all mappings have required fields filled in.\n </span>\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-2 tw-bg-gray-50 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-gap-4\">\n <!-- Form Validation Errors -->\n <cide-form-field-error [formGroup]=\"academicYearForm\"></cide-form-field-error>\n \n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\n @if (!isEditMode()) {\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n }\n\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n Cancel\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || academicYearForm.invalid\"\n [loading]=\"loading()\" leftIcon=\"save\">\n {{ isEditMode() ? 'Update Academic Year' : 'Create Academic Year' }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n </div>" }]
|
|
1412
|
+
CideFormFieldErrorComponent,
|
|
1413
|
+
CideLytSharedWrapperComponent
|
|
1414
|
+
], template: "<!-- \n ACADEMIC YEAR MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<cide-lyt-shared-wrapper \n [shared_wrapper_setup_param]=\"shared_wrapper_setup_param()\"\n [breadcrumb_data]=\"breadcrumb_data()\">\n \n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\" [formGroup]=\"academicYearForm\" [class.tw-opacity-60]=\"loading()\"\n (ngSubmit)=\"onSubmit()\">\n\n <!-- Tab Navigation -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-2 tw-py-0\">\n <cide-ele-tab [tabs]=\"academicYearTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6\">\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- Basic Academic Year Information -->\n <div class=\"tw-space-y-6\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Academic Year Code\" formControlName=\"acayr_code\"\n placeholder=\"e.g., AY2024-25\" size=\"md\" leadingIcon=\"code\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Academic Year Name\" formControlName=\"acayr_name\"\n placeholder=\"e.g., Academic Year 2024-2025\" size=\"md\" leadingIcon=\"school\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n\n <div>\n <cide-ele-textarea label=\"Description\" formControlName=\"acayr_description\"\n placeholder=\"Enter detailed description of the academic year...\"\n rows=\"3\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-textarea>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"From Date\" formControlName=\"acayr_from_date\" type=\"date\" size=\"md\"\n leadingIcon=\"calendar_today\" id=\"acayr_from_date\">\n </cide-ele-input>\n\n <cide-ele-input label=\"To Date\" formControlName=\"acayr_to_date\" type=\"date\" size=\"md\"\n leadingIcon=\"calendar_today\" id=\"acayr_to_date\">\n </cide-ele-input>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_isactive\" type=\"checkbox\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this academic year</span>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_iscurrent\" type=\"checkbox\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current academic year</span>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acayr_islocked\" type=\"checkbox\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('mapping') {\n <!-- Academic Year Mapping Configuration -->\n <div class=\"tw-bg-gradient-to-r tw-from-blue-50 tw-to-indigo-50 tw-border tw-border-blue-200 tw-rounded-xl tw-p-6\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-bg-blue-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-6 tw-h-6\">link</cide-ele-icon>\n </div>\n <div>\n <h6 class=\"tw-text-lg tw-font-semibold tw-text-blue-900 tw-m-0\">Academic Year Mapping</h6>\n <p class=\"tw-text-sm tw-text-blue-600 tw-m-0\">Configure entity mappings for this academic year</p>\n </div>\n </div>\n @if (!isViewMode()) {\n <button cideEleButton type=\"button\" variant=\"primary\" size=\"md\" leftIcon=\"add\"\n (click)=\"addAcademicYearMapping()\"\n class=\"tw-shadow-md hover:tw-shadow-lg tw-transition-shadow\">\n Add New Mapping\n </button>\n }\n </div>\n \n @if (academicYearMappingsArray.length === 0) {\n <div class=\"tw-text-center tw-py-12 tw-text-gray-500\">\n <div class=\"tw-bg-white tw-p-4 tw-rounded-full tw-w-16 tw-h-16 tw-mx-auto tw-mb-4 tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-w-8 tw-h-8 tw-text-gray-400\">link</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-base tw-font-medium tw-text-gray-600 tw-mb-2\">No Mappings Yet</h6>\n <p class=\"tw-text-sm tw-text-gray-500\">Click \"Add New Mapping\" to start configuring entity relationships for this academic year.</p>\n </div>\n } @else {\n <div class=\"tw-space-y-4\" formArrayName=\"acayr_academic_year_mappings\">\n @for (mapping of academicYearMappingsArray.controls; track $index) {\n <div class=\"tw-bg-white tw-rounded-xl tw-border tw-border-gray-200 tw-shadow-sm hover:tw-shadow-md tw-transition-shadow tw-p-6\">\n <div class=\"tw-flex tw-items-start tw-justify-between tw-mb-4\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <div class=\"tw-bg-blue-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-blue-600 tw-w-5 tw-h-5\">settings</cide-ele-icon>\n </div>\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900\">Mapping #{{ $index + 1 }}</h6>\n </div>\n <button cideEleButton type=\"button\" variant=\"danger\" size=\"sm\" leftIcon=\"delete\"\n (click)=\"removeAcademicYearMapping($index)\"\n class=\"tw-opacity-80 hover:tw-opacity-100 tw-transition-opacity\">\n Remove\n </button>\n </div>\n \n <div class=\"tw-grid tw-grid-cols-1 lg:tw-grid-cols-2 tw-gap-4\" [formGroupName]=\"$index\">\n <!-- Hidden Academic Year ID field (internal use only) -->\n <input type=\"hidden\" formControlName=\"acayrmp_academic_year_id_acayr\">\n \n <!-- Entity Selection -->\n <div class=\"tw-space-y-2\">\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Select Entity</label>\n <cide-ele-select \n [options]=\"getFilteredEntityOptions($index)\"\n formControlName=\"acayrmp_entity_id_syen\"\n placeholder=\"Choose entity for this mapping\" \n size=\"md\"\n valueKey=\"_id\"\n labelKey=\"syen_name\"\n class=\"tw-min-w-full\"\n (change)=\"onMappingEntityChange($event, $index)\">\n </cide-ele-select>\n </div>\n \n <!-- Status Controls -->\n <div class=\"tw-space-y-2\">\n <div class=\"tw-grid tw-grid-cols-1 tw-gap-3\">\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-p-3 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input \n formControlName=\"acayrmp_islocked\" \n type=\"checkbox\" \n size=\"sm\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n \n <div class=\"tw-flex tw-items-center tw-gap-2 tw-p-3 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input \n formControlName=\"acayrmp_iscurrent\" \n type=\"checkbox\" \n size=\"sm\"\n [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current mapping</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n </div>\n }\n\n <!-- Mapping Validation Messages -->\n @if (academicYearMappingsArray.length > 0 && !isMappingsArrayValid()) {\n <div class=\"tw-mt-4 tw-p-4 tw-bg-yellow-50 tw-border tw-border-yellow-200 tw-rounded-lg\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon variant=\"warning\" size=\"sm\">warning</cide-ele-icon>\n <span class=\"tw-text-sm tw-font-medium tw-text-yellow-800\">\n Please ensure all mappings have required fields filled in.\n </span>\n </div>\n </div>\n }\n \n <!-- Require at least one mapping for create mode -->\n @if (!isEditMode() && academicYearMappingsArray.length === 0) {\n <div class=\"tw-mt-4 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon variant=\"error\" size=\"sm\">error</cide-ele-icon>\n <span class=\"tw-text-sm tw-font-medium tw-text-red-800\">\n At least one entity mapping is required when creating an academic year. Please add a mapping below.\n </span>\n </div>\n </div>\n }\n </div>\n }\n }\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-2 tw-bg-gray-50 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-justify-between tw-items-center tw-gap-4\">\n <!-- Form Validation Errors -->\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <cide-form-field-error [formGroup]=\"academicYearForm\"></cide-form-field-error>\n </div>\n \n <!-- Action Buttons with Error Message -->\n <div class=\"tw-flex tw-items-center tw-gap-4\">\n <!-- Error Message (shown when button is disabled) -->\n @if (!isFormValidForSubmit()) {\n <div class=\"tw-flex tw-items-center tw-gap-2 tw-px-3 tw-py-1.5 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md\">\n <cide-ele-icon variant=\"error\" size=\"xs\" class=\"tw-text-red-600\">error</cide-ele-icon>\n <span class=\"tw-text-xs tw-font-medium tw-text-red-700\">{{ submitButtonDisabledReason() }}</span>\n </div>\n }\n \n <!-- Action Buttons -->\n <div class=\"tw-flex tw-gap-4\">\n @if (isViewMode()) {\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n Close\n </button>\n } @else {\n @if (!isEditMode()) {\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n }\n\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n Cancel\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || !isFormValidForSubmit()\"\n [loading]=\"loading()\" leftIcon=\"save\">\n {{ isEditMode() ? 'Update Academic Year' : 'Create Academic Year' }}\n </button>\n }\n </div>\n </div>\n </div>\n </div>\n </div>\n </form>\n</cide-lyt-shared-wrapper>" }]
|
|
1202
1415
|
}], ctorParameters: () => [] });
|
|
1203
1416
|
|
|
1204
1417
|
var academicYearCreate_component = /*#__PURE__*/Object.freeze({
|
|
@@ -1207,6 +1420,8 @@ var academicYearCreate_component = /*#__PURE__*/Object.freeze({
|
|
|
1207
1420
|
});
|
|
1208
1421
|
|
|
1209
1422
|
class AcademicYearListComponent {
|
|
1423
|
+
// Shared wrapper setup for breadcrumbs
|
|
1424
|
+
shared_wrapper_setup_param = { sypg_page_code: "academic_year_list" };
|
|
1210
1425
|
// Modern Angular 20+ dependency injection using inject()
|
|
1211
1426
|
destroyRef = inject(DestroyRef);
|
|
1212
1427
|
academicYearService = inject(CideLytAcademicYearService);
|
|
@@ -1249,6 +1464,7 @@ class AcademicYearListComponent {
|
|
|
1249
1464
|
canEdit = computed(() => this.rightsService.hasRight('EDIT'), ...(ngDevMode ? [{ debugName: "canEdit" }] : []));
|
|
1250
1465
|
canDelete = computed(() => this.rightsService.hasRight('DELETE'), ...(ngDevMode ? [{ debugName: "canDelete" }] : []));
|
|
1251
1466
|
canView = computed(() => this.rightsService.hasRight('VIEW'), ...(ngDevMode ? [{ debugName: "canView" }] : []));
|
|
1467
|
+
canToggleStatus = computed(() => this.rightsService.hasRight('TOGGLE_STATUS'), ...(ngDevMode ? [{ debugName: "canToggleStatus" }] : []));
|
|
1252
1468
|
// Modern Angular 20+ grid configuration using computed signal with proper typing
|
|
1253
1469
|
gridConfig = computed(() => ({
|
|
1254
1470
|
id: 'academic-year-list-grid',
|
|
@@ -1354,6 +1570,7 @@ class AcademicYearListComponent {
|
|
|
1354
1570
|
}
|
|
1355
1571
|
/**
|
|
1356
1572
|
* Load academic years from API
|
|
1573
|
+
* Note: API will automatically filter by entity ID from token, no need to send entity ID from UI
|
|
1357
1574
|
*/
|
|
1358
1575
|
loadAcademicYears() {
|
|
1359
1576
|
this.loading.set(true);
|
|
@@ -1547,6 +1764,9 @@ class AcademicYearListComponent {
|
|
|
1547
1764
|
textColor: academicYear?.acayr_islocked ? 'tw-text-gray-400' : 'tw-text-blue-600',
|
|
1548
1765
|
hoverBgColor: academicYear?.acayr_islocked ? 'hover:tw-bg-gray-50' : 'hover:tw-bg-blue-50'
|
|
1549
1766
|
});
|
|
1767
|
+
}
|
|
1768
|
+
// Toggle status option - only if user has TOGGLE_STATUS right
|
|
1769
|
+
if (this.canToggleStatus()) {
|
|
1550
1770
|
items.push({
|
|
1551
1771
|
id: 'toggle-status',
|
|
1552
1772
|
label: academicYear.acayr_isactive ? 'Deactivate' : 'Activate',
|
|
@@ -1820,10 +2040,10 @@ class AcademicYearListComponent {
|
|
|
1820
2040
|
return 'Active';
|
|
1821
2041
|
return 'Inactive';
|
|
1822
2042
|
}
|
|
1823
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1824
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
2043
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AcademicYearListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2044
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: AcademicYearListComponent, isStandalone: true, selector: "cide-core-academic-year-list", viewQueries: [{ propertyName: "academicYearDetailsRendererTemplate", first: true, predicate: ["academicYearDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "dateRangeRendererTemplate", first: true, predicate: ["dateRangeRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "statusRendererTemplate", first: true, predicate: ["statusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"shared_wrapper_setup_param\">\n <!-- Breadcrumb Actions -->\n <div breadcrumb-actions>\n @if (canCreate()) {\n <button cideEleButton variant=\"primary\" size=\"sm\" leftIcon=\"add\" (click)=\"createAcademicYear()\">\n Create Academic Year\n </button>\n }\n </div>\n\n <!-- Academic Year Container -->\n <div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n\n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n <cide-ele-data-grid class=\"tw-h-full\" [config]=\"gridConfig()\" [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n </div>\n</cide-lyt-shared-wrapper>\n\n<!-- Template Renderers -->\n<ng-template #academicYearDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-w-full\">\n <div class=\"tw-font-medium tw-text-gray-900\">{{ row.acayr_name || 'N/A' }}</div>\n <div class=\"tw-text-sm tw-text-gray-500 tw-truncate\">{{ row.acayr_description || 'No description' }}</div>\n </div>\n</ng-template>\n\n<ng-template #dateRangeRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-text-sm\">\n <span class=\"tw-text-gray-900 tw-font-medium\">{{ formatDate(row.acayr_from_date) }}</span>\n <span class=\"tw-text-gray-500\">to {{ formatDate(row.acayr_to_date) }}</span>\n <span class=\"tw-text-xs tw-text-gray-400\">{{ getDuration(row.acayr_from_date, row.acayr_to_date) }}</span>\n </div>\n</ng-template>\n\n<ng-template #statusRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-gap-1 tw-items-center\">\n <!-- Current Year Badge (Priority) -->\n @if (row.acayr_iscurrent) {\n <span\n class=\"tw-inline-flex tw-items-center tw-justify-center tw-px-2.5 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-yellow-100 tw-text-yellow-800 tw-text-center\">\n <cide-ele-icon size=\"2xs\" class=\"tw-mr-1\">star</cide-ele-icon>\n Current Year\n </span>\n }\n \n <!-- Active/Inactive Status Badge -->\n <span class=\"tw-inline-flex tw-items-center tw-justify-center tw-px-2.5 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-text-center\"\n [ngClass]=\"getActiveStatusBadgeClass(row)\">\n <cide-ele-icon size=\"2xs\" class=\"tw-mr-1\">\n {{ row.acayr_isactive ? 'check_circle' : 'cancel' }}\n </cide-ele-icon>\n {{ row.acayr_isactive ? 'Active' : 'Inactive' }}\n </span>\n \n <!-- Locked Status Badge (Additional info) -->\n @if (row.acayr_islocked) {\n <span\n class=\"tw-inline-flex tw-items-center tw-justify-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-red-100 tw-text-red-800 tw-text-center\">\n <cide-ele-icon size=\"2xs\" class=\"tw-mr-1\">lock</cide-ele-icon>\n Locked\n </span>\n }\n </div>\n</ng-template>\n\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\" let-value=\"value\">\n <cide-ele-dropdown \n [items]=\"getActionDropdownItems(row)\"\n [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>", styles: [":host{height:100%;display:flex;flex-direction:column}.academic-year-listing-container{height:100%;display:flex;flex-direction:column;overflow:hidden}cide-ele-data-grid{flex:1;min-height:0;display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { 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: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { 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"] }] });
|
|
1825
2045
|
}
|
|
1826
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2046
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AcademicYearListComponent, decorators: [{
|
|
1827
2047
|
type: Component,
|
|
1828
2048
|
args: [{ selector: 'cide-core-academic-year-list', standalone: true, imports: [
|
|
1829
2049
|
CommonModule,
|
|
@@ -1831,9 +2051,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
1831
2051
|
CideIconComponent,
|
|
1832
2052
|
CideEleButtonComponent,
|
|
1833
2053
|
CideEleDataGridComponent,
|
|
1834
|
-
CideEleDropdownComponent
|
|
1835
|
-
|
|
1836
|
-
}] });
|
|
2054
|
+
CideEleDropdownComponent,
|
|
2055
|
+
CideLytSharedWrapperComponent
|
|
2056
|
+
], template: "<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"shared_wrapper_setup_param\">\n <!-- Breadcrumb Actions -->\n <div breadcrumb-actions>\n @if (canCreate()) {\n <button cideEleButton variant=\"primary\" size=\"sm\" leftIcon=\"add\" (click)=\"createAcademicYear()\">\n Create Academic Year\n </button>\n }\n </div>\n\n <!-- Academic Year Container -->\n <div class=\"tw-table tw-w-full tw-h-full\">\n\n <!-- Main Content Area -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-h-full tw-relative\">\n\n <!-- Data Grid Component -->\n <div class=\"tw-h-full tw-overflow-auto\">\n <cide-ele-data-grid class=\"tw-h-full\" [config]=\"gridConfig()\" [templateRenderers]=\"templateRenderers()\"\n (gridEvent)=\"onGridEvent($event)\">\n </cide-ele-data-grid>\n </div>\n\n </div>\n </div>\n\n </div>\n</cide-lyt-shared-wrapper>\n\n<!-- Template Renderers -->\n<ng-template #academicYearDetailsRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-w-full\">\n <div class=\"tw-font-medium tw-text-gray-900\">{{ row.acayr_name || 'N/A' }}</div>\n <div class=\"tw-text-sm tw-text-gray-500 tw-truncate\">{{ row.acayr_description || 'No description' }}</div>\n </div>\n</ng-template>\n\n<ng-template #dateRangeRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-text-sm\">\n <span class=\"tw-text-gray-900 tw-font-medium\">{{ formatDate(row.acayr_from_date) }}</span>\n <span class=\"tw-text-gray-500\">to {{ formatDate(row.acayr_to_date) }}</span>\n <span class=\"tw-text-xs tw-text-gray-400\">{{ getDuration(row.acayr_from_date, row.acayr_to_date) }}</span>\n </div>\n</ng-template>\n\n<ng-template #statusRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-flex-col tw-gap-1 tw-items-center\">\n <!-- Current Year Badge (Priority) -->\n @if (row.acayr_iscurrent) {\n <span\n class=\"tw-inline-flex tw-items-center tw-justify-center tw-px-2.5 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-yellow-100 tw-text-yellow-800 tw-text-center\">\n <cide-ele-icon size=\"2xs\" class=\"tw-mr-1\">star</cide-ele-icon>\n Current Year\n </span>\n }\n \n <!-- Active/Inactive Status Badge -->\n <span class=\"tw-inline-flex tw-items-center tw-justify-center tw-px-2.5 tw-py-0.5 tw-rounded-full tw-text-xs tw-font-medium tw-text-center\"\n [ngClass]=\"getActiveStatusBadgeClass(row)\">\n <cide-ele-icon size=\"2xs\" class=\"tw-mr-1\">\n {{ row.acayr_isactive ? 'check_circle' : 'cancel' }}\n </cide-ele-icon>\n {{ row.acayr_isactive ? 'Active' : 'Inactive' }}\n </span>\n \n <!-- Locked Status Badge (Additional info) -->\n @if (row.acayr_islocked) {\n <span\n class=\"tw-inline-flex tw-items-center tw-justify-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-red-100 tw-text-red-800 tw-text-center\">\n <cide-ele-icon size=\"2xs\" class=\"tw-mr-1\">lock</cide-ele-icon>\n Locked\n </span>\n }\n </div>\n</ng-template>\n\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\" let-value=\"value\">\n <cide-ele-dropdown \n [items]=\"getActionDropdownItems(row)\"\n [config]=\"{ triggerIcon: 'more_vert', triggerSize: 'sm' }\"\n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n</ng-template>", styles: [":host{height:100%;display:flex;flex-direction:column}.academic-year-listing-container{height:100%;display:flex;flex-direction:column;overflow:hidden}cide-ele-data-grid{flex:1;min-height:0;display:flex;flex-direction:column}\n"] }]
|
|
2057
|
+
}], propDecorators: { academicYearDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['academicYearDetailsRendererTemplate', { isSignal: true }] }], dateRangeRendererTemplate: [{ type: i0.ViewChild, args: ['dateRangeRendererTemplate', { isSignal: true }] }], statusRendererTemplate: [{ type: i0.ViewChild, args: ['statusRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
1837
2058
|
|
|
1838
2059
|
var academicYearList_component = /*#__PURE__*/Object.freeze({
|
|
1839
2060
|
__proto__: null,
|
|
@@ -1936,10 +2157,10 @@ class CideLytClassProgramBranchService {
|
|
|
1936
2157
|
]);
|
|
1937
2158
|
return this.http.put(url, {});
|
|
1938
2159
|
}
|
|
1939
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1940
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
2160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytClassProgramBranchService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2161
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytClassProgramBranchService, providedIn: 'root' });
|
|
1941
2162
|
}
|
|
1942
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytClassProgramBranchService, decorators: [{
|
|
1943
2164
|
type: Injectable,
|
|
1944
2165
|
args: [{
|
|
1945
2166
|
providedIn: 'root'
|
|
@@ -2024,10 +2245,10 @@ class CideLytProgramClassService {
|
|
|
2024
2245
|
]);
|
|
2025
2246
|
return this.http.put(url, {});
|
|
2026
2247
|
}
|
|
2027
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2028
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
2248
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytProgramClassService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2249
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytProgramClassService, providedIn: 'root' });
|
|
2029
2250
|
}
|
|
2030
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2251
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytProgramClassService, decorators: [{
|
|
2031
2252
|
type: Injectable,
|
|
2032
2253
|
args: [{
|
|
2033
2254
|
providedIn: 'root'
|
|
@@ -2766,10 +2987,10 @@ class CideLytClassProgramBranchListComponent {
|
|
|
2766
2987
|
}
|
|
2767
2988
|
});
|
|
2768
2989
|
}
|
|
2769
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
2770
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.
|
|
2990
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytClassProgramBranchListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2991
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.15", type: CideLytClassProgramBranchListComponent, isStandalone: true, selector: "cide-academics-class-program-branch-list", viewQueries: [{ propertyName: "dragHandleRendererTemplate", first: true, predicate: ["dragHandleRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "classProgramRendererTemplate", first: true, predicate: ["classProgramRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Class Program Branch List Component -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'class_program_branch' }\"\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)=\"onCreateBranch($event)\">\n Create Branch\n </button>\n </div>\n\n <!-- Main Content -->\n <div class=\"tw-flex tw-flex-col tw-w-full tw-h-full tw-overflow-hidden\">\n <!-- Filter Section -->\n <div class=\"tw-flex-shrink-0 tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div class=\"tw-flex tw-items-center tw-gap-4\">\n <div class=\"tw-w-64\">\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Class Program</label>\n <cide-ele-select\n [options]=\"programClasses()\"\n [ngModel]=\"selectedProgramClassId() || ''\"\n (ngModelChange)=\"onProgramClassChange($event)\"\n placeholder=\"Select Class Program (Optional)\"\n valueKey=\"_id\"\n labelKey=\"acacpm_alise_title\">\n </cide-ele-select>\n </div>\n </div>\n </div>\n\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 #dragHandleRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-justify-center tw-cursor-move drag-handle\" title=\"Drag to reorder\">\n <cide-ele-icon name=\"drag_indicator\" class=\"tw-w-4 tw-h-4 tw-text-gray-400 hover:tw-text-gray-600\"></cide-ele-icon>\n </div>\n</ng-template>\n\n\n<ng-template #classProgramRendererTemplate let-row=\"row\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n {{ row.acabrn_class_program_id_acacpm?.acacpm_alise_title || 'N/A' }}\n </div>\n</ng-template>\n\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\">\n <div class=\"tw-relative tw-inline-block\">\n <cide-ele-dropdown \n [items]=\"getBranchActionDropdownItems(row)\" \n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </div>\n</ng-template>\n\n", styles: [":host{height:100%;display:flex;flex-direction:column}cide-ele-data-grid{flex:1;min-height:0;display:flex;flex-direction:column}.drag-handle{cursor:move}.drag-handle:hover{background-color:#0000000d;border-radius:4px}.tw-table tbody tr{cursor:pointer}.tw-table tbody tr:hover{background-color:#00000005}.tw-table tbody tr.selected{background-color:#3b82f61a}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
2771
2992
|
}
|
|
2772
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
2993
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytClassProgramBranchListComponent, decorators: [{
|
|
2773
2994
|
type: Component,
|
|
2774
2995
|
args: [{ selector: 'cide-academics-class-program-branch-list', standalone: true, imports: [
|
|
2775
2996
|
CommonModule,
|
|
@@ -2781,7 +3002,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
2781
3002
|
CideSelectComponent,
|
|
2782
3003
|
CideLytSharedWrapperComponent
|
|
2783
3004
|
], template: "<!-- Class Program Branch List Component -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'class_program_branch' }\"\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)=\"onCreateBranch($event)\">\n Create Branch\n </button>\n </div>\n\n <!-- Main Content -->\n <div class=\"tw-flex tw-flex-col tw-w-full tw-h-full tw-overflow-hidden\">\n <!-- Filter Section -->\n <div class=\"tw-flex-shrink-0 tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div class=\"tw-flex tw-items-center tw-gap-4\">\n <div class=\"tw-w-64\">\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Class Program</label>\n <cide-ele-select\n [options]=\"programClasses()\"\n [ngModel]=\"selectedProgramClassId() || ''\"\n (ngModelChange)=\"onProgramClassChange($event)\"\n placeholder=\"Select Class Program (Optional)\"\n valueKey=\"_id\"\n labelKey=\"acacpm_alise_title\">\n </cide-ele-select>\n </div>\n </div>\n </div>\n\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 #dragHandleRendererTemplate let-row=\"row\">\n <div class=\"tw-flex tw-justify-center tw-cursor-move drag-handle\" title=\"Drag to reorder\">\n <cide-ele-icon name=\"drag_indicator\" class=\"tw-w-4 tw-h-4 tw-text-gray-400 hover:tw-text-gray-600\"></cide-ele-icon>\n </div>\n</ng-template>\n\n\n<ng-template #classProgramRendererTemplate let-row=\"row\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n {{ row.acabrn_class_program_id_acacpm?.acacpm_alise_title || 'N/A' }}\n </div>\n</ng-template>\n\n<ng-template #actionsDropdownRendererTemplate let-row=\"row\">\n <div class=\"tw-relative tw-inline-block\">\n <cide-ele-dropdown \n [items]=\"getBranchActionDropdownItems(row)\" \n (itemClick)=\"onDropdownItemClick($event, row)\">\n </cide-ele-dropdown>\n </div>\n</ng-template>\n\n", styles: [":host{height:100%;display:flex;flex-direction:column}cide-ele-data-grid{flex:1;min-height:0;display:flex;flex-direction:column}.drag-handle{cursor:move}.drag-handle:hover{background-color:#0000000d;border-radius:4px}.tw-table tbody tr{cursor:pointer}.tw-table tbody tr:hover{background-color:#00000005}.tw-table tbody tr.selected{background-color:#3b82f61a}\n"] }]
|
|
2784
|
-
}] });
|
|
3005
|
+
}], propDecorators: { dragHandleRendererTemplate: [{ type: i0.ViewChild, args: ['dragHandleRendererTemplate', { isSignal: true }] }], classProgramRendererTemplate: [{ type: i0.ViewChild, args: ['classProgramRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }] } });
|
|
2785
3006
|
|
|
2786
3007
|
var classProgramBranchList_component = /*#__PURE__*/Object.freeze({
|
|
2787
3008
|
__proto__: null,
|
|
@@ -3404,10 +3625,10 @@ class CideLytClassProgramBranchFormComponent {
|
|
|
3404
3625
|
}
|
|
3405
3626
|
this.breadcrumbData.set(additionalItems);
|
|
3406
3627
|
}
|
|
3407
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3408
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
3628
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytClassProgramBranchFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3629
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideLytClassProgramBranchFormComponent, isStandalone: true, selector: "cide-academics-class-program-branch-form", ngImport: i0, template: "<!-- \n CLASS PROGRAM BRANCH FORM COMPONENT\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'class_program_branch' }\"\n [breadcrumb_data]=\"breadcrumbData()\">\n <div class=\"tw-w-full tw-h-full\">\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\" [formGroup]=\"branchForm\"\n [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\n\n <!-- Form Content -->\n <div class=\"tw-table-row\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6\">\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n\n <!-- Error Message -->\n @if (error()) {\n <div class=\"tw-mb-6 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-md\">\n <div class=\"tw-flex tw-items-start\">\n <cide-ele-icon name=\"error\"\n class=\"tw-text-red-400 tw-w-5 tw-h-5 tw-mt-0.5 tw-flex-shrink-0\"></cide-ele-icon>\n <div class=\"tw-ml-3\">\n <h3 class=\"tw-text-sm tw-font-medium tw-text-red-800 tw-m-0\">Error</h3>\n <p class=\"tw-text-sm tw-text-red-700 tw-mt-1 tw-m-0\">{{ error() }}</p>\n </div>\n </div>\n </div>\n }\n\n <!-- Basic Branch Information -->\n <div class=\"tw-space-y-6\">\n <!-- Class Program Selection -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-1 tw-gap-6\">\n <div class=\"tw-space-y-2\">\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Class Program</label>\n <cide-ele-select formControlName=\"acabrn_class_program_id_acacpm\" placeholder=\"Select class program\"\n [disabled]=\"isViewMode() || isEditMode()\" valueKey=\"_id\" labelKey=\"acacpm_alise_title\" [options]=\"programClasses()\">\n </cide-ele-select>\n <p class=\"tw-text-xs tw-text-gray-500 tw-mt-1\">\n <cide-ele-icon name=\"info\" class=\"tw-w-4 tw-h-4 tw-mr-1\"></cide-ele-icon>\n Sequence will be automatically assigned based on the order in the listing\n </p>\n </div>\n </div>\n\n <!-- Standard Branch Name (SYGMS) -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-1 tw-gap-6\">\n <div class=\"tw-space-y-2\">\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Standard Branch Name</label>\n <cide-ele-select formControlName=\"acabrn_branch_id_sygms\" placeholder=\"Select standard branch name\"\n [disabled]=\"isViewMode()\" valueKey=\"_id\" labelKey=\"sygms_title\" [options]=\"branchMasters()\">\n </cide-ele-select>\n <p class=\"tw-text-xs tw-text-gray-500 tw-mt-1\">\n <cide-ele-icon name=\"info\" class=\"tw-w-4 tw-h-4 tw-mr-1\"></cide-ele-icon>\n Selecting a standard branch will auto-populate the branch name and code\n </p>\n </div>\n </div>\n\n <!-- Branch Name and Code -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <div>\n <cide-ele-input label=\"Branch Name\" formControlName=\"acabrn_name\"\n placeholder=\"e.g., Computer Science Branch\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n\n <div>\n <cide-ele-input label=\"Branch Code\" formControlName=\"acabrn_code\" placeholder=\"e.g., CS\" size=\"md\"\n leadingIcon=\"code\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n </div>\n </div>\n\n <!-- Status and Lock Options -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200 tw-cursor-pointer hover:tw-bg-gray-100 tw-transition-colors tw-duration-200\"\n [class.tw-cursor-not-allowed]=\"isViewMode()\" [class.tw-opacity-60]=\"isViewMode()\"\n (click)=\"onActiveCardClick()\">\n <cide-ele-input formControlName=\"acabrn_isactive\" type=\"checkbox\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this branch</span>\n </div>\n </div>\n\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200 tw-cursor-pointer hover:tw-bg-gray-100 tw-transition-colors tw-duration-200\"\n [class.tw-cursor-not-allowed]=\"isViewMode()\" [class.tw-opacity-60]=\"isViewMode()\"\n (click)=\"onLockedCardClick()\">\n <cide-ele-input formControlName=\"acabrn_islocked\" type=\"checkbox\" size=\"md\" [disabled]=\"isViewMode()\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-2 tw-bg-gray-50 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"onCancel()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n {{ isViewMode() ? 'Close' : 'Cancel' }}\n </button>\n\n @if (!isViewMode()) {\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || branchForm.invalid\"\n [loading]=\"loading()\" leftIcon=\"save\">\n {{ submitButtonText }}\n </button>\n }\n </div>\n </div>\n </div>\n </form>\n </div>\n</cide-lyt-shared-wrapper>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "step", "size"], outputs: ["ngModelChange"] }, { 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: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
3409
3630
|
}
|
|
3410
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytClassProgramBranchFormComponent, decorators: [{
|
|
3411
3632
|
type: Component,
|
|
3412
3633
|
args: [{ selector: 'cide-academics-class-program-branch-form', standalone: true, imports: [
|
|
3413
3634
|
CommonModule,
|
|
@@ -3523,10 +3744,10 @@ class CideLytClassProgramTermService {
|
|
|
3523
3744
|
]);
|
|
3524
3745
|
return this.http.put(url, {});
|
|
3525
3746
|
}
|
|
3526
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3527
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
3747
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytClassProgramTermService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3748
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytClassProgramTermService, providedIn: 'root' });
|
|
3528
3749
|
}
|
|
3529
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3750
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytClassProgramTermService, decorators: [{
|
|
3530
3751
|
type: Injectable,
|
|
3531
3752
|
args: [{
|
|
3532
3753
|
providedIn: 'root'
|
|
@@ -3627,10 +3848,10 @@ class CideLytProgramTermSectionService {
|
|
|
3627
3848
|
]);
|
|
3628
3849
|
return this.http.put(url, {});
|
|
3629
3850
|
}
|
|
3630
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
3631
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
3851
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytProgramTermSectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3852
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytProgramTermSectionService, providedIn: 'root' });
|
|
3632
3853
|
}
|
|
3633
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
3854
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytProgramTermSectionService, decorators: [{
|
|
3634
3855
|
type: Injectable,
|
|
3635
3856
|
args: [{
|
|
3636
3857
|
providedIn: 'root'
|
|
@@ -3684,19 +3905,26 @@ class ProgramTermSectionCreateComponent {
|
|
|
3684
3905
|
return config && typeof config === 'object' && 'branchType' in config && config?.branchType === true;
|
|
3685
3906
|
}, ...(ngDevMode ? [{ debugName: "showBranchDropdown" }] : []));
|
|
3686
3907
|
// Computed signal to check if term dropdown should be shown
|
|
3687
|
-
//
|
|
3908
|
+
// Always show in create mode, but hide in edit/view mode if termType=true, termProgramLevelOneConnected=true, termLevelUpTo=1, and branchType=false
|
|
3688
3909
|
showTermDropdown = computed(() => {
|
|
3910
|
+
// Always show in create mode
|
|
3911
|
+
if (!this.isEditMode() && !this.isViewMode()) {
|
|
3912
|
+
return true;
|
|
3913
|
+
}
|
|
3914
|
+
// In edit/view mode, check configuration
|
|
3689
3915
|
const selectedProgram = this.selectedProgramClass();
|
|
3690
3916
|
if (!selectedProgram)
|
|
3691
3917
|
return true; // Show by default if no program selected
|
|
3692
3918
|
const config = selectedProgram?.acacpm_class_program_id_sygms?.sygms_configuration;
|
|
3693
3919
|
if (!config || typeof config !== 'object')
|
|
3694
3920
|
return true;
|
|
3695
|
-
//
|
|
3921
|
+
// Hide dropdown in edit/view mode if:
|
|
3922
|
+
// termType=true AND termProgramLevelOneConnected=true AND termLevelUpTo=1 AND branchType=false
|
|
3696
3923
|
if (config.termType === true &&
|
|
3697
3924
|
config.termProgramLevelOneConnected === true &&
|
|
3698
3925
|
config.termLevelUpTo !== undefined &&
|
|
3699
|
-
config.termLevelUpTo
|
|
3926
|
+
config.termLevelUpTo === 1 &&
|
|
3927
|
+
config.branchType === false) {
|
|
3700
3928
|
return false;
|
|
3701
3929
|
}
|
|
3702
3930
|
return true; // Show dropdown by default
|
|
@@ -3712,17 +3940,20 @@ class ProgramTermSectionCreateComponent {
|
|
|
3712
3940
|
constructor() {
|
|
3713
3941
|
this.programTermSectionForm = this.fb.group({
|
|
3714
3942
|
// Basic Program Term Section Information
|
|
3715
|
-
acapts_code: [''
|
|
3716
|
-
acapts_name: [''
|
|
3943
|
+
acapts_code: [''],
|
|
3944
|
+
acapts_name: [''],
|
|
3717
3945
|
acapts_description: [''],
|
|
3718
|
-
acapts_class_program_id_acacpm: [''
|
|
3946
|
+
acapts_class_program_id_acacpm: [''],
|
|
3719
3947
|
acapts_class_program_branch_id_acabrn: [''],
|
|
3720
|
-
acapts_parent_class_prog_term_acapt: [''
|
|
3948
|
+
acapts_parent_class_prog_term_acapt: [''],
|
|
3721
3949
|
acapts_isactive: [true],
|
|
3722
3950
|
acapts_iscurrent: [false],
|
|
3723
3951
|
acapts_islocked: [false]
|
|
3724
3952
|
});
|
|
3725
3953
|
}
|
|
3954
|
+
// Rights computed signals
|
|
3955
|
+
canCreate = computed(() => this.rightsService.hasRight('CREATE'), ...(ngDevMode ? [{ debugName: "canCreate" }] : []));
|
|
3956
|
+
canEdit = computed(() => this.rightsService.hasRight('EDIT'), ...(ngDevMode ? [{ debugName: "canEdit" }] : []));
|
|
3726
3957
|
ngOnInit() {
|
|
3727
3958
|
// Initialize rights for program term section management
|
|
3728
3959
|
this.rightsService.initializeRights('program_term_section');
|
|
@@ -4207,7 +4438,8 @@ class ProgramTermSectionCreateComponent {
|
|
|
4207
4438
|
// Use the same service and payload pattern that works in the list component
|
|
4208
4439
|
const payload = {
|
|
4209
4440
|
pagination: false,
|
|
4210
|
-
acacpm_isactive: true
|
|
4441
|
+
acacpm_isactive: true,
|
|
4442
|
+
acacpm_entity_id_syen: this.appState.getActiveEntityId()
|
|
4211
4443
|
};
|
|
4212
4444
|
console.log('📚 Loading program classes with payload:', payload);
|
|
4213
4445
|
this.classProgramMasterService.getClassProgramMasterList(payload)
|
|
@@ -4457,20 +4689,75 @@ class ProgramTermSectionCreateComponent {
|
|
|
4457
4689
|
this.activeTab.set(tab.id);
|
|
4458
4690
|
}
|
|
4459
4691
|
onSubmit() {
|
|
4692
|
+
// Error logging before submit
|
|
4693
|
+
const errorLogData = {
|
|
4694
|
+
timestamp: new Date().toISOString(),
|
|
4695
|
+
mode: this.isEditMode() ? 'EDIT' : this.isViewMode() ? 'VIEW' : 'CREATE',
|
|
4696
|
+
formState: {
|
|
4697
|
+
valid: this.programTermSectionForm.valid,
|
|
4698
|
+
invalid: this.programTermSectionForm.invalid,
|
|
4699
|
+
errors: {},
|
|
4700
|
+
touched: this.programTermSectionForm.touched,
|
|
4701
|
+
dirty: this.programTermSectionForm.dirty
|
|
4702
|
+
},
|
|
4703
|
+
formValues: this.programTermSectionForm.value,
|
|
4704
|
+
validationErrors: {},
|
|
4705
|
+
userRights: {
|
|
4706
|
+
canCreate: this.rightsService.hasRight('CREATE'),
|
|
4707
|
+
canEdit: this.rightsService.hasRight('EDIT'),
|
|
4708
|
+
requiredRight: this.isEditMode() ? 'EDIT' : 'CREATE',
|
|
4709
|
+
hasRequiredRight: false
|
|
4710
|
+
},
|
|
4711
|
+
componentState: {
|
|
4712
|
+
loading: this.loading(),
|
|
4713
|
+
programTermSectionId: this.programTermSectionId(),
|
|
4714
|
+
selectedProgramClass: this.selectedProgramClass()?._id || null,
|
|
4715
|
+
hasParentTermInEditMode: this.hasParentTermInEditMode()
|
|
4716
|
+
}
|
|
4717
|
+
};
|
|
4718
|
+
// Collect form validation errors
|
|
4719
|
+
Object.keys(this.programTermSectionForm.controls).forEach(key => {
|
|
4720
|
+
const control = this.programTermSectionForm.get(key);
|
|
4721
|
+
if (control && control.errors) {
|
|
4722
|
+
errorLogData.validationErrors[key] = control.errors;
|
|
4723
|
+
}
|
|
4724
|
+
if (control) {
|
|
4725
|
+
errorLogData.formState.errors[key] = {
|
|
4726
|
+
valid: control.valid,
|
|
4727
|
+
invalid: control.invalid,
|
|
4728
|
+
errors: control.errors,
|
|
4729
|
+
touched: control.touched,
|
|
4730
|
+
dirty: control.dirty,
|
|
4731
|
+
value: control.value
|
|
4732
|
+
};
|
|
4733
|
+
}
|
|
4734
|
+
});
|
|
4735
|
+
// Check user rights
|
|
4460
4736
|
const requiredRight = this.isEditMode() ? 'EDIT' : 'CREATE';
|
|
4461
|
-
|
|
4737
|
+
errorLogData.userRights.hasRequiredRight = this.rightsService.hasRight(requiredRight);
|
|
4738
|
+
// Log errors if form is invalid or user lacks rights
|
|
4739
|
+
if (!errorLogData.userRights.hasRequiredRight) {
|
|
4740
|
+
console.error('🚫 ERROR: User lacks required rights for program term section submission', errorLogData);
|
|
4462
4741
|
this.notificationService.error(`You do not have permission to ${this.isEditMode() ? 'edit' : 'create'} program term sections`);
|
|
4463
4742
|
return;
|
|
4464
4743
|
}
|
|
4465
4744
|
if (this.isViewMode()) {
|
|
4745
|
+
console.log('ℹ️ INFO: View mode - navigating away from form', errorLogData);
|
|
4466
4746
|
this.router.navigate(['/control-panel/class-program-term']);
|
|
4467
4747
|
return;
|
|
4468
4748
|
}
|
|
4469
4749
|
if (this.programTermSectionForm.invalid) {
|
|
4750
|
+
console.error('❌ ERROR: Form validation failed before program term section submission', errorLogData);
|
|
4470
4751
|
this.notificationService.error('Please fill in all required fields correctly.');
|
|
4471
4752
|
this.markFormGroupTouched();
|
|
4472
4753
|
return;
|
|
4473
4754
|
}
|
|
4755
|
+
// Log successful validation before submission
|
|
4756
|
+
console.log('✅ INFO: Form validation passed - proceeding with program term section submission', {
|
|
4757
|
+
timestamp: errorLogData.timestamp,
|
|
4758
|
+
mode: errorLogData.mode,
|
|
4759
|
+
formValues: errorLogData.formValues
|
|
4760
|
+
});
|
|
4474
4761
|
this.loading.set(true);
|
|
4475
4762
|
this.error.set(null);
|
|
4476
4763
|
const formData = this.programTermSectionForm.value;
|
|
@@ -4600,10 +4887,10 @@ class ProgramTermSectionCreateComponent {
|
|
|
4600
4887
|
this.resetForm();
|
|
4601
4888
|
console.log('🧹 ProgramTermSectionCreateComponent: Component state cleaned up');
|
|
4602
4889
|
}
|
|
4603
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
4604
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: ProgramTermSectionCreateComponent, isStandalone: true, selector: "cide-academics-program-term-section-create", ngImport: i0, template: "<!-- \n PROGRAM TERM SECTION MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_term_section' }\"\n [breadcrumb_data]=\"breadcrumbData()\">\n\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent tw-max-w-full tw-overflow-hidden\"\n [formGroup]=\"programTermSectionForm\" [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\n\n <!-- Tab Navigation -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-max-w-full tw-px-2 tw-py-0 tw-overflow-x-hidden\">\n <div class=\"tw-w-full tw-max-w-full tw-overflow-x-hidden\">\n <cide-ele-tab [tabs]=\"programTermSectionTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n </div>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6 tw-overflow-y-auto tw-h-full\">\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- Basic Program Term Section Information -->\n <div class=\"tw-space-y-6\">\n <!-- Program Class, Specialization, and Term at the top -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\"\n [class.md:tw-grid-cols-2]=\"(!showBranchDropdown() && (!isEditMode() || (isEditMode() && hasParentTermInEditMode()))) || (isEditMode() && !hasParentTermInEditMode())\"\n [class.md:tw-grid-cols-3]=\"showBranchDropdown() && (!isEditMode() || (isEditMode() && hasParentTermInEditMode()))\">\n <cide-ele-select label=\"Program Class\" formControlName=\"acapts_class_program_id_acacpm\"\n placeholder=\"Select program class\" [options]=\"programClassOptions()\" [loading]=\"programClassLoading()\"\n [searchable]=\"true\" [disabled]=\"isViewMode() || isEditMode()\" size=\"md\">\n </cide-ele-select>\n\n @if (showBranchDropdown()) {\n <cide-ele-select label=\"Specialization\" formControlName=\"acapts_class_program_branch_id_acabrn\"\n placeholder=\"Select specialization\" [options]=\"classProgramBranchOptions()\"\n [loading]=\"classProgramBranchLoading()\" [searchable]=\"true\" [disabled]=\"isViewMode() || isEditMode()\"\n size=\"md\">\n </cide-ele-select>\n }\n\n @if ((!isEditMode() || (isEditMode() && hasParentTermInEditMode())) && showTermDropdown()) {\n <cide-ele-select label=\"Class Program Term\" formControlName=\"acapts_parent_class_prog_term_acapt\"\n placeholder=\"Select class program term\" [options]=\"classProgramTermOptions()\"\n [loading]=\"classProgramTermLoading()\" [searchable]=\"true\" [disabled]=\"isViewMode() || isEditMode()\"\n valueKey=\"_id\" labelKey=\"acapt_name\"\n [treeView]=\"{ enabled: true, primaryKey: '_id', foreignKey: 'acapt_parent_class_prog_term_acapt' }\"\n size=\"md\">\n </cide-ele-select>\n }\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Section Code\" formControlName=\"acapts_code\" placeholder=\"e.g., SEC-A, SEC-B\"\n size=\"md\" leadingIcon=\"code\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Section Name\" formControlName=\"acapts_name\"\n placeholder=\"e.g., Section A, Section B\" size=\"md\" leadingIcon=\"group\">\n </cide-ele-input>\n </div>\n\n <div>\n <cide-ele-textarea label=\"Description\" formControlName=\"acapts_description\"\n placeholder=\"Enter detailed description of the section...\" rows=\"3\" size=\"md\">\n </cide-ele-textarea>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\">\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_isactive\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this section</span>\n </div>\n </div>\n\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_iscurrent\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current section</span>\n </div>\n </div>\n\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_islocked\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('configuration') {\n <!-- Section Configuration -->\n <div\n class=\"tw-bg-gradient-to-r tw-from-teal-50 tw-to-cyan-50 tw-border tw-border-teal-200 tw-rounded-xl tw-p-6\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-bg-teal-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-6 tw-h-6\">tune</cide-ele-icon>\n </div>\n <div>\n <h6 class=\"tw-text-lg tw-font-semibold tw-text-teal-900 tw-m-0\">Section Configuration</h6>\n <p class=\"tw-text-sm tw-text-teal-600 tw-m-0\">Configure section-specific settings and parameters</p>\n </div>\n </div>\n </div>\n\n <div class=\"tw-space-y-4\">\n <div class=\"tw-bg-white tw-rounded-lg tw-border tw-border-gray-200 tw-p-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-mb-3\">Section Settings</h6>\n <div class=\"tw-space-y-3\">\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">people</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Student Capacity</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Configure maximum number of students for this\n section</p>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Schedule Settings</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Configure class timings and schedule preferences</p>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">room</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Room Assignment</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Assign specific rooms or classroom preferences</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n }\n </div>\n\n <!-- Error Display -->\n @if (error()) {\n <div class=\"tw-mt-6 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon variant=\"red\" size=\"sm\">error</cide-ele-icon>\n <span class=\"tw-text-sm tw-font-medium tw-text-red-800\">{{ error() }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-2 tw-bg-gray-50 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-flex-col tw-gap-3\">\n <!-- Form Validation Errors -->\n <div class=\"tw-w-full\">\n <cide-form-field-error [formGroup]=\"programTermSectionForm\"></cide-form-field-error>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\n @if (!isEditMode()) {\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n }\n\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n Cancel\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\"\n [disabled]=\"loading() || programTermSectionForm.invalid\" [loading]=\"loading()\" leftIcon=\"save\">\n {{ isEditMode() ? 'Update Program Term Section' : 'Create Program Term Section' }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n</cide-lyt-shared-wrapper>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "step", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideTextareaComponent, selector: "cide-ele-textarea", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "minlength", "maxlength", "rows", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput"], outputs: ["ngModelChange"] }, { 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: CideEleTabComponent, selector: "cide-ele-tab", inputs: ["tabs", "activeTabId", "size", "variant", "fullWidth", "disabled"], outputs: ["tabChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
4890
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ProgramTermSectionCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4891
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: ProgramTermSectionCreateComponent, isStandalone: true, selector: "cide-academics-program-term-section-create", ngImport: i0, template: "<!-- \n PROGRAM TERM SECTION MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_term_section' }\"\n [breadcrumb_data]=\"breadcrumbData()\">\n\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent tw-max-w-full tw-overflow-hidden\"\n [formGroup]=\"programTermSectionForm\" [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\n\n <!-- Tab Navigation -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-max-w-full tw-px-2 tw-py-0 tw-overflow-x-hidden\">\n <div class=\"tw-w-full tw-max-w-full tw-overflow-x-hidden\">\n <cide-ele-tab [tabs]=\"programTermSectionTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n </div>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6 tw-overflow-y-auto tw-h-full\">\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- Basic Program Term Section Information -->\n <div class=\"tw-space-y-6\">\n <!-- Program Class, Specialization, and Term at the top -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\"\n [class.md:tw-grid-cols-2]=\"(!showBranchDropdown() && (!isEditMode() || (isEditMode() && hasParentTermInEditMode()))) || (isEditMode() && !hasParentTermInEditMode())\"\n [class.md:tw-grid-cols-3]=\"showBranchDropdown() && (!isEditMode() || (isEditMode() && hasParentTermInEditMode()))\">\n <cide-ele-select label=\"Program Class\" formControlName=\"acapts_class_program_id_acacpm\"\n placeholder=\"Select program class\" [options]=\"programClassOptions()\" [loading]=\"programClassLoading()\"\n [searchable]=\"true\" [disabled]=\"isViewMode() || isEditMode()\" size=\"md\">\n </cide-ele-select>\n\n @if (showBranchDropdown()) {\n <cide-ele-select label=\"Specialization\" formControlName=\"acapts_class_program_branch_id_acabrn\"\n placeholder=\"Select specialization\" [options]=\"classProgramBranchOptions()\"\n [loading]=\"classProgramBranchLoading()\" [searchable]=\"true\" [disabled]=\"isViewMode() || isEditMode()\"\n size=\"md\">\n </cide-ele-select>\n }\n\n @if ((!isEditMode() || (isEditMode() && hasParentTermInEditMode())) && showTermDropdown()) {\n <cide-ele-select label=\"Class Program Term\" formControlName=\"acapts_parent_class_prog_term_acapt\"\n placeholder=\"Select class program term\" [options]=\"classProgramTermOptions()\"\n [loading]=\"classProgramTermLoading()\" [searchable]=\"true\" [disabled]=\"isViewMode() || (isEditMode() && !hasParentTermInEditMode())\"\n valueKey=\"_id\" labelKey=\"acapt_name\"\n [treeView]=\"{ enabled: true, primaryKey: '_id', foreignKey: 'acapt_parent_class_prog_term_acapt' }\"\n size=\"md\">\n </cide-ele-select>\n }\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Section Code\" formControlName=\"acapts_code\" placeholder=\"e.g., SEC-A, SEC-B\"\n size=\"md\" leadingIcon=\"code\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Section Name\" formControlName=\"acapts_name\"\n placeholder=\"e.g., Section A, Section B\" size=\"md\" leadingIcon=\"group\">\n </cide-ele-input>\n </div>\n\n <div>\n <cide-ele-textarea label=\"Description\" formControlName=\"acapts_description\"\n placeholder=\"Enter detailed description of the section...\" rows=\"3\" size=\"md\">\n </cide-ele-textarea>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\">\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_isactive\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this section</span>\n </div>\n </div>\n\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_iscurrent\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current section</span>\n </div>\n </div>\n\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_islocked\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('configuration') {\n <!-- Section Configuration -->\n <div\n class=\"tw-bg-gradient-to-r tw-from-teal-50 tw-to-cyan-50 tw-border tw-border-teal-200 tw-rounded-xl tw-p-6\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-bg-teal-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-6 tw-h-6\">tune</cide-ele-icon>\n </div>\n <div>\n <h6 class=\"tw-text-lg tw-font-semibold tw-text-teal-900 tw-m-0\">Section Configuration</h6>\n <p class=\"tw-text-sm tw-text-teal-600 tw-m-0\">Configure section-specific settings and parameters</p>\n </div>\n </div>\n </div>\n\n <div class=\"tw-space-y-4\">\n <div class=\"tw-bg-white tw-rounded-lg tw-border tw-border-gray-200 tw-p-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-mb-3\">Section Settings</h6>\n <div class=\"tw-space-y-3\">\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">people</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Student Capacity</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Configure maximum number of students for this\n section</p>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Schedule Settings</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Configure class timings and schedule preferences</p>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">room</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Room Assignment</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Assign specific rooms or classroom preferences</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n }\n </div>\n\n <!-- Error Display -->\n @if (error()) {\n <div class=\"tw-mt-6 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon variant=\"red\" size=\"sm\">error</cide-ele-icon>\n <span class=\"tw-text-sm tw-font-medium tw-text-red-800\">{{ error() }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-2 tw-bg-gray-50 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-flex-col tw-gap-3\">\n <!-- Form Validation Errors -->\n <div class=\"tw-w-full\">\n <cide-form-field-error [formGroup]=\"programTermSectionForm\"></cide-form-field-error>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\n @if (!isEditMode()) {\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n }\n\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n Cancel\n </button>\n\n @if ((isEditMode() && canEdit()) || (!isEditMode() && canCreate())) {\n <button cideEleButton type=\"submit\" variant=\"primary\"\n [disabled]=\"loading() || programTermSectionForm.invalid\" [loading]=\"loading()\" leftIcon=\"save\">\n {{ isEditMode() ? 'Update Program Term Section' : 'Create Program Term Section' }}\n </button>\n }\n </div>\n </div>\n </div>\n </div>\n </form>\n</cide-lyt-shared-wrapper>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "step", "size"], outputs: ["ngModelChange"] }, { kind: "component", type: CideTextareaComponent, selector: "cide-ele-textarea", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "minlength", "maxlength", "rows", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput"], outputs: ["ngModelChange"] }, { 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: CideEleTabComponent, selector: "cide-ele-tab", inputs: ["tabs", "activeTabId", "size", "variant", "fullWidth", "disabled"], outputs: ["tabChange"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }, { kind: "component", type: CideFormFieldErrorComponent, selector: "cide-form-field-error", inputs: ["control", "formGroup", "fieldName", "customMessages"] }] });
|
|
4605
4892
|
}
|
|
4606
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
4893
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ProgramTermSectionCreateComponent, decorators: [{
|
|
4607
4894
|
type: Component,
|
|
4608
4895
|
args: [{ selector: 'cide-academics-program-term-section-create', standalone: true, imports: [
|
|
4609
4896
|
CommonModule,
|
|
@@ -4616,7 +4903,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
4616
4903
|
CideSelectComponent,
|
|
4617
4904
|
CideLytSharedWrapperComponent,
|
|
4618
4905
|
CideFormFieldErrorComponent
|
|
4619
|
-
], template: "<!-- \n PROGRAM TERM SECTION MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_term_section' }\"\n [breadcrumb_data]=\"breadcrumbData()\">\n\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent tw-max-w-full tw-overflow-hidden\"\n [formGroup]=\"programTermSectionForm\" [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\n\n <!-- Tab Navigation -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-max-w-full tw-px-2 tw-py-0 tw-overflow-x-hidden\">\n <div class=\"tw-w-full tw-max-w-full tw-overflow-x-hidden\">\n <cide-ele-tab [tabs]=\"programTermSectionTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n </div>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6 tw-overflow-y-auto tw-h-full\">\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- Basic Program Term Section Information -->\n <div class=\"tw-space-y-6\">\n <!-- Program Class, Specialization, and Term at the top -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\"\n [class.md:tw-grid-cols-2]=\"(!showBranchDropdown() && (!isEditMode() || (isEditMode() && hasParentTermInEditMode()))) || (isEditMode() && !hasParentTermInEditMode())\"\n [class.md:tw-grid-cols-3]=\"showBranchDropdown() && (!isEditMode() || (isEditMode() && hasParentTermInEditMode()))\">\n <cide-ele-select label=\"Program Class\" formControlName=\"acapts_class_program_id_acacpm\"\n placeholder=\"Select program class\" [options]=\"programClassOptions()\" [loading]=\"programClassLoading()\"\n [searchable]=\"true\" [disabled]=\"isViewMode() || isEditMode()\" size=\"md\">\n </cide-ele-select>\n\n @if (showBranchDropdown()) {\n <cide-ele-select label=\"Specialization\" formControlName=\"acapts_class_program_branch_id_acabrn\"\n placeholder=\"Select specialization\" [options]=\"classProgramBranchOptions()\"\n [loading]=\"classProgramBranchLoading()\" [searchable]=\"true\" [disabled]=\"isViewMode() || isEditMode()\"\n size=\"md\">\n </cide-ele-select>\n }\n\n @if ((!isEditMode() || (isEditMode() && hasParentTermInEditMode())) && showTermDropdown()) {\n <cide-ele-select label=\"Class Program Term\" formControlName=\"acapts_parent_class_prog_term_acapt\"\n placeholder=\"Select class program term\" [options]=\"classProgramTermOptions()\"\n [loading]=\"classProgramTermLoading()\" [searchable]=\"true\" [disabled]=\"isViewMode() || isEditMode()\"\n valueKey=\"_id\" labelKey=\"acapt_name\"\n [treeView]=\"{ enabled: true, primaryKey: '_id', foreignKey: 'acapt_parent_class_prog_term_acapt' }\"\n size=\"md\">\n </cide-ele-select>\n }\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Section Code\" formControlName=\"acapts_code\" placeholder=\"e.g., SEC-A, SEC-B\"\n size=\"md\" leadingIcon=\"code\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Section Name\" formControlName=\"acapts_name\"\n placeholder=\"e.g., Section A, Section B\" size=\"md\" leadingIcon=\"group\">\n </cide-ele-input>\n </div>\n\n <div>\n <cide-ele-textarea label=\"Description\" formControlName=\"acapts_description\"\n placeholder=\"Enter detailed description of the section...\" rows=\"3\" size=\"md\">\n </cide-ele-textarea>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\">\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_isactive\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this section</span>\n </div>\n </div>\n\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_iscurrent\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current section</span>\n </div>\n </div>\n\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_islocked\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('configuration') {\n <!-- Section Configuration -->\n <div\n class=\"tw-bg-gradient-to-r tw-from-teal-50 tw-to-cyan-50 tw-border tw-border-teal-200 tw-rounded-xl tw-p-6\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-bg-teal-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-6 tw-h-6\">tune</cide-ele-icon>\n </div>\n <div>\n <h6 class=\"tw-text-lg tw-font-semibold tw-text-teal-900 tw-m-0\">Section Configuration</h6>\n <p class=\"tw-text-sm tw-text-teal-600 tw-m-0\">Configure section-specific settings and parameters</p>\n </div>\n </div>\n </div>\n\n <div class=\"tw-space-y-4\">\n <div class=\"tw-bg-white tw-rounded-lg tw-border tw-border-gray-200 tw-p-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-mb-3\">Section Settings</h6>\n <div class=\"tw-space-y-3\">\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">people</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Student Capacity</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Configure maximum number of students for this\n section</p>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Schedule Settings</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Configure class timings and schedule preferences</p>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">room</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Room Assignment</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Assign specific rooms or classroom preferences</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n }\n </div>\n\n <!-- Error Display -->\n @if (error()) {\n <div class=\"tw-mt-6 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon variant=\"red\" size=\"sm\">error</cide-ele-icon>\n <span class=\"tw-text-sm tw-font-medium tw-text-red-800\">{{ error() }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-2 tw-bg-gray-50 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-flex-col tw-gap-3\">\n <!-- Form Validation Errors -->\n <div class=\"tw-w-full\">\n <cide-form-field-error [formGroup]=\"programTermSectionForm\"></cide-form-field-error>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\n @if (!isEditMode()) {\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n }\n\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n Cancel\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\"\n [disabled]=\"loading() || programTermSectionForm.invalid\" [loading]=\"loading()\" leftIcon=\"save\">\n {{ isEditMode() ? 'Update Program Term Section' : 'Create Program Term Section' }}\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n</cide-lyt-shared-wrapper>" }]
|
|
4906
|
+
], template: "<!-- \n PROGRAM TERM SECTION MASTER FORM\n \n Enterprise-Level Styling with Tailwind CSS\n Features: Responsive grids, proper typography, enhanced user experience\n-->\n\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_term_section' }\"\n [breadcrumb_data]=\"breadcrumbData()\">\n\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent tw-max-w-full tw-overflow-hidden\"\n [formGroup]=\"programTermSectionForm\" [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\n\n <!-- Tab Navigation -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-max-w-full tw-px-2 tw-py-0 tw-overflow-x-hidden\">\n <div class=\"tw-w-full tw-max-w-full tw-overflow-x-hidden\">\n <cide-ele-tab [tabs]=\"programTermSectionTabs()\" [activeTabId]=\"activeTab()\" size=\"md\" variant=\"default\"\n (tabChange)=\"onTabChange($event)\">\n </cide-ele-tab>\n </div>\n </div>\n </div>\n\n <!-- Tab Content -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6 tw-overflow-y-auto tw-h-full\">\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\n @switch (activeTab()) {\n\n @case ('basic') {\n <!-- Basic Program Term Section Information -->\n <div class=\"tw-space-y-6\">\n <!-- Program Class, Specialization, and Term at the top -->\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\"\n [class.md:tw-grid-cols-2]=\"(!showBranchDropdown() && (!isEditMode() || (isEditMode() && hasParentTermInEditMode()))) || (isEditMode() && !hasParentTermInEditMode())\"\n [class.md:tw-grid-cols-3]=\"showBranchDropdown() && (!isEditMode() || (isEditMode() && hasParentTermInEditMode()))\">\n <cide-ele-select label=\"Program Class\" formControlName=\"acapts_class_program_id_acacpm\"\n placeholder=\"Select program class\" [options]=\"programClassOptions()\" [loading]=\"programClassLoading()\"\n [searchable]=\"true\" [disabled]=\"isViewMode() || isEditMode()\" size=\"md\">\n </cide-ele-select>\n\n @if (showBranchDropdown()) {\n <cide-ele-select label=\"Specialization\" formControlName=\"acapts_class_program_branch_id_acabrn\"\n placeholder=\"Select specialization\" [options]=\"classProgramBranchOptions()\"\n [loading]=\"classProgramBranchLoading()\" [searchable]=\"true\" [disabled]=\"isViewMode() || isEditMode()\"\n size=\"md\">\n </cide-ele-select>\n }\n\n @if ((!isEditMode() || (isEditMode() && hasParentTermInEditMode())) && showTermDropdown()) {\n <cide-ele-select label=\"Class Program Term\" formControlName=\"acapts_parent_class_prog_term_acapt\"\n placeholder=\"Select class program term\" [options]=\"classProgramTermOptions()\"\n [loading]=\"classProgramTermLoading()\" [searchable]=\"true\" [disabled]=\"isViewMode() || (isEditMode() && !hasParentTermInEditMode())\"\n valueKey=\"_id\" labelKey=\"acapt_name\"\n [treeView]=\"{ enabled: true, primaryKey: '_id', foreignKey: 'acapt_parent_class_prog_term_acapt' }\"\n size=\"md\">\n </cide-ele-select>\n }\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\n <cide-ele-input label=\"Section Code\" formControlName=\"acapts_code\" placeholder=\"e.g., SEC-A, SEC-B\"\n size=\"md\" leadingIcon=\"code\">\n </cide-ele-input>\n\n <cide-ele-input label=\"Section Name\" formControlName=\"acapts_name\"\n placeholder=\"e.g., Section A, Section B\" size=\"md\" leadingIcon=\"group\">\n </cide-ele-input>\n </div>\n\n <div>\n <cide-ele-textarea label=\"Description\" formControlName=\"acapts_description\"\n placeholder=\"Enter detailed description of the section...\" rows=\"3\" size=\"md\">\n </cide-ele-textarea>\n </div>\n\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-6\">\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_isactive\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this section</span>\n </div>\n </div>\n\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_iscurrent\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Current</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Mark as current section</span>\n </div>\n </div>\n\n <div\n class=\"tw-flex tw-items-center tw-gap-3 tw-p-4 tw-bg-gray-50 tw-rounded-lg tw-border tw-border-gray-200\">\n <cide-ele-input formControlName=\"acapts_islocked\" type=\"checkbox\" size=\"md\">\n </cide-ele-input>\n <div class=\"tw-flex tw-flex-col\">\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\n </div>\n </div>\n </div>\n </div>\n }\n\n @case ('configuration') {\n <!-- Section Configuration -->\n <div\n class=\"tw-bg-gradient-to-r tw-from-teal-50 tw-to-cyan-50 tw-border tw-border-teal-200 tw-rounded-xl tw-p-6\">\n <div class=\"tw-flex tw-items-center tw-justify-between tw-mb-6\">\n <div class=\"tw-flex tw-items-center tw-gap-3\">\n <div class=\"tw-bg-teal-100 tw-p-2 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-6 tw-h-6\">tune</cide-ele-icon>\n </div>\n <div>\n <h6 class=\"tw-text-lg tw-font-semibold tw-text-teal-900 tw-m-0\">Section Configuration</h6>\n <p class=\"tw-text-sm tw-text-teal-600 tw-m-0\">Configure section-specific settings and parameters</p>\n </div>\n </div>\n </div>\n\n <div class=\"tw-space-y-4\">\n <div class=\"tw-bg-white tw-rounded-lg tw-border tw-border-gray-200 tw-p-4\">\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-mb-3\">Section Settings</h6>\n <div class=\"tw-space-y-3\">\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">people</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Student Capacity</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Configure maximum number of students for this\n section</p>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Schedule Settings</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Configure class timings and schedule preferences</p>\n </div>\n </div>\n\n <div class=\"tw-flex tw-items-center tw-gap-3 tw-p-3 tw-bg-gray-50 tw-rounded-lg\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">room</cide-ele-icon>\n <div>\n <p class=\"tw-text-sm tw-font-medium tw-text-gray-900 tw-m-0\">Room Assignment</p>\n <p class=\"tw-text-xs tw-text-gray-600 tw-m-0\">Assign specific rooms or classroom preferences</p>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n }\n }\n </div>\n\n <!-- Error Display -->\n @if (error()) {\n <div class=\"tw-mt-6 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\n <div class=\"tw-flex tw-items-center tw-gap-2\">\n <cide-ele-icon variant=\"red\" size=\"sm\">error</cide-ele-icon>\n <span class=\"tw-text-sm tw-font-medium tw-text-red-800\">{{ error() }}</span>\n </div>\n </div>\n }\n </div>\n </div>\n\n <!-- Form Actions -->\n <div class=\"tw-table-row tw-h-0\">\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-2 tw-bg-gray-50 tw-border-t tw-border-gray-200\">\n <div class=\"tw-flex tw-flex-col tw-gap-3\">\n <!-- Form Validation Errors -->\n <div class=\"tw-w-full\">\n <cide-form-field-error [formGroup]=\"programTermSectionForm\"></cide-form-field-error>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\n @if (!isEditMode()) {\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\n [disabled]=\"loading()\">\n Reset Form\n </button>\n }\n\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\n [disabled]=\"loading()\">\n Cancel\n </button>\n\n @if ((isEditMode() && canEdit()) || (!isEditMode() && canCreate())) {\n <button cideEleButton type=\"submit\" variant=\"primary\"\n [disabled]=\"loading() || programTermSectionForm.invalid\" [loading]=\"loading()\" leftIcon=\"save\">\n {{ isEditMode() ? 'Update Program Term Section' : 'Create Program Term Section' }}\n </button>\n }\n </div>\n </div>\n </div>\n </div>\n </form>\n</cide-lyt-shared-wrapper>" }]
|
|
4620
4907
|
}], ctorParameters: () => [] });
|
|
4621
4908
|
|
|
4622
4909
|
var programTermSectionCreate_component = /*#__PURE__*/Object.freeze({
|
|
@@ -5331,7 +5618,8 @@ class ProgramTermSectionListComponent {
|
|
|
5331
5618
|
// Use simpler payload pattern that works in other components
|
|
5332
5619
|
const payload = {
|
|
5333
5620
|
pagination: false,
|
|
5334
|
-
acacpm_isactive: true
|
|
5621
|
+
acacpm_isactive: true,
|
|
5622
|
+
acacpm_entity_id_syen: this.appState.getActiveEntityId()
|
|
5335
5623
|
};
|
|
5336
5624
|
console.log('📚 Loading class program masters with payload:', payload);
|
|
5337
5625
|
this.classProgramMasterService.getClassProgramMasterList(payload)
|
|
@@ -5548,10 +5836,10 @@ class ProgramTermSectionListComponent {
|
|
|
5548
5836
|
// Could implement search functionality here if needed
|
|
5549
5837
|
}
|
|
5550
5838
|
}
|
|
5551
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
5552
|
-
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 }, { propertyName: "programClassRendererTemplate", first: true, predicate: ["programClassRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "termSpecializationRendererTemplate", first: true, predicate: ["termSpecializationRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "classProgramTermRendererTemplate", first: true, predicate: ["classProgramTermRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "parentClassProgramTermRendererTemplate", first: true, predicate: ["parentClassProgramTermRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Program Term Section Management Container -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_term_section' }\"\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)=\"createProgramTermSection()\">\n Create Program Term Section\n </button>\n </div>\n\n <!-- Main Content -->\n <div class=\"tw-flex tw-flex-col tw-w-full tw-h-full tw-overflow-hidden\">\n <!-- Filter Section -->\n <div class=\"tw-flex-shrink-0 tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-4\">\n <div>\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Class Program</label>\n <cide-ele-select\n [options]=\"classProgramMastersOptions()\"\n [ngModel]=\"selectedProgramClassId() || ''\"\n (ngModelChange)=\"onClassProgramChange($event)\"\n placeholder=\"Select Class Program\"\n valueKey=\"_id\"\n labelKey=\"displayLabel\"\n [loading]=\"classProgramMastersLoading()\"\n [searchable]=\"true\"\n (searchChange)=\"onClassProgramMasterSearch($event)\">\n </cide-ele-select>\n </div>\n \n @if (showBranchDropdown()) {\n <div>\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Specialization</label>\n <cide-ele-select\n [options]=\"classProgramBranchesOptions()\"\n [ngModel]=\"selectedBranchId() || ''\"\n (ngModelChange)=\"onBranchChange($event)\"\n placeholder=\"Select Specialization\"\n valueKey=\"_id\"\n labelKey=\"acabrn_name\"\n [loading]=\"classProgramBranchesLoading()\">\n </cide-ele-select>\n </div>\n }\n \n @if (selectedProgramClassId() && (!showBranchDropdown() || selectedBranchId()) && showTermDropdown()) {\n <div>\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Program Term (Leaf Only)</label>\n <cide-ele-select\n [options]=\"classProgramTermOptions()\"\n [ngModel]=\"selectedTermId() || ''\"\n (ngModelChange)=\"onTermChange($event)\"\n placeholder=\"Select Program Term (Leaf Only)\"\n valueKey=\"_id\"\n labelKey=\"acapt_name\"\n [loading]=\"classProgramTermsLoading()\"\n [treeView]=\"{ enabled: true, primaryKey: '_id', foreignKey: 'acapt_parent_class_prog_term_acapt' }\"\n [searchable]=\"true\">\n </cide-ele-select>\n </div>\n }\n </div>\n </div>\n\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 #programTermSectionDetailsRendererTemplate 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-teal-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">group</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?.acapts_name }}\n </h6>\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\n {{ row?.acapts_description }}\n </p>\n </div>\n </div>\n</ng-template>\n\n<ng-template #programTermSectionStatusRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n @if (row?.acapts_iscurrent) {\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\">\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">star</cide-ele-icon>\n Current\n </span>\n }\n @if (row?.acapts_islocked) {\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\">\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">lock</cide-ele-icon>\n Locked\n </span>\n }\n <span [ngClass]=\"{\n 'tw-bg-green-100 tw-text-green-800': row?.acapts_isactive,\n 'tw-bg-red-100 tw-text-red-800': !row?.acapts_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?.acapts_isactive,\n 'tw-text-red-600': !row?.acapts_isactive\n }\" class=\"tw-w-3 tw-h-3 tw-mr-1\">\n {{ row?.acapts_isactive ? 'check_circle' : 'cancel' }}\n </cide-ele-icon>\n {{ row?.acapts_isactive ? 'Active' : 'Inactive' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #actionsDropdownRendererTemplate let-value=\"value\" let-row=\"row\" 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\n<ng-template #programClassRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n {{ row?.acapts_class_program_id_acacpm?.acacpm_alise_title || row?.acapts_class_program_id_acacpm?.acacpm_name || 'N/A' }}\n </div>\n</ng-template>\n\n<ng-template #termSpecializationRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n @if (row?.acapts_parent_class_prog_term_acapt?.acapt_class_program_branch_id_acabrn) {\n {{ row?.acapts_parent_class_prog_term_acapt?.acapt_class_program_branch_id_acabrn?.acabrn_name || row?.acapts_parent_class_prog_term_acapt?.acapt_class_program_branch_id_acabrn?.acabrn_code || 'N/A' }}\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n </div>\n</ng-template>\n\n<ng-template #classProgramTermRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n {{ row?.acapts_parent_class_prog_term_acapt?.acapt_name || row?.acapts_parent_class_prog_term_acapt?.acapt_code || 'N/A' }}\n </div>\n</ng-template>\n\n<ng-template #parentClassProgramTermRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n @if (row?.acapts_parent_class_prog_term_acapt) {\n @if (row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt) {\n @if (typeof row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt === 'object') {\n {{ row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt?.acapt_name || row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt?.acapt_code || 'N/A' }}\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n </div>\n</ng-template>\n", styles: [":host{height:100%;display:flex;flex-direction:column}cide-ele-data-grid{flex:1;min-height:0;display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
5839
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ProgramTermSectionListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
5840
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", 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 }, { propertyName: "programClassRendererTemplate", first: true, predicate: ["programClassRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "termSpecializationRendererTemplate", first: true, predicate: ["termSpecializationRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "classProgramTermRendererTemplate", first: true, predicate: ["classProgramTermRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "parentClassProgramTermRendererTemplate", first: true, predicate: ["parentClassProgramTermRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Program Term Section Management Container -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_term_section' }\"\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)=\"createProgramTermSection()\">\n Create Program Term Section\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 <!-- Filter Section -->\n <div class=\"tw-flex-shrink-0 tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-4\">\n <div>\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Class Program</label>\n <cide-ele-select\n [options]=\"classProgramMastersOptions()\"\n [ngModel]=\"selectedProgramClassId() || ''\"\n (ngModelChange)=\"onClassProgramChange($event)\"\n placeholder=\"Select Class Program\"\n valueKey=\"_id\"\n labelKey=\"displayLabel\"\n [loading]=\"classProgramMastersLoading()\"\n [searchable]=\"true\"\n (searchChange)=\"onClassProgramMasterSearch($event)\">\n </cide-ele-select>\n </div>\n \n @if (showBranchDropdown()) {\n <div>\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Specialization</label>\n <cide-ele-select\n [options]=\"classProgramBranchesOptions()\"\n [ngModel]=\"selectedBranchId() || ''\"\n (ngModelChange)=\"onBranchChange($event)\"\n placeholder=\"Select Specialization\"\n valueKey=\"_id\"\n labelKey=\"acabrn_name\"\n [loading]=\"classProgramBranchesLoading()\">\n </cide-ele-select>\n </div>\n }\n \n @if (selectedProgramClassId() && (!showBranchDropdown() || selectedBranchId()) && showTermDropdown()) {\n <div>\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Program Term (Leaf Only)</label>\n <cide-ele-select\n [options]=\"classProgramTermOptions()\"\n [ngModel]=\"selectedTermId() || ''\"\n (ngModelChange)=\"onTermChange($event)\"\n placeholder=\"Select Program Term (Leaf Only)\"\n valueKey=\"_id\"\n labelKey=\"acapt_name\"\n [loading]=\"classProgramTermsLoading()\"\n [treeView]=\"{ enabled: true, primaryKey: '_id', foreignKey: 'acapt_parent_class_prog_term_acapt' }\"\n [searchable]=\"true\">\n </cide-ele-select>\n </div>\n }\n </div>\n </div>\n\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 #programTermSectionDetailsRendererTemplate 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-teal-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">group</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?.acapts_name }}\n </h6>\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\n {{ row?.acapts_description }}\n </p>\n </div>\n </div>\n</ng-template>\n\n<ng-template #programTermSectionStatusRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n @if (row?.acapts_iscurrent) {\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\">\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">star</cide-ele-icon>\n Current\n </span>\n }\n @if (row?.acapts_islocked) {\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\">\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">lock</cide-ele-icon>\n Locked\n </span>\n }\n <span [ngClass]=\"{\n 'tw-bg-green-100 tw-text-green-800': row?.acapts_isactive,\n 'tw-bg-red-100 tw-text-red-800': !row?.acapts_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?.acapts_isactive,\n 'tw-text-red-600': !row?.acapts_isactive\n }\" class=\"tw-w-3 tw-h-3 tw-mr-1\">\n {{ row?.acapts_isactive ? 'check_circle' : 'cancel' }}\n </cide-ele-icon>\n {{ row?.acapts_isactive ? 'Active' : 'Inactive' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #actionsDropdownRendererTemplate let-value=\"value\" let-row=\"row\" 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\n<ng-template #programClassRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n {{ row?.acapts_class_program_id_acacpm?.acacpm_alise_title || row?.acapts_class_program_id_acacpm?.acacpm_name || 'N/A' }}\n </div>\n</ng-template>\n\n<ng-template #termSpecializationRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n @if (row?.acapts_parent_class_prog_term_acapt?.acapt_class_program_branch_id_acabrn) {\n {{ row?.acapts_parent_class_prog_term_acapt?.acapt_class_program_branch_id_acabrn?.acabrn_name || row?.acapts_parent_class_prog_term_acapt?.acapt_class_program_branch_id_acabrn?.acabrn_code || 'N/A' }}\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n </div>\n</ng-template>\n\n<ng-template #classProgramTermRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n {{ row?.acapts_parent_class_prog_term_acapt?.acapt_name || row?.acapts_parent_class_prog_term_acapt?.acapt_code || 'N/A' }}\n </div>\n</ng-template>\n\n<ng-template #parentClassProgramTermRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n @if (row?.acapts_parent_class_prog_term_acapt) {\n @if (row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt) {\n @if (typeof row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt === 'object') {\n {{ row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt?.acapt_name || row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt?.acapt_code || 'N/A' }}\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n </div>\n</ng-template>\n", styles: [":host{height:100%;display:flex;flex-direction:column}cide-ele-data-grid{flex:1;min-height:0;display:flex;flex-direction:column}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { 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: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }] });
|
|
5553
5841
|
}
|
|
5554
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
5842
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: ProgramTermSectionListComponent, decorators: [{
|
|
5555
5843
|
type: Component,
|
|
5556
5844
|
args: [{ selector: 'cide-academics-program-term-section-list', standalone: true, imports: [
|
|
5557
5845
|
CommonModule,
|
|
@@ -5562,8 +5850,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
5562
5850
|
CideEleDropdownComponent,
|
|
5563
5851
|
CideSelectComponent,
|
|
5564
5852
|
CideLytSharedWrapperComponent
|
|
5565
|
-
], template: "<!-- Program Term Section Management Container -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_term_section' }\"\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)=\"createProgramTermSection()\">\n
|
|
5566
|
-
}] });
|
|
5853
|
+
], template: "<!-- Program Term Section Management Container -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'program_term_section' }\"\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)=\"createProgramTermSection()\">\n Create Program Term Section\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 <!-- Filter Section -->\n <div class=\"tw-flex-shrink-0 tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-3 tw-gap-4\">\n <div>\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Class Program</label>\n <cide-ele-select\n [options]=\"classProgramMastersOptions()\"\n [ngModel]=\"selectedProgramClassId() || ''\"\n (ngModelChange)=\"onClassProgramChange($event)\"\n placeholder=\"Select Class Program\"\n valueKey=\"_id\"\n labelKey=\"displayLabel\"\n [loading]=\"classProgramMastersLoading()\"\n [searchable]=\"true\"\n (searchChange)=\"onClassProgramMasterSearch($event)\">\n </cide-ele-select>\n </div>\n \n @if (showBranchDropdown()) {\n <div>\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Specialization</label>\n <cide-ele-select\n [options]=\"classProgramBranchesOptions()\"\n [ngModel]=\"selectedBranchId() || ''\"\n (ngModelChange)=\"onBranchChange($event)\"\n placeholder=\"Select Specialization\"\n valueKey=\"_id\"\n labelKey=\"acabrn_name\"\n [loading]=\"classProgramBranchesLoading()\">\n </cide-ele-select>\n </div>\n }\n \n @if (selectedProgramClassId() && (!showBranchDropdown() || selectedBranchId()) && showTermDropdown()) {\n <div>\n <label class=\"tw-block tw-text-sm tw-font-medium tw-text-gray-700 tw-mb-2\">Program Term (Leaf Only)</label>\n <cide-ele-select\n [options]=\"classProgramTermOptions()\"\n [ngModel]=\"selectedTermId() || ''\"\n (ngModelChange)=\"onTermChange($event)\"\n placeholder=\"Select Program Term (Leaf Only)\"\n valueKey=\"_id\"\n labelKey=\"acapt_name\"\n [loading]=\"classProgramTermsLoading()\"\n [treeView]=\"{ enabled: true, primaryKey: '_id', foreignKey: 'acapt_parent_class_prog_term_acapt' }\"\n [searchable]=\"true\">\n </cide-ele-select>\n </div>\n }\n </div>\n </div>\n\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 #programTermSectionDetailsRendererTemplate 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-teal-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\n <cide-ele-icon class=\"tw-text-teal-600 tw-w-5 tw-h-5\">group</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?.acapts_name }}\n </h6>\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\n {{ row?.acapts_description }}\n </p>\n </div>\n </div>\n</ng-template>\n\n<ng-template #programTermSectionStatusRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n @if (row?.acapts_iscurrent) {\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\">\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">star</cide-ele-icon>\n Current\n </span>\n }\n @if (row?.acapts_islocked) {\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\">\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">lock</cide-ele-icon>\n Locked\n </span>\n }\n <span [ngClass]=\"{\n 'tw-bg-green-100 tw-text-green-800': row?.acapts_isactive,\n 'tw-bg-red-100 tw-text-red-800': !row?.acapts_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?.acapts_isactive,\n 'tw-text-red-600': !row?.acapts_isactive\n }\" class=\"tw-w-3 tw-h-3 tw-mr-1\">\n {{ row?.acapts_isactive ? 'check_circle' : 'cancel' }}\n </cide-ele-icon>\n {{ row?.acapts_isactive ? 'Active' : 'Inactive' }}\n </span>\n </div>\n</ng-template>\n\n<ng-template #actionsDropdownRendererTemplate let-value=\"value\" let-row=\"row\" 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\n<ng-template #programClassRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n {{ row?.acapts_class_program_id_acacpm?.acacpm_alise_title || row?.acapts_class_program_id_acacpm?.acacpm_name || 'N/A' }}\n </div>\n</ng-template>\n\n<ng-template #termSpecializationRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n @if (row?.acapts_parent_class_prog_term_acapt?.acapt_class_program_branch_id_acabrn) {\n {{ row?.acapts_parent_class_prog_term_acapt?.acapt_class_program_branch_id_acabrn?.acabrn_name || row?.acapts_parent_class_prog_term_acapt?.acapt_class_program_branch_id_acabrn?.acabrn_code || 'N/A' }}\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n </div>\n</ng-template>\n\n<ng-template #classProgramTermRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n {{ row?.acapts_parent_class_prog_term_acapt?.acapt_name || row?.acapts_parent_class_prog_term_acapt?.acapt_code || 'N/A' }}\n </div>\n</ng-template>\n\n<ng-template #parentClassProgramTermRendererTemplate let-value=\"value\" let-row=\"row\" let-column=\"column\">\n <div class=\"tw-text-sm tw-text-gray-900\">\n @if (row?.acapts_parent_class_prog_term_acapt) {\n @if (row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt) {\n @if (typeof row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt === 'object') {\n {{ row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt?.acapt_name || row?.acapts_parent_class_prog_term_acapt?.acapt_parent_class_prog_term_acapt?.acapt_code || 'N/A' }}\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n } @else {\n <span class=\"tw-text-gray-400\">-</span>\n }\n </div>\n</ng-template>\n", styles: [":host{height:100%;display:flex;flex-direction:column}cide-ele-data-grid{flex:1;min-height:0;display:flex;flex-direction:column}\n"] }]
|
|
5854
|
+
}], propDecorators: { programTermSectionDetailsRendererTemplate: [{ type: i0.ViewChild, args: ['programTermSectionDetailsRendererTemplate', { isSignal: true }] }], programTermSectionStatusRendererTemplate: [{ type: i0.ViewChild, args: ['programTermSectionStatusRendererTemplate', { isSignal: true }] }], actionsDropdownRendererTemplate: [{ type: i0.ViewChild, args: ['actionsDropdownRendererTemplate', { isSignal: true }] }], programClassRendererTemplate: [{ type: i0.ViewChild, args: ['programClassRendererTemplate', { isSignal: true }] }], termSpecializationRendererTemplate: [{ type: i0.ViewChild, args: ['termSpecializationRendererTemplate', { isSignal: true }] }], classProgramTermRendererTemplate: [{ type: i0.ViewChild, args: ['classProgramTermRendererTemplate', { isSignal: true }] }], parentClassProgramTermRendererTemplate: [{ type: i0.ViewChild, args: ['parentClassProgramTermRendererTemplate', { isSignal: true }] }] } });
|
|
5567
5855
|
|
|
5568
5856
|
var programTermSectionList_component = /*#__PURE__*/Object.freeze({
|
|
5569
5857
|
__proto__: null,
|
|
@@ -6334,10 +6622,10 @@ class CideLytProgramSectionSelectorComponent {
|
|
|
6334
6622
|
}
|
|
6335
6623
|
});
|
|
6336
6624
|
}
|
|
6337
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
6338
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
6625
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytProgramSectionSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6626
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: CideLytProgramSectionSelectorComponent, isStandalone: true, selector: "cide-lyt-program-section-selector", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, classProgramControlName: { classPropertyName: "classProgramControlName", publicName: "classProgramControlName", isSignal: true, isRequired: false, transformFunction: null }, branchControlName: { classPropertyName: "branchControlName", publicName: "branchControlName", isSignal: true, isRequired: false, transformFunction: null }, termControlName: { classPropertyName: "termControlName", publicName: "termControlName", isSignal: true, isRequired: false, transformFunction: null }, sectionControlName: { classPropertyName: "sectionControlName", publicName: "sectionControlName", isSignal: true, isRequired: false, transformFunction: null }, academicYearId: { classPropertyName: "academicYearId", publicName: "academicYearId", isSignal: true, isRequired: false, transformFunction: null }, entityId: { classPropertyName: "entityId", publicName: "entityId", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, showLabels: { classPropertyName: "showLabels", publicName: "showLabels", isSignal: true, isRequired: false, transformFunction: null }, gridCols: { classPropertyName: "gridCols", publicName: "gridCols", isSignal: true, isRequired: false, transformFunction: null }, showAllPrograms: { classPropertyName: "showAllPrograms", publicName: "showAllPrograms", isSignal: true, isRequired: false, transformFunction: null }, includeInactive: { classPropertyName: "includeInactive", publicName: "includeInactive", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valuesChange: "valuesChange" }, ngImport: i0, template: "<div class=\"program-section-selector\" [ngClass]=\"gridCols()\">\n <!-- Class/Program Dropdown -->\n <cide-ele-select \n [label]=\"showLabels() ? 'Program/Class' : ''\" \n [formControl]=\"getClassProgramControl()\"\n [options]=\"classProgramOptions()\"\n [loading]=\"classProgramMastersLoading()\"\n [searchable]=\"true\"\n (searchChange)=\"onClassProgramSearch($event)\"\n placeholder=\"Search and select class/program\"\n [disabled]=\"disabled()\"\n size=\"sm\">\n </cide-ele-select>\n\n <!-- Branch/Specialization Dropdown (conditional) -->\n @if (showBranchDropdown()) {\n <cide-ele-select \n [label]=\"showLabels() ? 'Branch (Specialization)' : ''\" \n [formControl]=\"getBranchControl()\"\n [options]=\"classProgramBranches()\"\n [loading]=\"classProgramBranchesLoading()\"\n placeholder=\"Select branch\"\n [disabled]=\"disabled() || !formGroup().get(classProgramControlName())?.value\"\n size=\"sm\">\n </cide-ele-select>\n }\n\n <!-- Program Term Dropdown (conditional) -->\n @if (showTermDropdown()) {\n <cide-ele-select \n [label]=\"showLabels() ? 'Program Term' : ''\" \n [formControl]=\"getTermControl()\"\n [options]=\"classProgramTerms()\"\n [loading]=\"classProgramTermsLoading()\"\n placeholder=\"Select term/semester\"\n [disabled]=\"disabled() || !formGroup().get(classProgramControlName())?.value\"\n size=\"sm\"\n valueKey=\"_id\"\n labelKey=\"label\"\n [treeView]=\"{ enabled: true, primaryKey: '_id', foreignKey: 'acapt_parent_class_prog_term_acapt' }\">\n </cide-ele-select>\n }\n\n <!-- Section Dropdown (conditional) -->\n @if (hasSections()) {\n <cide-ele-select \n [label]=\"showLabels() ? 'Section' : ''\" \n [formControl]=\"getSectionControl()\"\n [options]=\"programTermSections()\"\n [loading]=\"programTermSectionsLoading()\"\n placeholder=\"Select section\"\n [disabled]=\"disabled() || !formGroup().get(termControlName())?.value\"\n size=\"sm\">\n </cide-ele-select>\n }\n</div>\n\n", styles: [".program-section-selector{display:grid;gap:1rem;width:100%;border:none;padding:0;margin:0;background:transparent}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }] });
|
|
6339
6627
|
}
|
|
6340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
6628
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: CideLytProgramSectionSelectorComponent, decorators: [{
|
|
6341
6629
|
type: Component,
|
|
6342
6630
|
args: [{ selector: 'cide-lyt-program-section-selector', standalone: true, imports: [
|
|
6343
6631
|
CommonModule,
|
|
@@ -6345,7 +6633,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
6345
6633
|
CideSelectComponent,
|
|
6346
6634
|
NgClass
|
|
6347
6635
|
], template: "<div class=\"program-section-selector\" [ngClass]=\"gridCols()\">\n <!-- Class/Program Dropdown -->\n <cide-ele-select \n [label]=\"showLabels() ? 'Program/Class' : ''\" \n [formControl]=\"getClassProgramControl()\"\n [options]=\"classProgramOptions()\"\n [loading]=\"classProgramMastersLoading()\"\n [searchable]=\"true\"\n (searchChange)=\"onClassProgramSearch($event)\"\n placeholder=\"Search and select class/program\"\n [disabled]=\"disabled()\"\n size=\"sm\">\n </cide-ele-select>\n\n <!-- Branch/Specialization Dropdown (conditional) -->\n @if (showBranchDropdown()) {\n <cide-ele-select \n [label]=\"showLabels() ? 'Branch (Specialization)' : ''\" \n [formControl]=\"getBranchControl()\"\n [options]=\"classProgramBranches()\"\n [loading]=\"classProgramBranchesLoading()\"\n placeholder=\"Select branch\"\n [disabled]=\"disabled() || !formGroup().get(classProgramControlName())?.value\"\n size=\"sm\">\n </cide-ele-select>\n }\n\n <!-- Program Term Dropdown (conditional) -->\n @if (showTermDropdown()) {\n <cide-ele-select \n [label]=\"showLabels() ? 'Program Term' : ''\" \n [formControl]=\"getTermControl()\"\n [options]=\"classProgramTerms()\"\n [loading]=\"classProgramTermsLoading()\"\n placeholder=\"Select term/semester\"\n [disabled]=\"disabled() || !formGroup().get(classProgramControlName())?.value\"\n size=\"sm\"\n valueKey=\"_id\"\n labelKey=\"label\"\n [treeView]=\"{ enabled: true, primaryKey: '_id', foreignKey: 'acapt_parent_class_prog_term_acapt' }\">\n </cide-ele-select>\n }\n\n <!-- Section Dropdown (conditional) -->\n @if (hasSections()) {\n <cide-ele-select \n [label]=\"showLabels() ? 'Section' : ''\" \n [formControl]=\"getSectionControl()\"\n [options]=\"programTermSections()\"\n [loading]=\"programTermSectionsLoading()\"\n placeholder=\"Select section\"\n [disabled]=\"disabled() || !formGroup().get(termControlName())?.value\"\n size=\"sm\">\n </cide-ele-select>\n }\n</div>\n\n", styles: [".program-section-selector{display:grid;gap:1rem;width:100%;border:none;padding:0;margin:0;background:transparent}\n"] }]
|
|
6348
|
-
}], ctorParameters: () => [] });
|
|
6636
|
+
}], ctorParameters: () => [], propDecorators: { formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: true }] }], classProgramControlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "classProgramControlName", required: false }] }], branchControlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "branchControlName", required: false }] }], termControlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "termControlName", required: false }] }], sectionControlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "sectionControlName", required: false }] }], academicYearId: [{ type: i0.Input, args: [{ isSignal: true, alias: "academicYearId", required: false }] }], entityId: [{ type: i0.Input, args: [{ isSignal: true, alias: "entityId", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], showLabels: [{ type: i0.Input, args: [{ isSignal: true, alias: "showLabels", required: false }] }], gridCols: [{ type: i0.Input, args: [{ isSignal: true, alias: "gridCols", required: false }] }], showAllPrograms: [{ type: i0.Input, args: [{ isSignal: true, alias: "showAllPrograms", required: false }] }], includeInactive: [{ type: i0.Input, args: [{ isSignal: true, alias: "includeInactive", required: false }] }], valuesChange: [{ type: i0.Output, args: ["valuesChange"] }] } });
|
|
6349
6637
|
|
|
6350
6638
|
/*
|
|
6351
6639
|
* Public API Surface of cloud-ide-academics
|
|
@@ -6356,4 +6644,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
6356
6644
|
*/
|
|
6357
6645
|
|
|
6358
6646
|
export { AcademicYearCreateComponent as A, CideLytProgramClassService as C, ProgramTermSectionCreateComponent as P, CideLytAcademicYearService as a, CideLytClassProgramBranchService as b, CideLytClassProgramTermService as c, CideLytProgramSectionSelectorComponent as d, academicsRoutes as e, AcademicYearListComponent as f, CideLytAcademicYearMappingService as g, CideLytClassProgramBranchListComponent as h, CideLytClassProgramBranchFormComponent as i, ProgramTermSectionListComponent as j, CideLytProgramTermSectionService as k };
|
|
6359
|
-
//# sourceMappingURL=cloud-ide-academics-cloud-ide-academics-
|
|
6647
|
+
//# sourceMappingURL=cloud-ide-academics-cloud-ide-academics-BVQ8sA0L.mjs.map
|