cliendid updates

This commit is contained in:
Cyril Joseph 2025-07-02 21:56:05 -03:00
parent fbaf065a05
commit e226518587
5 changed files with 26 additions and 7 deletions

View File

@ -78,6 +78,12 @@
},
"serve": {
"builder": "@angular/build:dev-server",
"options": {
"allowedHosts": [
"localhost",
"policy.alphaomegainfosys.com"
]
},
"configurations": {
"production": {
"buildTarget": "carnet-portal-app:build:production"

12
package-lock.json generated
View File

@ -22,7 +22,7 @@
"@angular/ssr": "^20.0.4",
"express": "^4.18.2",
"ng2-charts": "^8.0.0",
"ngx-cookie-service": "^19.1.2",
"ngx-cookie-service": "^20.0.1",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"
@ -8020,16 +8020,16 @@
}
},
"node_modules/ngx-cookie-service": {
"version": "19.1.2",
"resolved": "https://registry.npmjs.org/ngx-cookie-service/-/ngx-cookie-service-19.1.2.tgz",
"integrity": "sha512-4BFbc5BA7/ryuQVZUfDMHcjdgkHeW8obqfCCknoOEaplefjzlVvMQUx9Hywfjbc8POzZeZD2csS43Hs7rscJcA==",
"version": "20.0.1",
"resolved": "https://registry.npmjs.org/ngx-cookie-service/-/ngx-cookie-service-20.0.1.tgz",
"integrity": "sha512-XTPrW/5ihI3DvTljDj14E501fouHdiONCnd1SPhvqyHNHjvKECFWuTzOpcHrWl9X1ZOKfOG/uXW8G8fINcL9fQ==",
"license": "MIT",
"dependencies": {
"tslib": "^2.8.0"
},
"peerDependencies": {
"@angular/common": "^19.0.0",
"@angular/core": "^19.0.0"
"@angular/common": "^20.0.0",
"@angular/core": "^20.0.0"
}
},
"node_modules/node-addon-api": {

View File

@ -25,7 +25,7 @@
"@angular/ssr": "^20.0.4",
"express": "^4.18.2",
"ng2-charts": "^8.0.0",
"ngx-cookie-service": "^19.1.2",
"ngx-cookie-service": "^20.0.1",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"

View File

@ -12,6 +12,7 @@ export interface Menu {
export interface UserDetail {
spid: number;
clientid: number;
urlKey: string;
logoName: string;
themeName: string;

View File

@ -13,6 +13,7 @@ export class UserService {
private apiDb = environment.apiDb;
private spid: number = 0;
private clientid: number = 0;
userDetailsSignal = signal<User>({});
@ -106,6 +107,16 @@ export class UserService {
return this.spid;
}
getUserClientid(): number {
if (this.clientid === 0) {
const userDetails = this.getUserDetails();
if (userDetails && userDetails.userDetails && userDetails.userDetails.clientid) {
this.clientid = userDetails.userDetails.clientid;
}
}
return this.clientid;
}
private mapToUser(data: any): User {
return {
roles: data.roleDetails || null,
@ -129,6 +140,7 @@ export class UserService {
return {
spid: userDetails.SPID,
clientid: userDetails.CLIENTID,
urlKey: userDetails.ENCURLKEY,
logoName: userDetails.LOGONAME,
themeName: userDetails.THEMENAME