mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
feat: add CustomerOrders page with CRUD operations, status management, and client contact tracking
This commit is contained in:
1 parent
55191c511b
commit
cf57cb5b2d
1 file changed
+23
-25
@@ -906,32 +906,30 @@ export default function CustomerOrders() {
|
||||
<Edit className="h-4 w-4" />
|
||||
</Button>
|
||||
{canShowButtons(order.status) && (
|
||||
<>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => handlePrintLabel(order)}
|
||||
>
|
||||
<Printer className="h-4 w-4" />
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => handleNotificationToggle(order)}
|
||||
className={order.customerNotified ? "bg-green-100 border-green-300" : ""}
|
||||
title={order.customerNotified && (order as any).notifiedAt
|
||||
? `Contacté le ${format(new Date((order as any).notifiedAt), "dd/MM/yyyy 'à' HH:mm", { locale: fr })}${(order as any).notifiedComment ? ` — ${(order as any).notifiedComment}` : ''}`
|
||||
: "Marquer client comme contacté"
|
||||
}
|
||||
>
|
||||
{order.customerNotified ? (
|
||||
<PhoneCall className="h-4 w-4 text-green-700" />
|
||||
) : (
|
||||
<Phone className="h-4 w-4" />
|
||||
)}
|
||||
</Button>
|
||||
</>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => handlePrintLabel(order)}
|
||||
>
|
||||
<Printer className="h-4 w-4" />
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
onClick={() => handleNotificationToggle(order)}
|
||||
className={order.customerNotified ? "bg-green-100 border-green-300" : ""}
|
||||
title={order.customerNotified && (order as any).notifiedAt
|
||||
? `Contacté le ${format(new Date((order as any).notifiedAt), "dd/MM/yyyy 'à' HH:mm", { locale: fr })}${(order as any).notifiedComment ? ` — ${(order as any).notifiedComment}` : ''}`
|
||||
: "Marquer client comme contacté"
|
||||
}
|
||||
>
|
||||
{order.customerNotified ? (
|
||||
<PhoneCall className="h-4 w-4 text-green-700" />
|
||||
) : (
|
||||
<Phone className="h-4 w-4" />
|
||||
)}
|
||||
</Button>
|
||||
{permissions.canDelete('customer-orders') && (
|
||||
<Button
|
||||
variant="outline"
|
||||
|
||||
Reference in new issue
Block a user