cloud-ide-academics 0.0.76 → 0.0.78
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-form.component-C9S2Inno.mjs → cloud-ide-academics-bonafide-request-form.component-B_1JJItK.mjs} +2 -2
- package/fesm2022/{cloud-ide-academics-bonafide-request-form.component-C9S2Inno.mjs.map → cloud-ide-academics-bonafide-request-form.component-B_1JJItK.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-academics-class-program-term-create.component-DoGJXB-s.mjs → cloud-ide-academics-class-program-term-create.component-CcV4tAKW.mjs} +2 -2
- package/fesm2022/{cloud-ide-academics-class-program-term-create.component-DoGJXB-s.mjs.map → cloud-ide-academics-class-program-term-create.component-CcV4tAKW.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-academics-class-program-term-list.component-CWcxd5L4.mjs → cloud-ide-academics-class-program-term-list.component-D-1DLd95.mjs} +2 -2
- package/fesm2022/{cloud-ide-academics-class-program-term-list.component-CWcxd5L4.mjs.map → cloud-ide-academics-class-program-term-list.component-D-1DLd95.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-academics-cloud-ide-academics-Cdj8wvGj.mjs → cloud-ide-academics-cloud-ide-academics-Dvk9pzb6.mjs} +21 -13
- package/fesm2022/{cloud-ide-academics-cloud-ide-academics-Cdj8wvGj.mjs.map → cloud-ide-academics-cloud-ide-academics-Dvk9pzb6.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-academics-program-class-create.component-CJGcv3Oc.mjs → cloud-ide-academics-program-class-create.component-BRlf8Z9y.mjs} +2 -2
- package/fesm2022/{cloud-ide-academics-program-class-create.component-CJGcv3Oc.mjs.map → cloud-ide-academics-program-class-create.component-BRlf8Z9y.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-academics-program-class-list.component-DpaJiqLN.mjs → cloud-ide-academics-program-class-list.component-DQ-ex25z.mjs} +2 -2
- package/fesm2022/{cloud-ide-academics-program-class-list.component-DpaJiqLN.mjs.map → cloud-ide-academics-program-class-list.component-DQ-ex25z.mjs.map} +1 -1
- package/fesm2022/cloud-ide-academics.mjs +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
9
9
|
import { NotificationService, CideInputComponent, CideTextareaComponent, CideEleButtonComponent, CideFormFieldErrorComponent, CideSelectComponent } from 'cloud-ide-element';
|
|
10
10
|
import { AppStateHelperService, CideLytSharedWrapperComponent } from 'cloud-ide-layout';
|
|
11
11
|
import { C as CideAcademicsBonafideService } from './cloud-ide-academics-bonafide.service-BSelbA0D.mjs';
|
|
12
|
-
import { e as CideLytProgramSectionSelectorComponent } from './cloud-ide-academics-cloud-ide-academics-
|
|
12
|
+
import { e as CideLytProgramSectionSelectorComponent } from './cloud-ide-academics-cloud-ide-academics-Dvk9pzb6.mjs';
|
|
13
13
|
import { CideCoreUserMasterService } from 'cloud-ide-core';
|
|
14
14
|
import { AuthUserMstListPayload } from 'cloud-ide-lms-model';
|
|
15
15
|
|
|
@@ -325,4 +325,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
325
325
|
}] });
|
|
326
326
|
|
|
327
327
|
export { CideAcademicsBonafideRequestFormComponent };
|
|
328
|
-
//# sourceMappingURL=cloud-ide-academics-bonafide-request-form.component-
|
|
328
|
+
//# sourceMappingURL=cloud-ide-academics-bonafide-request-form.component-B_1JJItK.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloud-ide-academics-bonafide-request-form.component-C9S2Inno.mjs","sources":["../../../projects/cloud-ide-academics/src/lib/collection/bonafide/components/bonafide-request-form/bonafide-request-form.component.ts","../../../projects/cloud-ide-academics/src/lib/collection/bonafide/components/bonafide-request-form/bonafide-request-form.component.html"],"sourcesContent":["import { Component, signal, DestroyRef, inject, OnInit, computed } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { HttpClient } from '@angular/common/http';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { CideInputComponent, CideTextareaComponent, CideEleButtonComponent, CideFormFieldErrorComponent, CideSelectComponent } from 'cloud-ide-element';\nimport { NotificationService } from 'cloud-ide-element';\nimport { CideLytSharedWrapperComponent, AppStateHelperService } from 'cloud-ide-layout';\nimport { CideAcademicsBonafideService } from '../../services/bonafide.service';\nimport { cidePath, coreRoutesUrl, hostManagerRoutesUrl, generateStringFromObject, admissionRoutesUrl, MAdmissionApplicationMain } from 'cloud-ide-lms-model';\nimport { CideLytProgramSectionSelectorComponent } from '../../../../../public-api';\nimport { startWith } from 'rxjs/operators';\nimport { CideCoreUserMasterService } from 'cloud-ide-core';\nimport { AuthUserMstListPayload } from 'cloud-ide-lms-model';\n\n@Component({\n selector: 'cide-academics-bonafide-request-form',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n CideInputComponent,\n CideTextareaComponent,\n CideEleButtonComponent,\n CideFormFieldErrorComponent,\n CideLytSharedWrapperComponent,\n CideLytProgramSectionSelectorComponent,\n CideSelectComponent\n ],\n templateUrl: './bonafide-request-form.component.html',\n styles: [`\n :host {\n @apply tw-w-full tw-h-full tw-flex tw-flex-col;\n }\n `]\n})\nexport class CideAcademicsBonafideRequestFormComponent implements OnInit {\n private destroyRef = inject(DestroyRef);\n private bonafideService = inject(CideAcademicsBonafideService);\n private fb = inject(FormBuilder);\n private router = inject(Router);\n private notificationService = inject(NotificationService);\n private appStateHelper = inject(AppStateHelperService);\n private http = inject(HttpClient);\n\n form: FormGroup = this.fb.group({\n // Common fields\n abnr_purpose: ['', Validators.required],\n abnr_remarks: [''],\n // For non-student users: class/section/student selection\n class_program_id: [''],\n branch_id: [''],\n term_id: [''],\n section_id: [''],\n selected_student_id: ['']\n });\n\n loading = signal(false);\n initializing = signal(true);\n isStudentUser = signal<boolean>(false);\n\n // Store student and entity IDs\n private studentAuthId: string | null = null;\n private entityId: string | null = null;\n\n // For non-student users: class/section/student selection\n studentsList = signal<any[]>([]);\n studentsLoading = signal(false);\n selectedStudent = signal<any | null>(null);\n\n // Flag to prevent reactive clearing during auto-population\n private isProgrammaticUpdate = false;\n\n // Expose IDs for template binding\n readonly activeEntityId = computed(() => this.appStateHelper.activeEntity()?._id || '');\n readonly activeAcademicYearId = computed(() => this.appStateHelper.activeAcademicYear()?._id || '');\n\n // Reactive form values for computed signals\n private formValues = toSignal(this.form.valueChanges, { initialValue: this.form.value });\n\n // Visibility logic controlled by class program and term\n showClassSectionSelector = computed(() => {\n const vals = this.formValues();\n // return !vals?.class_program_id || !vals?.term_id;\n return true;\n });\n\n showStudentSelector = computed(() => {\n return this.isStudentUser() ? false : true;\n });\n\n ngOnInit(): void {\n // Watch for class/section changes to load students\n this.setupClassSectionWatchers();\n\n // Load student and entity data from admission\n this.loadStudentAndEntityData();\n }\n\n /**\n * Setup watchers for class/section changes to load students\n */\n private setupClassSectionWatchers(): void {\n // Watch for section_id changes to load students\n this.form.get('section_id')?.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.loadStudentsByClassSection();\n });\n\n // Watch for class_program_id changes (if section not available)\n this.form.get('class_program_id')?.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n // Reset section and student when class changes, but ONLY if not a programmatic update\n if (!this.isProgrammaticUpdate) {\n this.form.patchValue({ section_id: '', selected_student_id: '' }, { emitEvent: false });\n this.loadStudentsByClassSection();\n }\n });\n }\n\n /**\n * Update validators based on user type\n */\n private updateValidators(): void {\n const isStudent = this.isStudentUser();\n const studentControl = this.form.get('selected_student_id');\n\n if (!isStudent && studentControl) {\n // Non-student: make student selection required\n studentControl.setValidators([Validators.required]);\n } else if (isStudent && studentControl) {\n // Student: remove required validator\n studentControl.clearValidators();\n }\n studentControl?.updateValueAndValidity({ emitEvent: false });\n }\n\n private userMasterService = inject(CideCoreUserMasterService);\n\n // ... inside loadStudentsByClassSection ...\n\n /**\n * Load students based on selected class/section\n */\n private loadStudentsByClassSection(): void {\n const classProgramId = this.form.get('class_program_id')?.value;\n const sectionId = this.form.get('section_id')?.value;\n\n if (!classProgramId) {\n this.studentsList.set([]);\n this.form.patchValue({ selected_student_id: '' }, { emitEvent: false });\n return;\n }\n\n this.studentsLoading.set(true);\n\n // Build payload for User List API\n // We are filtering by User Type 'STUDENT' and current Entity\n // We also attempt to pass Class/Section filters if the API supports them dynamically\n const payload = new AuthUserMstListPayload({\n syutm_user_type: 'STUDENT',\n syenm_entity_id_syen: this.activeEntityId(),\n // Custom filters for class/section - utilizing any dynamic fields the API might accept\n // or assuming the backend can filter by these if passed\n admap_class_program_id_acacpm: classProgramId,\n admap_section_id_acapts: sectionId,\n admap_isactive: true,\n pagination: false // Get all matching students\n } as any);\n\n this.userMasterService.getUserList(payload)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response?.success && response?.data) {\n const users = response.data;\n // Map to student options\n const students = users.map((user: any) => ({\n value: user._id,\n label: `${user.user_firstname || ''} ${user.user_lastname || ''}`.trim() || user.user_username,\n // Fallback: use username as student ID since we don't have admission object\n admission: {\n admap_student_id: user.user_username,\n // Keep other admission fields null or minimal as they aren't available from User API\n }\n }));\n this.studentsList.set(students);\n } else {\n this.studentsList.set([]);\n }\n this.studentsLoading.set(false);\n },\n error: (err) => {\n console.error('Error loading students via User API:', err);\n this.notificationService.error('Failed to load students. Please try again.');\n this.studentsList.set([]);\n this.studentsLoading.set(false);\n }\n });\n }\n\n /**\n * Load student ID and entity ID from admission data\n * Determines if user is a student or non-student\n */\n /**\n * Load student ID and entity ID from admission data\n * Determines if user is a student or non-student\n */\n private loadStudentAndEntityData(): void {\n this.initializing.set(true);\n\n // Get current user\n const currentUser = this.appStateHelper.getCurrentUser();\n if (!currentUser?._id) {\n this.notificationService.error('User not authenticated');\n this.initializing.set(false);\n return;\n }\n\n // Check if user is a student based on user type mapping\n const isStudent = (currentUser as any)?.user_type_mapping?.syutm_user_type === 'STUDENT';\n this.isStudentUser.set(isStudent);\n this.updateValidators();\n\n // If not a student, we are done with initialization (just need entity ID)\n if (!isStudent) {\n const activeEntity = this.appStateHelper.activeEntity();\n if (activeEntity?._id) {\n this.entityId = activeEntity._id;\n } else {\n this.notificationService.warning('Entity ID not found. Please contact administrator.');\n }\n this.initializing.set(false);\n return;\n }\n\n // If student, attempt to load admission data from AppState (populated during login)\n // This avoids redundant API calls as per user request\n const studentModel = this.appStateHelper.studentModel();\n\n if (studentModel) {\n console.log('Using cached student model:', studentModel);\n const admissionData = studentModel;\n\n // Student user: auto-populate student and entity IDs\n // We need the AUTH USER ID, not the readable student ID\n this.studentAuthId = currentUser._id;\n\n // Ensure entityId is just the string ID\n const entityData = admissionData?.admap_entity_id_syen;\n this.entityId = typeof entityData === 'object' ? entityData?._id : entityData || null;\n\n // Patch form with student's current enrollment info\n // This will automatically hide the class section selector via showClassSectionSelector signal\n this.isProgrammaticUpdate = true;\n this.form.patchValue({\n class_program_id: admissionData.admap_class_program_id_acacpm,\n branch_id: admissionData.admap_branch_id_acabrc,\n term_id: admissionData.admap_term_id_acatrm,\n section_id: admissionData.admap_section_id_acapts\n });\n this.isProgrammaticUpdate = false;\n\n // If entity ID not found in admission, try to get from active entity\n if (!this.entityId) {\n const activeEntity = this.appStateHelper.activeEntity();\n if (activeEntity?._id) {\n this.entityId = activeEntity._id;\n }\n }\n\n if (!this.entityId) {\n this.notificationService.warning('Entity ID not found. Please contact administrator.');\n }\n this.initializing.set(false);\n } else {\n // Student is logged in but no student model found in state\n console.warn('Student model not found in AppState');\n this.notificationService.warning('Student details not found. Please re-login.');\n\n const activeEntity = this.appStateHelper.activeEntity();\n if (activeEntity?._id) {\n this.entityId = activeEntity._id;\n }\n this.initializing.set(false);\n }\n }\n\n onSubmit(): void {\n if (this.form.valid) {\n // Determine student ID based on user type\n let finalStudentId: string | null = null;\n\n if (this.isStudentUser()) {\n // Student user: use auto-fetched student ID\n finalStudentId = this.studentAuthId;\n } else {\n // Non-student user: use selected student ID\n const studentOption = this.studentsList().find(s => s.value === this.form.get('selected_student_id')?.value);\n finalStudentId = studentOption?.value || null;\n }\n\n // Validate required data\n if (!finalStudentId) {\n if (this.isStudentUser()) {\n this.notificationService.error('Student ID is required. Please ensure your admission is confirmed.');\n } else {\n this.notificationService.error('Please select a student.');\n }\n return;\n }\n\n if (!this.entityId) {\n this.notificationService.error('Entity ID is required. Please contact administrator.');\n return;\n }\n\n const formValues = this.form.value;\n if (!formValues.class_program_id || !formValues.term_id || !formValues.section_id) {\n this.notificationService.error('Class, Term and Section details are required.');\n return;\n }\n\n this.loading.set(true);\n\n // Build payload with all required fields\n const payload = {\n abnr_student_id_auth: finalStudentId,\n abnr_entity_id_syen: this.entityId,\n abnr_academic_year_id_acayr: this.activeAcademicYearId(),\n abnr_class_program_id_acacpm: formValues.class_program_id,\n abnr_term_id_acatrm: formValues.term_id,\n abnr_section_id_acapts: formValues.section_id,\n abnr_purpose: formValues.abnr_purpose,\n abnr_remarks: formValues.abnr_remarks || '',\n abnr_requested_by_user: this.appStateHelper.getCurrentUser()?._id\n };\n\n this.bonafideService.createRequest(payload)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response.success) {\n this.notificationService.success('Bonafide request created successfully');\n this.router.navigate(['/control-panel/bonafide']);\n } else {\n this.notificationService.error(response.message || 'Failed to create request');\n }\n this.loading.set(false);\n },\n error: (err) => {\n console.error('Error creating bonafide request:', err);\n this.notificationService.error(err.error?.message || 'Failed to create request');\n this.loading.set(false);\n }\n });\n }\n }\n\n cancel(): void {\n this.router.navigate(['/control-panel/bonafide']);\n }\n}\n\n","<!-- Bonafide Request Form with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'bonafide_request' }\">\n <div class=\"tw-w-full tw-h-full\">\n @if (initializing()) {\n <!-- Loading State -->\n <div class=\"tw-w-full tw-h-full tw-flex tw-items-center tw-justify-center\">\n <div class=\"tw-text-center\">\n <div class=\"tw-text-gray-600 tw-mb-2\">Loading student information...</div>\n <div class=\"tw-text-sm tw-text-gray-500\">Please wait</div>\n </div>\n </div>\n } @else {\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\"\n [class.tw-opacity-60]=\"loading()\">\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 <!-- Form Fields -->\n <div class=\"tw-space-y-6\">\n <!-- Class/Section Selector for Non-Student Users -->\n @if (showClassSectionSelector()) {\n <div class=\"tw-max-w-4xl\">\n <div class=\"tw-mb-4\">\n <h3 class=\"tw-text-sm tw-font-semibold tw-text-gray-700 tw-mb-2\">Select Class & Section</h3>\n <p class=\"tw-text-xs tw-text-gray-500\">Select the class and section to find the student</p>\n </div>\n <cide-lyt-program-section-selector [formGroup]=\"form\" [entityId]=\"activeEntityId()\"\n [academicYearId]=\"activeAcademicYearId()\" classProgramControlName=\"class_program_id\"\n branchControlName=\"branch_id\" termControlName=\"term_id\" sectionControlName=\"section_id\"\n [showLabels]=\"true\" [disabled]=\"loading()\">\n </cide-lyt-program-section-selector>\n </div>\n }\n <!-- Student Selection for Non-Student Users -->\n @if (showStudentSelector()) {\n <div class=\"tw-max-w-2xl\">\n <cide-ele-select label=\"Select Student\" formControlName=\"selected_student_id\" [options]=\"studentsList()\"\n [loading]=\"studentsLoading()\" placeholder=\"Select a student\" valueKey=\"value\" labelKey=\"label\"\n size=\"md\" [required]=\"true\" [disabled]=\"loading() || studentsLoading()\">\n </cide-ele-select>\n </div>\n }\n\n <!-- Purpose Field -->\n <div class=\"tw-max-w-2xl\">\n <cide-ele-input label=\"Purpose\" formControlName=\"abnr_purpose\" [required]=\"true\"\n placeholder=\"Enter purpose for bonafide certificate\" size=\"md\" [disabled]=\"loading()\">\n </cide-ele-input>\n </div>\n\n <!-- Remarks Field -->\n <div class=\"tw-max-w-2xl\">\n <cide-ele-textarea label=\"Remarks\" formControlName=\"abnr_remarks\"\n placeholder=\"Enter any additional remarks\" rows=\"4\" size=\"md\" [disabled]=\"loading()\">\n </cide-ele-textarea>\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-flex-col tw-gap-3\">\n <!-- Error Message -->\n <div class=\"tw-w-full\">\n <cide-form-field-error [formGroup]=\"form\"></cide-form-field-error>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancel()\" [disabled]=\"loading()\">\n Cancel\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"!form.valid || loading()\"\n [loading]=\"loading()\" leftIcon=\"save\">\n Submit Request\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n }\n </div>\n</cide-lyt-shared-wrapper>"],"names":[],"mappings":";;;;;;;;;;;;;;;MAqCa,yCAAyC,CAAA;AAC5C,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,eAAe,GAAG,MAAM,CAAC,4BAA4B,CAAC;AACtD,IAAA,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC;AACxB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,IAAA,cAAc,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC9C,IAAA,IAAI,GAAG,MAAM,CAA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,IAAA,EAAA,WAAA,EAAA,IAAA,EAC7B,sCAAsC,mUACtC,mBAAmB,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,WAAA,EAAA,aAAA,EAAA,YAAA,EAAA,WAAA,EAAA,UAAA,EAAA,UAAA,EAAA,IAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,aAAA,EAAA,cAAA,EAAA,YAAA,EAAA,SAAA,EAAA,UAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FASV,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBArBrD,SAAS;+BACE,sCAAsC,EAAA,UAAA,EACpC,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,kBAAkB;wBAClB,qBAAqB;wBACrB,sBAAsB;wBACtB,2BAA2B;wBAC3B,6BAA6B;wBAC7B,sCAAsC;wBACtC;AACD,qBAAA,EAAA,QAAA,EAAA,8wIAAA,EAAA,MAAA,EAAA,CAAA,0DAAA,CAAA,EAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"cloud-ide-academics-bonafide-request-form.component-B_1JJItK.mjs","sources":["../../../projects/cloud-ide-academics/src/lib/collection/bonafide/components/bonafide-request-form/bonafide-request-form.component.ts","../../../projects/cloud-ide-academics/src/lib/collection/bonafide/components/bonafide-request-form/bonafide-request-form.component.html"],"sourcesContent":["import { Component, signal, DestroyRef, inject, OnInit, computed } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms';\nimport { Router } from '@angular/router';\nimport { HttpClient } from '@angular/common/http';\nimport { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';\nimport { CideInputComponent, CideTextareaComponent, CideEleButtonComponent, CideFormFieldErrorComponent, CideSelectComponent } from 'cloud-ide-element';\nimport { NotificationService } from 'cloud-ide-element';\nimport { CideLytSharedWrapperComponent, AppStateHelperService } from 'cloud-ide-layout';\nimport { CideAcademicsBonafideService } from '../../services/bonafide.service';\nimport { cidePath, coreRoutesUrl, hostManagerRoutesUrl, generateStringFromObject, admissionRoutesUrl, MAdmissionApplicationMain } from 'cloud-ide-lms-model';\nimport { CideLytProgramSectionSelectorComponent } from '../../../../../public-api';\nimport { startWith } from 'rxjs/operators';\nimport { CideCoreUserMasterService } from 'cloud-ide-core';\nimport { AuthUserMstListPayload } from 'cloud-ide-lms-model';\n\n@Component({\n selector: 'cide-academics-bonafide-request-form',\n standalone: true,\n imports: [\n CommonModule,\n ReactiveFormsModule,\n CideInputComponent,\n CideTextareaComponent,\n CideEleButtonComponent,\n CideFormFieldErrorComponent,\n CideLytSharedWrapperComponent,\n CideLytProgramSectionSelectorComponent,\n CideSelectComponent\n ],\n templateUrl: './bonafide-request-form.component.html',\n styles: [`\n :host {\n @apply tw-w-full tw-h-full tw-flex tw-flex-col;\n }\n `]\n})\nexport class CideAcademicsBonafideRequestFormComponent implements OnInit {\n private destroyRef = inject(DestroyRef);\n private bonafideService = inject(CideAcademicsBonafideService);\n private fb = inject(FormBuilder);\n private router = inject(Router);\n private notificationService = inject(NotificationService);\n private appStateHelper = inject(AppStateHelperService);\n private http = inject(HttpClient);\n\n form: FormGroup = this.fb.group({\n // Common fields\n abnr_purpose: ['', Validators.required],\n abnr_remarks: [''],\n // For non-student users: class/section/student selection\n class_program_id: [''],\n branch_id: [''],\n term_id: [''],\n section_id: [''],\n selected_student_id: ['']\n });\n\n loading = signal(false);\n initializing = signal(true);\n isStudentUser = signal<boolean>(false);\n\n // Store student and entity IDs\n private studentAuthId: string | null = null;\n private entityId: string | null = null;\n\n // For non-student users: class/section/student selection\n studentsList = signal<any[]>([]);\n studentsLoading = signal(false);\n selectedStudent = signal<any | null>(null);\n\n // Flag to prevent reactive clearing during auto-population\n private isProgrammaticUpdate = false;\n\n // Expose IDs for template binding\n readonly activeEntityId = computed(() => this.appStateHelper.activeEntity()?._id || '');\n readonly activeAcademicYearId = computed(() => this.appStateHelper.activeAcademicYear()?._id || '');\n\n // Reactive form values for computed signals\n private formValues = toSignal(this.form.valueChanges, { initialValue: this.form.value });\n\n // Visibility logic controlled by class program and term\n showClassSectionSelector = computed(() => {\n const vals = this.formValues();\n // return !vals?.class_program_id || !vals?.term_id;\n return true;\n });\n\n showStudentSelector = computed(() => {\n return this.isStudentUser() ? false : true;\n });\n\n ngOnInit(): void {\n // Watch for class/section changes to load students\n this.setupClassSectionWatchers();\n\n // Load student and entity data from admission\n this.loadStudentAndEntityData();\n }\n\n /**\n * Setup watchers for class/section changes to load students\n */\n private setupClassSectionWatchers(): void {\n // Watch for section_id changes to load students\n this.form.get('section_id')?.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.loadStudentsByClassSection();\n });\n\n // Watch for class_program_id changes (if section not available)\n this.form.get('class_program_id')?.valueChanges\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n // Reset section and student when class changes, but ONLY if not a programmatic update\n if (!this.isProgrammaticUpdate) {\n this.form.patchValue({ section_id: '', selected_student_id: '' }, { emitEvent: false });\n this.loadStudentsByClassSection();\n }\n });\n }\n\n /**\n * Update validators based on user type\n */\n private updateValidators(): void {\n const isStudent = this.isStudentUser();\n const studentControl = this.form.get('selected_student_id');\n\n if (!isStudent && studentControl) {\n // Non-student: make student selection required\n studentControl.setValidators([Validators.required]);\n } else if (isStudent && studentControl) {\n // Student: remove required validator\n studentControl.clearValidators();\n }\n studentControl?.updateValueAndValidity({ emitEvent: false });\n }\n\n private userMasterService = inject(CideCoreUserMasterService);\n\n // ... inside loadStudentsByClassSection ...\n\n /**\n * Load students based on selected class/section\n */\n private loadStudentsByClassSection(): void {\n const classProgramId = this.form.get('class_program_id')?.value;\n const sectionId = this.form.get('section_id')?.value;\n\n if (!classProgramId) {\n this.studentsList.set([]);\n this.form.patchValue({ selected_student_id: '' }, { emitEvent: false });\n return;\n }\n\n this.studentsLoading.set(true);\n\n // Build payload for User List API\n // We are filtering by User Type 'STUDENT' and current Entity\n // We also attempt to pass Class/Section filters if the API supports them dynamically\n const payload = new AuthUserMstListPayload({\n syutm_user_type: 'STUDENT',\n syenm_entity_id_syen: this.activeEntityId(),\n // Custom filters for class/section - utilizing any dynamic fields the API might accept\n // or assuming the backend can filter by these if passed\n admap_class_program_id_acacpm: classProgramId,\n admap_section_id_acapts: sectionId,\n admap_isactive: true,\n pagination: false // Get all matching students\n } as any);\n\n this.userMasterService.getUserList(payload)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response?.success && response?.data) {\n const users = response.data;\n // Map to student options\n const students = users.map((user: any) => ({\n value: user._id,\n label: `${user.user_firstname || ''} ${user.user_lastname || ''}`.trim() || user.user_username,\n // Fallback: use username as student ID since we don't have admission object\n admission: {\n admap_student_id: user.user_username,\n // Keep other admission fields null or minimal as they aren't available from User API\n }\n }));\n this.studentsList.set(students);\n } else {\n this.studentsList.set([]);\n }\n this.studentsLoading.set(false);\n },\n error: (err) => {\n console.error('Error loading students via User API:', err);\n this.notificationService.error('Failed to load students. Please try again.');\n this.studentsList.set([]);\n this.studentsLoading.set(false);\n }\n });\n }\n\n /**\n * Load student ID and entity ID from admission data\n * Determines if user is a student or non-student\n */\n /**\n * Load student ID and entity ID from admission data\n * Determines if user is a student or non-student\n */\n private loadStudentAndEntityData(): void {\n this.initializing.set(true);\n\n // Get current user\n const currentUser = this.appStateHelper.getCurrentUser();\n if (!currentUser?._id) {\n this.notificationService.error('User not authenticated');\n this.initializing.set(false);\n return;\n }\n\n // Check if user is a student based on user type mapping\n const isStudent = (currentUser as any)?.user_type_mapping?.syutm_user_type === 'STUDENT';\n this.isStudentUser.set(isStudent);\n this.updateValidators();\n\n // If not a student, we are done with initialization (just need entity ID)\n if (!isStudent) {\n const activeEntity = this.appStateHelper.activeEntity();\n if (activeEntity?._id) {\n this.entityId = activeEntity._id;\n } else {\n this.notificationService.warning('Entity ID not found. Please contact administrator.');\n }\n this.initializing.set(false);\n return;\n }\n\n // If student, attempt to load admission data from AppState (populated during login)\n // This avoids redundant API calls as per user request\n const studentModel = this.appStateHelper.studentModel();\n\n if (studentModel) {\n console.log('Using cached student model:', studentModel);\n const admissionData = studentModel;\n\n // Student user: auto-populate student and entity IDs\n // We need the AUTH USER ID, not the readable student ID\n this.studentAuthId = currentUser._id;\n\n // Ensure entityId is just the string ID\n const entityData = admissionData?.admap_entity_id_syen;\n this.entityId = typeof entityData === 'object' ? entityData?._id : entityData || null;\n\n // Patch form with student's current enrollment info\n // This will automatically hide the class section selector via showClassSectionSelector signal\n this.isProgrammaticUpdate = true;\n this.form.patchValue({\n class_program_id: admissionData.admap_class_program_id_acacpm,\n branch_id: admissionData.admap_branch_id_acabrc,\n term_id: admissionData.admap_term_id_acatrm,\n section_id: admissionData.admap_section_id_acapts\n });\n this.isProgrammaticUpdate = false;\n\n // If entity ID not found in admission, try to get from active entity\n if (!this.entityId) {\n const activeEntity = this.appStateHelper.activeEntity();\n if (activeEntity?._id) {\n this.entityId = activeEntity._id;\n }\n }\n\n if (!this.entityId) {\n this.notificationService.warning('Entity ID not found. Please contact administrator.');\n }\n this.initializing.set(false);\n } else {\n // Student is logged in but no student model found in state\n console.warn('Student model not found in AppState');\n this.notificationService.warning('Student details not found. Please re-login.');\n\n const activeEntity = this.appStateHelper.activeEntity();\n if (activeEntity?._id) {\n this.entityId = activeEntity._id;\n }\n this.initializing.set(false);\n }\n }\n\n onSubmit(): void {\n if (this.form.valid) {\n // Determine student ID based on user type\n let finalStudentId: string | null = null;\n\n if (this.isStudentUser()) {\n // Student user: use auto-fetched student ID\n finalStudentId = this.studentAuthId;\n } else {\n // Non-student user: use selected student ID\n const studentOption = this.studentsList().find(s => s.value === this.form.get('selected_student_id')?.value);\n finalStudentId = studentOption?.value || null;\n }\n\n // Validate required data\n if (!finalStudentId) {\n if (this.isStudentUser()) {\n this.notificationService.error('Student ID is required. Please ensure your admission is confirmed.');\n } else {\n this.notificationService.error('Please select a student.');\n }\n return;\n }\n\n if (!this.entityId) {\n this.notificationService.error('Entity ID is required. Please contact administrator.');\n return;\n }\n\n const formValues = this.form.value;\n if (!formValues.class_program_id || !formValues.term_id || !formValues.section_id) {\n this.notificationService.error('Class, Term and Section details are required.');\n return;\n }\n\n this.loading.set(true);\n\n // Build payload with all required fields\n const payload = {\n abnr_student_id_auth: finalStudentId,\n abnr_entity_id_syen: this.entityId,\n abnr_academic_year_id_acayr: this.activeAcademicYearId(),\n abnr_class_program_id_acacpm: formValues.class_program_id,\n abnr_term_id_acatrm: formValues.term_id,\n abnr_section_id_acapts: formValues.section_id,\n abnr_purpose: formValues.abnr_purpose,\n abnr_remarks: formValues.abnr_remarks || '',\n abnr_requested_by_user: this.appStateHelper.getCurrentUser()?._id\n };\n\n this.bonafideService.createRequest(payload)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe({\n next: (response) => {\n if (response.success) {\n this.notificationService.success('Bonafide request created successfully');\n this.router.navigate(['/control-panel/bonafide']);\n } else {\n this.notificationService.error(response.message || 'Failed to create request');\n }\n this.loading.set(false);\n },\n error: (err) => {\n console.error('Error creating bonafide request:', err);\n this.notificationService.error(err.error?.message || 'Failed to create request');\n this.loading.set(false);\n }\n });\n }\n }\n\n cancel(): void {\n this.router.navigate(['/control-panel/bonafide']);\n }\n}\n\n","<!-- Bonafide Request Form with Shared Wrapper -->\n<cide-lyt-shared-wrapper [shared_wrapper_setup_param]=\"{ sypg_page_code: 'bonafide_request' }\">\n <div class=\"tw-w-full tw-h-full\">\n @if (initializing()) {\n <!-- Loading State -->\n <div class=\"tw-w-full tw-h-full tw-flex tw-items-center tw-justify-center\">\n <div class=\"tw-text-center\">\n <div class=\"tw-text-gray-600 tw-mb-2\">Loading student information...</div>\n <div class=\"tw-text-sm tw-text-gray-500\">Please wait</div>\n </div>\n </div>\n } @else {\n <form [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\" class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\"\n [class.tw-opacity-60]=\"loading()\">\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 <!-- Form Fields -->\n <div class=\"tw-space-y-6\">\n <!-- Class/Section Selector for Non-Student Users -->\n @if (showClassSectionSelector()) {\n <div class=\"tw-max-w-4xl\">\n <div class=\"tw-mb-4\">\n <h3 class=\"tw-text-sm tw-font-semibold tw-text-gray-700 tw-mb-2\">Select Class & Section</h3>\n <p class=\"tw-text-xs tw-text-gray-500\">Select the class and section to find the student</p>\n </div>\n <cide-lyt-program-section-selector [formGroup]=\"form\" [entityId]=\"activeEntityId()\"\n [academicYearId]=\"activeAcademicYearId()\" classProgramControlName=\"class_program_id\"\n branchControlName=\"branch_id\" termControlName=\"term_id\" sectionControlName=\"section_id\"\n [showLabels]=\"true\" [disabled]=\"loading()\">\n </cide-lyt-program-section-selector>\n </div>\n }\n <!-- Student Selection for Non-Student Users -->\n @if (showStudentSelector()) {\n <div class=\"tw-max-w-2xl\">\n <cide-ele-select label=\"Select Student\" formControlName=\"selected_student_id\" [options]=\"studentsList()\"\n [loading]=\"studentsLoading()\" placeholder=\"Select a student\" valueKey=\"value\" labelKey=\"label\"\n size=\"md\" [required]=\"true\" [disabled]=\"loading() || studentsLoading()\">\n </cide-ele-select>\n </div>\n }\n\n <!-- Purpose Field -->\n <div class=\"tw-max-w-2xl\">\n <cide-ele-input label=\"Purpose\" formControlName=\"abnr_purpose\" [required]=\"true\"\n placeholder=\"Enter purpose for bonafide certificate\" size=\"md\" [disabled]=\"loading()\">\n </cide-ele-input>\n </div>\n\n <!-- Remarks Field -->\n <div class=\"tw-max-w-2xl\">\n <cide-ele-textarea label=\"Remarks\" formControlName=\"abnr_remarks\"\n placeholder=\"Enter any additional remarks\" rows=\"4\" size=\"md\" [disabled]=\"loading()\">\n </cide-ele-textarea>\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-flex-col tw-gap-3\">\n <!-- Error Message -->\n <div class=\"tw-w-full\">\n <cide-form-field-error [formGroup]=\"form\"></cide-form-field-error>\n </div>\n\n <!-- Action Buttons -->\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancel()\" [disabled]=\"loading()\">\n Cancel\n </button>\n\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"!form.valid || loading()\"\n [loading]=\"loading()\" leftIcon=\"save\">\n Submit Request\n </button>\n </div>\n </div>\n </div>\n </div>\n </form>\n }\n </div>\n</cide-lyt-shared-wrapper>"],"names":[],"mappings":";;;;;;;;;;;;;;;MAqCa,yCAAyC,CAAA;AAC5C,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,eAAe,GAAG,MAAM,CAAC,4BAA4B,CAAC;AACtD,IAAA,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC;AACxB,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,IAAA,cAAc,GAAG,MAAM,CAAC,qBAAqB,CAAC;AAC9C,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AAEjC,IAAA,IAAI,GAAc,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC;;AAE9B,QAAA,YAAY,EAAE,CAAC,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC;QACvC,YAA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AAA,WAAA,EAAA,UAAA,EAAA,UAAA,EAAA,IAAA,EAAA,SAAA,EAAA,MAAA,EAAA,MAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,aAAA,EAAA,cAAA,EAAA,YAAA,EAAA,SAAA,EAAA,UAAA,EAAA,YAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FASV,yCAAyC,EAAA,UAAA,EAAA,CAAA;kBArBrD,SAAS;+BACE,sCAAsC,EAAA,UAAA,EACpC,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,kBAAkB;wBAClB,qBAAqB;wBACrB,sBAAsB;wBACtB,2BAA2B;wBAC3B,6BAA6B;wBAC7B,sCAAsC;wBACtC;AACD,qBAAA,EAAA,QAAA,EAAA,8wIAAA,EAAA,MAAA,EAAA,CAAA,0DAAA,CAAA,EAAA;;;;;"}
|
|
@@ -8,7 +8,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
|
8
8
|
import { NotificationService, ConfirmationService, CideInputComponent, CideTextareaComponent, CideEleButtonComponent, CideIconComponent, CideSelectComponent, CideFormFieldErrorComponent } from 'cloud-ide-element';
|
|
9
9
|
import { AppStateHelperService, ComponentContextService, RightsService, CideLytSharedWrapperComponent } from 'cloud-ide-layout';
|
|
10
10
|
import { ENTITY_SERVICE_TOKEN } from 'cloud-ide-shared';
|
|
11
|
-
import { c as CideLytClassProgramBranchService, C as CideLytProgramClassService, d as CideLytClassProgramTermService } from './cloud-ide-academics-cloud-ide-academics-
|
|
11
|
+
import { c as CideLytClassProgramBranchService, C as CideLytProgramClassService, d as CideLytClassProgramTermService } from './cloud-ide-academics-cloud-ide-academics-Dvk9pzb6.mjs';
|
|
12
12
|
import { generateObjectFromString, MClassProgramTerm } from 'cloud-ide-lms-model';
|
|
13
13
|
|
|
14
14
|
class ClassProgramTermCreateComponent {
|
|
@@ -1217,4 +1217,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
1217
1217
|
}], ctorParameters: () => [] });
|
|
1218
1218
|
|
|
1219
1219
|
export { ClassProgramTermCreateComponent };
|
|
1220
|
-
//# sourceMappingURL=cloud-ide-academics-class-program-term-create.component-
|
|
1220
|
+
//# sourceMappingURL=cloud-ide-academics-class-program-term-create.component-CcV4tAKW.mjs.map
|