feat(events): add multi-event storefront pages
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { inject } from '@angular/core';
|
||||
import { CanMatchFn, Routes } from '@angular/router';
|
||||
|
||||
import { SimpleLayoutComponent } from '../../core/layout/simple-layout/simple-layout.component';
|
||||
import { StoreLayoutComponent } from '../../core/layout/store-layout/store-layout.component';
|
||||
@@ -13,6 +14,10 @@ import { RegisterPageComponent } from './pages/register-page/register-page.compo
|
||||
import { StoreHomePageComponent } from './pages/store-home-page/store-home-page.component';
|
||||
import { storeHomeCatalogResolver } from './pages/store-home-page/store-home-page.resolver';
|
||||
import { checkoutPendingPurchaseGuard } from './pages/checkout-page/checkout-page.guard';
|
||||
import { TenantService } from '../../core/services/tenant.service';
|
||||
|
||||
const isMultiEventStorefront: CanMatchFn = () =>
|
||||
inject(TenantService).tenant()?.storefront_website_type_code === 'onticket_multi_event';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
@@ -21,6 +26,14 @@ export const routes: Routes = [
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
pathMatch: 'full',
|
||||
canMatch: [isMultiEventStorefront],
|
||||
loadComponent: () =>
|
||||
import('./pages/event-home-page/event-home-page.component').then((m) => m.EventHomePageComponent),
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
pathMatch: 'full',
|
||||
component: StoreHomePageComponent,
|
||||
canActivate: [hasMenuGuard('index')],
|
||||
resolve: {
|
||||
@@ -68,11 +81,23 @@ export const routes: Routes = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: 'buscar',
|
||||
canMatch: [isMultiEventStorefront],
|
||||
loadComponent: () =>
|
||||
import('./pages/event-search-page/event-search-page.component').then((m) => m.EventSearchPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'buscar',
|
||||
loadComponent: () =>
|
||||
import('./pages/search-page/search-page.component').then((m) => m.SearchPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'evento/:id',
|
||||
canMatch: [isMultiEventStorefront],
|
||||
loadComponent: () =>
|
||||
import('./pages/event-detail-page/event-detail-page.component').then((m) => m.EventDetailPageComponent),
|
||||
},
|
||||
{
|
||||
path: 'categoria/:id',
|
||||
loadComponent: () =>
|
||||
|
||||
Reference in New Issue
Block a user