cloud-ide-layout 1.0.174 → 1.0.176

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 (13) hide show
  1. package/fesm2022/{cloud-ide-layout-cloud-ide-layout-Cwim-wD5.mjs → cloud-ide-layout-cloud-ide-layout-CC-eJdik.mjs} +41 -6
  2. package/fesm2022/cloud-ide-layout-cloud-ide-layout-CC-eJdik.mjs.map +1 -0
  3. package/fesm2022/{cloud-ide-layout-dashboard-manager.component-By3-I91u.mjs → cloud-ide-layout-dashboard-manager.component-asEb-RqK.mjs} +2 -2
  4. package/fesm2022/{cloud-ide-layout-dashboard-manager.component-By3-I91u.mjs.map → cloud-ide-layout-dashboard-manager.component-asEb-RqK.mjs.map} +1 -1
  5. package/fesm2022/{cloud-ide-layout-drawer-theme.component-DVg-dInv.mjs → cloud-ide-layout-drawer-theme.component-hlIFgjX_.mjs} +2 -2
  6. package/fesm2022/{cloud-ide-layout-drawer-theme.component-DVg-dInv.mjs.map → cloud-ide-layout-drawer-theme.component-hlIFgjX_.mjs.map} +1 -1
  7. package/fesm2022/{cloud-ide-layout-home-wrapper.component-DAPSGYLf.mjs → cloud-ide-layout-home-wrapper.component-TsEnFYa4.mjs} +2 -2
  8. package/fesm2022/{cloud-ide-layout-home-wrapper.component-DAPSGYLf.mjs.map → cloud-ide-layout-home-wrapper.component-TsEnFYa4.mjs.map} +1 -1
  9. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-DhnrHthy.mjs → cloud-ide-layout-sidedrawer-notes.component-ByfmdVwA.mjs} +2 -2
  10. package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-DhnrHthy.mjs.map → cloud-ide-layout-sidedrawer-notes.component-ByfmdVwA.mjs.map} +1 -1
  11. package/fesm2022/cloud-ide-layout.mjs +1 -1
  12. package/package.json +1 -1
  13. package/fesm2022/cloud-ide-layout-cloud-ide-layout-Cwim-wD5.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, inject, signal, computed, effect, DestroyRef, Component, ViewChild, ElementRef, HostListener, ChangeDetectionStrategy, ComponentRef, ViewContainerRef, ViewChildren, viewChild, input, InjectionToken, PLATFORM_ID, output } from '@angular/core';
2
+ import { Injectable, inject, signal, computed, effect, DestroyRef, Component, Injector, runInInjectionContext, ViewChild, ElementRef, HostListener, ChangeDetectionStrategy, ComponentRef, ViewContainerRef, ViewChildren, viewChild, input, InjectionToken, PLATFORM_ID, output } from '@angular/core';
3
3
  import { HttpClient } from '@angular/common/http';
4
4
  import { cidePath, hostManagerRoutesUrl, coreRoutesUrl, commonRoutesUrl, designConfigRoutesUrl, generateStringFromObject } from 'cloud-ide-lms-model';
5
5
  import { BehaviorSubject, Observable, throwError, of, interval, take as take$1, firstValueFrom } from 'rxjs';
