cloud-ide-academics 0.0.2 → 0.0.6

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.
Files changed (18) hide show
  1. package/fesm2022/{cloud-ide-academics-class-program-term-create.component-D3PfbSMN.mjs → cloud-ide-academics-class-program-term-create.component-BEqM62WC.mjs} +3 -3
  2. package/fesm2022/{cloud-ide-academics-class-program-term-create.component-D3PfbSMN.mjs.map → cloud-ide-academics-class-program-term-create.component-BEqM62WC.mjs.map} +1 -1
  3. package/fesm2022/{cloud-ide-academics-class-program-term-list.component-Cpbyavgd.mjs → cloud-ide-academics-class-program-term-list.component-CaWAHMHN.mjs} +2 -2
  4. package/fesm2022/{cloud-ide-academics-class-program-term-list.component-Cpbyavgd.mjs.map → cloud-ide-academics-class-program-term-list.component-CaWAHMHN.mjs.map} +1 -1
  5. package/fesm2022/{cloud-ide-academics-cloud-ide-academics-BP1hZ-yx.mjs → cloud-ide-academics-cloud-ide-academics-DsKIXC7E.mjs} +172 -36
  6. package/fesm2022/cloud-ide-academics-cloud-ide-academics-DsKIXC7E.mjs.map +1 -0
  7. package/fesm2022/{cloud-ide-academics-program-class-create.component-Ds8vN9sL.mjs → cloud-ide-academics-program-class-create.component-Cn9SV5D4.mjs} +3 -3
  8. package/fesm2022/{cloud-ide-academics-program-class-create.component-Ds8vN9sL.mjs.map → cloud-ide-academics-program-class-create.component-Cn9SV5D4.mjs.map} +1 -1
  9. package/fesm2022/{cloud-ide-academics-program-class-list.component-C6VyX4hH.mjs → cloud-ide-academics-program-class-list.component-D7R-LeJt.mjs} +3 -3
  10. package/fesm2022/{cloud-ide-academics-program-class-list.component-C6VyX4hH.mjs.map → cloud-ide-academics-program-class-list.component-D7R-LeJt.mjs.map} +1 -1
  11. package/fesm2022/{cloud-ide-academics-program-term-section-create.component-Dg9Pjwj5.mjs → cloud-ide-academics-program-term-section-create.component-DQH-DeS0.mjs} +2 -2
  12. package/fesm2022/{cloud-ide-academics-program-term-section-create.component-Dg9Pjwj5.mjs.map → cloud-ide-academics-program-term-section-create.component-DQH-DeS0.mjs.map} +1 -1
  13. package/fesm2022/{cloud-ide-academics-program-term-section-list.component-xVeeeGDV.mjs → cloud-ide-academics-program-term-section-list.component-Q2nO1n4a.mjs} +2 -2
  14. package/fesm2022/{cloud-ide-academics-program-term-section-list.component-xVeeeGDV.mjs.map → cloud-ide-academics-program-term-section-list.component-Q2nO1n4a.mjs.map} +1 -1
  15. package/fesm2022/cloud-ide-academics.mjs +1 -1
  16. package/index.d.ts +31 -2
  17. package/package.json +1 -1
  18. package/fesm2022/cloud-ide-academics-cloud-ide-academics-BP1hZ-yx.mjs.map +0 -1
@@ -8,7 +8,7 @@ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
8
8
  import { NotificationService, ConfirmationService, CideInputComponent, CideTextareaComponent, CideEleButtonComponent, CideIconComponent, CideSelectComponent } from 'cloud-ide-element';
9
9
  import { AppStateHelperService } from 'cloud-ide-layout';
10
10
  import { ENTITY_SERVICE_TOKEN } from 'cloud-ide-shared';
11
- import { b as CideLytClassProgramBranchService, C as CideLytProgramClassService } from './cloud-ide-academics-cloud-ide-academics-BP1hZ-yx.mjs';
11
+ import { b as CideLytClassProgramBranchService, C as CideLytProgramClassService } from './cloud-ide-academics-cloud-ide-academics-DsKIXC7E.mjs';
12
12
  import { C as CideLytClassProgramTermService } from './cloud-ide-academics-class-program-term.service-BW4PJQEM.mjs';
13
13
  import { generateObjectFromString } from 'cloud-ide-lms-model';
14
14
 
@@ -559,7 +559,7 @@ class ClassProgramTermCreateComponent {
559
559
  console.log('🧹 ClassProgramTermCreateComponent: Component state cleaned up');
560
560
  }
561
561
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ClassProgramTermCreateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
562
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: ClassProgramTermCreateComponent, isStandalone: true, selector: "cide-academics-class-program-term-create", ngImport: i0, template: "<!-- \r\n CLASS PROGRAM TERM MASTER FORM\r\n \r\n Enterprise-Level Styling with Tailwind CSS\r\n Features: Responsive grids, proper typography, enhanced user experience\r\n-->\r\n\r\n<div class=\"tw-w-full tw-h-full\">\r\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\" [formGroup]=\"classProgramTermForm\"\r\n [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\r\n\r\n <!-- Simple Header Section -->\r\n <div class=\"tw-table-row tw-w-full tw-h-0\">\r\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\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n\r\n <!-- Title -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">\r\n {{ getPageTitle() }}\r\n </h5>\r\n </div>\r\n\r\n <!-- Actions -->\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <!-- Back button or other actions can be added here if needed -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Form Content -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6\">\r\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\r\n <!-- Class Program Term Information -->\r\n <div class=\"tw-space-y-6\">\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input label=\"Term Code *\" formControlName=\"acapt_code\" placeholder=\"e.g., T1, T2, T3\"\r\n size=\"md\" leadingIcon=\"code\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Term Name *\" formControlName=\"acapt_name\"\r\n placeholder=\"e.g., First Term, Second Term\" size=\"md\" leadingIcon=\"schedule\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <div>\r\n <cide-ele-textarea label=\"Description\" formControlName=\"acapt_description\"\r\n placeholder=\"Enter detailed description of the term...\" rows=\"3\" size=\"md\">\r\n </cide-ele-textarea>\r\n </div>\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input id=\"acapt_start_date\" label=\"Start Date\" formControlName=\"acapt_start_date\" type=\"date\"\r\n size=\"md\" leadingIcon=\"event\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input id=\"acapt_end_date\" label=\"End Date\" formControlName=\"acapt_end_date\" type=\"date\"\r\n [min]=\"endDateMinDate()\" size=\"md\" leadingIcon=\"event\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <div class=\"tw-p-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <cide-ele-icon name=\"info\" class=\"tw-w-4 tw-h-4 tw-text-blue-500\"></cide-ele-icon>\r\n <span class=\"tw-text-sm tw-text-blue-700\">\r\n Sequence will be automatically managed through drag-and-drop on the listing page\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <div class=\"tw-space-y-2\">\r\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Program Class *</label>\r\n <cide-ele-select \r\n formControlName=\"acapt_class_program_id_acacpm\" \r\n placeholder=\"Select program class\"\r\n [disabled]=\"isViewMode()\" \r\n valueKey=\"_id\" \r\n labelKey=\"acacpm_alise_title\" \r\n [options]=\"programClassOptions()\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <div class=\"tw-space-y-2\">\r\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Class Program Branch *</label>\r\n <cide-ele-select \r\n formControlName=\"acapt_class_program_branch_id_acabrn\" \r\n placeholder=\"Select branch\"\r\n [disabled]=\"isViewMode()\" \r\n valueKey=\"_id\" \r\n labelKey=\"acabrn_name\" \r\n [options]=\"branchOptions()\">\r\n </cide-ele-select>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <div\r\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\"\r\n [class.tw-cursor-not-allowed]=\"isViewMode()\"\r\n [class.tw-opacity-60]=\"isViewMode()\"\r\n (click)=\"onActiveCardClick()\">\r\n <cide-ele-input formControlName=\"acapt_isactive\" type=\"checkbox\" size=\"md\">\r\n </cide-ele-input>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\r\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this term</span>\r\n </div>\r\n </div>\r\n\r\n <div\r\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\"\r\n [class.tw-cursor-not-allowed]=\"isViewMode()\"\r\n [class.tw-opacity-60]=\"isViewMode()\"\r\n (click)=\"onLockedCardClick()\">\r\n <cide-ele-input formControlName=\"acapt_islocked\" type=\"checkbox\" size=\"md\">\r\n </cide-ele-input>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\r\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Error Display -->\r\n @if (error()) {\r\n <div class=\"tw-mt-6 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <cide-ele-icon variant=\"red\" size=\"sm\">error</cide-ele-icon>\r\n <span class=\"tw-text-sm tw-font-medium tw-text-red-800\">{{ error() }}</span>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Form Actions -->\r\n <div class=\"tw-table-row tw-h-0\">\r\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\">\r\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\r\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\r\n [disabled]=\"loading()\">\r\n Reset Form\r\n </button>\r\n\r\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\r\n [disabled]=\"loading()\">\r\n Cancel\r\n </button>\r\n\r\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || classProgramTermForm.invalid\"\r\n [loading]=\"loading()\" leftIcon=\"save\">\r\n {{ isEditMode() ? 'Update Class Program Term' : 'Create Class Program Term' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n\r\n", 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", "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]", 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"], outputs: ["ngModelChange", "change", "searchChange"] }] });
562
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: ClassProgramTermCreateComponent, isStandalone: true, selector: "cide-academics-class-program-term-create", ngImport: i0, template: "<!-- \r\n CLASS PROGRAM TERM MASTER FORM\r\n \r\n Enterprise-Level Styling with Tailwind CSS\r\n Features: Responsive grids, proper typography, enhanced user experience\r\n-->\r\n\r\n<div class=\"tw-w-full tw-h-full\">\r\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\" [formGroup]=\"classProgramTermForm\"\r\n [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\r\n\r\n <!-- Simple Header Section -->\r\n <div class=\"tw-table-row tw-w-full tw-h-0\">\r\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\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n\r\n <!-- Title -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">\r\n {{ getPageTitle() }}\r\n </h5>\r\n </div>\r\n\r\n <!-- Actions -->\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <!-- Back button or other actions can be added here if needed -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Form Content -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6\">\r\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\r\n <!-- Class Program Term Information -->\r\n <div class=\"tw-space-y-6\">\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input label=\"Term Code *\" formControlName=\"acapt_code\" placeholder=\"e.g., T1, T2, T3\"\r\n size=\"md\" leadingIcon=\"code\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Term Name *\" formControlName=\"acapt_name\"\r\n placeholder=\"e.g., First Term, Second Term\" size=\"md\" leadingIcon=\"schedule\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <div>\r\n <cide-ele-textarea label=\"Description\" formControlName=\"acapt_description\"\r\n placeholder=\"Enter detailed description of the term...\" rows=\"3\" size=\"md\">\r\n </cide-ele-textarea>\r\n </div>\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input id=\"acapt_start_date\" label=\"Start Date\" formControlName=\"acapt_start_date\" type=\"date\"\r\n size=\"md\" leadingIcon=\"event\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input id=\"acapt_end_date\" label=\"End Date\" formControlName=\"acapt_end_date\" type=\"date\"\r\n [min]=\"endDateMinDate()\" size=\"md\" leadingIcon=\"event\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <div class=\"tw-p-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <cide-ele-icon name=\"info\" class=\"tw-w-4 tw-h-4 tw-text-blue-500\"></cide-ele-icon>\r\n <span class=\"tw-text-sm tw-text-blue-700\">\r\n Sequence will be automatically managed through drag-and-drop on the listing page\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <div class=\"tw-space-y-2\">\r\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Program Class *</label>\r\n <cide-ele-select \r\n formControlName=\"acapt_class_program_id_acacpm\" \r\n placeholder=\"Select program class\"\r\n [disabled]=\"isViewMode()\" \r\n valueKey=\"_id\" \r\n labelKey=\"acacpm_alise_title\" \r\n [options]=\"programClassOptions()\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <div class=\"tw-space-y-2\">\r\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Class Program Branch *</label>\r\n <cide-ele-select \r\n formControlName=\"acapt_class_program_branch_id_acabrn\" \r\n placeholder=\"Select branch\"\r\n [disabled]=\"isViewMode()\" \r\n valueKey=\"_id\" \r\n labelKey=\"acabrn_name\" \r\n [options]=\"branchOptions()\">\r\n </cide-ele-select>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <div\r\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\"\r\n [class.tw-cursor-not-allowed]=\"isViewMode()\"\r\n [class.tw-opacity-60]=\"isViewMode()\"\r\n (click)=\"onActiveCardClick()\">\r\n <cide-ele-input formControlName=\"acapt_isactive\" type=\"checkbox\" size=\"md\">\r\n </cide-ele-input>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\r\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this term</span>\r\n </div>\r\n </div>\r\n\r\n <div\r\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\"\r\n [class.tw-cursor-not-allowed]=\"isViewMode()\"\r\n [class.tw-opacity-60]=\"isViewMode()\"\r\n (click)=\"onLockedCardClick()\">\r\n <cide-ele-input formControlName=\"acapt_islocked\" type=\"checkbox\" size=\"md\">\r\n </cide-ele-input>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\r\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Error Display -->\r\n @if (error()) {\r\n <div class=\"tw-mt-6 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <cide-ele-icon variant=\"red\" size=\"sm\">error</cide-ele-icon>\r\n <span class=\"tw-text-sm tw-font-medium tw-text-red-800\">{{ error() }}</span>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Form Actions -->\r\n <div class=\"tw-table-row tw-h-0\">\r\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\">\r\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\r\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\r\n [disabled]=\"loading()\">\r\n Reset Form\r\n </button>\r\n\r\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\r\n [disabled]=\"loading()\">\r\n Cancel\r\n </button>\r\n\r\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || classProgramTermForm.invalid\"\r\n [loading]=\"loading()\" leftIcon=\"save\">\r\n {{ isEditMode() ? 'Update Class Program Term' : 'Create Class Program Term' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n\r\n", 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", "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: 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"], outputs: ["ngModelChange", "change", "searchChange"] }] });
563
563
  }
564
564
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ClassProgramTermCreateComponent, decorators: [{
565
565
  type: Component,
@@ -575,4 +575,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
575
575
  }], ctorParameters: () => [] });
576
576
 
577
577
  export { ClassProgramTermCreateComponent };
