ng-easycommerce 0.0.501 → 0.0.503

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.
@@ -154,12 +154,13 @@
154
154
  "login": "login",
155
155
  "logout": "Logout",
156
156
  "lookbook": "lookbook",
157
- "lot-saved": "Lot saved",
158
- "lot-title": "Manage Lots",
159
- "lot-subtitle": "Manage shipping dates and locations",
160
- "lot-new": "+ Add Lot",
161
- "lot-save": "Save Lots",
162
- "lot-max-quantity": "You have already reached the maximum amount",
157
+ "lots": "Lots",
158
+ "lot-saved": "Lot saved",
159
+ "lot-title": "Manage Lots",
160
+ "lot-subtitle": "Manage shipping dates and locations",
161
+ "lot-new": "+ Add Lot",
162
+ "lot-save": "Save Lots",
163
+ "lot-max-quantity": "You have already reached the maximum amount",
163
164
  "mail-sent": "¡Email sent!",
164
165
  "manage-addresses": "Manage Addresses",
165
166
  "maximum-items-quantity": "The maximum quantity allowed for this product is {{quantity}}",
@@ -154,6 +154,7 @@
154
154
  "login": "Iniciar sesión",
155
155
  "logout": "Cerrar sesión",
156
156
  "lookbook": "lookbook",
157
+ "lots": "Lotes",
157
158
  "lot-saved": "Se ha guardado el lote",
158
159
  "lot-title": "Administrar Lotes",
159
160
  "lot-subtitle": "Gestionar fechas y sedes de envío",
@@ -4519,7 +4519,7 @@
4519
4519
  // this.googleAnalytics.removeFromCart(product);
4520
4520
  _this.analyticsService.callEvent('remove_from_cart', __assign$9(__assign$9({}, product), { currency: _this.consts.currency.code }));
4521
4521
  };
