feat(hero-banner): add HeroBanner component with dynamic hero and event configurations

This commit is contained in:
2026-07-14 14:03:51 -03:00
parent cc87169c1c
commit 257e4fbeb8
5 changed files with 193 additions and 1 deletions

View File

@@ -1,3 +1,10 @@
@if (tenant()?.hero_config || tenant()?.event_config) {
<app-hero-banner
[heroConfig]="tenant()?.hero_config"
[eventConfig]="tenant()?.event_config"
></app-hero-banner>
}
<app-store-section title="Productos">
<div class="d-grid gap-4">
@if (error()) {

View File

@@ -16,6 +16,8 @@ import { Product } from '../../../../core/services/catalog/catalog.interface';
import { ProductCardComponent } from '../../../../shared/components/product-card/product-card.component';
import { PaginatorComponent } from '../../../../shared/components/paginator/paginator.component';
import { StoreSectionComponent } from '../../../../shared/components/store-section/store-section.component';
import { HeroBannerComponent } from '../../../../shared/components/hero-banner/hero-banner.component';
import { TenantService } from '../../../../core/services/tenant.service';
import {
STORE_HOME_PRODUCTS_ERROR_MESSAGE,
StoreHomeProductsResolvedData,
@@ -32,7 +34,7 @@ interface StoreHomeProductCardViewModel {
@Component({
selector: 'app-store-home-page',
imports: [StoreSectionComponent, ProductCardComponent, PaginatorComponent],
imports: [StoreSectionComponent, ProductCardComponent, PaginatorComponent, HeroBannerComponent],
templateUrl: './store-home-page.component.html',
styleUrl: './store-home-page.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
@@ -41,6 +43,9 @@ export class StoreHomePageComponent implements OnInit, OnDestroy {
private readonly catalogService = inject(CatalogService);
private readonly route = inject(ActivatedRoute);
private readonly router = inject(Router);
private readonly tenantService = inject(TenantService);
protected readonly tenant = this.tenantService.tenant;
private activeRequestId = 0;
private productsRequestSubscription: Subscription | null = null;