chore: add select
This commit is contained in:
@@ -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 (
|
||||
<Card style={{ marginBottom: spacing.m }}>
|
||||
@@ -440,7 +440,7 @@ export default function OrdersScreen() {
|
||||
<Ionicons
|
||||
name={action.icon}
|
||||
size={16}
|
||||
color={action.danger ? colors.error : colors.accent}
|
||||
color={action.danger ? colors.danger : colors.accent}
|
||||
/>
|
||||
<Text
|
||||
style={
|
||||
|
||||
Reference in New Issue
Block a user