chore: add select
This commit is contained in:
@@ -103,7 +103,8 @@ export default function DashboardScreen() {
|
||||
const pendingRouteAddress = useRef<string | null>(null);
|
||||
const { alert, showError, showSuccess, hideAlert } = useAlert();
|
||||
|
||||
const [detailsDelivery, setDetailsDelivery] = useState<EnrichedDelivery | null>(null);
|
||||
const [detailsDelivery, setDetailsDelivery] =
|
||||
useState<EnrichedDelivery | null>(null);
|
||||
|
||||
const STATUS_COLORS: Record<string, string> = useMemo(
|
||||
() => ({
|
||||
@@ -235,7 +236,8 @@ export default function DashboardScreen() {
|
||||
? `${client.prenom || ""} ${client.nom}`.trim()
|
||||
: client?.username || undefined,
|
||||
clientPhone: client?.telephone || undefined,
|
||||
clientUsername: client?.username || undefined,
|
||||
clientUsername:
|
||||
client?.username || undefined,
|
||||
clientNom: client?.nom || undefined,
|
||||
clientPrenom: client?.prenom || undefined,
|
||||
items:
|
||||
@@ -320,7 +322,8 @@ export default function DashboardScreen() {
|
||||
longitude: position.coords.longitude,
|
||||
altitude: position.coords.altitude ?? 0,
|
||||
accuracy: position.coords.accuracy ?? 0,
|
||||
altitudeAccuracy: position.coords.altitudeAccuracy ?? 0,
|
||||
altitudeAccuracy:
|
||||
position.coords.altitudeAccuracy ?? 0,
|
||||
heading: position.coords.heading ?? 0,
|
||||
speed: position.coords.speed ?? 0,
|
||||
},
|
||||
@@ -329,7 +332,11 @@ export default function DashboardScreen() {
|
||||
(error) => reject(new Error(error.message)),
|
||||
// enableHighAccuracy: false → provider réseau/cell (1-3s)
|
||||
// au lieu du GPS pur qui peut prendre 30-60s (cold start)
|
||||
{ enableHighAccuracy: false, timeout: 15000, maximumAge: 10000 },
|
||||
{
|
||||
enableHighAccuracy: false,
|
||||
timeout: 15000,
|
||||
maximumAge: 10000,
|
||||
},
|
||||
);
|
||||
}),
|
||||
[],
|
||||
@@ -516,9 +523,9 @@ export default function DashboardScreen() {
|
||||
: item.status === "arrived"
|
||||
? "Arrivé"
|
||||
: item.status === "in_progress" ||
|
||||
item.status === "en_route"
|
||||
? "En cours"
|
||||
: "En attente"
|
||||
item.status === "en_route"
|
||||
? "En cours"
|
||||
: "En attente"
|
||||
}
|
||||
color={
|
||||
item.status === "completed" ||
|
||||
@@ -527,9 +534,9 @@ export default function DashboardScreen() {
|
||||
: item.status === "arrived"
|
||||
? colors.accent
|
||||
: item.status === "in_progress" ||
|
||||
item.status === "en_route"
|
||||
? colors.warning
|
||||
: colors.info
|
||||
item.status === "en_route"
|
||||
? colors.warning
|
||||
: colors.info
|
||||
}
|
||||
/>
|
||||
</View>
|
||||
@@ -636,7 +643,11 @@ export default function DashboardScreen() {
|
||||
onPress={() => setDetailsDelivery(item)}
|
||||
activeOpacity={0.7}
|
||||
>
|
||||
<Ionicons name="list-outline" size={16} color={colors.accent} />
|
||||
<Ionicons
|
||||
name="list-outline"
|
||||
size={16}
|
||||
color={colors.accent}
|
||||
/>
|
||||
<Text style={styles.detailsBtnText}>Détails</Text>
|
||||
</TouchableOpacity>
|
||||
|
||||
@@ -1578,7 +1589,11 @@ export default function DashboardScreen() {
|
||||
{/* Infos client */}
|
||||
<View style={styles.detailSection}>
|
||||
<Text style={styles.detailSectionTitle}>
|
||||
<Ionicons name="person-outline" size={14} color={colors.accent} />
|
||||
<Ionicons
|
||||
name="person-outline"
|
||||
size={14}
|
||||
color={colors.accent}
|
||||
/>
|
||||
{" "}Client
|
||||
</Text>
|
||||
<View style={styles.detailRow}>
|
||||
@@ -1606,10 +1621,15 @@ export default function DashboardScreen() {
|
||||
|
||||
{/* Produits */}
|
||||
<Text style={styles.detailSectionTitle}>
|
||||
<Ionicons name="bag-outline" size={14} color={colors.success} />
|
||||
<Ionicons
|
||||
name="bag-outline"
|
||||
size={14}
|
||||
color={colors.success}
|
||||
/>
|
||||
{" "}Produits
|
||||
</Text>
|
||||
{detailsDelivery?.items && detailsDelivery.items.length > 0 ? (
|
||||
{detailsDelivery?.items &&
|
||||
detailsDelivery.items.length > 0 ? (
|
||||
detailsDelivery.items.map((prod, idx) => (
|
||||
<View key={idx} style={styles.detailProductRow}>
|
||||
<View style={{ flex: 1 }}>
|
||||
|
||||
Reference in New Issue
Block a user