tickera-angular-components 0.0.1-dev.203 → 0.0.1-dev.205

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.
@@ -548,7 +548,9 @@ const PERFORMANCES_API_ROUTES = {
548
548
  reserve: (id) => `/performances/${id}/reserve`,
549
549
  ticketQrToken: (uuid) => `/performances/tickets/${uuid}/qr-token`,
550
550
  getAvailableDays: '/performances/available-days',
551
+ getAvailableDaysAdmin: '/performances/available-days/admin',
551
552
  publicAvailablePerformances: '/public/performances/daily',
553
+ dailyPerformancesAdmin: '/performances/daily/admin',
552
554
  pedagogicList: '/performances/pedagogic',
553
555
  pedagogicAvailability: (id) => `/performances/${id}/pedagogic-availability`,
554
556
  createPedagogicOrder: (id) => `/performances/${id}/pedagogic-orders`,
@@ -1087,6 +1089,7 @@ var PaymentMethod;
1087
1089
  PaymentMethod["INTERNAL_EXCHANGE"] = "internal_exchange";
1088
1090
  PaymentMethod["CLIENT_EXCHANGE"] = "client_exchange";
1089
1091
  PaymentMethod["MERCADO_PAGO"] = "mercado_pago";
1092
+ PaymentMethod["COURTESY"] = "courtesy";
1090
1093
  })(PaymentMethod || (PaymentMethod = {}));
1091
1094
 
1092
1095
  var VipCardStatus;
@@ -3106,7 +3109,7 @@ class PerformanceService {
3106
3109
  const apiRoute = `${PERFORMANCES_API_ROUTES.findAll}${queryString ? '?' + queryString : ''}`;
3107
3110
  return this.apiService.get(apiRoute);
3108
3111
  }
