cloud-ide-core 2.0.89 → 2.0.90
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
|
|
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');
|
|
@@ -4018,12 +4026,18 @@ class CideCoreDesignationListComponent {
|
|
|
4018
4026
|
console.error('❌ DepartmentService is not available');
|
|
4019
4027
|
return;
|
|
4020
4028
|
}
|
|
4021
|
-
const
|
|
4029
|
+
const activeEntityId = this.appState.getActiveEntityId();
|
|
4030
|
+
if (!activeEntityId) {
|
|
4031
|
+
console.error('❌ No active entity ID found for departments');
|
|
4032
|
+
return;
|
|
4033
|
+
}
|
|
4034
|
+
const requestBody = new MDepartment({
|
|
4022
4035
|
total: 0,
|
|
4023
4036
|
pageIndex: 1,
|
|
4024
|
-
pageSize: 1000, // Load all departments
|
|
4025
|
-
query: ''
|
|
4026
|
-
|
|
4037
|
+
pageSize: 1000, // Load all departments for dropdown
|
|
4038
|
+
query: '',
|
|
4039
|
+
sydept_entity_id_syen: activeEntityId
|
|
4040
|
+
});
|
|
4027
4041
|
this.departmentService.getDepartmentList(requestBody)
|
|
4028
4042
|
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
4029
4043
|
.subscribe({
|