Compare commits
2 Commits
developmen
...
fix/bug-fi
Author | SHA1 | Date |
---|---|---|
|
7c0df75670 | |
|
50aca761f2 |
|
@ -97,12 +97,9 @@ export class ChangeStatusBookingHandler
|
||||||
},
|
},
|
||||||
relations: ['items'],
|
relations: ['items'],
|
||||||
});
|
});
|
||||||
console.log('change status', { dataID, couchData, booking });
|
|
||||||
mappingTransaction(booking);
|
mappingTransaction(booking);
|
||||||
console.log('after mapping');
|
|
||||||
|
|
||||||
if (!couchData) {
|
if (!couchData) {
|
||||||
console.log('save data to couch');
|
|
||||||
await this.couchService.createDoc(
|
await this.couchService.createDoc(
|
||||||
{
|
{
|
||||||
_id: booking.id,
|
_id: booking.id,
|
||||||
|
@ -111,7 +108,6 @@ export class ChangeStatusBookingHandler
|
||||||
'booking',
|
'booking',
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
console.log('update data to couch');
|
|
||||||
await this.couchService.updateDoc(
|
await this.couchService.updateDoc(
|
||||||
{
|
{
|
||||||
_id: booking.id,
|
_id: booking.id,
|
||||||
|
@ -137,7 +133,6 @@ export class BookingUpdateHandler
|
||||||
const dataID = data?.id ?? data?.order_id;
|
const dataID = data?.id ?? data?.order_id;
|
||||||
|
|
||||||
const couchData = await this.couchService.getDoc(dataID, 'booking');
|
const couchData = await this.couchService.getDoc(dataID, 'booking');
|
||||||
console.log('update', { dataID, couchData });
|
|
||||||
if (couchData) {
|
if (couchData) {
|
||||||
const booking = await this.bookingService.getOneByOptions({
|
const booking = await this.bookingService.getOneByOptions({
|
||||||
where: {
|
where: {
|
||||||
|
@ -145,7 +140,6 @@ export class BookingUpdateHandler
|
||||||
},
|
},
|
||||||
relations: ['items'],
|
relations: ['items'],
|
||||||
});
|
});
|
||||||
console.log({ booking });
|
|
||||||
mappingTransaction(booking);
|
mappingTransaction(booking);
|
||||||
await this.couchService.updateDoc(
|
await this.couchService.updateDoc(
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue