ng-easycommerce 0.0.426 → 0.0.427
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/README.md +5 -0
- package/bundles/ng-easycommerce.umd.js +34 -8
- 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 +4 -4
- package/esm2015/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +4 -4
- package/esm2015/lib/services/products/product-detail.service.js +17 -1
- package/esm2015/lib/utils/toast.service.js +12 -2
- 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 +4 -4
- package/esm5/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.js +4 -4
- package/esm5/lib/services/products/product-detail.service.js +17 -1
- package/esm5/lib/utils/toast.service.js +12 -2
- package/fesm2015/ng-easycommerce.js +34 -8
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +34 -8
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-component/account-ec/order-ec/order-ec.component.d.ts +1 -1
- package/lib/ec-component/account-ec/orders-list-ec/orders-list-ec.component.d.ts +1 -1
- package/lib/services/products/product-detail.service.d.ts +7 -0
- package/lib/utils/toast.service.d.ts +6 -0
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# version 0.0.427
|
|
2
|
+
- Modifique la estructura de account, order list y order.
|
|
3
|
+
- Se crea funcion en ToastService para poder cambiar el tiempo que se muestra un mensaje.
|
|
4
|
+
- Se actualiza el ProductDetailService para cargar en las variantes las propiedades que tiene cada una.
|
|
5
|
+
|
|
1
6
|
# version 0.0.426
|
|
2
7
|
- Se agrego logica para que el tipo de moneda se tome en base al usuario logueado.
|
|
3
8
|
|
|
@@ -2763,12 +2763,22 @@
|
|
|
2763
2763
|
var _this = this;
|
|
2764
2764
|
this.translation = translation;
|
|
2765
2765
|
this.toastrService = toastrService;
|
|
2766
|
+
/**
|
|
2767
|
+
* @description Cambia el tiempo que se muestra el mensaje.
|
|
2768
|
+
* @param time
|
|
2769
|
+
*/
|
|
2770
|
+
this.setTimeMessage = function (time) {
|
|
2771
|
+
_this.configToast = {
|
|
2772
|
+
timeOut: time
|
|
2773
|
+
};
|
|
2774
|
+
};
|
|
2766
2775
|
this.show = function (message, interpolateParams, title, configToastr) {
|
|
2767
2776
|
if (interpolateParams === void 0) { interpolateParams = {}; }
|
|
2768
2777
|
if (title === void 0) { title = ''; }
|
|
2769
|
-
if (configToastr === void 0) { configToastr =
|
|
2778
|
+
if (configToastr === void 0) { configToastr = _this.configToast; }
|
|
2770
2779
|
_this.translation.get(message, interpolateParams).pipe(operators.take(1)).subscribe(function (res) { return _this.toastrService.show((res ? res : message), title, configToastr); });
|
|
2771
2780
|
};
|
|
2781
|
+
this.configToast = {};
|
|
2772
2782
|
}
|
|
2773
2783
|
ToastService.ctorParameters = function () { return [
|
|
2774
2784
|
{ type: core$1.TranslateService },
|
|
@@ -5478,7 +5488,7 @@
|
|
|
5478
5488
|
AccountEcComponent = __decorate$E([
|
|
5479
5489
|
core.Component({
|
|
5480
5490
|
selector: 'app-account-ec',
|
|
5481
|
-
template: "<section class=\"perfil\">\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
|
|
5491
|
+
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 PEDIDOS</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>",
|
|
5482
5492
|
styles: [".font-size-10{font-size:10px!important}"]
|
|
5483
5493
|
})
|
|
5484
5494
|
], AccountEcComponent);
|
|
@@ -8287,6 +8297,7 @@
|
|
|
8287
8297
|
asociated.price = _this.variants[0].price.toString();
|
|
8288
8298
|
asociated.saleprice = _this.variants[0].saleprice && _this.variants[0].saleprice.toString() || undefined;
|
|
8289
8299
|
asociated.discount = ((_a = _this.variants[0]) === null || _a === void 0 ? void 0 : _a.discount) || undefined;
|
|
8300
|
+
asociated.properties = _this.variants[0].properties ? _this.beautifyProperties(_this.variants[0].properties) : undefined;
|
|
8290
8301
|
// asociated.price = this.variants[0].saleprice && this.variants[0].saleprice.toString() || undefined;
|
|
8291
8302
|
// asociated.saleprice = this.variants[0].price.toString()
|
|
8292
8303
|
}
|
|
@@ -8313,6 +8324,21 @@
|
|
|
8313
8324
|
};
|
|
8314
8325
|
_this.asociatedDataSubject.next(asociated);
|
|
8315
8326
|
};
|
|
8327
|
+
/**
|
|
8328
|
+
* @description Recibe las propiedades de una variante y por cada item arma un objeto con
|
|
8329
|
+
* el name=clave y value=valor de ese item.
|
|
8330
|
+
* @param properties
|
|
8331
|
+
* @returns Un arreglo con las propiedades de la forma { name = ... , value = ...}
|
|
8332
|
+
*/
|
|
8333
|
+
this.beautifyProperties = function (properties) {
|
|
8334
|
+
var beautifyData = [];
|
|
8335
|
+
properties.forEach(function (prop) {
|
|
8336
|
+
for (var key in prop) {
|
|
8337
|
+
beautifyData.push({ name: key, value: prop[key] });
|
|
8338
|
+
}
|
|
8339
|
+
});
|
|
8340
|
+
return beautifyData;
|
|
8341
|
+
};
|
|
8316
8342
|
this.crateDiscount = function () {
|
|
8317
8343
|
try {
|
|
8318
8344
|
var all_discount_1 = '';
|
|
@@ -10294,7 +10320,7 @@
|
|
|
10294
10320
|
_this.ordersService.setSelectedOrder(order);
|
|
10295
10321
|
_this.router.navigateByUrl(("account/orders/" + order.number));
|
|
10296
10322
|
};
|
|
10297
|
-
_this.toDate = function (date) { return moment(date).format('DD/MM/YYYY, h:mm:ss a'); };
|
|
10323
|
+
_this.toDate = function (date, format) { return moment(date).format(!format && 'DD/MM/YYYY, h:mm:ss a' || format); };
|
|
10298
10324
|
_this.optionsBox = {
|
|
10299
10325
|
loop: true,
|
|
10300
10326
|
autoplay: true,
|
|
@@ -10340,8 +10366,8 @@
|
|
|
10340
10366
|
OrdersEcComponent = __decorate$1g([
|
|
10341
10367
|
core.Component({
|
|
10342
10368
|
selector: 'app-orders-ec',
|
|
10343
|
-
template: "<div class=\"container\" id=\"ordersEcComponent\">\n
|
|
10344
|
-
styles: [""]
|
|
10369
|
+
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 item border-bottom\" *ngFor=\"let order of orders\">\n <div class=\"col-lg-2 col-12\">\n <p class=\"st\">{{ 'order' | translate }}:</p>\n <h5 class=\"fw-bold\">\n {{ order.number }}\n </h5>\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 </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\n <p class=\"price\">\n {{ order.payments[0].state | translate | titlecase }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\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=\"st\">{{ 'shipment-state' | translate }}:</p>\n <p class=\"price\">\n {{ order.shipments[0].state | translate | titlecase }}\n </p>\n </div>\n <div class=\"col-lg-2 col-12\">\n <p class=\"st\">{{ 'date' | translate }}:</p>\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 <p class=\"st\">{{ 'total' | translate }}:</p>\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>",
|
|
10370
|
+
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}"]
|
|
10345
10371
|
})
|
|
10346
10372
|
], OrdersEcComponent);
|
|
10347
10373
|
return OrdersEcComponent;
|
|
@@ -10415,7 +10441,7 @@
|
|
|
10415
10441
|
_this.order = null;
|
|
10416
10442
|
_this.loading = true;
|
|
10417
10443
|
_this.numberOrder = null;
|
|
10418
|
-
_this.toDate = function (date) { return moment(date).format('DD/MM/YYYY, h:mm:ss a'); };
|
|
10444
|
+
_this.toDate = function (date, format) { return moment(date).format(!format && 'DD/MM/YYYY, h:mm:ss a' || format); };
|
|
10419
10445
|
_this.callError = function () {
|
|
10420
10446
|
_this.error = '?';
|
|
10421
10447
|
_this.router.navigateByUrl('account/orders');
|
|
@@ -10470,8 +10496,8 @@
|
|
|
10470
10496
|
OrderEcComponent = __decorate$1h([
|
|
10471
10497
|
core.Component({
|
|
10472
10498
|
selector: 'app-order-ec',
|
|
10473
|
-
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 col-12 font-brandon\">\n <h4 class=\"tit1 \">{{ ('order' | translate) + ': ' + order.number }}</h4>\n </div>\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>\n <div class=\"row\">\n <div class=\"col-md-12 col-12 font-brandon\">\n <div class=\"row item\">\n <div class=\"col-md-12 col-12 font-brandon\">\n <div class=\"row\">\n <div class=\"col-md-2 col-12\">\n <span class=\"st\">{{ 'payment-state' | translate }}:</span>\n <p class=\"\">\n {{ order.payments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <span class=\"st\">{{ 'shipment-state' | translate }}:</span>\n <p class=\"\">\n {{ order.shipments[0].state | translate }}\n </p>\n </div>\n <div class=\"col-md-2 col-12 font-brandon\">\n <span class=\"st\">{{ 'payment-method' | translate }}:</span>\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 <span class=\"st\">{{ 'shipment-method' | translate }}:</span>\n <p class=\"\">\n {{ order.shipments[0].method.name }}\n </p>\n </div>\n <div class=\"col-md-1 col-12 font-brandon\">\n <span class=\"st\">{{ 'date' | translate }}:</span>\n <p class=\"\">\n {{ toDate(order.checkoutCompletedAt) | translate }}\n </p>\n </div>\n <div class=\"col-md-1 col-12 font-brandon\">\n <span class=\"st\">{{ 'total' | translate }}:</span>\n <p class=\"\">\n {{ (order.totals.total) | ecCurrencySymbol}}\n \n </p>\n </div>\n <ng-container *ngIf=\"order?.invoice\">\n <div class=\"col-md-2 col-12 font-brandon\">\n <span class=\"st\">{{ 'invoices' | translate | titlecase }}:</span>\n <p class=\"\">\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\"></i>\n {{ 'download' | translate }}\n </a>\n </p>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </section>\n \n <div class=\"container py-md-5 py-3\">\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\">\n {{ 'product' | translate | uppercase }}\n </div>\n <div class=\"col-4 text-center 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-center font-sm font-brandon d-none d-md-block\">\n {{ 'total' | translate | uppercase }}\n </div>\n <div class=\"col-12 border-bottom-solid d-none d-md-block\"></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-1 p-2\">\n <ng-container *ngIf=\"order.items[0].product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \" [src]=\"consts.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 img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + order.items[0].product.picturesdefault[0]\" alt=\"\">\n </ng-template>\n </div>\n <div\n class=\"col-md-4 col-7 px-md-5 text-left flex-column flex-md-row justify-content-start d-flex align-items-center\">\n <p class=\"font-brandon d-flex w-100\">\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-3 d-none d-md-flex text-center px-5 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 text-center 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) * item.quantity) | ecCurrencySymbol}}</p>\n </div>\n </div>\n </ng-container>\n </div>\n \n <div class=\"container\">\n <div class=\"row border-top-solid\">\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\">\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>",
|
|
10474
|
-
styles: [""]
|
|
10499
|
+
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\">\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 </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=\"order.items[0].product.variants[0]?.images?.length ; else defaultpicture\">\n <img class=\"smc maxwidth img-fluid rounded-custom \" [src]=\"consts.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 img-fluid rounded-custom\"\n [src]=\"consts.mediaUrl() + order.items[0].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>",
|
|
10500
|
+
styles: [".maxwidth{max-width:100px}"]
|
|
10475
10501
|
})
|
|
10476
10502
|
], OrderEcComponent);
|
|
10477
10503
|
return OrderEcComponent;
|