tickera-angular-components 0.0.1-dev.200 → 0.0.1-dev.201
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.
|
@@ -10721,13 +10721,18 @@ class ConfirmationOrderModalComponent {
|
|
|
10721
10721
|
return this.selectionDiscountService.subscription();
|
|
10722
10722
|
}
|
|
10723
10723
|
/**
|
|
10724
|
-
*
|
|
10725
|
-
*
|
|
10726
|
-
*
|
|
10724
|
+
* Monto real del descuento en pesos ya calculado (aplica el % si el
|
|
10725
|
+
* cupón/VIP/abono es porcentual, o el valor fijo si no lo es) sobre el
|
|
10726
|
+
* subtotal de boletas. Se usa para TODAS las fuentes de descuento en el
|
|
10727
|
+
* modal: mostrar `coupon.discount_value` crudo era incorrecto para un
|
|
10728
|
+
* cupón porcentual (mostraba "10%" como si fueran "$10").
|
|
10727
10729
|
*/
|
|
10728
|
-
get
|
|
10730
|
+
get discountAmount() {
|
|
10729
10731
|
return this.selectionTotalsService.discountAmount() ?? 0;
|
|
10730
10732
|
}
|
|
10733
|
+
get isPercentageDiscount() {
|
|
10734
|
+
return this.selectionDiscountService.selectedDiscount()?.discountType === 'percentage';
|
|
10735
|
+
}
|
|
10731
10736
|
get rawServiceFee() {
|
|
10732
10737
|
return this.selectionTotalsService.rawServiceFee();
|
|
10733
10738
|
}
|
|
@@ -10743,11 +10748,11 @@ class ConfirmationOrderModalComponent {
|
|
|
10743
10748
|
this.onConfirm && this.onConfirm.emit();
|
|
10744
10749
|
}
|
|
10745
10750
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmationOrderModalComponent, deps: [{ token: ConfirmationOrderModalService }, { token: TicketSelectionDiscountService }, { token: TicketSelectionTotalsService }, { token: TicketSelectionService }, { token: PerformanceBookingDataService }], target: i0.ɵɵFactoryTarget.Component });
|
|
10746
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ConfirmationOrderModalComponent, isStandalone: true, selector: "confirmation-order-modal", inputs: { modalTitle: "modalTitle", confirmButtonText: "confirmButtonText", confirmButtonTextLoading: "confirmButtonTextLoading", loading: "loading" }, outputs: { onConfirm: "onConfirm" }, ngImport: i0, template: "<app-modal\n [title]=\"modalTitle\"\n [isOpen]=\"isOpen\"\n [interactiveClose]=\"false\"\n (closeModal)=\"onClose()\"\n size=\"md\"\n>\n <div class=\"confirmation-modal\">\n <p class=\"confirmation-modal__description\">\n Revise los detalles de la compra antes de confirmar.\n </p>\n\n @if (showTitle) {\n <div class=\"confirmation-modal__event\">\n <p class=\"confirmation-modal__event-title\">{{ showTitle }}</p>\n @if (performanceStartTime) {\n <p class=\"confirmation-modal__event-meta\">\n {{ performanceStartTime | date: 'EEEE d MMMM, yyyy hh:mm a' }}\n </p>\n }\n @if (hallName || venueName) {\n <p class=\"confirmation-modal__event-meta\">\n <i class=\"ri-map-pin-line\"></i>\n {{ hallName }}{{ hallName && venueName ? ' \u00B7 ' : '' }}{{ venueName }}\n </p>\n }\n </div>\n }\n\n @if (ticketItems.length > 0) {\n <div class=\"confirmation-modal__list\">\n @for (ticket of ticketItems; track ticket.id) {\n <p class=\"confirmation-modal__list-item\">\n <span>{{ ticketItemLabel(ticket) }}</span>\n <span>${{ ticketItemPrice(ticket) | number: '1.0' }}</span>\n </p>\n }\n </div>\n }\n\n @if (selectedProducts.length > 0) {\n <div class=\"confirmation-modal__list\">\n @for (entry of selectedProducts; track entry.product.id) {\n <p class=\"confirmation-modal__list-item\">\n <span>{{ entry.product.name }} (x{{ entry.quantity }})</span>\n <span>${{ entry.product.price * entry.quantity | number: '1.0' }}</span>\n </p>\n }\n </div>\n }\n\n <hr class=\"confirmation-modal__divider\" />\n\n <p class=\"confirmation-modal__item\">\n <span>Entradas ({{ selectedCount | number: '1.0-0' }}):</span>\n <span>${{ ticketSubtotal | number: '1.0' }}</span>\n </p>\n\n @if (productCount > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Productos ({{ productCount | number: '1.0-0' }}):</span>\n <span>${{ productSubtotal | number: '1.0' }}</span>\n </p>\n }\n\n @if (rawServiceFee > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Tarifa de servicio:</span>\n @if (isServiceFeeExempt) {\n <span>\n <s>${{ rawServiceFee | number: '1.0' }}</s>\n $0 (exonerada)\n </span>\n } @else {\n <span>${{ rawServiceFee | number: '1.0' }}</span>\n }\n </p>\n }\n\n @if (coupon) {\n <p class=\"confirmation-modal__item\">\n <span>Cup\u00F3n de descuento (solo entradas):</span>\n <span class=\"confirmation-modal__discount\">\n
|
|
10751
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: ConfirmationOrderModalComponent, isStandalone: true, selector: "confirmation-order-modal", inputs: { modalTitle: "modalTitle", confirmButtonText: "confirmButtonText", confirmButtonTextLoading: "confirmButtonTextLoading", loading: "loading" }, outputs: { onConfirm: "onConfirm" }, ngImport: i0, template: "<app-modal\n [title]=\"modalTitle\"\n [isOpen]=\"isOpen\"\n [interactiveClose]=\"false\"\n (closeModal)=\"onClose()\"\n size=\"md\"\n>\n <div class=\"confirmation-modal\">\n <p class=\"confirmation-modal__description\">\n Revise los detalles de la compra antes de confirmar.\n </p>\n\n @if (showTitle) {\n <div class=\"confirmation-modal__event\">\n <p class=\"confirmation-modal__event-title\">{{ showTitle }}</p>\n @if (performanceStartTime) {\n <p class=\"confirmation-modal__event-meta\">\n {{ performanceStartTime | date: 'EEEE d MMMM, yyyy hh:mm a' }}\n </p>\n }\n @if (hallName || venueName) {\n <p class=\"confirmation-modal__event-meta\">\n <i class=\"ri-map-pin-line\"></i>\n {{ hallName }}{{ hallName && venueName ? ' \u00B7 ' : '' }}{{ venueName }}\n </p>\n }\n </div>\n }\n\n @if (ticketItems.length > 0) {\n <div class=\"confirmation-modal__list\">\n @for (ticket of ticketItems; track ticket.id) {\n <p class=\"confirmation-modal__list-item\">\n <span>{{ ticketItemLabel(ticket) }}</span>\n <span>${{ ticketItemPrice(ticket) | number: '1.0' }}</span>\n </p>\n }\n </div>\n }\n\n @if (selectedProducts.length > 0) {\n <div class=\"confirmation-modal__list\">\n @for (entry of selectedProducts; track entry.product.id) {\n <p class=\"confirmation-modal__list-item\">\n <span>{{ entry.product.name }} (x{{ entry.quantity }})</span>\n <span>${{ entry.product.price * entry.quantity | number: '1.0' }}</span>\n </p>\n }\n </div>\n }\n\n <hr class=\"confirmation-modal__divider\" />\n\n <p class=\"confirmation-modal__item\">\n <span>Entradas ({{ selectedCount | number: '1.0-0' }}):</span>\n <span>${{ ticketSubtotal | number: '1.0' }}</span>\n </p>\n\n @if (productCount > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Productos ({{ productCount | number: '1.0-0' }}):</span>\n <span>${{ productSubtotal | number: '1.0' }}</span>\n </p>\n }\n\n @if (rawServiceFee > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Tarifa de servicio:</span>\n @if (isServiceFeeExempt) {\n <span>\n <s>${{ rawServiceFee | number: '1.0' }}</s>\n $0 (exonerada)\n </span>\n } @else {\n <span>${{ rawServiceFee | number: '1.0' }}</span>\n }\n </p>\n }\n\n @if (coupon) {\n <p class=\"confirmation-modal__item\">\n <span>Cup\u00F3n de descuento (solo entradas):</span>\n <span class=\"confirmation-modal__discount\">\n -${{ discountAmount | number: '1.0-2' }}\n @if (isPercentageDiscount) {\n ({{ coupon.discount_value }}%)\n }\n </span>\n </p>\n }\n\n @if (corporateBond) {\n <p class=\"confirmation-modal__item\">\n <span>Bono corporativo (solo entradas):</span>\n <span class=\"confirmation-modal__discount\"> -${{ discountAmount | number: '1.0-2' }} </span>\n </p>\n }\n\n @if (giftBond) {\n <p class=\"confirmation-modal__item\">\n <span>Bono de regalo (solo entradas):</span>\n <span class=\"confirmation-modal__discount\"> -${{ discountAmount | number: '1.0-2' }} </span>\n </p>\n }\n\n @if (vipCard) {\n <p class=\"confirmation-modal__item\">\n <span>Tarjeta VIP (solo entradas):</span>\n <span class=\"confirmation-modal__discount\">\n -${{ discountAmount | number: '1.0-2' }} ({{\n vipCard.category_snapshot.discount_percentage\n }}%)\n </span>\n </p>\n }\n\n @if (subscription) {\n <p class=\"confirmation-modal__item\">\n <span>Abono:</span>\n <span class=\"confirmation-modal__discount\">\n -${{ discountAmount | number: '1.0-2' }} (100%)\n </span>\n </p>\n }\n\n <hr class=\"confirmation-modal__divider\" />\n\n <p class=\"confirmation-modal__totals\">\n <span class=\"confirmation-modal__totals-title\">Total:</span>\n\n @if (totalDiscounted || totalDiscounted === 0) {\n <span class=\"confirmation-modal__totals-discounted\">\n <span class=\"confirmation-modal__discount\">\n ${{ totalValue | currency: 'COP' : 'symbol' : '1.0' }}\n </span>\n <span class=\"confirmation-modal__price\">\n ${{ totalDiscounted | currency: 'COP' : 'symbol' : '1.0' }}\n </span>\n </span>\n } @else {\n <span class=\"confirmation-modal__price\">${{ totalValue | number: '1.0' }}</span>\n }\n </p>\n </div>\n\n <div class=\"confirmation-modal__actions\">\n <app-button\n size=\"sm\"\n variant=\"tertiary\"\n text=\"Cancelar\"\n (click)=\"onClose()\"\n [disabled]=\"loading\"\n />\n\n <app-button\n size=\"sm\"\n variant=\"primary\"\n [text]=\"confirmButtonText\"\n [loadingText]=\"confirmButtonTextLoading\"\n [loading]=\"loading\"\n [disabled]=\"loading\"\n (click)=\"confirmOrder()\"\n />\n </div>\n</app-modal>\n", styles: [".confirmation-modal{display:flex;flex-flow:column nowrap;gap:.5rem;width:100%}.confirmation-modal__description{color:#6b7280;font-size:.875rem;margin-bottom:.5rem}.confirmation-modal__event{background-color:#f9fafb;border-radius:.375rem;margin-bottom:.5rem;padding:.75rem}.confirmation-modal__event-title{color:#1f2937;font-size:.875rem;font-weight:600;margin:0}.confirmation-modal__event-meta{align-items:center;color:#6b7280;display:flex;font-size:.75rem;gap:.25rem;margin:.25rem 0 0}.confirmation-modal__list{display:flex;flex-flow:column nowrap;gap:.25rem;margin-bottom:.5rem;max-height:140px;overflow-y:auto}.confirmation-modal__list-item{align-items:center;color:#4b5563;display:flex;flex-flow:row nowrap;font-size:.75rem;gap:.5rem;justify-content:space-between;margin:0}.confirmation-modal__list-item span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.confirmation-modal__list-item span:last-child{flex-shrink:0}.confirmation-modal__item{align-items:center;color:#9ca3af;display:flex;flex-flow:row wrap;font-size:.75rem;justify-content:space-between;margin:0}.confirmation-modal__discount{text-decoration:line-through}.confirmation-modal__divider{border:none;border-top:1px solid #e5e7eb;width:100%}.confirmation-modal__price{color:#4b5563;font-size:1rem;font-weight:700}.confirmation-modal__totals{align-items:center;display:flex;flex-flow:row;justify-content:space-between;margin:0;width:100%}.confirmation-modal__totals-title{color:#4b5563;font-size:1rem;font-weight:700}.confirmation-modal__totals-discounted{align-items:flex-end;display:flex;flex-flow:column}.confirmation-modal__totals-discounted .confirmation-modal__discount{color:#9ca3af;font-size:.75rem}.confirmation-modal__actions{display:flex;flex-flow:row;gap:.5rem;justify-content:flex-end;padding-top:1rem;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppButtonComponent, selector: "app-button", inputs: ["disabled", "loading", "type", "variant", "text", "size", "loadingText", "icon", "tooltip"], outputs: ["clicked"] }, { kind: "component", type: AppModalComponent, selector: "app-modal", inputs: ["title", "disableClose", "showHeader", "showCloseButton", "showTitle", "interactiveClose", "isOpen", "size"], outputs: ["closeModal"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] });
|
|
10747
10752
|
}
|
|
10748
10753
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmationOrderModalComponent, decorators: [{
|
|
10749
10754
|
type: Component,
|
|
10750
|
-
args: [{ selector: 'confirmation-order-modal', standalone: true, imports: [CommonModule, AppButtonComponent, AppModalComponent], template: "<app-modal\n [title]=\"modalTitle\"\n [isOpen]=\"isOpen\"\n [interactiveClose]=\"false\"\n (closeModal)=\"onClose()\"\n size=\"md\"\n>\n <div class=\"confirmation-modal\">\n <p class=\"confirmation-modal__description\">\n Revise los detalles de la compra antes de confirmar.\n </p>\n\n @if (showTitle) {\n <div class=\"confirmation-modal__event\">\n <p class=\"confirmation-modal__event-title\">{{ showTitle }}</p>\n @if (performanceStartTime) {\n <p class=\"confirmation-modal__event-meta\">\n {{ performanceStartTime | date: 'EEEE d MMMM, yyyy hh:mm a' }}\n </p>\n }\n @if (hallName || venueName) {\n <p class=\"confirmation-modal__event-meta\">\n <i class=\"ri-map-pin-line\"></i>\n {{ hallName }}{{ hallName && venueName ? ' \u00B7 ' : '' }}{{ venueName }}\n </p>\n }\n </div>\n }\n\n @if (ticketItems.length > 0) {\n <div class=\"confirmation-modal__list\">\n @for (ticket of ticketItems; track ticket.id) {\n <p class=\"confirmation-modal__list-item\">\n <span>{{ ticketItemLabel(ticket) }}</span>\n <span>${{ ticketItemPrice(ticket) | number: '1.0' }}</span>\n </p>\n }\n </div>\n }\n\n @if (selectedProducts.length > 0) {\n <div class=\"confirmation-modal__list\">\n @for (entry of selectedProducts; track entry.product.id) {\n <p class=\"confirmation-modal__list-item\">\n <span>{{ entry.product.name }} (x{{ entry.quantity }})</span>\n <span>${{ entry.product.price * entry.quantity | number: '1.0' }}</span>\n </p>\n }\n </div>\n }\n\n <hr class=\"confirmation-modal__divider\" />\n\n <p class=\"confirmation-modal__item\">\n <span>Entradas ({{ selectedCount | number: '1.0-0' }}):</span>\n <span>${{ ticketSubtotal | number: '1.0' }}</span>\n </p>\n\n @if (productCount > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Productos ({{ productCount | number: '1.0-0' }}):</span>\n <span>${{ productSubtotal | number: '1.0' }}</span>\n </p>\n }\n\n @if (rawServiceFee > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Tarifa de servicio:</span>\n @if (isServiceFeeExempt) {\n <span>\n <s>${{ rawServiceFee | number: '1.0' }}</s>\n $0 (exonerada)\n </span>\n } @else {\n <span>${{ rawServiceFee | number: '1.0' }}</span>\n }\n </p>\n }\n\n @if (coupon) {\n <p class=\"confirmation-modal__item\">\n <span>Cup\u00F3n de descuento (solo entradas):</span>\n <span class=\"confirmation-modal__discount\">\n
|
|
10755
|
+
args: [{ selector: 'confirmation-order-modal', standalone: true, imports: [CommonModule, AppButtonComponent, AppModalComponent], template: "<app-modal\n [title]=\"modalTitle\"\n [isOpen]=\"isOpen\"\n [interactiveClose]=\"false\"\n (closeModal)=\"onClose()\"\n size=\"md\"\n>\n <div class=\"confirmation-modal\">\n <p class=\"confirmation-modal__description\">\n Revise los detalles de la compra antes de confirmar.\n </p>\n\n @if (showTitle) {\n <div class=\"confirmation-modal__event\">\n <p class=\"confirmation-modal__event-title\">{{ showTitle }}</p>\n @if (performanceStartTime) {\n <p class=\"confirmation-modal__event-meta\">\n {{ performanceStartTime | date: 'EEEE d MMMM, yyyy hh:mm a' }}\n </p>\n }\n @if (hallName || venueName) {\n <p class=\"confirmation-modal__event-meta\">\n <i class=\"ri-map-pin-line\"></i>\n {{ hallName }}{{ hallName && venueName ? ' \u00B7 ' : '' }}{{ venueName }}\n </p>\n }\n </div>\n }\n\n @if (ticketItems.length > 0) {\n <div class=\"confirmation-modal__list\">\n @for (ticket of ticketItems; track ticket.id) {\n <p class=\"confirmation-modal__list-item\">\n <span>{{ ticketItemLabel(ticket) }}</span>\n <span>${{ ticketItemPrice(ticket) | number: '1.0' }}</span>\n </p>\n }\n </div>\n }\n\n @if (selectedProducts.length > 0) {\n <div class=\"confirmation-modal__list\">\n @for (entry of selectedProducts; track entry.product.id) {\n <p class=\"confirmation-modal__list-item\">\n <span>{{ entry.product.name }} (x{{ entry.quantity }})</span>\n <span>${{ entry.product.price * entry.quantity | number: '1.0' }}</span>\n </p>\n }\n </div>\n }\n\n <hr class=\"confirmation-modal__divider\" />\n\n <p class=\"confirmation-modal__item\">\n <span>Entradas ({{ selectedCount | number: '1.0-0' }}):</span>\n <span>${{ ticketSubtotal | number: '1.0' }}</span>\n </p>\n\n @if (productCount > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Productos ({{ productCount | number: '1.0-0' }}):</span>\n <span>${{ productSubtotal | number: '1.0' }}</span>\n </p>\n }\n\n @if (rawServiceFee > 0) {\n <p class=\"confirmation-modal__item\">\n <span>Tarifa de servicio:</span>\n @if (isServiceFeeExempt) {\n <span>\n <s>${{ rawServiceFee | number: '1.0' }}</s>\n $0 (exonerada)\n </span>\n } @else {\n <span>${{ rawServiceFee | number: '1.0' }}</span>\n }\n </p>\n }\n\n @if (coupon) {\n <p class=\"confirmation-modal__item\">\n <span>Cup\u00F3n de descuento (solo entradas):</span>\n <span class=\"confirmation-modal__discount\">\n -${{ discountAmount | number: '1.0-2' }}\n @if (isPercentageDiscount) {\n ({{ coupon.discount_value }}%)\n }\n </span>\n </p>\n }\n\n @if (corporateBond) {\n <p class=\"confirmation-modal__item\">\n <span>Bono corporativo (solo entradas):</span>\n <span class=\"confirmation-modal__discount\"> -${{ discountAmount | number: '1.0-2' }} </span>\n </p>\n }\n\n @if (giftBond) {\n <p class=\"confirmation-modal__item\">\n <span>Bono de regalo (solo entradas):</span>\n <span class=\"confirmation-modal__discount\"> -${{ discountAmount | number: '1.0-2' }} </span>\n </p>\n }\n\n @if (vipCard) {\n <p class=\"confirmation-modal__item\">\n <span>Tarjeta VIP (solo entradas):</span>\n <span class=\"confirmation-modal__discount\">\n -${{ discountAmount | number: '1.0-2' }} ({{\n vipCard.category_snapshot.discount_percentage\n }}%)\n </span>\n </p>\n }\n\n @if (subscription) {\n <p class=\"confirmation-modal__item\">\n <span>Abono:</span>\n <span class=\"confirmation-modal__discount\">\n -${{ discountAmount | number: '1.0-2' }} (100%)\n </span>\n </p>\n }\n\n <hr class=\"confirmation-modal__divider\" />\n\n <p class=\"confirmation-modal__totals\">\n <span class=\"confirmation-modal__totals-title\">Total:</span>\n\n @if (totalDiscounted || totalDiscounted === 0) {\n <span class=\"confirmation-modal__totals-discounted\">\n <span class=\"confirmation-modal__discount\">\n ${{ totalValue | currency: 'COP' : 'symbol' : '1.0' }}\n </span>\n <span class=\"confirmation-modal__price\">\n ${{ totalDiscounted | currency: 'COP' : 'symbol' : '1.0' }}\n </span>\n </span>\n } @else {\n <span class=\"confirmation-modal__price\">${{ totalValue | number: '1.0' }}</span>\n }\n </p>\n </div>\n\n <div class=\"confirmation-modal__actions\">\n <app-button\n size=\"sm\"\n variant=\"tertiary\"\n text=\"Cancelar\"\n (click)=\"onClose()\"\n [disabled]=\"loading\"\n />\n\n <app-button\n size=\"sm\"\n variant=\"primary\"\n [text]=\"confirmButtonText\"\n [loadingText]=\"confirmButtonTextLoading\"\n [loading]=\"loading\"\n [disabled]=\"loading\"\n (click)=\"confirmOrder()\"\n />\n </div>\n</app-modal>\n", styles: [".confirmation-modal{display:flex;flex-flow:column nowrap;gap:.5rem;width:100%}.confirmation-modal__description{color:#6b7280;font-size:.875rem;margin-bottom:.5rem}.confirmation-modal__event{background-color:#f9fafb;border-radius:.375rem;margin-bottom:.5rem;padding:.75rem}.confirmation-modal__event-title{color:#1f2937;font-size:.875rem;font-weight:600;margin:0}.confirmation-modal__event-meta{align-items:center;color:#6b7280;display:flex;font-size:.75rem;gap:.25rem;margin:.25rem 0 0}.confirmation-modal__list{display:flex;flex-flow:column nowrap;gap:.25rem;margin-bottom:.5rem;max-height:140px;overflow-y:auto}.confirmation-modal__list-item{align-items:center;color:#4b5563;display:flex;flex-flow:row nowrap;font-size:.75rem;gap:.5rem;justify-content:space-between;margin:0}.confirmation-modal__list-item span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.confirmation-modal__list-item span:last-child{flex-shrink:0}.confirmation-modal__item{align-items:center;color:#9ca3af;display:flex;flex-flow:row wrap;font-size:.75rem;justify-content:space-between;margin:0}.confirmation-modal__discount{text-decoration:line-through}.confirmation-modal__divider{border:none;border-top:1px solid #e5e7eb;width:100%}.confirmation-modal__price{color:#4b5563;font-size:1rem;font-weight:700}.confirmation-modal__totals{align-items:center;display:flex;flex-flow:row;justify-content:space-between;margin:0;width:100%}.confirmation-modal__totals-title{color:#4b5563;font-size:1rem;font-weight:700}.confirmation-modal__totals-discounted{align-items:flex-end;display:flex;flex-flow:column}.confirmation-modal__totals-discounted .confirmation-modal__discount{color:#9ca3af;font-size:.75rem}.confirmation-modal__actions{display:flex;flex-flow:row;gap:.5rem;justify-content:flex-end;padding-top:1rem;width:100%}\n"] }]
|
|
10751
10756
|
}], ctorParameters: () => [{ type: ConfirmationOrderModalService }, { type: TicketSelectionDiscountService }, { type: TicketSelectionTotalsService }, { type: TicketSelectionService }, { type: PerformanceBookingDataService }], propDecorators: { modalTitle: [{
|
|
10752
10757
|
type: Input
|
|
10753
10758
|
}], confirmButtonText: [{
|
|
@@ -11114,20 +11119,22 @@ class OrderItemsComponent {
|
|
|
11114
11119
|
item.discounted_price !== undefined);
|
|
11115
11120
|
}
|
|
11116
11121
|
get totals() {
|
|
11122
|
+
// itemTotal ya multiplica normal_price x quantity: un producto con
|
|
11123
|
+
// quantity 2 debe sumar 2 unidades, no el precio unitario una sola vez.
|
|
11117
11124
|
const products = this.products?.reduce((accumulator, currentProduct) => {
|
|
11118
|
-
return accumulator + currentProduct?.normal_price;
|
|
11125
|
+
return accumulator + this.itemTotal(currentProduct.quantity, currentProduct?.normal_price);
|
|
11119
11126
|
}, 0);
|
|
11120
11127
|
const tickets = this.tickets?.reduce((accumulator, currentTicket) => {
|
|
11121
|
-
return accumulator + currentTicket?.normal_price;
|
|
11128
|
+
return accumulator + this.itemTotal(currentTicket.quantity, currentTicket?.normal_price);
|
|
11122
11129
|
}, 0);
|
|
11123
11130
|
const giftBonds = this.giftBonds?.reduce((accumulator, currentTicket) => {
|
|
11124
|
-
return accumulator + currentTicket?.normal_price;
|
|
11131
|
+
return accumulator + this.itemTotal(currentTicket.quantity, currentTicket?.normal_price);
|
|
11125
11132
|
}, 0);
|
|
11126
11133
|
const corporateBonds = this.corporateBonds?.reduce((accumulator, currentTicket) => {
|
|
11127
|
-
return accumulator + currentTicket?.normal_price;
|
|
11134
|
+
return accumulator + this.itemTotal(currentTicket.quantity, currentTicket?.normal_price);
|
|
11128
11135
|
}, 0);
|
|
11129
11136
|
const vipRecharges = this.vipRecharges?.reduce((accumulator, currentTicket) => {
|
|
11130
|
-
return accumulator + currentTicket?.normal_price;
|
|
11137
|
+
return accumulator + this.itemTotal(currentTicket.quantity, currentTicket?.normal_price);
|
|
11131
11138
|
}, 0);
|
|
11132
11139
|
return { products, tickets, giftBonds, corporateBonds, vipRecharges };
|
|
11133
11140
|
}
|