tickera-angular-components 0.0.1-dev.74 → 0.0.1-dev.76

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.
@@ -107,12 +107,43 @@ var order$1 = {
107
107
  datafono: "Datafono",
108
108
  internal_exchange: "Cambio interno",
109
109
  customer_exchange: "Cambio cliente",
110
- mercado_pago: "Mercado Pago"
110
+ mercado_pago: "Mercado Pago",
111
+ mercadopago: "Mercado Pago",
112
+ pse: "PSE",
113
+ credit_card: "Tarjeta de crédito"
114
+ },
115
+ transactionStatus: {
116
+ PENDING: "Pendiente",
117
+ APPROVED: "Aprobada",
118
+ REJECTED: "Rechazada",
119
+ ERROR: "Error"
111
120
  },
112
121
  itemType: {
113
122
  PRODUCT: "Producto",
114
123
  TICKET: "Entrada",
115
124
  GIFT_BOND: "Bono de regalo"
125
+ },
126
+ discountTypes: {
127
+ gift_bond: "Bono de regalo",
128
+ corporate_bond: "Bono corporativo",
129
+ coupon: "Cupón de descuento"
130
+ },
131
+ transactionDetails: {
132
+ title: "Detalle de transacción",
133
+ labels: {
134
+ id: "ID",
135
+ paymentMethod: "Medio de pago",
136
+ status: "Estado",
137
+ amount: "Valor",
138
+ currency: "Moneda",
139
+ gatewayId: "ID transacción",
140
+ createdAt: "Fecha de creación",
141
+ updatedAt: "Última actualización",
142
+ gatewayResponse: "Respuesta del gateway"
143
+ },
144
+ actions: {
145
+ view: "Ver detalle"
146
+ }
116
147
  }
117
148
  };
118
149
  var es = {
@@ -212,12 +243,43 @@ var order = {
212
243
  datafono: "Datafono",
213
244
  internal_exchange: "Internal exchange",
214
245
  customer_exchange: "Customer exchange",
215
- mercado_pago: "Mercado Pago"
246
+ mercado_pago: "Mercado Pago",
247
+ mercadopago: "Mercado Pago",
248
+ pse: "PSE",
249
+ credit_card: "Credit card"
250
+ },
251
+ transactionStatus: {
252
+ PENDING: "Pending",
253
+ APPROVED: "Approved",
254
+ REJECTED: "Rejected",
255
+ ERROR: "Error"
216
256
  },
217
257
  itemType: {
218
258
  PRODUCT: "Product",
219
259
  TICKET: "Ticket",
220
260
  GIFT_BOND: "Gift bond"
261
+ },
262
+ discountTypes: {
263
+ gift_bond: "Product",
264
+ corporate_bond: "Ticket",
265
+ coupon: "Gift bond"
266
+ },
267
+ transactionDetails: {
268
+ title: "Transaction details",
269
+ labels: {
270
+ id: "ID",
271
+ paymentMethod: "Payment method",
272
+ status: "Status",
273
+ amount: "Amount",
274
+ currency: "Currency",
275
+ gatewayId: "Transaction ID",
276
+ createdAt: "Created at",
277
+ updatedAt: "Last updated",
278
+ gatewayResponse: "Gateway response"
279
+ },
280
+ actions: {
281
+ view: "View details"
282
+ }
221
283
  }
222
284
  };
223
285
  var en = {
@@ -494,28 +556,6 @@ const DOCUMENT_TYPES_OPTIONS = [
494
556
  { value: 'TI', label: 'common.documentTypes.ti' },
495
557
  ];
496
558
 
497
- const PAYMENT_METHODS_OPTIONS = [
498
- { value: 'credit_card', label: 'paymentMethod.creditCard' },
499
- { value: 'debit_card', label: 'paymentMethod.debitCard' },
500
- { value: 'pse', label: 'paymentMethod.pse' },
501
- { value: 'cash', label: 'paymentMethod.cash' },
502
- { value: 'bank_transfer', label: 'paymentMethod.bankTransfer' },
503
- ];
504
- const ORDER_STATUS_COLORS = {
505
- completed: { text: '#16a34a', bg: '#dcfce7' },
506
- processing: { text: '#525252', bg: '#f5f5f5' },
507
- refunded: { text: '#ea580c', bg: '#ffedd5' },
508
- failed: { text: '#dc2626', bg: '#fee2e2' },
509
- cancelled: { text: '#dc2626', bg: '#fee2e2' },
510
- 'on-hold': { text: '#ca8a04', bg: '#fef9c3' },
511
- 'pending-payment': { text: '#ca8a04', bg: '#fef9c3' },
512
- };
513
- const ORDER_ITEM_TYPES_COLORS = {
514
- TICKET: { text: '#1d4ed8', bg: '#eff6ff' },
515
- PRODUCT: { text: '#7e22ce', bg: '#faf5ff' },
516
- GIFT_BOND: { text: '#ca8a04', bg: '#fefce8' },
517
- };
518
-
519
559
  var FileType;
520
560
  (function (FileType) {
521
561
  FileType["IMAGE"] = "image";
@@ -653,6 +693,39 @@ var PaymentMethod;
653
693
  PaymentMethod["MERCADO_PAGO"] = "mercado_pago";
654
694
  })(PaymentMethod || (PaymentMethod = {}));
655
695
 
696
+ const PAYMENT_METHODS_OPTIONS = [
697
+ { value: 'credit_card', label: 'paymentMethod.creditCard' },
698
+ { value: 'debit_card', label: 'paymentMethod.debitCard' },
699
+ { value: 'pse', label: 'paymentMethod.pse' },
700
+ { value: 'cash', label: 'paymentMethod.cash' },
701
+ { value: 'bank_transfer', label: 'paymentMethod.bankTransfer' },
702
+ ];
703
+ const ORDER_STATUS_COLORS = {
704
+ completed: { text: '#16a34a', bg: '#dcfce7' },
705
+ processing: { text: '#525252', bg: '#f5f5f5' },
706
+ refunded: { text: '#ea580c', bg: '#ffedd5' },
707
+ failed: { text: '#dc2626', bg: '#fee2e2' },
708
+ cancelled: { text: '#dc2626', bg: '#fee2e2' },
709
+ 'on-hold': { text: '#ca8a04', bg: '#fef9c3' },
710
+ 'pending-payment': { text: '#ca8a04', bg: '#fef9c3' },
711
+ };
712
+ const ORDER_ITEM_TYPES_COLORS = {
713
+ TICKET: { text: '#1d4ed8', bg: '#eff6ff' },
714
+ PRODUCT: { text: '#7e22ce', bg: '#faf5ff' },
715
+ GIFT_BOND: { text: '#ca8a04', bg: '#fefce8' },
716
+ };
717
+ const ORDER_DISCOUNT_COLORS = {
718
+ coupon: { text: '#1d4ed8', bg: '#eff6ff' },
719
+ corporate_bond: { text: '#7e22ce', bg: '#faf5ff' },
720
+ gift_bond: { text: '#ca8a04', bg: '#fefce8' },
721
+ };
722
+ const TRANSACTION_STATUS_COLORS = {
723
+ [TransactionStatus.PENDING]: { text: '#ca8a04', bg: '#fef9c3' },
724
+ [TransactionStatus.APPROVED]: { text: '#16a34a', bg: '#dcfce7' },
725
+ [TransactionStatus.REJECTED]: { text: '#dc2626', bg: '#fee2e2' },
726
+ [TransactionStatus.ERROR]: { text: '#ea580c', bg: '#ffedd5' },
727
+ };
728
+
656
729
  const TICKET_MAP_LAST_TICKETS_LIMIT = 10;
657
730
  const TICKET_ELEMENT_TYPES = [
658
731
  RoomMapElementType.SEAT_BLOCK,
@@ -1864,6 +1937,56 @@ const getCustomerFullname = (customer) => {
1864
1937
  return `${customer.first_name || ''} ${customer.last_name || ''}`.trim();
1865
1938
  };
1866
1939
 
1940
+ const DISCOUNT_ICONS = {
1941
+ coupon: 'ri-coupon-3-line',
1942
+ corporate_bond: 'ri-building-line',
1943
+ gift_bond: 'ri-gift-2-line',
1944
+ };
1945
+ function getOrderDiscount(order) {
1946
+ if (!order.discount_amount || order.discount_amount <= 0) {
1947
+ return noDiscount();
1948
+ }
1949
+ if (order.coupon || order.coupon_snapshot) {
1950
+ const snap = order.coupon_snapshot;
1951
+ return {
1952
+ type: 'coupon',
1953
+ code: snap?.['code'] ?? order.coupon?.code ?? null,
1954
+ name: snap?.['code'] ?? order.coupon?.code ?? null,
1955
+ value: order.discount_amount,
1956
+ discountType: snap?.['discount_type'] === CouponDiscountType.PERCENTAGE ? 'percentage' : 'fixed',
1957
+ icon: DISCOUNT_ICONS.coupon,
1958
+ };
1959
+ }
1960
+ if (order.corporate_bond_code || order.corporate_bond_code_snapshot) {
1961
+ const snap = order.corporate_bond_code_snapshot;
1962
+ return {
1963
+ type: 'corporate_bond',
1964
+ code: snap?.['code'] ?? order.corporate_bond_code?.code ?? null,
1965
+ name: snap?.['corporate_bond']?.['name'] ??
1966
+ order.corporate_bond_code?.corporate_bond?.name ??
1967
+ null,
1968
+ value: order.discount_amount,
1969
+ discountType: 'fixed',
1970
+ icon: DISCOUNT_ICONS.corporate_bond,
1971
+ };
1972
+ }
1973
+ if (order.gift_bond || order.gift_bond_snapshot) {
1974
+ const snap = order.gift_bond_snapshot;
1975
+ return {
1976
+ type: 'gift_bond',
1977
+ code: null,
1978
+ name: snap?.['name'] ?? order.gift_bond?.name ?? null,
1979
+ value: order.discount_amount,
1980
+ discountType: 'fixed',
1981
+ icon: DISCOUNT_ICONS.gift_bond,
1982
+ };
1983
+ }
1984
+ return noDiscount();
1985
+ }
1986
+ function noDiscount() {
1987
+ return { type: null, code: null, name: null, value: 0, discountType: null, icon: '' };
1988
+ }
1989
+
1867
1990
  function parseJsonToFormDataAdvanced(imageGallery) {
1868
1991
  const formData = new FormData();
1869
1992
  if (!Array.isArray(imageGallery)) {
@@ -2943,6 +3066,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
2943
3066
  args: [{ providedIn: 'root' }]
2944
3067
  }] });
