@infrab4a/connect-angular 4.4.0-beta.6 → 4.4.0-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1220,24 +1220,23 @@ class CheckoutService {
|
|
|
1220
1220
|
return this.getCheckout().pipe(concatMap((checkout) => this.couponService.checkCoupon(nickname, CheckoutTypes.ECOMMERCE, checkout, null).pipe()));
|
|
1221
1221
|
}
|
|
1222
1222
|
async createCheckout(checkoutData) {
|
|
1223
|
-
const checkout1 = {
|
|
1224
|
-
createdAt: new Date(),
|
|
1225
|
-
...Checkout.toInstance(pick(checkoutData, ['user', 'shop'])).toPlain(),
|
|
1226
|
-
shop: checkoutData?.shop || this.defaultShop,
|
|
1227
|
-
};
|
|
1228
1223
|
const checkout2 = Checkout.toInstance({
|
|
1229
1224
|
createdAt: new Date(),
|
|
1230
1225
|
...pick(checkoutData, ['user', 'shop']),
|
|
1231
1226
|
shop: checkoutData?.shop || this.defaultShop,
|
|
1232
1227
|
});
|
|
1233
|
-
console.log('createCheckout');
|
|
1234
|
-
console.log('createCheckout checkout1', checkout1);
|
|
1235
|
-
console.log('createCheckout checkout2', checkout2);
|
|
1228
|
+
console.log('createCheckout', checkout2, checkout2.toPlain());
|
|
1236
1229
|
const checkout = await this.checkoutRepository.create({
|
|
1237
1230
|
createdAt: new Date(),
|
|
1238
|
-
...
|
|
1231
|
+
...pick(checkoutData, ['user', 'shop']),
|
|
1239
1232
|
shop: checkoutData?.shop || this.defaultShop,
|
|
1240
1233
|
});
|
|
1234
|
+
console.log('checkout', checkout);
|
|
1235
|
+
// const checkout = await this.checkoutRepository.create({
|
|
1236
|
+
// createdAt: new Date(),
|
|
1237
|
+
// ...Checkout.toInstance(pick(checkoutData, ['user', 'shop'])).toPlain(),
|
|
1238
|
+
// shop: checkoutData?.shop || this.defaultShop,
|
|
1239
|
+
// })
|
|
1241
1240
|
cookie.set('checkoutId', checkout.id);
|
|
1242
1241
|
return checkout;
|
|
1243
1242
|
}
|