578
- //# sourceMappingURL=cloud-ide-academics-class-program-term-create.component-D3PfbSMN.mjs.map
578
+ //# sourceMappingURL=cloud-ide-academics-class-program-term-create.component-BEqM62WC.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-ide-academics-class-program-term-create.component-D3PfbSMN.mjs","sources":["../../../projects/cloud-ide-academics/src/lib/collection/class-program-term-management/components/class-program-term-create/class-program-term-create.component.ts","../../../projects/cloud-ide-academics/src/lib/collection/class-program-term-management/components/class-program-term-create/class-program-term-create.component.html"],"sourcesContent":["import { Component, inject, signal, OnInit, DestroyRef, OnDestroy } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormBuilder, FormGroup, FormArray, ReactiveFormsModule, Validators } from '@angular/forms';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { CideInputComponent, CideTextareaComponent, CideEleButtonComponent, CideIconComponent, CideSelectComponent, NotificationService, ConfirmationService } from 'cloud-ide-element';\r\nimport { AppStateHelperService } from 'cloud-ide-layout';\r\nimport { ENTITY_SERVICE_TOKEN, type IEntityService } from 'cloud-ide-shared';\r\nimport { CideLytClassProgramBranchService } from '../../../class-program-branch-management/services/class-program-branch.service';\r\nimport { CideLytProgramClassService } from '../../../program-class-management/services/program-class.service';\r\nimport { CideLytClassProgramTermService } from '../../services/class-program-term.service';\r\nimport { Observable, forkJoin, of } from 'rxjs';\r\nimport { map, catchError, switchMap } from 'rxjs/operators';\r\nimport { \r\n type AcaClassPrgBranchListPayload,\r\n type AcaClassPrgBranchResponse,\r\n type MClassProgramTermInsertUpdatePayload,\r\n generateObjectFromString\r\n} from 'cloud-ide-lms-model';\r\n\r\n// Interfaces based on the model files\r\ninterface ClassProgramTerm {\r\n _id?: string;\r\n acapt_code?: string;\r\n acapt_name?: string;\r\n acapt_description?: string;\r\n acapt_class_program_id_acacpm?: string;\r\n acapt_class_program_branch_id_acabrn?: string;\r\n acapt_parent_class_prog_term_acapt?: string;\r\n acapt_sequence?: number;\r\n acapt_start_date?: string;\r\n acapt_end_date?: string;\r\n acapt_isactive?: boolean;\r\n acapt_islocked?: boolean;\r\n}\r\n\r\ninterface ProgramClass {\r\n _id?: string;\r\n acacpm_name?: string;\r\n acacpm_code?: string;\r\n acacpm_alise_title?: string;\r\n}\r\n\r\ninterface ClassProgramBranch {\r\n _id?: string;\r\n acabrn_name?: string;\r\n acabrn_code?: string;\r\n acabrn_class_program_id_acacpm?: any;\r\n}\r\n\r\n\r\n@Component({\r\n selector: 'cide-academics-class-program-term-create',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n CideInputComponent,\r\n CideTextareaComponent,\r\n CideEleButtonComponent,\r\n CideIconComponent,\r\n CideSelectComponent\r\n ],\r\n templateUrl: './class-program-term-create.component.html'\r\n})\r\nexport class ClassProgramTermCreateComponent implements OnInit, OnDestroy {\r\n // Dependency injection\r\n private destroyRef = inject(DestroyRef);\r\n private fb = inject(FormBuilder);\r\n private entityService = inject<IEntityService>(ENTITY_SERVICE_TOKEN);\r\n private router = inject(Router);\r\n private route = inject(ActivatedRoute);\r\n private appState = inject(AppStateHelperService);\r\n private notificationService = inject(NotificationService);\r\n private confirmationService = inject(ConfirmationService);\r\n private classProgramBranchService = inject(CideLytClassProgramBranchService);\r\n private programClassService = inject(CideLytProgramClassService);\r\n private classProgramTermService = inject(CideLytClassProgramTermService);\r\n\r\n classProgramTermForm: FormGroup;\r\n loading = signal(false);\r\n error = signal<string | null>(null);\r\n\r\n // Class program term information from route\r\n classProgramTermId = signal<string>('');\r\n isEditMode = signal(false);\r\n isViewMode = signal(false);\r\n\r\n // Data signals\r\n programClasses = signal<ProgramClass[]>([]);\r\n classProgramBranches = signal<ClassProgramBranch[]>([]);\r\n\r\n // Options for dropdowns\r\n programClassOptions = signal<ProgramClass[]>([]);\r\n branchOptions = signal<ClassProgramBranch[]>([]);\r\n parentTermOptions = signal<ClassProgramTerm[]>([]);\r\n\r\n // Route parameters\r\n acabrnId = signal<string | null>(null);\r\n acacpmId = signal<string | null>(null);\r\n\r\n // Date constraints\r\n endDateMinDate = signal<string>('');\r\n\r\n constructor() {\r\n this.classProgramTermForm = this.fb.group({\r\n // Basic Class Program Term Information\r\n acapt_code: ['', [Validators.required]],\r\n acapt_name: ['', [Validators.required]],\r\n acapt_description: [''],\r\n acapt_class_program_id_acacpm: ['', [Validators.required]],\r\n acapt_class_program_branch_id_acabrn: ['', [Validators.required]],\r\n acapt_parent_class_prog_term_acapt: [''],\r\n acapt_start_date: [''],\r\n acapt_end_date: [''],\r\n acapt_isactive: [true],\r\n acapt_islocked: [false]\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n this.initializeComponent();\r\n this.setupFormSubscriptions();\r\n }\r\n\r\n /**\r\n * Setup form subscriptions for dependent dropdowns\r\n */\r\n private setupFormSubscriptions(): void {\r\n // Watch for program class changes to filter branches\r\n this.classProgramTermForm.get('acapt_class_program_id_acacpm')?.valueChanges\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(programClassId => {\r\n if (programClassId) {\r\n this.loadBranchesForProgramClass(programClassId);\r\n // Clear branch selection when program class changes\r\n this.classProgramTermForm.patchValue({\r\n acapt_class_program_branch_id_acabrn: ''\r\n });\r\n } else {\r\n this.branchOptions.set([]);\r\n }\r\n });\r\n\r\n // Watch for branch changes to determine parent term\r\n this.classProgramTermForm.get('acapt_class_program_branch_id_acabrn')?.valueChanges\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(branchId => {\r\n if (branchId) {\r\n this.determineParentTerm(branchId);\r\n } else {\r\n // Clear parent term when branch is cleared\r\n this.classProgramTermForm.patchValue({\r\n acapt_parent_class_prog_term_acapt: ''\r\n });\r\n }\r\n });\r\n\r\n // Watch for parent term changes to set date constraints\r\n this.classProgramTermForm.get('acapt_parent_class_prog_term_acapt')?.valueChanges\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(parentTermId => {\r\n this.loadParentTermDetails(parentTermId);\r\n });\r\n\r\n // Watch for start date changes to set minimum date for end date\r\n this.classProgramTermForm.get('acapt_start_date')?.valueChanges\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(startDate => {\r\n this.updateEndDateMinDate(startDate);\r\n });\r\n }\r\n\r\n /**\r\n * Initialize component\r\n */\r\n private initializeComponent(): void {\r\n // Check route parameters to determine mode\r\n this.checkRouteParams();\r\n \r\n const url = this.router.url;\r\n const queryParams = this.route.snapshot.queryParams;\r\n \r\n if (url.includes('/view/')) {\r\n this.isViewMode.set(true);\r\n this.loadClassProgramTermForView(queryParams);\r\n } else if (url.includes('/edit/')) {\r\n this.isEditMode.set(true);\r\n this.loadClassProgramTermForEdit(queryParams);\r\n } else {\r\n // Create mode\r\n this.isEditMode.set(false);\r\n this.isViewMode.set(false);\r\n }\r\n\r\n // Load dropdown options\r\n this.loadDropdownOptions();\r\n }\r\n\r\n /**\r\n * Check route parameters for acabrn_id and acacpm_id\r\n */\r\n private checkRouteParams(): void {\r\n this.route.params.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(params => {\r\n const queryParams = params['query'];\r\n console.log('🏢 Route params:', params, 'queryParams:', queryParams);\r\n\r\n if (queryParams) {\r\n // Query parameters passed (following page-controls pattern)\r\n const queryData = generateObjectFromString(queryParams);\r\n console.log('🏢 Class Program Term Create params from route:', queryData);\r\n \r\n if (queryData?.acabrn_id) {\r\n this.acabrnId.set(queryData.acabrn_id as string);\r\n console.log('🏢 Branch ID from route:', queryData.acabrn_id);\r\n }\r\n \r\n if (queryData?.acacpm_id) {\r\n this.acacpmId.set(queryData.acacpm_id as string);\r\n console.log('🏢 Class Program ID from route:', queryData.acacpm_id);\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Load class program term for viewing\r\n */\r\n private loadClassProgramTermForView(queryParams: any): void {\r\n // Implementation for view mode\r\n this.classProgramTermForm.disable();\r\n }\r\n\r\n /**\r\n * Load class program term for editing\r\n */\r\n private loadClassProgramTermForEdit(queryParams: any): void {\r\n // Implementation for edit mode\r\n }\r\n\r\n /**\r\n * Load dropdown options\r\n */\r\n private loadDropdownOptions(): void {\r\n // Load program classes\r\n this.loadProgramClasses();\r\n \r\n // Load branches\r\n this.loadClassProgramBranches();\r\n }\r\n\r\n /**\r\n * Load program classes\r\n */\r\n private loadProgramClasses(): void {\r\n this.programClassService.getProgramClassList({ pagination: false })\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n console.log('✅ Program classes loaded:', response);\r\n if (response?.success && response.data) {\r\n this.programClassOptions.set(response.data as ProgramClass[]);\r\n \r\n // Pre-select program class if provided in route\r\n const acacpmId = this.acacpmId();\r\n if (acacpmId) {\r\n this.classProgramTermForm.patchValue({\r\n acapt_class_program_id_acacpm: acacpmId\r\n });\r\n }\r\n } else {\r\n console.warn('⚠️ No program class data received');\r\n this.programClassOptions.set([]);\r\n }\r\n },\r\n error: (error) => {\r\n console.error('❌ Error loading program classes:', error);\r\n this.programClassOptions.set([]);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Load class program branches\r\n */\r\n private loadClassProgramBranches(): void {\r\n const acacpmId = this.acacpmId();\r\n if (acacpmId) {\r\n this.loadBranchesForProgramClass(acacpmId);\r\n }\r\n }\r\n\r\n /**\r\n * Load branches for a specific program class\r\n */\r\n private loadBranchesForProgramClass(programClassId: string): void {\r\n const payload: AcaClassPrgBranchListPayload = {\r\n pagination: false,\r\n pageIndex: 0,\r\n pageSize: 100,\r\n acabrn_class_program_id_acacpm: programClassId\r\n };\r\n\r\n this.classProgramBranchService.getClassProgramBranchList(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response: any) => {\r\n console.log('✅ Class program branches loaded for program class:', programClassId, response);\r\n if (response?.success && response.data) {\r\n this.branchOptions.set(response.data as ClassProgramBranch[]);\r\n \r\n // Pre-select branch if provided in route and not already set\r\n const acabrnId = this.acabrnId();\r\n const currentBranchId = this.classProgramTermForm.get('acapt_class_program_branch_id_acabrn')?.value;\r\n if (acabrnId && !currentBranchId) {\r\n this.classProgramTermForm.patchValue({\r\n acapt_class_program_branch_id_acabrn: acabrnId\r\n });\r\n }\r\n } else {\r\n console.warn('⚠️ No branch data received');\r\n this.branchOptions.set([]);\r\n }\r\n },\r\n error: (error: any) => {\r\n console.error('❌ Error loading branches:', error);\r\n this.branchOptions.set([]);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Determine parent term based on selected branch\r\n * This method will be called internally when branch is selected\r\n */\r\n private determineParentTerm(branchId: string): void {\r\n // Find the selected branch from the options\r\n const selectedBranch = this.branchOptions().find(branch => branch._id === branchId);\r\n \r\n if (selectedBranch) {\r\n console.log('🏢 Determining parent term for branch:', selectedBranch.acabrn_name);\r\n \r\n // Load existing terms for this branch to find potential parent terms\r\n this.loadParentTermsForBranch(branchId);\r\n }\r\n }\r\n\r\n /**\r\n * Load parent terms for a specific branch\r\n */\r\n private loadParentTermsForBranch(branchId: string): void {\r\n // TODO: Implement API call to get existing terms for the branch\r\n // This will help determine which terms can be parent terms\r\n console.log('🏢 Loading parent terms for branch:', branchId);\r\n \r\n // Example implementation - replace with actual API call\r\n // const payload = {\r\n // acabrn_id: branchId,\r\n // pagination: false\r\n // };\r\n \r\n // this.classProgramTermService.getClassProgramTermList(payload)\r\n // .pipe(takeUntilDestroyed(this.destroyRef))\r\n // .subscribe({\r\n // next: (response) => {\r\n // if (response?.success && response.data) {\r\n // // Filter terms that can be parent terms (e.g., terms without parent)\r\n // const parentTerms = response.data.filter(term => !term.acapt_parent_class_prog_term_acapt);\r\n // this.parentTermOptions.set(parentTerms);\r\n // }\r\n // },\r\n // error: (error) => {\r\n // console.error('❌ Error loading parent terms:', error);\r\n // this.parentTermOptions.set([]);\r\n // }\r\n // });\r\n \r\n // For now, set empty array\r\n this.parentTermOptions.set([]);\r\n }\r\n\r\n /**\r\n * Load parent term details for date validation\r\n * This method will be called when a parent term is selected\r\n */\r\n private loadParentTermDetails(parentTermId: string): void {\r\n if (!parentTermId) {\r\n // Clear date constraints when no parent is selected\r\n this.clearDateConstraints();\r\n return;\r\n }\r\n\r\n // TODO: Implement API call to get parent term details\r\n // For now, we'll use mock data or implement based on your API\r\n console.log('🏢 Loading parent term details for ID:', parentTermId);\r\n \r\n // Example implementation - replace with actual API call\r\n // this.classProgramTermService.getClassProgramTermById({ _id: parentTermId })\r\n // .pipe(takeUntilDestroyed(this.destroyRef))\r\n // .subscribe({\r\n // next: (response) => {\r\n // if (response?.success && response.data) {\r\n // const parentTerm = response.data;\r\n // this.setDateConstraints(parentTerm.acapt_start_date, parentTerm.acapt_end_date);\r\n // }\r\n // },\r\n // error: (error) => {\r\n // console.error('❌ Error loading parent term details:', error);\r\n // }\r\n // });\r\n }\r\n\r\n /**\r\n * Set date constraints based on parent term dates\r\n */\r\n private setDateConstraints(parentStartDate: string, parentEndDate: string): void {\r\n console.log('🏢 Setting date constraints:', { parentStartDate, parentEndDate });\r\n \r\n // Update form validation to ensure child dates are within parent range\r\n const startDateControl = this.classProgramTermForm.get('acapt_start_date');\r\n const endDateControl = this.classProgramTermForm.get('acapt_end_date');\r\n \r\n if (startDateControl && endDateControl) {\r\n // Add custom validators for date range\r\n startDateControl.setValidators([\r\n this.dateRangeValidator(parentStartDate, parentEndDate, 'start')\r\n ]);\r\n endDateControl.setValidators([\r\n this.dateRangeValidator(parentStartDate, parentEndDate, 'end')\r\n ]);\r\n \r\n // Update validation\r\n startDateControl.updateValueAndValidity();\r\n endDateControl.updateValueAndValidity();\r\n }\r\n }\r\n\r\n /**\r\n * Clear date constraints when no parent is selected\r\n */\r\n private clearDateConstraints(): void {\r\n const startDateControl = this.classProgramTermForm.get('acapt_start_date');\r\n const endDateControl = this.classProgramTermForm.get('acapt_end_date');\r\n \r\n if (startDateControl && endDateControl) {\r\n // Remove custom validators\r\n startDateControl.clearValidators();\r\n endDateControl.clearValidators();\r\n \r\n // Update validation\r\n startDateControl.updateValueAndValidity();\r\n endDateControl.updateValueAndValidity();\r\n }\r\n }\r\n\r\n /**\r\n * Custom validator for date range constraints\r\n */\r\n private dateRangeValidator(parentStartDate: string, parentEndDate: string, dateType: 'start' | 'end') {\r\n return (control: any) => {\r\n if (!control.value || !parentStartDate || !parentEndDate) {\r\n return null; // No validation if no date or parent dates\r\n }\r\n\r\n const selectedDate = new Date(control.value);\r\n const parentStart = new Date(parentStartDate);\r\n const parentEnd = new Date(parentEndDate);\r\n\r\n if (dateType === 'start') {\r\n // Start date should be >= parent start date and < parent end date\r\n if (selectedDate < parentStart || selectedDate >= parentEnd) {\r\n return { \r\n dateRangeError: { \r\n message: `Start date must be between ${parentStartDate} and ${parentEndDate}` \r\n } \r\n };\r\n }\r\n } else if (dateType === 'end') {\r\n // End date should be > parent start date and <= parent end date\r\n if (selectedDate <= parentStart || selectedDate > parentEnd) {\r\n return { \r\n dateRangeError: { \r\n message: `End date must be between ${parentStartDate} and ${parentEndDate}` \r\n } \r\n };\r\n }\r\n }\r\n\r\n return null; // Valid\r\n };\r\n }\r\n\r\n /**\r\n * Update minimum date for end date based on start date\r\n */\r\n private updateEndDateMinDate(startDate: string): void {\r\n if (startDate) {\r\n // Set the minimum date for end date to be the start date\r\n this.endDateMinDate.set(startDate);\r\n \r\n // If end date is already set and is before the new start date, clear it\r\n const endDate = this.classProgramTermForm.get('acapt_end_date')?.value;\r\n if (endDate && endDate < startDate) {\r\n this.classProgramTermForm.patchValue({\r\n acapt_end_date: ''\r\n });\r\n }\r\n \r\n console.log('🏢 Updated end date minimum date to:', startDate);\r\n } else {\r\n // Clear minimum date constraint if no start date\r\n this.endDateMinDate.set('');\r\n }\r\n }\r\n\r\n\r\n onSubmit() {\r\n if (this.isViewMode()) {\r\n this.router.navigate(['/control-panel/program-term-section-management']);\r\n return;\r\n }\r\n\r\n if (this.classProgramTermForm.invalid) {\r\n this.notificationService.error('Please fill in all required fields correctly.');\r\n this.markFormGroupTouched();\r\n return;\r\n }\r\n\r\n this.loading.set(true);\r\n this.error.set(null);\r\n\r\n const formData = this.classProgramTermForm.value;\r\n console.log('Class Program Term Form Data:', formData);\r\n\r\n // Prepare payload for API call\r\n const payload: MClassProgramTermInsertUpdatePayload = {\r\n acapt_code: formData.acapt_code,\r\n acapt_name: formData.acapt_name,\r\n acapt_class_program_id_acacpm: formData.acapt_class_program_id_acacpm,\r\n acapt_class_prg_branch_acabrn: formData.acapt_class_program_branch_id_acabrn,\r\n acapt_parent_class_prog_term_acapt: formData.acapt_parent_class_prog_term_acapt || null,\r\n acapt_start_date: formData.acapt_start_date,\r\n acapt_end_date: formData.acapt_end_date,\r\n acapt_isactive: formData.acapt_isactive,\r\n acapt_islocked: formData.acapt_islocked\r\n };\r\n\r\n // Add _id for edit mode\r\n if (this.isEditMode() && this.classProgramTermId()) {\r\n payload._id = this.classProgramTermId();\r\n }\r\n\r\n console.log('API Payload:', payload);\r\n\r\n // Make API call\r\n this.classProgramTermService.saveClassProgramTerm(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response: any) => {\r\n console.log('✅ Class program term saved successfully:', response);\r\n \r\n if (response?.success) {\r\n const action = this.isEditMode() ? 'updated' : 'created';\r\n this.notificationService.success(`Class program term has been ${action} successfully.`);\r\n this.router.navigate(['/control-panel/program-term-section-management']);\r\n } else {\r\n this.error.set(response?.message || 'Failed to save class program term');\r\n this.notificationService.error(response?.message || 'Failed to save class program term');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error: any) => {\r\n console.error('❌ Error saving class program term:', error);\r\n this.error.set('Failed to save class program term');\r\n this.notificationService.error('Failed to save class program term. Please try again.');\r\n this.loading.set(false);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Mark all form controls as touched to trigger validation display\r\n */\r\n private markFormGroupTouched(): void {\r\n Object.keys(this.classProgramTermForm.controls).forEach(key => {\r\n const control = this.classProgramTermForm.get(key);\r\n control?.markAsTouched();\r\n });\r\n }\r\n\r\n resetForm() {\r\n this.classProgramTermForm.reset({\r\n acapt_isactive: true,\r\n acapt_islocked: false\r\n });\r\n \r\n // Clear options when form is reset\r\n this.branchOptions.set([]);\r\n this.parentTermOptions.set([]);\r\n \r\n // Clear date constraints\r\n this.clearDateConstraints();\r\n this.endDateMinDate.set('');\r\n }\r\n\r\n /**\r\n * Go back to class program term list\r\n */\r\n goBackToClassProgramTermList(): void {\r\n this.router.navigate(['/control-panel/program-term-section-management']);\r\n }\r\n\r\n /**\r\n * Cancel form and optionally navigate back\r\n */\r\n cancelForm(): void {\r\n if (this.isEditMode()) {\r\n this.goBackToClassProgramTermList();\r\n } else {\r\n this.resetForm();\r\n }\r\n }\r\n\r\n /**\r\n * Get page title based on mode\r\n */\r\n getPageTitle(): string {\r\n if (this.isViewMode()) return 'View Class Program Term';\r\n return this.isEditMode() ? 'Edit Class Program Term' : 'Create New Class Program Term';\r\n }\r\n\r\n /**\r\n * Handle Active card click to toggle checkbox\r\n */\r\n onActiveCardClick(): void {\r\n if (this.isViewMode()) {\r\n return; // Don't allow changes in view mode\r\n }\r\n \r\n const currentValue = this.classProgramTermForm.get('acapt_isactive')?.value;\r\n this.classProgramTermForm.patchValue({\r\n acapt_isactive: !currentValue\r\n });\r\n }\r\n\r\n /**\r\n * Handle Locked card click to toggle checkbox\r\n */\r\n onLockedCardClick(): void {\r\n if (this.isViewMode()) {\r\n return; // Don't allow changes in view mode\r\n }\r\n \r\n const currentValue = this.classProgramTermForm.get('acapt_islocked')?.value;\r\n this.classProgramTermForm.patchValue({\r\n acapt_islocked: !currentValue\r\n });\r\n }\r\n\r\n /**\r\n * Cleanup when component is destroyed\r\n */\r\n ngOnDestroy(): void {\r\n console.log('🧹 ClassProgramTermCreateComponent: Cleaning up component state');\r\n\r\n // Reset all signals to their initial state\r\n this.loading.set(false);\r\n this.error.set(null);\r\n this.classProgramTermId.set('');\r\n this.isEditMode.set(false);\r\n this.programClassOptions.set([]);\r\n this.branchOptions.set([]);\r\n this.parentTermOptions.set([]);\r\n\r\n // Reset form to initial state\r\n this.resetForm();\r\n\r\n console.log('🧹 ClassProgramTermCreateComponent: Component state cleaned up');\r\n }\r\n}\r\n","<!-- \r\n CLASS PROGRAM TERM MASTER FORM\r\n \r\n Enterprise-Level Styling with Tailwind CSS\r\n Features: Responsive grids, proper typography, enhanced user experience\r\n-->\r\n\r\n<div class=\"tw-w-full tw-h-full\">\r\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\" [formGroup]=\"classProgramTermForm\"\r\n [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\r\n\r\n <!-- Simple Header Section -->\r\n <div class=\"tw-table-row tw-w-full tw-h-0\">\r\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\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n\r\n <!-- Title -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">\r\n {{ getPageTitle() }}\r\n </h5>\r\n </div>\r\n\r\n <!-- Actions -->\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <!-- Back button or other actions can be added here if needed -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Form Content -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6\">\r\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\r\n <!-- Class Program Term Information -->\r\n <div class=\"tw-space-y-6\">\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input label=\"Term Code *\" formControlName=\"acapt_code\" placeholder=\"e.g., T1, T2, T3\"\r\n size=\"md\" leadingIcon=\"code\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Term Name *\" formControlName=\"acapt_name\"\r\n placeholder=\"e.g., First Term, Second Term\" size=\"md\" leadingIcon=\"schedule\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <div>\r\n <cide-ele-textarea label=\"Description\" formControlName=\"acapt_description\"\r\n placeholder=\"Enter detailed description of the term...\" rows=\"3\" size=\"md\">\r\n </cide-ele-textarea>\r\n </div>\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input id=\"acapt_start_date\" label=\"Start Date\" formControlName=\"acapt_start_date\" type=\"date\"\r\n size=\"md\" leadingIcon=\"event\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input id=\"acapt_end_date\" label=\"End Date\" formControlName=\"acapt_end_date\" type=\"date\"\r\n [min]=\"endDateMinDate()\" size=\"md\" leadingIcon=\"event\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <div class=\"tw-p-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <cide-ele-icon name=\"info\" class=\"tw-w-4 tw-h-4 tw-text-blue-500\"></cide-ele-icon>\r\n <span class=\"tw-text-sm tw-text-blue-700\">\r\n Sequence will be automatically managed through drag-and-drop on the listing page\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <div class=\"tw-space-y-2\">\r\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Program Class *</label>\r\n <cide-ele-select \r\n formControlName=\"acapt_class_program_id_acacpm\" \r\n placeholder=\"Select program class\"\r\n [disabled]=\"isViewMode()\" \r\n valueKey=\"_id\" \r\n labelKey=\"acacpm_alise_title\" \r\n [options]=\"programClassOptions()\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <div class=\"tw-space-y-2\">\r\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Class Program Branch *</label>\r\n <cide-ele-select \r\n formControlName=\"acapt_class_program_branch_id_acabrn\" \r\n placeholder=\"Select branch\"\r\n [disabled]=\"isViewMode()\" \r\n valueKey=\"_id\" \r\n labelKey=\"acabrn_name\" \r\n [options]=\"branchOptions()\">\r\n </cide-ele-select>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <div\r\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\"\r\n [class.tw-cursor-not-allowed]=\"isViewMode()\"\r\n [class.tw-opacity-60]=\"isViewMode()\"\r\n (click)=\"onActiveCardClick()\">\r\n <cide-ele-input formControlName=\"acapt_isactive\" type=\"checkbox\" size=\"md\">\r\n </cide-ele-input>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\r\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this term</span>\r\n </div>\r\n </div>\r\n\r\n <div\r\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\"\r\n [class.tw-cursor-not-allowed]=\"isViewMode()\"\r\n [class.tw-opacity-60]=\"isViewMode()\"\r\n (click)=\"onLockedCardClick()\">\r\n <cide-ele-input formControlName=\"acapt_islocked\" type=\"checkbox\" size=\"md\">\r\n </cide-ele-input>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\r\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Error Display -->\r\n @if (error()) {\r\n <div class=\"tw-mt-6 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <cide-ele-icon variant=\"red\" size=\"sm\">error</cide-ele-icon>\r\n <span class=\"tw-text-sm tw-font-medium tw-text-red-800\">{{ error() }}</span>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Form Actions -->\r\n <div class=\"tw-table-row tw-h-0\">\r\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\">\r\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\r\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\r\n [disabled]=\"loading()\">\r\n Reset Form\r\n </button>\r\n\r\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\r\n [disabled]=\"loading()\">\r\n Cancel\r\n </button>\r\n\r\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || classProgramTermForm.invalid\"\r\n [loading]=\"loading()\" leftIcon=\"save\">\r\n {{ isEditMode() ? 'Update Class Program Term' : 'Create Class Program Term' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAiEa,+BAA+B,CAAA;;AAElC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC;AACxB,IAAA,aAAa,GAAG,MAAM,CAAiB,oBAAoB,CAAC;AAC5D,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,KAAK,GAAG,MAAM,CAA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oBAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACtB,iBAAiB,+FACjB,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,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIV,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAd3C,SAAS;+BACE,0CAA0C,EAAA,UAAA,EACxC,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,kBAAkB;wBAClB,qBAAqB;wBACrB,sBAAsB;wBACtB,iBAAiB;wBACjB;AACD,qBAAA,EAAA,QAAA,EAAA,qmQAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"cloud-ide-academics-class-program-term-create.component-BEqM62WC.mjs","sources":["../../../projects/cloud-ide-academics/src/lib/collection/class-program-term-management/components/class-program-term-create/class-program-term-create.component.ts","../../../projects/cloud-ide-academics/src/lib/collection/class-program-term-management/components/class-program-term-create/class-program-term-create.component.html"],"sourcesContent":["import { Component, inject, signal, OnInit, DestroyRef, OnDestroy } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FormBuilder, FormGroup, FormArray, ReactiveFormsModule, Validators } from '@angular/forms';\r\nimport { ActivatedRoute, Router } from '@angular/router';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { CideInputComponent, CideTextareaComponent, CideEleButtonComponent, CideIconComponent, CideSelectComponent, NotificationService, ConfirmationService } from 'cloud-ide-element';\r\nimport { AppStateHelperService } from 'cloud-ide-layout';\r\nimport { ENTITY_SERVICE_TOKEN, type IEntityService } from 'cloud-ide-shared';\r\nimport { CideLytClassProgramBranchService } from '../../../class-program-branch-management/services/class-program-branch.service';\r\nimport { CideLytProgramClassService } from '../../../program-class-management/services/program-class.service';\r\nimport { CideLytClassProgramTermService } from '../../services/class-program-term.service';\r\nimport { Observable, forkJoin, of } from 'rxjs';\r\nimport { map, catchError, switchMap } from 'rxjs/operators';\r\nimport { \r\n type AcaClassPrgBranchListPayload,\r\n type AcaClassPrgBranchResponse,\r\n type MClassProgramTermInsertUpdatePayload,\r\n generateObjectFromString\r\n} from 'cloud-ide-lms-model';\r\n\r\n// Interfaces based on the model files\r\ninterface ClassProgramTerm {\r\n _id?: string;\r\n acapt_code?: string;\r\n acapt_name?: string;\r\n acapt_description?: string;\r\n acapt_class_program_id_acacpm?: string;\r\n acapt_class_program_branch_id_acabrn?: string;\r\n acapt_parent_class_prog_term_acapt?: string;\r\n acapt_sequence?: number;\r\n acapt_start_date?: string;\r\n acapt_end_date?: string;\r\n acapt_isactive?: boolean;\r\n acapt_islocked?: boolean;\r\n}\r\n\r\ninterface ProgramClass {\r\n _id?: string;\r\n acacpm_name?: string;\r\n acacpm_code?: string;\r\n acacpm_alise_title?: string;\r\n}\r\n\r\ninterface ClassProgramBranch {\r\n _id?: string;\r\n acabrn_name?: string;\r\n acabrn_code?: string;\r\n acabrn_class_program_id_acacpm?: any;\r\n}\r\n\r\n\r\n@Component({\r\n selector: 'cide-academics-class-program-term-create',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n CideInputComponent,\r\n CideTextareaComponent,\r\n CideEleButtonComponent,\r\n CideIconComponent,\r\n CideSelectComponent\r\n ],\r\n templateUrl: './class-program-term-create.component.html'\r\n})\r\nexport class ClassProgramTermCreateComponent implements OnInit, OnDestroy {\r\n // Dependency injection\r\n private destroyRef = inject(DestroyRef);\r\n private fb = inject(FormBuilder);\r\n private entityService = inject<IEntityService>(ENTITY_SERVICE_TOKEN);\r\n private router = inject(Router);\r\n private route = inject(ActivatedRoute);\r\n private appState = inject(AppStateHelperService);\r\n private notificationService = inject(NotificationService);\r\n private confirmationService = inject(ConfirmationService);\r\n private classProgramBranchService = inject(CideLytClassProgramBranchService);\r\n private programClassService = inject(CideLytProgramClassService);\r\n private classProgramTermService = inject(CideLytClassProgramTermService);\r\n\r\n classProgramTermForm: FormGroup;\r\n loading = signal(false);\r\n error = signal<string | null>(null);\r\n\r\n // Class program term information from route\r\n classProgramTermId = signal<string>('');\r\n isEditMode = signal(false);\r\n isViewMode = signal(false);\r\n\r\n // Data signals\r\n programClasses = signal<ProgramClass[]>([]);\r\n classProgramBranches = signal<ClassProgramBranch[]>([]);\r\n\r\n // Options for dropdowns\r\n programClassOptions = signal<ProgramClass[]>([]);\r\n branchOptions = signal<ClassProgramBranch[]>([]);\r\n parentTermOptions = signal<ClassProgramTerm[]>([]);\r\n\r\n // Route parameters\r\n acabrnId = signal<string | null>(null);\r\n acacpmId = signal<string | null>(null);\r\n\r\n // Date constraints\r\n endDateMinDate = signal<string>('');\r\n\r\n constructor() {\r\n this.classProgramTermForm = this.fb.group({\r\n // Basic Class Program Term Information\r\n acapt_code: ['', [Validators.required]],\r\n acapt_name: ['', [Validators.required]],\r\n acapt_description: [''],\r\n acapt_class_program_id_acacpm: ['', [Validators.required]],\r\n acapt_class_program_branch_id_acabrn: ['', [Validators.required]],\r\n acapt_parent_class_prog_term_acapt: [''],\r\n acapt_start_date: [''],\r\n acapt_end_date: [''],\r\n acapt_isactive: [true],\r\n acapt_islocked: [false]\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n this.initializeComponent();\r\n this.setupFormSubscriptions();\r\n }\r\n\r\n /**\r\n * Setup form subscriptions for dependent dropdowns\r\n */\r\n private setupFormSubscriptions(): void {\r\n // Watch for program class changes to filter branches\r\n this.classProgramTermForm.get('acapt_class_program_id_acacpm')?.valueChanges\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(programClassId => {\r\n if (programClassId) {\r\n this.loadBranchesForProgramClass(programClassId);\r\n // Clear branch selection when program class changes\r\n this.classProgramTermForm.patchValue({\r\n acapt_class_program_branch_id_acabrn: ''\r\n });\r\n } else {\r\n this.branchOptions.set([]);\r\n }\r\n });\r\n\r\n // Watch for branch changes to determine parent term\r\n this.classProgramTermForm.get('acapt_class_program_branch_id_acabrn')?.valueChanges\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(branchId => {\r\n if (branchId) {\r\n this.determineParentTerm(branchId);\r\n } else {\r\n // Clear parent term when branch is cleared\r\n this.classProgramTermForm.patchValue({\r\n acapt_parent_class_prog_term_acapt: ''\r\n });\r\n }\r\n });\r\n\r\n // Watch for parent term changes to set date constraints\r\n this.classProgramTermForm.get('acapt_parent_class_prog_term_acapt')?.valueChanges\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(parentTermId => {\r\n this.loadParentTermDetails(parentTermId);\r\n });\r\n\r\n // Watch for start date changes to set minimum date for end date\r\n this.classProgramTermForm.get('acapt_start_date')?.valueChanges\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(startDate => {\r\n this.updateEndDateMinDate(startDate);\r\n });\r\n }\r\n\r\n /**\r\n * Initialize component\r\n */\r\n private initializeComponent(): void {\r\n // Check route parameters to determine mode\r\n this.checkRouteParams();\r\n \r\n const url = this.router.url;\r\n const queryParams = this.route.snapshot.queryParams;\r\n \r\n if (url.includes('/view/')) {\r\n this.isViewMode.set(true);\r\n this.loadClassProgramTermForView(queryParams);\r\n } else if (url.includes('/edit/')) {\r\n this.isEditMode.set(true);\r\n this.loadClassProgramTermForEdit(queryParams);\r\n } else {\r\n // Create mode\r\n this.isEditMode.set(false);\r\n this.isViewMode.set(false);\r\n }\r\n\r\n // Load dropdown options\r\n this.loadDropdownOptions();\r\n }\r\n\r\n /**\r\n * Check route parameters for acabrn_id and acacpm_id\r\n */\r\n private checkRouteParams(): void {\r\n this.route.params.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(params => {\r\n const queryParams = params['query'];\r\n console.log('🏢 Route params:', params, 'queryParams:', queryParams);\r\n\r\n if (queryParams) {\r\n // Query parameters passed (following page-controls pattern)\r\n const queryData = generateObjectFromString(queryParams);\r\n console.log('🏢 Class Program Term Create params from route:', queryData);\r\n \r\n if (queryData?.acabrn_id) {\r\n this.acabrnId.set(queryData.acabrn_id as string);\r\n console.log('🏢 Branch ID from route:', queryData.acabrn_id);\r\n }\r\n \r\n if (queryData?.acacpm_id) {\r\n this.acacpmId.set(queryData.acacpm_id as string);\r\n console.log('🏢 Class Program ID from route:', queryData.acacpm_id);\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Load class program term for viewing\r\n */\r\n private loadClassProgramTermForView(queryParams: any): void {\r\n // Implementation for view mode\r\n this.classProgramTermForm.disable();\r\n }\r\n\r\n /**\r\n * Load class program term for editing\r\n */\r\n private loadClassProgramTermForEdit(queryParams: any): void {\r\n // Implementation for edit mode\r\n }\r\n\r\n /**\r\n * Load dropdown options\r\n */\r\n private loadDropdownOptions(): void {\r\n // Load program classes\r\n this.loadProgramClasses();\r\n \r\n // Load branches\r\n this.loadClassProgramBranches();\r\n }\r\n\r\n /**\r\n * Load program classes\r\n */\r\n private loadProgramClasses(): void {\r\n this.programClassService.getProgramClassList({ pagination: false })\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n console.log('✅ Program classes loaded:', response);\r\n if (response?.success && response.data) {\r\n this.programClassOptions.set(response.data as ProgramClass[]);\r\n \r\n // Pre-select program class if provided in route\r\n const acacpmId = this.acacpmId();\r\n if (acacpmId) {\r\n this.classProgramTermForm.patchValue({\r\n acapt_class_program_id_acacpm: acacpmId\r\n });\r\n }\r\n } else {\r\n console.warn('⚠️ No program class data received');\r\n this.programClassOptions.set([]);\r\n }\r\n },\r\n error: (error) => {\r\n console.error('❌ Error loading program classes:', error);\r\n this.programClassOptions.set([]);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Load class program branches\r\n */\r\n private loadClassProgramBranches(): void {\r\n const acacpmId = this.acacpmId();\r\n if (acacpmId) {\r\n this.loadBranchesForProgramClass(acacpmId);\r\n }\r\n }\r\n\r\n /**\r\n * Load branches for a specific program class\r\n */\r\n private loadBranchesForProgramClass(programClassId: string): void {\r\n const payload: AcaClassPrgBranchListPayload = {\r\n pagination: false,\r\n pageIndex: 0,\r\n pageSize: 100,\r\n acabrn_class_program_id_acacpm: programClassId\r\n };\r\n\r\n this.classProgramBranchService.getClassProgramBranchList(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response: any) => {\r\n console.log('✅ Class program branches loaded for program class:', programClassId, response);\r\n if (response?.success && response.data) {\r\n this.branchOptions.set(response.data as ClassProgramBranch[]);\r\n \r\n // Pre-select branch if provided in route and not already set\r\n const acabrnId = this.acabrnId();\r\n const currentBranchId = this.classProgramTermForm.get('acapt_class_program_branch_id_acabrn')?.value;\r\n if (acabrnId && !currentBranchId) {\r\n this.classProgramTermForm.patchValue({\r\n acapt_class_program_branch_id_acabrn: acabrnId\r\n });\r\n }\r\n } else {\r\n console.warn('⚠️ No branch data received');\r\n this.branchOptions.set([]);\r\n }\r\n },\r\n error: (error: any) => {\r\n console.error('❌ Error loading branches:', error);\r\n this.branchOptions.set([]);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Determine parent term based on selected branch\r\n * This method will be called internally when branch is selected\r\n */\r\n private determineParentTerm(branchId: string): void {\r\n // Find the selected branch from the options\r\n const selectedBranch = this.branchOptions().find(branch => branch._id === branchId);\r\n \r\n if (selectedBranch) {\r\n console.log('🏢 Determining parent term for branch:', selectedBranch.acabrn_name);\r\n \r\n // Load existing terms for this branch to find potential parent terms\r\n this.loadParentTermsForBranch(branchId);\r\n }\r\n }\r\n\r\n /**\r\n * Load parent terms for a specific branch\r\n */\r\n private loadParentTermsForBranch(branchId: string): void {\r\n // TODO: Implement API call to get existing terms for the branch\r\n // This will help determine which terms can be parent terms\r\n console.log('🏢 Loading parent terms for branch:', branchId);\r\n \r\n // Example implementation - replace with actual API call\r\n // const payload = {\r\n // acabrn_id: branchId,\r\n // pagination: false\r\n // };\r\n \r\n // this.classProgramTermService.getClassProgramTermList(payload)\r\n // .pipe(takeUntilDestroyed(this.destroyRef))\r\n // .subscribe({\r\n // next: (response) => {\r\n // if (response?.success && response.data) {\r\n // // Filter terms that can be parent terms (e.g., terms without parent)\r\n // const parentTerms = response.data.filter(term => !term.acapt_parent_class_prog_term_acapt);\r\n // this.parentTermOptions.set(parentTerms);\r\n // }\r\n // },\r\n // error: (error) => {\r\n // console.error('❌ Error loading parent terms:', error);\r\n // this.parentTermOptions.set([]);\r\n // }\r\n // });\r\n \r\n // For now, set empty array\r\n this.parentTermOptions.set([]);\r\n }\r\n\r\n /**\r\n * Load parent term details for date validation\r\n * This method will be called when a parent term is selected\r\n */\r\n private loadParentTermDetails(parentTermId: string): void {\r\n if (!parentTermId) {\r\n // Clear date constraints when no parent is selected\r\n this.clearDateConstraints();\r\n return;\r\n }\r\n\r\n // TODO: Implement API call to get parent term details\r\n // For now, we'll use mock data or implement based on your API\r\n console.log('🏢 Loading parent term details for ID:', parentTermId);\r\n \r\n // Example implementation - replace with actual API call\r\n // this.classProgramTermService.getClassProgramTermById({ _id: parentTermId })\r\n // .pipe(takeUntilDestroyed(this.destroyRef))\r\n // .subscribe({\r\n // next: (response) => {\r\n // if (response?.success && response.data) {\r\n // const parentTerm = response.data;\r\n // this.setDateConstraints(parentTerm.acapt_start_date, parentTerm.acapt_end_date);\r\n // }\r\n // },\r\n // error: (error) => {\r\n // console.error('❌ Error loading parent term details:', error);\r\n // }\r\n // });\r\n }\r\n\r\n /**\r\n * Set date constraints based on parent term dates\r\n */\r\n private setDateConstraints(parentStartDate: string, parentEndDate: string): void {\r\n console.log('🏢 Setting date constraints:', { parentStartDate, parentEndDate });\r\n \r\n // Update form validation to ensure child dates are within parent range\r\n const startDateControl = this.classProgramTermForm.get('acapt_start_date');\r\n const endDateControl = this.classProgramTermForm.get('acapt_end_date');\r\n \r\n if (startDateControl && endDateControl) {\r\n // Add custom validators for date range\r\n startDateControl.setValidators([\r\n this.dateRangeValidator(parentStartDate, parentEndDate, 'start')\r\n ]);\r\n endDateControl.setValidators([\r\n this.dateRangeValidator(parentStartDate, parentEndDate, 'end')\r\n ]);\r\n \r\n // Update validation\r\n startDateControl.updateValueAndValidity();\r\n endDateControl.updateValueAndValidity();\r\n }\r\n }\r\n\r\n /**\r\n * Clear date constraints when no parent is selected\r\n */\r\n private clearDateConstraints(): void {\r\n const startDateControl = this.classProgramTermForm.get('acapt_start_date');\r\n const endDateControl = this.classProgramTermForm.get('acapt_end_date');\r\n \r\n if (startDateControl && endDateControl) {\r\n // Remove custom validators\r\n startDateControl.clearValidators();\r\n endDateControl.clearValidators();\r\n \r\n // Update validation\r\n startDateControl.updateValueAndValidity();\r\n endDateControl.updateValueAndValidity();\r\n }\r\n }\r\n\r\n /**\r\n * Custom validator for date range constraints\r\n */\r\n private dateRangeValidator(parentStartDate: string, parentEndDate: string, dateType: 'start' | 'end') {\r\n return (control: any) => {\r\n if (!control.value || !parentStartDate || !parentEndDate) {\r\n return null; // No validation if no date or parent dates\r\n }\r\n\r\n const selectedDate = new Date(control.value);\r\n const parentStart = new Date(parentStartDate);\r\n const parentEnd = new Date(parentEndDate);\r\n\r\n if (dateType === 'start') {\r\n // Start date should be >= parent start date and < parent end date\r\n if (selectedDate < parentStart || selectedDate >= parentEnd) {\r\n return { \r\n dateRangeError: { \r\n message: `Start date must be between ${parentStartDate} and ${parentEndDate}` \r\n } \r\n };\r\n }\r\n } else if (dateType === 'end') {\r\n // End date should be > parent start date and <= parent end date\r\n if (selectedDate <= parentStart || selectedDate > parentEnd) {\r\n return { \r\n dateRangeError: { \r\n message: `End date must be between ${parentStartDate} and ${parentEndDate}` \r\n } \r\n };\r\n }\r\n }\r\n\r\n return null; // Valid\r\n };\r\n }\r\n\r\n /**\r\n * Update minimum date for end date based on start date\r\n */\r\n private updateEndDateMinDate(startDate: string): void {\r\n if (startDate) {\r\n // Set the minimum date for end date to be the start date\r\n this.endDateMinDate.set(startDate);\r\n \r\n // If end date is already set and is before the new start date, clear it\r\n const endDate = this.classProgramTermForm.get('acapt_end_date')?.value;\r\n if (endDate && endDate < startDate) {\r\n this.classProgramTermForm.patchValue({\r\n acapt_end_date: ''\r\n });\r\n }\r\n \r\n console.log('🏢 Updated end date minimum date to:', startDate);\r\n } else {\r\n // Clear minimum date constraint if no start date\r\n this.endDateMinDate.set('');\r\n }\r\n }\r\n\r\n\r\n onSubmit() {\r\n if (this.isViewMode()) {\r\n this.router.navigate(['/control-panel/program-term-section-management']);\r\n return;\r\n }\r\n\r\n if (this.classProgramTermForm.invalid) {\r\n this.notificationService.error('Please fill in all required fields correctly.');\r\n this.markFormGroupTouched();\r\n return;\r\n }\r\n\r\n this.loading.set(true);\r\n this.error.set(null);\r\n\r\n const formData = this.classProgramTermForm.value;\r\n console.log('Class Program Term Form Data:', formData);\r\n\r\n // Prepare payload for API call\r\n const payload: MClassProgramTermInsertUpdatePayload = {\r\n acapt_code: formData.acapt_code,\r\n acapt_name: formData.acapt_name,\r\n acapt_class_program_id_acacpm: formData.acapt_class_program_id_acacpm,\r\n acapt_class_prg_branch_acabrn: formData.acapt_class_program_branch_id_acabrn,\r\n acapt_parent_class_prog_term_acapt: formData.acapt_parent_class_prog_term_acapt || null,\r\n acapt_start_date: formData.acapt_start_date,\r\n acapt_end_date: formData.acapt_end_date,\r\n acapt_isactive: formData.acapt_isactive,\r\n acapt_islocked: formData.acapt_islocked\r\n };\r\n\r\n // Add _id for edit mode\r\n if (this.isEditMode() && this.classProgramTermId()) {\r\n payload._id = this.classProgramTermId();\r\n }\r\n\r\n console.log('API Payload:', payload);\r\n\r\n // Make API call\r\n this.classProgramTermService.saveClassProgramTerm(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response: any) => {\r\n console.log('✅ Class program term saved successfully:', response);\r\n \r\n if (response?.success) {\r\n const action = this.isEditMode() ? 'updated' : 'created';\r\n this.notificationService.success(`Class program term has been ${action} successfully.`);\r\n this.router.navigate(['/control-panel/program-term-section-management']);\r\n } else {\r\n this.error.set(response?.message || 'Failed to save class program term');\r\n this.notificationService.error(response?.message || 'Failed to save class program term');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error: any) => {\r\n console.error('❌ Error saving class program term:', error);\r\n this.error.set('Failed to save class program term');\r\n this.notificationService.error('Failed to save class program term. Please try again.');\r\n this.loading.set(false);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Mark all form controls as touched to trigger validation display\r\n */\r\n private markFormGroupTouched(): void {\r\n Object.keys(this.classProgramTermForm.controls).forEach(key => {\r\n const control = this.classProgramTermForm.get(key);\r\n control?.markAsTouched();\r\n });\r\n }\r\n\r\n resetForm() {\r\n this.classProgramTermForm.reset({\r\n acapt_isactive: true,\r\n acapt_islocked: false\r\n });\r\n \r\n // Clear options when form is reset\r\n this.branchOptions.set([]);\r\n this.parentTermOptions.set([]);\r\n \r\n // Clear date constraints\r\n this.clearDateConstraints();\r\n this.endDateMinDate.set('');\r\n }\r\n\r\n /**\r\n * Go back to class program term list\r\n */\r\n goBackToClassProgramTermList(): void {\r\n this.router.navigate(['/control-panel/program-term-section-management']);\r\n }\r\n\r\n /**\r\n * Cancel form and optionally navigate back\r\n */\r\n cancelForm(): void {\r\n if (this.isEditMode()) {\r\n this.goBackToClassProgramTermList();\r\n } else {\r\n this.resetForm();\r\n }\r\n }\r\n\r\n /**\r\n * Get page title based on mode\r\n */\r\n getPageTitle(): string {\r\n if (this.isViewMode()) return 'View Class Program Term';\r\n return this.isEditMode() ? 'Edit Class Program Term' : 'Create New Class Program Term';\r\n }\r\n\r\n /**\r\n * Handle Active card click to toggle checkbox\r\n */\r\n onActiveCardClick(): void {\r\n if (this.isViewMode()) {\r\n return; // Don't allow changes in view mode\r\n }\r\n \r\n const currentValue = this.classProgramTermForm.get('acapt_isactive')?.value;\r\n this.classProgramTermForm.patchValue({\r\n acapt_isactive: !currentValue\r\n });\r\n }\r\n\r\n /**\r\n * Handle Locked card click to toggle checkbox\r\n */\r\n onLockedCardClick(): void {\r\n if (this.isViewMode()) {\r\n return; // Don't allow changes in view mode\r\n }\r\n \r\n const currentValue = this.classProgramTermForm.get('acapt_islocked')?.value;\r\n this.classProgramTermForm.patchValue({\r\n acapt_islocked: !currentValue\r\n });\r\n }\r\n\r\n /**\r\n * Cleanup when component is destroyed\r\n */\r\n ngOnDestroy(): void {\r\n console.log('🧹 ClassProgramTermCreateComponent: Cleaning up component state');\r\n\r\n // Reset all signals to their initial state\r\n this.loading.set(false);\r\n this.error.set(null);\r\n this.classProgramTermId.set('');\r\n this.isEditMode.set(false);\r\n this.programClassOptions.set([]);\r\n this.branchOptions.set([]);\r\n this.parentTermOptions.set([]);\r\n\r\n // Reset form to initial state\r\n this.resetForm();\r\n\r\n console.log('🧹 ClassProgramTermCreateComponent: Component state cleaned up');\r\n }\r\n}\r\n","<!-- \r\n CLASS PROGRAM TERM MASTER FORM\r\n \r\n Enterprise-Level Styling with Tailwind CSS\r\n Features: Responsive grids, proper typography, enhanced user experience\r\n-->\r\n\r\n<div class=\"tw-w-full tw-h-full\">\r\n <form class=\"tw-w-full tw-table tw-h-full tw-bg-transparent\" [formGroup]=\"classProgramTermForm\"\r\n [class.tw-opacity-60]=\"loading()\" (ngSubmit)=\"onSubmit()\">\r\n\r\n <!-- Simple Header Section -->\r\n <div class=\"tw-table-row tw-w-full tw-h-0\">\r\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\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n\r\n <!-- Title -->\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">\r\n {{ getPageTitle() }}\r\n </h5>\r\n </div>\r\n\r\n <!-- Actions -->\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <!-- Back button or other actions can be added here if needed -->\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Form Content -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-w-full tw-px-6 tw-py-6\">\r\n <div class=\"tw-transition-opacity tw-duration-300\" [class.tw-opacity-60]=\"loading()\">\r\n <!-- Class Program Term Information -->\r\n <div class=\"tw-space-y-6\">\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input label=\"Term Code *\" formControlName=\"acapt_code\" placeholder=\"e.g., T1, T2, T3\"\r\n size=\"md\" leadingIcon=\"code\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input label=\"Term Name *\" formControlName=\"acapt_name\"\r\n placeholder=\"e.g., First Term, Second Term\" size=\"md\" leadingIcon=\"schedule\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <div>\r\n <cide-ele-textarea label=\"Description\" formControlName=\"acapt_description\"\r\n placeholder=\"Enter detailed description of the term...\" rows=\"3\" size=\"md\">\r\n </cide-ele-textarea>\r\n </div>\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <cide-ele-input id=\"acapt_start_date\" label=\"Start Date\" formControlName=\"acapt_start_date\" type=\"date\"\r\n size=\"md\" leadingIcon=\"event\">\r\n </cide-ele-input>\r\n\r\n <cide-ele-input id=\"acapt_end_date\" label=\"End Date\" formControlName=\"acapt_end_date\" type=\"date\"\r\n [min]=\"endDateMinDate()\" size=\"md\" leadingIcon=\"event\">\r\n </cide-ele-input>\r\n </div>\r\n\r\n <div class=\"tw-p-3 tw-bg-blue-50 tw-border tw-border-blue-200 tw-rounded-lg\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <cide-ele-icon name=\"info\" class=\"tw-w-4 tw-h-4 tw-text-blue-500\"></cide-ele-icon>\r\n <span class=\"tw-text-sm tw-text-blue-700\">\r\n Sequence will be automatically managed through drag-and-drop on the listing page\r\n </span>\r\n </div>\r\n </div>\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <div class=\"tw-space-y-2\">\r\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Program Class *</label>\r\n <cide-ele-select \r\n formControlName=\"acapt_class_program_id_acacpm\" \r\n placeholder=\"Select program class\"\r\n [disabled]=\"isViewMode()\" \r\n valueKey=\"_id\" \r\n labelKey=\"acacpm_alise_title\" \r\n [options]=\"programClassOptions()\">\r\n </cide-ele-select>\r\n </div>\r\n\r\n <div class=\"tw-space-y-2\">\r\n <label class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Class Program Branch *</label>\r\n <cide-ele-select \r\n formControlName=\"acapt_class_program_branch_id_acabrn\" \r\n placeholder=\"Select branch\"\r\n [disabled]=\"isViewMode()\" \r\n valueKey=\"_id\" \r\n labelKey=\"acabrn_name\" \r\n [options]=\"branchOptions()\">\r\n </cide-ele-select>\r\n </div>\r\n </div>\r\n\r\n\r\n <div class=\"tw-grid tw-grid-cols-1 md:tw-grid-cols-2 tw-gap-6\">\r\n <div\r\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\"\r\n [class.tw-cursor-not-allowed]=\"isViewMode()\"\r\n [class.tw-opacity-60]=\"isViewMode()\"\r\n (click)=\"onActiveCardClick()\">\r\n <cide-ele-input formControlName=\"acapt_isactive\" type=\"checkbox\" size=\"md\">\r\n </cide-ele-input>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Active</span>\r\n <span class=\"tw-text-xs tw-text-gray-500\">Enable/disable this term</span>\r\n </div>\r\n </div>\r\n\r\n <div\r\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\"\r\n [class.tw-cursor-not-allowed]=\"isViewMode()\"\r\n [class.tw-opacity-60]=\"isViewMode()\"\r\n (click)=\"onLockedCardClick()\">\r\n <cide-ele-input formControlName=\"acapt_islocked\" type=\"checkbox\" size=\"md\">\r\n </cide-ele-input>\r\n <div class=\"tw-flex tw-flex-col\">\r\n <span class=\"tw-text-sm tw-font-medium tw-text-gray-700\">Locked</span>\r\n <span class=\"tw-text-xs tw-text-gray-500\">Prevent modifications</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Error Display -->\r\n @if (error()) {\r\n <div class=\"tw-mt-6 tw-p-4 tw-bg-red-50 tw-border tw-border-red-200 tw-rounded-lg\">\r\n <div class=\"tw-flex tw-items-center tw-gap-2\">\r\n <cide-ele-icon variant=\"red\" size=\"sm\">error</cide-ele-icon>\r\n <span class=\"tw-text-sm tw-font-medium tw-text-red-800\">{{ error() }}</span>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n </div>\r\n\r\n <!-- Form Actions -->\r\n <div class=\"tw-table-row tw-h-0\">\r\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\">\r\n <div class=\"tw-flex tw-justify-end tw-gap-4\">\r\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"resetForm()\" leftIcon=\"refresh\"\r\n [disabled]=\"loading()\">\r\n Reset Form\r\n </button>\r\n\r\n <button cideEleButton type=\"button\" variant=\"secondary\" (click)=\"cancelForm()\" leftIcon=\"close\"\r\n [disabled]=\"loading()\">\r\n Cancel\r\n </button>\r\n\r\n <button cideEleButton type=\"submit\" variant=\"primary\" [disabled]=\"loading() || classProgramTermForm.invalid\"\r\n [loading]=\"loading()\" leftIcon=\"save\">\r\n {{ isEditMode() ? 'Update Class Program Term' : 'Create Class Program Term' }}\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n\r\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAiEa,+BAA+B,CAAA;;AAElC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC;AACxB,IAAA,aAAa,GAAG,MAAM,CAAiB,oBAAoB,CAAC;AAC5D,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,IAAA,QAAQ,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACxC,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,IAAA,yBAAyB,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACpE,IAAA,mBAAmB,GAAG,MAAM,CAAC,0BAA0B,CAAC;AACxD,IAAA,uBAAuB,GAAG,MAAM,CAAC,8BAA8B,CAAC;AAExE,IAAA,oBAAoB;AACpB,IAAA,OAAO,GAAG,MAAM,CAAC,KAAK,mDAAC;AACvB,IAAA,KAAK,GAAG,MAAM,CAAgB,IAAI,iDAAC;;AAGnC,IAAA,kBAAkB,GAAG,MAAM,CAAS,EAAE,8DAAC;AACvC,IAA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QAAA,EAAA,cAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAIV,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAd3C,SAAS;+BACE,0CAA0C,EAAA,UAAA,EACxC,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,kBAAkB;wBAClB,qBAAqB;wBACrB,sBAAsB;wBACtB,iBAAiB;wBACjB;AACD,qBAAA,EAAA,QAAA,EAAA,qmQAAA,EAAA;;;;;"}
@@ -387,7 +387,7 @@ class ClassProgramTermListComponent {
387
387
  this.loadClassProgramTerms();
388
388
  }
