diff --git a/src/app/carnet/additional-set/additional-set.component.html b/src/app/carnet/additional-set/additional-set.component.html
new file mode 100644
index 0000000..be5a34f
--- /dev/null
+++ b/src/app/carnet/additional-set/additional-set.component.html
@@ -0,0 +1 @@
+
,
+ @Inject(MAT_DIALOG_DATA) public data: { headerid: any }
+ ) {
+ this.headerid = data.headerid;
+ }
+
+ ngOnInit(): void {
+ if (this.headerid && this.headerid > 0) {
+ this.carnetService.getEstimatedFees(this.headerid).subscribe({
+ next: (data: Fees) => {
+ if (data) {
+ this.estimatedFees = data;
+ }
+ },
+ error: (error: any) => {
+ let errorMessage = this.errorHandler.handleApiError(error, 'Failed to get estimated fees');
+ this.notificationService.showError(errorMessage);
+ console.error('Error getting estimated fees:', error);
+ }
+ });
+ }
+ }
+
+ onClose(): void {
+ this.dialogRef.close();
+ }
+}
\ No newline at end of file
diff --git a/src/app/carnet/shipping/shipping.component.html b/src/app/carnet/shipping/shipping.component.html
index 1cfff80..eee792c 100644
--- a/src/app/carnet/shipping/shipping.component.html
+++ b/src/app/carnet/shipping/shipping.component.html
@@ -343,6 +343,16 @@
+
+
+
+
-
-
diff --git a/src/app/carnet/shipping/shipping.component.ts b/src/app/carnet/shipping/shipping.component.ts
index d35fcea..695760c 100644
--- a/src/app/carnet/shipping/shipping.component.ts
+++ b/src/app/carnet/shipping/shipping.component.ts
@@ -26,6 +26,7 @@ import { StorageService } from '../../core/services/common/storage.service';
import { FormOfSecurity } from '../../core/models/formofsecurity';
import { CarnetService } from '../../core/services/carnet/carnet.service';
import { environment } from '../../../environments/environment';
+import { FeesDialogComponent } from './fees-dialog.component';
@Component({
selector: 'app-shipping',
@@ -62,7 +63,9 @@ export class ShippingComponent {
deliveryEstimate: string = '';
holderid: number = 0;
holder: Holder | undefined | null = null;
+
showSubmitButton: boolean = environment.appType === 'client';
+ showEstimatedFeesButton: boolean = environment.appType === 'client';
showProcessButton: boolean = environment.appType === 'service-provider';
countriesHasStates = ['US', 'CA', 'MX'];
@@ -444,6 +447,10 @@ export class ShippingComponent {
this.calculateDeliveryEstimate();
this.shippingForm.markAsUntouched();
this.completed.emit(this.shippingForm.valid);
+
+ if (this.isViewMode) {
+ this.shippingForm.disable();
+ }
}
patchAddressContactData(): void {
@@ -460,7 +467,7 @@ export class ShippingComponent {
if (this.holder?.holderType.trim() === 'GOV') {
formOfSecurityControl?.setValue(this.govFormOfSecurities?.[0].value);
formOfSecurityControl?.disable();
- } else {
+ } else if (!this.isViewMode) {
formOfSecurityControl?.enable();
}
@@ -688,6 +695,13 @@ export class ShippingComponent {
});
}
+ showEstimatedFees(): void {
+ const dialogRef = this.dialog.open(FeesDialogComponent, {
+ width: '500px',
+ data: { headerid: this.headerid }
+ });
+ }
+
submitApplication(): void {
this.onSubmit(true);
}
diff --git a/src/app/carnet/travel-plan/travel-plan.component.ts b/src/app/carnet/travel-plan/travel-plan.component.ts
index 4ef21fe..4493b48 100644
--- a/src/app/carnet/travel-plan/travel-plan.component.ts
+++ b/src/app/carnet/travel-plan/travel-plan.component.ts
@@ -284,6 +284,9 @@ export class TravelPlanComponent {
});
this.completed.emit(this.travelForm.valid);
+ if (this.isViewMode) {
+ this.travelForm.disable();
+ }
}
onSubmit(): void {
diff --git a/src/app/common/secured-header/secured-header.component.html b/src/app/common/secured-header/secured-header.component.html
index 354784e..e8f6d2e 100644
--- a/src/app/common/secured-header/secured-header.component.html
+++ b/src/app/common/secured-header/secured-header.component.html
@@ -18,7 +18,7 @@
{{ userEmail }}
-
+
+ more_horiz
+
+
+
+ article
+ View Carnet
+
+
+ delete
+ Delete Carnet
+
+
+ print
+ Print Carnet
+
+
+
diff --git a/src/app/home/home.component.scss b/src/app/home/home.component.scss
index e0c866f..bb5a8bc 100644
--- a/src/app/home/home.component.scss
+++ b/src/app/home/home.component.scss
@@ -91,15 +91,15 @@
}
}
- .mat-column-actions {
- width: 135px;
+ // .mat-column-actions {
+ // width: 135px;
- .action-buttons {
- width: 100%;
- display: flex;
- gap: 4px;
- }
- }
+ // .action-buttons {
+ // width: 100%;
+ // display: flex;
+ // gap: 4px;
+ // }
+ // }
}
.no-data-message {
diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts
index 510da46..f71e08c 100644
--- a/src/app/home/home.component.ts
+++ b/src/app/home/home.component.ts
@@ -166,8 +166,8 @@ export class HomeComponent {
}
editCarnet(item: any): void {
- if (item && item.headerId) {
- this.navigateTo(['edit-carnet', item.headerId], {
+ if (item && item.headerid) {
+ this.navigateTo(['edit-carnet', item.headerid], {
queryParams: { applicationname: item.applicationName }
});
} else {
@@ -176,8 +176,8 @@ export class HomeComponent {
}
viewCarnet(item: any): void {
- if (item && item.headerId) {
- this.navigateTo(['view-carnet', item.headerId], {
+ if (item && item.headerid) {
+ this.navigateTo(['view-carnet', item.headerid], {
queryParams: { applicationname: item.applicationName }
});
} else {
@@ -185,9 +185,9 @@ export class HomeComponent {
}
}
- printGeneralList(headerId: number): void {
- if (headerId) {
- this.homeService.printGeneralList(headerId).subscribe({
+ printGeneralList(headerid: number): void {
+ if (headerid) {
+ this.homeService.printGeneralList(headerid).subscribe({
next: () => {
},
@@ -202,8 +202,8 @@ export class HomeComponent {
}
}
- deleteCarnet(headerId: number): void {
- if (headerId) {
+ deleteCarnet(headerid: number): void {
+ if (headerid) {
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
width: '350px',
data: {
@@ -216,7 +216,7 @@ export class HomeComponent {
dialogRef.afterClosed().subscribe(result => {
if (result) {
- this.homeService.deleteCarnet(headerId).subscribe({
+ this.homeService.deleteCarnet(headerid).subscribe({
next: () => {
this.notificationService.showSuccess('Carnet deleted successfully');
this.loadCarnetData();