2945
3068
 
3069
+ class OrderTransactionDetailsModalService {
3070
+ isOpen = signal(false, ...(ngDevMode ? [{ debugName: "isOpen" }] : []));
3071
+ transaction = signal(null, ...(ngDevMode ? [{ debugName: "transaction" }] : []));
3072
+ get modalIsOpen() {
3073
+ return this.isOpen;
3074
+ }
3075
+ open(transaction) {
3076
+ this.transaction.set(transaction);
3077
+ }
3078
+ close() {
3079
+ this.isOpen.set(false);
3080
+ this.transaction.set(null);
3081
+ }
3082
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderTransactionDetailsModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3083
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderTransactionDetailsModalService, providedIn: 'root' });
3084
+ }
3085
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderTransactionDetailsModalService, decorators: [{
3086
+ type: Injectable,
3087
+ args: [{ providedIn: 'root' }]
3088
+ }] });
3089
+
2946
3090
  class PerformanceBookingDataService {
2947
3091
  _show = signal(null, ...(ngDevMode ? [{ debugName: "_show" }] : []));
2948
3092
  _performance = signal(null, ...(ngDevMode ? [{ debugName: "_performance" }] : []));
@@ -7987,11 +8131,11 @@ class OrderInformationComponent {
7987
8131
  this.transloco = transloco;
7988
8132
  }
7989
8133
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderInformationComponent, deps: [{ token: i2$1.TranslocoService }], target: i0.ɵɵFactoryTarget.Component });
7990
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderInformationComponent, isStandalone: true, selector: "order-information", inputs: { order: "order" }, ngImport: i0, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n @if (order.payment_method) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">M\u00E9todo de pago</p>\n <p class=\"order-information__content-item-value\">\n {{ `order.paymentMethods.${order.payment_method}` | transloco }}\n </p>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.service_fee | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (!!order.discount_amount && order.discount_amount > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Descuento</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.discount_amount | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Total</p>\n @if (order.total_discounted && order.total_discounted >= 0) {\n <p class=\"order-information__content-item-total_discounted\">\n <span class=\"discounted\">\n ${{ order.total_discounted | currency: 'COP' : '' : '1.0-2' }}\n </span>\n <span class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </span>\n </p>\n } @else {\n <p class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </p>\n }\n </div>\n </div>\n </div>\n}\n", styles: [".order-information{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-information__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;flex-flow:row wrap;gap:.75rem;justify-content:space-between;padding:1rem;width:100%}.order-information__header-id{color:#6b7280;font-size:.875rem;font-weight:500;margin:0}.order-information__header-uuid{color:#9ca3af;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;margin:0;word-break:break-all}.order-information__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-information__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-information__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-information__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-information__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-information__content-item-value.total{font-weight:700}.order-information__content-item-total_discounted{display:flex;flex-flow:row nowrap;gap:.25rem;margin:0;width:100%}.order-information__content-item-total_discounted .discounted{color:#111827;font-size:.875rem;font-weight:700}.order-information__content-item-total_discounted .total{color:#9ca3af;margin:0;text-decoration:line-through}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: OrderStatusBadgeComponent, selector: "order-status-badge", inputs: ["order", "size"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "pipe", type: i2.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i2$1.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None });
8134
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderInformationComponent, isStandalone: true, selector: "order-information", inputs: { order: "order" }, ngImport: i0, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n @if (order.payment_method) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">M\u00E9todo de pago</p>\n <p class=\"order-information__content-item-value\">\n {{ `order.paymentMethods.${order.payment_method}` | transloco }}\n </p>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.service_fee | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (!!order.discount_amount && order.discount_amount > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Descuento</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.discount_amount | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Total</p>\n @if (order.total_discounted && order.total_discounted >= 0) {\n <p class=\"order-information__content-item-total_discounted\">\n <span class=\"discounted\">\n ${{ order.total_discounted | currency: 'COP' : '' : '1.0-2' }}\n </span>\n <span class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </span>\n </p>\n } @else {\n <p class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </p>\n }\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">T\u00E9rminos aceptados</p>\n <app-badge\n [text]=\"order.terms_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.terms_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.terms_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Procesamiento de datos aceptado</p>\n <app-badge\n [text]=\"order.data_processing_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.data_processing_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.data_processing_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n @if (order.comments) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Comentarios</p>\n <p class=\"order-information__content-item-value\">{{ order.comments }}</p>\n </div>\n }\n\n @if (order.address_notes) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Notas de direcci\u00F3n</p>\n <p class=\"order-information__content-item-value\">{{ order.address_notes }}</p>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-information{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-information__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;flex-flow:row wrap;gap:.75rem;justify-content:space-between;padding:1rem;width:100%}.order-information__header-id{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-information__header-uuid{color:#9ca3af;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;margin:0;word-break:break-all}.order-information__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-information__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-information__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-information__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-information__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-information__content-item-value.total{font-weight:700}.order-information__content-item-total_discounted{display:flex;flex-flow:row nowrap;gap:.25rem;margin:0;width:100%}.order-information__content-item-total_discounted .discounted{color:#111827;font-size:.875rem;font-weight:700}.order-information__content-item-total_discounted .total{color:#9ca3af;margin:0;text-decoration:line-through}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: OrderStatusBadgeComponent, selector: "order-status-badge", inputs: ["order", "size"] }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "pipe", type: i2.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i2$1.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None });
7991
8135
  }