389
389
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ClassProgramTermListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
390
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: ClassProgramTermListComponent, isStandalone: true, selector: "cide-academics-class-program-term-list", viewQueries: [{ propertyName: "classProgramTermDetailsRendererTemplate", first: true, predicate: ["classProgramTermDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "classProgramTermStatusRendererTemplate", first: true, predicate: ["classProgramTermStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Class Program Term Management Container -->\r\n<div class=\"tw-table tw-w-full tw-h-full\">\r\n\r\n <!-- Header Section -->\r\n <div class=\"tw-table-row tw-h-0\">\r\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Class Program Term Management</h5>\r\n </div>\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <button cideEleButton variant=\"primary\" size=\"sm\" leftIcon=\"add\" (click)=\"createClassProgramTerm()\">\r\n Create Class Program Term\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid Section -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-p-0\">\r\n <cide-ele-data-grid\r\n [config]=\"gridConfig()\"\r\n [templateRenderers]=\"templateRenderers()\"\r\n (gridEvent)=\"onGridEvent($event)\">\r\n </cide-ele-data-grid>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Template Renderers -->\r\n<ng-template #classProgramTermDetailsRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n <div class=\"tw-flex-shrink-0\">\r\n <div class=\"tw-w-10 tw-h-10 tw-bg-orange-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n </div>\r\n </div>\r\n <div class=\"tw-min-w-0 tw-flex-1\">\r\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-m-0\">\r\n {{ item.acapt_name }}\r\n </h6>\r\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\r\n {{ item.acapt_description }}\r\n </p>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #classProgramTermStatusRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n @if (item.acapt_iscurrent) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-blue-100 tw-text-blue-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">star</cide-ele-icon>\r\n Current\r\n </span>\r\n }\r\n @if (item.acapt_islocked) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-yellow-100 tw-text-yellow-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">lock</cide-ele-icon>\r\n Locked\r\n </span>\r\n }\r\n <span [ngClass]=\"{\r\n 'tw-bg-green-100 tw-text-green-800': item.acapt_isactive,\r\n 'tw-bg-red-100 tw-text-red-800': !item.acapt_isactive\r\n }\" class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium\">\r\n <cide-ele-icon [ngClass]=\"{\r\n 'tw-text-green-600': item.acapt_isactive,\r\n 'tw-text-red-600': !item.acapt_isactive\r\n }\" class=\"tw-w-3 tw-h-3 tw-mr-1\">\r\n {{ item.acapt_isactive ? 'check_circle' : 'cancel' }}\r\n </cide-ele-icon>\r\n {{ item.acapt_isactive ? 'Active' : 'Inactive' }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #actionsDropdownRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <cide-ele-dropdown\r\n [items]=\"getActionDropdownItems(item)\"\r\n (itemClick)=\"onDropdownItemClick($event, item)\"\r\n [config]=\"{\r\n triggerIcon: 'more_vert',\r\n triggerSize: 'sm',\r\n usePortal: true\r\n }\"\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n icon=\"more_vert\">\r\n </cide-ele-dropdown>\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideEleDropdownComponent, selector: "cide-ele-dropdown", inputs: ["items", "config", "triggerTemplate", "menuTemplate"], outputs: ["itemClick", "dropdownToggle"] }] });
390
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: ClassProgramTermListComponent, isStandalone: true, selector: "cide-academics-class-program-term-list", viewQueries: [{ propertyName: "classProgramTermDetailsRendererTemplate", first: true, predicate: ["classProgramTermDetailsRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "classProgramTermStatusRendererTemplate", first: true, predicate: ["classProgramTermStatusRendererTemplate"], descendants: true, isSignal: true }, { propertyName: "actionsDropdownRendererTemplate", first: true, predicate: ["actionsDropdownRendererTemplate"], descendants: true, isSignal: true }], ngImport: i0, template: "<!-- Class Program Term Management Container -->\r\n<div class=\"tw-table tw-w-full tw-h-full\">\r\n\r\n <!-- Header Section -->\r\n <div class=\"tw-table-row tw-h-0\">\r\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Class Program Term Management</h5>\r\n </div>\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <button cideEleButton variant=\"primary\" size=\"sm\" leftIcon=\"add\" (click)=\"createClassProgramTerm()\">\r\n Create Class Program Term\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid Section -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-p-0\">\r\n <cide-ele-data-grid\r\n [config]=\"gridConfig()\"\r\n [templateRenderers]=\"templateRenderers()\"\r\n (gridEvent)=\"onGridEvent($event)\">\r\n </cide-ele-data-grid>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Template Renderers -->\r\n<ng-template #classProgramTermDetailsRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n <div class=\"tw-flex-shrink-0\">\r\n <div class=\"tw-w-10 tw-h-10 tw-bg-orange-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n </div>\r\n </div>\r\n <div class=\"tw-min-w-0 tw-flex-1\">\r\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-m-0\">\r\n {{ item.acapt_name }}\r\n </h6>\r\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\r\n {{ item.acapt_description }}\r\n </p>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #classProgramTermStatusRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n @if (item.acapt_iscurrent) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-blue-100 tw-text-blue-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">star</cide-ele-icon>\r\n Current\r\n </span>\r\n }\r\n @if (item.acapt_islocked) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-yellow-100 tw-text-yellow-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">lock</cide-ele-icon>\r\n Locked\r\n </span>\r\n }\r\n <span [ngClass]=\"{\r\n 'tw-bg-green-100 tw-text-green-800': item.acapt_isactive,\r\n 'tw-bg-red-100 tw-text-red-800': !item.acapt_isactive\r\n }\" class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium\">\r\n <cide-ele-icon [ngClass]=\"{\r\n 'tw-text-green-600': item.acapt_isactive,\r\n 'tw-text-red-600': !item.acapt_isactive\r\n }\" class=\"tw-w-3 tw-h-3 tw-mr-1\">\r\n {{ item.acapt_isactive ? 'check_circle' : 'cancel' }}\r\n </cide-ele-icon>\r\n {{ item.acapt_isactive ? 'Active' : 'Inactive' }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #actionsDropdownRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <cide-ele-dropdown\r\n [items]=\"getActionDropdownItems(item)\"\r\n (itemClick)=\"onDropdownItemClick($event, item)\"\r\n [config]=\"{\r\n triggerIcon: 'more_vert',\r\n triggerSize: 'sm',\r\n usePortal: true\r\n }\"\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n icon=\"more_vert\">\r\n </cide-ele-dropdown>\r\n</ng-template>\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], 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"] }] });
391
391
  }
