fix update package detail to merge
This commit is contained in:
@@ -1303,7 +1303,8 @@ export class PackageController extends Controller {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
wrap(packageDetail).assign({
|
wrap(packageDetail).assign(
|
||||||
|
{
|
||||||
departureDate: body.departure_date,
|
departureDate: body.departure_date,
|
||||||
tourFlight: tourFlightSchedule,
|
tourFlight: tourFlightSchedule,
|
||||||
outboundFlight: outboundFlightSchedule,
|
outboundFlight: outboundFlightSchedule,
|
||||||
@@ -1331,7 +1332,12 @@ export class PackageController extends Controller {
|
|||||||
infantDiscount: body.infant_discount,
|
infantDiscount: body.infant_discount,
|
||||||
itinerary: itineraryEntity,
|
itinerary: itineraryEntity,
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
});
|
},
|
||||||
|
{
|
||||||
|
mergeObjectProperties: true,
|
||||||
|
updateByPrimaryKey: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
packageDetail.tourHotels.set([]);
|
packageDetail.tourHotels.set([]);
|
||||||
for (const [index, tourHotel] of (body.tour_hotels ?? []).entries()) {
|
for (const [index, tourHotel] of (body.tour_hotels ?? []).entries()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user