diff --git a/frontend-admin/src/screens/admin/OrdersScreen.tsx b/frontend-admin/src/screens/admin/OrdersScreen.tsx index 2cef85f2..05d8dda8 100644 --- a/frontend-admin/src/screens/admin/OrdersScreen.tsx +++ b/frontend-admin/src/screens/admin/OrdersScreen.tsx @@ -282,7 +282,7 @@ export default function OrdersScreen() { fontSize: fontSize.sm, }, dropdownTextDanger: { - color: colors.error, + color: colors.danger, fontSize: fontSize.sm, }, empty: { @@ -361,43 +361,43 @@ export default function OrdersScreen() { condition?: boolean; }; - const actions: Action[] = [ + const actions: Action[] = ([ { label: "Voir items", - icon: "receipt-outline", + icon: "receipt-outline" as keyof typeof Ionicons.glyphMap, onPress: () => { setOpenMenuId(null); openItems(item.id); }, }, { label: "Le client est là", - icon: "notifications-outline", + icon: "notifications-outline" as keyof typeof Ionicons.glyphMap, onPress: () => { setOpenMenuId(null); handleNotifyClient(item.id); }, condition: !isDone, }, { label: "Assigner livreur", - icon: "bicycle-outline", + icon: "bicycle-outline" as keyof typeof Ionicons.glyphMap, onPress: () => { setOpenMenuId(null); openAssignModal(item.id); }, condition: !isDone, }, { label: "Passer en route", - icon: "car-outline", + icon: "car-outline" as keyof typeof Ionicons.glyphMap, onPress: () => { setOpenMenuId(null); handleStatusUpdate(item.id, "en_route"); }, condition: item.status === "assigned", }, { label: "Confirmer réception", - icon: "checkmark-circle-outline", + icon: "checkmark-circle-outline" as keyof typeof Ionicons.glyphMap, onPress: () => { setOpenMenuId(null); handleConfirmReception(item.id); }, condition: item.status === "livre", }, { label: "Supprimer", - icon: "trash-outline", + icon: "trash-outline" as keyof typeof Ionicons.glyphMap, onPress: () => { setOpenMenuId(null); handleDelete(item.id); }, danger: true, }, - ].filter((a) => a.condition !== false); + ] as Action[]).filter((a) => a.condition !== false); return ( @@ -448,7 +448,7 @@ export default function OrdersScreen() { {action.label} diff --git a/frontend-admin/src/screens/cabine/OrdersScreen.tsx b/frontend-admin/src/screens/cabine/OrdersScreen.tsx index 76828fa5..2580f626 100644 --- a/frontend-admin/src/screens/cabine/OrdersScreen.tsx +++ b/frontend-admin/src/screens/cabine/OrdersScreen.tsx @@ -262,7 +262,7 @@ export default function OrdersScreen() { fontSize: fontSize.sm, }, dropdownTextDanger: { - color: colors.error, + color: colors.danger, fontSize: fontSize.sm, }, // Modal summary @@ -372,35 +372,35 @@ export default function OrdersScreen() { condition?: boolean; }; - const actions: Action[] = [ + const actions: Action[] = ([ { label: "Voir items", - icon: "receipt-outline", + icon: "receipt-outline" as keyof typeof Ionicons.glyphMap, onPress: () => openItems(item.id), }, { label: "Le client est là", - icon: "notifications-outline", + icon: "notifications-outline" as keyof typeof Ionicons.glyphMap, onPress: () => handleNotifyClient(item.id), }, { label: "Assigner livreur", - icon: "bicycle-outline", + icon: "bicycle-outline" as keyof typeof Ionicons.glyphMap, onPress: () => openAssignModal(item.id), }, { label: "Confirmer réception", - icon: "checkmark-circle-outline", + icon: "checkmark-circle-outline" as keyof typeof Ionicons.glyphMap, onPress: () => handleConfirmReception(item.id), condition: item.status === "livre", }, { label: "Supprimer", - icon: "trash-outline", + icon: "trash-outline" as keyof typeof Ionicons.glyphMap, onPress: () => handleDelete(item.id), danger: true, }, - ].filter((a) => a.condition !== false); + ] as Action[]).filter((a) => a.condition !== false); return ( @@ -440,7 +440,7 @@ export default function OrdersScreen() {