refactor(storefront): consume storefront website type
This commit is contained in:
@@ -19,16 +19,6 @@ export interface BankAccount {
|
|||||||
cvu: string;
|
cvu: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
export interface HeroConfig {
|
||||||
background_image_id?: string | ResponsiveImage | null;
|
background_image_id?: string | ResponsiveImage | null;
|
||||||
title_html?: string | null;
|
title_html?: string | null;
|
||||||
@@ -131,8 +121,7 @@ export interface Tenant {
|
|||||||
footer_logo: string;
|
footer_logo: string;
|
||||||
header_bg_image?: string | null;
|
header_bg_image?: string | null;
|
||||||
footer_bg_image?: string | null;
|
footer_bg_image?: string | null;
|
||||||
website_type_code?: string | null;
|
storefront_website_type_code?: string | null;
|
||||||
website_type?: WebsiteType | null;
|
|
||||||
event_date_text?: string | null;
|
event_date_text?: string | null;
|
||||||
extras?: WebsiteExtras;
|
extras?: WebsiteExtras;
|
||||||
event?: TenantEvent | null;
|
event?: TenantEvent | null;
|
||||||
|
|||||||
@@ -107,16 +107,7 @@ function createTenant(extras: Tenant['extras'] = {}): Tenant {
|
|||||||
footer_bg_color: '#ffffff',
|
footer_bg_color: '#ffffff',
|
||||||
header_logo: '/header.png',
|
header_logo: '/header.png',
|
||||||
footer_logo: '/footer.png',
|
footer_logo: '/footer.png',
|
||||||
website_type_code: 'shopit',
|
storefront_website_type_code: 'shopit',
|
||||||
website_type: {
|
|
||||||
codigo: 'shopit',
|
|
||||||
nombre: 'ShopIt',
|
|
||||||
primary_color: null,
|
|
||||||
secondary_color: null,
|
|
||||||
danger_color: null,
|
|
||||||
success_color: null,
|
|
||||||
site_logo: null,
|
|
||||||
},
|
|
||||||
extras,
|
extras,
|
||||||
categories: [],
|
categories: [],
|
||||||
};
|
};
|
||||||
@@ -247,7 +238,7 @@ describe('StoreHomePageComponent', () => {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
tenant.event_date_text = '5 y 6 de Diciembre 2026';
|
tenant.event_date_text = '5 y 6 de Diciembre 2026';
|
||||||
tenant.website_type_code = 'onticket';
|
tenant.storefront_website_type_code = 'onticket';
|
||||||
tenant.social_media = [
|
tenant.social_media = [
|
||||||
{
|
{
|
||||||
code: 'whatsapp',
|
code: 'whatsapp',
|
||||||
@@ -256,15 +247,6 @@ describe('StoreHomePageComponent', () => {
|
|||||||
url: 'https://wa.me/5493410000000',
|
url: 'https://wa.me/5493410000000',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
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({
|
await TestBed.configureTestingModule({
|
||||||
imports: [StoreHomePageComponent],
|
imports: [StoreHomePageComponent],
|
||||||
|
|||||||
Reference in New Issue
Block a user