diff --git a/src/app/common/footer/footer.component.html b/src/app/common/footer/footer.component.html index 01d4752..18c48a7 100644 --- a/src/app/common/footer/footer.component.html +++ b/src/app/common/footer/footer.component.html @@ -7,7 +7,7 @@ \ No newline at end of file diff --git a/src/app/common/footer/footer.component.ts b/src/app/common/footer/footer.component.ts index b9f2748..2f94b31 100644 --- a/src/app/common/footer/footer.component.ts +++ b/src/app/common/footer/footer.component.ts @@ -1,8 +1,6 @@ -import { Component, effect, inject, Input } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { AngularMaterialModule } from '../../shared/module/angular-material.module'; import { CommonModule } from '@angular/common'; -import { User } from '../../core/models/user'; -import { UserService } from '../../core/services/common/user.service'; @Component({ selector: 'app-footer', @@ -12,20 +10,5 @@ import { UserService } from '../../core/services/common/user.service'; }) export class FooterComponent { currentYear = new Date().getFullYear(); - currentServiceProviderName: string = 'USCIB Carnet Portal'; - userDetails: User | null = {}; - @Input() isUserLoggedIn = false; - - private userService = inject(UserService); - - constructor( - ) { - effect(() => { - this.userDetails = this.userService.userDetailsSignal(); - if (this.userDetails?.userDetails && this.userDetails.userDetails.serviceProviderName) { - this.currentServiceProviderName = this.userDetails.userDetails.serviceProviderName || 'USCIB Carnet Portal'; - } - }); - } } \ No newline at end of file diff --git a/src/app/core/services/common/auth.service.ts b/src/app/core/services/common/auth.service.ts index 5cae066..47eda86 100644 --- a/src/app/core/services/common/auth.service.ts +++ b/src/app/core/services/common/auth.service.ts @@ -13,6 +13,7 @@ import { ApiErrorHandlerService } from './api-error-handler.service'; }) export class AuthService { private apiUrl = environment.apiUrl; + private applicationName = environment.appType; private http = inject(HttpClient); private userService = inject(UserService); @@ -22,7 +23,7 @@ export class AuthService { private errorHandler = inject(ApiErrorHandlerService); login(username: string, password: string): Observable { - return this.http.post(`${this.apiUrl}/login`, { p_emailaddr: username, p_password: password }); + return this.http.post(`${this.apiUrl}/login`, { p_emailaddr: username, p_password: password, P_APPLICATIONNAME: this.applicationName }); } refreshToken(): Observable { diff --git a/src/app/core/services/common/common.service.ts b/src/app/core/services/common/common.service.ts index 348b039..3cd406d 100644 --- a/src/app/core/services/common/common.service.ts +++ b/src/app/core/services/common/common.service.ts @@ -54,7 +54,7 @@ export class CommonService { } getRegions(): Observable { - return this.http.get(`${this.apiUrl}/${this.apiDb}/GetRegions`).pipe( + return this.http.get(`${this.apiUrl}/${this.apiDb}/GetRegions/${this.userService.getUserSpid()}`).pipe( map((response) => response.map((item) => ({ id: item.REGIONID, diff --git a/src/app/param/table/param-table.component.html b/src/app/param/table/param-table.component.html index 50a2df6..7f55792 100644 --- a/src/app/param/table/param-table.component.html +++ b/src/app/param/table/param-table.component.html @@ -85,8 +85,9 @@ chevron_right - diff --git a/src/app/param/table/param-table.component.ts b/src/app/param/table/param-table.component.ts index 2207bc7..7f31f25 100644 --- a/src/app/param/table/param-table.component.ts +++ b/src/app/param/table/param-table.component.ts @@ -38,6 +38,7 @@ export class ParamTableComponent { paramData: any = []; showInactiveData: boolean = false; isEditing: boolean = false; + allowEdit: boolean = true; showForm: boolean = false; currentParamid: number | null = null; @@ -116,6 +117,7 @@ export class ParamTableComponent { ngOnInit(): void { this.paramType = this.route.snapshot.paramMap.get('id'); + this.allowEdit = this.paramType !== '014'; this.getParameters(); } diff --git a/src/app/service-provider/security-deposit/security-deposit.component.ts b/src/app/service-provider/security-deposit/security-deposit.component.ts index 3121b5e..d6cf92b 100644 --- a/src/app/service-provider/security-deposit/security-deposit.component.ts +++ b/src/app/service-provider/security-deposit/security-deposit.component.ts @@ -71,7 +71,7 @@ export class SecurityDepositComponent implements OnInit { holderType: ['CORP', Validators.required], uscibMember: ['Y', Validators.required], specialCommodity: [''], - specialCountry: ['US'], + specialCountry: [''], rate: [0, [Validators.required, Validators.min(0)]], effectiveDate: ['', Validators.required] }); @@ -145,7 +145,7 @@ export class SecurityDepositComponent implements OnInit { this.depositForm.reset({ holderType: 'CORP', uscibMember: 'N', - specialCountry: 'US', + specialCountry: '', }); this.depositForm.patchValue({ rate: 0 }); @@ -245,7 +245,7 @@ export class SecurityDepositComponent implements OnInit { this.depositForm.reset({ holderType: 'CORP', uscibMember: 'N', - specialCountry: 'US', + specialCountry: '', }); } diff --git a/src/environments/environment.development.ts b/src/environments/environment.development.ts index ee5c116..30635fb 100644 --- a/src/environments/environment.development.ts +++ b/src/environments/environment.development.ts @@ -1,5 +1,6 @@ export const environment = { production: false, apiUrl: 'https://dev.alphaomegainfosys.com/test-api', - apiDb: 'oracle' + apiDb: 'oracle', + appType: 'policy' }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index ea91a24..1145da7 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -1,5 +1,6 @@ export const environment = { production: true, apiUrl: 'https://dev.alphaomegainfosys.com/test-api', - apiDb: 'oracle' + apiDb: 'oracle', + appType: 'policy' }; \ No newline at end of file