fix update package detail to merge
This commit is contained in:
@@ -1303,35 +1303,41 @@ export class PackageController extends Controller {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
wrap(packageDetail).assign({
|
wrap(packageDetail).assign(
|
||||||
departureDate: body.departure_date,
|
{
|
||||||
tourFlight: tourFlightSchedule,
|
departureDate: body.departure_date,
|
||||||
outboundFlight: outboundFlightSchedule,
|
tourFlight: tourFlightSchedule,
|
||||||
inboundFlight: inboundFlightSchedule,
|
outboundFlight: outboundFlightSchedule,
|
||||||
makkahHotel: {
|
inboundFlight: inboundFlightSchedule,
|
||||||
hotel: makkahHotel,
|
makkahHotel: {
|
||||||
checkIn: body.makkah_hotel.check_in,
|
hotel: makkahHotel,
|
||||||
checkOut: body.makkah_hotel.check_out,
|
checkIn: body.makkah_hotel.check_in,
|
||||||
|
checkOut: body.makkah_hotel.check_out,
|
||||||
|
updatedAt: new Date(),
|
||||||
|
},
|
||||||
|
madinahHotel: {
|
||||||
|
hotel: madinahHotel,
|
||||||
|
checkIn: body.madinah_hotel.check_in,
|
||||||
|
checkOut: body.madinah_hotel.check_out,
|
||||||
|
updatedAt: new Date(),
|
||||||
|
},
|
||||||
|
transportation: transportationClass,
|
||||||
|
quadPrice: body.quad_price,
|
||||||
|
quadDiscount: body.quad_discount,
|
||||||
|
triplePrice: body.triple_price,
|
||||||
|
tripleDiscount: body.triple_discount,
|
||||||
|
doublePrice: body.double_price,
|
||||||
|
doubleDiscount: body.double_discount,
|
||||||
|
infantPrice: body.infant_price,
|
||||||
|
infantDiscount: body.infant_discount,
|
||||||
|
itinerary: itineraryEntity,
|
||||||
updatedAt: new Date(),
|
updatedAt: new Date(),
|
||||||
},
|
},
|
||||||
madinahHotel: {
|
{
|
||||||
hotel: madinahHotel,
|
mergeObjectProperties: true,
|
||||||
checkIn: body.madinah_hotel.check_in,
|
updateByPrimaryKey: false,
|
||||||
checkOut: body.madinah_hotel.check_out,
|
|
||||||
updatedAt: new Date(),
|
|
||||||
},
|
},
|
||||||
transportation: transportationClass,
|
);
|
||||||
quadPrice: body.quad_price,
|
|
||||||
quadDiscount: body.quad_discount,
|
|
||||||
triplePrice: body.triple_price,
|
|
||||||
tripleDiscount: body.triple_discount,
|
|
||||||
doublePrice: body.double_price,
|
|
||||||
doubleDiscount: body.double_discount,
|
|
||||||
infantPrice: body.infant_price,
|
|
||||||
infantDiscount: body.infant_discount,
|
|
||||||
itinerary: itineraryEntity,
|
|
||||||
updatedAt: new Date(),
|
|
||||||
});
|
|
||||||
|
|
||||||
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