7992
8136
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderInformationComponent, decorators: [{
7993
8137
  type: Component,
7994
- args: [{ selector: 'order-information', standalone: true, imports: [CommonModule, OrderStatusBadgeComponent, TranslocoModule], encapsulation: ViewEncapsulation.None, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n @if (order.payment_method) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">M\u00E9todo de pago</p>\n <p class=\"order-information__content-item-value\">\n {{ `order.paymentMethods.${order.payment_method}` | transloco }}\n </p>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.service_fee | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (!!order.discount_amount && order.discount_amount > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Descuento</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.discount_amount | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Total</p>\n @if (order.total_discounted && order.total_discounted >= 0) {\n <p class=\"order-information__content-item-total_discounted\">\n <span class=\"discounted\">\n ${{ order.total_discounted | currency: 'COP' : '' : '1.0-2' }}\n </span>\n <span class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </span>\n </p>\n } @else {\n <p class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </p>\n }\n </div>\n </div>\n </div>\n}\n", styles: [".order-information{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-information__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;flex-flow:row wrap;gap:.75rem;justify-content:space-between;padding:1rem;width:100%}.order-information__header-id{color:#6b7280;font-size:.875rem;font-weight:500;margin:0}.order-information__header-uuid{color:#9ca3af;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;margin:0;word-break:break-all}.order-information__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-information__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-information__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-information__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-information__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-information__content-item-value.total{font-weight:700}.order-information__content-item-total_discounted{display:flex;flex-flow:row nowrap;gap:.25rem;margin:0;width:100%}.order-information__content-item-total_discounted .discounted{color:#111827;font-size:.875rem;font-weight:700}.order-information__content-item-total_discounted .total{color:#9ca3af;margin:0;text-decoration:line-through}\n"] }]
8138
+ args: [{ selector: 'order-information', standalone: true, imports: [CommonModule, OrderStatusBadgeComponent, TranslocoModule, AppBadgeComponent], encapsulation: ViewEncapsulation.None, template: "@if (!!order) {\n <div class=\"order-information\">\n <div class=\"order-information__header\">\n <div>\n <p class=\"order-information__header-id\">Orden #{{ order.id }}</p>\n <p class=\"order-information__header-uuid\">{{ order.uuid }}</p>\n </div>\n\n <order-status-badge [order]=\"order\" />\n </div>\n\n <div class=\"order-information__content\">\n @if (order.show_snapshot && order.show_snapshot['title']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Evento</p>\n <p class=\"order-information__content-item-value\">\n {{ order.show_snapshot['title'] }}\n </p>\n </div>\n }\n\n @if (order.performance_snapshot && order.performance_snapshot['start_time']) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la funci\u00F3n</p>\n <p class=\"order-information__content-item-value\">\n {{ order.performance_snapshot['start_time'] | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Fecha de la compra</p>\n <p class=\"order-information__content-item-value\">\n {{ order.created_at | date: 'dd/MM/yyyy hh:mm a' }}\n </p>\n </div>\n\n @if (order.payment_method) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">M\u00E9todo de pago</p>\n <p class=\"order-information__content-item-value\">\n {{ `order.paymentMethods.${order.payment_method}` | transloco }}\n </p>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Tarifa de servicio</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.service_fee | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n @if (!!order.discount_amount && order.discount_amount > 0) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Descuento</p>\n <p class=\"order-information__content-item-value\">\n ${{ order.discount_amount | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n }\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Total</p>\n @if (order.total_discounted && order.total_discounted >= 0) {\n <p class=\"order-information__content-item-total_discounted\">\n <span class=\"discounted\">\n ${{ order.total_discounted | currency: 'COP' : '' : '1.0-2' }}\n </span>\n <span class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </span>\n </p>\n } @else {\n <p class=\"order-information__content-item-value total\">\n ${{ order.total | currency: 'COP' : '' : '1.0-2' }}\n </p>\n }\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">T\u00E9rminos aceptados</p>\n <app-badge\n [text]=\"order.terms_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.terms_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.terms_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Procesamiento de datos aceptado</p>\n <app-badge\n [text]=\"order.data_processing_accepted ? 'Aceptado' : 'No aceptado'\"\n [backgroundColor]=\"order.data_processing_accepted ? '#dcfce7' : '#fee2e2'\"\n [textColor]=\"order.data_processing_accepted ? '#16a34a' : '#dc2626'\"\n size=\"xs\"\n />\n </div>\n\n @if (order.comments) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Comentarios</p>\n <p class=\"order-information__content-item-value\">{{ order.comments }}</p>\n </div>\n }\n\n @if (order.address_notes) {\n <div class=\"order-information__content-item\">\n <p class=\"order-information__content-item-title\">Notas de direcci\u00F3n</p>\n <p class=\"order-information__content-item-value\">{{ order.address_notes }}</p>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-information{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-information__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;flex-flow:row wrap;gap:.75rem;justify-content:space-between;padding:1rem;width:100%}.order-information__header-id{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-information__header-uuid{color:#9ca3af;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;margin:0;word-break:break-all}.order-information__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-information__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-information__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-information__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-information__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-information__content-item-value.total{font-weight:700}.order-information__content-item-total_discounted{display:flex;flex-flow:row nowrap;gap:.25rem;margin:0;width:100%}.order-information__content-item-total_discounted .discounted{color:#111827;font-size:.875rem;font-weight:700}.order-information__content-item-total_discounted .total{color:#9ca3af;margin:0;text-decoration:line-through}\n"] }]
7995
8139
  }], ctorParameters: () => [{ type: i2$1.TranslocoService }], propDecorators: { order: [{
7996
8140
  type: Input,
7997
8141
  args: [{ required: true }]
@@ -8197,7 +8341,7 @@ class OrderItemsComponent {
8197
8341
  this.ticketQrModalService.open(ticketUuid, description);
8198
8342
  }
8199
8343
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderItemsComponent, deps: [{ token: TicketQrModalService }], target: i0.ɵɵFactoryTarget.Component });
8200
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderItemsComponent, isStandalone: true, selector: "order-items", inputs: { order: "order" }, ngImport: i0, template: "@if (!!order) {\n <div class=\"order-items\">\n <div class=\"order-items__header\">\n <ticket-map-widget-header [title]=\"`Art\u00EDculos (${order.order_items.length})`\" />\n </div>\n <div class=\"order-items__table-container\">\n <table class=\"order-items__table\">\n <thead class=\"order-items__table-head\">\n <tr class=\"order-items__table-head-row\">\n <th class=\"order-items__table-head-cell\">Tipo</th>\n <th class=\"order-items__table-head-cell\">Descripci\u00F3n</th>\n\n <th class=\"order-items__table-head-cell text-right\">Cant.</th>\n <th class=\"order-items__table-head-cell text-right\">Precio</th>\n <th class=\"order-items__table-head-cell text-right\">Total</th>\n @if (showActionColumn) {\n <th class=\"order-items__table-head-cell\">Acciones</th>\n }\n </tr>\n </thead>\n <tbody class=\"order-items__table-body\">\n @for (item of order.order_items; track $index) {\n <tr class=\"order-items__table-body-row\">\n <td class=\"order-items__table-body-cell\">\n <order-item-type-badge [item]=\"item\" size=\"xs\" />\n </td>\n\n <td class=\"order-items__table-body-cell\">\n {{ item.description }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n {{ item.quantity }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n ${{ item.normal_price | number: '1.0-2' }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n <strong>\n ${{ itemTotal(item.quantity, item.normal_price) | number: '1.0-2' }}\n </strong>\n </td>\n\n @if (item.ticket_uuid && order.status === 'completed' && showActionColumn) {\n <td class=\"order-items__table-body-cell actions\">\n <app-button\n text=\"Ver ticket\"\n size=\"xs\"\n icon=\"ri-eye-line\"\n (clicked)=\"openTicketQr(item.ticket_uuid!, item.description)\"\n />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <div class=\"order-items__totals\">\n <dl class=\"order-items__totals-container\">\n @if (giftBonds.length > 0 && totals.giftBonds > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Bonos de regalo ({{ giftBonds.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.giftBonds > 0) {\n <span class=\"text-gray-900\"> ${{ totals.giftBonds | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (tickets.length > 0 && totals.tickets > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Entradas ({{ tickets.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.tickets > 0) {\n <span class=\"text-gray-900\"> ${{ totals.tickets | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (products.length > 0 && totals.products > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Productos</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.products > 0) {\n <span class=\"text-gray-900\"> ${{ totals.products | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Tarifa de servicio</dt>\n <dd class=\"order-items__totals-item-value\">\n <span class=\"text-gray-900\"> ${{ order.service_fee | number: '1.0-2' }} </span>\n </dd>\n </div>\n }\n\n @if (hasDiscount()) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Descuento</dt>\n <dd class=\"order-items__totals-item-title\">\n $-{{ order.discount_amount | number: '1.0-2' }}\n </dd>\n </div>\n }\n\n <div class=\"order-items__totals-item total-item\">\n <dt class=\"order-items__totals-item-total\">Total</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (!hasDiscount()) {\n <span class=\"order-items__totals-item-total\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n }\n @if (hasDiscount()) {\n <span class=\"order-items__totals-item-discount-wrapper\">\n <span class=\"order-items__totals-item-discount\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n <span class=\"order-items__totals-item-total\">\n ${{ order.total_discounted | number: '1.0-2' }}\n </span>\n </span>\n }\n </dd>\n </div>\n </dl>\n </div>\n </div>\n\n <ticket-qr-modal />\n}\n", styles: [".order-items{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-items__header{align-items:center;display:flex;flex-flow:row wrap;gap:1rem;padding:1rem;width:100%}.order-items__table-container{overflow-x:auto}.order-items__table{border-collapse:collapse;font-size:.875rem;width:100%}.order-items__table-head-row{background-color:#f9fafb;text-align:left}.order-items__table-head-cell{color:#6b7280;font-size:.75rem;font-weight:700;padding:.75rem 1.5rem;text-transform:uppercase}.order-items__table-head-cell.text-right{text-align:right}.order-items__table-body>:not(:last-child){border-bottom:1px solid #f9fafb}.order-items__table-body-row{transition:all .4s ease}.order-items__table-body-row:hover{background-color:#f9fafb}.order-items__table-body-cell{color:#374151;padding:.75rem 1.5rem;white-space:nowrap}.order-items__table-body-cell.text-right{text-align:right}.order-items__totals{background-color:#f9fafb;border-top:1px solid #f3f4f6;padding:1rem 1.5rem;width:100%}.order-items__totals-container{display:flex;flex-flow:column;gap:.5rem;margin-left:auto;max-width:20rem;width:100%}.order-items__totals-item{display:flex;font-size:.875rem;justify-content:space-between;width:100%}.order-items__totals-item.actions{text-align:left}.order-items__totals-item.total-item{border-top:1px solid #e5e7eb;padding-top:.5rem}.order-items__totals-item-title{color:#6b7280}.order-items__totals-item-total{color:#111827;font-size:1.125rem;font-weight:700;line-height:100%}.order-items__totals-item-discount-wrapper{align-items:flex-end;display:flex;flex-flow:column nowrap;width:100%}.order-items__totals-item-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["disabled", "loading", "type", "variant", "text", "size", "loadingText", "icon"], outputs: ["clicked"] }, { kind: "component", type: TicketQrModalComponent, selector: "ticket-qr-modal" }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title"] }, { kind: "component", type: OrderItemTypeBadgeComponent, selector: "order-item-type-badge", inputs: ["item", "size"] }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }], encapsulation: i0.ViewEncapsulation.None });
8344
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderItemsComponent, isStandalone: true, selector: "order-items", inputs: { order: "order" }, ngImport: i0, template: "@if (!!order) {\n <div class=\"order-items\">\n <div class=\"order-items__header\">\n <p class=\"order-items__header-title\">\n Informaci\u00F3n de los art\u00EDculos comprados ({{ order.order_items.length | number: '1.0' }})\n </p>\n </div>\n <div class=\"order-items__table-container\">\n <table class=\"order-items__table\">\n <thead class=\"order-items__table-head\">\n <tr class=\"order-items__table-head-row\">\n <th class=\"order-items__table-head-cell\">Tipo</th>\n <th class=\"order-items__table-head-cell\">Descripci\u00F3n</th>\n\n <th class=\"order-items__table-head-cell text-right\">Cant.</th>\n <th class=\"order-items__table-head-cell text-right\">Precio</th>\n <th class=\"order-items__table-head-cell text-right\">Total</th>\n @if (showActionColumn) {\n <th class=\"order-items__table-head-cell\">Acciones</th>\n }\n </tr>\n </thead>\n <tbody class=\"order-items__table-body\">\n @for (item of order.order_items; track $index) {\n <tr class=\"order-items__table-body-row\">\n <td class=\"order-items__table-body-cell\">\n <order-item-type-badge [item]=\"item\" size=\"xs\" />\n </td>\n\n <td class=\"order-items__table-body-cell\">\n {{ item.description }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n {{ item.quantity }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n ${{ item.normal_price | number: '1.0-2' }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n <strong>\n ${{ itemTotal(item.quantity, item.normal_price) | number: '1.0-2' }}\n </strong>\n </td>\n\n @if (item.ticket_uuid && order.status === 'completed' && showActionColumn) {\n <td class=\"order-items__table-body-cell actions\">\n <app-button\n text=\"Ver ticket\"\n size=\"xs\"\n icon=\"ri-eye-line\"\n (clicked)=\"openTicketQr(item.ticket_uuid!, item.description)\"\n />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <div class=\"order-items__totals\">\n <dl class=\"order-items__totals-container\">\n @if (giftBonds.length > 0 && totals.giftBonds > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Bonos de regalo ({{ giftBonds.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.giftBonds > 0) {\n <span class=\"text-gray-900\"> ${{ totals.giftBonds | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (tickets.length > 0 && totals.tickets > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Entradas ({{ tickets.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.tickets > 0) {\n <span class=\"text-gray-900\"> ${{ totals.tickets | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (products.length > 0 && totals.products > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Productos</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.products > 0) {\n <span class=\"text-gray-900\"> ${{ totals.products | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Tarifa de servicio</dt>\n <dd class=\"order-items__totals-item-value\">\n <span class=\"text-gray-900\"> ${{ order.service_fee | number: '1.0-2' }} </span>\n </dd>\n </div>\n }\n\n @if (hasDiscount()) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Descuento</dt>\n <dd class=\"order-items__totals-item-title\">\n $-{{ order.discount_amount | number: '1.0-2' }}\n </dd>\n </div>\n }\n\n <div class=\"order-items__totals-item total-item\">\n <dt class=\"order-items__totals-item-total\">Total</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (!hasDiscount()) {\n <span class=\"order-items__totals-item-total\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n }\n @if (hasDiscount()) {\n <span class=\"order-items__totals-item-discount-wrapper\">\n <span class=\"order-items__totals-item-discount\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n <span class=\"order-items__totals-item-total\">\n ${{ order.total_discounted | number: '1.0-2' }}\n </span>\n </span>\n }\n </dd>\n </div>\n </dl>\n </div>\n </div>\n\n <ticket-qr-modal />\n}\n", styles: [".order-items{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-items__header{align-items:center;display:flex;flex-flow:row wrap;gap:1rem;padding:1rem;width:100%}.order-items__header-title{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-items__table-container{overflow-x:auto}.order-items__table{border-collapse:collapse;font-size:.875rem;width:100%}.order-items__table-head-row{background-color:#f9fafb;text-align:left}.order-items__table-head-cell{color:#6b7280;font-size:.75rem;font-weight:700;padding:.75rem 1.5rem;text-transform:uppercase}.order-items__table-head-cell.text-right{text-align:right}.order-items__table-body>:not(:last-child){border-bottom:1px solid #f9fafb}.order-items__table-body-row{transition:all .4s ease}.order-items__table-body-row:hover{background-color:#f9fafb}.order-items__table-body-cell{color:#374151;padding:.75rem 1.5rem;white-space:nowrap}.order-items__table-body-cell.text-right{text-align:right}.order-items__totals{background-color:#f9fafb;border-top:1px solid #f3f4f6;padding:1rem 1.5rem;width:100%}.order-items__totals-container{display:flex;flex-flow:column;gap:.5rem;margin-left:auto;max-width:20rem;width:100%}.order-items__totals-item{display:flex;font-size:.875rem;justify-content:space-between;width:100%}.order-items__totals-item.actions{text-align:left}.order-items__totals-item.total-item{border-top:1px solid #e5e7eb;padding-top:.5rem}.order-items__totals-item-title{color:#6b7280}.order-items__totals-item-total{color:#111827;font-size:1.125rem;font-weight:700;line-height:100%}.order-items__totals-item-discount-wrapper{align-items:flex-end;display:flex;flex-flow:column nowrap;width:100%}.order-items__totals-item-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["disabled", "loading", "type", "variant", "text", "size", "loadingText", "icon"], outputs: ["clicked"] }, { kind: "component", type: TicketQrModalComponent, selector: "ticket-qr-modal" }, { kind: "component", type: OrderItemTypeBadgeComponent, selector: "order-item-type-badge", inputs: ["item", "size"] }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }], encapsulation: i0.ViewEncapsulation.None });
8201
8345
  }
