chore: fix comming soon

This commit is contained in:
2026-03-07 18:42:18 +01:00
parent ab7d8929a8
commit 91ad46c0f8
4 changed files with 315 additions and 131 deletions
@@ -9,7 +9,11 @@ import {
StatusBar,
Alert,
} from "react-native";
import { useRoute, useNavigation, type RouteProp } from "@react-navigation/native";
import {
useRoute,
useNavigation,
type RouteProp,
} from "@react-navigation/native";
import { Ionicons } from "@expo/vector-icons";
import MapView, { Marker, Polyline, PROVIDER_DEFAULT } from "react-native-maps";
import { spacing, fontSize, borderRadius } from "../../theme";
@@ -87,7 +91,9 @@ export default function OrderDetailScreen() {
try {
const res = await getCommandByID(orderId);
setCommand(res.command);
} catch { /* ignore */ }
} catch {
/* ignore */
}
}, 20000);
return () => clearInterval(interval);
}, [orderId]);
@@ -176,7 +182,10 @@ export default function OrderDetailScreen() {
const handleNotifyClient = async () => {
try {
await notifyClientToDescend(orderId);
showSuccess("Notification envoyée", "Le client a été prévenu de descendre");
showSuccess(
"Notification envoyée",
"Le client a été prévenu de descendre",
);
} catch (e: any) {
showError("Erreur", e.message);
}
@@ -773,7 +782,7 @@ export default function OrderDetailScreen() {
)}
{!["approved", "cancelled"].includes(command.status) && (
<Button
title="Le client est là"
title="Le livreur est là"
onPress={handleNotifyClient}
variant="warning"
fullWidth
@@ -823,9 +832,17 @@ export default function OrderDetailScreen() {
</View>
<ScrollView showsVerticalScrollIndicator={false}>
{items.map((item: any) => (
<View key={item.id} style={styles.itemsModalCard}>
<View
key={item.id}
style={styles.itemsModalCard}
>
<View style={styles.row}>
<Text style={[styles.itemName, { flex: 1 }]}>
<Text
style={[
styles.itemName,
{ flex: 1 },
]}
>
{item.produit ?? item.product_name}
</Text>
<TouchableOpacity
@@ -834,7 +851,8 @@ export default function OrderDetailScreen() {
setShowItemsModal(false);
handleDeleteItem(
item.id,
item.produit ?? item.product_name,
item.produit ??
item.product_name,
);
}}
>