cloud-ide-core 2.0.89 → 2.0.91

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.
@@ -9,7 +9,7 @@ import { Router, ActivatedRoute } from '@angular/router';
9
9
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
10
10
  import { BehaviorSubject, throwError, Observable, Subject, takeUntil, debounceTime, distinctUntilChanged } from 'rxjs';
11
11
  import { tap, catchError, map } from 'rxjs/operators';
12
- import { coreRoutesUrl, generateStringFromObject, cidePath, hostManagerRoutesUrl, MDesignationInsertUpdatePayload, MDesignation, MGradeLevel, generateObjectFromString, userRoutesUrl, AuthUserMstGetByIdPayload, customEncrypt, customDecrypt, AuthUserMstListPayload, academicsRoutesUrl } from 'cloud-ide-lms-model';
12
+ import { coreRoutesUrl, generateStringFromObject, cidePath, hostManagerRoutesUrl, MDepartment, MDesignationInsertUpdatePayload, MDesignation, MGradeLevel, generateObjectFromString, userRoutesUrl, AuthUserMstGetByIdPayload, customEncrypt, customDecrypt, AuthUserMstListPayload, academicsRoutesUrl } from 'cloud-ide-lms-model';
13
13
  import * as i1 from '@angular/common/http';
14
14
  import { HttpClient } from '@angular/common/http';
15
15
  import { NotificationService, CideEleDataGridComponent, CideEleButtonComponent, CideInputComponent, CideSelectComponent, CideTextareaComponent, CideIconComponent, CideEleDropdownComponent, ConfirmationService, CideEleGlobalNotificationsComponent, CideEleConfirmationModalComponent, CideEleJsonEditorComponent, CideEleFileInputComponent, CideEleFileImageDirective, CideFormFieldErrorComponent, CideEleFileManagerService, CideEleTabComponent, CideEleFloatingFeaturesService, CideEleToastNotificationComponent } from 'cloud-ide-element';
@@ -2795,12 +2795,20 @@ class CideCoreDepartmentListComponent {
2795
2795
  console.log('🚀 CideCoreDepartmentListComponent.loadDepartments() called');
2796
2796
  this.loading.set(true);
2797
2797
  this.error.set(null);
2798
- const requestBody = {
2798
+ const activeEntityId = this.appState.getActiveEntityId();
2799
+ if (!activeEntityId) {
2800
+ console.error('❌ No active entity ID found');
2801
+ this.error.set('No active entity selected');
2802
+ this.loading.set(false);
2803
+ return;
2804
+ }
2805
+ const requestBody = new MDepartment({
2799
2806
  total: this.totalItems(),
2800
2807
  pageIndex: this.currentPage(),
2801
2808
  pageSize: this.pageSize(),
2802
- query: this.searchTerm()
2803
- };
2809
+ query: this.searchTerm(),
2810
+ sydept_entity_id_syen: activeEntityId
2811
+ });
2804
2812
  console.log('📋 Request body:', requestBody);
2805
2813
  if (!this.departmentService) {
2806
2814
  console.error('❌ DepartmentService is not available');
@@ -3923,7 +3931,10 @@ class CideCoreDesignationListComponent {
3923
3931
  */
3924
3932
  initializeComponent() {
3925
3933
  console.log('CideCoreDesignationListComponent initialized with modern Angular patterns');
3926
- // Load designations first since department and grade level data is populated in the response
3934
+ // Load departments and grade levels first for dropdown options
3935
+ this.loadDepartments();
3936
+ this.loadGradeLevels();
3937
+ // Then load designations
3927
3938
  this.loadDesignations();
3928
3939
  this.setupEventListeners();
3929
3940
  this.exposeGlobalFunctions();
@@ -4018,12 +4029,18 @@ class CideCoreDesignationListComponent {
4018
4029
  console.error('❌ DepartmentService is not available');
4019
4030
  return;
4020
4031
  }
4021
- const requestBody = {
4032
+ const activeEntityId = this.appState.getActiveEntityId();
4033
+ if (!activeEntityId) {
4034
+ console.error('❌ No active entity ID found for departments');
4035
+ return;
4036
+ }
4037
+ const requestBody = new MDepartment({
4022
4038
  total: 0,
4023
4039
  pageIndex: 1,
4024
- pageSize: 1000, // Load all departments
4025
- query: ''
4026
- };
4040
+ pageSize: 1000, // Load all departments for dropdown
4041
+ query: '',
4042
+ sydept_entity_id_syen: activeEntityId
4043
+ });
4027
4044
  this.departmentService.getDepartmentList(requestBody)
4028
4045
  .pipe(takeUntilDestroyed(this.destroyRef))
4029
4046
  .subscribe({