Skip to content

Commit bc66c43

Browse files
fix: Confirm bulk edit for vehicles or shipments depending on trigger (#205)
1 parent 6e991f2 commit bc66c43

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

application/frontend/src/app/core/components/confirm-bulk-edit-dialog/confirm-bulk-edit-dialog.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<h2 mat-dialog-title>Confirm Bulk Overwrite</h2>
22
<div mat-dialog-content>
3-
This will overwrite the below fields for ALL selected shipments. Do you want to continue?
3+
This will overwrite the below fields for ALL selected
4+
{{ data.isShipment ? 'shipments' : 'vehicles' }}. Do you want to continue?
45
</div>
56
<li *ngFor="let fieldName of data.fields">{{ fieldName }}</li>
67
<div mat-dialog-actions>

application/frontend/src/app/core/components/confirm-bulk-edit-dialog/confirm-bulk-edit-dialog.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ import { MAT_DIALOG_DATA } from '@angular/material/dialog';
2424
changeDetection: ChangeDetectionStrategy.OnPush,
2525
})
2626
export class ConfirmBulkEditDialogComponent {
27-
constructor(@Inject(MAT_DIALOG_DATA) public data: { fields: string[] }) {}
27+
constructor(@Inject(MAT_DIALOG_DATA) public data: { fields: string[]; isShipment: boolean }) {}
2828
}

application/frontend/src/app/core/containers/pre-solve-edit-shipment-dialog/pre-solve-edit-shipment-dialog.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ export class PreSolveEditShipmentDialogComponent implements OnInit, OnDestroy {
171171
.open(ConfirmBulkEditDialogComponent, {
172172
data: {
173173
fields: editedFields,
174+
isShipment: true,
174175
},
175176
})
176177
.afterClosed()

application/frontend/src/app/core/containers/pre-solve-edit-vehicle-dialog/pre-solve-edit-vehicle-dialog.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export class PreSolveEditVehicleDialogComponent implements OnInit {
133133
.open(ConfirmBulkEditDialogComponent, {
134134
data: {
135135
fields: editedFields,
136+
isShipment: false,
136137
},
137138
})
138139
.afterClosed()

0 commit comments

Comments
 (0)