4522
- this.addIfAllreadyExists = function (product, variant_id, quantityAdd, order_item_id, lot_quantity, unit_price, unit_total, ajustement_total, total_lot, lot_status, date_deliver, notes, shipping_address_id) {
4522
+ this.addIfAllreadyExists = function (product, variant_id, quantityAdd, order_item_id, lot_quantity, unit_price, unit_total, ajustement_total, total_lot, lot_status, date_request, notes, shipping_address_id) {
4523
4523
  if (quantityAdd === void 0) { quantityAdd = 1; }
4524
4524
  return _this.items.find(function (item, index) {
4525
4525
  if (item.product.id == product.id && item.variant_id == variant_id) {
@@ -4570,13 +4570,13 @@
4570
4570
  !added && _this.connection.post(_this.addItemApi(), { productCode: product.id, quantity: quantity, variantCode: variant_id })
4571
4571
  .subscribe(function (res) { return _this.appendToCart(res); }, function (err) { return _this.handleError(err); });
4572
4572
  };
4573
- this.addToLot = function (product, quantity, variant_id, id, order_item_id, lot_quantity, unit_price, unit_total, ajustement_total, total_lot, lot_status, date_deliver, notes, shipping_address_id, shipping_address_name, action) {
4573
+ this.addToLot = function (product, quantity, variant_id, id, order_item_id, lot_quantity, unit_price, unit_total, ajustement_total, total_lot, lot_status, date_request, notes, shipping_address_id, shipping_address_name, action) {
4574
4574
  if (!_this.authService.isAbleToBuy()) {
4575
4575
  _this.toastrService.show('must-select-customer');
4576
4576
  return;
4577
4577
  }
4578
4578
  var added = '';
4579
- !added && _this.connection.post(_this.addItemApi(), { productCode: product.id, quantity: quantity, variantCode: variant_id, id: id || '', order_item_id: order_item_id || '', lot_quantity: lot_quantity || '', unit_price: unit_price || '', unit_total: unit_total || '', ajustement_total: ajustement_total || '', total_lot: total_lot || '', lot_status: lot_status || '', date_deliver: date_deliver || '', notes: notes || '', shipping_address_id: shipping_address_id || '', shipping_address_name: shipping_address_name || '', action: action || 'newlot' })
4579
+ !added && _this.connection.post(_this.addItemApi(), { productCode: product.id, quantity: quantity, variantCode: variant_id, id: id || '', order_item_id: order_item_id || '', lot_quantity: lot_quantity || '', unit_price: unit_price || '', unit_total: unit_total || '', ajustement_total: ajustement_total || '', total_lot: total_lot || '', lot_status: lot_status || '', date_request: date_request || '', notes: notes || '', shipping_address_id: shipping_address_id || '', shipping_address_name: shipping_address_name || '', action: action || 'newlot' })
4580
4580
  .subscribe(function (res) { return _this.appendToCart(res); }, function (err) { return _this.handleError(err); });
4581
4581
  };
4582
4582
  this.addToCartPromise = function (product, quantity, variant_id) { return __awaiter$5(_this, void 0, void 0, function () {
@@ -7068,7 +7068,7 @@
7068
7068
  var cell4 = row.insertCell(3);
7069
7069
  var cell5 = row.insertCell(4);
7070
7070
  var cell6 = row.insertCell(5);
7071
- var date = new Date(Date.parse(lot['date_deliver']));
7071
+ var date = new Date(Date.parse(lot['date_request']));
7072
7072
  cell1.innerHTML = '<input id="id' + id + '" style="border: 0;" value="' + lot.id + '" disabled>';
7073
7073
  cell2.innerHTML = '<input type="number" id="quantity' + id + '" value= "' + lot.quantity + '"class="form-control w-50" max="' + lot.quantity + '">';
7074
7074
  cell3.innerHTML = '<input type="date" value="' + _this.formatDate(date) + '" id="deliveryDate' + id + '" class="form-control w-75">';
@@ -7094,8 +7094,8 @@
7094
7094
  }
7095
7095
  });
7096
7096
  document.getElementById('botonAgregar').onclick = function () {
7097
- var cantidadActual = 0;
7098
7097
  // // Se calcula la cantidad y el contador para que no exceda la cantidad de la linea al crear un nuevo lote.
7098
+ var cantidadActual = 0;
7099
7099
  for (var index = 1; index < id; index++) {
7100
7100
  if (document.getElementById("quantity" + index)) {
7101
7101
  cantidadActual = cantidadActual + parseInt(document.getElementById("quantity" + index).value);
@@ -7130,37 +7130,50 @@
7130
7130
  };
7131
7131
  // Cuando se pulsa el boton para guardar el lote recorre la funcion y el for , recorre linea a linea y lanza el endpoint con una pausa para que no se pierda ninguno y no se quede pillado.
7132
7132
  document.getElementById('botonGuardar').onclick = function () {
7133
+ var cantidadLotes = 0;
7134
+ //Controla que las cantidades de los lotes no sea superior a la del producto en el carrito.
7133
7135
  for (var index = 1; index < id; index++) {
7134
- var lotID = '';
7135
- if (document.getElementById("id" + index)) {
7136
- lotID = document.getElementById("id" + index).value;
7137
- var myIndex = allID.indexOf(parseInt(lotID));
7138
- if (myIndex !== -1) {
7139
- allID.splice(myIndex, 1);
7140
- }
7141
- }
7142
7136
  if (document.getElementById("quantity" + index)) {
7143
- var quantity = parseInt(document.getElementById("quantity" + index).value);
7144
- var deliveryDate = document.getElementById("deliveryDate" + index).value;
7145
- var shippingAddress = $("#shippingAddress" + index).val();
7146
- var notes = $("#notes" + index).val();
7147
- var shippingAddressName = $('#shippingAddress' + index + ' option:selected').text();
7137
+ cantidadLotes = cantidadLotes + parseInt(document.getElementById("quantity" + index).value);
7148
7138
  }
7149
- if (lotID == 'Pendt.') {
7150
- // console.log('nuevo');
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');
7152
- }
7153
- else if (lotID != '') {
7154
- // console.log('editar');
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');
7139
+ }
7140
+ if (item.quantity >= cantidadLotes) {
7141
+ // console.log(cantidadLotes);
7142
+ for (var index = 1; index < id; index++) {
7143
+ var lotID = '';
7144
+ if (document.getElementById("id" + index)) {
7145
+ lotID = document.getElementById("id" + index).value;
7146
+ var myIndex = allID.indexOf(parseInt(lotID));
7147
+ if (myIndex !== -1) {
7148
+ allID.splice(myIndex, 1);
7149
+ }
7150
+ }
7151
+ if (document.getElementById("quantity" + index)) {
7152
+ var quantity = parseInt(document.getElementById("quantity" + index).value);
7153
+ var deliveryDate = document.getElementById("deliveryDate" + index).value;
7154
+ var shippingAddress = $("#shippingAddress" + index).val();
7155
+ var notes = $("#notes" + index).val();
7156
+ var shippingAddressName = $('#shippingAddress' + index + ' option:selected').text();
7157
+ }
7158
+ if (lotID == 'Pendt.') {
7159
+ // console.log('nuevo');
7160
+ 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');
7161
+ }
7162
+ else if (lotID != '') {
7163
+ // console.log('editar');
7164
+ 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');
7165
+ }
7156
7166
  }
7167
+ allID.forEach(function (element) {
7168
+ // console.log('borrar');
7169
+ this_.cartService.addToLot(item.product, 0, item.variant_id, element, 0, 0, 0, 0, 0, 0, 'delete', 0, '', 0, 'delete', 'deletelot');
7170
+ });
7171
+ setTimeout(function () { this_.cartService.loadCartByToken(this_.cartService.getCartToken()); }, 1000);
7172
+ this_.toastrService.show('lot-saved');
7173
+ }
7174
+ else {
7175
+ this_.toastrService.show('La cantidad de los lotes es superior a la cantidad del producto.');
7157
7176
  }
7158
- allID.forEach(function (element) {
7159
- // console.log('borrar');
7160
- this_.cartService.addToLot(item.product, 0, item.variant_id, element, 0, 0, 0, 0, 0, 0, 'delete', 0, '', 0, 'delete', 'deletelot');
7161
- });
7162
- setTimeout(function () { this_.cartService.loadCartByToken(this_.cartService.getCartToken()); }, 1000);
7163
- this_.toastrService.show('lot-saved');
7164
7177
  };
7165
7178
  $(document).on('click', '#botonBorrar', function (event) {
7166
7179
  event.preventDefault();
@@ -12143,7 +12156,7 @@
12143
12156
  OrderEcComponent = __decorate$1k([
12144
12157
  core.Component({
12145
12158
  selector: 'app-order-ec',
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-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n Lotes\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-1 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; let i = index\">\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-5 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=\"col-1 d-none d-md-flex justify-content-center\" *ngIf=\"item.orderItemLot\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir\" type=\"button\" [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\" aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\" value=\"Ver\">\n </div>\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-1 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 class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{lot.date_deliver}}</td>\n <td>Pendiente</td>\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\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",
12159
+ 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-1 font-sm font-brandon d-none d-md-block\">\n <!-- {{ 'description' | translate | uppercase }} -->\n {{ 'lots' | 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-1 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; let i = index\">\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-5 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=\"col-1 d-none d-md-flex justify-content-center\" *ngIf=\"item.orderItemLot != ''\">\n <input type=\"button\" class=\"btn btn-primary btnSeguir\" type=\"button\" [attr.data-bs-toggle]=\"'collapse'\" [attr.data-bs-target]=\"'#collapseExample'+i\" aria-expanded=\"false\" [attr.aria-controls]=\"'collapseExample'+i\" value=\"{{ 'see' | translate | uppercase }}\">\n </div>\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-1 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 class=\"collapse\" [attr.id]=\"'collapseExample'+i\">\n <div class=\"card card-body\">\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Estado</th>\n <th scope=\"col\">Cantidad</th>\n <th scope=\"col\">Fecha Solicitada</th>\n <th scope=\"col\">Fecha Estimada</th>\n <th scope=\"col\">Sede</th>\n <th scope=\"col\">Nota</th>\n <th scope=\"col\">Total Lote</th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let lot of item.orderItemLot\">\n <tr>\n <th scope=\"row\">{{lot.id}}</th>\n <td>{{lot.lot_status}}</td>\n <td>{{lot.quantity}}</td>\n <td>{{lot.date_request}}</td>\n <td *ngIf=\"lot.date_deliver; else sinFechaEstimada\">{{lot.date_deliver}}</td>\n <ng-template #sinFechaEstimada>\n <td>Pendiente</td>\n </ng-template>\n <td>{{lot.shipping_address_name}}</td>\n <td>{{lot.notes}}</td>\n <td>{{lot.total_lot | ecCurrencySymbol}}</td>\n </tr>\n </ng-container>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\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",
12147
12160
  styles: [".maxwidth{max-width:100px}"]
12148
12161
  })
12149
12162
  ], OrderEcComponent);