mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-24 15:38:18 +02:00
Merge pull request #538 from R0m1k3/1.1
feat: add mobile pages for delivery and order listing with search and…
This commit is contained in:
3 files changed
+17
-13
No files matched your search
@@ -75,7 +75,10 @@ export default function MobileDeliveriesPage() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const getDateBadge = (dateStr: string) => {
|
const getDateBadge = (dateStr: string) => {
|
||||||
|
if (!dateStr) return null;
|
||||||
const date = new Date(dateStr);
|
const date = new Date(dateStr);
|
||||||
|
if (isNaN(date.getTime())) return null;
|
||||||
|
|
||||||
if (isToday(date)) {
|
if (isToday(date)) {
|
||||||
return <Badge className="bg-blue-100 text-blue-700">Aujourd'hui</Badge>;
|
return <Badge className="bg-blue-100 text-blue-700">Aujourd'hui</Badge>;
|
||||||
}
|
}
|
||||||
@@ -179,7 +182,10 @@ export default function MobileDeliveriesPage() {
|
|||||||
|
|
||||||
<p className="text-xs text-gray-500 flex items-center gap-1 mt-1">
|
<p className="text-xs text-gray-500 flex items-center gap-1 mt-1">
|
||||||
<Calendar className="h-3 w-3" />
|
<Calendar className="h-3 w-3" />
|
||||||
{format(new Date(delivery.expectedDate), 'dd/MM/yyyy', { locale: fr })}
|
{delivery.expectedDate && !isNaN(new Date(delivery.expectedDate).getTime())
|
||||||
|
? format(new Date(delivery.expectedDate), 'dd/MM/yyyy', { locale: fr })
|
||||||
|
: 'Date inconnue'
|
||||||
|
}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,10 @@ export default function MobileOrdersPage() {
|
|||||||
|
|
||||||
<p className="text-xs text-gray-500 flex items-center gap-1 mt-1">
|
<p className="text-xs text-gray-500 flex items-center gap-1 mt-1">
|
||||||
<Calendar className="h-3 w-3" />
|
<Calendar className="h-3 w-3" />
|
||||||
{format(new Date(order.orderDate), 'dd/MM/yyyy', { locale: fr })}
|
{order.orderDate && !isNaN(new Date(order.orderDate).getTime())
|
||||||
|
? format(new Date(order.orderDate), 'dd/MM/yyyy', { locale: fr })
|
||||||
|
: 'Date inconnue'
|
||||||
|
}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -361,23 +361,17 @@ export default function MobileTasksPage() {
|
|||||||
// Loading
|
// Loading
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center justify-center h-screen">
|
<MobileLayout>
|
||||||
|
<div className="flex items-center justify-center h-64">
|
||||||
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600" />
|
<div className="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600" />
|
||||||
</div>
|
</div>
|
||||||
|
</MobileLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<MobileLayout>
|
||||||
className="min-h-screen bg-gray-50 pb-24"
|
<div className="p-3 space-y-3">
|
||||||
style={{
|
|
||||||
width: '100%',
|
|
||||||
maxWidth: '100vw',
|
|
||||||
overflowX: 'hidden',
|
|
||||||
boxSizing: 'border-box'
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{/* Header */}
|
|
||||||
<div className="bg-white border-b sticky top-0 z-40" style={{ width: '100%', boxSizing: 'border-box' }}>
|
<div className="bg-white border-b sticky top-0 z-40" style={{ width: '100%', boxSizing: 'border-box' }}>
|
||||||
<div className="px-3 py-3">
|
<div className="px-3 py-3">
|
||||||
<div className="flex items-center justify-between mb-3">
|
<div className="flex items-center justify-between mb-3">
|
||||||
@@ -488,5 +482,6 @@ export default function MobileTasksPage() {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</MobileLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user