ng-easycommerce 0.0.647 → 0.0.649
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 +6 -0
- package/bundles/ng-easycommerce.umd.js +61 -32
- 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/order-ec/order-ec.component.js +2 -2
- package/esm2015/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +2 -2
- package/esm2015/lib/ec-component/checkout-ec/shipment-ec/shipment-ec.component.js +2 -2
- package/esm2015/lib/ec-pipe/ec-currency-symbol.pipe.js +42 -30
- package/esm5/lib/ec-component/account-ec/order-ec/order-ec.component.js +2 -2
- package/esm5/lib/ec-component/checkout-ec/detail-checkout-block-ec/detail-checkout-block-ec.component.js +2 -2
- package/esm5/lib/ec-component/checkout-ec/shipment-ec/shipment-ec.component.js +2 -2
- package/esm5/lib/ec-pipe/ec-currency-symbol.pipe.js +59 -30
- package/fesm2015/ng-easycommerce.js +44 -32
- package/fesm2015/ng-easycommerce.js.map +1 -1
- package/fesm5/ng-easycommerce.js +61 -32
- package/fesm5/ng-easycommerce.js.map +1 -1
- package/lib/ec-pipe/ec-currency-symbol.pipe.d.ts +6 -5
- package/ng-easycommerce.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -7562,7 +7562,7 @@ __decorate$T([
|
|
|
7562
7562
|
ShipmentEcComponent = __decorate$T([
|
|
7563
7563
|
Component({
|
|
7564
7564
|
selector: 'app-shipment-ec',
|
|
7565
|
-
template: "<!-- <div class=\"checkout-title\">\r\n <h3>{{'shipment-methods'|translate}}</h3>\r\n</div> -->\r\n\r\n<div class=\"container-fluid\">\r\n <div class=\"col-12\">\r\n <div class=\"card text-center\">\r\n <div class=\"card-header text-dark\">\r\n <h4>{{ 'select-method' | translate }}</h4>\r\n <div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\"\r\n *ngIf=\"(shipmentService.methods | async) as methods; else noMethods\">\r\n <div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\r\n <div class=\"d-flex align-content-start justify-content-center flex-wrap\">\r\n <button [disabled]=\"this.shipmentService.buttonsDisabled || this.buttonsDisabled\" type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\"\r\n *ngFor=\"let method of deleteUPS(methods); let x = index\"\r\n (click)=\"setMethod(method, post_code); setActive($event)\">\r\n {{ method.name | translate }}\r\n </button>\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"row justify-content-center mb-2\" *ngIf=\"moreInfoInMethod && methodSelect && methodSelect.description\">\r\n <div class=\"col-12 col-md-6 col-lg-4 d-flex flex-column mb-2\" [id]=\"methodSelect.code\">\r\n <ng-container *ngFor=\"let line of methodSelect.description.split('\\r\\n'); let i=index\">\r\n <span [id]=\"methodSelect.code+'-'+i\" [class]=\"'line-'+i\">
|
|
7565
|
+
template: "<!-- <div class=\"checkout-title\">\r\n <h3>{{'shipment-methods'|translate}}</h3>\r\n</div> -->\r\n\r\n<div class=\"container-fluid\">\r\n <div class=\"col-12\">\r\n <div class=\"card text-center\">\r\n <div class=\"card-header text-dark\">\r\n <h4>{{ 'select-method' | translate }}</h4>\r\n <div class=\"btn-toolbar justify-content-center\" role=\"toolbar\" aria-label=\"Envios toolbar\"\r\n *ngIf=\"(shipmentService.methods | async) as methods; else noMethods\">\r\n <div class=\"\" role=\"group\" aria-label=\"Grupo botones envio\">\r\n <div class=\"d-flex align-content-start justify-content-center flex-wrap\">\r\n <button [disabled]=\"this.shipmentService.buttonsDisabled || this.buttonsDisabled\" type=\"button\" class=\"btn btn-outline-secondary mx-1 mb-1\"\r\n *ngFor=\"let method of deleteUPS(methods); let x = index\"\r\n (click)=\"setMethod(method, post_code); setActive($event)\">\r\n {{ method.name | translate }}\r\n </button>\r\n </div>\r\n\r\n\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"card-body\">\r\n <div class=\"row justify-content-center mb-2\" *ngIf=\"moreInfoInMethod && methodSelect && methodSelect.description\">\r\n <div class=\"col-12 col-md-6 col-lg-4 d-flex flex-column mb-2\" [id]=\"methodSelect.code\">\r\n <ng-container *ngFor=\"let line of methodSelect.description.split('\\r\\n'); let i=index\">\r\n <span [id]=\"methodSelect.code+'-'+i\" [class]=\"'line-'+i\" [innerHTML]=\"line\"> </span>\r\n </ng-container>\r\n </div>\r\n <!--<span> <b>{{ 'information' | translate }}:</b> {{methodSelect.description}} </span>-->\r\n </div>\r\n <div class=\"row justify-content-center\" *ngIf=\"this.costs\">\r\n <ng-container *ngIf=\"!loading_internal ; else loading\">\r\n <div class=\"col-auto text-dark\" *ngFor=\"let cost of costs; let y = index\">\r\n <ng-container *ngIf=\"cost.contracts.length > 0\">\r\n <ng-container *ngIf=\"costs.length > 1; else uniqueShipment\">\r\n <span><b>{{ cost.name | translate }}</b></span>\r\n <hr />\r\n </ng-container>\r\n <ng-template #uniqueShipment>\r\n <span><b>{{ methodSelect.name | translate }}</b></span>\r\n <hr />\r\n </ng-template>\r\n <div class=\"option\" *ngFor=\"let contract of cost.contracts; let i = index\">\r\n <div class=\"form-check current-contract\">\r\n <input class=\"form-check-input\" [checked]=\"(y === 0 && i === 0) ? true : contract.selected\" type=\"radio\" name=\"card\" [id]=\"cost.name + i\"\r\n value=\"dark\" (click)=\"verifyValidate(cost.name, contract)\">\r\n <label class=\"form-check-label\" [for]=\"cost.name + i\" aria-label=\"Dark grey\">\r\n <span\r\n [class]=\"(cost.name == 'home_delivery') ? 'shipment-contractname home_delivery' : 'shipment-contractname' \"\r\n *ngIf=\"validName(contract.name)\">{{ contract.name | translate }}</span>\r\n <span *ngIf=\"contract.computed\"><br class=\"shipment-contractname\">{{ contract.computed | translate }}<br\r\n class=\"shipment-contractname\"></span>\r\n <div *ngIf=\"contract.detail\" class=\"contract-detail\">\r\n <div *ngFor=\"let line of contract.detail.split(' - '); let i = index\" [class]=\"'contrat-item-'+i\">\r\n <span *ngIf=\"i == 0\"><b>{{ line }}</b></span>\r\n <span class=\"inside-detail\" *ngIf=\"i > 0\">{{ line }}</span>\r\n </div>\r\n </div>\r\n <span *ngIf=\"contract.price > 0\" [class]=\"'inside-detail ' + ( costos?.amount == 0 ? ' free ' : '') \">\r\n <br class=\"shipment-contractname\" *ngIf=\"!contract.computed\">\r\n {{ ('price'|translate) + ': ' + (contract.price | ecCurrencySymbol) }}</span>\r\n <!-- <span *ngIf=\"contract.price == 0\" [class]=\"'inside-detail ' + ( costos?.amount == 0 ? ' free ' : '') \">\r\n <br class=\"shipment-contractname\" *ngIf=\"!contract.computed\"> {{ ('free'|translate) }}</span> -->\r\n <br>\r\n </label>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n</div>\r\n\r\n<ng-template #noMethods>\r\n <div class=\"d-flex flex-row w-100 justify-content-center mt-2\">\r\n <h5 class=\"text-secondary\">{{'no-shipment-methods'|translate}}</h5>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #loading>\r\n <app-loading-full-ec></app-loading-full-ec>\r\n</ng-template>\r\n",
|
|
7566
7566
|
providers: [ShipmentService],
|
|
7567
7567
|
styles: [".shipment-container{width:100%;max-height:500px!important}.points-container{margin-top:10px;max-height:300px;overflow:scroll}agm-map{height:300px}.ancho-100{width:200px}.ancho-50{width:100px}.group-shipping{margin:10px 0}.option-container>div{margin-bottom:15px}@media only screen and (min-width:600px){.option-container{display:flex;justify-content:space-between;margin-top:20px}}hr{margin-top:0!important}.option{align-items:flex-start;margin-bottom:20px}.option label{margin:0 0 0 10px}.inside-detail{color:gray!important;font-weight:400}.inside-detail.free{text-decoration:line-through}.active{color:#fff!important}"]
|
|
7568
7568
|
})
|
|
@@ -11347,7 +11347,7 @@ __decorate$1l([
|
|
|
11347
11347
|
OrderEcComponent = __decorate$1l([
|
|
11348
11348
|
Component({
|
|
11349
11349
|
selector: 'app-order-ec',
|
|
11350
|
-
template: "<main class=\"py-5\" id=\"orderEcComponent\">\r\n <div class=\"container\">\r\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\r\n <div *ngIf=\"order; else noOrder\">\r\n\r\n <div class=\"row justify-content-between \">\r\n <div class=\"col-sm-auto col-12 font-brandon\">\r\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\r\n </div>\r\n <ng-container *ngIf=\"order?.invoice\">\r\n <div class=\"col-sm col-12 font-brandon\">\r\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\r\n class=\"btn btn-link btn-invoice\">\r\n <i class=\"fas fa-file-download me-1\"></i>\r\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\r\n </a>\r\n </div>\r\n </ng-container>\r\n <a (click)=\"volver()\" class=\"col-auto text-end\">\r\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\r\n </a>\r\n </div>\r\n\r\n <section id=\"orders\">\r\n <div class=\"row pt-2\">\r\n <div class=\"col-md-2 col-12\">\r\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0]?.method?.name | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].method.name }}\r\n </p>\r\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\r\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\r\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\r\n seguimiento</a>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'date' | translate }}:</p>\r\n <p class=\"\">\r\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\r\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"st\">{{ 'total' | translate }}:</p>\r\n <h5 class=\"fw-bold\">\r\n {{ (order.totals.total) | ecCurrencySymbol}}\r\n\r\n </h5>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\r\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\r\n {{ 'repeat-order' | translate }}\r\n </button>\r\n </div>\r\n\r\n <div class=\"container py-3 border-top border-bottom\">\r\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\r\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\r\n {{ 'product' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\r\n {{ 'description' | translate | uppercase }}\r\n </div>\r\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\r\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\r\n <!-- {{ 'description' | translate | uppercase }} -->\r\n {{ 'lots' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'unit-price' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\r\n {{ 'quantity' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'total' | translate | uppercase }}\r\n </div>\r\n </div>\r\n <ng-container *ngFor=\"let item of order.items; let i = index\">\r\n <div class=\"row cart-items\">\r\n <div class=\"col-5 col-md-2 py-2\">\r\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\r\n <img class=\"smc maxwidth img-fluid rounded-custom \"\r\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\r\n </ng-container>\r\n <ng-template #defaultpicture>\r\n <img *ngIf=\"item.product.picturesdefault\"\r\n class=\"smc maxwidth img-fluid rounded-custom\"\r\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\r\n </ng-template>\r\n </div> \r\n <div\r\n class=\"col-md-4 col-7 d-flex flex-column justify-content-center\">\r\n <p class=\"font-brandon d-flex w-100 mb-0\">\r\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\r\n </p>\r\n <p *ngIf=\"item.comments\" class=\"comment-truncated fst-italic small text-muted mt-1\">\r\n \"{{ item.comments }}\"\r\n </p>\r\n </div>\r\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\r\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\r\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\r\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\r\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\r\n value=\"{{ 'see' | translate | uppercase }}\">\r\n </div>\r\n <div class=\"container d-md-none\">\r\n <div class=\"row\">\r\n <div class=\"col-4\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) |\r\n ecCurrencySymbol}}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) *\r\n item.quantity) | ecCurrencySymbol}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\">\r\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) | ecCurrencySymbol}}\r\n </p>\r\n </div>\r\n <div class=\"col-1 d-none d-md-flex align-items-center\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-end w-100 m-0\">\r\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol}}</p>\r\n </div>\r\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\r\n <div class=\"card card-body\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th scope=\"col\">#</th>\r\n <th scope=\"col\">Estado</th>\r\n <th scope=\"col\">Cantidad</th>\r\n <th scope=\"col\">Fecha Solicitada</th>\r\n <th scope=\"col\">Fecha Estimada</th>\r\n <th scope=\"col\">Sede</th>\r\n <th scope=\"col\">Nota</th>\r\n <th scope=\"col\">Total Lote</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\r\n <tr>\r\n <th scope=\"row\">{{lot.id}}</th>\r\n <td>{{lot.lot_status}}</td>\r\n <td>{{lot.quantity}}</td>\r\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\r\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\r\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\r\n <ng-template #sinFechaEstimada>\r\n <td>Pendiente</td>\r\n </ng-template>\r\n <td>{{lot.shipping_address_name}}</td>\r\n <td>{{lot.notes}}</td>\r\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-6\"></div>\r\n <div class=\"col-12 col-md-6\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <div class=\"row py-4\">\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.subtotal) | ecCurrencySymbol }}\r\n </div>\r\n\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.shipping || '0') | ecCurrencySymbol }}\r\n\r\n </div>\r\n\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\r\n translate }}</div>\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\r\n {{ (order.totals.promotion) | ecCurrencySymbol }}</div>\r\n\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\r\n {{ 'taxes' | translate }}</div>\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.taxes) | ecCurrencySymbol }}</div>\r\n\r\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\r\n <div class=\"col-6 font-brandon font-md text-end\">\r\n {{ (order.totals.total) | ecCurrencySymbol }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</main>\r\n\r\n<ng-template #noOrder>\r\n <div class=\"w-100 h-50\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <h5>{{ 'no-orders' | translate }}</h5>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #loadingView>\r\n <div class=\"w-100 h-50 py-5\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
11350
|
+
template: "<main class=\"py-5\" id=\"orderEcComponent\">\r\n <div class=\"container\">\r\n <div class=\"wrap\" *ngIf=\"!loading; else loadingView\">\r\n <div *ngIf=\"order; else noOrder\">\r\n\r\n <div class=\"row justify-content-between \">\r\n <div class=\"col-sm-auto col-12 font-brandon\">\r\n <h4 class=\"tit1 fw-bold\">{{ ('order' | translate) + ': ' + order.number }}</h4>\r\n </div>\r\n <ng-container *ngIf=\"order?.invoice\">\r\n <div class=\"col-sm col-12 font-brandon\">\r\n <a target=\"_blank\" [href]=\"consts.getUrlBase().slice(0, -1) + order.invoice\"\r\n class=\"btn btn-link btn-invoice\">\r\n <i class=\"fas fa-file-download me-1\"></i>\r\n {{ 'download' | translate }} {{ 'invoices' | translate | titlecase }}\r\n </a>\r\n </div>\r\n </ng-container>\r\n <a (click)=\"volver()\" class=\"col-auto text-end\">\r\n <button class=\"btn btvolver bg-gray text-white\">{{ 'back-to-orders' | translate }}</button>\r\n </a>\r\n </div>\r\n\r\n <section id=\"orders\">\r\n <div class=\"row pt-2\">\r\n <div class=\"col-md-2 col-12\">\r\n <p class=\"st\">{{ 'payment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-state' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].state | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'payment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.payments[0]?.method?.name | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'shipment-method' | translate }}:</p>\r\n <p class=\"\">\r\n {{ order.shipments[0].method.name }}\r\n </p>\r\n <!-- ACA DEBERIA IR EL LINK DE SEGUIMIENTO -->\r\n <a *ngIf=\"order.tracking\" [href]=\"order.tracking\"\r\n class=\"btn btn-outline-dark btnLogout px-3 py-1 font-size-10 w-auto btn-sm\">Ver\r\n seguimiento</a>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\">\r\n <p class=\"st\">{{ 'date' | translate }}:</p>\r\n <p class=\"\">\r\n {{ toDate(order.checkoutCompletedAt, 'DD/MM/YYYY') | translate }}<br>\r\n {{ toDate(order.checkoutCompletedAt, 'h:mm:ss a') | translate }}\r\n </p>\r\n </div>\r\n <div class=\"col-md-2 col-12 font-brandon\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"st\">{{ 'total' | translate }}:</p>\r\n <h5 class=\"fw-bold\">\r\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals'}}\r\n\r\n </h5>\r\n </div>\r\n </div>\r\n </section>\r\n\r\n <div class=\"text-end mt-3\" *ngIf=\"!hidePrices && allowRepeatOrders\">\r\n <button class=\"btn btn-primary mb-2\" (click)=\"repeatOrder()\">\r\n {{ 'repeat-order' | translate }}\r\n </button>\r\n </div>\r\n\r\n <div class=\"container py-3 border-top border-bottom\">\r\n <div *ngIf=\"order.items.length; else noProducts\" class=\"row\">\r\n <div class=\"col-2 font-sm font-brandon d-none d-md-block\">\r\n {{ 'product' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-4 font-sm font-brandon d-none d-md-block\">\r\n {{ 'description' | translate | uppercase }}\r\n </div>\r\n <div id=\"colLots\" *ngIf=\"ordersService.channelConfig.applyOrderLot\"\r\n class=\"col-1 font-sm font-brandon d-none d-md-block\">\r\n <!-- {{ 'description' | translate | uppercase }} -->\r\n {{ 'lots' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-center font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'unit-price' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-1 text-center font-sm font-brandon d-none d-md-block\">\r\n {{ 'quantity' | translate | uppercase }}\r\n </div>\r\n <div class=\"col-2 text-end font-sm font-brandon d-none d-md-block\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n {{ 'total' | translate | uppercase }}\r\n </div>\r\n </div>\r\n <ng-container *ngFor=\"let item of order.items; let i = index\">\r\n <div class=\"row cart-items\">\r\n <div class=\"col-5 col-md-2 py-2\">\r\n <ng-container *ngIf=\"item.product.variants[0]?.images?.length ; else defaultpicture\">\r\n <img class=\"smc maxwidth img-fluid rounded-custom \"\r\n [src]=\"consts.mediaUrl() + item.product.variants[0].images[0]\" alt=\"\">\r\n </ng-container>\r\n <ng-template #defaultpicture>\r\n <img *ngIf=\"item.product.picturesdefault\"\r\n class=\"smc maxwidth img-fluid rounded-custom\"\r\n [src]=\"consts.mediaUrl() + item.product.picturesdefault[0]\" alt=\"\">\r\n </ng-template>\r\n </div> \r\n <div\r\n class=\"col-md-4 col-7 d-flex flex-column justify-content-center\">\r\n <p class=\"font-brandon d-flex w-100 mb-0\">\r\n {{ item.product.name }} (Cod:{{ item.product.variants[0].code }})\r\n </p>\r\n <p *ngIf=\"item.comments\" class=\"comment-truncated fst-italic small text-muted mt-1\">\r\n \"{{ item.comments }}\"\r\n </p>\r\n </div>\r\n <div class=\"col-md-1 col-1 flex-column flex-md-row justify-content-start d-flex align-items-center\"\r\n *ngIf=\"ordersService.channelConfig.applyOrderLot\">\r\n <input type=\"button\" class=\"btn btn-primary btnSeguir m-0 text-center\" type=\"button\"\r\n [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\"\r\n aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\"\r\n value=\"{{ 'see' | translate | uppercase }}\">\r\n </div>\r\n <div class=\"container d-md-none\">\r\n <div class=\"row\">\r\n <div class=\"col-4\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ (item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) |\r\n ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n <div class=\"col-4 font-xl\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\"> {{ ((item.product.variants[0].saleprice ?\r\n item.product.variants[0].saleprice : item.product.variants[0].price) *\r\n item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-center w-100 m-0\">\r\n {{ (item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) | ecCurrencySymbol:'alwaysShowDecimals'}}\r\n </p>\r\n </div>\r\n <div class=\"col-1 d-none d-md-flex align-items-center\">\r\n <p class=\"text-center w-100 m-0\"> {{ item.quantity }}</p>\r\n </div>\r\n <div class=\"col-2 d-none d-md-flex align-items-center\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <p class=\"text-end w-100 m-0\">\r\n {{ ((item.product.variants[0].saleprice ? item.product.variants[0].saleprice :\r\n item.product.variants[0].price) * item.quantity) | ecCurrencySymbol:'alwaysShowDecimals'}}</p>\r\n </div>\r\n <div class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\r\n <div class=\"card card-body\">\r\n <table class=\"table table-striped\">\r\n <thead>\r\n <tr>\r\n <th scope=\"col\">#</th>\r\n <th scope=\"col\">Estado</th>\r\n <th scope=\"col\">Cantidad</th>\r\n <th scope=\"col\">Fecha Solicitada</th>\r\n <th scope=\"col\">Fecha Estimada</th>\r\n <th scope=\"col\">Sede</th>\r\n <th scope=\"col\">Nota</th>\r\n <th scope=\"col\">Total Lote</th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\r\n <tr>\r\n <th scope=\"row\">{{lot.id}}</th>\r\n <td>{{lot.lot_status}}</td>\r\n <td>{{lot.quantity}}</td>\r\n <td>{{ toDate(lot.date_request, 'DD/MM/YYYY') | translate }}</td>\r\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{\r\n toDate(lot.date_deliver, 'DD/MM/YYYY') | translate }}</td>\r\n <ng-template #sinFechaEstimada>\r\n <td>Pendiente</td>\r\n </ng-template>\r\n <td>{{lot.shipping_address_name}}</td>\r\n <td>{{lot.notes}}</td>\r\n <td>{{lot.total_lot | ecCurrencySymbol:'alwaysShowDecimals'}}</td>\r\n </tr>\r\n </ng-container>\r\n </tbody>\r\n </table>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n </ng-container>\r\n </div>\r\n\r\n <div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-12 col-md-6\"></div>\r\n <div class=\"col-12 col-md-6\"\r\n *ngIf=\"(creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <div class=\"row py-4\">\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'total-products' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.subtotal) | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n </div>\r\n\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'shipment' |\r\n translate }}</div>\r\n <div class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.shipping || '0') | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n\r\n </div>\r\n\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">{{ 'discount' |\r\n translate }}</div>\r\n <div *ngIf=\"!hideDiscounts && order.totals.promotion && order.totals.promotion != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end text-end\">\r\n {{ (order.totals.promotion) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\r\n\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0 \"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom \">\r\n {{ 'taxes' | translate }}</div>\r\n <div *ngIf=\"!hideTaxes && order.totals.taxes && order.totals.taxes != 0\"\r\n class=\"col-6 font-brandon font-md text-gray border-bottom text-end\">\r\n {{ (order.totals.taxes) | ecCurrencySymbol:'alwaysShowDecimals' }}</div>\r\n\r\n <div class=\"col-6 font-brandon font-md\">{{ 'total' | translate | uppercase }}</div>\r\n <div class=\"col-6 font-brandon font-md text-end\">\r\n {{ (order.totals.total) | ecCurrencySymbol:'alwaysShowDecimals' }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n</main>\r\n\r\n<ng-template #noOrder>\r\n <div class=\"w-100 h-50\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <h5>{{ 'no-orders' | translate }}</h5>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<ng-template #loadingView>\r\n <div class=\"w-100 h-50 py-5\">\r\n <div class=\"d-flex flex-row justify-content-center align-items-center text-center\">\r\n <app-loading-full-ec></app-loading-full-ec>\r\n </div>\r\n </div>\r\n</ng-template>",
|
|
11351
11351
|
styles: [".maxwidth{max-width:100px}.comment-truncated{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;white-space:normal;max-height:3em}"]
|
|
11352
11352
|
})
|
|
11353
11353
|
], OrderEcComponent);
|
|
@@ -12405,7 +12405,7 @@ __decorate$1u([
|
|
|
12405
12405
|
DetailCheckoutBlockEcComponent = __decorate$1u([
|
|
12406
12406
|
Component({
|
|
12407
12407
|
selector: 'app-detail-checkout-block-ec',
|
|
12408
|
-
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\r\n *ngIf=\"data && (creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <ng-container *ngFor=\"let item of data; let i = index\">\r\n <ng-container *ngIf=\"shouldShowItem(item.type) && !shouldHideSubtotal(item)\">\r\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\r\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item)\"></i>\r\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">\r\n {{ getTypeLabel(item.type) | translate }}\r\n </strong>\r\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\r\n ecCurrencySymbol) : ('free' | translate) }}</span>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <!-- Mostrar total de descuentos -->\r\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\r\n *ngIf=\"!hideDiscounts && this.discountTotal != 0 && i === 1\">\r\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('discount')\"></i>\r\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Descuento</strong>\r\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (this.discountTotal | ecCurrencySymbol)\r\n }}</span>\r\n </div>\r\n\r\n <!-- Mostrar total de cupones -->\r\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\r\n *ngIf=\"!hideDiscounts && this.couponTotal != 0 && i === 1\">\r\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('coupon')\"></i>\r\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Cupon</strong>\r\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.couponTotal| ecCurrencySymbol)\r\n }}</span>\r\n </div>\r\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\r\n *ngIf=\"!hideTaxes && this.clientTaxes != 0 && i === 1\">\r\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('clienTaxe')\"></i>\r\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">{{ 'clientTaxes' | translate }}</strong>\r\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.clientTaxes | ecCurrencySymbol)\r\n }}</span>\r\n </div>\r\n </ng-container>\r\n</div>",
|
|
12408
|
+
template: "<div id=\"appDetailCheckoutBlockEc\" class=\"d-flex flex-row w-100 justify-content-center flex-wrap\"\r\n *ngIf=\"data && (creditAccountShowPrices !== null ? creditAccountShowPrices : true)\">\r\n <ng-container *ngFor=\"let item of data; let i = index\">\r\n <ng-container *ngIf=\"shouldShowItem(item.type) && !shouldHideSubtotal(item)\">\r\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\">\r\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon(item)\"></i>\r\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">\r\n {{ getTypeLabel(item.type) | translate }}\r\n </strong>\r\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (item.amount != 0 ) ? (item.amount |\r\n ecCurrencySymbol:'alwaysShowDecimals') : ('free' | translate) }}</span>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <!-- Mostrar total de descuentos -->\r\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\r\n *ngIf=\"!hideDiscounts && this.discountTotal != 0 && i === 1\">\r\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('discount')\"></i>\r\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Descuento</strong>\r\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{ (this.discountTotal | ecCurrencySymbol:'alwaysShowDecimals')\r\n }}</span>\r\n </div>\r\n\r\n <!-- Mostrar total de cupones -->\r\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\r\n *ngIf=\"!hideDiscounts && this.couponTotal != 0 && i === 1\">\r\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('coupon')\"></i>\r\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">Cupon</strong>\r\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.couponTotal| ecCurrencySymbol:'alwaysShowDecimals')\r\n }}</span>\r\n </div>\r\n <div class=\"d-flex flex-column justify-content-center mx-sm-3 mx-2 text-center mb-4 resumen\"\r\n *ngIf=\"!hideTaxes && this.clientTaxes != 0 && i === 1\">\r\n <i ngClass=\"mb-2 colorIconoCheckout\" [class]=\"getIcon2('clienTaxe')\"></i>\r\n <strong class=\"text-center w-100 font-brandon font-md mb-1\">{{ 'clientTaxes' | translate }}</strong>\r\n <span class=\"text-center w-100 font-brandon font-md text-gray\">{{(this.clientTaxes | ecCurrencySymbol:'alwaysShowDecimals')\r\n }}</span>\r\n </div>\r\n </ng-container>\r\n</div>",
|
|
12409
12409
|
styles: [""]
|
|
12410
12410
|
})
|
|
12411
12411
|
], DetailCheckoutBlockEcComponent);
|
|
@@ -17042,44 +17042,56 @@ let ecCurrencySymbolPipe = class ecCurrencySymbolPipe {
|
|
|
17042
17042
|
this.consts = consts;
|
|
17043
17043
|
this.currencyService = currencyService;
|
|
17044
17044
|
this.injector = injector;
|
|
17045
|
-
this.changeSymbolTransform = (valor) => {
|
|
17046
|
-
try {
|
|
17047
|
-
return this.positionSymbol(this.checkingWithoutDecimals(this.clearSymbol(valor)));
|
|
17048
|
-
}
|
|
17049
|
-
catch (error) {
|
|
17050
|
-
console.error('Errores en custom pipe -> ', error);
|
|
17051
|
-
return valor;
|
|
17052
|
-
}
|
|
17053
|
-
};
|
|
17054
17045
|
this.clearSymbol = (value) => value.replace('$', '');
|
|
17055
|
-
this.positionSymbol = (value) => {
|
|
17056
|
-
this.checkingWithoutDecimals = (value) => {
|
|
17046
|
+
this.positionSymbol = (value) => {
|
|
17057
17047
|
var _a, _b, _c;
|
|
17058
|
-
|
|
17059
|
-
|
|
17060
|
-
|
|
17061
|
-
//?.trim() == "00" && value.trim().slice(0, value.trim().length - 3) || value
|
|
17062
|
-
}
|
|
17063
|
-
else {
|
|
17064
|
-
let val = (_c = value) === null || _c === void 0 ? void 0 : _c.split(',');
|
|
17065
|
-
(val[1] && val[1].length > 2) ? val[1] = val[1].slice(0, 2) : val[1] = "00";
|
|
17066
|
-
value = val[0] + ',' + val[1];
|
|
17067
|
-
return value;
|
|
17068
|
-
}
|
|
17048
|
+
return ((_a = this.consts) === null || _a === void 0 ? void 0 : _a.currency.position.toUpperCase()) === 'LEFT'
|
|
17049
|
+
? `${this.currency.symbol} ${(_b = value) === null || _b === void 0 ? void 0 : _b.trim()}`
|
|
17050
|
+
: `${(_c = value) === null || _c === void 0 ? void 0 : _c.trim()} ${this.currency.symbol}`;
|
|
17069
17051
|
};
|
|
17070
17052
|
this.currencyService.currency$.subscribe(res => {
|
|
17071
17053
|
this.currency = res;
|
|
17072
17054
|
});
|
|
17073
17055
|
}
|
|
17074
|
-
transform(value) {
|
|
17056
|
+
transform(value, mode = 'respectGlobalConfig') {
|
|
17075
17057
|
var _a;
|
|
17076
|
-
const formatter = new Intl.NumberFormat('de-DE', {
|
|
17077
|
-
|
|
17078
|
-
|
|
17079
|
-
|
|
17080
|
-
|
|
17058
|
+
const formatter = new Intl.NumberFormat('de-DE', {
|
|
17059
|
+
style: 'currency',
|
|
17060
|
+
currency: 'USD',
|
|
17061
|
+
});
|
|
17062
|
+
if (value == null)
|
|
17063
|
+
return '';
|
|
17064
|
+
value = this.currencyService.calculateConvetibility(value, this.currency.ratio).toString();
|
|
17065
|
+
const formatted = (_a = formatter.format(value)) === null || _a === void 0 ? void 0 : _a.toString();
|
|
17066
|
+
return this.changeSymbolTransform(formatted, mode);
|
|
17067
|
+
}
|
|
17068
|
+
changeSymbolTransform(valor, mode) {
|
|
17069
|
+
try {
|
|
17070
|
+
const cleared = this.clearSymbol(valor);
|
|
17071
|
+
const withDecimals = this.applyDecimalsPolicy(cleared, mode);
|
|
17072
|
+
return this.positionSymbol(withDecimals);
|
|
17073
|
+
}
|
|
17074
|
+
catch (e) {
|
|
17075
|
+
console.error('Errores en ecCurrencySymbolPipe -> ', e);
|
|
17076
|
+
return valor;
|
|
17077
|
+
}
|
|
17078
|
+
}
|
|
17079
|
+
applyDecimalsPolicy(value, mode) {
|
|
17080
|
+
var _a;
|
|
17081
|
+
const withoutDecimalGlobal = !!((_a = this.consts) === null || _a === void 0 ? void 0 : _a.currency.withoutDecimal);
|
|
17082
|
+
// prioridad: argumento del pipe > config global
|
|
17083
|
+
const forceShow = mode === 'alwaysShowDecimals';
|
|
17084
|
+
const forceHide = mode === 'alwaysHideDecimals';
|
|
17085
|
+
const showDecimals = forceShow ? true : forceHide ? false : !withoutDecimalGlobal;
|
|
17086
|
+
let [ent, dec = '00'] = (value || '').split(',');
|
|
17087
|
+
if (showDecimals) {
|
|
17088
|
+
if (dec.length > 2)
|
|
17089
|
+
dec = dec.slice(0, 2);
|
|
17090
|
+
return `${ent},${dec}`;
|
|
17091
|
+
}
|
|
17092
|
+
else {
|
|
17093
|
+
return ent;
|
|
17081
17094
|
}
|
|
17082
|
-
return valueTransform;
|
|
17083
17095
|
}
|
|
17084
17096
|
};
|
|
17085
17097
|
ecCurrencySymbolPipe.ctorParameters = () => [
|