8202
8346
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderItemsComponent, decorators: [{
8203
8347
  type: Component,
@@ -8207,17 +8351,182 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
8207
8351
  TicketQrModalComponent,
8208
8352
  TicketMapWidgetHeaderComponent,
8209
8353
  OrderItemTypeBadgeComponent,
8210
- ], encapsulation: ViewEncapsulation.None, template: "@if (!!order) {\n <div class=\"order-items\">\n <div class=\"order-items__header\">\n <ticket-map-widget-header [title]=\"`Art\u00EDculos (${order.order_items.length})`\" />\n </div>\n <div class=\"order-items__table-container\">\n <table class=\"order-items__table\">\n <thead class=\"order-items__table-head\">\n <tr class=\"order-items__table-head-row\">\n <th class=\"order-items__table-head-cell\">Tipo</th>\n <th class=\"order-items__table-head-cell\">Descripci\u00F3n</th>\n\n <th class=\"order-items__table-head-cell text-right\">Cant.</th>\n <th class=\"order-items__table-head-cell text-right\">Precio</th>\n <th class=\"order-items__table-head-cell text-right\">Total</th>\n @if (showActionColumn) {\n <th class=\"order-items__table-head-cell\">Acciones</th>\n }\n </tr>\n </thead>\n <tbody class=\"order-items__table-body\">\n @for (item of order.order_items; track $index) {\n <tr class=\"order-items__table-body-row\">\n <td class=\"order-items__table-body-cell\">\n <order-item-type-badge [item]=\"item\" size=\"xs\" />\n </td>\n\n <td class=\"order-items__table-body-cell\">\n {{ item.description }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n {{ item.quantity }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n ${{ item.normal_price | number: '1.0-2' }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n <strong>\n ${{ itemTotal(item.quantity, item.normal_price) | number: '1.0-2' }}\n </strong>\n </td>\n\n @if (item.ticket_uuid && order.status === 'completed' && showActionColumn) {\n <td class=\"order-items__table-body-cell actions\">\n <app-button\n text=\"Ver ticket\"\n size=\"xs\"\n icon=\"ri-eye-line\"\n (clicked)=\"openTicketQr(item.ticket_uuid!, item.description)\"\n />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <div class=\"order-items__totals\">\n <dl class=\"order-items__totals-container\">\n @if (giftBonds.length > 0 && totals.giftBonds > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Bonos de regalo ({{ giftBonds.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.giftBonds > 0) {\n <span class=\"text-gray-900\"> ${{ totals.giftBonds | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (tickets.length > 0 && totals.tickets > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Entradas ({{ tickets.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.tickets > 0) {\n <span class=\"text-gray-900\"> ${{ totals.tickets | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (products.length > 0 && totals.products > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Productos</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.products > 0) {\n <span class=\"text-gray-900\"> ${{ totals.products | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Tarifa de servicio</dt>\n <dd class=\"order-items__totals-item-value\">\n <span class=\"text-gray-900\"> ${{ order.service_fee | number: '1.0-2' }} </span>\n </dd>\n </div>\n }\n\n @if (hasDiscount()) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Descuento</dt>\n <dd class=\"order-items__totals-item-title\">\n $-{{ order.discount_amount | number: '1.0-2' }}\n </dd>\n </div>\n }\n\n <div class=\"order-items__totals-item total-item\">\n <dt class=\"order-items__totals-item-total\">Total</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (!hasDiscount()) {\n <span class=\"order-items__totals-item-total\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n }\n @if (hasDiscount()) {\n <span class=\"order-items__totals-item-discount-wrapper\">\n <span class=\"order-items__totals-item-discount\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n <span class=\"order-items__totals-item-total\">\n ${{ order.total_discounted | number: '1.0-2' }}\n </span>\n </span>\n }\n </dd>\n </div>\n </dl>\n </div>\n </div>\n\n <ticket-qr-modal />\n}\n", styles: [".order-items{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-items__header{align-items:center;display:flex;flex-flow:row wrap;gap:1rem;padding:1rem;width:100%}.order-items__table-container{overflow-x:auto}.order-items__table{border-collapse:collapse;font-size:.875rem;width:100%}.order-items__table-head-row{background-color:#f9fafb;text-align:left}.order-items__table-head-cell{color:#6b7280;font-size:.75rem;font-weight:700;padding:.75rem 1.5rem;text-transform:uppercase}.order-items__table-head-cell.text-right{text-align:right}.order-items__table-body>:not(:last-child){border-bottom:1px solid #f9fafb}.order-items__table-body-row{transition:all .4s ease}.order-items__table-body-row:hover{background-color:#f9fafb}.order-items__table-body-cell{color:#374151;padding:.75rem 1.5rem;white-space:nowrap}.order-items__table-body-cell.text-right{text-align:right}.order-items__totals{background-color:#f9fafb;border-top:1px solid #f3f4f6;padding:1rem 1.5rem;width:100%}.order-items__totals-container{display:flex;flex-flow:column;gap:.5rem;margin-left:auto;max-width:20rem;width:100%}.order-items__totals-item{display:flex;font-size:.875rem;justify-content:space-between;width:100%}.order-items__totals-item.actions{text-align:left}.order-items__totals-item.total-item{border-top:1px solid #e5e7eb;padding-top:.5rem}.order-items__totals-item-title{color:#6b7280}.order-items__totals-item-total{color:#111827;font-size:1.125rem;font-weight:700;line-height:100%}.order-items__totals-item-discount-wrapper{align-items:flex-end;display:flex;flex-flow:column nowrap;width:100%}.order-items__totals-item-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}\n"] }]
8354
+ ], encapsulation: ViewEncapsulation.None, template: "@if (!!order) {\n <div class=\"order-items\">\n <div class=\"order-items__header\">\n <p class=\"order-items__header-title\">\n Informaci\u00F3n de los art\u00EDculos comprados ({{ order.order_items.length | number: '1.0' }})\n </p>\n </div>\n <div class=\"order-items__table-container\">\n <table class=\"order-items__table\">\n <thead class=\"order-items__table-head\">\n <tr class=\"order-items__table-head-row\">\n <th class=\"order-items__table-head-cell\">Tipo</th>\n <th class=\"order-items__table-head-cell\">Descripci\u00F3n</th>\n\n <th class=\"order-items__table-head-cell text-right\">Cant.</th>\n <th class=\"order-items__table-head-cell text-right\">Precio</th>\n <th class=\"order-items__table-head-cell text-right\">Total</th>\n @if (showActionColumn) {\n <th class=\"order-items__table-head-cell\">Acciones</th>\n }\n </tr>\n </thead>\n <tbody class=\"order-items__table-body\">\n @for (item of order.order_items; track $index) {\n <tr class=\"order-items__table-body-row\">\n <td class=\"order-items__table-body-cell\">\n <order-item-type-badge [item]=\"item\" size=\"xs\" />\n </td>\n\n <td class=\"order-items__table-body-cell\">\n {{ item.description }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n {{ item.quantity }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n ${{ item.normal_price | number: '1.0-2' }}\n </td>\n\n <td class=\"order-items__table-body-cell text-right\">\n <strong>\n ${{ itemTotal(item.quantity, item.normal_price) | number: '1.0-2' }}\n </strong>\n </td>\n\n @if (item.ticket_uuid && order.status === 'completed' && showActionColumn) {\n <td class=\"order-items__table-body-cell actions\">\n <app-button\n text=\"Ver ticket\"\n size=\"xs\"\n icon=\"ri-eye-line\"\n (clicked)=\"openTicketQr(item.ticket_uuid!, item.description)\"\n />\n </td>\n }\n </tr>\n }\n </tbody>\n </table>\n </div>\n\n <div class=\"order-items__totals\">\n <dl class=\"order-items__totals-container\">\n @if (giftBonds.length > 0 && totals.giftBonds > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Bonos de regalo ({{ giftBonds.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.giftBonds > 0) {\n <span class=\"text-gray-900\"> ${{ totals.giftBonds | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (tickets.length > 0 && totals.tickets > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Entradas ({{ tickets.length }})</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.tickets > 0) {\n <span class=\"text-gray-900\"> ${{ totals.tickets | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (products.length > 0 && totals.products > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Productos</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.products > 0) {\n <span class=\"text-gray-900\"> ${{ totals.products | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (order.service_fee && order.service_fee > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Tarifa de servicio</dt>\n <dd class=\"order-items__totals-item-value\">\n <span class=\"text-gray-900\"> ${{ order.service_fee | number: '1.0-2' }} </span>\n </dd>\n </div>\n }\n\n @if (hasDiscount()) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">Descuento</dt>\n <dd class=\"order-items__totals-item-title\">\n $-{{ order.discount_amount | number: '1.0-2' }}\n </dd>\n </div>\n }\n\n <div class=\"order-items__totals-item total-item\">\n <dt class=\"order-items__totals-item-total\">Total</dt>\n <dd class=\"order-items__totals-item-value\">\n @if (!hasDiscount()) {\n <span class=\"order-items__totals-item-total\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n }\n @if (hasDiscount()) {\n <span class=\"order-items__totals-item-discount-wrapper\">\n <span class=\"order-items__totals-item-discount\">\n ${{ order.total | number: '1.0-2' }}\n </span>\n <span class=\"order-items__totals-item-total\">\n ${{ order.total_discounted | number: '1.0-2' }}\n </span>\n </span>\n }\n </dd>\n </div>\n </dl>\n </div>\n </div>\n\n <ticket-qr-modal />\n}\n", styles: [".order-items{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-items__header{align-items:center;display:flex;flex-flow:row wrap;gap:1rem;padding:1rem;width:100%}.order-items__header-title{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-items__table-container{overflow-x:auto}.order-items__table{border-collapse:collapse;font-size:.875rem;width:100%}.order-items__table-head-row{background-color:#f9fafb;text-align:left}.order-items__table-head-cell{color:#6b7280;font-size:.75rem;font-weight:700;padding:.75rem 1.5rem;text-transform:uppercase}.order-items__table-head-cell.text-right{text-align:right}.order-items__table-body>:not(:last-child){border-bottom:1px solid #f9fafb}.order-items__table-body-row{transition:all .4s ease}.order-items__table-body-row:hover{background-color:#f9fafb}.order-items__table-body-cell{color:#374151;padding:.75rem 1.5rem;white-space:nowrap}.order-items__table-body-cell.text-right{text-align:right}.order-items__totals{background-color:#f9fafb;border-top:1px solid #f3f4f6;padding:1rem 1.5rem;width:100%}.order-items__totals-container{display:flex;flex-flow:column;gap:.5rem;margin-left:auto;max-width:20rem;width:100%}.order-items__totals-item{display:flex;font-size:.875rem;justify-content:space-between;width:100%}.order-items__totals-item.actions{text-align:left}.order-items__totals-item.total-item{border-top:1px solid #e5e7eb;padding-top:.5rem}.order-items__totals-item-title{color:#6b7280}.order-items__totals-item-total{color:#111827;font-size:1.125rem;font-weight:700;line-height:100%}.order-items__totals-item-discount-wrapper{align-items:flex-end;display:flex;flex-flow:column nowrap;width:100%}.order-items__totals-item-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}\n"] }]
8211
8355
  }], ctorParameters: () => [{ type: TicketQrModalService }], propDecorators: { order: [{
8212
8356
  type: Input,
8213
8357
  args: [{ required: true }]
8214
8358
  }] } });
