tickera-angular-components 0.0.1-dev.208 → 0.0.1-dev.209
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.
|
@@ -2459,6 +2459,63 @@ function noDiscount() {
|
|
|
2459
2459
|
};
|
|
2460
2460
|
}
|
|
2461
2461
|
|
|
2462
|
+
function buildSubscriptionVenueLabel(subscription) {
|
|
2463
|
+
const { venue } = subscription;
|
|
2464
|
+
return [venue.price_zone_name, venue.room_map_name, venue.hall_name, venue.venue_name]
|
|
2465
|
+
.filter((part) => !!part)
|
|
2466
|
+
.join(' - ');
|
|
2467
|
+
}
|
|
2468
|
+
function buildSubscriptionShowsLabel(subscription) {
|
|
2469
|
+
if (subscription.applies_to_all_shows)
|
|
2470
|
+
return 'Aplica para todas las obras.';
|
|
2471
|
+
if (subscription.applicable_shows.length === 0)
|
|
2472
|
+
return '';
|
|
2473
|
+
return `Aplica para: ${subscription.applicable_shows.map((show) => show.title).join(', ')}.`;
|
|
2474
|
+
}
|
|
2475
|
+
function formatCurrency(value) {
|
|
2476
|
+
return `$${Math.round(value).toLocaleString('es-CO')}`;
|
|
2477
|
+
}
|
|
2478
|
+
function getCustomerBenefitToasts(benefits, perspective = 'customer') {
|
|
2479
|
+
const subjectHas = perspective === 'customer' ? 'Tienes' : 'El cliente tiene';
|
|
2480
|
+
const toasts = [];
|
|
2481
|
+
if (benefits.subscription) {
|
|
2482
|
+
const sub = benefits.subscription;
|
|
2483
|
+
const venueLabel = buildSubscriptionVenueLabel(sub);
|
|
2484
|
+
const showsLabel = buildSubscriptionShowsLabel(sub);
|
|
2485
|
+
toasts.push({
|
|
2486
|
+
title: `${subjectHas} un Abono activo: ${sub.shows_remaining} de ${sub.shows_count} obras disponibles`,
|
|
2487
|
+
description: [venueLabel, showsLabel].filter(Boolean).join('. '),
|
|
2488
|
+
});
|
|
2489
|
+
}
|
|
2490
|
+
if (benefits.vip_card) {
|
|
2491
|
+
const vip = benefits.vip_card;
|
|
2492
|
+
const categoryName = vip.category_snapshot?.name ?? 'Tarjeta VIP';
|
|
2493
|
+
const discount = Number(vip.category_snapshot?.discount_percentage ?? 0);
|
|
2494
|
+
const serviceFeeExempt = !!vip.category_snapshot?.service_fee_exempt;
|
|
2495
|
+
const parts = [
|
|
2496
|
+
discount > 0 ? `${discount}% de descuento en boletas` : null,
|
|
2497
|
+
serviceFeeExempt ? 'exonera la tarifa de servicio' : null,
|
|
2498
|
+
`saldo disponible: ${formatCurrency(Number(vip.balance ?? 0))}`,
|
|
2499
|
+
].filter((part) => !!part);
|
|
2500
|
+
toasts.push({
|
|
2501
|
+
title: `${subjectHas} una Tarjeta VIP activa (${categoryName})`,
|
|
2502
|
+
description: `${parts.join(', ')}.`,
|
|
2503
|
+
});
|
|
2504
|
+
}
|
|
2505
|
+
if (benefits.gift_bonds.length > 0) {
|
|
2506
|
+
const count = benefits.gift_bonds.length;
|
|
2507
|
+
const totalValue = benefits.gift_bonds.reduce((sum, giftBond) => {
|
|
2508
|
+
const remaining = Number(giftBond.original_value ?? 0) - Number(giftBond.used_value ?? 0);
|
|
2509
|
+
return sum + remaining;
|
|
2510
|
+
}, 0);
|
|
2511
|
+
toasts.push({
|
|
2512
|
+
title: `${subjectHas} ${count} bono${count === 1 ? '' : 's'} de regalo disponible${count === 1 ? '' : 's'} para redimir`,
|
|
2513
|
+
description: `Valor total disponible: ${formatCurrency(totalValue)}.`,
|
|
2514
|
+
});
|
|
2515
|
+
}
|
|
2516
|
+
return toasts;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2462
2519
|
function parseJsonToFormDataAdvanced(imageGallery) {
|
|
2463
2520
|
const formData = new FormData();
|
|
2464
2521
|
if (!Array.isArray(imageGallery)) {
|
|
@@ -2850,15 +2907,10 @@ class ToastService {
|
|
|
2850
2907
|
constructor(platformId) {
|
|
2851
2908
|
this.platformId = platformId;
|
|
2852
2909
|
}
|
|
2853
|
-
show(message, type = 'info') {
|
|
2854
|
-
// ngx-sonner's toast items measure their own DOM node
|
|
2855
|
-
// (getBoundingClientRect) in ngAfterViewInit, which the SSR DOM doesn't
|
|
2856
|
-
// implement. Showing a toast to no one during server rendering is
|
|
2857
|
-
// meaningless anyway, so skip it there — it fires correctly client-side
|
|
2858
|
-
// once the browser (and the real user) is actually present.
|
|
2910
|
+
show(message, type = 'info', description) {
|
|
2859
2911
|
if (!isPlatformBrowser(this.platformId))
|
|
2860
2912
|
return;
|
|
2861
|
-
toast[type](message);
|
|
2913
|
+
toast[type](message, description ? { description } : undefined);
|
|
2862
2914
|
}
|
|
2863
2915
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ToastService, deps: [{ token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
2864
2916
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: ToastService, providedIn: 'root' });
|
|
@@ -11622,5 +11674,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
11622
11674
|
* Generated bundle index. Do not edit.
|
|
11623
11675
|
*/
|
|
11624
11676
|
|
|
11625
|
-
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 };
|
|
11677
|
+
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, getCustomerBenefitToasts, getCustomerFullname, getItemTypeIcon, getOrderDiscount, getStoredLanguage, numberToLetter$1 as numberToLetter, parseJsonToFormDataAdvanced, phoneCountryFlag, processElementsToRenderData, provideTickeraComponents, resolveLanguage, setStoredLanguage, ticketCanOpenQr, tintColor, transformImageToFile, transformUrlParams };
|
|
11626
11678
|
//# sourceMappingURL=tickera-angular-components.mjs.map
|