mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 08:25:43 +00:00
Merge pull request #967 from Tria-plc/freight_feature/usermanagement
Freight feature/usermanagement
This commit is contained in:
@@ -224,6 +224,24 @@ export class BookingLifecycleNotifierService {
|
||||
this.inApp(b, 'Operation request accepted', msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* GL Ethiopia created this booking on the customer's behalf. On a customs
|
||||
* (Path B) contract the customer never books themselves, so without this they
|
||||
* would have no signal that their shipment now exists and is priced.
|
||||
*/
|
||||
createdByGlForCustomer(b: Booking): void {
|
||||
const total = Number(b.totalAmount ?? 0);
|
||||
const priced =
|
||||
total > 0
|
||||
? ` The total is ${total.toLocaleString()} ${b.paymentCurrency}.`
|
||||
: '';
|
||||
const msg =
|
||||
`Global Logistics has created shipment ${b.reference} under your contract.${priced} ` +
|
||||
`You can review it in the portal.`;
|
||||
void this.notifyContact(b, msg, 'CREATED BY GL');
|
||||
this.inApp(b, 'Shipment created for you', msg);
|
||||
}
|
||||
|
||||
/** Shipment started → in transit. */
|
||||
inTransit(b: Booking): void {
|
||||
const msg = `Your shipment for booking ${b.reference} is now in transit.`;
|
||||
|
||||
Reference in New Issue
Block a user