8215
8359
 
8360
+ class OrderDiscountAppliedComponent {
8361
+ order;
8362
+ get discountInfo() {
8363
+ return getOrderDiscount(this.order);
8364
+ }
8365
+ get hasDiscount() {
8366
+ return this.discountInfo.type !== null && this.discountInfo.value > 0;
8367
+ }
8368
+ get discountPct() {
8369
+ if (this.discountInfo.discountType !== 'percentage')
8370
+ return null;
8371
+ return this.order.coupon_snapshot?.['discount_value'] ?? null;
8372
+ }
8373
+ get badgeColors() {
8374
+ if (!this.discountInfo.type)
8375
+ return { text: '', bg: '' };
8376
+ return ORDER_DISCOUNT_COLORS[this.discountInfo.type] ?? { text: '', bg: '' };
8377
+ }
8378
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderDiscountAppliedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8379
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderDiscountAppliedComponent, isStandalone: true, selector: "order-discount-applied", inputs: { order: "order" }, ngImport: i0, template: "@if (hasDiscount) {\n <div class=\"order-discount-applied\">\n <div class=\"order-discount-applied__content\">\n <div class=\"order-discount-applied__content-item discount-icon\">\n <div class=\"order-discount-applied__content-item-icon-wrapper\">\n <i class=\"order-discount-applied__content-item-icon\" [class]=\"discountInfo.icon\"></i>\n </div>\n </div>\n\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Tipo de descuento</p>\n <app-badge\n [text]=\"'order.discountTypes.' + discountInfo.type | transloco\"\n [backgroundColor]=\"badgeColors.bg\"\n [textColor]=\"badgeColors.text\"\n size=\"xs\"\n />\n </div>\n\n @if (discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">C\u00F3digo</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.code }}</p>\n </div>\n }\n\n @if (discountInfo.name && discountInfo.name !== discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Nombre</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.name }}</p>\n </div>\n }\n\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Valor del descuento</p>\n <p class=\"order-discount-applied__content-item-value\">\n ${{ discountInfo.value | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n </div>\n </div>\n}\n", styles: [".order-discount-applied{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-discount-applied__content{display:flex;flex-flow:row wrap;gap:1rem;padding:1rem}.order-discount-applied__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;flex:1 1 calc(50% - 1rem);position:relative}@media(min-width:768px){.order-discount-applied__content-item{flex:1 1 0}}.order-discount-applied__content-item.discount-icon{flex:0 0 auto;justify-content:center;width:auto}@media(min-width:768px){.order-discount-applied__content-item.discount-icon{flex:0 0 auto}}.order-discount-applied__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-discount-applied__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-discount-applied__content-item-icon-wrapper{align-items:center;border-radius:.375rem;border:1px solid #e5e7eb;display:flex;height:2.5rem;justify-content:center;width:2.5rem}.order-discount-applied__content-item-icon-wrapper i{font-size:1.25rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "pipe", type: i2.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i2$1.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None });
8380
+ }
8381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderDiscountAppliedComponent, decorators: [{
8382
+ type: Component,
8383
+ args: [{ selector: 'order-discount-applied', standalone: true, imports: [CommonModule, TranslocoModule, AppBadgeComponent], encapsulation: ViewEncapsulation.None, template: "@if (hasDiscount) {\n <div class=\"order-discount-applied\">\n <div class=\"order-discount-applied__content\">\n <div class=\"order-discount-applied__content-item discount-icon\">\n <div class=\"order-discount-applied__content-item-icon-wrapper\">\n <i class=\"order-discount-applied__content-item-icon\" [class]=\"discountInfo.icon\"></i>\n </div>\n </div>\n\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Tipo de descuento</p>\n <app-badge\n [text]=\"'order.discountTypes.' + discountInfo.type | transloco\"\n [backgroundColor]=\"badgeColors.bg\"\n [textColor]=\"badgeColors.text\"\n size=\"xs\"\n />\n </div>\n\n @if (discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">C\u00F3digo</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.code }}</p>\n </div>\n }\n\n @if (discountInfo.name && discountInfo.name !== discountInfo.code) {\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Nombre</p>\n <p class=\"order-discount-applied__content-item-value\">{{ discountInfo.name }}</p>\n </div>\n }\n\n <div class=\"order-discount-applied__content-item\">\n <p class=\"order-discount-applied__content-item-title\">Valor del descuento</p>\n <p class=\"order-discount-applied__content-item-value\">\n ${{ discountInfo.value | currency: 'COP' : '' : '1.0-2' }}\n </p>\n </div>\n </div>\n </div>\n}\n", styles: [".order-discount-applied{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-discount-applied__content{display:flex;flex-flow:row wrap;gap:1rem;padding:1rem}.order-discount-applied__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;flex:1 1 calc(50% - 1rem);position:relative}@media(min-width:768px){.order-discount-applied__content-item{flex:1 1 0}}.order-discount-applied__content-item.discount-icon{flex:0 0 auto;justify-content:center;width:auto}@media(min-width:768px){.order-discount-applied__content-item.discount-icon{flex:0 0 auto}}.order-discount-applied__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-discount-applied__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}.order-discount-applied__content-item-icon-wrapper{align-items:center;border-radius:.375rem;border:1px solid #e5e7eb;display:flex;height:2.5rem;justify-content:center;width:2.5rem}.order-discount-applied__content-item-icon-wrapper i{font-size:1.25rem}\n"] }]
8384
+ }], propDecorators: { order: [{
8385
+ type: Input,
8386
+ args: [{ required: true }]
8387
+ }] } });
8388
+
8389
+ class OrderBillingInfoComponent {
8390
+ order;
8391
+ get fields() {
8392
+ if (!this.order)
8393
+ return [];
8394
+ const billing = this.order.billing_info;
8395
+ const customer = this.order.customer;
8396
+ const hasBilling = billing && !!(billing.first_name || billing.document_type || billing.email);
8397
+ if (hasBilling) {
8398
+ const result = [];
8399
+ const fullName = `${billing.first_name || ''} ${billing.last_name || ''}`.trim();
8400
+ if (fullName)
8401
+ result.push({ label: 'Nombre / Razón social', value: fullName });
8402
+ if (billing.document_type)
8403
+ result.push({ label: 'Tipo de documento', value: billing.document_type });
8404
+ if (billing.document_number)
8405
+ result.push({ label: 'Número de documento', value: billing.document_number });
8406
+ if (billing.address)
8407
+ result.push({ label: 'Dirección', value: billing.address });
8408
+ if (billing.email)
8409
+ result.push({ label: 'Correo electrónico', value: billing.email });
8410
+ if (billing.mobile)
8411
+ result.push({ label: 'Teléfono', value: billing.mobile });
8412
+ if (billing.city_id)
8413
+ result.push({ label: 'Ciudad', value: billing.city_id });
8414
+ if (billing.postal_code)
8415
+ result.push({ label: 'Código postal', value: billing.postal_code });
8416
+ if (billing.address_notes)
8417
+ result.push({ label: 'Notas de dirección', value: billing.address_notes });
8418
+ return result;
8419
+ }
8420
+ const fields = [];
8421
+ const fullName = customer ? getCustomerFullname(customer) : this.order.customer_name || null;
8422
+ if (fullName)
8423
+ fields.push({ label: 'Nombre', value: fullName });
8424
+ if (customer?.document_type)
8425
+ fields.push({ label: 'Tipo de documento', value: customer.document_type });
8426
+ if (customer?.document_number)
8427
+ fields.push({ label: 'Número de documento', value: customer.document_number });
8428
+ if (customer?.address)
8429
+ fields.push({ label: 'Dirección', value: customer.address });
8430
+ const email = customer?.email || this.order.customer_email || null;
8431
+ if (email)
8432
+ fields.push({ label: 'Correo electrónico', value: email });
8433
+ const phone = customer?.phone || customer?.mobile || null;
8434
+ if (phone)
8435
+ fields.push({ label: 'Teléfono', value: phone });
8436
+ return fields;
8437
+ }
8438
+ get hasFields() {
8439
+ return this.fields.length > 0;
8440
+ }
8441
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderBillingInfoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8442
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderBillingInfoComponent, isStandalone: true, selector: "order-billing-info", inputs: { order: "order" }, ngImport: i0, template: "@if (hasFields) {\n <div class=\"order-billing-info\">\n <div class=\"order-billing-info__header\">\n <p class=\"order-billing-info__header-title\">Informaci\u00F3n de facturaci\u00F3n</p>\n </div>\n <div class=\"order-billing-info__content\">\n @for (field of fields; track field.label) {\n <div class=\"order-billing-info__content-item\">\n <p class=\"order-billing-info__content-item-title\">{{ field.label }}</p>\n <p class=\"order-billing-info__content-item-value\">{{ field.value }}</p>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-billing-info{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-billing-info__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;padding:1rem;width:100%}.order-billing-info__header-title{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-billing-info__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-billing-info__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-billing-info__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-billing-info__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-billing-info__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None });
8443
+ }
8444
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderBillingInfoComponent, decorators: [{
8445
+ type: Component,
8446
+ args: [{ selector: 'order-billing-info', standalone: true, imports: [CommonModule], encapsulation: ViewEncapsulation.None, template: "@if (hasFields) {\n <div class=\"order-billing-info\">\n <div class=\"order-billing-info__header\">\n <p class=\"order-billing-info__header-title\">Informaci\u00F3n de facturaci\u00F3n</p>\n </div>\n <div class=\"order-billing-info__content\">\n @for (field of fields; track field.label) {\n <div class=\"order-billing-info__content-item\">\n <p class=\"order-billing-info__content-item-title\">{{ field.label }}</p>\n <p class=\"order-billing-info__content-item-value\">{{ field.value }}</p>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".order-billing-info{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-billing-info__header{align-items:center;border-bottom:1px solid #f3f4f6;display:flex;padding:1rem;width:100%}.order-billing-info__header-title{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-billing-info__content{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;padding:1rem}@media(min-width:768px){.order-billing-info__content{grid-template-columns:repeat(3,minmax(0,1fr))}}.order-billing-info__content-item{align-items:flex-start;display:flex;flex-flow:column nowrap;position:relative;width:100%}.order-billing-info__content-item-title{color:#9ca3af;font-size:.75rem;margin:0;text-transform:uppercase}.order-billing-info__content-item-value{color:#111827;font-weight:500;font-size:.875rem;margin:0}\n"] }]
8447
+ }], propDecorators: { order: [{
8448
+ type: Input,
8449
+ args: [{ required: true }]
8450
+ }] } });
8451
+
8452
+ class OrderTransactionDetailsModalComponent {
8453
+ modalService = inject(OrderTransactionDetailsModalService);
8454
+ isOpen = null;
8455
+ transaction = null;
8456
+ get modalIsOpen() {
8457
+ return this.isOpen ?? this.modalService.isOpen;
8458
+ }
8459
+ get selectedTransaction() {
8460
+ return this.transaction ? signal(this.transaction) : this.modalService.transaction;
8461
+ }
8462
+ get txColors() {
8463
+ return TRANSACTION_STATUS_COLORS;
8464
+ }
8465
+ get gatewayResponse() {
8466
+ const response = this.selectedTransaction()?.gateway_response;
8467
+ if (response == null)
8468
+ return '';
8469
+ return typeof response === 'string' ? response : JSON.stringify(response, null, 2);
8470
+ }
8471
+ onClose() {
8472
+ if (this.isOpen) {
8473
+ this.isOpen.set(false);
8474
+ return;
8475
+ }
8476
+ this.modalService.close();
8477
+ }
8478
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderTransactionDetailsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
8479
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderTransactionDetailsModalComponent, isStandalone: true, selector: "order-transaction-details-modal", inputs: { isOpen: "isOpen", transaction: "transaction" }, ngImport: i0, template: "<app-modal\n [isOpen]=\"modalIsOpen\"\n (closeModal)=\"onClose()\"\n [title]=\"'order.transactionDetails.title' | transloco\"\n size=\"lg\"\n>\n @if (selectedTransaction(); as tx) {\n <div class=\"order-transaction-details\">\n <div class=\"order-transaction-details__grid\">\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.id' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">{{ tx.id }}</span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.paymentMethod' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">\n {{ 'order.paymentMethods.' + tx.payment_gateway | transloco }}\n </span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.status' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">\n <app-badge\n [text]=\"'order.transactionStatus.' + tx.status | transloco\"\n [backgroundColor]=\"txColors[tx.status].bg\"\n [textColor]=\"txColors[tx.status].text\"\n size=\"xs\"\n />\n </span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.amount' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">\n ${{ tx.amount | number: '1.0-2' }} {{ tx.currency }}\n </span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.currency' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">{{ tx.currency }}</span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.gatewayId' | transloco }}\n </span>\n <span class=\"order-transaction-details__value gateway-id\">\n {{ tx.gateway_transaction_id }}\n </span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.createdAt' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">{{ tx.created_at | date: 'medium' }}</span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.updatedAt' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">{{ tx.updated_at | date: 'medium' }}</span>\n </div>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.gatewayResponse' | transloco }}\n </span>\n @if (gatewayResponse) {\n <pre class=\"order-transaction-details__json\">{{ gatewayResponse }}</pre>\n } @else {\n <span class=\"order-transaction-details__value\">\u2014</span>\n }\n </div>\n </div>\n }\n</app-modal>\n", styles: [".order-transaction-details{display:flex;flex-direction:column;gap:1.5rem}.order-transaction-details__grid{display:grid;gap:1rem 1.5rem;grid-template-columns:repeat(2,minmax(0,1fr))}.order-transaction-details__item{display:flex;flex-direction:column;gap:.25rem}.order-transaction-details__label{color:#6b7280;font-size:.75rem;font-weight:700;text-transform:uppercase}.order-transaction-details__value{color:#374151;font-size:.875rem}@media(prefers-color-scheme:dark){.order-transaction-details__value{color:#d1d5db}}.order-transaction-details__json{background-color:#f9fafb;border:1px solid #f3f4f6;border-radius:.375rem;color:#374151;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;line-height:1.625;margin:0;max-height:20rem;overflow:auto;padding:.75rem 1rem;white-space:pre-wrap;word-break:break-word}@media(prefers-color-scheme:dark){.order-transaction-details__json{background-color:#111827}}@media(prefers-color-scheme:dark){.order-transaction-details__json{border-color:#374151}}@media(prefers-color-scheme:dark){.order-transaction-details__json{color:#d1d5db}}.order-transaction-details .gateway-id{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: AppModalComponent, selector: "app-modal", inputs: ["title", "disableClose", "showHeader", "showCloseButton", "showTitle", "isOpen", "size"], outputs: ["closeModal"] }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "pipe", type: i2$1.TranslocoPipe, name: "transloco" }] });
8480
+ }
8481
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderTransactionDetailsModalComponent, decorators: [{
8482
+ type: Component,
8483
+ args: [{ selector: 'order-transaction-details-modal', standalone: true, imports: [CommonModule, TranslocoModule, AppModalComponent, AppBadgeComponent], template: "<app-modal\n [isOpen]=\"modalIsOpen\"\n (closeModal)=\"onClose()\"\n [title]=\"'order.transactionDetails.title' | transloco\"\n size=\"lg\"\n>\n @if (selectedTransaction(); as tx) {\n <div class=\"order-transaction-details\">\n <div class=\"order-transaction-details__grid\">\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.id' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">{{ tx.id }}</span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.paymentMethod' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">\n {{ 'order.paymentMethods.' + tx.payment_gateway | transloco }}\n </span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.status' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">\n <app-badge\n [text]=\"'order.transactionStatus.' + tx.status | transloco\"\n [backgroundColor]=\"txColors[tx.status].bg\"\n [textColor]=\"txColors[tx.status].text\"\n size=\"xs\"\n />\n </span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.amount' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">\n ${{ tx.amount | number: '1.0-2' }} {{ tx.currency }}\n </span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.currency' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">{{ tx.currency }}</span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.gatewayId' | transloco }}\n </span>\n <span class=\"order-transaction-details__value gateway-id\">\n {{ tx.gateway_transaction_id }}\n </span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.createdAt' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">{{ tx.created_at | date: 'medium' }}</span>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.updatedAt' | transloco }}\n </span>\n <span class=\"order-transaction-details__value\">{{ tx.updated_at | date: 'medium' }}</span>\n </div>\n </div>\n\n <div class=\"order-transaction-details__item\">\n <span class=\"order-transaction-details__label\">\n {{ 'order.transactionDetails.labels.gatewayResponse' | transloco }}\n </span>\n @if (gatewayResponse) {\n <pre class=\"order-transaction-details__json\">{{ gatewayResponse }}</pre>\n } @else {\n <span class=\"order-transaction-details__value\">\u2014</span>\n }\n </div>\n </div>\n }\n</app-modal>\n", styles: [".order-transaction-details{display:flex;flex-direction:column;gap:1.5rem}.order-transaction-details__grid{display:grid;gap:1rem 1.5rem;grid-template-columns:repeat(2,minmax(0,1fr))}.order-transaction-details__item{display:flex;flex-direction:column;gap:.25rem}.order-transaction-details__label{color:#6b7280;font-size:.75rem;font-weight:700;text-transform:uppercase}.order-transaction-details__value{color:#374151;font-size:.875rem}@media(prefers-color-scheme:dark){.order-transaction-details__value{color:#d1d5db}}.order-transaction-details__json{background-color:#f9fafb;border:1px solid #f3f4f6;border-radius:.375rem;color:#374151;font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem;line-height:1.625;margin:0;max-height:20rem;overflow:auto;padding:.75rem 1rem;white-space:pre-wrap;word-break:break-word}@media(prefers-color-scheme:dark){.order-transaction-details__json{background-color:#111827}}@media(prefers-color-scheme:dark){.order-transaction-details__json{border-color:#374151}}@media(prefers-color-scheme:dark){.order-transaction-details__json{color:#d1d5db}}.order-transaction-details .gateway-id{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem}\n"] }]
8484
+ }], propDecorators: { isOpen: [{
8485
+ type: Input
8486
+ }], transaction: [{
8487
+ type: Input
8488
+ }] } });
8489
+
8490
+ class OrderTransactionsComponent {
8491
+ transactionDetailsModalService;
8492
+ order;
8493
+ constructor(transactionDetailsModalService) {
8494
+ this.transactionDetailsModalService = transactionDetailsModalService;
8495
+ }
8496
+ get transactions() {
8497
+ return this.order.transactions ?? [];
8498
+ }
8499
+ get hasTransactions() {
8500
+ return this.transactions.length > 0;
8501
+ }
8502
+ get txColors() {
8503
+ return TRANSACTION_STATUS_COLORS;
8504
+ }
8505
+ openTransaction(transaction) {
8506
+ this.transactionDetailsModalService.open(transaction);
8507
+ }
8508
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderTransactionsComponent, deps: [{ token: OrderTransactionDetailsModalService }], target: i0.ɵɵFactoryTarget.Component });
8509
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderTransactionsComponent, isStandalone: true, selector: "order-transactions", inputs: { order: "order" }, ngImport: i0, template: "@if (hasTransactions) {\n <div class=\"order-transactions\">\n <div class=\"order-transactions__header\">\n <p class=\"order-transactions__header-title\">\n Transacciones ({{ transactions.length | number: '1.0' }})\n </p>\n </div>\n <div class=\"order-transactions__table-container\">\n <table class=\"order-transactions__table\">\n <thead class=\"order-transactions__table-head\">\n <tr class=\"order-transactions__table-head-row\">\n <th class=\"order-transactions__table-head-cell\">Medio de pago</th>\n <th class=\"order-transactions__table-head-cell\">Estado</th>\n <th class=\"order-transactions__table-head-cell text-right\">Valor</th>\n <th class=\"order-transactions__table-head-cell\">ID transacci\u00F3n</th>\n <th class=\"order-transactions__table-head-cell text-right\">Acciones</th>\n </tr>\n </thead>\n <tbody class=\"order-transactions__table-body\">\n @for (tx of transactions; track tx.id) {\n <tr class=\"order-transactions__table-body-row\">\n <td class=\"order-transactions__table-body-cell\">\n {{ 'order.paymentMethods.' + tx.payment_gateway | transloco }}\n </td>\n <td class=\"order-transactions__table-body-cell\">\n <app-badge\n [text]=\"'order.transactionStatus.' + tx.status | transloco\"\n [backgroundColor]=\"txColors[tx.status].bg\"\n [textColor]=\"txColors[tx.status].text\"\n size=\"xs\"\n />\n </td>\n <td class=\"order-transactions__table-body-cell text-right\">\n ${{ tx.amount | number: '1.0-2' }}\n </td>\n <td class=\"order-transactions__table-body-cell\">\n {{ tx.gateway_transaction_id }}\n </td>\n <td class=\"order-transactions__table-body-cell text-right\">\n <app-button\n icon=\"ri-eye-line\"\n variant=\"tertiary\"\n size=\"xs\"\n (clicked)=\"openTransaction(tx)\"\n [title]=\"'order.transactionDetails.actions.view' | transloco\"\n />\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n\n <order-transaction-details-modal />\n}\n", styles: [".order-transactions{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-transactions__header{align-items:center;display:flex;padding:1rem;width:100%}.order-transactions__header-title{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-transactions__table-container{overflow-x:auto}.order-transactions__table{border-collapse:collapse;font-size:.875rem;width:100%}.order-transactions__table-head-row{background-color:#f9fafb;text-align:left}.order-transactions__table-head-cell{color:#6b7280;font-size:.75rem;font-weight:700;padding:.75rem 1.5rem;text-transform:uppercase}.order-transactions__table-head-cell.text-right{text-align:right}.order-transactions__table-body>:not(:last-child){border-bottom:1px solid #f9fafb}.order-transactions__table-body-row{transition:all .4s ease}.order-transactions__table-body-row:hover{background-color:#f9fafb}.order-transactions__table-body-cell{color:#374151;padding:.75rem 1.5rem;white-space:nowrap}.order-transactions__table-body-cell.text-right{text-align:right}.order-transactions__table-body-cell .gateway-id{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: TranslocoModule }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["disabled", "loading", "type", "variant", "text", "size", "loadingText", "icon"], outputs: ["clicked"] }, { kind: "component", type: OrderTransactionDetailsModalComponent, selector: "order-transaction-details-modal", inputs: ["isOpen", "transaction"] }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }, { kind: "pipe", type: i2$1.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None });
8510
+ }
8511
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderTransactionsComponent, decorators: [{
8512
+ type: Component,
8513
+ args: [{ selector: 'order-transactions', standalone: true, imports: [
8514
+ CommonModule,
8515
+ TranslocoModule,
8516
+ AppBadgeComponent,
8517
+ AppButtonComponent,
8518
+ OrderTransactionDetailsModalComponent,
8519
+ ], encapsulation: ViewEncapsulation.None, template: "@if (hasTransactions) {\n <div class=\"order-transactions\">\n <div class=\"order-transactions__header\">\n <p class=\"order-transactions__header-title\">\n Transacciones ({{ transactions.length | number: '1.0' }})\n </p>\n </div>\n <div class=\"order-transactions__table-container\">\n <table class=\"order-transactions__table\">\n <thead class=\"order-transactions__table-head\">\n <tr class=\"order-transactions__table-head-row\">\n <th class=\"order-transactions__table-head-cell\">Medio de pago</th>\n <th class=\"order-transactions__table-head-cell\">Estado</th>\n <th class=\"order-transactions__table-head-cell text-right\">Valor</th>\n <th class=\"order-transactions__table-head-cell\">ID transacci\u00F3n</th>\n <th class=\"order-transactions__table-head-cell text-right\">Acciones</th>\n </tr>\n </thead>\n <tbody class=\"order-transactions__table-body\">\n @for (tx of transactions; track tx.id) {\n <tr class=\"order-transactions__table-body-row\">\n <td class=\"order-transactions__table-body-cell\">\n {{ 'order.paymentMethods.' + tx.payment_gateway | transloco }}\n </td>\n <td class=\"order-transactions__table-body-cell\">\n <app-badge\n [text]=\"'order.transactionStatus.' + tx.status | transloco\"\n [backgroundColor]=\"txColors[tx.status].bg\"\n [textColor]=\"txColors[tx.status].text\"\n size=\"xs\"\n />\n </td>\n <td class=\"order-transactions__table-body-cell text-right\">\n ${{ tx.amount | number: '1.0-2' }}\n </td>\n <td class=\"order-transactions__table-body-cell\">\n {{ tx.gateway_transaction_id }}\n </td>\n <td class=\"order-transactions__table-body-cell text-right\">\n <app-button\n icon=\"ri-eye-line\"\n variant=\"tertiary\"\n size=\"xs\"\n (clicked)=\"openTransaction(tx)\"\n [title]=\"'order.transactionDetails.actions.view' | transloco\"\n />\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n </div>\n\n <order-transaction-details-modal />\n}\n", styles: [".order-transactions{background-color:#fff;border-radius:.5rem;border:1px solid #f3f4f6;box-sizing:border-box;overflow:hidden;position:relative;width:100%}.order-transactions__header{align-items:center;display:flex;padding:1rem;width:100%}.order-transactions__header-title{color:#6b7280;font-size:.875rem;font-weight:700;margin:0}.order-transactions__table-container{overflow-x:auto}.order-transactions__table{border-collapse:collapse;font-size:.875rem;width:100%}.order-transactions__table-head-row{background-color:#f9fafb;text-align:left}.order-transactions__table-head-cell{color:#6b7280;font-size:.75rem;font-weight:700;padding:.75rem 1.5rem;text-transform:uppercase}.order-transactions__table-head-cell.text-right{text-align:right}.order-transactions__table-body>:not(:last-child){border-bottom:1px solid #f9fafb}.order-transactions__table-body-row{transition:all .4s ease}.order-transactions__table-body-row:hover{background-color:#f9fafb}.order-transactions__table-body-cell{color:#374151;padding:.75rem 1.5rem;white-space:nowrap}.order-transactions__table-body-cell.text-right{text-align:right}.order-transactions__table-body-cell .gateway-id{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;font-size:.75rem}\n"] }]
8520
+ }], ctorParameters: () => [{ type: OrderTransactionDetailsModalService }], propDecorators: { order: [{
8521
+ type: Input,
8522
+ args: [{ required: true }]
8523
+ }] } });
8524
+
8216
8525
  // Config
