+
{{ deliveryEstimate }}
diff --git a/src/app/carnet/travel-plan/travel-plan.component.ts b/src/app/carnet/travel-plan/travel-plan.component.ts
index e399f3d..0ba69f8 100644
--- a/src/app/carnet/travel-plan/travel-plan.component.ts
+++ b/src/app/carnet/travel-plan/travel-plan.component.ts
@@ -129,7 +129,7 @@ export class TravelPlanComponent {
title: 'For your information',
message: country.actionMessage,
confirmText: 'Ok',
- cancelText: 'Cancel'
+ hideCancel: true
}
});
@@ -147,8 +147,8 @@ export class TravelPlanComponent {
data: {
title: 'Warning',
message: country.actionMessage,
- confirmText: 'Ok',
- cancelText: 'Cancel'
+ confirmText: 'Yes',
+ cancelText: 'No'
}
});
@@ -171,8 +171,8 @@ export class TravelPlanComponent {
data: {
title: 'Act',
message: country.actionMessage,
- confirmText: 'Ok',
- cancelText: 'Cancel'
+ confirmText: 'Yes',
+ cancelText: 'No'
}
});
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 @@
- © {{ currentYear }} {{currentServiceProviderName}}. All rights reserved.
+ © {{ currentYear }} alpha Omega Infosys. All rights reserved.
\ 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 ba744bb..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 = '';
- userDetails: User | null = {};
-
@Input() isUserLoggedIn = false;
-
- private userService = inject(UserService);
-
- constructor(
- ) {
- effect(() => {
- this.userDetails = this.userService.userDetailsSignal();
- if (this.userDetails?.userDetails) {
- this.currentServiceProviderName = this.userDetails.userDetails.serviceProviderName || '';
- }
- });
- }
}
\ No newline at end of file
diff --git a/src/app/core/models/industry-type.ts b/src/app/core/models/industry-type.ts
new file mode 100644
index 0000000..31c35dd
--- /dev/null
+++ b/src/app/core/models/industry-type.ts
@@ -0,0 +1,5 @@
+export interface IndustryType {
+ name: string;
+ id: string;
+ value: string;
+}
diff --git a/src/app/core/models/preparer/basic-detail.ts b/src/app/core/models/preparer/basic-detail.ts
index 4aca4fa..5685c1d 100644
--- a/src/app/core/models/preparer/basic-detail.ts
+++ b/src/app/core/models/preparer/basic-detail.ts
@@ -11,4 +11,5 @@ export interface BasicDetail {
zip: string;
carnetIssuingRegion: string;
revenueLocation: string;
+ industryType: string;
}
diff --git a/src/app/core/services/carnet/payment.service.ts b/src/app/core/services/carnet/payment.service.ts
index 1218014..0635983 100644
--- a/src/app/core/services/carnet/payment.service.ts
+++ b/src/app/core/services/carnet/payment.service.ts
@@ -13,8 +13,13 @@ export class PaymentService {
private http = inject(HttpClient);
createOrder(orderDetails: any): Promise {
+ const data = {
+ P_PRICE: orderDetails.price,
+ P_DESCRIPTION: orderDetails.description
+ }
+
return firstValueFrom(
- this.http.post<{ id: string }>(`${this.apiUrl}/${this.apiDb}/InitiatePayment`, {})
+ this.http.post<{ id: string }>(`${this.apiUrl}/${this.apiDb}/InitiatePayment`, data)
).then(order => order.id);
}
diff --git a/src/app/core/services/common/auth.service.ts b/src/app/core/services/common/auth.service.ts
index 1f34416..2d7f032 100644
--- a/src/app/core/services/common/auth.service.ts
+++ b/src/app/core/services/common/auth.service.ts
@@ -14,6 +14,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);
@@ -24,7 +25,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 7dc83d6..330b05a 100644
--- a/src/app/core/services/common/common.service.ts
+++ b/src/app/core/services/common/common.service.ts
@@ -18,6 +18,7 @@ import { FormOfSecurity } from '../../models/formofsecurity';
import { PaymentType } from '../../models/payment-type';
import { UnitOfMeasure } from '../../models/unitofmeasure';
import { ExtensionReason } from '../../models/extension-reason';
+import { IndustryType } from '../../models/industry-type';
@Injectable({
providedIn: 'root'
@@ -59,7 +60,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,
@@ -218,6 +219,18 @@ export class CommonService {
);
}
+ getIndustryTypes(): Observable {
+ return this.http.get(`${this.apiUrl}/${this.apiDb}/GetParamValues?P_PARAMTYPE=018&P_SPID=${this.userService.getUserSpid()}`).pipe(
+ map((response) =>
+ response.map((item) => ({
+ name: item.PARAMDESC,
+ id: item.PARAMID,
+ value: item.PARAMVALUE,
+ }))
+ )
+ );
+ }
+
formatUSDate(datetime: Date): string {
const date = new Date(datetime);
const month = String(date.getUTCMonth() + 1).padStart(2, '0');
diff --git a/src/app/core/services/preparer/basic-detail.service.ts b/src/app/core/services/preparer/basic-detail.service.ts
index 7fc8421..2dd8381 100644
--- a/src/app/core/services/preparer/basic-detail.service.ts
+++ b/src/app/core/services/preparer/basic-detail.service.ts
@@ -34,6 +34,7 @@ export class BasicDetailService {
carnetIssuingRegion: basicDetails.ISSUINGREGION,
revenueLocation: basicDetails.REVENUELOCATION,
zip: basicDetails.ZIP,
+ industryType: ""// basicDetails.INDUSTRYTYPE
};
}
@@ -50,6 +51,7 @@ export class BasicDetailService {
P_ZIP: data.zip,
P_ISSUINGREGION: data.carnetIssuingRegion,
P_REVENUELOCATION: data.revenueLocation,
+ P_INDUSTRYTYPE: data.industryType,
P_USERID: this.userService.getUser(),
}
@@ -69,6 +71,7 @@ export class BasicDetailService {
P_COUNTRY: data.country,
P_ZIP: data.zip,
P_REVENUELOCATION: data.revenueLocation,
+ P_INDUSTRYTYPE: data.industryType,
P_USERID: this.userService.getUser(),
}
diff --git a/src/app/core/services/preparer/client.service.ts b/src/app/core/services/preparer/client.service.ts
index 2747936..4326f58 100644
--- a/src/app/core/services/preparer/client.service.ts
+++ b/src/app/core/services/preparer/client.service.ts
@@ -35,6 +35,7 @@ export class ClientService {
carnetIssuingRegion: basicDetails.ISSUINGREGION,
revenueLocation: basicDetails.REVENUELOCATION,
zip: basicDetails.ZIP,
+ industryType: ""
// createdBy: basicDetails.CREATEDBY || null,
// dateCreated: basicDetails.DATECREATED || null,
// lastUpdatedBy: basicDetails.LASTUPDATEDBY || null,
diff --git a/src/app/core/services/preparer/contact.service.ts b/src/app/core/services/preparer/contact.service.ts
index dbcf251..ec2145f 100644
--- a/src/app/core/services/preparer/contact.service.ts
+++ b/src/app/core/services/preparer/contact.service.ts
@@ -103,4 +103,8 @@ export class ContactService {
reactivateContact(clientContactId: string): Observable {
return this.http.patch(`${this.apiUrl}/${this.apiDb}/ReactivateClientContacts/${this.userService.getUserSpid()}/${clientContactId}/${this.userService.getUser()}`, null);
}
+
+ setDefaultServiceProviderContact(clientContactId: string): Observable {
+ return this.http.patch(`${this.apiUrl}/${this.apiDb}/ReactivateClientContacts/${this.userService.getUserSpid()}/${clientContactId}/${this.userService.getUser()}`, null);
+ }
}
diff --git a/src/app/holder/basic-details/basic-details.component.ts b/src/app/holder/basic-details/basic-details.component.ts
index 5bd96e8..2a15886 100644
--- a/src/app/holder/basic-details/basic-details.component.ts
+++ b/src/app/holder/basic-details/basic-details.component.ts
@@ -15,6 +15,7 @@ import { BasicDetail } from '../../core/models/holder/basic-detail';
import { StorageService } from '../../core/services/common/storage.service';
import { NavigationService } from '../../core/services/common/navigation.service';
import { environment } from '../../../environments/environment';
+import { HolderService } from '../../core/services/carnet/holder.service';
@Component({
selector: 'app-basic-detail',
@@ -49,6 +50,7 @@ export class BasicDetailComponent implements OnInit, OnDestroy {
private errorHandler = inject(ApiErrorHandlerService);
private storageService = inject(StorageService);
private navigationService = inject(NavigationService);
+ private carnetHolderService = inject(HolderService);
constructor() {
this.basicDetailsForm = this.createForm();
@@ -133,6 +135,9 @@ export class BasicDetailComponent implements OnInit, OnDestroy {
if (!this.isEditMode) {
this.holderIdCreated.emit(basicData.HOLDERID);
+ // save the created holder for the current application
+ this.saveHolderToApplication(basicData.HOLDERID);
+
// change to edit mode after creation
this.isEditMode = true;
this.holderid = basicData.HOLDERID;
@@ -226,4 +231,22 @@ export class BasicDetailComponent implements OnInit, OnDestroy {
}
})
}
+
+ saveHolderToApplication(holderid: number): void {
+ this.changeInProgress = true;
+ const saveObservable = this.carnetHolderService.saveApplicationHolder(this.currentApplicationDetails?.headerid!, holderid);
+
+ saveObservable.pipe(finalize(() => {
+ this.changeInProgress = false;
+ })).subscribe({
+ next: (basicData: any) => {
+ },
+ error: (error: any) => {
+ let errorMessage = this.errorHandler.handleApiError(error, `Failed to save holder details`);
+ this.notificationService.showError(errorMessage);
+ console.error('Error saving holder details:', error);
+ }
+ });
+ }
+
}
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
-