tickera-angular-components 0.0.1-dev.173 → 0.0.1-dev.175
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.
|
@@ -540,6 +540,7 @@ const PERFORMANCES_API_ROUTES = {
|
|
|
540
540
|
seatEventsTicket: (id) => `/performances/${id}/seat-events/ticket`,
|
|
541
541
|
seatEventsTicketAdmin: (id) => `/performances/${id}/seat-events/ticket/admin`,
|
|
542
542
|
seatEvents: (id) => `/performances/${id}/seat-events`,
|
|
543
|
+
myQrToken: (ticketUuid) => `/performances/tickets/${ticketUuid}/my-qr-token`,
|
|
543
544
|
};
|
|
544
545
|
|
|
545
546
|
const PRICE_ZONES_API_ROUTES = {
|
|
@@ -2340,6 +2341,7 @@ var SelectedDiscountCardType;
|
|
|
2340
2341
|
SelectedDiscountCardType["CORPORATE_BOND"] = "CORPORATE_BOND";
|
|
2341
2342
|
SelectedDiscountCardType["GIFT_BOND"] = "GIFT_BOND";
|
|
2342
2343
|
SelectedDiscountCardType["VIP"] = "VIP";
|
|
2344
|
+
SelectedDiscountCardType["SUBSCRIPTION"] = "SUBSCRIPTION";
|
|
2343
2345
|
})(SelectedDiscountCardType || (SelectedDiscountCardType = {}));
|
|
2344
2346
|
|
|
2345
2347
|
const getCustomerFullname = (customer) => {
|
|
@@ -3761,12 +3763,19 @@ class TicketSelectionDiscountService {
|
|
|
3761
3763
|
_giftBond = signal(null, ...(ngDevMode ? [{ debugName: "_giftBond" }] : []));
|
|
3762
3764
|
_giftBondCode = signal(null, ...(ngDevMode ? [{ debugName: "_giftBondCode" }] : []));
|
|
3763
3765
|
_vipCard = signal(null, ...(ngDevMode ? [{ debugName: "_vipCard" }] : []));
|
|
3766
|
+
/**
|
|
3767
|
+
* Abono (subscription) como metodo de pago. Solo se usa el campo
|
|
3768
|
+
* `service_fee_exempt`: el valor del descuento es siempre 100% (una obra
|
|
3769
|
+
* del abono cubre el ticket por completo), igual que un cupon del 100%.
|
|
3770
|
+
*/
|
|
3771
|
+
_subscription = signal(null, ...(ngDevMode ? [{ debugName: "_subscription" }] : []));
|
|
3764
3772
|
coupon = computed(() => this._coupon(), ...(ngDevMode ? [{ debugName: "coupon" }] : []));
|
|
3765
3773
|
corporateBond = computed(() => this._corporateBond(), ...(ngDevMode ? [{ debugName: "corporateBond" }] : []));
|
|
3766
3774
|
corporateBondCode = computed(() => this._corporateBondCode(), ...(ngDevMode ? [{ debugName: "corporateBondCode" }] : []));
|
|
3767
3775
|
giftBond = computed(() => this._giftBond(), ...(ngDevMode ? [{ debugName: "giftBond" }] : []));
|
|
3768
3776
|
giftBondCode = computed(() => this._giftBondCode(), ...(ngDevMode ? [{ debugName: "giftBondCode" }] : []));
|
|
3769
3777
|
vipCard = computed(() => this._vipCard(), ...(ngDevMode ? [{ debugName: "vipCard" }] : []));
|
|
3778
|
+
subscription = computed(() => this._subscription(), ...(ngDevMode ? [{ debugName: "subscription" }] : []));
|
|
3770
3779
|
selectedDiscount = computed(() => {
|
|
3771
3780
|
const coupon = this.coupon();
|
|
3772
3781
|
if (!!coupon) {
|
|
@@ -3805,6 +3814,16 @@ class TicketSelectionDiscountService {
|
|
|
3805
3814
|
serviceFeeExempt: !!vipCard.category_snapshot?.service_fee_exempt,
|
|
3806
3815
|
};
|
|
3807
3816
|
}
|
|
3817
|
+
const subscription = this.subscription();
|
|
3818
|
+
if (!!subscription) {
|
|
3819
|
+
return {
|
|
3820
|
+
name: 'Abono',
|
|
3821
|
+
value: 100,
|
|
3822
|
+
type: SelectedDiscountCardType.SUBSCRIPTION,
|
|
3823
|
+
discountType: 'percentage',
|
|
3824
|
+
serviceFeeExempt: !!subscription.service_fee_exempt,
|
|
3825
|
+
};
|
|
3826
|
+
}
|
|
3808
3827
|
return null;
|
|
3809
3828
|
}, ...(ngDevMode ? [{ debugName: "selectedDiscount" }] : []));
|
|
3810
3829
|
selectedDiscountType = computed(() => {
|
|
@@ -3837,6 +3856,13 @@ class TicketSelectionDiscountService {
|
|
|
3837
3856
|
setVipCard(card) {
|
|
3838
3857
|
this._vipCard.set(card);
|
|
3839
3858
|
}
|
|
3859
|
+
/**
|
|
3860
|
+
* Abono como metodo de pago (paralelo a `setVipCard`). Llamar con `null`
|
|
3861
|
+
* en cuanto deje de ser el metodo de pago elegido.
|
|
3862
|
+
*/
|
|
3863
|
+
setSubscription(subscription) {
|
|
3864
|
+
this._subscription.set(subscription);
|
|
3865
|
+
}
|
|
3840
3866
|
clearSelection() {
|
|
3841
3867
|
this._coupon.set(null);
|
|
3842
3868
|
this._corporateBond.set(null);
|
|
@@ -3844,6 +3870,7 @@ class TicketSelectionDiscountService {
|
|
|
3844
3870
|
this._giftBond.set(null);
|
|
3845
3871
|
this._giftBondCode.set(null);
|
|
3846
3872
|
this._vipCard.set(null);
|
|
3873
|
+
this._subscription.set(null);
|
|
3847
3874
|
}
|
|
3848
3875
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketSelectionDiscountService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3849
3876
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketSelectionDiscountService, providedIn: 'root' });
|
|
@@ -4793,6 +4820,9 @@ class TicketQrService {
|
|
|
4793
4820
|
fetchQrToken(ticketUuid) {
|
|
4794
4821
|
return this.apiService.get(PERFORMANCES_API_ROUTES.ticketQrToken(ticketUuid));
|
|
4795
4822
|
}
|
|
4823
|
+
fetchMyQrToken(ticketUuid) {
|
|
4824
|
+
return this.apiService.get(PERFORMANCES_API_ROUTES.myQrToken(ticketUuid));
|
|
4825
|
+
}
|
|
4796
4826
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketQrService, deps: [{ token: ApiService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4797
4827
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketQrService, providedIn: 'root' });
|
|
4798
4828
|
}
|
|
@@ -9202,14 +9232,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
9202
9232
|
|
|
9203
9233
|
class TicketMapWidgetHeaderComponent {
|
|
9204
9234
|
title = '';
|
|
9235
|
+
subtitle = '';
|
|
9205
9236
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketMapWidgetHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9206
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketMapWidgetHeaderComponent, isStandalone: true, selector: "ticket-map-widget-header", inputs: { title: "title" }, ngImport: i0, template: "<div class=\"ticket-map-widget-header\">\n @if (title) {\n <p class=\"ticket-map-widget-header__title\">{{ title }}</p>\n }\n\n <div class=\"ticket-map-widget-header__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".ticket-map-widget-header{display:flex;flex-direction:row;align-items:center;justify-content:start;gap:.5rem}.ticket-map-widget-header__title{font-weight:700;color:#374151;font-size:.875rem;margin:0;text-transform:uppercase}.ticket-map-widget-header__content{display:flex;align-items:center;justify-content:end;margin-left:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
9237
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketMapWidgetHeaderComponent, isStandalone: true, selector: "ticket-map-widget-header", inputs: { title: "title", subtitle: "subtitle" }, ngImport: i0, template: "<div class=\"ticket-map-widget-header\">\n @if (title) {\n <p class=\"ticket-map-widget-header__title\">{{ title }}</p>\n }\n\n @if (subtitle) {\n <p class=\"ticket-map-widget-header__subtitle\">{{ subtitle }}</p>\n }\n\n <div class=\"ticket-map-widget-header__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".ticket-map-widget-header{display:flex;flex-direction:row;align-items:center;justify-content:start;gap:.5rem}.ticket-map-widget-header__title{font-weight:700;color:#374151;font-size:.875rem;margin:0;text-transform:uppercase}.ticket-map-widget-header__subtitle{color:#9ca3af;font-size:.75rem;margin:0}.ticket-map-widget-header__content{display:flex;align-items:center;justify-content:end;margin-left:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }] });
|
|
9207
9238
|
}
|
|
9208
9239
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketMapWidgetHeaderComponent, decorators: [{
|
|
9209
9240
|
type: Component,
|
|
9210
|
-
args: [{ selector: 'ticket-map-widget-header', standalone: true, imports: [CommonModule], template: "<div class=\"ticket-map-widget-header\">\n @if (title) {\n <p class=\"ticket-map-widget-header__title\">{{ title }}</p>\n }\n\n <div class=\"ticket-map-widget-header__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".ticket-map-widget-header{display:flex;flex-direction:row;align-items:center;justify-content:start;gap:.5rem}.ticket-map-widget-header__title{font-weight:700;color:#374151;font-size:.875rem;margin:0;text-transform:uppercase}.ticket-map-widget-header__content{display:flex;align-items:center;justify-content:end;margin-left:auto}\n"] }]
|
|
9241
|
+
args: [{ selector: 'ticket-map-widget-header', standalone: true, imports: [CommonModule], template: "<div class=\"ticket-map-widget-header\">\n @if (title) {\n <p class=\"ticket-map-widget-header__title\">{{ title }}</p>\n }\n\n @if (subtitle) {\n <p class=\"ticket-map-widget-header__subtitle\">{{ subtitle }}</p>\n }\n\n <div class=\"ticket-map-widget-header__content\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: [".ticket-map-widget-header{display:flex;flex-direction:row;align-items:center;justify-content:start;gap:.5rem}.ticket-map-widget-header__title{font-weight:700;color:#374151;font-size:.875rem;margin:0;text-transform:uppercase}.ticket-map-widget-header__subtitle{color:#9ca3af;font-size:.75rem;margin:0}.ticket-map-widget-header__content{display:flex;align-items:center;justify-content:end;margin-left:auto}\n"] }]
|
|
9211
9242
|
}], propDecorators: { title: [{
|
|
9212
9243
|
type: Input
|
|
9244
|
+
}], subtitle: [{
|
|
9245
|
+
type: Input
|
|
9213
9246
|
}] } });
|
|
9214
9247
|
|
|
9215
9248
|
class TicketMapZoomControlsComponent {
|
|
@@ -9507,7 +9540,7 @@ class TicketMapPriceZonesComponent {
|
|
|
9507
9540
|
title = 'Precios por zona';
|
|
9508
9541
|
bookingDataService = inject(PerformanceBookingDataService);
|
|
9509
9542
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketMapPriceZonesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9510
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketMapPriceZonesComponent, isStandalone: true, selector: "ticket-map-price-zones", inputs: { title: "title" }, ngImport: i0, template: "<ticket-map-widget>\n <ticket-map-widget-header [title]=\"title\" />\n\n <div class=\"ticket-map-price-zones\">\n @for (zone of bookingDataService.roomMap()?.price_zones ?? []; track zone.id) {\n <div class=\"ticket-map-price-zones__item\">\n <span\n class=\"ticket-map-price-zones__item-color\"\n [style.background-color]=\"zone.color\"\n ></span>\n <p class=\"ticket-map-price-zones__item-name\">{{ zone.name }}</p>\n <p class=\"ticket-map-price-zones__item-price\">${{ zone.normal_price | number: '1.0-2' }}</p>\n </div>\n }\n </div>\n</ticket-map-widget>\n", styles: [".ticket-map-price-zones{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;width:100%}.ticket-map-price-zones__item{align-items:center;border:1px solid #e5e5e5;border-radius:.5rem;display:flex;color:#9ca3af;flex-direction:row;font-size:.75rem;justify-content:start;gap:.5rem;padding:.75rem}.ticket-map-price-zones__item-color{width:.75rem;height:.75rem;border-radius:.125rem}.ticket-map-price-zones__item-name{font-size:.75rem;color:#9ca3af;margin:0}.ticket-map-price-zones__item-price{font-size:.75rem;color:#1f2937;font-weight:500;margin:0 0 0 auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }] });
|
|
9543
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketMapPriceZonesComponent, isStandalone: true, selector: "ticket-map-price-zones", inputs: { title: "title" }, ngImport: i0, template: "<ticket-map-widget>\n <ticket-map-widget-header [title]=\"title\" />\n\n <div class=\"ticket-map-price-zones\">\n @for (zone of bookingDataService.roomMap()?.price_zones ?? []; track zone.id) {\n <div class=\"ticket-map-price-zones__item\">\n <span\n class=\"ticket-map-price-zones__item-color\"\n [style.background-color]=\"zone.color\"\n ></span>\n <p class=\"ticket-map-price-zones__item-name\">{{ zone.name }}</p>\n <p class=\"ticket-map-price-zones__item-price\">${{ zone.normal_price | number: '1.0-2' }}</p>\n </div>\n }\n </div>\n</ticket-map-widget>\n", styles: [".ticket-map-price-zones{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;width:100%}.ticket-map-price-zones__item{align-items:center;border:1px solid #e5e5e5;border-radius:.5rem;display:flex;color:#9ca3af;flex-direction:row;font-size:.75rem;justify-content:start;gap:.5rem;padding:.75rem}.ticket-map-price-zones__item-color{width:.75rem;height:.75rem;border-radius:.125rem}.ticket-map-price-zones__item-name{font-size:.75rem;color:#9ca3af;margin:0}.ticket-map-price-zones__item-price{font-size:.75rem;color:#1f2937;font-weight:500;margin:0 0 0 auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title", "subtitle"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }] });
|
|
9511
9544
|
}
|
|
9512
9545
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketMapPriceZonesComponent, decorators: [{
|
|
9513
9546
|
type: Component,
|
|
@@ -9546,10 +9579,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
9546
9579
|
}] } });
|
|
9547
9580
|
|
|
9548
9581
|
class TIcketMapProductSelectionComponent {
|
|
9582
|
+
title = 'Productos relacionados';
|
|
9583
|
+
subtitle = '';
|
|
9549
9584
|
bookingDataService = inject(PerformanceBookingDataService);
|
|
9550
9585
|
products = computed(() => this.bookingDataService.roomMap()?.products ?? [], ...(ngDevMode ? [{ debugName: "products" }] : []));
|
|
9551
9586
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TIcketMapProductSelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9552
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TIcketMapProductSelectionComponent, isStandalone: true, selector: "ticket-map-product-selection", ngImport: i0, template: "@if (products().length > 0) {\n <ticket-map-widget>\n <ticket-map-widget-header title=\"
|
|
9587
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TIcketMapProductSelectionComponent, isStandalone: true, selector: "ticket-map-product-selection", inputs: { title: "title", subtitle: "subtitle" }, ngImport: i0, template: "@if (products().length > 0) {\n <ticket-map-widget>\n <ticket-map-widget-header [title]=\"title\" />\n\n <div class=\"products-list\">\n @for (product of products(); track product.id) {\n <ticket-map-product-selection-item [product]=\"product\" />\n }\n </div>\n </ticket-map-widget>\n}\n", styles: [".products-list{overflow-y:auto;max-height:20rem;margin:.5rem 0}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title", "subtitle"] }, { kind: "component", type: TicketMapProductSelectionItemComponent, selector: "ticket-map-product-selection-item", inputs: ["product"] }] });
|
|
9553
9588
|
}
|
|
9554
9589
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TIcketMapProductSelectionComponent, decorators: [{
|
|
9555
9590
|
type: Component,
|
|
@@ -9558,8 +9593,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
9558
9593
|
TicketMapWidgetComponent,
|
|
9559
9594
|
TicketMapWidgetHeaderComponent,
|
|
9560
9595
|
TicketMapProductSelectionItemComponent,
|
|
9561
|
-
], template: "@if (products().length > 0) {\n <ticket-map-widget>\n <ticket-map-widget-header title=\"
|
|
9562
|
-
}]
|
|
9596
|
+
], template: "@if (products().length > 0) {\n <ticket-map-widget>\n <ticket-map-widget-header [title]=\"title\" />\n\n <div class=\"products-list\">\n @for (product of products(); track product.id) {\n <ticket-map-product-selection-item [product]=\"product\" />\n }\n </div>\n </ticket-map-widget>\n}\n", styles: [".products-list{overflow-y:auto;max-height:20rem;margin:.5rem 0}\n"] }]
|
|
9597
|
+
}], propDecorators: { title: [{
|
|
9598
|
+
type: Input
|
|
9599
|
+
}], subtitle: [{
|
|
9600
|
+
type: Input
|
|
9601
|
+
}] } });
|
|
9563
9602
|
|
|
9564
9603
|
class TicketMapTotalsComponent {
|
|
9565
9604
|
bookingDataService;
|
|
@@ -9591,7 +9630,7 @@ class TicketMapTotalsComponent {
|
|
|
9591
9630
|
return this.selectionService.selectedTicketIdList();
|
|
9592
9631
|
}
|
|
9593
9632
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketMapTotalsComponent, deps: [{ token: PerformanceBookingDataService }, { token: TicketSelectionDetailsService }, { token: TicketSelectionDiscountService }, { token: TicketSelectionTotalsService }, { token: TicketSelectionService }, { token: i3$1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
9594
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketMapTotalsComponent, isStandalone: true, selector: "ticket-map-totals", inputs: { title: "title", buttonText: "buttonText", loadingButtonText: "loadingButtonText", isLoading: "isLoading" }, outputs: { onPurchaseClick: "onPurchaseClick" }, ngImport: i0, template: "<ticket-map-widget class=\"w-full\">\n <ticket-map-widget-header [title]=\"title\" />\n\n <div class=\"ticket-map-totals\">\n <p class=\"ticket-map-totals__item\">\n <span>Entradas ({{ selectionService.selectedCount() | number: '1.0-2' }}):</span>\n <span> ${{ selectionTotalsService.ticketSubtotal() | number: '1.0-2' }} </span>\n </p>\n\n @if (selectionService.selectedProductCount() > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Productos ({{ selectionService.selectedProductCount() | number: '1.0-2' }}):</span>\n <span>${{ selectionTotalsService.productSubtotal() | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (serviceFee > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Tarifa de servicio:</span>\n <span>${{ bookingDataService.show()?.service_fee ?? '0' | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (!!selectionDiscountService.coupon() && selectionTotalsService.discountAmount()) {\n <p class=\"ticket-map-totals__item\">\n <span>Cup\u00F3n de descuento:</span>\n <span class=\"line-through\">\n -${{ selectionTotalsService.discountAmount() | number: '1.0-2' }}\n @if (selectionDiscountService.selectedDiscount()?.discountType === 'percentage') {\n ({{ selectionDiscountService.coupon()?.discount_value }}%)\n }\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.corporateBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono corporativo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.corporateBond()?.value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.giftBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono de regalo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.giftBond()?.original_value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.vipCard() && selectionTotalsService.discountAmount()) {\n <p class=\"ticket-map-totals__item\">\n <span>Tarjeta VIP:</span>\n <span class=\"line-through\">\n -${{ selectionTotalsService.discountAmount() | number: '1.0-2' }} ({{\n selectionDiscountService.vipCard()?.category_snapshot?.discount_percentage\n }}%)\n </span>\n </p>\n }\n\n <hr class=\"ticket-map-totals__divider\" />\n\n <div class=\"ticket-map-totals__calculated\">\n <span class=\"ticket-map-totals__calculated-title\">Total:</span>\n\n @if (\n selectionTotalsService.totalDiscounted() || selectionTotalsService.totalDiscounted() === 0\n ) {\n <span class=\"ticket-map-totals__calculated-inline\">\n <span class=\"ticket-map-totals__calculated-discount\">\n ${{ selectionTotalsService.totalValue() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalDiscounted() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n </span>\n } @else {\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalValue() | number: '1.0-2' }}\n </span>\n }\n </div>\n\n @if (selectionService.selectedCount() > 0 || selectionService.selectedProductCount() > 0) {\n <div class=\"flex flex-col gap-2\">\n <app-button\n (click)=\"onPurchaseClick.emit()\"\n size=\"sm\"\n icon=\"ri-dashboard-3-line\"\n [text]=\"buttonText\"\n [loadingText]=\"loadingButtonText\"\n [loading]=\"isLoading\"\n variant=\"primary\"\n />\n </div>\n }\n </div>\n</ticket-map-widget>\n", styles: [".ticket-map-totals{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;width:100%}.ticket-map-totals__item{align-items:center;color:#9ca3af;display:flex;flex-direction:row;font-size:.75rem;justify-content:space-between;margin:0}.ticket-map-totals__divider{border:none;border-top:1px solid #e5e7eb;width:100%}.ticket-map-totals__calculated{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin:0}.ticket-map-totals__calculated-title{color:#4b5563;font-size:1rem;font-weight:700}.ticket-map-totals__calculated-inline{display:flex;flex-direction:column;align-items:flex-end}.ticket-map-totals__calculated-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}.ticket-map-totals__calculated-total{color:#4b5563;font-size:1rem;font-weight:700}\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: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title"] }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }] });
|
|
9633
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketMapTotalsComponent, isStandalone: true, selector: "ticket-map-totals", inputs: { title: "title", buttonText: "buttonText", loadingButtonText: "loadingButtonText", isLoading: "isLoading" }, outputs: { onPurchaseClick: "onPurchaseClick" }, ngImport: i0, template: "<ticket-map-widget class=\"w-full\">\n <ticket-map-widget-header [title]=\"title\" />\n\n <div class=\"ticket-map-totals\">\n <p class=\"ticket-map-totals__item\">\n <span>Entradas ({{ selectionService.selectedCount() | number: '1.0-2' }}):</span>\n <span> ${{ selectionTotalsService.ticketSubtotal() | number: '1.0-2' }} </span>\n </p>\n\n @if (selectionService.selectedProductCount() > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Productos ({{ selectionService.selectedProductCount() | number: '1.0-2' }}):</span>\n <span>${{ selectionTotalsService.productSubtotal() | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (serviceFee > 0) {\n <p class=\"ticket-map-totals__item\">\n <span>Tarifa de servicio:</span>\n <span>${{ bookingDataService.show()?.service_fee ?? '0' | number: '1.0-2' }}</span>\n </p>\n }\n\n @if (!!selectionDiscountService.coupon() && selectionTotalsService.discountAmount()) {\n <p class=\"ticket-map-totals__item\">\n <span>Cup\u00F3n de descuento:</span>\n <span class=\"line-through\">\n -${{ selectionTotalsService.discountAmount() | number: '1.0-2' }}\n @if (selectionDiscountService.selectedDiscount()?.discountType === 'percentage') {\n ({{ selectionDiscountService.coupon()?.discount_value }}%)\n }\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.corporateBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono corporativo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.corporateBond()?.value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.giftBond()) {\n <p class=\"ticket-map-totals__item\">\n <span>Bono de regalo:</span>\n <span class=\"line-through\">\n ${{ selectionDiscountService.giftBond()?.original_value ?? '0' | number: '1.0-2' }}\n </span>\n </p>\n }\n\n @if (!!selectionDiscountService.vipCard() && selectionTotalsService.discountAmount()) {\n <p class=\"ticket-map-totals__item\">\n <span>Tarjeta VIP:</span>\n <span class=\"line-through\">\n -${{ selectionTotalsService.discountAmount() | number: '1.0-2' }} ({{\n selectionDiscountService.vipCard()?.category_snapshot?.discount_percentage\n }}%)\n </span>\n </p>\n }\n\n <hr class=\"ticket-map-totals__divider\" />\n\n <div class=\"ticket-map-totals__calculated\">\n <span class=\"ticket-map-totals__calculated-title\">Total:</span>\n\n @if (\n selectionTotalsService.totalDiscounted() || selectionTotalsService.totalDiscounted() === 0\n ) {\n <span class=\"ticket-map-totals__calculated-inline\">\n <span class=\"ticket-map-totals__calculated-discount\">\n ${{ selectionTotalsService.totalValue() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalDiscounted() | currency: 'COP' : 'symbol' : '1.0-2' }}\n </span>\n </span>\n } @else {\n <span class=\"ticket-map-totals__calculated-total\">\n ${{ selectionTotalsService.totalValue() | number: '1.0-2' }}\n </span>\n }\n </div>\n\n @if (selectionService.selectedCount() > 0 || selectionService.selectedProductCount() > 0) {\n <div class=\"flex flex-col gap-2\">\n <app-button\n (click)=\"onPurchaseClick.emit()\"\n size=\"sm\"\n icon=\"ri-dashboard-3-line\"\n [text]=\"buttonText\"\n [loadingText]=\"loadingButtonText\"\n [loading]=\"isLoading\"\n variant=\"primary\"\n />\n </div>\n }\n </div>\n</ticket-map-widget>\n", styles: [".ticket-map-totals{display:flex;flex-direction:column;gap:.5rem;margin-top:.5rem;width:100%}.ticket-map-totals__item{align-items:center;color:#9ca3af;display:flex;flex-direction:row;font-size:.75rem;justify-content:space-between;margin:0}.ticket-map-totals__divider{border:none;border-top:1px solid #e5e7eb;width:100%}.ticket-map-totals__calculated{display:flex;flex-direction:row;align-items:center;justify-content:space-between;margin:0}.ticket-map-totals__calculated-title{color:#4b5563;font-size:1rem;font-weight:700}.ticket-map-totals__calculated-inline{display:flex;flex-direction:column;align-items:flex-end}.ticket-map-totals__calculated-discount{color:#9ca3af;font-size:.75rem;text-decoration:line-through}.ticket-map-totals__calculated-total{color:#4b5563;font-size:1rem;font-weight:700}\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: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title", "subtitle"] }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.CurrencyPipe, name: "currency" }] });
|
|
9595
9634
|
}
|
|
9596
9635
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketMapTotalsComponent, decorators: [{
|
|
9597
9636
|
type: Component,
|
|
@@ -9620,7 +9659,7 @@ class TicketMapWrapperComponent {
|
|
|
9620
9659
|
needsLogin = false;
|
|
9621
9660
|
isLoggedIn = true;
|
|
9622
9661
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketMapWrapperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9623
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: TicketMapWrapperComponent, isStandalone: true, selector: "ticket-map-wrapper", inputs: { readOnly: "readOnly", needsLogin: "needsLogin", isLoggedIn: "isLoggedIn" }, outputs: { selectionChange: "selectionChange", needsLoginError: "needsLoginError" }, ngImport: i0, template: "<ticket-map-widget>\n <ticket-map-widget-header title=\"Plano de la sala\">\n <ticket-map-floor-selector />\n <div class=\"zoom-controls-wrapper\">\n <ticket-map-zoom-controls />\n </div>\n </ticket-map-widget-header>\n\n <div class=\"seat-map-wrapper\" #wrapper>\n <performance-ticket-map\n [readOnly]=\"readOnly\"\n [needsLogin]=\"needsLogin\"\n [isLoggedIn]=\"isLoggedIn\"\n (needsLoginError)=\"needsLoginError.emit()\"\n (selectionChange)=\"selectionChange.emit()\"\n />\n </div>\n</ticket-map-widget>\n", styles: [".seat-map-wrapper{position:relative;overflow:hidden;touch-action:pan-x pan-y;width:100%}.zoom-controls-wrapper{margin-left:1rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title"] }, { kind: "component", type: TicketMapFloorSelectorComponent, selector: "ticket-map-floor-selector" }, { kind: "component", type: TicketMapZoomControlsComponent, selector: "ticket-map-zoom-controls" }, { kind: "component", type: PerformanceTicketMapComponent, selector: "performance-ticket-map", inputs: ["readOnly", "needsLogin", "isLoggedIn"], outputs: ["selectionChange", "needsLoginError"] }] });
|
|
9662
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.25", type: TicketMapWrapperComponent, isStandalone: true, selector: "ticket-map-wrapper", inputs: { readOnly: "readOnly", needsLogin: "needsLogin", isLoggedIn: "isLoggedIn" }, outputs: { selectionChange: "selectionChange", needsLoginError: "needsLoginError" }, ngImport: i0, template: "<ticket-map-widget>\n <ticket-map-widget-header title=\"Plano de la sala\">\n <ticket-map-floor-selector />\n <div class=\"zoom-controls-wrapper\">\n <ticket-map-zoom-controls />\n </div>\n </ticket-map-widget-header>\n\n <div class=\"seat-map-wrapper\" #wrapper>\n <performance-ticket-map\n [readOnly]=\"readOnly\"\n [needsLogin]=\"needsLogin\"\n [isLoggedIn]=\"isLoggedIn\"\n (needsLoginError)=\"needsLoginError.emit()\"\n (selectionChange)=\"selectionChange.emit()\"\n />\n </div>\n</ticket-map-widget>\n", styles: [".seat-map-wrapper{position:relative;overflow:hidden;touch-action:pan-x pan-y;width:100%}.zoom-controls-wrapper{margin-left:1rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title", "subtitle"] }, { kind: "component", type: TicketMapFloorSelectorComponent, selector: "ticket-map-floor-selector" }, { kind: "component", type: TicketMapZoomControlsComponent, selector: "ticket-map-zoom-controls" }, { kind: "component", type: PerformanceTicketMapComponent, selector: "performance-ticket-map", inputs: ["readOnly", "needsLogin", "isLoggedIn"], outputs: ["selectionChange", "needsLoginError"] }] });
|
|
9624
9663
|
}
|
|
9625
9664
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketMapWrapperComponent, decorators: [{
|
|
9626
9665
|
type: Component,
|
|
@@ -9706,7 +9745,7 @@ class SeatSelectionSummaryComponent {
|
|
|
9706
9745
|
: item.id;
|
|
9707
9746
|
}
|
|
9708
9747
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SeatSelectionSummaryComponent, deps: [{ token: TicketSelectionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
9709
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SeatSelectionSummaryComponent, isStandalone: true, selector: "seat-selection-summary", inputs: { title: "title", clearButtonText: "clearButtonText" }, ngImport: i0, template: "<ticket-map-widget>\n <ticket-map-widget-header [title]=\"title\" />\n\n @if (selectionService.selectedCount() > 0) {\n <div class=\"tickets-list\">\n @for (item of selectionService.summaryItems(); track trackByItem(item)) {\n <seat-selection-summary-item [item]=\"item\" />\n }\n </div>\n\n @if (selectionService.selectedCount() > 0) {\n <div class=\"tickets-actions\">\n <app-button\n size=\"xs\"\n [text]=\"clearButtonText\"\n icon=\"ri-delete-bin-line\"\n (clicked)=\"selectionService.clearSelection()\"\n />\n </div>\n }\n } @else {\n <seat-selection-empty-summary />\n }\n</ticket-map-widget>\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: SeatSelectionEmptySummaryComponent, selector: "seat-selection-empty-summary" }, { kind: "component", type: SeatSelectionSummaryItemComponent, selector: "seat-selection-summary-item", inputs: ["item"] }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title"] }] });
|
|
9748
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SeatSelectionSummaryComponent, isStandalone: true, selector: "seat-selection-summary", inputs: { title: "title", clearButtonText: "clearButtonText" }, ngImport: i0, template: "<ticket-map-widget>\n <ticket-map-widget-header [title]=\"title\" />\n\n @if (selectionService.selectedCount() > 0) {\n <div class=\"tickets-list\">\n @for (item of selectionService.summaryItems(); track trackByItem(item)) {\n <seat-selection-summary-item [item]=\"item\" />\n }\n </div>\n\n @if (selectionService.selectedCount() > 0) {\n <div class=\"tickets-actions\">\n <app-button\n size=\"xs\"\n [text]=\"clearButtonText\"\n icon=\"ri-delete-bin-line\"\n (clicked)=\"selectionService.clearSelection()\"\n />\n </div>\n }\n } @else {\n <seat-selection-empty-summary />\n }\n</ticket-map-widget>\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: SeatSelectionEmptySummaryComponent, selector: "seat-selection-empty-summary" }, { kind: "component", type: SeatSelectionSummaryItemComponent, selector: "seat-selection-summary-item", inputs: ["item"] }, { kind: "component", type: TicketMapWidgetComponent, selector: "ticket-map-widget" }, { kind: "component", type: TicketMapWidgetHeaderComponent, selector: "ticket-map-widget-header", inputs: ["title", "subtitle"] }] });
|
|
9710
9749
|
}
|
|
9711
9750
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SeatSelectionSummaryComponent, decorators: [{
|
|
9712
9751
|
type: Component,
|
|
@@ -9925,6 +9964,7 @@ class TicketQrComponent {
|
|
|
9925
9964
|
ticketQrService;
|
|
9926
9965
|
platformId;
|
|
9927
9966
|
ticketUuid;
|
|
9967
|
+
isCustomer = false;
|
|
9928
9968
|
qrCanvas;
|
|
9929
9969
|
loading = signal(true, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
9930
9970
|
error = signal(false, ...(ngDevMode ? [{ debugName: "error" }] : []));
|
|
@@ -9988,8 +10028,10 @@ class TicketQrComponent {
|
|
|
9988
10028
|
if (this.isFetching)
|
|
9989
10029
|
return;
|
|
9990
10030
|
this.isFetching = true;
|
|
9991
|
-
this.
|
|
9992
|
-
|
|
10031
|
+
const service = this.isCustomer
|
|
10032
|
+
? this.ticketQrService.fetchMyQrToken
|
|
10033
|
+
: this.ticketQrService.fetchQrToken;
|
|
10034
|
+
service(this.ticketUuid)
|
|
9993
10035
|
.pipe(takeUntil$1(this.destroy$))
|
|
9994
10036
|
.subscribe({
|
|
9995
10037
|
next: (res) => {
|
|
@@ -10052,7 +10094,7 @@ class TicketQrComponent {
|
|
|
10052
10094
|
});
|
|
10053
10095
|
}
|
|
10054
10096
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketQrComponent, deps: [{ token: TicketQrService }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
|
|
10055
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketQrComponent, isStandalone: true, selector: "performance-ticket-qr", inputs: { ticketUuid: "ticketUuid" }, viewQueries: [{ propertyName: "qrCanvas", first: true, predicate: ["qrCanvas"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"ticket-qr\">\n @if (loading()) {\n <div class=\"ticket-qr__loader\">\n <span class=\"ticket-qr__loader-text\">Cargando QR...</span>\n </div>\n }\n\n @if (error()) {\n <div class=\"ticket-qr__container\">\n <app-alert text=\"Error al cargar el c\u00F3digo QR\" type=\"error\" />\n <app-button text=\"Reintentar\" (clicked)=\"retry()\" [disabled]=\"loading()\" />\n </div>\n }\n\n <div [class.hidden]=\"loading() || error()\" class=\"ticket-qr__container\">\n <div class=\"transition-opacity duration-300\" [class.opacity-50]=\"refreshing()\">\n <canvas #qrCanvas class=\"ticket-qr__canvas\" width=\"256\" height=\"256\"></canvas>\n </div>\n <span class=\"ticket-qr__updating-text\">\n {{ countdown() > 0 ? `Actualizando en ${countdown()}` : '0s' }}\n </span>\n </div>\n</div>\n", styles: [".ticket-qr{align-items:center;display:flex;flex-flow:column nowrap;gap:.75rem;height:auto;padding:1rem;width:100%}.ticket-qr__loader{align-items:center;background-color:#f3f4f6;border-radius:.5rem;display:flex;flex-flow:column nowrap;height:16rem;justify-content:center;width:16rem}.ticket-qr__loader-text{color:#9ca3af;font-size:.875rem}.ticket-qr__container{align-items:center;display:flex;flex-flow:column nowrap;gap:.75rem;width:100%}.ticket-qr__container.hidden{display:none}.ticket-qr__canvas{box-shadow:0 0 10px #0003;border-radius:.5rem}.ticket-qr__updating-text{color:#9ca3af;font-size:.875rem}\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: AppAlertComponent, selector: "app-alert", inputs: ["type", "text", "closeable", "size"] }] });
|
|
10097
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketQrComponent, isStandalone: true, selector: "performance-ticket-qr", inputs: { ticketUuid: "ticketUuid", isCustomer: "isCustomer" }, viewQueries: [{ propertyName: "qrCanvas", first: true, predicate: ["qrCanvas"], descendants: true, static: true }], ngImport: i0, template: "<div class=\"ticket-qr\">\n @if (loading()) {\n <div class=\"ticket-qr__loader\">\n <span class=\"ticket-qr__loader-text\">Cargando QR...</span>\n </div>\n }\n\n @if (error()) {\n <div class=\"ticket-qr__container\">\n <app-alert text=\"Error al cargar el c\u00F3digo QR\" type=\"error\" />\n <app-button text=\"Reintentar\" (clicked)=\"retry()\" [disabled]=\"loading()\" />\n </div>\n }\n\n <div [class.hidden]=\"loading() || error()\" class=\"ticket-qr__container\">\n <div class=\"transition-opacity duration-300\" [class.opacity-50]=\"refreshing()\">\n <canvas #qrCanvas class=\"ticket-qr__canvas\" width=\"256\" height=\"256\"></canvas>\n </div>\n <span class=\"ticket-qr__updating-text\">\n {{ countdown() > 0 ? `Actualizando en ${countdown()}` : '0s' }}\n </span>\n </div>\n</div>\n", styles: [".ticket-qr{align-items:center;display:flex;flex-flow:column nowrap;gap:.75rem;height:auto;padding:1rem;width:100%}.ticket-qr__loader{align-items:center;background-color:#f3f4f6;border-radius:.5rem;display:flex;flex-flow:column nowrap;height:16rem;justify-content:center;width:16rem}.ticket-qr__loader-text{color:#9ca3af;font-size:.875rem}.ticket-qr__container{align-items:center;display:flex;flex-flow:column nowrap;gap:.75rem;width:100%}.ticket-qr__container.hidden{display:none}.ticket-qr__canvas{box-shadow:0 0 10px #0003;border-radius:.5rem}.ticket-qr__updating-text{color:#9ca3af;font-size:.875rem}\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: AppAlertComponent, selector: "app-alert", inputs: ["type", "text", "closeable", "size"] }] });
|
|
10056
10098
|
}
|
|
10057
10099
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketQrComponent, decorators: [{
|
|
10058
10100
|
type: Component,
|
|
@@ -10063,6 +10105,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
10063
10105
|
}] }], propDecorators: { ticketUuid: [{
|
|
10064
10106
|
type: Input,
|
|
10065
10107
|
args: [{ required: true }]
|
|
10108
|
+
}], isCustomer: [{
|
|
10109
|
+
type: Input
|
|
10066
10110
|
}], qrCanvas: [{
|
|
10067
10111
|
type: ViewChild,
|
|
10068
10112
|
args: ['qrCanvas', { static: true }]
|
|
@@ -10070,6 +10114,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
10070
10114
|
|
|
10071
10115
|
class TicketQrModalComponent {
|
|
10072
10116
|
ticketQrModalService;
|
|
10117
|
+
isCustomer = false;
|
|
10073
10118
|
constructor(ticketQrModalService) {
|
|
10074
10119
|
this.ticketQrModalService = ticketQrModalService;
|
|
10075
10120
|
}
|
|
@@ -10086,16 +10131,19 @@ class TicketQrModalComponent {
|
|
|
10086
10131
|
this.ticketQrModalService.close();
|
|
10087
10132
|
}
|
|
10088
10133
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketQrModalComponent, deps: [{ token: TicketQrModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
10089
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketQrModalComponent, isStandalone: true, selector: "ticket-qr-modal", ngImport: i0, template: "<app-modal title=\"C\u00F3digo QR del ticket\" [isOpen]=\"isOpen\" (closeModal)=\"onClose()\" size=\"md\">\n <div class=\"ticket-qr-modal\">\n @if (ticketDescription(); as desc) {\n <p class=\"ticket-qr-modal__description\">{{ desc }}</p>\n }\n\n @if (ticketUuid(); as uuid) {\n <performance-ticket-qr [ticketUuid]=\"uuid\" />\n }\n </div>\n</app-modal>\n", styles: [".ticket-qr-modal__description{color:#6b7280;font-weight:700;font-size:1rem;margin-bottom:1rem;text-align:center;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppModalComponent, selector: "app-modal", inputs: ["title", "disableClose", "showHeader", "showCloseButton", "showTitle", "interactiveClose", "isOpen", "size"], outputs: ["closeModal"] }, { kind: "component", type: TicketQrComponent, selector: "performance-ticket-qr", inputs: ["ticketUuid"] }] });
|
|
10134
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: TicketQrModalComponent, isStandalone: true, selector: "ticket-qr-modal", inputs: { isCustomer: "isCustomer" }, ngImport: i0, template: "<app-modal title=\"C\u00F3digo QR del ticket\" [isOpen]=\"isOpen\" (closeModal)=\"onClose()\" size=\"md\">\n <div class=\"ticket-qr-modal\">\n @if (ticketDescription(); as desc) {\n <p class=\"ticket-qr-modal__description\">{{ desc }}</p>\n }\n\n @if (ticketUuid(); as uuid) {\n <performance-ticket-qr [ticketUuid]=\"uuid\" [isCustomer]=\"isCustomer\" />\n }\n </div>\n</app-modal>\n", styles: [".ticket-qr-modal__description{color:#6b7280;font-weight:700;font-size:1rem;margin-bottom:1rem;text-align:center;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppModalComponent, selector: "app-modal", inputs: ["title", "disableClose", "showHeader", "showCloseButton", "showTitle", "interactiveClose", "isOpen", "size"], outputs: ["closeModal"] }, { kind: "component", type: TicketQrComponent, selector: "performance-ticket-qr", inputs: ["ticketUuid", "isCustomer"] }] });
|
|
10090
10135
|
}
|
|
10091
10136
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: TicketQrModalComponent, decorators: [{
|
|
10092
10137
|
type: Component,
|
|
10093
|
-
args: [{ selector: 'ticket-qr-modal', standalone: true, imports: [CommonModule, AppModalComponent, TicketQrComponent], template: "<app-modal title=\"C\u00F3digo QR del ticket\" [isOpen]=\"isOpen\" (closeModal)=\"onClose()\" size=\"md\">\n <div class=\"ticket-qr-modal\">\n @if (ticketDescription(); as desc) {\n <p class=\"ticket-qr-modal__description\">{{ desc }}</p>\n }\n\n @if (ticketUuid(); as uuid) {\n <performance-ticket-qr [ticketUuid]=\"uuid\" />\n }\n </div>\n</app-modal>\n", styles: [".ticket-qr-modal__description{color:#6b7280;font-weight:700;font-size:1rem;margin-bottom:1rem;text-align:center;width:100%}\n"] }]
|
|
10094
|
-
}], ctorParameters: () => [{ type: TicketQrModalService }]
|
|
10138
|
+
args: [{ selector: 'ticket-qr-modal', standalone: true, imports: [CommonModule, AppModalComponent, TicketQrComponent], template: "<app-modal title=\"C\u00F3digo QR del ticket\" [isOpen]=\"isOpen\" (closeModal)=\"onClose()\" size=\"md\">\n <div class=\"ticket-qr-modal\">\n @if (ticketDescription(); as desc) {\n <p class=\"ticket-qr-modal__description\">{{ desc }}</p>\n }\n\n @if (ticketUuid(); as uuid) {\n <performance-ticket-qr [ticketUuid]=\"uuid\" [isCustomer]=\"isCustomer\" />\n }\n </div>\n</app-modal>\n", styles: [".ticket-qr-modal__description{color:#6b7280;font-weight:700;font-size:1rem;margin-bottom:1rem;text-align:center;width:100%}\n"] }]
|
|
10139
|
+
}], ctorParameters: () => [{ type: TicketQrModalService }], propDecorators: { isCustomer: [{
|
|
10140
|
+
type: Input
|
|
10141
|
+
}] } });
|
|
10095
10142
|
|
|
10096
10143
|
class OrderItemsComponent {
|
|
10097
10144
|
ticketQrModalService;
|
|
10098
10145
|
order;
|
|
10146
|
+
isCustomer = false;
|
|
10099
10147
|
ticketCanOpenQr = ticketCanOpenQr;
|
|
10100
10148
|
constructor(ticketQrModalService) {
|
|
10101
10149
|
this.ticketQrModalService = ticketQrModalService;
|
|
@@ -10149,7 +10197,7 @@ class OrderItemsComponent {
|
|
|
10149
10197
|
this.ticketQrModalService.open(ticketUuid, description);
|
|
10150
10198
|
}
|
|
10151
10199
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderItemsComponent, deps: [{ token: TicketQrModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
10152
|
-
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 (showActionColumn) {\n <td class=\"order-items__table-body-cell actions\">\n @if (item.ticket && ticketCanOpenQr(order, item.ticket)) {\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 }\n\n @if (item.ticket && item.ticket.checked_in) {\n <app-badge text=\"Usado\" color=\"error\" size=\"xs\" />\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 (corporateBonds.length > 0 && totals.corporateBonds > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">\n Bonos corporativos ({{ corporateBonds.length }})\n </dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.corporateBonds > 0) {\n <span class=\"text-gray-900\"> ${{ totals.corporateBonds | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (vipRecharges.length > 0 && totals.vipRecharges > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">\n Recargas de tarjeta VIP ({{ vipRecharges.length }})\n </dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.vipRecharges > 0) {\n <span class=\"text-gray-900\"> ${{ totals.vipRecharges | 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", "tooltip"], outputs: ["clicked"] }, { kind: "component", type: TicketQrModalComponent, selector: "ticket-qr-modal" }, { kind: "component", type: OrderItemTypeBadgeComponent, selector: "order-item-type-badge", inputs: ["item", "size"] }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }], encapsulation: i0.ViewEncapsulation.None });
|
|
10200
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: OrderItemsComponent, isStandalone: true, selector: "order-items", inputs: { order: "order", isCustomer: "isCustomer" }, 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 (showActionColumn) {\n <td class=\"order-items__table-body-cell actions\">\n @if (item.ticket && ticketCanOpenQr(order, item.ticket)) {\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 }\n\n @if (item.ticket && item.ticket.checked_in) {\n <app-badge text=\"Usado\" color=\"error\" size=\"xs\" />\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 (corporateBonds.length > 0 && totals.corporateBonds > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">\n Bonos corporativos ({{ corporateBonds.length }})\n </dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.corporateBonds > 0) {\n <span class=\"text-gray-900\"> ${{ totals.corporateBonds | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (vipRecharges.length > 0 && totals.vipRecharges > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">\n Recargas de tarjeta VIP ({{ vipRecharges.length }})\n </dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.vipRecharges > 0) {\n <span class=\"text-gray-900\"> ${{ totals.vipRecharges | 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 [isCustomer]=\"isCustomer\" />\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", "tooltip"], outputs: ["clicked"] }, { kind: "component", type: TicketQrModalComponent, selector: "ticket-qr-modal", inputs: ["isCustomer"] }, { kind: "component", type: OrderItemTypeBadgeComponent, selector: "order-item-type-badge", inputs: ["item", "size"] }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }], encapsulation: i0.ViewEncapsulation.None });
|
|
10153
10201
|
}
|
|
10154
10202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: OrderItemsComponent, decorators: [{
|
|
10155
10203
|
type: Component,
|
|
@@ -10159,10 +10207,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
10159
10207
|
TicketQrModalComponent,
|
|
10160
10208
|
OrderItemTypeBadgeComponent,
|
|
10161
10209
|
AppBadgeComponent,
|
|
10162
|
-
], 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 (showActionColumn) {\n <td class=\"order-items__table-body-cell actions\">\n @if (item.ticket && ticketCanOpenQr(order, item.ticket)) {\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 }\n\n @if (item.ticket && item.ticket.checked_in) {\n <app-badge text=\"Usado\" color=\"error\" size=\"xs\" />\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 (corporateBonds.length > 0 && totals.corporateBonds > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">\n Bonos corporativos ({{ corporateBonds.length }})\n </dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.corporateBonds > 0) {\n <span class=\"text-gray-900\"> ${{ totals.corporateBonds | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (vipRecharges.length > 0 && totals.vipRecharges > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">\n Recargas de tarjeta VIP ({{ vipRecharges.length }})\n </dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.vipRecharges > 0) {\n <span class=\"text-gray-900\"> ${{ totals.vipRecharges | 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"] }]
|
|
10210
|
+
], 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 (showActionColumn) {\n <td class=\"order-items__table-body-cell actions\">\n @if (item.ticket && ticketCanOpenQr(order, item.ticket)) {\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 }\n\n @if (item.ticket && item.ticket.checked_in) {\n <app-badge text=\"Usado\" color=\"error\" size=\"xs\" />\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 (corporateBonds.length > 0 && totals.corporateBonds > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">\n Bonos corporativos ({{ corporateBonds.length }})\n </dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.corporateBonds > 0) {\n <span class=\"text-gray-900\"> ${{ totals.corporateBonds | number: '1.0-2' }} </span>\n }\n </dd>\n </div>\n }\n\n @if (vipRecharges.length > 0 && totals.vipRecharges > 0) {\n <div class=\"order-items__totals-item\">\n <dt class=\"order-items__totals-item-title\">\n Recargas de tarjeta VIP ({{ vipRecharges.length }})\n </dt>\n <dd class=\"order-items__totals-item-value\">\n @if (totals.vipRecharges > 0) {\n <span class=\"text-gray-900\"> ${{ totals.vipRecharges | 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 [isCustomer]=\"isCustomer\" />\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"] }]
|
|
10163
10211
|
}], ctorParameters: () => [{ type: TicketQrModalService }], propDecorators: { order: [{
|
|
10164
10212
|
type: Input,
|
|
10165
10213
|
args: [{ required: true }]
|
|
10214
|
+
}], isCustomer: [{
|
|
10215
|
+
type: Input
|
|
10166
10216
|
}] } });
|
|
10167
10217
|
|
|
10168
10218
|
class OrderDiscountAppliedComponent {
|