simpo-component-library 1.8.5 → 1.8.7
Sign up to get free protection for your applications and to get access to all the features.
- package/esm2022/lib/services/storage.service.mjs +3 -3
- package/fesm2022/simpo-component-library.mjs +2 -2
- package/fesm2022/simpo-component-library.mjs.map +1 -1
- package/lib/directive/background-directive.d.ts +1 -1
- package/lib/directive/button-directive.directive.d.ts +1 -1
- package/lib/directive/color.directive.d.ts +1 -1
- package/lib/sections/pricing-section/pricing-section.component.d.ts +1 -1
- package/package.json +1 -1
- package/simpo-component-library-1.8.7.tgz +0 -0
- package/simpo-component-library-1.8.5.tgz +0 -0
@@ -104,13 +104,13 @@ export class StorageServiceService {
|
|
104
104
|
]);
|
105
105
|
request.subscribe((cartResponse) => {
|
106
106
|
console.log("Cart Response : ", cartResponse);
|
107
|
-
const
|
107
|
+
const userDetails = this.getUser();
|
108
|
+
const userCart = cartResponse?.[0].data[0] ? cartResponse?.[0].data[0] : new Cart({ 'cartType': cartType.CART, 'userDetails': userDetails, 'platform': 'WEB' });
|
108
109
|
if (userCart?.cartId)
|
109
110
|
localStorage.setItem("cartId", userCart?.cartId);
|
110
111
|
this.getUserCart().then((userCartResponse) => {
|
111
112
|
userCartResponse.onsuccess = (userCartIndexDB) => {
|
112
113
|
userCart.orderedItems = [...(userCartIndexDB.target.result ?? []), ...(userCart?.orderedItems ?? [])];
|
113
|
-
userCart.cartType = cartType.CART;
|
114
114
|
this.addAllProductsToCart(userCart.orderedItems);
|
115
115
|
this.restService.addItemToDB(userCart).subscribe((res) => {
|
116
116
|
if (res?.data?.cartId && !localStorage.getItem('cartId'))
|
@@ -230,4 +230,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImpor
|
|
230
230
|
providedIn: 'root'
|
231
231
|
}]
|
232
232
|
}], ctorParameters: () => [{ type: i1.EventsService }, { type: i2.CookieService }, { type: i3.RestService }] });
|
233
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RvcmFnZ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C8vICAgICAgIGNvbnN0IHJlcXVlc3QgPSBhd2FpdCB0aGlzLmRhdGFiYXNlXHJcbiAgLy8gICAgICAgICAudHJhbnNhY3Rpb24odGhpcy5vYmplY3RTdG9yYWdlTmFtZSwgJ3JlYWR3cml0ZScpXHJcbiAgLy8gICAgICAgICAub2JqZWN0U3RvcmUodGhpcy5vYmplY3RTdG9yYWdlTmFtZSlcclxuICAvLyAgICAgICAgIC5jbGVhcigpO1xyXG5cclxuICAvLyAgICAgICByZXF1ZXN0Lm9uc3VjY2VzcyA9IGF3YWl0IGZ1bmN0aW9uIChldmVudDogYW55KSB7XHJcblxyXG4gIC8vICAgICAgICAgaWYgKGV2ZW50LnRhcmdldC5yZXN1bHQpIHtcclxuICAvLyAgICAgICAgICAgcmVzb2x2ZShldmVudC5yZXN1bHQpO1xyXG4gIC8vICAgICAgICAgfSBlbHNlIHtcclxuICAvLyAgICAgICAgICAgcmVzb2x2ZSgnU1VDQ0VTUycpO1xyXG4gIC8vICAgICAgICAgfVxyXG4gIC8vICAgICAgIH07XHJcbiAgLy8gICAgICAgcmVxdWVzdC5vbmVycm9yID0gYXdhaXQgZnVuY3Rpb24gKF9ldmVudCkge1xyXG4gIC8vICAgICAgICAgcmVqZWN0KFwiTm8gZGF0YVwiKTtcclxuICAvLyAgICAgICB9XHJcbiAgLy8gICAgIH1cclxuICAvLyAgIH0pO1xyXG4gIC8vIH1cclxufVxyXG4iXX0=
|
@@ -3623,13 +3623,13 @@ class StorageServiceService {
|
|
3623
3623
|
]);
|
3624
3624
|
request.subscribe((cartResponse) => {
|
3625
3625
|
console.log("Cart Response : ", cartResponse);
|
3626
|
-
const
|
3626
|
+
const userDetails = this.getUser();
|
3627
|
+
const userCart = cartResponse?.[0].data[0] ? cartResponse?.[0].data[0] : new Cart({ 'cartType': cartType.CART, 'userDetails': userDetails, 'platform': 'WEB' });
|
3627
3628
|
if (userCart?.cartId)
|
3628
3629
|
localStorage.setItem("cartId", userCart?.cartId);
|
3629
3630
|
this.getUserCart().then((userCartResponse) => {
|
3630
3631
|
userCartResponse.onsuccess = (userCartIndexDB) => {
|
3631
3632
|
userCart.orderedItems = [...(userCartIndexDB.target.result ?? []), ...(userCart?.orderedItems ?? [])];
|
3632
|
-
userCart.cartType = cartType.CART;
|
3633
3633
|
this.addAllProductsToCart(userCart.orderedItems);
|
3634
3634
|
this.restService.addItemToDB(userCart).subscribe((res) => {
|
3635
3635
|
if (res?.data?.cartId && !localStorage.getItem('cartId'))
|