tickera-angular-components 0.0.1-dev.200 → 0.0.1-dev.202
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.
|
@@ -549,6 +549,9 @@ const PERFORMANCES_API_ROUTES = {
|
|
|
549
549
|
ticketQrToken: (uuid) => `/performances/tickets/${uuid}/qr-token`,
|
|
550
550
|
getAvailableDays: '/performances/available-days',
|
|
551
551
|
publicAvailablePerformances: '/public/performances/daily',
|
|
552
|
+
pedagogicList: '/performances/pedagogic',
|
|
553
|
+
pedagogicAvailability: (id) => `/performances/${id}/pedagogic-availability`,
|
|
554
|
+
createPedagogicOrder: (id) => `/performances/${id}/pedagogic-orders`,
|
|
552
555
|
seatEventsTicket: (id) => `/performances/${id}/seat-events/ticket`,
|
|
553
556
|
seatEventsTicketAdmin: (id) => `/performances/${id}/seat-events/ticket/admin`,
|
|
554
557
|
seatEvents: (id) => `/performances/${id}/seat-events`,
|
|
@@ -995,6 +998,17 @@ var PerformanceTicketStatus;
|
|
|
995
998
|
PerformanceTicketStatus["BLOCKED"] = "blocked";
|
|
996
999
|
})(PerformanceTicketStatus || (PerformanceTicketStatus = {}));
|
|
997
1000
|
|
|
1001
|
+
/**
|
|
1002
|
+
* How a Performance is exposed for booking/browsing.
|
|
1003
|
+
* Mirrors `PerformanceVisibilityType` in tickera-backend.
|
|
1004
|
+
*/
|
|
1005
|
+
var PerformanceVisibilityType;
|
|
1006
|
+
(function (PerformanceVisibilityType) {
|
|
1007
|
+
PerformanceVisibilityType["PUBLIC"] = "public";
|
|
1008
|
+
PerformanceVisibilityType["PRIVATE"] = "private";
|
|
1009
|
+
PerformanceVisibilityType["PEDAGOGIC"] = "pedagogic";
|
|
1010
|
+
})(PerformanceVisibilityType || (PerformanceVisibilityType = {}));
|
|
1011
|
+
|
|
998
1012
|
var RoomMapElementOrientation;
|
|
999
1013
|
(function (RoomMapElementOrientation) {
|
|
1000
1014
|
RoomMapElementOrientation["TOP"] = "top";
|
|
@@ -3149,6 +3163,23 @@ class PerformanceService {
|
|
|
3149
3163
|
deleteMany(ids) {
|
|
3150
3164
|
return this.apiService.delete(PERFORMANCES_API_ROUTES.deleteMany, { ids });
|
|
3151
3165
|
}
|
|
3166
|
+
/** "Funciones pedagógicas" — see plan-funciones-privadas-pedagogicas.md */
|
|
3167
|
+
fetchPedagogicPerformances(params = {}) {
|
|
3168
|
+
const queryParams = new URLSearchParams();
|
|
3169
|
+
if (params.page)
|
|
3170
|
+
queryParams.append('page', params.page.toString());
|
|
3171
|
+
if (params.limit)
|
|
3172
|
+
queryParams.append('limit', params.limit.toString());
|
|
3173
|
+
const queryString = queryParams.toString();
|
|
3174
|
+
const apiRoute = `${PERFORMANCES_API_ROUTES.pedagogicList}${queryString ? '?' + queryString : ''}`;
|
|
3175
|
+
return this.apiService.get(apiRoute);
|
|
3176
|
+
}
|
|
3177
|
+
fetchPedagogicAvailability(id) {
|
|
3178
|
+
return this.apiService.get(PERFORMANCES_API_ROUTES.pedagogicAvailability(id));
|
|
3179
|
+
}
|
|
3180
|
+
createPedagogicOrder(id, payload) {
|
|
3181
|
+
return this.apiService.post(PERFORMANCES_API_ROUTES.createPedagogicOrder(id), payload);
|
|
3182
|
+
}
|
|
3152
3183
|
updatePublishedBulk(ids, published) {
|
|
3153
3184
|
const apiRoute = PERFORMANCES_API_ROUTES.bulkPublished;
|
|
3154
3185
|
return this.apiService.patch(apiRoute, { ids, published });
|
|
@@ -10721,13 +10752,18 @@ class ConfirmationOrderModalComponent {
|
|
|
10721
10752
|
return this.selectionDiscountService.subscription();
|
|
10722
10753
|
}
|
|
10723
10754
|
/**
|
|
10724
|
-
*
|
|
10725
|
-
*
|
|
10726
|
-
*
|
|
10755
|
+
* Monto real del descuento en pesos ya calculado (aplica el % si el
|
|
10756
|
+
* cupón/VIP/abono es porcentual, o el valor fijo si no lo es) sobre el
|
|
10757
|
+
* subtotal de boletas. Se usa para TODAS las fuentes de descuento en el
|
|
10758
|
+
* modal: mostrar `coupon.discount_value` crudo era incorrecto para un
|
|
10759
|
+
* cupón porcentual (mostraba "10%" como si fueran "$10").
|
|
10727
10760
|
*/
|
|
10728
|
-
get
|
|
10761
|
+
get discountAmount() {
|
|
10729
10762
|
return this.selectionTotalsService.discountAmount() ?? 0;
|
|
10730
10763
|
}
|
|
10764
|
+
get isPercentageDiscount() {
|
|
10765
|
+
return this.selectionDiscountService.selectedDiscount()?.discountType === 'percentage';
|
|
10766
|
+
}
|
|
10731
10767
|
get rawServiceFee() {
|
|
10732
10768
|
return this.selectionTotalsService.rawServiceFee();
|
|
10733
10769
|
}
|
|
@@ -10743,11 +10779,11 @@ class ConfirmationOrderModalComponent {
|
|
|
10743
10779
|
this.onConfirm && this.onConfirm.emit();
|
|
10744
10780
|
}
|
|
10745
10781
|
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
|
|
10782
|
+
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
10783
|
}
|
|
10748
10784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ConfirmationOrderModalComponent, decorators: [{
|
|
10749
10785
|
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
|
|
10786
|
+
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
10787
|
}], ctorParameters: () => [{ type: ConfirmationOrderModalService }, { type: TicketSelectionDiscountService }, { type: TicketSelectionTotalsService }, { type: TicketSelectionService }, { type: PerformanceBookingDataService }], propDecorators: { modalTitle: [{
|
|
10752
10788
|
type: Input
|
|
10753
10789
|
}], confirmButtonText: [{
|
|
@@ -11114,20 +11150,22 @@ class OrderItemsComponent {
|
|
|
11114
11150
|
item.discounted_price !== undefined);
|
|
11115
11151
|
}
|
|
11116
11152
|
get totals() {
|
|
11153
|
+
// itemTotal ya multiplica normal_price x quantity: un producto con
|
|
11154
|
+
// quantity 2 debe sumar 2 unidades, no el precio unitario una sola vez.
|
|
11117
11155
|
const products = this.products?.reduce((accumulator, currentProduct) => {
|
|
11118
|
-
return accumulator + currentProduct?.normal_price;
|
|
11156
|
+
return accumulator + this.itemTotal(currentProduct.quantity, currentProduct?.normal_price);
|
|
11119
11157
|
}, 0);
|
|
11120
11158
|
const tickets = this.tickets?.reduce((accumulator, currentTicket) => {
|
|
11121
|
-
return accumulator + currentTicket?.normal_price;
|
|
11159
|
+
return accumulator + this.itemTotal(currentTicket.quantity, currentTicket?.normal_price);
|
|
11122
11160
|
}, 0);
|
|
11123
11161
|
const giftBonds = this.giftBonds?.reduce((accumulator, currentTicket) => {
|
|
11124
|
-
return accumulator + currentTicket?.normal_price;
|
|
11162
|
+
return accumulator + this.itemTotal(currentTicket.quantity, currentTicket?.normal_price);
|
|
11125
11163
|
}, 0);
|
|
11126
11164
|
const corporateBonds = this.corporateBonds?.reduce((accumulator, currentTicket) => {
|
|
11127
|
-
return accumulator + currentTicket?.normal_price;
|
|
11165
|
+
return accumulator + this.itemTotal(currentTicket.quantity, currentTicket?.normal_price);
|
|
11128
11166
|
}, 0);
|
|
11129
11167
|
const vipRecharges = this.vipRecharges?.reduce((accumulator, currentTicket) => {
|
|
11130
|
-
return accumulator + currentTicket?.normal_price;
|
|
11168
|
+
return accumulator + this.itemTotal(currentTicket.quantity, currentTicket?.normal_price);
|
|
11131
11169
|
}, 0);
|
|
11132
11170
|
return { products, tickets, giftBonds, corporateBonds, vipRecharges };
|
|
11133
11171
|
}
|
|
@@ -11543,5 +11581,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
11543
11581
|
* Generated bundle index. Do not edit.
|
|
11544
11582
|
*/
|
|
11545
11583
|
|
|
11546
|
-
export { ADMIN_API_ROUTES, ADMISSION_API_ROUTES, ALERT_ICONS, AdminLayoutComponent, AdminNavbarComponent, AdminSelectComponent, AdminService, AdmissionQueueService, ApiService, AppAlertComponent, AppBadgeComponent, AppBreadcumbComponent, AppButtonComponent, AppLinkButtonComponent, AppModalComponent, AsyncSelectComponent, AuditInformationComponent, BASE_BUTTON_CLASSES, BASE_INPUT_CLASSES, BUTTON_SIZES_CLASSES, BUTTON_VARIANT_CLASSES, BaseModalService, BrowserZoomLockService, BulkSaveBarComponent, 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, IdentityDocumentInputComponent, KONVA_SHAPE_MAPPINGS, LanguageSwitcherComponent, MembershipStatus, MinTodayValidator, MustMatchValidator, NumberInputComponent, 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, PERFORMANCE_STATUS_COLORS, PERFORMANCE_TICKET_STATUS_COLORS, PHONE_COUNTRIES, PRICE_ZONES_API_ROUTES, PRODUCTS_API_ROUTES, PRODUCT_CATEGORIES_API_ROUTES, PRODUCT_TAGS_API_ROUTES, PRODUCT_TYPES_API_ROUTES, PaymentMethod, PendingChangesService, PerformanceBookingDataService, PerformanceCardComponent, PerformanceCardListComponent, PerformanceMultiSelectComponent, PerformanceSelectComponent, PerformanceService, PerformanceStatus, PerformanceStatusBadgeComponent, PerformanceStepperComponent, PerformanceTicketMapComponent, PerformanceTicketStatus, PerformanceTicketStatusBadgeComponent, PerformancesListEventsService, PhoneInputComponent, PriceZoneEventService, PriceZoneFormModalService, PriceZoneSelectComponent, PriceZoneService, ProductCategoryService, ProductMultiSelectComponent, ProductSelectComponent, ProductService, ProductTagService, ProductTypeService, PublicLayoutComponent, PurchaseLimitService, QuickStatusEditComponent, RoomMapElementOrientation, RoomMapElementType, SHOWS_API_ROUTES, STATE_API_ENDPOINTS, SeatAvailabilitySseService, SeatSelectionEmptySummaryComponent, SeatSelectionSummaryComponent, SeatSelectionSummaryItemComponent, SelectedDiscountCardType, ShowCardComponent, ShowCardSkeletonComponent, ShowMultiSelectComponent, ShowSelectComponent, ShowService, ShowTypeBadgeComponent, ShowsFilterComponent, SidebarMenuComponent, SidebarStateService, StateSelectComponent, StatesService, TICKERA_COMPONENTS_CONFIG, TICKET_ELEMENT_TYPES, TICKET_MAP_FLOOR_HOVER_FADE_MS, TICKET_MAP_FLOOR_HOVER_OPACITY, 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, TextExpandableComponent, TickeraTranslocoLoader, TicketMapFloorSelectorComponent, TicketMapPriceZonesComponent, TicketMapProductSelectionItemComponent, TicketMapTotalsComponent, TicketMapWidgetComponent, TicketMapWidgetHeaderComponent, TicketMapWrapperComponent, TicketMapZoomControlsComponent, TicketMapZoomService, TicketQrComponent, TicketQrModalComponent, TicketQrModalService, TicketQrService, TicketSelectionDetailsService, TicketSelectionDiscountService, TicketSelectionService, TicketSelectionTotalsService, ToastService, ToggleSwitchComponent, TransactionStatus, VENUES_API_ROUTES, VIP_CARDS_API_ROUTES, VipBalanceCardComponent, VipCardService, VipCardStatus, VipCardStatusBadgeComponent, VipRechargeModalComponent, VipTransactionType, VipTransactionsTableComponent, ZonePriceItemComponent, ZonePriceListComponent, authInterceptor, drawChairIcon$1 as drawChairIcon, drawHappyFace, drawRoundedRect, drawWheelchairIcon, emailValidator, findElementAtPosition, findTicketAtPosition, formatCitiesResponseToSelect, generateExitScene, generateHallwayScene, generateProductionAreaScene, generateSeatBlockScene, generateSeatBlockTicketScene, generateStageScene, generateStairScene, generateTableScene, generateTableTicketScene, generateUnavailableSpaceScene, generateZoneScene, getAdminFullname, getBrowserLanguage, getCustomerFullname, getItemTypeIcon, getOrderDiscount, getStoredLanguage, numberToLetter$1 as numberToLetter, parseJsonToFormDataAdvanced, phoneCountryFlag, processElementsToRenderData, provideTickeraComponents, resolveLanguage, setStoredLanguage, ticketCanOpenQr, tintColor, transformImageToFile, transformUrlParams };
|
|
11584
|
+
export { ADMIN_API_ROUTES, ADMISSION_API_ROUTES, ALERT_ICONS, AdminLayoutComponent, AdminNavbarComponent, AdminSelectComponent, AdminService, AdmissionQueueService, ApiService, AppAlertComponent, AppBadgeComponent, AppBreadcumbComponent, AppButtonComponent, AppLinkButtonComponent, AppModalComponent, AsyncSelectComponent, AuditInformationComponent, BASE_BUTTON_CLASSES, BASE_INPUT_CLASSES, BUTTON_SIZES_CLASSES, BUTTON_VARIANT_CLASSES, BaseModalService, BrowserZoomLockService, BulkSaveBarComponent, 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, IdentityDocumentInputComponent, KONVA_SHAPE_MAPPINGS, LanguageSwitcherComponent, MembershipStatus, MinTodayValidator, MustMatchValidator, NumberInputComponent, 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, PERFORMANCE_STATUS_COLORS, PERFORMANCE_TICKET_STATUS_COLORS, PHONE_COUNTRIES, PRICE_ZONES_API_ROUTES, PRODUCTS_API_ROUTES, PRODUCT_CATEGORIES_API_ROUTES, PRODUCT_TAGS_API_ROUTES, PRODUCT_TYPES_API_ROUTES, PaymentMethod, PendingChangesService, PerformanceBookingDataService, PerformanceCardComponent, PerformanceCardListComponent, PerformanceMultiSelectComponent, PerformanceSelectComponent, PerformanceService, PerformanceStatus, PerformanceStatusBadgeComponent, PerformanceStepperComponent, PerformanceTicketMapComponent, PerformanceTicketStatus, PerformanceTicketStatusBadgeComponent, PerformanceVisibilityType, PerformancesListEventsService, PhoneInputComponent, PriceZoneEventService, PriceZoneFormModalService, PriceZoneSelectComponent, PriceZoneService, ProductCategoryService, ProductMultiSelectComponent, ProductSelectComponent, ProductService, ProductTagService, ProductTypeService, PublicLayoutComponent, PurchaseLimitService, QuickStatusEditComponent, RoomMapElementOrientation, RoomMapElementType, SHOWS_API_ROUTES, STATE_API_ENDPOINTS, SeatAvailabilitySseService, SeatSelectionEmptySummaryComponent, SeatSelectionSummaryComponent, SeatSelectionSummaryItemComponent, SelectedDiscountCardType, ShowCardComponent, ShowCardSkeletonComponent, ShowMultiSelectComponent, ShowSelectComponent, ShowService, ShowTypeBadgeComponent, ShowsFilterComponent, SidebarMenuComponent, SidebarStateService, StateSelectComponent, StatesService, TICKERA_COMPONENTS_CONFIG, TICKET_ELEMENT_TYPES, TICKET_MAP_FLOOR_HOVER_FADE_MS, TICKET_MAP_FLOOR_HOVER_OPACITY, 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, TextExpandableComponent, TickeraTranslocoLoader, TicketMapFloorSelectorComponent, TicketMapPriceZonesComponent, TicketMapProductSelectionItemComponent, TicketMapTotalsComponent, TicketMapWidgetComponent, TicketMapWidgetHeaderComponent, TicketMapWrapperComponent, TicketMapZoomControlsComponent, TicketMapZoomService, TicketQrComponent, TicketQrModalComponent, TicketQrModalService, TicketQrService, TicketSelectionDetailsService, TicketSelectionDiscountService, TicketSelectionService, TicketSelectionTotalsService, ToastService, ToggleSwitchComponent, TransactionStatus, VENUES_API_ROUTES, VIP_CARDS_API_ROUTES, VipBalanceCardComponent, VipCardService, VipCardStatus, VipCardStatusBadgeComponent, VipRechargeModalComponent, VipTransactionType, VipTransactionsTableComponent, ZonePriceItemComponent, ZonePriceListComponent, authInterceptor, drawChairIcon$1 as drawChairIcon, drawHappyFace, drawRoundedRect, drawWheelchairIcon, emailValidator, findElementAtPosition, findTicketAtPosition, formatCitiesResponseToSelect, generateExitScene, generateHallwayScene, generateProductionAreaScene, generateSeatBlockScene, generateSeatBlockTicketScene, generateStageScene, generateStairScene, generateTableScene, generateTableTicketScene, generateUnavailableSpaceScene, generateZoneScene, getAdminFullname, getBrowserLanguage, getCustomerFullname, getItemTypeIcon, getOrderDiscount, getStoredLanguage, numberToLetter$1 as numberToLetter, parseJsonToFormDataAdvanced, phoneCountryFlag, processElementsToRenderData, provideTickeraComponents, resolveLanguage, setStoredLanguage, ticketCanOpenQr, tintColor, transformImageToFile, transformUrlParams };
|
|
11547
11585
|
//# sourceMappingURL=tickera-angular-components.mjs.map
|