This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
"expo": {
|
"expo": {
|
||||||
"name": "Admin Panel",
|
"name": "Admin Panel",
|
||||||
"slug": "frontend-admin",
|
"slug": "frontend-admin",
|
||||||
"version": "1.0.2",
|
"version": "1.0.3",
|
||||||
"orientation": "portrait",
|
"orientation": "portrait",
|
||||||
"icon": "./assets/icon.png",
|
"icon": "./assets/icon.png",
|
||||||
"userInterfaceStyle": "dark",
|
"userInterfaceStyle": "dark",
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import {
|
|||||||
StatusBar,
|
StatusBar,
|
||||||
useWindowDimensions,
|
useWindowDimensions,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
Pressable,
|
|
||||||
} from "react-native";
|
} from "react-native";
|
||||||
import { Ionicons } from "@expo/vector-icons";
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
import { spacing, fontSize, borderRadius } from "../../theme";
|
import { spacing, fontSize, borderRadius } from "../../theme";
|
||||||
@@ -501,14 +500,10 @@ export default function DeliveryScreen() {
|
|||||||
borderTopLeftRadius: borderRadius.xl,
|
borderTopLeftRadius: borderRadius.xl,
|
||||||
borderTopRightRadius: borderRadius.xl,
|
borderTopRightRadius: borderRadius.xl,
|
||||||
padding: spacing.l,
|
padding: spacing.l,
|
||||||
// maxHeight en pourcentage ne se résout pas de façon fiable
|
maxHeight: "80%",
|
||||||
// ici : le parent direct est un Pressable sans style (donc
|
},
|
||||||
// sans hauteur définie), et un pourcentage a besoin d'un
|
ratingsList: {
|
||||||
// ancêtre à hauteur définie pour se calculer. Une valeur
|
padding: spacing.s,
|
||||||
// en pixels dérivée de screenHeight fonctionne toujours.
|
|
||||||
maxHeight: screenHeight * 0.8,
|
|
||||||
flexShrink: 1,
|
|
||||||
overflow: "hidden",
|
|
||||||
},
|
},
|
||||||
ratingsHeader: {
|
ratingsHeader: {
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
@@ -1083,8 +1078,7 @@ export default function DeliveryScreen() {
|
|||||||
animationType="slide"
|
animationType="slide"
|
||||||
onRequestClose={() => setRatingsModal(null)}
|
onRequestClose={() => setRatingsModal(null)}
|
||||||
>
|
>
|
||||||
<Pressable style={styles.ratingsOverlay} onPress={() => setRatingsModal(null)}>
|
<View style={styles.ratingsOverlay}>
|
||||||
<Pressable onPress={() => {}}>
|
|
||||||
<View style={styles.ratingsSheet}>
|
<View style={styles.ratingsSheet}>
|
||||||
<View style={styles.ratingsHeader}>
|
<View style={styles.ratingsHeader}>
|
||||||
<Text style={styles.ratingsTitle}>
|
<Text style={styles.ratingsTitle}>
|
||||||
@@ -1114,7 +1108,7 @@ export default function DeliveryScreen() {
|
|||||||
({ratingsModal.count} avis)
|
({ratingsModal.count} avis)
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<ScrollView style={{ flex: 1 }} showsVerticalScrollIndicator={false}>
|
<ScrollView style={styles.ratingsList}>
|
||||||
{ratingsModal.ratings.map((r) => (
|
{ratingsModal.ratings.map((r) => (
|
||||||
<View key={r.id} style={styles.ratingItem}>
|
<View key={r.id} style={styles.ratingItem}>
|
||||||
<View style={styles.ratingItemHeader}>
|
<View style={styles.ratingItemHeader}>
|
||||||
@@ -1144,8 +1138,7 @@ export default function DeliveryScreen() {
|
|||||||
<Text style={styles.ratingsEmpty}>Aucun avis pour ce livreur</Text>
|
<Text style={styles.ratingsEmpty}>Aucun avis pour ce livreur</Text>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
</Pressable>
|
</View>
|
||||||
</Pressable>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
{/* ── Modal historique de connexion livreur ── */}
|
{/* ── Modal historique de connexion livreur ── */}
|
||||||
@@ -1155,11 +1148,7 @@ export default function DeliveryScreen() {
|
|||||||
animationType="slide"
|
animationType="slide"
|
||||||
onRequestClose={() => setLoginHistoryModal(null)}
|
onRequestClose={() => setLoginHistoryModal(null)}
|
||||||
>
|
>
|
||||||
<Pressable
|
<View style={styles.ratingsOverlay}>
|
||||||
style={styles.ratingsOverlay}
|
|
||||||
onPress={() => setLoginHistoryModal(null)}
|
|
||||||
>
|
|
||||||
<Pressable onPress={() => {}}>
|
|
||||||
<View style={styles.ratingsSheet}>
|
<View style={styles.ratingsSheet}>
|
||||||
<View style={styles.ratingsHeader}>
|
<View style={styles.ratingsHeader}>
|
||||||
<Text style={styles.ratingsTitle}>
|
<Text style={styles.ratingsTitle}>
|
||||||
@@ -1265,7 +1254,7 @@ export default function DeliveryScreen() {
|
|||||||
</Text>
|
</Text>
|
||||||
) : loginHistoryModal &&
|
) : loginHistoryModal &&
|
||||||
loginHistoryModal.weeks.length > 0 ? (
|
loginHistoryModal.weeks.length > 0 ? (
|
||||||
<ScrollView style={{ flex: 1 }} showsVerticalScrollIndicator={false}>
|
<ScrollView style={styles.ratingsList}>
|
||||||
{loginHistoryModal.weeks.map((week) => (
|
{loginHistoryModal.weeks.map((week) => (
|
||||||
<View key={week.week}>
|
<View key={week.week}>
|
||||||
<Text style={styles.historyWeekLabel}>
|
<Text style={styles.historyWeekLabel}>
|
||||||
@@ -1318,8 +1307,7 @@ export default function DeliveryScreen() {
|
|||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
</Pressable>
|
</View>
|
||||||
</Pressable>
|
|
||||||
</Modal>
|
</Modal>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user