feat(hero-banner): update image handling to support responsive images and refactor template

feat(cart): enhance editing logic and add tests for editable state
feat(tenant): modify HeroConfig to include responsive image type
This commit is contained in:
2026-08-18 14:18:20 -03:00
parent 92ad7340fe
commit 9ba2041f7b
9 changed files with 115 additions and 14 deletions

View File

@@ -18,6 +18,18 @@ export class HeroBannerComponent {
protected schedulesExpanded = false;
protected get desktopImageUrl(): string | null {
const image = this.heroConfig?.background_image_id;
return typeof image === 'string' ? image : (image?.desktop ?? null);
}
protected get mobileImageUrl(): string | null {
const image = this.heroConfig?.background_image_id;
return typeof image === 'string' ? image : (image?.mobile ?? image?.desktop ?? null);
}
get formattedDates(): string {
if (this.eventConfig?.dates_text) {
return this.eventConfig.dates_text;