Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/app/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core';
import { provideAnimations } from '@angular/platform-browser/animations';
import { provideRouter } from '@angular/router';
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';

import { routes } from './app.routes';

Expand All @@ -9,6 +10,7 @@ export const appConfig: ApplicationConfig = {
provideZoneChangeDetection({ eventCoalescing: true }),
provideRouter(routes),
provideAnimations(),
provideHttpClient(withInterceptorsFromDi()),
]
};

25 changes: 18 additions & 7 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,24 @@ export const routes: Routes = [
component: ForecastComponent,
pathMatch: 'full',
},
{ path: 'order-history', component: OrderHistoryComponent }, // /dashboard/orders
{ path: 'inventory', component: InventoryComponent }, // /dashboard/inventory
{ path: 'product-management', component: ProductManagementComponent }, // /dashboard/product-management
{ path: 'current-requests', component: CurrentRequestsComponent }, // /dashboard/current-requests
// { path: 'deliveries', component: DeliveriesComponent }, // /dashboard/deliveries
// { path: 'vendors', component: VendorsComponent },
{ path: 'supplier', component: SupplierDashboard, pathMatch: 'full' },

// Supplier Routes
{
path: 'supplier',
// canActivate: [roleGuard(3)],
children: [
{ path: '', redirectTo: 'profile', pathMatch: 'full' },
{ path: 'order-history', component: OrderHistoryComponent },
{ path: 'inventory', component: InventoryComponent },
{ path: 'product-management', component: ProductManagementComponent },
{ path: 'current-requests', component: CurrentRequestsComponent },
// { path: 'deliveries', component: DeliveriesComponent },
// { path: 'vendors', component: VendorsComponent },
{ path: 'supplier', component: SupplierDashboard, pathMatch: 'full' },
{ path: 'profile', component: ProfileComponent },
{ path: '**', redirectTo: '', pathMatch: 'full' },
],
},
],
},
{ path: '**', redirectTo: 'home' }, // Handle 404/unknown routes
Expand Down
54 changes: 7 additions & 47 deletions src/app/components/sidebar/sidebar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,57 +24,17 @@ export class SidebarComponent {
// d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" />`)
},
{
label: 'Forecast',
route: 'forecast',
// icon: this.sanitize(`<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
// d="M3 10h4l3 7h4l3-7h4M3 6h18M3 6l1.5 4m0 0L6 10m12-4l1.5 4m0 0L18 10" />`)
},
{
label: 'Supplier',
route: 'supplier',
// icon: this.sanitize(`<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
// d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />`)
},
{
label: 'Orders',
route: '/orders',
// icon: this.sanitize(`<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
// d="M16 8v4a4 4 0 01-8 0V8m8-2H8a2 2 0 00-2 2v10a2 2 0 002 2h8a2 2 0 002-2V8a2 2 0 00-2-2z" />`)
label: 'Product Managment',
route: '/dashboard/supplier/product-management',
},
{
label: 'Inventory',
route: '/inventory',
// icon: this.sanitize(`<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
// d="M3 7v10a1 1 0 001 1h14a1 1 0 001-1V7m-6-4h6a1 1 0 011 1v3m-8-4H5a1 1 0 00-1 1v3m6-4v12" />`)
label: 'Inventory Managment',
route: '/dashboard/supplier/inventory',
},
{
label: 'Deliveries',
route: '/deliveries',
// icon: this.sanitize(`<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
// d="M16.5,9.5 L21,14 L16.5,18.5 M21,14 L11,14 M21,14 L16.5,9.5 M11,14 L11,9.5 M11,14 L6.5,18.5 M11,14 L6.5,9.5 M11,14 L11,9.5 M11,14 L
label: 'Current Requests',
route: '/dashboard/supplier/current-requests',
},
{
label: 'Contact',
route: '/contact',
// icon: this.sanitize(`<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
// d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" />`)
},
{
label: 'Warehouse-Inventory',
route: '/dashboard/warehouse',
},
{
label: 'Warehouse-Truck Tracking',
route: '/dashboard/warehouse/truck-tracking',
},
{
label: 'Warehouse-Vendor Orders',
route: '/dashboard/warehouse/vendor-orders',
},
{
label: 'Warehouse-Supplier Requests',
route: '/dashboard/warehouse/supplier-requests',
}
];;
];
isClosed = input<boolean>(false);
}
Loading