392
392
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ClassProgramTermListComponent, decorators: [{
393
393
  type: Component,
@@ -401,4 +401,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
401
401
  }] });
402
402
 
403
403
  export { ClassProgramTermListComponent };
404
- //# sourceMappingURL=cloud-ide-academics-class-program-term-list.component-Cpbyavgd.mjs.map
404
+ //# sourceMappingURL=cloud-ide-academics-class-program-term-list.component-CaWAHMHN.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloud-ide-academics-class-program-term-list.component-Cpbyavgd.mjs","sources":["../../../projects/cloud-ide-academics/src/lib/collection/class-program-term-management/components/class-program-term-list/class-program-term-list.component.ts","../../../projects/cloud-ide-academics/src/lib/collection/class-program-term-management/components/class-program-term-list/class-program-term-list.component.html"],"sourcesContent":["import { Component, signal, computed, viewChild, TemplateRef, DestroyRef, inject, OnInit } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { CideEleDataGridComponent, CideIconComponent, CideEleButtonComponent, GridConfiguration, GridEvent, CideEleDropdownComponent, DropdownItem, NotificationService, ConfirmationService } from 'cloud-ide-element';\r\nimport { TemplateContext } from 'cloud-ide-element';\r\nimport { AppStateHelperService } from 'cloud-ide-layout';\r\nimport { \r\n type MClassProgramTerm,\r\n type MClassProgramTermDeletePayload,\r\n type MClassProgramTermToggleStatusPayload,\r\n generateObjectFromString\r\n} from 'cloud-ide-lms-model';\r\nimport { CideLytClassProgramTermService } from '../../services/class-program-term.service';\r\n\r\n// Interfaces based on the model files\r\ninterface ClassProgramTerm {\r\n _id?: string;\r\n acapt_code?: string;\r\n acapt_name?: string;\r\n acapt_description?: string;\r\n acapt_class_program_id_acacpm?: {\r\n _id?: string;\r\n acacpm_name?: string;\r\n };\r\n acapt_parent_class_prog_term_acapt?: {\r\n _id?: string;\r\n acapt_name?: string;\r\n };\r\n acapt_isactive?: boolean;\r\n acapt_iscurrent?: boolean;\r\n acapt_islocked?: boolean;\r\n}\r\n\r\n@Component({\r\n selector: 'cide-academics-class-program-term-list',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n CideEleDataGridComponent,\r\n CideIconComponent,\r\n CideEleButtonComponent,\r\n CideEleDropdownComponent\r\n ],\r\n templateUrl: './class-program-term-list.component.html'\r\n})\r\nexport class ClassProgramTermListComponent implements OnInit {\r\n // Dependency injection\r\n private destroyRef = inject(DestroyRef);\r\n private router = inject(Router);\r\n private route = inject(ActivatedRoute);\r\n private appState = inject(AppStateHelperService);\r\n private notificationService = inject(NotificationService);\r\n private confirmationService = inject(ConfirmationService);\r\n private classProgramTermService = inject(CideLytClassProgramTermService);\r\n\r\n // Modern ViewChild signals for template renderers (Angular 20 approach)\r\n classProgramTermDetailsRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('classProgramTermDetailsRendererTemplate');\r\n classProgramTermStatusRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('classProgramTermStatusRendererTemplate');\r\n actionsDropdownRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('actionsDropdownRendererTemplate');\r\n\r\n // Computed template renderers for grid\r\n templateRenderers = computed((): Record<string, TemplateRef<TemplateContext>> => ({\r\n classProgramTermDetailsRenderer: this.classProgramTermDetailsRendererTemplate(),\r\n classProgramTermStatusRenderer: this.classProgramTermStatusRendererTemplate(),\r\n actionsDropdownRenderer: this.actionsDropdownRendererTemplate()\r\n }));\r\n\r\n // Make Math available in template\r\n Math = Math;\r\n\r\n // Signals for reactive state management\r\n classProgramTerms = signal<ClassProgramTerm[]>([]);\r\n loading = signal(false);\r\n error = signal<string | null>(null);\r\n selectedItems = signal<string[]>([]);\r\n searchTerm = signal('');\r\n acabrnId = signal<string | null>(null);\r\n acacpmId = signal<string | null>(null);\r\n\r\n // Derived list filtered by searchTerm\r\n filteredClassProgramTerms = computed(() => {\r\n const q = (this.searchTerm() || '').toLowerCase().trim();\r\n const items = this.classProgramTerms() || [];\r\n if (!q) return items;\r\n return items.filter(cpt => {\r\n const name = (cpt.acapt_name || '').toLowerCase();\r\n const code = (cpt.acapt_code || '').toLowerCase();\r\n const description = (cpt.acapt_description || '').toLowerCase();\r\n return name.includes(q) || code.includes(q) || description.includes(q);\r\n });\r\n });\r\n\r\n // Grid configuration signal\r\n gridConfig = signal<GridConfiguration<ClassProgramTerm>>({\r\n id: 'class-program-term-list-grid',\r\n columns: [\r\n {\r\n key: 'details',\r\n header: 'Term Details',\r\n type: 'custom',\r\n width: 'auto',\r\n truncate: true,\r\n align: 'left',\r\n renderer: 'classProgramTermDetailsRenderer'\r\n },\r\n {\r\n key: 'acapt_code',\r\n header: 'Code',\r\n type: 'text',\r\n width: '120px',\r\n truncate: true,\r\n align: 'left'\r\n },\r\n {\r\n key: 'acapt_class_program_id_acacpm',\r\n header: 'Program Class',\r\n type: 'custom',\r\n width: '200px',\r\n truncate: true,\r\n align: 'left',\r\n renderer: 'programClassRenderer'\r\n },\r\n {\r\n key: 'acapt_parent_class_prog_term_acapt',\r\n header: 'Parent Term',\r\n type: 'custom',\r\n width: '180px',\r\n truncate: true,\r\n align: 'left',\r\n renderer: 'parentTermRenderer'\r\n },\r\n {\r\n key: 'acapt_isactive',\r\n header: 'Status',\r\n type: 'custom',\r\n width: '120px',\r\n truncate: false,\r\n align: 'center',\r\n renderer: 'classProgramTermStatusRenderer'\r\n },\r\n {\r\n key: 'actions',\r\n header: '',\r\n type: 'custom',\r\n width: '150px',\r\n truncate: false,\r\n align: 'center',\r\n renderer: 'actionsDropdownRenderer'\r\n }\r\n ],\r\n data: [],\r\n trackBy: '_id',\r\n pagination: {\r\n enabled: true,\r\n pageSize: 10,\r\n pageSizeOptions: [10, 25, 50, 100],\r\n showQuickJump: true,\r\n showPageInfo: true,\r\n showRefresh: true\r\n },\r\n search: {\r\n enabled: true,\r\n placeholder: 'Search class program terms...',\r\n searchableColumns: ['acapt_name', 'acapt_code', 'acapt_description'],\r\n debounceMs: 300\r\n },\r\n loading: {\r\n useDefer: true,\r\n skeletonRows: 5,\r\n showOverlay: false\r\n },\r\n scroll: {\r\n enabled: true,\r\n maxHeight: '',\r\n minHeight: '',\r\n stickyHeader: true,\r\n virtualScroll: false,\r\n rowHeight: 50\r\n },\r\n responsive: true,\r\n striped: false,\r\n bordered: true,\r\n compact: false,\r\n tableClass: 'tw-table-fixed tw-w-full tw-rounded-none'\r\n });\r\n\r\n /**\r\n * Get action dropdown items\r\n */\r\n getActionDropdownItems(classProgramTerm: ClassProgramTerm): DropdownItem[] {\r\n const items: DropdownItem[] = [\r\n {\r\n id: 'view',\r\n label: 'View Details',\r\n icon: 'visibility',\r\n iconColor: 'tw-text-gray-400',\r\n textColor: 'tw-text-gray-700'\r\n },\r\n {\r\n id: 'edit',\r\n label: 'Edit Term',\r\n icon: 'edit',\r\n iconColor: 'tw-text-blue-400',\r\n textColor: 'tw-text-blue-700'\r\n },\r\n {\r\n id: 'toggleStatus',\r\n label: classProgramTerm.acapt_isactive ? 'Deactivate' : 'Activate',\r\n icon: classProgramTerm.acapt_isactive ? 'toggle_off' : 'toggle_on',\r\n iconColor: classProgramTerm.acapt_isactive ? 'tw-text-orange-400' : 'tw-text-green-400',\r\n textColor: classProgramTerm.acapt_isactive ? 'tw-text-orange-700' : 'tw-text-green-700'\r\n },\r\n {\r\n id: 'delete',\r\n label: 'Delete',\r\n icon: 'delete',\r\n iconColor: 'tw-text-red-400',\r\n textColor: 'tw-text-red-700'\r\n }\r\n ];\r\n\r\n return items;\r\n }\r\n\r\n /**\r\n * Handle dropdown item click\r\n */\r\n onDropdownItemClick(item: DropdownItem, classProgramTerm: ClassProgramTerm): void {\r\n switch (item.id) {\r\n case 'view':\r\n this.viewClassProgramTerm(classProgramTerm);\r\n break;\r\n case 'edit':\r\n this.editClassProgramTerm(classProgramTerm);\r\n break;\r\n case 'toggleStatus':\r\n this.toggleClassProgramTermStatus(classProgramTerm);\r\n break;\r\n case 'delete':\r\n this.deleteClassProgramTerm(classProgramTerm);\r\n break;\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.checkRouteParams();\r\n this.loadClassProgramTerms();\r\n }\r\n\r\n /**\r\n * Check route parameters for acabrn_id and acacpm_id\r\n */\r\n private checkRouteParams(): void {\r\n this.route.params.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(params => {\r\n const queryParams = params['query'];\r\n console.log('🏢 Route params:', params, 'queryParams:', queryParams);\r\n\r\n if (queryParams) {\r\n // Query parameters passed (following page-controls pattern)\r\n const queryData = generateObjectFromString(queryParams);\r\n console.log('🏢 Class Program Term params from route:', queryData);\r\n \r\n if (queryData?.acabrn_id) {\r\n this.acabrnId.set(queryData.acabrn_id as string);\r\n console.log('🏢 Branch ID from route:', queryData.acabrn_id);\r\n }\r\n \r\n if (queryData?.acacpm_id) {\r\n this.acacpmId.set(queryData.acacpm_id as string);\r\n console.log('🏢 Class Program ID from route:', queryData.acacpm_id);\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Load class program terms data\r\n */\r\n private loadClassProgramTerms(): void {\r\n this.loading.set(true);\r\n this.error.set(null);\r\n // Add filter parameters if available\r\n const acabrnId = this.acabrnId();\r\n const acacpmId = this.acacpmId();\r\n const payload: MClassProgramTerm = {\r\n pageIndex: 0,\r\n pageSize: 100,\r\n query: this.searchTerm() || \"\",\r\n sort: {\r\n key: 'acapt_name',\r\n order: 'asc'\r\n },\r\n acapt_class_prg_branch_acabrn: acabrnId as string,\r\n };\r\n\r\n this.classProgramTermService.getClassProgramTermList(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n if (response?.success && response.data) {\r\n console.log('📚 Class program terms loaded:', response.data);\r\n this.classProgramTerms.set(response.data);\r\n this.updateGridData();\r\n this.notificationService.success(`Loaded ${response.data.length} class program term(s) successfully.`);\r\n } else {\r\n console.warn('⚠️ No class program term data received');\r\n this.classProgramTerms.set([]);\r\n this.updateGridData();\r\n this.notificationService.warning('No class program terms found.');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error) => {\r\n console.error('❌ Error loading class program terms:', error);\r\n this.error.set('Failed to load class program terms');\r\n this.loading.set(false);\r\n this.notificationService.error('Failed to load class program terms');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Update grid data\r\n */\r\n private updateGridData(): void {\r\n this.gridConfig.update(config => ({\r\n ...config,\r\n data: this.filteredClassProgramTerms()\r\n }));\r\n }\r\n\r\n /**\r\n * Handle grid events\r\n */\r\n onGridEvent(event: GridEvent<ClassProgramTerm>): void {\r\n switch (event.type) {\r\n case 'pageChange':\r\n if (event.data && typeof event.data === 'object' && 'pageIndex' in event.data && 'pageSize' in event.data) {\r\n this.loadClassProgramTerms();\r\n }\r\n break;\r\n case 'search':\r\n this.searchTerm.set(event.data as string);\r\n this.updateGridData();\r\n break;\r\n case 'refresh':\r\n this.loadClassProgramTerms();\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Create new class program term\r\n */\r\n createClassProgramTerm(): void {\r\n this.router.navigate(['/control-panel/program-term-management/create']);\r\n }\r\n\r\n /**\r\n * View class program term details\r\n */\r\n viewClassProgramTerm(classProgramTerm: ClassProgramTerm): void {\r\n this.router.navigate(['/control-panel/class-program-term/view', classProgramTerm._id]);\r\n }\r\n\r\n /**\r\n * Edit class program term\r\n */\r\n editClassProgramTerm(classProgramTerm: ClassProgramTerm): void {\r\n this.router.navigate(['/control-panel/class-program-term/edit', classProgramTerm._id]);\r\n }\r\n\r\n /**\r\n * Delete class program term\r\n */\r\n deleteClassProgramTerm(classProgramTerm: ClassProgramTerm): void {\r\n this.confirmationService.confirmDelete(classProgramTerm.acapt_name).then((confirmed: boolean) => {\r\n if (confirmed) {\r\n this.loading.set(true);\r\n const payload: MClassProgramTermDeletePayload = {\r\n acapt_id: classProgramTerm._id!\r\n };\r\n\r\n this.classProgramTermService.deleteClassProgramTerm(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n if (response?.success) {\r\n this.classProgramTerms.update(terms => \r\n terms.filter(cpt => cpt._id !== classProgramTerm._id)\r\n );\r\n this.updateGridData();\r\n this.notificationService.success('Class program term deleted successfully.');\r\n } else {\r\n this.notificationService.error('Failed to delete class program term.');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error) => {\r\n console.error('❌ Error deleting class program term:', error);\r\n this.notificationService.error('Failed to delete class program term.');\r\n this.loading.set(false);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Toggle class program term status\r\n */\r\n toggleClassProgramTermStatus(classProgramTerm: ClassProgramTerm): void {\r\n this.loading.set(true);\r\n const payload: MClassProgramTermToggleStatusPayload = {\r\n acapt_id: classProgramTerm._id!\r\n };\r\n\r\n this.classProgramTermService.toggleClassProgramTermStatus(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n if (response?.success) {\r\n this.classProgramTerms.update(terms => \r\n terms.map(cpt => \r\n cpt._id === classProgramTerm._id \r\n ? { ...cpt, acapt_isactive: !cpt.acapt_isactive }\r\n : cpt\r\n )\r\n );\r\n this.updateGridData();\r\n this.notificationService.success(`Class program term ${classProgramTerm.acapt_isactive ? 'deactivated' : 'activated'} successfully.`);\r\n } else {\r\n this.notificationService.error('Failed to toggle class program term status.');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error) => {\r\n console.error('❌ Error toggling class program term status:', error);\r\n this.notificationService.error('Failed to toggle class program term status.');\r\n this.loading.set(false);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Refresh data\r\n */\r\n refreshData(): void {\r\n this.loadClassProgramTerms();\r\n }\r\n}\r\n","<!-- Class Program Term Management Container -->\r\n<div class=\"tw-table tw-w-full tw-h-full\">\r\n\r\n <!-- Header Section -->\r\n <div class=\"tw-table-row tw-h-0\">\r\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Class Program Term Management</h5>\r\n </div>\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <button cideEleButton variant=\"primary\" size=\"sm\" leftIcon=\"add\" (click)=\"createClassProgramTerm()\">\r\n Create Class Program Term\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid Section -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-p-0\">\r\n <cide-ele-data-grid\r\n [config]=\"gridConfig()\"\r\n [templateRenderers]=\"templateRenderers()\"\r\n (gridEvent)=\"onGridEvent($event)\">\r\n </cide-ele-data-grid>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Template Renderers -->\r\n<ng-template #classProgramTermDetailsRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n <div class=\"tw-flex-shrink-0\">\r\n <div class=\"tw-w-10 tw-h-10 tw-bg-orange-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n </div>\r\n </div>\r\n <div class=\"tw-min-w-0 tw-flex-1\">\r\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-m-0\">\r\n {{ item.acapt_name }}\r\n </h6>\r\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\r\n {{ item.acapt_description }}\r\n </p>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #classProgramTermStatusRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n @if (item.acapt_iscurrent) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-blue-100 tw-text-blue-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">star</cide-ele-icon>\r\n Current\r\n </span>\r\n }\r\n @if (item.acapt_islocked) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-yellow-100 tw-text-yellow-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">lock</cide-ele-icon>\r\n Locked\r\n </span>\r\n }\r\n <span [ngClass]=\"{\r\n 'tw-bg-green-100 tw-text-green-800': item.acapt_isactive,\r\n 'tw-bg-red-100 tw-text-red-800': !item.acapt_isactive\r\n }\" class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium\">\r\n <cide-ele-icon [ngClass]=\"{\r\n 'tw-text-green-600': item.acapt_isactive,\r\n 'tw-text-red-600': !item.acapt_isactive\r\n }\" class=\"tw-w-3 tw-h-3 tw-mr-1\">\r\n {{ item.acapt_isactive ? 'check_circle' : 'cancel' }}\r\n </cide-ele-icon>\r\n {{ item.acapt_isactive ? 'Active' : 'Inactive' }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #actionsDropdownRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <cide-ele-dropdown\r\n [items]=\"getActionDropdownItems(item)\"\r\n (itemClick)=\"onDropdownItemClick($event, item)\"\r\n [config]=\"{\r\n triggerIcon: 'more_vert',\r\n triggerSize: 'sm',\r\n usePortal: true\r\n }\"\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n icon=\"more_vert\">\r\n </cide-ele-dropdown>\r\n</ng-template>\r\n"],"names":[],"mappings":";;;;;;;;;;;MA8Ca,6BAA6B,CAAA;;AAEhC,IAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAC/B,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACvB,IAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,IAAA,QAAQ,GAAG,MAAM,CAAC,qBAAqB,CAAC;AACxC,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,IAAA,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,CAAC;AACjD,IAAA,uBAAuB,GAAG,MAAM,CAAC,8BAA8B,CAAC;;AAGxE,IAAA,uCAAuC,GAAG,SAAS,CAAC,QAAQ,CAA+B,yCAAyC,CAAC;AACrI,IAAA,sCAAsC,GAAG,SAAS,CAAC,QAAQ,CAA+B,wCAAwC,CAAC;AACnI,IAAA,+BAA+B,GAAG,SAAS,CAAC,QAAQ,CA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S;+BACE,wCAAwC,EAAA,UAAA,EACtC,IAAI,EAAA,OAAA,EACP;wBACP,YAAY;wBACZ,wBAAwB;wBACxB,iBAAiB;wBACjB,sBAAsB;wBACtB;AACD,qBAAA,EAAA,QAAA,EAAA,qnIAAA,EAAA;;;;;"}
1
+ {"version":3,"file":"cloud-ide-academics-class-program-term-list.component-CaWAHMHN.mjs","sources":["../../../projects/cloud-ide-academics/src/lib/collection/class-program-term-management/components/class-program-term-list/class-program-term-list.component.ts","../../../projects/cloud-ide-academics/src/lib/collection/class-program-term-management/components/class-program-term-list/class-program-term-list.component.html"],"sourcesContent":["import { Component, signal, computed, viewChild, TemplateRef, DestroyRef, inject, OnInit } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { Router, ActivatedRoute } from '@angular/router';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { CideEleDataGridComponent, CideIconComponent, CideEleButtonComponent, GridConfiguration, GridEvent, CideEleDropdownComponent, DropdownItem, NotificationService, ConfirmationService } from 'cloud-ide-element';\r\nimport { TemplateContext } from 'cloud-ide-element';\r\nimport { AppStateHelperService } from 'cloud-ide-layout';\r\nimport { \r\n type MClassProgramTerm,\r\n type MClassProgramTermDeletePayload,\r\n type MClassProgramTermToggleStatusPayload,\r\n generateObjectFromString\r\n} from 'cloud-ide-lms-model';\r\nimport { CideLytClassProgramTermService } from '../../services/class-program-term.service';\r\n\r\n// Interfaces based on the model files\r\ninterface ClassProgramTerm {\r\n _id?: string;\r\n acapt_code?: string;\r\n acapt_name?: string;\r\n acapt_description?: string;\r\n acapt_class_program_id_acacpm?: {\r\n _id?: string;\r\n acacpm_name?: string;\r\n };\r\n acapt_parent_class_prog_term_acapt?: {\r\n _id?: string;\r\n acapt_name?: string;\r\n };\r\n acapt_isactive?: boolean;\r\n acapt_iscurrent?: boolean;\r\n acapt_islocked?: boolean;\r\n}\r\n\r\n@Component({\r\n selector: 'cide-academics-class-program-term-list',\r\n standalone: true,\r\n imports: [\r\n CommonModule,\r\n CideEleDataGridComponent,\r\n CideIconComponent,\r\n CideEleButtonComponent,\r\n CideEleDropdownComponent\r\n ],\r\n templateUrl: './class-program-term-list.component.html'\r\n})\r\nexport class ClassProgramTermListComponent implements OnInit {\r\n // Dependency injection\r\n private destroyRef = inject(DestroyRef);\r\n private router = inject(Router);\r\n private route = inject(ActivatedRoute);\r\n private appState = inject(AppStateHelperService);\r\n private notificationService = inject(NotificationService);\r\n private confirmationService = inject(ConfirmationService);\r\n private classProgramTermService = inject(CideLytClassProgramTermService);\r\n\r\n // Modern ViewChild signals for template renderers (Angular 20 approach)\r\n classProgramTermDetailsRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('classProgramTermDetailsRendererTemplate');\r\n classProgramTermStatusRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('classProgramTermStatusRendererTemplate');\r\n actionsDropdownRendererTemplate = viewChild.required<TemplateRef<TemplateContext>>('actionsDropdownRendererTemplate');\r\n\r\n // Computed template renderers for grid\r\n templateRenderers = computed((): Record<string, TemplateRef<TemplateContext>> => ({\r\n classProgramTermDetailsRenderer: this.classProgramTermDetailsRendererTemplate(),\r\n classProgramTermStatusRenderer: this.classProgramTermStatusRendererTemplate(),\r\n actionsDropdownRenderer: this.actionsDropdownRendererTemplate()\r\n }));\r\n\r\n // Make Math available in template\r\n Math = Math;\r\n\r\n // Signals for reactive state management\r\n classProgramTerms = signal<ClassProgramTerm[]>([]);\r\n loading = signal(false);\r\n error = signal<string | null>(null);\r\n selectedItems = signal<string[]>([]);\r\n searchTerm = signal('');\r\n acabrnId = signal<string | null>(null);\r\n acacpmId = signal<string | null>(null);\r\n\r\n // Derived list filtered by searchTerm\r\n filteredClassProgramTerms = computed(() => {\r\n const q = (this.searchTerm() || '').toLowerCase().trim();\r\n const items = this.classProgramTerms() || [];\r\n if (!q) return items;\r\n return items.filter(cpt => {\r\n const name = (cpt.acapt_name || '').toLowerCase();\r\n const code = (cpt.acapt_code || '').toLowerCase();\r\n const description = (cpt.acapt_description || '').toLowerCase();\r\n return name.includes(q) || code.includes(q) || description.includes(q);\r\n });\r\n });\r\n\r\n // Grid configuration signal\r\n gridConfig = signal<GridConfiguration<ClassProgramTerm>>({\r\n id: 'class-program-term-list-grid',\r\n columns: [\r\n {\r\n key: 'details',\r\n header: 'Term Details',\r\n type: 'custom',\r\n width: 'auto',\r\n truncate: true,\r\n align: 'left',\r\n renderer: 'classProgramTermDetailsRenderer'\r\n },\r\n {\r\n key: 'acapt_code',\r\n header: 'Code',\r\n type: 'text',\r\n width: '120px',\r\n truncate: true,\r\n align: 'left'\r\n },\r\n {\r\n key: 'acapt_class_program_id_acacpm',\r\n header: 'Program Class',\r\n type: 'custom',\r\n width: '200px',\r\n truncate: true,\r\n align: 'left',\r\n renderer: 'programClassRenderer'\r\n },\r\n {\r\n key: 'acapt_parent_class_prog_term_acapt',\r\n header: 'Parent Term',\r\n type: 'custom',\r\n width: '180px',\r\n truncate: true,\r\n align: 'left',\r\n renderer: 'parentTermRenderer'\r\n },\r\n {\r\n key: 'acapt_isactive',\r\n header: 'Status',\r\n type: 'custom',\r\n width: '120px',\r\n truncate: false,\r\n align: 'center',\r\n renderer: 'classProgramTermStatusRenderer'\r\n },\r\n {\r\n key: 'actions',\r\n header: '',\r\n type: 'custom',\r\n width: '150px',\r\n truncate: false,\r\n align: 'center',\r\n renderer: 'actionsDropdownRenderer'\r\n }\r\n ],\r\n data: [],\r\n trackBy: '_id',\r\n pagination: {\r\n enabled: true,\r\n pageSize: 10,\r\n pageSizeOptions: [10, 25, 50, 100],\r\n showQuickJump: true,\r\n showPageInfo: true,\r\n showRefresh: true\r\n },\r\n search: {\r\n enabled: true,\r\n placeholder: 'Search class program terms...',\r\n searchableColumns: ['acapt_name', 'acapt_code', 'acapt_description'],\r\n debounceMs: 300\r\n },\r\n loading: {\r\n useDefer: true,\r\n skeletonRows: 5,\r\n showOverlay: false\r\n },\r\n scroll: {\r\n enabled: true,\r\n maxHeight: '',\r\n minHeight: '',\r\n stickyHeader: true,\r\n virtualScroll: false,\r\n rowHeight: 50\r\n },\r\n responsive: true,\r\n striped: false,\r\n bordered: true,\r\n compact: false,\r\n tableClass: 'tw-table-fixed tw-w-full tw-rounded-none'\r\n });\r\n\r\n /**\r\n * Get action dropdown items\r\n */\r\n getActionDropdownItems(classProgramTerm: ClassProgramTerm): DropdownItem[] {\r\n const items: DropdownItem[] = [\r\n {\r\n id: 'view',\r\n label: 'View Details',\r\n icon: 'visibility',\r\n iconColor: 'tw-text-gray-400',\r\n textColor: 'tw-text-gray-700'\r\n },\r\n {\r\n id: 'edit',\r\n label: 'Edit Term',\r\n icon: 'edit',\r\n iconColor: 'tw-text-blue-400',\r\n textColor: 'tw-text-blue-700'\r\n },\r\n {\r\n id: 'toggleStatus',\r\n label: classProgramTerm.acapt_isactive ? 'Deactivate' : 'Activate',\r\n icon: classProgramTerm.acapt_isactive ? 'toggle_off' : 'toggle_on',\r\n iconColor: classProgramTerm.acapt_isactive ? 'tw-text-orange-400' : 'tw-text-green-400',\r\n textColor: classProgramTerm.acapt_isactive ? 'tw-text-orange-700' : 'tw-text-green-700'\r\n },\r\n {\r\n id: 'delete',\r\n label: 'Delete',\r\n icon: 'delete',\r\n iconColor: 'tw-text-red-400',\r\n textColor: 'tw-text-red-700'\r\n }\r\n ];\r\n\r\n return items;\r\n }\r\n\r\n /**\r\n * Handle dropdown item click\r\n */\r\n onDropdownItemClick(item: DropdownItem, classProgramTerm: ClassProgramTerm): void {\r\n switch (item.id) {\r\n case 'view':\r\n this.viewClassProgramTerm(classProgramTerm);\r\n break;\r\n case 'edit':\r\n this.editClassProgramTerm(classProgramTerm);\r\n break;\r\n case 'toggleStatus':\r\n this.toggleClassProgramTermStatus(classProgramTerm);\r\n break;\r\n case 'delete':\r\n this.deleteClassProgramTerm(classProgramTerm);\r\n break;\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.checkRouteParams();\r\n this.loadClassProgramTerms();\r\n }\r\n\r\n /**\r\n * Check route parameters for acabrn_id and acacpm_id\r\n */\r\n private checkRouteParams(): void {\r\n this.route.params.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(params => {\r\n const queryParams = params['query'];\r\n console.log('🏢 Route params:', params, 'queryParams:', queryParams);\r\n\r\n if (queryParams) {\r\n // Query parameters passed (following page-controls pattern)\r\n const queryData = generateObjectFromString(queryParams);\r\n console.log('🏢 Class Program Term params from route:', queryData);\r\n \r\n if (queryData?.acabrn_id) {\r\n this.acabrnId.set(queryData.acabrn_id as string);\r\n console.log('🏢 Branch ID from route:', queryData.acabrn_id);\r\n }\r\n \r\n if (queryData?.acacpm_id) {\r\n this.acacpmId.set(queryData.acacpm_id as string);\r\n console.log('🏢 Class Program ID from route:', queryData.acacpm_id);\r\n }\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Load class program terms data\r\n */\r\n private loadClassProgramTerms(): void {\r\n this.loading.set(true);\r\n this.error.set(null);\r\n // Add filter parameters if available\r\n const acabrnId = this.acabrnId();\r\n const acacpmId = this.acacpmId();\r\n const payload: MClassProgramTerm = {\r\n pageIndex: 0,\r\n pageSize: 100,\r\n query: this.searchTerm() || \"\",\r\n sort: {\r\n key: 'acapt_name',\r\n order: 'asc'\r\n },\r\n acapt_class_prg_branch_acabrn: acabrnId as string,\r\n };\r\n\r\n this.classProgramTermService.getClassProgramTermList(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n if (response?.success && response.data) {\r\n console.log('📚 Class program terms loaded:', response.data);\r\n this.classProgramTerms.set(response.data);\r\n this.updateGridData();\r\n this.notificationService.success(`Loaded ${response.data.length} class program term(s) successfully.`);\r\n } else {\r\n console.warn('⚠️ No class program term data received');\r\n this.classProgramTerms.set([]);\r\n this.updateGridData();\r\n this.notificationService.warning('No class program terms found.');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error) => {\r\n console.error('❌ Error loading class program terms:', error);\r\n this.error.set('Failed to load class program terms');\r\n this.loading.set(false);\r\n this.notificationService.error('Failed to load class program terms');\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Update grid data\r\n */\r\n private updateGridData(): void {\r\n this.gridConfig.update(config => ({\r\n ...config,\r\n data: this.filteredClassProgramTerms()\r\n }));\r\n }\r\n\r\n /**\r\n * Handle grid events\r\n */\r\n onGridEvent(event: GridEvent<ClassProgramTerm>): void {\r\n switch (event.type) {\r\n case 'pageChange':\r\n if (event.data && typeof event.data === 'object' && 'pageIndex' in event.data && 'pageSize' in event.data) {\r\n this.loadClassProgramTerms();\r\n }\r\n break;\r\n case 'search':\r\n this.searchTerm.set(event.data as string);\r\n this.updateGridData();\r\n break;\r\n case 'refresh':\r\n this.loadClassProgramTerms();\r\n break;\r\n }\r\n }\r\n\r\n /**\r\n * Create new class program term\r\n */\r\n createClassProgramTerm(): void {\r\n this.router.navigate(['/control-panel/program-term-management/create']);\r\n }\r\n\r\n /**\r\n * View class program term details\r\n */\r\n viewClassProgramTerm(classProgramTerm: ClassProgramTerm): void {\r\n this.router.navigate(['/control-panel/class-program-term/view', classProgramTerm._id]);\r\n }\r\n\r\n /**\r\n * Edit class program term\r\n */\r\n editClassProgramTerm(classProgramTerm: ClassProgramTerm): void {\r\n this.router.navigate(['/control-panel/class-program-term/edit', classProgramTerm._id]);\r\n }\r\n\r\n /**\r\n * Delete class program term\r\n */\r\n deleteClassProgramTerm(classProgramTerm: ClassProgramTerm): void {\r\n this.confirmationService.confirmDelete(classProgramTerm.acapt_name).then((confirmed: boolean) => {\r\n if (confirmed) {\r\n this.loading.set(true);\r\n const payload: MClassProgramTermDeletePayload = {\r\n acapt_id: classProgramTerm._id!\r\n };\r\n\r\n this.classProgramTermService.deleteClassProgramTerm(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n if (response?.success) {\r\n this.classProgramTerms.update(terms => \r\n terms.filter(cpt => cpt._id !== classProgramTerm._id)\r\n );\r\n this.updateGridData();\r\n this.notificationService.success('Class program term deleted successfully.');\r\n } else {\r\n this.notificationService.error('Failed to delete class program term.');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error) => {\r\n console.error('❌ Error deleting class program term:', error);\r\n this.notificationService.error('Failed to delete class program term.');\r\n this.loading.set(false);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Toggle class program term status\r\n */\r\n toggleClassProgramTermStatus(classProgramTerm: ClassProgramTerm): void {\r\n this.loading.set(true);\r\n const payload: MClassProgramTermToggleStatusPayload = {\r\n acapt_id: classProgramTerm._id!\r\n };\r\n\r\n this.classProgramTermService.toggleClassProgramTermStatus(payload)\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (response) => {\r\n if (response?.success) {\r\n this.classProgramTerms.update(terms => \r\n terms.map(cpt => \r\n cpt._id === classProgramTerm._id \r\n ? { ...cpt, acapt_isactive: !cpt.acapt_isactive }\r\n : cpt\r\n )\r\n );\r\n this.updateGridData();\r\n this.notificationService.success(`Class program term ${classProgramTerm.acapt_isactive ? 'deactivated' : 'activated'} successfully.`);\r\n } else {\r\n this.notificationService.error('Failed to toggle class program term status.');\r\n }\r\n this.loading.set(false);\r\n },\r\n error: (error) => {\r\n console.error('❌ Error toggling class program term status:', error);\r\n this.notificationService.error('Failed to toggle class program term status.');\r\n this.loading.set(false);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Refresh data\r\n */\r\n refreshData(): void {\r\n this.loadClassProgramTerms();\r\n }\r\n}\r\n","<!-- Class Program Term Management Container -->\r\n<div class=\"tw-table tw-w-full tw-h-full\">\r\n\r\n <!-- Header Section -->\r\n <div class=\"tw-table-row tw-h-0\">\r\n <div class=\"tw-table-cell tw-px-6 tw-py-3 tw-border-b tw-border-gray-200 tw-bg-gray-50\">\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-justify-between tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n <h5 class=\"tw-text-base tw-font-medium tw-text-gray-900 tw-m-0\">Class Program Term Management</h5>\r\n </div>\r\n <div\r\n class=\"tw-flex tw-flex-col sm:tw-flex-row tw-items-start sm:tw-items-center tw-space-y-3 sm:tw-space-y-0 sm:tw-space-x-3\">\r\n <button cideEleButton variant=\"primary\" size=\"sm\" leftIcon=\"add\" (click)=\"createClassProgramTerm()\">\r\n Create Class Program Term\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- Data Grid Section -->\r\n <div class=\"tw-table-row\">\r\n <div class=\"tw-table-cell tw-p-0\">\r\n <cide-ele-data-grid\r\n [config]=\"gridConfig()\"\r\n [templateRenderers]=\"templateRenderers()\"\r\n (gridEvent)=\"onGridEvent($event)\">\r\n </cide-ele-data-grid>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- Template Renderers -->\r\n<ng-template #classProgramTermDetailsRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-3\">\r\n <div class=\"tw-flex-shrink-0\">\r\n <div class=\"tw-w-10 tw-h-10 tw-bg-orange-100 tw-rounded-lg tw-flex tw-items-center tw-justify-center\">\r\n <cide-ele-icon class=\"tw-text-orange-600 tw-w-5 tw-h-5\">schedule</cide-ele-icon>\r\n </div>\r\n </div>\r\n <div class=\"tw-min-w-0 tw-flex-1\">\r\n <h6 class=\"tw-text-sm tw-font-semibold tw-text-gray-900 tw-truncate tw-m-0\">\r\n {{ item.acapt_name }}\r\n </h6>\r\n <p class=\"tw-text-xs tw-text-gray-500 tw-truncate tw-m-0\">\r\n {{ item.acapt_description }}\r\n </p>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #classProgramTermStatusRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\r\n @if (item.acapt_iscurrent) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-blue-100 tw-text-blue-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">star</cide-ele-icon>\r\n Current\r\n </span>\r\n }\r\n @if (item.acapt_islocked) {\r\n <span class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium tw-bg-yellow-100 tw-text-yellow-800\">\r\n <cide-ele-icon class=\"tw-w-3 tw-h-3 tw-mr-1\">lock</cide-ele-icon>\r\n Locked\r\n </span>\r\n }\r\n <span [ngClass]=\"{\r\n 'tw-bg-green-100 tw-text-green-800': item.acapt_isactive,\r\n 'tw-bg-red-100 tw-text-red-800': !item.acapt_isactive\r\n }\" class=\"tw-inline-flex tw-items-center tw-px-2 tw-py-1 tw-rounded-full tw-text-xs tw-font-medium\">\r\n <cide-ele-icon [ngClass]=\"{\r\n 'tw-text-green-600': item.acapt_isactive,\r\n 'tw-text-red-600': !item.acapt_isactive\r\n }\" class=\"tw-w-3 tw-h-3 tw-mr-1\">\r\n {{ item.acapt_isactive ? 'check_circle' : 'cancel' }}\r\n </cide-ele-icon>\r\n {{ item.acapt_isactive ? 'Active' : 'Inactive' }}\r\n </span>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #actionsDropdownRendererTemplate let-value=\"value\" let-item=\"item\" let-column=\"column\">\r\n <cide-ele-dropdown\r\n [items]=\"getActionDropdownItems(item)\"\r\n (itemClick)=\"onDropdownItemClick($event, item)\"\r\n [config]=\"{\r\n triggerIcon: 'more_vert',\r\n triggerSize: 'sm',\r\n usePortal: true\r\n }\"\r\n size=\"sm\"\r\n variant=\"ghost\"\r\n icon=\"more_vert\">\r\n </cide-ele-dropdown>\r\n</ng-template>\r\n"],"names":[],"mappings":";;;;;;;;;;;MA8Ca,6BAA6B,CAAA;;AAE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