feat: add event_date_text to Tenant interface and update StoreHomePageComponent to display formatted event dates
This commit is contained in:
@@ -106,6 +106,7 @@ export interface Tenant {
|
||||
footer_logo: string;
|
||||
website_type_code?: string | null;
|
||||
website_type?: WebsiteType | null;
|
||||
event_date_text?: string | null;
|
||||
extras?: WebsiteExtras;
|
||||
event?: TenantEvent | null;
|
||||
selected_bank_account_id?: number | null;
|
||||
|
||||
@@ -213,6 +213,7 @@ describe('StoreHomePageComponent', () => {
|
||||
},
|
||||
],
|
||||
};
|
||||
tenant.event_date_text = '5 y 6 de Diciembre 2026';
|
||||
tenant.website_type_code = 'onticket';
|
||||
tenant.social_media = [
|
||||
{
|
||||
@@ -259,7 +260,7 @@ describe('StoreHomePageComponent', () => {
|
||||
expect(hero.textContent).toContain('Fiesta Fútbol Infantil');
|
||||
expect(hero.textContent).toContain('Viví una jornada inolvidable de fútbol infantil.');
|
||||
expect(hero.textContent).toContain('Rosario, Santa Fe');
|
||||
expect(hero.textContent).toContain('2026-12-05, 2026-12-06');
|
||||
expect(hero.textContent).toContain('5 y 6 de Diciembre 2026');
|
||||
const heroComponent = fixture.debugElement.query(By.directive(HeroBannerComponent))
|
||||
.componentInstance as HeroBannerComponent;
|
||||
expect(heroComponent.eventConfig?.contact).toEqual(tenant.social_media);
|
||||
|
||||
@@ -75,6 +75,7 @@ export class StoreHomePageComponent implements OnInit, OnDestroy {
|
||||
id: tenant.id,
|
||||
title: event.title,
|
||||
location: event.location,
|
||||
dates_text: tenant.event_date_text,
|
||||
dates: event.dates.map((eventDate) => ({
|
||||
id: eventDate.id,
|
||||
date: eventDate.date,
|
||||
|
||||
Reference in New Issue
Block a user