refactor: reorganize component files and update import paths; add PsItem and PsProduct interfaces

This commit is contained in:
Vincent Guillet
2025-11-12 12:34:58 +01:00
parent f063a245b9
commit bcc71b965b
92 changed files with 1694 additions and 2815 deletions

View File

@@ -1,15 +1,13 @@
import {Routes} from '@angular/router';
import {HomeComponent} from './pages/home/home.component';
import {RegisterComponent} from './pages/register/register.component';
import {LoginComponent} from './pages/login/login.component';
import {RegisterComponent} from './pages/auth/register/register.component';
import {LoginComponent} from './pages/auth/login/login.component';
import {ProfileComponent} from './pages/profile/profile.component';
import {guestOnlyCanActivate, guestOnlyCanMatch} from './guards/guest-only.guard';
import {authOnlyCanActivate, authOnlyCanMatch} from './guards/auth-only.guard';
import {AdminComponent} from './pages/admin/admin.component';
import {adminOnlyCanActivate, adminOnlyCanMatch} from './guards/admin-only.guard';
import {authOnlyCanMatch} from './guards/auth-only.guard';
import {PsAdminComponent} from './pages/admin/ps-admin/ps-admin.component';
import {ProductsComponent} from './pages/products/products.component';
import {AddProductComponent} from './pages/add-product/add-product.component';
import {PsCrudTabsComponent} from './admin-presta/ps-crud-tabs/ps-crud-tabs.component';
export const routes: Routes = [
{
@@ -44,29 +42,17 @@ export const routes: Routes = [
canMatch: [authOnlyCanMatch],
canActivate: [authOnlyCanMatch]
},
{
path: 'admin',
component: AdminComponent,
canMatch: [adminOnlyCanMatch],
canActivate: [adminOnlyCanActivate]
},
{
path: 'products',
component: ProductsComponent,
canMatch: [authOnlyCanMatch],
canActivate: [authOnlyCanActivate],
canActivate: [authOnlyCanMatch]
},
{
path: 'products/add',
component: AddProductComponent,
canMatch: [authOnlyCanMatch],
canActivate: [authOnlyCanActivate],
},
{
path: 'prestashop',
component: PsCrudTabsComponent,
canMatch: [authOnlyCanMatch],
canActivate: [authOnlyCanActivate],
path: 'admin',
component: PsAdminComponent,
canMatch: [adminOnlyCanMatch],
canActivate: [adminOnlyCanActivate]
},
{
path: '**',