diff --git a/frontend-admin/src/screens/cabine/OrdersScreen.tsx b/frontend-admin/src/screens/cabine/OrdersScreen.tsx index 541ca6a0..eb4e4592 100644 --- a/frontend-admin/src/screens/cabine/OrdersScreen.tsx +++ b/frontend-admin/src/screens/cabine/OrdersScreen.tsx @@ -32,20 +32,14 @@ import { useAlert } from "../../hooks/useAlert"; const STATUS_COLORS: Record = { pending: "#F59E0B", - preparing: "#3B82F6", - ready: "#10B981", }; const STATUS_ICONS: Record = { pending: "time-outline", - preparing: "construct-outline", - ready: "checkmark-circle-outline", }; const STATUS_LABELS: Record = { pending: "En attente", - preparing: "En préparation", - ready: "Prêt", }; export default function OrdersScreen() { @@ -344,19 +338,11 @@ export default function OrdersScreen() { fontWeight: "700", marginTop: spacing.xs, }, - progressContainer: { marginBottom: spacing.m }, progressLabel: { color: colors.textMuted, fontSize: fontSize.xs, marginBottom: spacing.xs, }, - progressBar: { - height: 4, - backgroundColor: colors.bgCard, - borderRadius: 2, - overflow: "hidden", - }, - progressFill: { height: "100%", borderRadius: 2 }, itemCard: { backgroundColor: colors.bgCard, borderRadius: borderRadius.sm, @@ -533,11 +519,7 @@ export default function OrdersScreen() { ); }; - const readyCount = itemsModal.items.filter( - (i) => i.status === "ready", - ).length; const totalCount = itemsModal.items.length; - const progress = totalCount > 0 ? readyCount / totalCount : 0; if (loading) return ; @@ -608,34 +590,28 @@ export default function OrdersScreen() { € )} - {(itemsModal.commandInfo?.referral_used ?? 0) > 0 && ( - - Parrainage: -{Number(itemsModal.commandInfo.referral_used).toFixed(2)} € + {(itemsModal.commandInfo?.referral_used ?? 0) > + 0 && ( + + Parrainage: - + {Number( + itemsModal.commandInfo.referral_used, + ).toFixed(2)}{" "} + € )} )} {totalCount > 0 && ( - - - {readyCount}/{totalCount} prêts - - - - - + + {totalCount} article{totalCount > 1 ? "s" : ""} + )} {itemsModal.items.map((item: any, index: number) => { diff --git a/frontend-admin/src/screens/delivery/DashboardScreen.tsx b/frontend-admin/src/screens/delivery/DashboardScreen.tsx index 008a9632..b98c5099 100644 --- a/frontend-admin/src/screens/delivery/DashboardScreen.tsx +++ b/frontend-admin/src/screens/delivery/DashboardScreen.tsx @@ -266,7 +266,7 @@ export default function DashboardScreen() { const activeDelivery = enriched.find( (d) => - d.status === "in_progress" || d.status === "en_route", + d.status === "en_route", ) || enriched.find((d) => d.status === "assigned"); if (activeDelivery && activeDelivery.adresse) { calcRoute(activeDelivery.adresse); @@ -525,7 +525,6 @@ export default function DashboardScreen() { // -------------------------------------------------- const renderDelivery = ({ item }: { item: EnrichedDelivery }) => { const isActive = - item.status === "in_progress" || item.status === "en_route" || item.status === "arrived" || item.status === "assigned"; @@ -550,8 +549,7 @@ export default function DashboardScreen() { ? "Terminée" : item.status === "arrived" ? "Arrivé" - : item.status === "in_progress" || - item.status === "en_route" + : item.status === "en_route" ? "En cours" : "En attente" } @@ -561,8 +559,7 @@ export default function DashboardScreen() { ? colors.success : item.status === "arrived" ? colors.accent - : item.status === "in_progress" || - item.status === "en_route" + : item.status === "en_route" ? colors.warning : colors.info } diff --git a/frontend-admin/src/utils/constants.ts b/frontend-admin/src/utils/constants.ts index c3c56c16..eead675b 100644 --- a/frontend-admin/src/utils/constants.ts +++ b/frontend-admin/src/utils/constants.ts @@ -3,9 +3,6 @@ import type { Colors } from "../theme/colors"; export const STATUS_LABELS: Record = { pending: "En attente", assigned: "Assignée", - support: "Support", - preparing: "En préparation", - ready: "Prêt", en_route: "En route", arrived: "Arrivée", livre: "Livrée", @@ -20,9 +17,6 @@ export const STATUS_LABELS: Record = { export const getStatusColors = (colors: Colors): Record => ({ pending: colors.warning, assigned: colors.info, - support: colors.warning, - preparing: colors.info, - ready: colors.accent, en_route: colors.info, arrived: colors.accent, livre: colors.success, diff --git a/mobile/src/context/NotificationContext.tsx b/mobile/src/context/NotificationContext.tsx index 83203463..a9187ccc 100644 --- a/mobile/src/context/NotificationContext.tsx +++ b/mobile/src/context/NotificationContext.tsx @@ -49,7 +49,6 @@ function getToastType( case "assigned": return "success"; case "en_route": - case "support": return "info"; case "livre": return "success"; diff --git a/mobile/src/screens/client/OrderDetailsScreen.tsx b/mobile/src/screens/client/OrderDetailsScreen.tsx index c70b2497..56fdd40f 100644 --- a/mobile/src/screens/client/OrderDetailsScreen.tsx +++ b/mobile/src/screens/client/OrderDetailsScreen.tsx @@ -39,11 +39,8 @@ const TIMELINE_STEPS = [ const STATUS_INDEX: Record = { pending: 0, assigned: 1, - support: 1, - preparing: 1, en_route: 2, arrived: 3, - ready: 3, livre: 4, delivered: 4, approved: 5, diff --git a/mobile/src/screens/client/OrderTrackingScreen.tsx b/mobile/src/screens/client/OrderTrackingScreen.tsx index 99f1df68..4a652f1d 100644 --- a/mobile/src/screens/client/OrderTrackingScreen.tsx +++ b/mobile/src/screens/client/OrderTrackingScreen.tsx @@ -47,7 +47,6 @@ type Nav = NativeStackNavigationProp; const STATUS_PROGRESS: Record = { pending: 15, assigned: 25, - support: 35, en_route: 60, arrived: 85, livre: 95, @@ -393,7 +392,6 @@ export default function OrderTrackingScreen() { const canCancel = [ "pending", "assigned", - "support", "en_route", ].includes(order.status); diff --git a/mobile/src/utils/constants.ts b/mobile/src/utils/constants.ts index c3c56c16..eead675b 100644 --- a/mobile/src/utils/constants.ts +++ b/mobile/src/utils/constants.ts @@ -3,9 +3,6 @@ import type { Colors } from "../theme/colors"; export const STATUS_LABELS: Record = { pending: "En attente", assigned: "Assignée", - support: "Support", - preparing: "En préparation", - ready: "Prêt", en_route: "En route", arrived: "Arrivée", livre: "Livrée", @@ -20,9 +17,6 @@ export const STATUS_LABELS: Record = { export const getStatusColors = (colors: Colors): Record => ({ pending: colors.warning, assigned: colors.info, - support: colors.warning, - preparing: colors.info, - ready: colors.accent, en_route: colors.info, arrived: colors.accent, livre: colors.success,