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

@@ -45,24 +45,24 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I
};
return (
<div className="flex flex-col h-[calc(100vh-80px)] w-full">
<div className="flex flex-col min-h-[calc(100vh-80px)] md:h-[calc(100vh-80px)] w-full">
<div className="flex flex-col flex-none bg-white">
{/* ── Unified Hub Header ── */}
<div className="flex items-center justify-between px-6 h-14 border-b border-slate-200">
<div className="flex items-center gap-5">
<div className="flex items-center gap-3">
<div className="w-8 h-8 rounded-lg bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center font-extrabold text-sm text-white shadow-sm">C</div>
<div className="text-lg font-extrabold text-slate-800 tracking-tight">Console</div>
<div className="flex flex-col sm:flex-row sm:items-center justify-between px-3 sm:px-6 py-2 sm:py-0 sm:h-14 gap-2 border-b border-slate-200">
<div className="flex items-center gap-3 sm:gap-5">
<div className="flex items-center gap-2 sm:gap-3">
<div className="w-7 h-7 sm:w-8 sm:h-8 rounded-lg bg-gradient-to-br from-blue-500 to-blue-600 flex items-center justify-center font-extrabold text-xs sm:text-sm text-white shadow-sm">C</div>
<div className="text-base sm:text-lg font-extrabold text-slate-800 tracking-tight">Console</div>
<div className="relative inline-block ml-1">
<span className="flex items-center gap-1 px-2.5 py-1 bg-purple-50 text-purple-700 border border-purple-200/60 rounded-full text-[11px] font-bold cursor-default shadow-sm">
<span className="flex items-center gap-1 px-2 sm:px-2.5 py-0.5 sm:py-1 bg-purple-50 text-purple-700 border border-purple-200/60 rounded-full text-[10px] sm:text-[11px] font-bold cursor-default shadow-sm">
<MapPin size={12} className="text-purple-500" />
<span className="max-w-[180px] truncate">Coimbatore</span>
<span className="max-w-[120px] sm:max-w-[180px] truncate">Coimbatore</span>
</span>
</div>
</div>
</div>
<div className="flex items-center gap-4">
<div className="flex items-center justify-between sm:justify-end gap-2 sm:gap-4">
{deliveriesQ.isLoading ? (
<span className="flex items-center gap-2 text-xs font-semibold text-slate-500">
<span className="w-2 h-2 rounded-full bg-slate-300 animate-pulse" /> Syncing
@@ -72,26 +72,26 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I
<span className="w-2 h-2 rounded-full bg-rose-500" /> Offline
</span>
) : totalOrders === 0 ? (
<span className="flex items-center gap-2 text-xs font-semibold text-slate-500 bg-slate-100 px-3 py-1.5 rounded-full" title="No deliveries dispatched for this day">
<span className="flex items-center gap-1.5 sm:gap-2 text-[10px] sm:text-xs font-semibold text-slate-500 bg-slate-100 px-2.5 sm:px-3 py-1 sm:py-1.5 rounded-full" title="No deliveries dispatched for this day">
<span className="w-2 h-2 rounded-full bg-slate-400" /> No deliveries today
</span>
) : (
<span className="flex items-center gap-2 text-xs font-semibold text-emerald-600 bg-emerald-50 px-3 py-1.5 rounded-full border border-emerald-100">
<span className="flex items-center gap-1.5 sm:gap-2 text-[10px] sm:text-xs font-semibold text-emerald-600 bg-emerald-50 px-2.5 sm:px-3 py-1 sm:py-1.5 rounded-full border border-emerald-100">
<span className="w-2 h-2 rounded-full bg-emerald-500 animate-pulse" /> Live · {totalOrders} orders
</span>
)}
<div className={`flex items-center bg-slate-50 border border-slate-200 rounded-xl p-1 shadow-sm ${isToday ? 'ring-1 ring-blue-500/20' : ''}`}>
<button className="p-1.5 rounded-lg text-slate-400 hover:text-slate-700 hover:bg-slate-200/50 transition-colors" onClick={() => shiftDate(-1)} title="Previous day">
<div className={`flex items-center bg-slate-50 border border-slate-200 rounded-xl p-0.5 sm:p-1 shadow-sm ${isToday ? 'ring-1 ring-blue-500/20' : ''}`}>
<button className="p-1 sm:p-1.5 rounded-lg text-slate-400 hover:text-slate-700 hover:bg-slate-200/50 transition-colors" onClick={() => shiftDate(-1)} title="Previous day">
<ChevronLeft size={16} />
</button>
<div className="relative flex items-center gap-2 px-3 py-1">
<Calendar size={14} className="text-slate-400" />
<div className="relative flex items-center gap-1.5 sm:gap-2 px-2 sm:px-3 py-0.5 sm:py-1">
<Calendar size={13} className="text-slate-400 hidden sm:block" />
<div className="flex flex-col">
<span className="text-[9px] font-bold text-slate-400 uppercase tracking-widest leading-none mb-0.5 flex items-center gap-1">
Date {isToday && <span className="text-[8px] bg-blue-100 text-blue-600 px-1 rounded-sm">TODAY</span>}
<span className="text-[8px] sm:text-[9px] font-bold text-slate-400 uppercase tracking-widest leading-none mb-0.5 flex items-center gap-1">
Date {isToday && <span className="text-[7px] sm:text-[8px] bg-blue-100 text-blue-600 px-1 rounded-sm">TODAY</span>}
</span>
<span className="text-xs font-bold text-slate-700 leading-none">{prettyDate}</span>
<span className="text-[11px] sm:text-xs font-bold text-slate-700 leading-none">{prettyDate}</span>
</div>
<input
type="date"
@@ -102,7 +102,7 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I
aria-label="Pick date"
/>
</div>
<button className="p-1.5 rounded-lg text-slate-400 hover:text-slate-700 hover:bg-slate-200/50 transition-colors disabled:opacity-30 disabled:hover:bg-transparent" onClick={() => shiftDate(1)} disabled={isToday} title="Next day">
<button className="p-1 sm:p-1.5 rounded-lg text-slate-400 hover:text-slate-700 hover:bg-slate-200/50 transition-colors disabled:opacity-30 disabled:hover:bg-transparent" onClick={() => shiftDate(1)} disabled={isToday} title="Next day">
<ChevronRight size={16} />
</button>
</div>
@@ -110,11 +110,11 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I
</div>
{/* ── Unified Tab Row ── */}
<div className="flex items-center px-6 py-3 border-b border-slate-200 shadow-sm z-10 relative">
<div className="flex items-center p-1 bg-slate-100/80 rounded-lg border border-slate-200/80 shadow-inner">
<div className="flex items-center px-3 sm:px-6 py-2.5 border-b border-slate-200 shadow-sm z-10 relative overflow-x-auto custom-scrollbar no-scrollbar touch-scrolling">
<div className="flex items-center p-1 bg-slate-100/80 rounded-lg border border-slate-200/80 shadow-inner shrink-0">
<button
onClick={() => setActiveTab('map')}
className={`flex items-center gap-1.5 px-4 py-1.5 text-[11px] font-extrabold rounded-md transition-all duration-300 uppercase tracking-wide ${
className={`flex items-center gap-1.5 px-3 sm:px-4 py-1 sm:py-1.5 text-[10px] sm:text-[11px] font-extrabold rounded-md transition-all duration-300 uppercase tracking-wide ${
activeTab === 'map' ? 'bg-white text-purple-700 shadow-sm ring-1 ring-slate-900/5' : 'text-slate-500 hover:text-slate-800 hover:bg-slate-200/50'
}`}
>
@@ -123,7 +123,7 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I
<button
onClick={() => setActiveTab('orders')}
className={`flex items-center gap-1.5 px-4 py-1.5 text-[11px] font-extrabold rounded-md transition-all duration-300 uppercase tracking-wide ${
className={`flex items-center gap-1.5 px-3 sm:px-4 py-1 sm:py-1.5 text-[10px] sm:text-[11px] font-extrabold rounded-md transition-all duration-300 uppercase tracking-wide ${
activeTab === 'orders' ? 'bg-white text-purple-700 shadow-sm ring-1 ring-slate-900/5' : 'text-slate-500 hover:text-slate-800 hover:bg-slate-200/50'
}`}
>
@@ -132,7 +132,7 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I
<button
onClick={() => setActiveTab('deliveries')}
className={`flex items-center gap-1.5 px-4 py-1.5 text-[11px] font-extrabold rounded-md transition-all duration-300 uppercase tracking-wide ${
className={`flex items-center gap-1.5 px-3 sm:px-4 py-1 sm:py-1.5 text-[10px] sm:text-[11px] font-extrabold rounded-md transition-all duration-300 uppercase tracking-wide ${
activeTab === 'deliveries' ? 'bg-white text-purple-700 shadow-sm ring-1 ring-slate-900/5' : 'text-slate-500 hover:text-slate-800 hover:bg-slate-200/50'
}`}
>
@@ -141,10 +141,10 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I
</div>
{/* Sub-tabs for Map View */}
<div className="flex items-center p-1 ml-4 bg-slate-100/80 rounded-lg border border-slate-200/80 shadow-inner">
<div className="flex items-center p-1 ml-3 sm:ml-4 bg-slate-100/80 rounded-lg border border-slate-200/80 shadow-inner shrink-0">
<button
onClick={() => setMapViewMode('stores')}
className={`flex items-center gap-1.5 px-4 py-1.5 text-[11px] font-extrabold rounded-md transition-all duration-300 tracking-wide ${
className={`flex items-center gap-1.5 px-3 sm:px-4 py-1 sm:py-1.5 text-[10px] sm:text-[11px] font-extrabold rounded-md transition-all duration-300 tracking-wide ${
mapViewMode === 'stores' ? 'bg-white text-slate-800 shadow-sm ring-1 ring-slate-900/5' : 'text-slate-500 hover:text-slate-800 hover:bg-slate-200/50'
}`}
>
@@ -153,7 +153,7 @@ export default function DispatchHubView({ locationid, tenantId = FIESTA_TENANT_I
<button
onClick={() => setMapViewMode('customers')}
className={`flex items-center gap-1.5 px-4 py-1.5 text-[11px] font-extrabold rounded-md transition-all duration-300 tracking-wide ${
className={`flex items-center gap-1.5 px-3 sm:px-4 py-1 sm:py-1.5 text-[10px] sm:text-[11px] font-extrabold rounded-md transition-all duration-300 tracking-wide ${
mapViewMode === 'customers' ? 'bg-white text-slate-800 shadow-sm ring-1 ring-slate-900/5' : 'text-slate-500 hover:text-slate-800 hover:bg-slate-200/50'
}`}
>