fix(bookings): persist editable fields on update (toOrmUpdate)
toOrmUpdate ne mappait que status/notes/commission, donc les modifications de volume/poids/palettes/prix/transporteur/route via editDetails/editFromRate n'etaient jamais persistees (repository.update). Ajout de tous les champs editables au mapping de mise a jour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
6cdbf29bf7
commit
795e635df3
@ -95,6 +95,24 @@ export class CsvBookingMapper {
|
|||||||
*/
|
*/
|
||||||
static toOrmUpdate(domain: CsvBooking): Partial<CsvBookingOrmEntity> {
|
static toOrmUpdate(domain: CsvBooking): Partial<CsvBookingOrmEntity> {
|
||||||
return {
|
return {
|
||||||
|
// Carrier + route + cargo + price are editable before payment
|
||||||
|
// (editDetails / editFromRate), so they must be persisted on update.
|
||||||
|
carrierName: domain.carrierName,
|
||||||
|
carrierEmail: domain.carrierEmail,
|
||||||
|
origin: domain.origin.getValue(),
|
||||||
|
destination: domain.destination.getValue(),
|
||||||
|
containerType: domain.containerType,
|
||||||
|
transitDays: domain.transitDays,
|
||||||
|
volumeCBM: domain.volumeCBM,
|
||||||
|
weightKG: domain.weightKG,
|
||||||
|
palletCount: domain.palletCount,
|
||||||
|
priceUSD: domain.priceUSD,
|
||||||
|
priceEUR: domain.priceEUR,
|
||||||
|
primaryCurrency: domain.primaryCurrency,
|
||||||
|
freightTotal: domain.freightTotal ?? null,
|
||||||
|
freightCurrency: domain.freightCurrency ?? null,
|
||||||
|
fobTotal: domain.fobTotal ?? null,
|
||||||
|
fobCurrency: domain.fobCurrency ?? null,
|
||||||
status: domain.status as CsvBookingOrmEntity['status'],
|
status: domain.status as CsvBookingOrmEntity['status'],
|
||||||
respondedAt: domain.respondedAt,
|
respondedAt: domain.respondedAt,
|
||||||
notes: domain.notes,
|
notes: domain.notes,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user