From c5b1e27a77081717f37942de8dacfa5c2e30b09d Mon Sep 17 00:00:00 2001
From: Joaquín Reñé <jrene@curisit.net>
Date: Tue, 21 Apr 2026 22:56:25 +0000
Subject: [PATCH] #4479 - upgrade SecurisServer to Java 21

---
 securis/src/main/webapp/src/app/forms/pack.form.component.ts |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/securis/src/main/webapp/src/app/forms/pack.form.component.ts b/securis/src/main/webapp/src/app/forms/pack.form.component.ts
index 9676626..5622817 100644
--- a/securis/src/main/webapp/src/app/forms/pack.form.component.ts
+++ b/securis/src/main/webapp/src/app/forms/pack.form.component.ts
@@ -10,6 +10,7 @@
 import { TdMediaService } from '@covalent/core';
 import { IComboOption, FormBase } from './base';
 import { ActivatedRoute, Router } from '@angular/router';
+import { OrganizationsService } from '../resources/organizations';
 
 
 
@@ -25,6 +26,7 @@
   constructor(private http: Http,
               private licenseTypes: LicenseTypesService,
               private packs: PacksService,
+			  private orgService: OrganizationsService,
               router: Router,
               toaster: ToastsManager,
               route: ActivatedRoute,
@@ -34,18 +36,19 @@
   }
 
   loadCombos(): void {
-      this.http.get('api/organization')
-        .map(response => response.json().map((org : any) => <IComboOption>{id: org.id, label: `(${org.code}) ${org.name}`}))
-        .subscribe(
-          data => super.setViewData(() => this.organizations = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label))),
-          err => console.error('Error loading orgs')
-        );
+      this.orgService.get()
+          .map((orgs: any[]) => orgs.map((org: any) => <IComboOption>{id: org.id, label: `(${org.code}) ${org.name}`}))
+          .subscribe(
+              (data: IComboOption[]) => super.setViewData(() => this.organizations = data.sort((e1: IComboOption, e2: IComboOption) => e1.label.localeCompare(e2.label))),
+              (err: any) => console.error('Error loading orgs', err)
+          );
+
       this.licenseTypes.get()
-        .map(list => list.map((lt : any) => <IComboOption>{id: lt.id, label: `(${lt.code}) ${lt.name}`}))
-        .subscribe(
-          data => super.setViewData(() => this.licensetypes = (<IComboOption[]>data).sort((e1, e2) => e1.label.localeCompare(e2.label))),
-          err => console.error('Error loading license types')
-        );
+          .map((list: any[]) => list.map((lt: any) => <IComboOption>{id: lt.id, label: `(${lt.code}) ${lt.name}`}))
+          .subscribe(
+              (data: IComboOption[]) => super.setViewData(() => this.licensetypes = data.sort((e1: IComboOption, e2: IComboOption) => e1.label.localeCompare(e2.label))),
+              (err: any) => console.error('Error loading license types', err)
+          );
   }
 
   goLicenses(): void {

--
Gitblit v1.3.2