From ed68d237c38ef2cd225a3a47d2b007a1feb3d523 Mon Sep 17 00:00:00 2001 From: Xor290 Date: Fri, 19 Jun 2026 21:24:22 +0200 Subject: [PATCH] chore: build --- .../screens/client/OrderTrackingScreen.tsx | 32 ++++++++++++++++--- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/mobile/src/screens/client/OrderTrackingScreen.tsx b/mobile/src/screens/client/OrderTrackingScreen.tsx index 3f936eb4..43391245 100644 --- a/mobile/src/screens/client/OrderTrackingScreen.tsx +++ b/mobile/src/screens/client/OrderTrackingScreen.tsx @@ -20,6 +20,7 @@ import { formatOrderDate, formatPrice, calculateOrderTotal, + getPublicSettings, } from "../../api/api"; import type { OrderDetail, @@ -72,6 +73,7 @@ export default function OrderTrackingScreen() { const [penaltyWarning, setPenaltyWarning] = useState(null); const [penaltyOrderId, setPenaltyOrderId] = useState(null); + const [penaltiesEnabled, setPenaltiesEnabled] = useState(false); const [toastMsg, setToastMsg] = useState(""); const [toastType, setToastType] = useState< "success" | "error" | "warning" | "info" @@ -98,6 +100,10 @@ export default function OrderTrackingScreen() { } }, []); + useEffect(() => { + getPublicSettings().then((s) => setPenaltiesEnabled(s.penalties_enabled)).catch(() => {}); + }, []); + useFocusEffect( useCallback(() => { setLoading(true); @@ -677,6 +683,24 @@ export default function OrderTrackingScreen() { iconColor={colors.danger} > + {penaltiesEnabled && ( + + + + Attention : en cas d'annulations répétées, une amende sera appliquée à votre compte. + + + )} Raison de l'annulation : @@ -739,12 +763,10 @@ export default function OrderTrackingScreen() { - - Penalite:{" "} - {penaltyWarning.penalty_warning.penalty_amount}{" "} - points + + Amende : {penaltyWarning.penalty_warning.penalty_amount} € )}