reponsived the website and login fix done

This commit is contained in:
2026-07-21 16:26:45 +05:30
parent 407574d62a
commit f62668e54e
16 changed files with 11203 additions and 11193 deletions

View File

@@ -115,7 +115,18 @@ export default function App() {
const [isCoimbatoreView, setIsCoimbatoreView] = useState(false);
const [searchQuery, setSearchQuery] = useState('');
const [sidebarOpen, setSidebarOpen] = useState(true);
const [sidebarOpen, setSidebarOpen] = useState(() => typeof window !== 'undefined' ? window.innerWidth >= 768 : true);
// Auto adapt sidebar state on window resize
useEffect(() => {
const handleResize = () => {
if (window.innerWidth < 768) {
setSidebarOpen(false);
}
};
window.addEventListener('resize', handleResize);
return () => window.removeEventListener('resize', handleResize);
}, []);
// Scope every Fiesta query to the signed-in merchant. The login record carries
// the user's tenantid; fall back to the shared constant only when it's absent
@@ -627,8 +638,8 @@ 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 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'}`}>
<main className={`flex-1 min-w-0 transition-all duration-300 ${sidebarOpen ? 'md:pl-64' : 'md:pl-16'} ${currentSection === 'inventory' || currentSection === 'dispatch' ? 'md:h-[calc(100vh-64px)] md:overflow-hidden min-h-[calc(100vh-64px)]' : 'min-h-[calc(100vh-64px)]'}`}>
<div className={`w-full transition-all duration-300 ${currentSection === 'dispatch' ? 'h-full md:overflow-hidden p-2 sm:p-4' : currentSection === 'inventory' ? 'h-full px-2 sm:px-4 md:px-6 pt-2 pb-4 md:overflow-hidden' : currentSection === 'settings' ? 'p-3 sm:p-4 md:p-6 space-y-md sm:space-y-lg' : 'p-3 sm:p-5 md:p-xl space-y-md sm:space-y-lg'}`}>
<Routes>
<Route index element={<Navigate to="dashboard" replace />} />
<Route path="dashboard" element={