import product catalogue
This commit is contained in:
24
src/App.tsx
24
src/App.tsx
@@ -31,7 +31,8 @@ import {
|
||||
Store,
|
||||
Settings,
|
||||
LayoutDashboard,
|
||||
Users
|
||||
Users,
|
||||
Box
|
||||
} from 'lucide-react';
|
||||
|
||||
import { MainSection } from './types';
|
||||
@@ -42,7 +43,7 @@ import {
|
||||
useFiestaCreateLocation,
|
||||
useFiestaOrderSummary,
|
||||
} from './services/fiestaQueries';
|
||||
import { FIESTA_TENANT_ID, str as fstr, num as fnum } from './services/fiestaApi';
|
||||
import { FIESTA_TENANT_ID, FIESTA_PRIMARY_LOCATION_ID, str as fstr, num as fnum } from './services/fiestaApi';
|
||||
import Sidebar from './components/Sidebar';
|
||||
import Header from './components/Header';
|
||||
import DashboardView from './components/DashboardView';
|
||||
@@ -55,6 +56,7 @@ import LoginView from './components/LoginView';
|
||||
import UserStorePage from './components/UserStorePage';
|
||||
import AwaitingApi from './components/AwaitingApi';
|
||||
import ComparisonModal from './components/ComparisonModal';
|
||||
import CatalogueBrowser from './components/CatalogueBrowser';
|
||||
import type { AuthUser } from './services/auth';
|
||||
import ragulStoreCover from './assets/images/store_front_view_1780299351800.png';
|
||||
|
||||
@@ -581,14 +583,18 @@ export default function App() {
|
||||
? (summaryQ.data?.tenantname ? `${summaryQ.data.tenantname} Admin` : 'Admin Console')
|
||||
: currentSection === 'inventory'
|
||||
? 'Products'
|
||||
: currentSection === 'dispatch'
|
||||
: currentSection === 'catalogue'
|
||||
? 'Global Catalogue'
|
||||
: currentSection === 'dispatch'
|
||||
? 'Console'
|
||||
: currentSection.charAt(0).toUpperCase() + currentSection.slice(1),
|
||||
icon: currentSection === 'dashboard'
|
||||
? LayoutDashboard
|
||||
: currentSection === 'inventory'
|
||||
? Layers
|
||||
: currentSection === 'stores'
|
||||
: currentSection === 'catalogue'
|
||||
? Box
|
||||
: currentSection === 'stores'
|
||||
? Store
|
||||
: currentSection === 'reports'
|
||||
? TrendingUp
|
||||
@@ -614,7 +620,7 @@ export default function App() {
|
||||
|
||||
{/* Main core pages payload area */}
|
||||
<main className={`flex-1 min-w-0 transition-all duration-300 ${sidebarOpen ? 'md:pl-64' : 'md:pl-16'} ${currentSection === 'inventory' || currentSection === 'dispatch' ? 'h-[calc(100vh-64px)] overflow-hidden' : 'min-h-[calc(100vh-64px)]'}`}>
|
||||
<div className={`w-full transition-all duration-300 ${currentSection === 'dispatch' ? 'h-full overflow-hidden' : currentSection === 'inventory' ? 'h-full p-4 md:p-6 overflow-hidden' : 'p-container-margin md:p-xl space-y-lg'}`}>
|
||||
<div className={`w-full transition-all duration-300 ${currentSection === 'dispatch' ? 'h-full overflow-hidden' : currentSection === 'inventory' ? 'h-full px-4 md:px-6 pt-2 pb-4 overflow-hidden' : currentSection === 'settings' ? 'p-4 md:p-6 space-y-lg' : 'p-container-margin md:p-xl space-y-lg'}`}>
|
||||
<Routes>
|
||||
<Route index element={<Navigate to="dashboard" replace />} />
|
||||
<Route path="dashboard" element={
|
||||
@@ -635,6 +641,14 @@ export default function App() {
|
||||
searchQuery={searchQuery}
|
||||
isCoimbatoreView={isCoimbatoreView}
|
||||
tenantId={tenantId}
|
||||
isSidebarOpen={sidebarOpen}
|
||||
/>
|
||||
} />
|
||||
|
||||
<Route path="catalogue" element={
|
||||
<CatalogueBrowser
|
||||
tenantid={tenantId}
|
||||
locationid={FIESTA_PRIMARY_LOCATION_ID}
|
||||
/>
|
||||
} />
|
||||
|
||||
|
||||
Reference in New Issue
Block a user