@@ -2299,6 +2299,7 @@ class CideLytHeaderWrapperComponent {
2299
2299
  financialYearService = inject(FINANCIAL_YEAR_SERVICE_TOKEN);
2300
2300
  academicYearService = inject(ACADEMIC_YEAR_SERVICE_TOKEN);
2301
2301
  destroyRef = inject(DestroyRef);
2302
+ injector = inject(Injector);
2302
2303
  // Inject theme service for independent theme management
2303
2304
  themeService = inject(CideThemeService);
2304
2305
  // Signals for year data
@@ -2308,6 +2309,8 @@ class CideLytHeaderWrapperComponent {
2308
2309
  currentAcademicYear = signal(null, ...(ngDevMode ? [{ debugName: "currentAcademicYear" }] : []));
2309
2310
  currentFinancialYearName = signal('FY', ...(ngDevMode ? [{ debugName: "currentFinancialYearName" }] : []));
2310
2311
  currentAcademicYearName = signal('AY', ...(ngDevMode ? [{ debugName: "currentAcademicYearName" }] : []));
2312
+ // Track previous entity ID for change detection
2313
+ previousEntityId = null;
2311
2314
  // Signals for notifications
2312
2315
  notifications = signal([], ...(ngDevMode ? [{ debugName: "notifications" }] : []));
2313
2316
  unreadCount = computed(() => this.wsNotificationService?.unreadNotificationsCount() || 0, ...(ngDevMode ? [{ debugName: "unreadCount" }] : []));
@@ -2506,6 +2509,38 @@ class CideLytHeaderWrapperComponent {
2506
2509
  this.updateNotificationDropdown();
2507
2510
  // Then try to load notifications
2508
2511
  this.initializeNotifications();
2512
+ // React to active entity changes - reload financial and academic years when entity changes
2513
+ runInInjectionContext(this.injector, () => {
2514
+ effect(() => {
2515
+ const activeEntity = this.appStateService.activeEntity();
2516
+ const currentEntityId = activeEntity?._id || null;
2517
+ // Skip on initial load (when previousEntityId is null)
2518
+ if (this.previousEntityId === null) {
2519
+ this.previousEntityId = currentEntityId;
2520
+ console.log('🏢 HEADER: Entity change handler initialized with initial entity:', currentEntityId);
2521
+ return;
2522
+ }
2523
+ // Only reload if entity actually changed
2524
+ if (this.previousEntityId !== currentEntityId && currentEntityId !== null) {
2525
+ console.log('🏢 HEADER: Entity changed from', this.previousEntityId, 'to', currentEntityId, '- reloading financial and academic years');
2526
+ this.previousEntityId = currentEntityId;
2527
+ // Reload financial years and academic years for the new entity
2528
+ this.loadFinancialYears();
2529
+ this.loadAcademicYears();
2530
+ }
2531
+ else if (this.previousEntityId !== null && currentEntityId === null) {
2532
+ // Entity was cleared
2533
+ console.log('🏢 HEADER: Entity cleared');
2534
+ this.previousEntityId = null;
2535
+ this.financialYears.set([]);
2536
+ this.academicYears.set([]);
2537
+ this.currentFinancialYear.set(null);
2538
+ this.currentAcademicYear.set(null);
2539
+ this.currentFinancialYearName.set('FY');
2540
+ this.currentAcademicYearName.set('AY');
2541
+ }
2542
+ });
2543
+ });
2509
2544
  }
2510
2545
  /**
2511
2546
  * Toggle sidebar collapsed state
@@ -5247,8 +5282,8 @@ class CideLytSidedrawerWrapperComponent {
5247
5282
  }
5248
5283
  ngOnInit() {
5249
5284
  // Initialize the component map (You'd likely populate this from a config or service)
5250
- this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-DhnrHthy.mjs').then(m => m.CideLytSidedrawerNotesComponent);
5251
- this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-DVg-dInv.mjs').then(m => m.CideLytDrawerThemeComponent);
5285
+ this.componentMap['drowar_notes'] = () => import('./cloud-ide-layout-sidedrawer-notes.component-ByfmdVwA.mjs').then(m => m.CideLytSidedrawerNotesComponent);
5286
+ this.componentMap['drawer_theme'] = () => import('./cloud-ide-layout-drawer-theme.component-hlIFgjX_.mjs').then(m => m.CideLytDrawerThemeComponent);
5252
5287
  }
5253
5288
  async loadComponent(configFor) {
5254
5289
  console.log('🔍 SIDEDRAWER - Loading component:', configFor, 'Current tab:', this.currentTabId);
@@ -6940,7 +6975,7 @@ const layoutControlPannelChildRoutes = [{
6940
6975
  },
6941
6976
  {
6942
6977
  path: "home",
6943
- loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-DAPSGYLf.mjs').then(c => c.CideLytHomeWrapperComponent),
6978
+ loadComponent: () => import('./cloud-ide-layout-home-wrapper.component-TsEnFYa4.mjs').then(c => c.CideLytHomeWrapperComponent),
6944
6979
  canActivate: [authGuard],
6945
6980
  data: {
6946
6981
  sypg_page_code: "cide_lyt_home" // Used by RequestService to fetch tab properties
@@ -6948,7 +6983,7 @@ const layoutControlPannelChildRoutes = [{
6948
6983
  },
6949
6984
  {
6950
6985
  path: "dashboard-manager",
6951
- loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-By3-I91u.mjs').then(c => c.DashboardManagerComponent),
6986
+ loadComponent: () => import('./cloud-ide-layout-dashboard-manager.component-asEb-RqK.mjs').then(c => c.DashboardManagerComponent),
6952
6987
  canActivate: [authGuard],
6953
6988
  data: {
6954
6989
  sypg_page_code: "cide_lyt_dashboard_manager"
@@ -8772,4 +8807,4 @@ var floatingEntitySelection_component = /*#__PURE__*/Object.freeze({
8772
8807
  */
8773
8808
 
8774
8809
  export { AppStateHelperService as A, CideLytSharedWrapperComponent as C, ENVIRONMENT_CONFIG as E, NotificationSettingsService as N, RightsService as R, CideLytSidebarService as a, CideLytSidedrawerService as b, CideLytThemeService as c, CloudIdeLayoutService as d, CloudIdeLayoutComponent as e, CideLytSharedService as f, ComponentContextService as g, layoutControlPannelChildRoutes as h, CustomRouteReuseStrategy as i, AppStateService as j, CideLytUserStatusService as k, layoutRoutes as l, CacheManagerService as m, CideLytFileManagerService as n, CideLytFloatingEntityRightsSharingComponent as o, processThemeVariable as p, CideLytFloatingEntityRightsSharingService as q, CideLytFloatingEntitySelectionComponent as r, setCSSVariable as s, themeFactory as t, CideLytFloatingEntitySelectionService as u };
8775
- //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-Cwim-wD5.mjs.map
8810
+ //# sourceMappingURL=cloud-ide-layout-cloud-ide-layout-CC-eJdik.mjs.map