8217
8526
 
8218
8527
  /**
8219
8528
  * Generated bundle index. Do not edit.
8220
8529
  */
8221
8530
 
8222
- export { ADMIN_API_ROUTES, ALERT_ICONS, AdminSelectComponent, AdminService, ApiService, AppAlertComponent, AppBadgeComponent, AppButtonComponent, AppLinkButtonComponent, AppModalComponent, AsyncSelectComponent, AuditInformationComponent, BASE_BUTTON_CLASSES, BASE_INPUT_CLASSES, BUTTON_SIZES_CLASSES, BUTTON_VARIANT_CLASSES, BaseModalService, CITY_API_ENDPOINTS, COUNTRY_API_ENDPOINTS, CUSTOMERS_API_ROUTES, ChangePasswordFormComponent, ChangePasswordFormService, CitiesService, CitySelectComponent, ColorPickerComponent, ConfirmationOrderModalComponent, ConfirmationOrderModalService, CorporateBondStatus, CountrySelectComponent, CountryService, CouponApplicability, CouponDiscountType, CouponStatus, CreatorType, CustomerSelectComponent, CustomerService, DEFAULT_STAGE_CONFIG, DOCUMENT_TYPES_OPTIONS, DateInputComponent, DateService, DaySelectorGridComponent, DeleteConfirmationComponent, DeleteConfirmationService, DynamicTableComponent, ERROR_INPUT_CLASSES, EndDateGreaterThanStartValidator, FORM_ERROR_MESSAGES, FeedbackModalComponent, FeedbackModalService, FileType, FileUploadComponent, FileUploadPreviewComponent, FormEditorComponent, FormInputComponent, FormSelectComponent, FormTextareaComponent, GiftBondPurchaseStatus, GiftBondStatus, KONVA_SHAPE_MAPPINGS, LanguageSwitcherComponent, MinTodayValidator, MustMatchValidator, ORDER_ITEM_TYPES_COLORS, ORDER_STATUS_COLORS, OrderInformationComponent, OrderItemType, OrderItemTypeBadgeComponent, OrderItemsComponent, OrderStatus, OrderStatusBadgeComponent, PAYMENT_METHODS_OPTIONS, PERFORMANCES_API_ROUTES, PRICE_ZONES_API_ROUTES, PRODUCTS_API_ROUTES, PRODUCT_CATEGORIES_API_ROUTES, PRODUCT_TAGS_API_ROUTES, PRODUCT_TYPES_API_ROUTES, PaymentMethod, PerformanceBookingDataService, PerformanceCardComponent, PerformanceCardListComponent, PerformanceMultiSelectComponent, PerformanceSelectComponent, PerformanceService, PerformanceStatus, PerformanceStepperComponent, PerformanceTicketMapComponent, PerformanceTicketStatus, PerformancesListEventsService, PriceZoneEventService, PriceZoneFormModalService, PriceZoneSelectComponent, PriceZoneService, ProductCategoryService, ProductMultiSelectComponent, ProductSelectComponent, ProductService, ProductTagService, ProductTypeService, RoomMapElementOrientation, RoomMapElementType, SHOWS_API_ROUTES, SHOW_TYPE_COLORS, STATE_API_ENDPOINTS, SeatSelectionEmptySummaryComponent, SeatSelectionSummaryComponent, SeatSelectionSummaryItemComponent, SelectedDiscountCardType, ShowCardComponent, ShowCardSkeletonComponent, ShowMultiSelectComponent, ShowSelectComponent, ShowService, ShowType, ShowsFilterComponent, StateSelectComponent, StatesService, TICKERA_COMPONENTS_CONFIG, TICKET_ELEMENT_TYPES, TICKET_MAP_GRID_SIZE, TICKET_MAP_LAST_TICKETS_LIMIT, TICKET_MAP_TITLE_HEIGHT, TICKET_STATUS_COLORS, TICKET_STATUS_FILLS, TICKET_STATUS_LABELS, TIcketMapProductSelectionComponent, TickeraTranslocoLoader, TicketMapPriceZonesComponent, TicketMapProductSelectionItemComponent, TicketMapTotalsComponent, TicketMapWidgetComponent, TicketMapWidgetHeaderComponent, TicketMapWrapperComponent, TicketMapZoomControlsComponent, TicketMapZoomService, TicketQrComponent, TicketQrModalComponent, TicketQrModalService, TicketQrService, TicketSelectionDetailsService, TicketSelectionDiscountService, TicketSelectionService, TicketSelectionTotalsService, ToastService, ToggleSwitchComponent, TransactionStatus, VENUES_API_ROUTES, ZonePriceItemComponent, ZonePriceListComponent, authInterceptor, drawChairIcon$1 as drawChairIcon, drawHappyFace, drawRoundedRect, drawWheelchairIcon, findElementAtPosition, findTicketAtPosition, formatCitiesResponseToSelect, generateExitScene, generateHallwayScene, generateProductionAreaScene, generateSeatBlockScene, generateSeatBlockTicketScene, generateStageScene, generateStairScene, generateTableScene, generateTableTicketScene, generateUnavailableSpaceScene, generateZoneScene, getBrowserLanguage, getCustomerFullname, getItemTypeIcon, getStoredLanguage, numberToLetter$1 as numberToLetter, parseJsonToFormDataAdvanced, processElementsToRenderData, provideTickeraComponents, resolveLanguage, setStoredLanguage, tintColor, transformImageToFile };
8531
+ export { ADMIN_API_ROUTES, ALERT_ICONS, AdminSelectComponent, AdminService, ApiService, AppAlertComponent, AppBadgeComponent, AppButtonComponent, AppLinkButtonComponent, AppModalComponent, AsyncSelectComponent, AuditInformationComponent, BASE_BUTTON_CLASSES, BASE_INPUT_CLASSES, BUTTON_SIZES_CLASSES, BUTTON_VARIANT_CLASSES, BaseModalService, CITY_API_ENDPOINTS, COUNTRY_API_ENDPOINTS, CUSTOMERS_API_ROUTES, ChangePasswordFormComponent, ChangePasswordFormService, CitiesService, CitySelectComponent, ColorPickerComponent, ConfirmationOrderModalComponent, ConfirmationOrderModalService, CorporateBondStatus, CountrySelectComponent, CountryService, CouponApplicability, CouponDiscountType, CouponStatus, CreatorType, CustomerSelectComponent, CustomerService, DEFAULT_STAGE_CONFIG, DOCUMENT_TYPES_OPTIONS, DateInputComponent, DateService, DaySelectorGridComponent, DeleteConfirmationComponent, DeleteConfirmationService, DynamicTableComponent, ERROR_INPUT_CLASSES, EndDateGreaterThanStartValidator, FORM_ERROR_MESSAGES, FeedbackModalComponent, FeedbackModalService, FileType, FileUploadComponent, FileUploadPreviewComponent, FormEditorComponent, FormInputComponent, FormSelectComponent, FormTextareaComponent, GiftBondPurchaseStatus, GiftBondStatus, KONVA_SHAPE_MAPPINGS, LanguageSwitcherComponent, MinTodayValidator, MustMatchValidator, ORDER_DISCOUNT_COLORS, ORDER_ITEM_TYPES_COLORS, ORDER_STATUS_COLORS, OrderBillingInfoComponent, OrderDiscountAppliedComponent, OrderInformationComponent, OrderItemType, OrderItemTypeBadgeComponent, OrderItemsComponent, OrderStatus, OrderStatusBadgeComponent, OrderTransactionDetailsModalComponent, OrderTransactionDetailsModalService, OrderTransactionsComponent, PAYMENT_METHODS_OPTIONS, PERFORMANCES_API_ROUTES, PRICE_ZONES_API_ROUTES, PRODUCTS_API_ROUTES, PRODUCT_CATEGORIES_API_ROUTES, PRODUCT_TAGS_API_ROUTES, PRODUCT_TYPES_API_ROUTES, PaymentMethod, PerformanceBookingDataService, PerformanceCardComponent, PerformanceCardListComponent, PerformanceMultiSelectComponent, PerformanceSelectComponent, PerformanceService, PerformanceStatus, PerformanceStepperComponent, PerformanceTicketMapComponent, PerformanceTicketStatus, PerformancesListEventsService, PriceZoneEventService, PriceZoneFormModalService, PriceZoneSelectComponent, PriceZoneService, ProductCategoryService, ProductMultiSelectComponent, ProductSelectComponent, ProductService, ProductTagService, ProductTypeService, RoomMapElementOrientation, RoomMapElementType, SHOWS_API_ROUTES, SHOW_TYPE_COLORS, STATE_API_ENDPOINTS, SeatSelectionEmptySummaryComponent, SeatSelectionSummaryComponent, SeatSelectionSummaryItemComponent, SelectedDiscountCardType, ShowCardComponent, ShowCardSkeletonComponent, ShowMultiSelectComponent, ShowSelectComponent, ShowService, ShowType, ShowsFilterComponent, StateSelectComponent, StatesService, TICKERA_COMPONENTS_CONFIG, TICKET_ELEMENT_TYPES, TICKET_MAP_GRID_SIZE, TICKET_MAP_LAST_TICKETS_LIMIT, TICKET_MAP_TITLE_HEIGHT, TICKET_STATUS_COLORS, TICKET_STATUS_FILLS, TICKET_STATUS_LABELS, TIcketMapProductSelectionComponent, TRANSACTION_STATUS_COLORS, TickeraTranslocoLoader, TicketMapPriceZonesComponent, TicketMapProductSelectionItemComponent, TicketMapTotalsComponent, TicketMapWidgetComponent, TicketMapWidgetHeaderComponent, TicketMapWrapperComponent, TicketMapZoomControlsComponent, TicketMapZoomService, TicketQrComponent, TicketQrModalComponent, TicketQrModalService, TicketQrService, TicketSelectionDetailsService, TicketSelectionDiscountService, TicketSelectionService, TicketSelectionTotalsService, ToastService, ToggleSwitchComponent, TransactionStatus, VENUES_API_ROUTES, ZonePriceItemComponent, ZonePriceListComponent, authInterceptor, drawChairIcon$1 as drawChairIcon, drawHappyFace, drawRoundedRect, drawWheelchairIcon, findElementAtPosition, findTicketAtPosition, formatCitiesResponseToSelect, generateExitScene, generateHallwayScene, generateProductionAreaScene, generateSeatBlockScene, generateSeatBlockTicketScene, generateStageScene, generateStairScene, generateTableScene, generateTableTicketScene, generateUnavailableSpaceScene, generateZoneScene, getBrowserLanguage, getCustomerFullname, getItemTypeIcon, getOrderDiscount, getStoredLanguage, numberToLetter$1 as numberToLetter, parseJsonToFormDataAdvanced, processElementsToRenderData, provideTickeraComponents, resolveLanguage, setStoredLanguage, tintColor, transformImageToFile };
8223
8532
  //# sourceMappingURL=tickera-angular-components.mjs.map