ng-easycommerce 0.0.498 → 0.0.500
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.
- package/bundles/ng-easycommerce.umd.js +47 -19
- package/bundles/ng-easycommerce.umd.js.map +1 -1
- package/bundles/ng-easycommerce.umd.min.js +1 -1
- package/bundles/ng-easycommerce.umd.min.js.map +1 -1
- package/esm2015/lib/ec-component/account-ec/account-ec.component.js +2 -2
- package/esm2015/lib/ec-component/account-ec/order-ec/order-ec.component.js +2 -2
- package/esm2015/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +2 -2
- package/esm2015/lib/ec-component/blocks-ec/block-banner-full-ec/block-banner-full-ec.component.js +2 -2
- package/esm2015/lib/ec-component/cart-ec/cart-ec.component.js +29 -7
- package/esm2015/lib/ec-component/checkout-ec/step-ec/step-ec.component.js +8 -4
- package/esm2015/lib/services/checkout/shipment.service.js +2 -2
- package/esm2015/lib/utils/analytics/gtm.service.js +8 -6
- package/esm5/lib/ec-component/account-ec/account-ec.component.js +2 -2
- package/esm5/lib/ec-component/account-ec/order-ec/order-ec.component.js +2 -2
- package/esm5/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +2 -2
- package/esm5/lib/ec-component/blocks-ec/block-banner-full-ec/block-banner-full-ec.component.js +2 -2
- package/esm5/lib/ec-component/cart-ec/cart-ec.component.js +30 -7
- package/esm5/lib/ec-component/checkout-ec/step-ec/step-ec.component.js +8 -4
- package/esm5/lib/services/checkout/shipment.service.js +2 -2
- package/esm5/lib/utils/analytics/gtm.service.js +8 -6
- package/fesm2015/ng-easycommerce.js +46 -19
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +47 -19
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/cart-ec/cart-ec.component.d.ts +1 -1
- package/lib/ec-component/checkout-ec/step-ec/step-ec.component.d.ts +4 -1
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -2713,6 +2713,7 @@
|
|
|
2713
2713
|
if (!_this.isLoaded)
|
|
2714
2714
|
return;
|
|
2715
2715
|
var event = _this.translateEventName(event_name);
|
|
2716
|
+
event && _this.pushTag({ ecommerce: null });
|
|
2716
2717
|
event && _this.pushTag({ 'event': _this.translateEventName(event_name), ecommerce: _this.evalEvent(event_name, data) });
|
|
2717
2718
|
};
|
|
2718
2719
|
this.translateEventName = function (event_name) {
|
|
@@ -2776,7 +2777,7 @@
|
|
|
2776
2777
|
item_variant: ((_b = item.product.variants[0]) === null || _b === void 0 ? void 0 : _b.code) || '',
|
|
2777
2778
|
//location_id: '',
|
|
2778
2779
|
price: ((_c = item.product.variants[0]) === null || _c === void 0 ? void 0 : _c.saleprice) || ((_d = item.product.variants[0]) === null || _d === void 0 ? void 0 : _d.price),
|
|
2779
|
-
quantity: item.
|
|
2780
|
+
quantity: item.quantity || 1,
|
|
2780
2781
|
});
|
|
2781
2782
|
})
|
|
2782
2783
|
};
|
|
@@ -2805,7 +2806,7 @@
|
|
|
2805
2806
|
item_variant: ((_b = item.product.variants[0]) === null || _b === void 0 ? void 0 : _b.code) || '',
|
|
2806
2807
|
//location_id: '',
|
|
2807
2808
|
price: ((_c = item.product.variants[0]) === null || _c === void 0 ? void 0 : _c.saleprice) || ((_d = item.product.variants[0]) === null || _d === void 0 ? void 0 : _d.price),
|
|
2808
|
-
quantity: item.
|
|
2809
|
+
quantity: item.quantity || 1,
|
|
2809
2810
|
});
|
|
2810
2811
|
}),
|
|
2811
2812
|
value: ((_a = data.totals) === null || _a === void 0 ? void 0 : _a.total) || 0,
|
|
@@ -2829,6 +2830,7 @@
|
|
|
2829
2830
|
this.toViewItem = function (product) {
|
|
2830
2831
|
return {
|
|
2831
2832
|
currency: product.currency,
|
|
2833
|
+
value: product.price,
|
|
2832
2834
|
items: [_this.toItem(product)]
|
|
2833
2835
|
};
|
|
2834
2836
|
};
|
|
@@ -2896,7 +2898,7 @@
|
|
|
2896
2898
|
item_variant: ((_b = item.product.variants[0]) === null || _b === void 0 ? void 0 : _b.code) || '',
|
|
2897
2899
|
//location_id: '',
|
|
2898
2900
|
price: ((_c = item.product.variants[0]) === null || _c === void 0 ? void 0 : _c.saleprice) || ((_d = item.product.variants[0]) === null || _d === void 0 ? void 0 : _d.price),
|
|
2899
|
-
quantity: item.
|
|
2901
|
+
quantity: item.quantity || 1,
|
|
2900
2902
|
});
|
|
2901
2903
|
}),
|
|
2902
2904
|
};
|
|
@@ -2927,7 +2929,7 @@
|
|
|
2927
2929
|
item_variant: ((_b = item.product.variants[0]) === null || _b === void 0 ? void 0 : _b.code) || '',
|
|
2928
2930
|
//location_id: '',
|
|
2929
2931
|
price: ((_c = item.product.variants[0]) === null || _c === void 0 ? void 0 : _c.saleprice) || ((_d = item.product.variants[0]) === null || _d === void 0 ? void 0 : _d.price),
|
|
2930
|
-
quantity: item.
|
|
2932
|
+
quantity: item.quantity || 1,
|
|
2931
2933
|
});
|
|
2932
2934
|
}),
|
|
2933
2935
|
};
|
|
@@ -2947,7 +2949,7 @@
|
|
|
2947
2949
|
this.toSelectItem = function (data) {
|
|
2948
2950
|
console.log(data);
|
|
2949
2951
|
return {
|
|
2950
|
-
|
|
2952
|
+
items: _this.toItem(data)
|
|
2951
2953
|
};
|
|
2952
2954
|
};
|
|
2953
2955
|
}
|
|
@@ -5192,7 +5194,7 @@
|
|
|
5192
5194
|
data = __assign$c(__assign$c({}, contract), this.otherParamsForContract(contract));
|
|
5193
5195
|
return [4 /*yield*/, this.connection.put(this.putContractApi(), data)
|
|
5194
5196
|
.toPromise().then(function (order) {
|
|
5195
|
-
|
|
5197
|
+
// this.analyticsService.callEvent('shipping_info', order);
|
|
5196
5198
|
return _this.setStepReady(data, order);
|
|
5197
5199
|
}, function (err) {
|
|
5198
5200
|
return new Promise(function (resolve, reject) { return reject(new Error(err.error)); });
|
|
@@ -6026,7 +6028,7 @@
|
|
|
6026
6028
|
AccountEcComponent = __decorate$F([
|
|
6027
6029
|
core.Component({
|
|
6028
6030
|
selector: 'app-account-ec',
|
|
6029
|
-
template: "<section class=\"perfil mt-5\" id=\"accountEcComponent\">\n <div class=\"container row w-100 mx-auto py-md-3\">\n <div class=\"col-12 py-3\">\n <div class=\"row w-100 mx-auto border-bottom justify-content-between align-items-center py-3\">\n <h3 class=\"text-black w-auto\">MIS
|
|
6031
|
+
template: "<section class=\"perfil mt-5\" id=\"accountEcComponent\">\n <div class=\"container row w-100 mx-auto py-md-3\">\n <div class=\"col-12 py-3\">\n <div class=\"row w-100 mx-auto border-bottom justify-content-between align-items-center py-3\">\n <h3 class=\"text-black w-auto\">MIS PEDIDOS2232323232</h3>\n <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto\" (click)=\"logout()\">CERRAR SESI\u00D3N</button>\n </div>\n <app-orders-ec></app-orders-ec>\n </div>\n </div>\n</section>\n",
|
|
6030
6032
|
styles: [".font-size-10{font-size:10px!important}"]
|
|
6031
6033
|
})
|
|
6032
6034
|
], AccountEcComponent);
|
|
@@ -6321,7 +6323,7 @@
|
|
|
6321
6323
|
BlockBannerFullEcComponent = __decorate$H([
|
|
6322
6324
|
core.Component({
|
|
6323
6325
|
selector: 'app-block-banner-full-ec',
|
|
6324
|
-
template: "<section [ngClass]=\"trimClassBlock(meta.code) + ' container-fluid px-0'\" *ngIf=\"banners.length\"\n [style.background-color]=\"meta.styles?.backgroundColor\"\n [style.background-image]=\"meta.styles?.backgroundImage ? 'url(' + consts.mediaUrl() + meta.styles?.backgroundImage +')' : 'inherit'\">\n\n\n <!-- si es formato fijo -->\n <ng-container *ngIf=\"banners.length == 1;else carrousel \">\n\n <div class=\"row justify-content-center\">\n <!-- banner sin boton -->\n <a *ngIf=\"!banners[0].styles?.button?.text; else fullwithButton\" href=\"{{banners[0].url}}\">\n <div class=\"item col-12\">\n <img class=\"img-fluid\" [src]=\"consts.mediaBannerUrl() + getImage(banners[0])\" alt=\"\">\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n <h2 *ngIf=\"banners[0].title\" [class]=\"'item-title-full px-2 item-position-vertical-' + (banners[0].styles?.description?.position)\"\n [style.color]=\"(banners[0].styles?.description?.color) ? banners[0].styles?.description?.color : '#fff' \">\n {{banners[0].title}}\n </h2>\n <p *ngIf=\"banners[0].subtitle\"\n [style.color]=\"(banners[0].styles?.description?.color) ? banners[0].styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banners[0].styles?.description?.position)\">\n {{banners[0].subtitle}}\n </p>\n </div>\n </div>\n </a>\n\n <!-- banner fijo con boton -->\n <ng-template #fullwithButton>\n <div class=\"item col-12\">\n <img class=\"img-fluid\" [src]=\"consts.mediaBannerUrl() + getImage(banners[0])\" alt=\"\">\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n <h2 *ngIf=\"banners[0].title\" [class]=\"'item-title-full px-2 item-position-vertical-' + (banners[0].styles?.description?.position)\"\n [style.color]=\"(banners[0].styles?.description?.color) ? banners[0].styles?.description?.color : '#000' \">\n {{banners[0].title}}\n </h2>\n <p *ngIf=\"banners[0].subtitle\"\n [style.color]=\"(banners[0].styles?.description?.color) ? banners[0].styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banners[0].styles?.description?.position)\">\n {{banners[0].subtitle}}\n </p>\n <div [class]=\"'item-position-vertical-' + (banners[0].styles?.button?.position)\">\n <a *ngIf=\"banners[0].styles?.button?.text\" href=\"{{banners[0].url}}\"\n [class]=\"'item-button-full btn btn-light '\">\n {{banners[0].styles.button.text}}\n </a>\n </div>\n </div>\n </div>\n\n </ng-template>\n </div>\n </ng-container>\n\n\n <!-- si es carrousel -->\n <ng-template #carrousel>\n\n <owl-carousel-o [options]=\"options\">\n <ng-template carouselSlide *ngFor=\"let banner of banners\" [id]=\"banner.id\">\n\n <!-- banner sin boton -->\n <div class=\"item\" *ngIf=\"!banner.styles?.button?.text; else carrouselwithButton\">\n <a *ngIf=\"banner.url; else onlyImage\" href=\"{{banner.url}}\">\n <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" alt=\"\">\n </a>\n <ng-template #onlyImage>\n <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" alt=\"\">\n </ng-template>\n </div>\n\n <!-- banner con boton -->\n <ng-template #carrouselwithButton>\n <div class=\"item\">\n <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" alt=\"\">\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n <h2 *ngIf=\"banner.title\"\n [class]=\"'item-title-full px-2 item-position-vertical-'+ (banner.styles?.description?.position)\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \">\n {{banner.title}}\n </h2>\n <p *ngIf=\"banner.subtitle\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n <div [class]=\"'item-position-vertical-' + (banner.styles?.button?.position)\">\n <a *ngIf=\"banner.styles?.button?.text\" href=\"{{banner.url}}\"\n [class]=\"'item-button-full btn btn-light'\">\n {{banner.styles.button.text}}\n </a>\n </div>\n </div>\n <!-- <a *ngIf=\"!banner.url && (formUrl(banner) != '/')\" [routerLink]=\"formUrl(banner)\"\n class=\"btn btn-outline-light rounded-0 py-3 px-4 btn-conoce btn-caption-banner\">\n Conocé Mas</a>\n <a *ngIf=\"banner.url\" href=\"{{banner.url}}\"\n class=\"btn btn-outline-light rounded-0 py-3 px-4 btn-conoce btn-caption-banner\">\n Conocé Mas</a> -->\n </div>\n </ng-template>\n\n\n <!-- <div class=\"item\">\n <a *ngIf=\"banner.url; else onlyImage\" href=\"{{banner.url}}\">\n <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" alt=\"\">\n </a>\n <ng-template #onlyImage>\n <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" alt=\"\">\n </ng-template>\n <div class=\"carousel-caption d-block\">\n <a *ngIf=\"!banner.url && (formUrl(banner) != '/')\" [routerLink]=\"formUrl(banner)\"\n class=\"btn btn-outline-light rounded-0 py-3 px-4 btn-conoce btn-caption-banner\">\n Conocé Mas</a>\n <a *ngIf=\"banner.url\" href=\"{{banner.url}}\"\n class=\"btn btn-outline-light rounded-0 py-3 px-4 btn-conoce btn-caption-banner\">\n Conocé Mas</a>\n </div>\n </div> -->\n </ng-template>\n </owl-carousel-o>\n </ng-template>\n</section
|
|
6326
|
+
template: "<section [ngClass]=\"trimClassBlock(meta.code) + ' container-fluid px-0'\" *ngIf=\"banners.length\"\n [style.background-color]=\"meta.styles?.backgroundColor\"\n [style.background-image]=\"meta.styles?.backgroundImage ? 'url(' + consts.mediaUrl() + meta.styles?.backgroundImage +')' : 'inherit'\">\n\n\n <!-- si es formato fijo -->\n <ng-container *ngIf=\"banners.length == 1;else carrousel \">\n\n <div class=\"row justify-content-center\">\n <!-- banner sin boton -->\n <a *ngIf=\"!banners[0].styles?.button?.text; else fullwithButton\" href=\"{{banners[0].url}}\">\n <div class=\"item col-12\">\n <img class=\"img-fluid\" [src]=\"consts.mediaBannerUrl() + getImage(banners[0])\" alt=\"\">\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n <h2 *ngIf=\"banners[0].title\" [class]=\"'item-title-full px-2 item-position-vertical-' + (banners[0].styles?.description?.position)\"\n [style.color]=\"(banners[0].styles?.description?.color) ? banners[0].styles?.description?.color : '#fff' \">\n {{banners[0].title}}\n </h2>\n <p *ngIf=\"banners[0].subtitle\"\n [style.color]=\"(banners[0].styles?.description?.color) ? banners[0].styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banners[0].styles?.description?.position)\">\n {{banners[0].subtitle}}\n </p>\n </div>\n </div>\n </a>\n\n <!-- banner fijo con boton -->\n <ng-template #fullwithButton>\n <div class=\"item col-12\">\n <img class=\"img-fluid\" [src]=\"consts.mediaBannerUrl() + getImage(banners[0])\" alt=\"\">\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n <h2 *ngIf=\"banners[0].title\" [class]=\"'item-title-full px-2 item-position-vertical-' + (banners[0].styles?.description?.position)\"\n [style.color]=\"(banners[0].styles?.description?.color) ? banners[0].styles?.description?.color : '#000' \">\n {{banners[0].title}}\n </h2>\n <p *ngIf=\"banners[0].subtitle\"\n [style.color]=\"(banners[0].styles?.description?.color) ? banners[0].styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banners[0].styles?.description?.position)\">\n {{banners[0].subtitle}}\n </p>\n <div [class]=\"'item-position-vertical-' + (banners[0].styles?.button?.position)\">\n <a *ngIf=\"banners[0].styles?.button?.text\" href=\"{{banners[0].url}}\"\n [class]=\"'item-button-full btn btn-light '\">\n {{banners[0].styles.button.text}}\n </a>\n </div>\n </div>\n </div>\n\n </ng-template>\n </div>\n </ng-container>\n\n\n <!-- si es carrousel -->\n <ng-template #carrousel>\n\n <owl-carousel-o [options]=\"options\">\n <ng-template carouselSlide *ngFor=\"let banner of banners\" [id]=\"banner.id\">\n\n <!-- banner sin boton -->\n <div class=\"item\" *ngIf=\"!banner.styles?.button?.text; else carrouselwithButton\">\n <a *ngIf=\"banner.url; else onlyImage\" href=\"{{banner.url}}\">\n <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" alt=\"\">\n </a>\n <ng-template #onlyImage>\n <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" alt=\"\">\n </ng-template>\n </div>\n\n <!-- banner con boton -->\n <ng-template #carrouselwithButton>\n <div class=\"item\">\n <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" alt=\"\">\n <div class=\"position-absolute w-100 h-100 start-0 top-0\">\n <h2 *ngIf=\"banner.title\"\n [class]=\"'item-title-full px-2 item-position-vertical-'+ (banner.styles?.description?.position)\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \">\n {{banner.title}}\n </h2>\n <p *ngIf=\"banner.subtitle\"\n [style.color]=\"(banner.styles?.description?.color) ? banner.styles?.description?.color : '#000' \"\n [class]=\"'px-4 item-subtitle-full item-position-vertical-' + (banner.styles?.description?.position)\">\n {{banner.subtitle}}\n </p>\n <div [class]=\"'item-position-vertical-' + (banner.styles?.button?.position)\">\n <a *ngIf=\"banner.styles?.button?.text\" href=\"{{banner.url}}\"\n [class]=\"'item-button-full btn btn-light'\">\n {{banner.styles.button.text}}\n </a>\n </div>\n </div>\n <!-- <a *ngIf=\"!banner.url && (formUrl(banner) != '/')\" [routerLink]=\"formUrl(banner)\"\n class=\"btn btn-outline-light rounded-0 py-3 px-4 btn-conoce btn-caption-banner\">\n Conocé Mas</a>\n <a *ngIf=\"banner.url\" href=\"{{banner.url}}\"\n class=\"btn btn-outline-light rounded-0 py-3 px-4 btn-conoce btn-caption-banner\">\n Conocé Mas</a> -->\n </div>\n </ng-template>\n\n\n <!-- <div class=\"item\">\n <a *ngIf=\"banner.url; else onlyImage\" href=\"{{banner.url}}\">\n <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" alt=\"\">\n </a>\n <ng-template #onlyImage>\n <img [src]=\"consts.mediaBannerUrl() + getImage(banner)\" alt=\"\">\n </ng-template>\n <div class=\"carousel-caption d-block\">\n <a *ngIf=\"!banner.url && (formUrl(banner) != '/')\" [routerLink]=\"formUrl(banner)\"\n class=\"btn btn-outline-light rounded-0 py-3 px-4 btn-conoce btn-caption-banner\">\n Conocé Mas</a>\n <a *ngIf=\"banner.url\" href=\"{{banner.url}}\"\n class=\"btn btn-outline-light rounded-0 py-3 px-4 btn-conoce btn-caption-banner\">\n Conocé Mas</a>\n </div>\n </div> -->\n </ng-template>\n </owl-carousel-o>\n </ng-template>\n</section>\n",
|
|
6325
6327
|
styles: [".owl-theme .owl-nav{background:0 0!important}.item{position:relative}.item-title{top:30%}.item-title-full{top:50%}.item-subtitle-full{top:60%}.item-subtitle{top:40%}.item-button{top:60%}.item-button.item-position-vertical-center{left:50%;transform:translate(-50%)}.item-button.item-position-vertical-left{left:10%}.item-button.item-position-vertical-right{right:5%;transform:translate(-50%)}.item-button-full{top:70%}.item-button-full.item-position-vertical-center{left:50%;transform:translate(-50%)}.item-button-full.item-position-vertical-left{left:10%}.item-button-full.item-position-vertical-right{right:5%;transform:translate(-50%)}.item-position-vertical-left{text-align:left}.item-position-vertical-center{text-align:center}.item-position-vertical-right{text-align:right}h2.item-title-full::after{content:none}"]
|
|
6326
6328
|
})
|
|
6327
6329
|
], BlockBannerFullEcComponent);
|
|
@@ -6997,7 +6999,6 @@
|
|
|
6997
6999
|
_this.isLoggedIn = false;
|
|
6998
7000
|
_this.mediaUrl = '';
|
|
6999
7001
|
_this.promotions = [];
|
|
7000
|
-
_this.addressBook = [];
|
|
7001
7002
|
_this.toDecimal = function (amount) { return _this.consts.toDecimal(amount); };
|
|
7002
7003
|
_this.actualizarCantidad = function (item, cantidad, stock) {
|
|
7003
7004
|
cantidad > 0 && cantidad <= stock ? _this.cartService.updateItemQuantity(item, cantidad) : _this.toastrService.show('out-of-stock-actually');
|
|
@@ -7031,9 +7032,18 @@
|
|
|
7031
7032
|
path += variant.options.length ? "?variant=true" : "";
|
|
7032
7033
|
this.router.navigateByUrl(path);
|
|
7033
7034
|
};
|
|
7035
|
+
CartEcComponent.prototype.formatDate = function (date) {
|
|
7036
|
+
var d = new Date(date), month = '' + (d.getMonth() + 1), day = '' + d.getDate(), year = d.getFullYear();
|
|
7037
|
+
if (month.length < 2)
|
|
7038
|
+
month = '0' + month;
|
|
7039
|
+
if (day.length < 2)
|
|
7040
|
+
day = '0' + day;
|
|
7041
|
+
return [year, month, day].join('-');
|
|
7042
|
+
};
|
|
7034
7043
|
CartEcComponent.prototype.cargaModal = function (item) {
|
|
7035
7044
|
return __awaiter$8(this, void 0, void 0, function () {
|
|
7036
7045
|
var sedes, id, this_, allID, bodyTable;
|
|
7046
|
+
var _this = this;
|
|
7037
7047
|
return __generator$8(this, function (_a) {
|
|
7038
7048
|
switch (_a.label) {
|
|
7039
7049
|
case 0: return [4 /*yield*/, this.cartService.getAddressBook()];
|
|
@@ -7057,9 +7067,11 @@
|
|
|
7057
7067
|
var cell3 = row.insertCell(2);
|
|
7058
7068
|
var cell4 = row.insertCell(3);
|
|
7059
7069
|
var cell5 = row.insertCell(4);
|
|
7070
|
+
var cell6 = row.insertCell(5);
|
|
7071
|
+
var date = new Date(Date.parse(lot['date_deliver']));
|
|
7060
7072
|
cell1.innerHTML = '<input id="id' + id + '" style="border: 0;" value="' + lot.id + '" disabled>';
|
|
7061
7073
|
cell2.innerHTML = '<input type="number" id="quantity' + id + '" value= "' + lot.quantity + '"class="form-control w-50" max="' + lot.quantity + '">';
|
|
7062
|
-
cell3.innerHTML = '<input type="
|
|
7074
|
+
cell3.innerHTML = '<input type="date" value="' + _this.formatDate(date) + '" id="deliveryDate' + id + '" class="form-control w-75">';
|
|
7063
7075
|
var opciones = "";
|
|
7064
7076
|
sedes.forEach(function (sede) {
|
|
7065
7077
|
if (sede.id == lot.shipping_address_id) {
|
|
@@ -7070,7 +7082,12 @@
|
|
|
7070
7082
|
}
|
|
7071
7083
|
});
|
|
7072
7084
|
cell4.innerHTML = '<select id="shippingAddress' + id + '" class="form-control w-75">' + opciones + '</select>';
|
|
7073
|
-
cell5.innerHTML = '<
|
|
7085
|
+
cell5.innerHTML = '<input type="button" class="btn btn-primary btnSeguir" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample' + id + '" aria-expanded="false" aria-controls="collapseExample' + id + '" value="Ver"></input>';
|
|
7086
|
+
cell6.innerHTML = '<div class="col-1 flex-grow-0 text-right btnBorrar d-none d-md-block d-none d-md-block"><button value="' + lot.id + '" class="btn" id="botonBorrar"><img src="./assets/maquetado/img/ic-borrar.svg" alt=""> </button></div>';
|
|
7087
|
+
var row2 = bodyTable.insertRow(bodyTable.rows.length);
|
|
7088
|
+
var fila2 = row2.insertCell(0);
|
|
7089
|
+
fila2.colSpan = 6;
|
|
7090
|
+
fila2.innerHTML = '<div class="collapse" id="collapseExample' + id + '"><input id="notes' + id + '" class="form-control" value="' + lot.notes + '" placeholder="Ingrese un comentario en caso de que sea necesario." type="text"/></div>';
|
|
7074
7091
|
id = id + 1;
|
|
7075
7092
|
allID.push(lot['id']);
|
|
7076
7093
|
});
|
|
@@ -7092,13 +7109,19 @@
|
|
|
7092
7109
|
var cell3 = row.insertCell(2);
|
|
7093
7110
|
var cell4 = row.insertCell(3);
|
|
7094
7111
|
var cell5 = row.insertCell(4);
|
|
7112
|
+
var cell6 = row.insertCell(5);
|
|
7095
7113
|
cell1.innerHTML = '<input id="id' + id + '" style="border: 0;" value="Pendt." disabled>';
|
|
7096
7114
|
cell2.innerHTML = '<input type="number" id="quantity' + id + '" value= "' + (item['quantity'] - cantidadActual) + '"class="form-control w-50" max="' + (item['quantity'] - cantidadActual) + '">';
|
|
7097
7115
|
cell3.innerHTML = '<input type="date" id="deliveryDate' + id + '" class="form-control w-75">';
|
|
7098
7116
|
var opciones = "";
|
|
7099
7117
|
sedes.forEach(function (sede) { opciones += '<option value="' + sede.id + '">' + sede.city + ' - ' + sede.street + '</option>'; });
|
|
7100
7118
|
cell4.innerHTML = '<select id="shippingAddress' + id + '" class="form-control w-75">' + opciones + '</select>';
|
|
7101
|
-
cell5.innerHTML = '<
|
|
7119
|
+
cell5.innerHTML = '<input type="button" class="btn btn-primary btnSeguir" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample' + id + '" aria-expanded="false" aria-controls="collapseExample' + id + '" value="Ver"></input>';
|
|
7120
|
+
cell6.innerHTML = '<div class="col-1 flex-grow-0 text-right btnBorrar d-none d-md-block d-none d-md-block"><button class="btn" id="botonBorrar"><img src="./assets/maquetado/img/ic-borrar.svg" alt=""> </butt></div>';
|
|
7121
|
+
var row2 = bodyTable.insertRow(bodyTable.rows.length);
|
|
7122
|
+
var fila2 = row2.insertCell(0);
|
|
7123
|
+
fila2.colSpan = 6;
|
|
7124
|
+
fila2.innerHTML = '<div class="collapse" id="collapseExample' + id + '"><input id="notes' + id + '" class="form-control" placeholder="Ingrese un comentario en caso de que sea necesario." type="text"/></div>';
|
|
7102
7125
|
id = id + 1;
|
|
7103
7126
|
}
|
|
7104
7127
|
else {
|
|
@@ -7120,15 +7143,16 @@
|
|
|
7120
7143
|
var quantity = parseInt(document.getElementById("quantity" + index).value);
|
|
7121
7144
|
var deliveryDate = document.getElementById("deliveryDate" + index).value;
|
|
7122
7145
|
var shippingAddress = $("#shippingAddress" + index).val();
|
|
7146
|
+
var notes = $("#notes" + index).val();
|
|
7123
7147
|
var shippingAddressName = $('#shippingAddress' + index + ' option:selected').text();
|
|
7124
7148
|
}
|
|
7125
7149
|
if (lotID == 'Pendt.') {
|
|
7126
7150
|
// console.log('nuevo');
|
|
7127
|
-
this_.cartService.addToLot(item.product, 0, item.variant_id, 0, item.item_id, quantity, item.product.price, item.quantity,
|
|
7151
|
+
this_.cartService.addToLot(item.product, 0, item.variant_id, 0, item.item_id, quantity, item.product.price, item.quantity, item.discount, item.product.price * quantity, 'new', deliveryDate, notes, parseInt(shippingAddress), shippingAddressName, 'newlot');
|
|
7128
7152
|
}
|
|
7129
7153
|
else if (lotID != '') {
|
|
7130
7154
|
// console.log('editar');
|
|
7131
|
-
this_.cartService.addToLot(item.product, 0, item.variant_id, parseInt(lotID), item.item_id, quantity, item.product.price, item.quantity,
|
|
7155
|
+
this_.cartService.addToLot(item.product, 0, item.variant_id, parseInt(lotID), item.item_id, quantity, item.product.price, item.quantity, item.discount, item.product.price * quantity, 'edited', deliveryDate, notes, parseInt(shippingAddress), shippingAddressName, 'editlot');
|
|
7132
7156
|
}
|
|
7133
7157
|
}
|
|
7134
7158
|
allID.forEach(function (element) {
|
|
@@ -7140,6 +7164,7 @@
|
|
|
7140
7164
|
};
|
|
7141
7165
|
$(document).on('click', '#botonBorrar', function (event) {
|
|
7142
7166
|
event.preventDefault();
|
|
7167
|
+
// console.log(this);
|
|
7143
7168
|
$(this).closest('tr').remove();
|
|
7144
7169
|
});
|
|
7145
7170
|
return [2 /*return*/];
|
|
@@ -11988,7 +12013,7 @@
|
|
|
11988
12013
|
OrdersEcComponent = __decorate$1j([
|
|
11989
12014
|
core.Component({
|
|
11990
12015
|
selector: 'app-orders-ec',
|
|
11991
|
-
template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n <section id=\"orders\" class=\"w-100\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"orders && orders.length; else noOrders\">\n <div class=\"row mb-1 border-bottom\">\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'number' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('number')\">{{ 'order' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'paymentState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('paymentState')\">{{ 'payment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'method' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('method')\">{{ 'shipment-method' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12 \">\n <p\n [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'methodState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('methodState')\">\n {{ 'shipment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'date' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('date')\">{{ 'date' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'total' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('total')\">{{ 'total' | translate }}:</p>\n </div>\n </div>\n <div class=\"row item border-bottom py-2\" *ngFor=\"let order of orders\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n <ng-container *ngIf=\"showImage\">\n <ng-container *ngIf=\"order.items[0].product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth\" [src]=\"mediaUrl + order.items[0].product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"order.items[0].product.picturesdefault\" class=\"smc maxwidth\"\n [src]=\"mediaUrl + order.items[0].product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </ng-container>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\" *ngIf=\"order.payments && order.payments.length > 0\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n\n <p class=\"price\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\" class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold text-nowrap\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button>\n </div>\n </div>\n </div>\n </section>\n</div>\n\n<ng-template #noOrders>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #errorView>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h4>{{ 'orders-error' | translate }}</h4>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>\n",
|
|
12016
|
+
template: "<div class=\"container-fluid\" id=\"ordersEcComponent\">\n <section id=\"orders\" class=\"w-100\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"orders && orders.length; else noOrders\">\n <div class=\"row mb-1 border-bottom\">\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'number' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('number')\">{{ 'order' | translate }}aaa:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'paymentState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('paymentState')\">{{ 'payment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'method' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('method')\">{{ 'shipment-method' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12 \">\n <p\n [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'methodState' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('methodState')\">\n {{ 'shipment-state' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'date' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('date')\">{{ 'date' | translate }}:</p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p [class]=\"'st dropdown-toggle cursor-pointer my-2 '+ (currentSort.name == 'total' ? 'applied ' + (!currentSort.asc ? 'asc' : 'desc') : '')\"\n (click)=\"sortOrders('total')\">{{ 'total' | translate }}:</p>\n </div>\n </div>\n <div class=\"row item border-bottom py-2\" *ngFor=\"let order of orders\">\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\n <ng-container *ngIf=\"showImage\">\n <ng-container *ngIf=\"order.items[0].product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth\" [src]=\"mediaUrl + order.items[0].product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"order.items[0].product.picturesdefault\" class=\"smc maxwidth\"\n [src]=\"mediaUrl + order.items[0].product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </ng-container>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\" *ngIf=\"order.payments && order.payments.length > 0\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n\n <p class=\"price\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <!-- <button class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</button> -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\" class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"price\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <h5 class=\"fw-bold text-nowrap\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </h5>\n <button class=\"btn px-0 w-100 btdetalle\" (click)=\"goToOrder(order)\">{{\n 'see-order' | translate }}</button>\n </div>\n </div>\n </div>\n </section>\n</div>\n\n<ng-template #noOrders>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #errorView>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h4>{{ 'orders-error' | translate }}</h4>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>\n",
|
|
11992
12017
|
styles: ["#ordersEcComponent .btn.btdetalle{background-color:#000;color:#fff;border-color:#000;border-width:1px;border-radius:10px;padding:10px 0}#ordersEcComponent .btn.btdetalle:hover{background-color:#fff;color:#000;border-color:#000}.asc.dropdown-toggle::after{transform:rotate(180deg)}.applied.dropdown-toggle::after{color:#198754}"]
|
|
11993
12018
|
})
|
|
11994
12019
|
], OrdersEcComponent);
|
|
@@ -12118,7 +12143,7 @@
|
|
|
12118
12143
|
OrderEcComponent = __decorate$1k([
|
|
12119
12144
|
core.Component({
|
|
12120
12145
|
selector: 'app-order-ec',
|
|
12121
|
-
template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"order; else noOrder\">\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n <ng-container *ngIf=\"order?.invoice\">\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n </ng-container>\n <a (click)=\"volver()\" class=\"col-auto text-end\">\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\" class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n </div>\n </section>\n\n <div class=\"container py-3 border-top border-bottom\">\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\">\n {{ 'total' | translate | uppercase }}\n </div>\n </div>\n <ng-container *ngFor=\"let item of order.items\">\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \" [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"item.product.picturesdefault\" class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div>\n <div\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-4 font-xl\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice : item.product.variants[0].price) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"col-4 font-xl\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice : item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice : item.product.variants[0].price) | ecCurrencySymbol}}\n </p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice : item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n </div>\n </ng-container>\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n <div class=\"col-12 col-md-6\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' | translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.items) | ecCurrencySymbol }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' | translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\n </div>\n\n <div *ngIf=\"order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' | translate }}</div>\n <div *ngIf=\"order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n\n <div *ngIf=\"order.totals.taxes && order.totals.taxes != 0 \" class=\"col-6 font-brandon font-md text-gray border-bottom \">\n {{ 'taxes' | translate }}</div>\n <div *ngIf=\"order.totals.taxes && order.totals.taxes != 0\" class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</main>\n\n<ng-template #noOrder>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>\n",
|
|
12146
|
+
template: "<main class=\"py-5\" id=\"orderEcComponent\">\n <div class=\"container\">\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\n <div *ngIf=\"order; else noOrder\">\n\n <div class=\"row justify-content-between \">\n <div class=\"col-sm-auto col-12 font-brandon\">\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\n <ng-container *ngIf=\"order?.invoice\">\n <div class=\"col-sm col-12 font-brandon\">\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\n class=\"btn btn-link btn-invoice\">\n <i class=\"fas fa-file-download me-1\"></i>\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\n </a>\n </div>\n </ng-container>\n <a (click)=\"volver()\" class=\"col-auto text-end\">\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\n </a>\n </div>\n\n <section id=\"orders\">\n <div class=\"row pt-2\">\n <div class=\"col-md-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.payments[0]?.method?.name | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\" class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver seguimiento</a>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <p class=\"st\">{{ 'total' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n\n </h5>\n </div>\n </div>\n </section>\n\n <div class=\"container py-3 border-top border-bottom\">\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\n {{ 'description' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'unit-price' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'quantity' | translate | uppercase }}\n </div>\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\">\n {{ 'total' | translate | uppercase }}\n </div>\n </div>\n <ng-container *ngFor=\"let item of order.items\">\n <div class=\"row cart-items\">\n <div class=\"col-5 col-md-2 py-2\">\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \" [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\n </ng-container>\n <ng-template #defaultpicture>\n <img *ngIf=\"item.product.picturesdefault\" class=\"smc maxwidth img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div>\n <div\n class=\"col-md-4 col-7 flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <p class=\"font-brandon d-flex w-100 mb-0\">\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\n </p>\n <div class=\"container d-md-none\">\n <div class=\"row\">\n <div class=\"col-4\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-4 font-xl\">\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice : item.product.variants[0].price) | ecCurrencySymbol}}</p>\n </div>\n <div class=\"col-4 font-xl\">\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice : item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\">\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice : item.product.variants[0].price) | ecCurrencySymbol}}\n </p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\">\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\n </div>\n <div class=\"col-2 d-none d-md-flex align-items-center\">\n <p class=\"text-end w-100 m-0\">\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice : item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n </div>\n </ng-container>\n </div>\n\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"col-12 col-md-6\"></div>\n <div class=\"col-12 col-md-6\">\n <div class=\"row py-4\">\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' | translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.items) | ecCurrencySymbol }}\n </div>\n\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' | translate }}</div>\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n <!-- {{ (order.totals.shipping || '0') | ecCurrencySymbol }} -->\n Pendiente de cotizar\n </div>\n\n <div *ngIf=\"order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' | translate }}</div>\n <div *ngIf=\"order.totals.promotion && order.totals.promotion != 0\"\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\n\n <div *ngIf=\"order.totals.taxes && order.totals.taxes != 0 \" class=\"col-6 font-brandon font-md text-gray border-bottom \">\n {{ 'taxes' | translate }}</div>\n <div *ngIf=\"order.totals.taxes && order.totals.taxes != 0\" class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\n\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\n <div class=\"col-6 font-brandon font-md text-end\">\n {{ (order.totals.total) | ecCurrencySymbol }}\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n\n</main>\n\n<ng-template #noOrder>\n <div class=\"w-100 h-50\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <h5>{{ 'no-orders' | translate }}</h5>\n </div>\n </div>\n</ng-template>\n\n<ng-template #loadingView>\n <div class=\"w-100 h-50 py-5\">\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\n <app-loading-full-ec></app-loading-full-ec>\n </div>\n </div>\n</ng-template>\n",
|
|
12122
12147
|
styles: [".maxwidth{max-width:100px}"]
|
|
12123
12148
|
})
|
|
12124
12149
|
], OrderEcComponent);
|
|
@@ -15784,17 +15809,20 @@
|
|
|
15784
15809
|
};
|
|
15785
15810
|
var StepEcComponent = /** @class */ (function (_super) {
|
|
15786
15811
|
__extends$17(StepEcComponent, _super);
|
|
15787
|
-
function StepEcComponent(checkoutService) {
|
|
15812
|
+
function StepEcComponent(checkoutService, analyticsService) {
|
|
15788
15813
|
var _this = _super.call(this) || this;
|
|
15789
15814
|
_this.checkoutService = checkoutService;
|
|
15815
|
+
_this.analyticsService = analyticsService;
|
|
15790
15816
|
_this.isStepReady = function (step_name) { return _this.checkoutService.isStepReady(step_name); };
|
|
15817
|
+
_this.metodoEnvio = function (order) { return _this.analyticsService.callEvent('shipping_info', order); };
|
|
15791
15818
|
_this.ecOnConstruct();
|
|
15792
15819
|
return _this;
|
|
15793
15820
|
}
|
|
15794
15821
|
StepEcComponent.prototype.ngOnInit = function () {
|
|
15795
15822
|
};
|
|
15796
15823
|
StepEcComponent.ctorParameters = function () { return [
|
|
15797
|
-
{ type: CheckoutService }
|
|
15824
|
+
{ type: CheckoutService },
|
|
15825
|
+
{ type: AnalyticsService }
|
|
15798
15826
|
]; };
|
|
15799
15827
|
__decorate$1M([
|
|
15800
15828
|
core.Input()
|
|
@@ -15817,7 +15845,7 @@
|
|
|
15817
15845
|
StepEcComponent = __decorate$1M([
|
|
15818
15846
|
core.Component({
|
|
15819
15847
|
selector: 'app-step-ec',
|
|
15820
|
-
template: "<ng-container [ngSwitch]=\"step_id\">\n\n <ng-container *ngSwitchCase=\"1\">\n <app-dataform-ec [step_id]=\"id_step\" [isLastOne]=\"lastStep\" [nextStep]=\"nextStep\">\n </app-dataform-ec>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"2\">\n <ng-container *ngIf=\"isStepReady('address')\">\n <app-shipment-ec [step_id]=\"id_step\">\n </app-shipment-ec>\n <div class=\"checkout-btn-container mt-2\">\n <button class=\"btn valid-btn\" (click)=\"goBack()\">{{'back'|translate}}</button>\n <ng-container *ngIf=\"(checkoutService.order$ | async) as order\">\n <button
|
|
15848
|
+
template: "<ng-container [ngSwitch]=\"step_id\">\n\n <ng-container *ngSwitchCase=\"1\">\n <app-dataform-ec [step_id]=\"id_step\" [isLastOne]=\"lastStep\" [nextStep]=\"nextStep\">\n </app-dataform-ec>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"2\">\n <ng-container *ngIf=\"isStepReady('address')\">\n <app-shipment-ec [step_id]=\"id_step\">\n </app-shipment-ec>\n <div class=\"checkout-btn-container mt-2\">\n <button class=\"btn valid-btn\" (click)=\"goBack()\">{{'back'|translate}}</button>\n <ng-container *ngIf=\"(checkoutService.order$ | async) as order\">\n <button *ngIf=\"isStepReady('shipment')\" (click)=\"nextStep()\"\n class=\"btn valid-btn float-end\" (click)=\"metodoEnvio(order)\">{{ (lastStep ? 'finish-checkout' : 'ready-form') |translate}}\n </button>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngSwitchCase=\"3\">\n <ng-container *ngIf=\"isStepReady(previousStep)\">\n <app-payment-ec [step_id]=\"id_step\">\n </app-payment-ec>\n <div class=\"checkout-btn-container mt-2\">\n <button class=\"btn valid-btn\"\n (click)=\"goBack()\">{{'back'|translate}}</button>\n </div>\n </ng-container>\n </ng-container>\n\n</ng-container>\n",
|
|
15821
15849
|
styles: [".btn:disabled{opacity:.65}.btn.valid-btn{background-color:#000;color:#fff;margin-right:12px}"]
|
|
15822
15850
|
})
|
|
15823
15851
|
], StepEcComponent);
|