3109
- fetchDailyPerformances({ show_id, search, limit, date, }) {
3112
+ fetchDailyPerformances({ show_id, search, limit, date }, isAdmin = false) {
3110
3113
  const queryParams = new URLSearchParams();
3111
3114
  if (date)
3112
3115
  queryParams.append('date', date.toString());
@@ -3116,7 +3119,10 @@ class PerformanceService {
3116
3119
  queryParams.append('search', search);
3117
3120
  queryParams.append('limit', limit?.toString() ?? '100');
3118
3121
  const queryString = queryParams.toString();
3119
- const apiRoute = `${PERFORMANCES_API_ROUTES.publicAvailablePerformances}${queryString ? '?' + queryString : ''}`;
3122
+ const baseRoute = isAdmin
3123
+ ? PERFORMANCES_API_ROUTES.dailyPerformancesAdmin
3124
+ : PERFORMANCES_API_ROUTES.publicAvailablePerformances;
3125
+ const apiRoute = `${baseRoute}${queryString ? '?' + queryString : ''}`;
3120
3126
  return this.apiService.get(apiRoute);
3121
3127
  }
3122
3128
  loadPerformances({ showId, search } = {}) {
@@ -3140,12 +3146,15 @@ class PerformanceService {
3140
3146
  const apiRoute = PERFORMANCES_API_ROUTES[routeMethod](id);
3141
3147
  return this.apiService.get(apiRoute);
3142
3148
  }
3143
- fetchAvailableDays(params) {
3149
+ fetchAvailableDays(params, isAdmin = false) {
3144
3150
  const queryParams = new URLSearchParams();
3145
3151
  if (params?.show_id)
3146
3152
  queryParams.append('show_id', params.show_id.toString());
3147
3153
  const queryString = queryParams.toString();
3148
- const apiRoute = `${PERFORMANCES_API_ROUTES.getAvailableDays}${queryString ? '?' + queryString : ''}`;
3154
+ const baseRoute = isAdmin
3155
+ ? PERFORMANCES_API_ROUTES.getAvailableDaysAdmin
3156
+ : PERFORMANCES_API_ROUTES.getAvailableDays;
3157
+ const apiRoute = `${baseRoute}${queryString ? '?' + queryString : ''}`;
3149
3158
  return this.apiService.get(apiRoute);
3150
3159
  }
3151
3160
  createOne(data) {
@@ -9745,6 +9754,13 @@ class DaySelectorGridComponent {
9745
9754
  listEventService;
9746
9755
  toastService;
9747
9756
  displayMode = 'grid';
9757
+ /**
9758
+ * true cuando este selector se usa desde el canal backoffice: en ese
9759
+ * caso también deben aparecer las funciones PRIVATE (nunca PEDAGOGIC,
9760
+ * que siempre usa su propio flujo). false (por defecto) es el canal
9761
+ * ecommerce, que solo ve funciones PUBLIC.
9762
+ */
9763
+ isAdmin = false;
9748
9764
  loadingData = signal(true, ...(ngDevMode ? [{ debugName: "loadingData" }] : []));
9749
9765
  days = signal([], ...(ngDevMode ? [{ debugName: "days" }] : []));
9750
9766
  carouselTrack;
@@ -9764,7 +9780,7 @@ class DaySelectorGridComponent {
9764
9780
  loadData() {
9765
9781
  this.loadingData.set(true);
9766
9782
  const showId = this.listEventService.filteredShowId() ?? undefined;
9767
- this.performanceService.fetchAvailableDays({ show_id: showId }).subscribe({
9783
+ this.performanceService.fetchAvailableDays({ show_id: showId }, this.isAdmin).subscribe({
9768
9784
  next: (response) => {
9769
9785
  const days = response?.data?.days ?? [];
9770
9786
  this.days.set(days);
@@ -9797,7 +9813,7 @@ class DaySelectorGridComponent {
9797
9813
  track.scrollBy({ left: direction * (itemWidth + 8), behavior: 'smooth' });
9798
9814
  }
9799
9815
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DaySelectorGridComponent, deps: [{ token: PLATFORM_ID }, { token: PerformanceService }, { token: PerformancesListEventsService }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Component });
9800
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DaySelectorGridComponent, isStandalone: true, selector: "day-selector-grid", inputs: { displayMode: "displayMode" }, viewQueries: [{ propertyName: "carouselTrack", first: true, predicate: ["carouselTrack"], descendants: true }], ngImport: i0, template: "@if (loadingData()) {\n <div class=\"day-selector-grid\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; track $index) {\n <div class=\"day-selector-grid-skeleton-item\"></div>\n }\n </div>\n}\n\n@if (!loadingData() && days().length < 1) {\n <app-alert\n type=\"error\"\n text=\"No se encontraron funciones disponibles\"\n size=\"md\"\n [closeable]=\"false\"\n />\n}\n\n@if (days().length > 0) {\n <p class=\"day-selector-heading\">Selecciona un d\u00EDa</p>\n}\n\n@if (displayMode === 'carousel' && days().length > 0) {\n <div class=\"day-selector-carousel\">\n <button\n type=\"button\"\n (click)=\"scrollCarousel(-1)\"\n class=\"day-selector-carousel-arrow day-selector-carousel-arrow--left\"\n aria-label=\"Anterior\"\n >\n <i class=\"ri-arrow-left-s-line\"></i>\n </button>\n <div #carouselTrack class=\"day-selector-carousel-track\">\n @for (item of days(); track $index) {\n <button\n (click)=\"onToggle(item)\"\n class=\"day-selector-carousel-item\"\n [class.day-selector-item--active]=\"isDayActive(item)\"\n >\n <span class=\"day-selector-item-weekday\">\n {{ item.date | date: 'EEE' | uppercase }}\n </span>\n <span class=\"day-selector-item-day\">\n {{ item.date | date: 'dd' }}\n </span>\n <span class=\"day-selector-item-month\">\n {{ item.date | date: 'MMM' }}\n </span>\n <span class=\"day-selector-item-count\">\n {{ item.count | number: '1.0-2' }}\n </span>\n </button>\n }\n </div>\n <button\n type=\"button\"\n (click)=\"scrollCarousel(1)\"\n class=\"day-selector-carousel-arrow day-selector-carousel-arrow--right\"\n aria-label=\"Siguiente\"\n >\n <i class=\"ri-arrow-right-s-line\"></i>\n </button>\n </div>\n} @else {\n <div class=\"day-selector-grid\">\n @for (item of days(); track $index) {\n <button\n (click)=\"onToggle(item)\"\n class=\"day-selector-grid-item\"\n [class.day-selector-item--active]=\"isDayActive(item)\"\n >\n <span class=\"day-selector-item-weekday\">\n {{ item.date | date: 'EEE' | uppercase }}\n </span>\n <span class=\"day-selector-item-day\">\n {{ item.date | date: 'dd' }}\n </span>\n <span class=\"day-selector-item-month\">\n {{ item.date | date: 'MMM' }}\n </span>\n <span class=\"day-selector-item-count\">\n {{ item.count | number: '1.0-2' }}\n </span>\n </button>\n }\n </div>\n}\n", styles: [".day-selector-heading{font-size:11px;font-weight:600;letter-spacing:.25em;color:#6b7280;text-transform:uppercase}.day-selector-grid{margin-top:.75rem;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem}@media(min-width:640px){.day-selector-grid{grid-template-columns:repeat(10,minmax(0,1fr))}}.day-selector-grid-skeleton-item{height:6.5rem;width:100%;border-radius:.5rem;border:1px solid #262626;background-color:#171717;animation:day-selector-pulse 2s cubic-bezier(.4,0,.6,1) infinite}.day-selector-carousel-item,.day-selector-grid-item{display:flex;flex-direction:column;align-items:center;cursor:pointer;border-radius:.5rem;border:1px solid #404040;background-color:#171717;color:#fff;gap:.375rem;padding:.75rem .5rem;transition:all .2s ease-in-out;color:#1f2937}.day-selector-carousel-item:hover,.day-selector-grid-item:hover{background-color:#262626}.day-selector-item--active{box-shadow:0 0 0 1px #ef444480,0 0 16px #ef444459;border-color:#ef4444;background-color:#ef4444;color:#fff}.day-selector-item--active:hover{background-color:#dc2626;color:#fff}.day-selector-item-weekday{font-size:10px;font-weight:600;letter-spacing:.05em;color:#a3a3a3}.day-selector-item--active .day-selector-item-weekday{color:#fff}.day-selector-item-day{color:#fff;font-size:1.5rem;font-weight:800;line-height:1}.day-selector-item-month{font-size:10px;font-weight:500;letter-spacing:.05em;color:#a3a3a3}.day-selector-item--active .day-selector-item-month{color:#fff}.day-selector-item-count{background-color:#a3a3a3;border-radius:9999px;color:#171717;font-size:10px;font-weight:700;padding:1px .375rem}.day-selector-item--active .day-selector-item-count{background-color:#fff;color:#ef4444}.day-selector-carousel{position:relative;margin-top:.75rem}.day-selector-carousel-arrow{align-items:center;background-color:#262626;border-radius:9999px;border:1px solid #e5e5e5;box-shadow:0 1px 2px #0000000d;color:#fff;cursor:pointer;display:flex;height:2rem;justify-content:center;position:absolute;top:50%;transition:background-color .2s ease-in-out;transform:translateY(-50%);width:2rem;z-index:10}.day-selector-carousel-arrow--left{left:0}.day-selector-carousel-arrow--right{right:0}.day-selector-carousel-arrow:hover{background-color:#404040}.day-selector-carousel-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:.5rem;padding:.25rem 2.5rem;scroll-behavior:smooth}.day-selector-carousel-track::-webkit-scrollbar{display:none}.day-selector-carousel-item{scroll-snap-align:start;flex-shrink:0;width:7rem}@keyframes day-selector-pulse{0%,to{opacity:1}50%{opacity:.5}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppAlertComponent, selector: "app-alert", inputs: ["type", "text", "closeable", "size"] }, { kind: "pipe", type: i1$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] });
9816
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: DaySelectorGridComponent, isStandalone: true, selector: "day-selector-grid", inputs: { displayMode: "displayMode", isAdmin: "isAdmin" }, viewQueries: [{ propertyName: "carouselTrack", first: true, predicate: ["carouselTrack"], descendants: true }], ngImport: i0, template: "@if (loadingData()) {\n <div class=\"day-selector-grid\">\n @for (i of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; track $index) {\n <div class=\"day-selector-grid-skeleton-item\"></div>\n }\n </div>\n}\n\n@if (!loadingData() && days().length < 1) {\n <app-alert\n type=\"error\"\n text=\"No se encontraron funciones disponibles\"\n size=\"md\"\n [closeable]=\"false\"\n />\n}\n\n@if (days().length > 0) {\n <p class=\"day-selector-heading\">Selecciona un d\u00EDa</p>\n}\n\n@if (displayMode === 'carousel' && days().length > 0) {\n <div class=\"day-selector-carousel\">\n <button\n type=\"button\"\n (click)=\"scrollCarousel(-1)\"\n class=\"day-selector-carousel-arrow day-selector-carousel-arrow--left\"\n aria-label=\"Anterior\"\n >\n <i class=\"ri-arrow-left-s-line\"></i>\n </button>\n <div #carouselTrack class=\"day-selector-carousel-track\">\n @for (item of days(); track $index) {\n <button\n (click)=\"onToggle(item)\"\n class=\"day-selector-carousel-item\"\n [class.day-selector-item--active]=\"isDayActive(item)\"\n >\n <span class=\"day-selector-item-weekday\">\n {{ item.date | date: 'EEE' | uppercase }}\n </span>\n <span class=\"day-selector-item-day\">\n {{ item.date | date: 'dd' }}\n </span>\n <span class=\"day-selector-item-month\">\n {{ item.date | date: 'MMM' }}\n </span>\n <span class=\"day-selector-item-count\">\n {{ item.count | number: '1.0-2' }}\n </span>\n </button>\n }\n </div>\n <button\n type=\"button\"\n (click)=\"scrollCarousel(1)\"\n class=\"day-selector-carousel-arrow day-selector-carousel-arrow--right\"\n aria-label=\"Siguiente\"\n >\n <i class=\"ri-arrow-right-s-line\"></i>\n </button>\n </div>\n} @else {\n <div class=\"day-selector-grid\">\n @for (item of days(); track $index) {\n <button\n (click)=\"onToggle(item)\"\n class=\"day-selector-grid-item\"\n [class.day-selector-item--active]=\"isDayActive(item)\"\n >\n <span class=\"day-selector-item-weekday\">\n {{ item.date | date: 'EEE' | uppercase }}\n </span>\n <span class=\"day-selector-item-day\">\n {{ item.date | date: 'dd' }}\n </span>\n <span class=\"day-selector-item-month\">\n {{ item.date | date: 'MMM' }}\n </span>\n <span class=\"day-selector-item-count\">\n {{ item.count | number: '1.0-2' }}\n </span>\n </button>\n }\n </div>\n}\n", styles: [".day-selector-heading{font-size:11px;font-weight:600;letter-spacing:.25em;color:#6b7280;text-transform:uppercase}.day-selector-grid{margin-top:.75rem;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem}@media(min-width:640px){.day-selector-grid{grid-template-columns:repeat(10,minmax(0,1fr))}}.day-selector-grid-skeleton-item{height:6.5rem;width:100%;border-radius:.5rem;border:1px solid #262626;background-color:#171717;animation:day-selector-pulse 2s cubic-bezier(.4,0,.6,1) infinite}.day-selector-carousel-item,.day-selector-grid-item{display:flex;flex-direction:column;align-items:center;cursor:pointer;border-radius:.5rem;border:1px solid #404040;background-color:#171717;color:#fff;gap:.375rem;padding:.75rem .5rem;transition:all .2s ease-in-out;color:#1f2937}.day-selector-carousel-item:hover,.day-selector-grid-item:hover{background-color:#262626}.day-selector-item--active{box-shadow:0 0 0 1px #ef444480,0 0 16px #ef444459;border-color:#ef4444;background-color:#ef4444;color:#fff}.day-selector-item--active:hover{background-color:#dc2626;color:#fff}.day-selector-item-weekday{font-size:10px;font-weight:600;letter-spacing:.05em;color:#a3a3a3}.day-selector-item--active .day-selector-item-weekday{color:#fff}.day-selector-item-day{color:#fff;font-size:1.5rem;font-weight:800;line-height:1}.day-selector-item-month{font-size:10px;font-weight:500;letter-spacing:.05em;color:#a3a3a3}.day-selector-item--active .day-selector-item-month{color:#fff}.day-selector-item-count{background-color:#a3a3a3;border-radius:9999px;color:#171717;font-size:10px;font-weight:700;padding:1px .375rem}.day-selector-item--active .day-selector-item-count{background-color:#fff;color:#ef4444}.day-selector-carousel{position:relative;margin-top:.75rem}.day-selector-carousel-arrow{align-items:center;background-color:#262626;border-radius:9999px;border:1px solid #e5e5e5;box-shadow:0 1px 2px #0000000d;color:#fff;cursor:pointer;display:flex;height:2rem;justify-content:center;position:absolute;top:50%;transition:background-color .2s ease-in-out;transform:translateY(-50%);width:2rem;z-index:10}.day-selector-carousel-arrow--left{left:0}.day-selector-carousel-arrow--right{right:0}.day-selector-carousel-arrow:hover{background-color:#404040}.day-selector-carousel-track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:.5rem;padding:.25rem 2.5rem;scroll-behavior:smooth}.day-selector-carousel-track::-webkit-scrollbar{display:none}.day-selector-carousel-item{scroll-snap-align:start;flex-shrink:0;width:7rem}@keyframes day-selector-pulse{0%,to{opacity:1}50%{opacity:.5}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppAlertComponent, selector: "app-alert", inputs: ["type", "text", "closeable", "size"] }, { kind: "pipe", type: i1$1.UpperCasePipe, name: "uppercase" }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] });
9801
9817
  }
9802
9818
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: DaySelectorGridComponent, decorators: [{
9803
9819
  type: Component,
@@ -9807,6 +9823,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
9807
9823
  args: [PLATFORM_ID]
9808
9824
  }] }, { type: PerformanceService }, { type: PerformancesListEventsService }, { type: ToastService }], propDecorators: { displayMode: [{
9809
9825
  type: Input
9826
+ }], isAdmin: [{
9827
+ type: Input
9810
9828
  }], carouselTrack: [{
9811
9829
  type: ViewChild,
9812
9830
  args: ['carouselTrack']
@@ -9818,6 +9836,7 @@ class PerformanceCardComponent {
9818
9836
  linkText = 'Comprar entradas';
9819
9837
  linkUrlFn;
9820
9838
  linkQueryParams;
9839
+ PerformanceVisibilityType = PerformanceVisibilityType;
9821
9840
  constructor(listEventService) {
9822
9841
  this.listEventService = listEventService;
9823
9842
  }
@@ -9831,11 +9850,11 @@ class PerformanceCardComponent {
9831
9850
  return this.listEventService.selectedPerformance()?.id === this.card.id;
9832
9851
  }
9833
9852
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformanceCardComponent, deps: [{ token: PerformancesListEventsService }], target: i0.ɵɵFactoryTarget.Component });
9834
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: PerformanceCardComponent, isStandalone: true, selector: "performance-card", inputs: { card: "card", linkText: "linkText", linkUrlFn: "linkUrlFn", linkQueryParams: "linkQueryParams" }, ngImport: i0, template: "<div class=\"performance-card\" [class.performance-card--selected]=\"isSelected()\">\n <div class=\"performance-card-image\">\n @if (card.show.images && card.show.images.length > 0) {\n <img [src]=\"card.show.images[0].full_url\" class=\"performance-card-image-img\" />\n } @else {\n <img\n [src]=\"`https://placehold.co/400x400/1f2937/737373?text=${card.show.title}`\"\n class=\"performance-card-image-placeholder\"\n />\n }\n </div>\n\n <div class=\"performance-card-info\">\n <div class=\"performance-card-title\">\n {{ card.show.title }}\n </div>\n\n <div class=\"performance-card-datetime\">\n <span class=\"performance-card-date\">\n {{ card.start_time | date: `EEEE` | titlecase }}\n {{ card.start_time | date: `dd 'de' MMMM,` }}\n </span>\n\n <span class=\"performance-card-time\">\n {{ card.start_time | date: `hh:mm` }}\n </span>\n\n <span class=\"performance-card-meridiem\">\n {{ card.start_time | date: 'a' }}\n </span>\n </div>\n\n <ul class=\"performance-card-location\">\n @if (card.hall) {\n <li class=\"performance-card-location__item\">\n <i class=\"ri-armchair-line\"></i>\n <strong>Sala:</strong>\n <span>{{ card.hall.name }}</span>\n </li>\n }\n\n @if (card.venue) {\n <li class=\"performance-card-location__item\">\n <i class=\"ri-building-4-line\"></i>\n <strong>Teatro:</strong>\n <span>{{ card.venue.name }}</span>\n </li>\n }\n </ul>\n </div>\n\n <div class=\"performance-card-actions\">\n <app-badge\n [text]=\"`${card.available_tickets_count} entrada(s) disponible(s)`\"\n size=\"xs\"\n [color]=\"badgeColor\"\n />\n\n <div class=\"performance-card-price\">\n Desde\n\n <span class=\"performance-card-price-value\">\n ${{ card.zone_price_cheapest | number: '1.0-2' }}\n </span>\n </div>\n\n <app-link-button\n [style.width]=\"'100%'\"\n [route]=\"linkUrlFn ? linkUrlFn(card) : '#'\"\n [queryParams]=\"linkQueryParams ?? {}\"\n [text]=\"linkText\"\n icon=\"ri-coupon-line\"\n variant=\"primary\"\n size=\"xs\"\n />\n </div>\n</div>\n", styles: [".performance-card{align-items:center;background-color:#171717;border-radius:.5rem;border:1px solid #404040;display:flex;flex-direction:column;gap:1rem;justify-content:space-between;padding:1rem 1.25rem;transition:all .2s ease-in-out}@media(min-width:640px){.performance-card{flex-direction:row}}.performance-card:hover{border-color:#525252}.performance-card--selected{background-color:#262626;border-color:#ef4444;box-shadow:0 0 0 1px #ef444480,0 0 16px #ef444459}.performance-card--selected:hover{border-color:#ef4444}.performance-card-image{display:flex;border-radius:.125rem;overflow:hidden;height:auto;min-height:6rem;width:100%}@media(min-width:640px){.performance-card-image{height:6rem;width:6rem}}.performance-card-image-img{object-fit:contain;object-position:center;max-height:100%;max-width:100%;margin-left:auto;margin-right:auto}.performance-card-image-placeholder{display:flex;background-color:#e5e7eb;height:6rem;width:100%}.performance-card-info{display:flex;flex-direction:column;flex:1;gap:.5rem;width:100%}.performance-card-title{color:#e5e7eb;font-size:1.5rem;font-weight:800;line-height:1}.performance-card--selected .performance-card-title{color:#f3f4f6}.performance-card-datetime{line-height:1}.performance-card-date{font-size:.875rem;color:#9ca3af}.performance-card-time{font-weight:800;font-size:1.125rem;color:#e5e7eb}.performance-card-meridiem{font-weight:800;font-size:.875rem;color:#fff}.performance-card--selected .performance-card-meridiem{color:#ef4444}.performance-card-price{font-size:1rem;color:#9ca3af;line-height:1}.performance-card-price-value{color:#d1d5db;font-weight:600}.performance-card-location{align-items:flex-start;display:flex;flex-flow:row wrap;gap:1rem;list-style:none;margin:0;padding:0;width:100%}.performance-card-location__item{color:#a3a3a3;align-self:center;display:flex;flex-flow:row nowrap;font-size:.75rem;justify-content:flex-start;gap:.25rem}.performance-card-actions{align-items:center;display:flex;flex-direction:column;gap:.5rem;width:100%}@media(min-width:640px){.performance-card-actions{max-width:200px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppLinkButtonComponent, selector: "app-link-button", inputs: ["disabled", "loading", "target", "text", "icon", "loadingText", "route", "queryParams", "size", "variant", "tooltip"] }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] });
9853
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: PerformanceCardComponent, isStandalone: true, selector: "performance-card", inputs: { card: "card", linkText: "linkText", linkUrlFn: "linkUrlFn", linkQueryParams: "linkQueryParams" }, ngImport: i0, template: "<div class=\"performance-card\" [class.performance-card--selected]=\"isSelected()\">\n <div class=\"performance-card-image\">\n @if (card.show.images && card.show.images.length > 0) {\n <img [src]=\"card.show.images[0].full_url\" class=\"performance-card-image-img\" />\n } @else {\n <img\n [src]=\"`https://placehold.co/400x400/1f2937/737373?text=${card.show.title}`\"\n class=\"performance-card-image-placeholder\"\n />\n }\n </div>\n\n <div class=\"performance-card-info\">\n <div class=\"performance-card-title\">\n {{ card.show.title }}\n\n @if (card.visibility_type === PerformanceVisibilityType.PRIVATE) {\n <app-badge\n text=\"Funci\u00F3n privada\"\n size=\"xs\"\n color=\"warning\"\n [title]=\"card.private_audience_label ?? ''\"\n />\n }\n </div>\n\n <div class=\"performance-card-datetime\">\n <span class=\"performance-card-date\">\n {{ card.start_time | date: `EEEE` | titlecase }}\n {{ card.start_time | date: `dd 'de' MMMM,` }}\n </span>\n\n <span class=\"performance-card-time\">\n {{ card.start_time | date: `hh:mm` }}\n </span>\n\n <span class=\"performance-card-meridiem\">\n {{ card.start_time | date: 'a' }}\n </span>\n </div>\n\n <ul class=\"performance-card-location\">\n @if (card.hall) {\n <li class=\"performance-card-location__item\">\n <i class=\"ri-armchair-line\"></i>\n <strong>Sala:</strong>\n <span>{{ card.hall.name }}</span>\n </li>\n }\n\n @if (card.venue) {\n <li class=\"performance-card-location__item\">\n <i class=\"ri-building-4-line\"></i>\n <strong>Teatro:</strong>\n <span>{{ card.venue.name }}</span>\n </li>\n }\n </ul>\n </div>\n\n <div class=\"performance-card-actions\">\n <app-badge\n [text]=\"`${card.available_tickets_count} entrada(s) disponible(s)`\"\n size=\"xs\"\n [color]=\"badgeColor\"\n />\n\n <div class=\"performance-card-price\">\n Desde\n\n <span class=\"performance-card-price-value\">\n ${{ card.zone_price_cheapest | number: '1.0-2' }}\n </span>\n </div>\n\n <app-link-button\n [style.width]=\"'100%'\"\n [route]=\"linkUrlFn ? linkUrlFn(card) : '#'\"\n [queryParams]=\"linkQueryParams ?? {}\"\n [text]=\"linkText\"\n icon=\"ri-coupon-line\"\n variant=\"primary\"\n size=\"xs\"\n />\n </div>\n</div>\n", styles: [".performance-card{align-items:center;background-color:#171717;border-radius:.5rem;border:1px solid #404040;display:flex;flex-direction:column;gap:1rem;justify-content:space-between;padding:1rem 1.25rem;transition:all .2s ease-in-out}@media(min-width:640px){.performance-card{flex-direction:row}}.performance-card:hover{border-color:#525252}.performance-card--selected{background-color:#262626;border-color:#ef4444;box-shadow:0 0 0 1px #ef444480,0 0 16px #ef444459}.performance-card--selected:hover{border-color:#ef4444}.performance-card-image{display:flex;border-radius:.125rem;overflow:hidden;height:auto;min-height:6rem;width:100%}@media(min-width:640px){.performance-card-image{height:6rem;width:6rem}}.performance-card-image-img{object-fit:contain;object-position:center;max-height:100%;max-width:100%;margin-left:auto;margin-right:auto}.performance-card-image-placeholder{display:flex;background-color:#e5e7eb;height:6rem;width:100%}.performance-card-info{display:flex;flex-direction:column;flex:1;gap:.5rem;width:100%}.performance-card-title{color:#e5e7eb;font-size:1.5rem;font-weight:800;line-height:1}.performance-card--selected .performance-card-title{color:#f3f4f6}.performance-card-datetime{line-height:1}.performance-card-date{font-size:.875rem;color:#9ca3af}.performance-card-time{font-weight:800;font-size:1.125rem;color:#e5e7eb}.performance-card-meridiem{font-weight:800;font-size:.875rem;color:#fff}.performance-card--selected .performance-card-meridiem{color:#ef4444}.performance-card-price{font-size:1rem;color:#9ca3af;line-height:1}.performance-card-price-value{color:#d1d5db;font-weight:600}.performance-card-location{align-items:flex-start;display:flex;flex-flow:row wrap;gap:1rem;list-style:none;margin:0;padding:0;width:100%}.performance-card-location__item{color:#a3a3a3;align-self:center;display:flex;flex-flow:row nowrap;font-size:.75rem;justify-content:flex-start;gap:.25rem}.performance-card-actions{align-items:center;display:flex;flex-direction:column;gap:.5rem;width:100%}@media(min-width:640px){.performance-card-actions{max-width:200px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: AppLinkButtonComponent, selector: "app-link-button", inputs: ["disabled", "loading", "target", "text", "icon", "loadingText", "route", "queryParams", "size", "variant", "tooltip"] }, { kind: "component", type: AppBadgeComponent, selector: "app-badge", inputs: ["text", "color", "size", "bordered", "backgroundColor", "textColor"] }, { kind: "pipe", type: i1$1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1$1.TitleCasePipe, name: "titlecase" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] });
9835
9854
  }
9836
9855
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformanceCardComponent, decorators: [{
9837
9856
  type: Component,
9838
- args: [{ selector: 'performance-card', standalone: true, imports: [CommonModule, AppLinkButtonComponent, AppBadgeComponent], template: "<div class=\"performance-card\" [class.performance-card--selected]=\"isSelected()\">\n <div class=\"performance-card-image\">\n @if (card.show.images && card.show.images.length > 0) {\n <img [src]=\"card.show.images[0].full_url\" class=\"performance-card-image-img\" />\n } @else {\n <img\n [src]=\"`https://placehold.co/400x400/1f2937/737373?text=${card.show.title}`\"\n class=\"performance-card-image-placeholder\"\n />\n }\n </div>\n\n <div class=\"performance-card-info\">\n <div class=\"performance-card-title\">\n {{ card.show.title }}\n </div>\n\n <div class=\"performance-card-datetime\">\n <span class=\"performance-card-date\">\n {{ card.start_time | date: `EEEE` | titlecase }}\n {{ card.start_time | date: `dd 'de' MMMM,` }}\n </span>\n\n <span class=\"performance-card-time\">\n {{ card.start_time | date: `hh:mm` }}\n </span>\n\n <span class=\"performance-card-meridiem\">\n {{ card.start_time | date: 'a' }}\n </span>\n </div>\n\n <ul class=\"performance-card-location\">\n @if (card.hall) {\n <li class=\"performance-card-location__item\">\n <i class=\"ri-armchair-line\"></i>\n <strong>Sala:</strong>\n <span>{{ card.hall.name }}</span>\n </li>\n }\n\n @if (card.venue) {\n <li class=\"performance-card-location__item\">\n <i class=\"ri-building-4-line\"></i>\n <strong>Teatro:</strong>\n <span>{{ card.venue.name }}</span>\n </li>\n }\n </ul>\n </div>\n\n <div class=\"performance-card-actions\">\n <app-badge\n [text]=\"`${card.available_tickets_count} entrada(s) disponible(s)`\"\n size=\"xs\"\n [color]=\"badgeColor\"\n />\n\n <div class=\"performance-card-price\">\n Desde\n\n <span class=\"performance-card-price-value\">\n ${{ card.zone_price_cheapest | number: '1.0-2' }}\n </span>\n </div>\n\n <app-link-button\n [style.width]=\"'100%'\"\n [route]=\"linkUrlFn ? linkUrlFn(card) : '#'\"\n [queryParams]=\"linkQueryParams ?? {}\"\n [text]=\"linkText\"\n icon=\"ri-coupon-line\"\n variant=\"primary\"\n size=\"xs\"\n />\n </div>\n</div>\n", styles: [".performance-card{align-items:center;background-color:#171717;border-radius:.5rem;border:1px solid #404040;display:flex;flex-direction:column;gap:1rem;justify-content:space-between;padding:1rem 1.25rem;transition:all .2s ease-in-out}@media(min-width:640px){.performance-card{flex-direction:row}}.performance-card:hover{border-color:#525252}.performance-card--selected{background-color:#262626;border-color:#ef4444;box-shadow:0 0 0 1px #ef444480,0 0 16px #ef444459}.performance-card--selected:hover{border-color:#ef4444}.performance-card-image{display:flex;border-radius:.125rem;overflow:hidden;height:auto;min-height:6rem;width:100%}@media(min-width:640px){.performance-card-image{height:6rem;width:6rem}}.performance-card-image-img{object-fit:contain;object-position:center;max-height:100%;max-width:100%;margin-left:auto;margin-right:auto}.performance-card-image-placeholder{display:flex;background-color:#e5e7eb;height:6rem;width:100%}.performance-card-info{display:flex;flex-direction:column;flex:1;gap:.5rem;width:100%}.performance-card-title{color:#e5e7eb;font-size:1.5rem;font-weight:800;line-height:1}.performance-card--selected .performance-card-title{color:#f3f4f6}.performance-card-datetime{line-height:1}.performance-card-date{font-size:.875rem;color:#9ca3af}.performance-card-time{font-weight:800;font-size:1.125rem;color:#e5e7eb}.performance-card-meridiem{font-weight:800;font-size:.875rem;color:#fff}.performance-card--selected .performance-card-meridiem{color:#ef4444}.performance-card-price{font-size:1rem;color:#9ca3af;line-height:1}.performance-card-price-value{color:#d1d5db;font-weight:600}.performance-card-location{align-items:flex-start;display:flex;flex-flow:row wrap;gap:1rem;list-style:none;margin:0;padding:0;width:100%}.performance-card-location__item{color:#a3a3a3;align-self:center;display:flex;flex-flow:row nowrap;font-size:.75rem;justify-content:flex-start;gap:.25rem}.performance-card-actions{align-items:center;display:flex;flex-direction:column;gap:.5rem;width:100%}@media(min-width:640px){.performance-card-actions{max-width:200px}}\n"] }]
9857
+ args: [{ selector: 'performance-card', standalone: true, imports: [CommonModule, AppLinkButtonComponent, AppBadgeComponent], template: "<div class=\"performance-card\" [class.performance-card--selected]=\"isSelected()\">\n <div class=\"performance-card-image\">\n @if (card.show.images && card.show.images.length > 0) {\n <img [src]=\"card.show.images[0].full_url\" class=\"performance-card-image-img\" />\n } @else {\n <img\n [src]=\"`https://placehold.co/400x400/1f2937/737373?text=${card.show.title}`\"\n class=\"performance-card-image-placeholder\"\n />\n }\n </div>\n\n <div class=\"performance-card-info\">\n <div class=\"performance-card-title\">\n {{ card.show.title }}\n\n @if (card.visibility_type === PerformanceVisibilityType.PRIVATE) {\n <app-badge\n text=\"Funci\u00F3n privada\"\n size=\"xs\"\n color=\"warning\"\n [title]=\"card.private_audience_label ?? ''\"\n />\n }\n </div>\n\n <div class=\"performance-card-datetime\">\n <span class=\"performance-card-date\">\n {{ card.start_time | date: `EEEE` | titlecase }}\n {{ card.start_time | date: `dd 'de' MMMM,` }}\n </span>\n\n <span class=\"performance-card-time\">\n {{ card.start_time | date: `hh:mm` }}\n </span>\n\n <span class=\"performance-card-meridiem\">\n {{ card.start_time | date: 'a' }}\n </span>\n </div>\n\n <ul class=\"performance-card-location\">\n @if (card.hall) {\n <li class=\"performance-card-location__item\">\n <i class=\"ri-armchair-line\"></i>\n <strong>Sala:</strong>\n <span>{{ card.hall.name }}</span>\n </li>\n }\n\n @if (card.venue) {\n <li class=\"performance-card-location__item\">\n <i class=\"ri-building-4-line\"></i>\n <strong>Teatro:</strong>\n <span>{{ card.venue.name }}</span>\n </li>\n }\n </ul>\n </div>\n\n <div class=\"performance-card-actions\">\n <app-badge\n [text]=\"`${card.available_tickets_count} entrada(s) disponible(s)`\"\n size=\"xs\"\n [color]=\"badgeColor\"\n />\n\n <div class=\"performance-card-price\">\n Desde\n\n <span class=\"performance-card-price-value\">\n ${{ card.zone_price_cheapest | number: '1.0-2' }}\n </span>\n </div>\n\n <app-link-button\n [style.width]=\"'100%'\"\n [route]=\"linkUrlFn ? linkUrlFn(card) : '#'\"\n [queryParams]=\"linkQueryParams ?? {}\"\n [text]=\"linkText\"\n icon=\"ri-coupon-line\"\n variant=\"primary\"\n size=\"xs\"\n />\n </div>\n</div>\n", styles: [".performance-card{align-items:center;background-color:#171717;border-radius:.5rem;border:1px solid #404040;display:flex;flex-direction:column;gap:1rem;justify-content:space-between;padding:1rem 1.25rem;transition:all .2s ease-in-out}@media(min-width:640px){.performance-card{flex-direction:row}}.performance-card:hover{border-color:#525252}.performance-card--selected{background-color:#262626;border-color:#ef4444;box-shadow:0 0 0 1px #ef444480,0 0 16px #ef444459}.performance-card--selected:hover{border-color:#ef4444}.performance-card-image{display:flex;border-radius:.125rem;overflow:hidden;height:auto;min-height:6rem;width:100%}@media(min-width:640px){.performance-card-image{height:6rem;width:6rem}}.performance-card-image-img{object-fit:contain;object-position:center;max-height:100%;max-width:100%;margin-left:auto;margin-right:auto}.performance-card-image-placeholder{display:flex;background-color:#e5e7eb;height:6rem;width:100%}.performance-card-info{display:flex;flex-direction:column;flex:1;gap:.5rem;width:100%}.performance-card-title{color:#e5e7eb;font-size:1.5rem;font-weight:800;line-height:1}.performance-card--selected .performance-card-title{color:#f3f4f6}.performance-card-datetime{line-height:1}.performance-card-date{font-size:.875rem;color:#9ca3af}.performance-card-time{font-weight:800;font-size:1.125rem;color:#e5e7eb}.performance-card-meridiem{font-weight:800;font-size:.875rem;color:#fff}.performance-card--selected .performance-card-meridiem{color:#ef4444}.performance-card-price{font-size:1rem;color:#9ca3af;line-height:1}.performance-card-price-value{color:#d1d5db;font-weight:600}.performance-card-location{align-items:flex-start;display:flex;flex-flow:row wrap;gap:1rem;list-style:none;margin:0;padding:0;width:100%}.performance-card-location__item{color:#a3a3a3;align-self:center;display:flex;flex-flow:row nowrap;font-size:.75rem;justify-content:flex-start;gap:.25rem}.performance-card-actions{align-items:center;display:flex;flex-direction:column;gap:.5rem;width:100%}@media(min-width:640px){.performance-card-actions{max-width:200px}}\n"] }]
9839
9858
  }], ctorParameters: () => [{ type: PerformancesListEventsService }], propDecorators: { card: [{
9840
9859
  type: Input,
9841
9860
  args: [{ required: true }]
@@ -9855,6 +9874,13 @@ class PerformanceCardListComponent {
9855
9874
  linkText = 'Comprar entradas';
9856
9875
  linkUrlFn;
9857
9876
  linkQueryParams;
9877
+ /**
9878
+ * true cuando esta lista se usa desde el canal backoffice: en ese caso
9879
+ * también deben aparecer las funciones PRIVATE (nunca PEDAGOGIC, que
9880
+ * siempre usa su propio flujo). false (por defecto) es el canal
9881
+ * ecommerce, que solo ve funciones PUBLIC.
9882
+ */
9883
+ isAdmin = false;
9858
9884
  loadingData = signal(true, ...(ngDevMode ? [{ debugName: "loadingData" }] : []));
9859
9885
  performances = signal([], ...(ngDevMode ? [{ debugName: "performances" }] : []));
9860
9886
  constructor(platformId, performanceService, listEventService, toastService) {
@@ -9890,7 +9916,9 @@ class PerformanceCardListComponent {
9890
9916
  this.loadingData.set(false);
9891
9917
  return;
9892
9918
  }
9893
- this.performanceService.fetchDailyPerformances({ date, show_id: showId }).subscribe({
9919
+ this.performanceService
9920
+ .fetchDailyPerformances({ date, show_id: showId }, this.isAdmin)
9921
+ .subscribe({
9894
9922
  next: (response) => {
9895
9923
  this.performances.set(response?.data?.performances ?? []);
9896
9924
  this.loadingData.set(false);
@@ -9905,7 +9933,7 @@ class PerformanceCardListComponent {
9905
9933
  return this.listEventService.selectedDay()?.date ?? null;
9906
9934
  }
9907
9935
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformanceCardListComponent, deps: [{ token: PLATFORM_ID }, { token: PerformanceService }, { token: PerformancesListEventsService }, { token: ToastService }], target: i0.ɵɵFactoryTarget.Component });
9908
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: PerformanceCardListComponent, isStandalone: true, selector: "performance-card-list", inputs: { linkText: "linkText", linkUrlFn: "linkUrlFn", linkQueryParams: "linkQueryParams" }, ngImport: i0, template: "@if (selectedDayDate) {\n <p class=\"performance-card-list-heading\">\n <span>Funciones disponibles:</span>\n <span class=\"performance-card-list-heading-date\">\n el {{ selectedDayDate | date: \"EEEE d 'de' MMMM\" }}\n </span>\n </p>\n}\n\n<div class=\"performance-card-list\">\n @if (loadingData()) {\n @for (i of [1, 2]; track $index) {\n <div class=\"performance-card-list-skeleton\"></div>\n }\n }\n\n @for (card of performances(); track $index) {\n <performance-card\n [card]=\"card\"\n [linkQueryParams]=\"linkQueryParams\"\n [linkText]=\"linkText\"\n [linkUrlFn]=\"linkUrlFn\"\n />\n }\n</div>\n", styles: [".performance-card-list-heading{font-size:11px;font-weight:700;letter-spacing:.25em;color:#6b7280;text-transform:uppercase}.performance-card-list-heading-date{color:#6b7280}@media(prefers-color-scheme:dark){.performance-card-list-heading-date{color:#9ca3af}}.performance-card-list{margin-top:1rem;display:flex;flex-direction:column;gap:.5rem;width:100%}.performance-card-list-skeleton{height:10rem;width:100%;border-radius:.5rem;border:1px solid #e5e7eb;background-color:#f3f4f6;animation:performance-card-list-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@media(prefers-color-scheme:dark){.performance-card-list-skeleton{border-color:#ffffff1a;background-color:#ffffff08}}@keyframes performance-card-list-pulse{0%,to{opacity:1}50%{opacity:.5}}\n"], dependencies: [{ kind: "component", type: PerformanceCardComponent, selector: "performance-card", inputs: ["card", "linkText", "linkUrlFn", "linkQueryParams"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] });
9936
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: PerformanceCardListComponent, isStandalone: true, selector: "performance-card-list", inputs: { linkText: "linkText", linkUrlFn: "linkUrlFn", linkQueryParams: "linkQueryParams", isAdmin: "isAdmin" }, ngImport: i0, template: "@if (selectedDayDate) {\n <p class=\"performance-card-list-heading\">\n <span>Funciones disponibles:</span>\n <span class=\"performance-card-list-heading-date\">\n el {{ selectedDayDate | date: \"EEEE d 'de' MMMM\" }}\n </span>\n </p>\n}\n\n<div class=\"performance-card-list\">\n @if (loadingData()) {\n @for (i of [1, 2]; track $index) {\n <div class=\"performance-card-list-skeleton\"></div>\n }\n }\n\n @for (card of performances(); track $index) {\n <performance-card\n [card]=\"card\"\n [linkQueryParams]=\"linkQueryParams\"\n [linkText]=\"linkText\"\n [linkUrlFn]=\"linkUrlFn\"\n />\n }\n</div>\n", styles: [".performance-card-list-heading{font-size:11px;font-weight:700;letter-spacing:.25em;color:#6b7280;text-transform:uppercase}.performance-card-list-heading-date{color:#6b7280}@media(prefers-color-scheme:dark){.performance-card-list-heading-date{color:#9ca3af}}.performance-card-list{margin-top:1rem;display:flex;flex-direction:column;gap:.5rem;width:100%}.performance-card-list-skeleton{height:10rem;width:100%;border-radius:.5rem;border:1px solid #e5e7eb;background-color:#f3f4f6;animation:performance-card-list-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@media(prefers-color-scheme:dark){.performance-card-list-skeleton{border-color:#ffffff1a;background-color:#ffffff08}}@keyframes performance-card-list-pulse{0%,to{opacity:1}50%{opacity:.5}}\n"], dependencies: [{ kind: "component", type: PerformanceCardComponent, selector: "performance-card", inputs: ["card", "linkText", "linkUrlFn", "linkQueryParams"] }, { kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }] });
9909
9937
  }
9910
9938
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: PerformanceCardListComponent, decorators: [{
9911
9939
  type: Component,
@@ -9919,6 +9947,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
9919
9947
  type: Input
9920
9948
  }], linkQueryParams: [{
9921
9949
  type: Input
9950
+ }], isAdmin: [{
9951
+ type: Input
9922
9952
  }] } });
9923
9953
 
9924
9954
  class PerformanceStepperComponent {