diff --git a/src/app/core/services/tenant.interface.ts b/src/app/core/services/tenant.interface.ts index 267ca26..b7ef734 100644 --- a/src/app/core/services/tenant.interface.ts +++ b/src/app/core/services/tenant.interface.ts @@ -12,6 +12,11 @@ export interface BankAccount { export interface WebsiteType { codigo: string; nombre: string; + primary_color: string | null; + secondary_color: string | null; + danger_color: string | null; + success_color: string | null; + site_logo: string | null; } export interface HeroConfig { @@ -22,11 +27,17 @@ export interface HeroConfig { button_href?: string | null; } +export interface EventDate { + date: string; + start_time: string; + end_time: string; +} + export interface EventConfig { title?: string | null; location?: string | null; dates_text?: string | null; - dates?: string[] | null; + dates?: EventDate[] | null; } export interface WebsiteExtras { diff --git a/src/app/features/store/pages/store-home-page/store-home-page.component.spec.ts b/src/app/features/store/pages/store-home-page/store-home-page.component.spec.ts index 334cac9..de69245 100644 --- a/src/app/features/store/pages/store-home-page/store-home-page.component.spec.ts +++ b/src/app/features/store/pages/store-home-page/store-home-page.component.spec.ts @@ -103,7 +103,15 @@ function createTenant(extras: Tenant['extras'] = {}): Tenant { header_logo: '/header.png', footer_logo: '/footer.png', website_type_code: 'shopit', - website_type: { codigo: 'shopit', nombre: 'ShopIt' }, + website_type: { + codigo: 'shopit', + nombre: 'ShopIt', + primary_color: null, + secondary_color: null, + danger_color: null, + success_color: null, + site_logo: null, + }, extras, categories: [], }; @@ -188,11 +196,25 @@ describe('StoreHomePageComponent', () => { title: 'Fiesta FĂștbol Infantil', location: 'Rosario, Santa Fe', dates_text: '5 y 6 de diciembre de 2026', - dates: ['2026-12-05'], + dates: [ + { + date: '2026-12-05', + start_time: '09:00', + end_time: '18:00', + }, + ], }, }); tenant.website_type_code = 'onticket'; - tenant.website_type = { codigo: 'onticket', nombre: 'OnTicket' }; + tenant.website_type = { + codigo: 'onticket', + nombre: 'OnTicket', + primary_color: null, + secondary_color: null, + danger_color: null, + success_color: null, + site_logo: null, + }; await TestBed.configureTestingModule({ imports: [StoreHomePageComponent], diff --git a/src/app/shared/components/hero-banner/hero-banner.component.ts b/src/app/shared/components/hero-banner/hero-banner.component.ts index 5662c57..2a32e6b 100644 --- a/src/app/shared/components/hero-banner/hero-banner.component.ts +++ b/src/app/shared/components/hero-banner/hero-banner.component.ts @@ -25,6 +25,6 @@ export class HeroBannerComponent { return ''; } - return this.eventConfig.dates.join(', '); + return this.eventConfig.dates.map(({ date }) => date).join(', '); } }