diff --git a/lib/pages/commandes_screen.dart b/lib/pages/commandes_screen.dart index 0b8d2bb..5e760b2 100644 --- a/lib/pages/commandes_screen.dart +++ b/lib/pages/commandes_screen.dart @@ -717,6 +717,36 @@ class OrderCard extends StatelessWidget { order.statut == 'en_preparation') Row( children: [ + if (order.statut == 'en_attente') + Expanded( + child: ElevatedButton( + onPressed: + () => { + Navigator.push( + context, + MaterialPageRoute( + builder: + (context) => AddItemsToOrderPage( + commandId: order.id, + numeroCommande: order.numeroCommande, + ), + ), + ), + }, + style: ElevatedButton.styleFrom( + backgroundColor: Colors.orange, + padding: const EdgeInsets.symmetric(vertical: 12), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(6), + ), + ), + child: const Text( + 'Préparer', + style: TextStyle(color: Colors.white, fontSize: 12), + ), + ), + ), + const SizedBox(width: 8), Expanded( flex: 3, child: ElevatedButton.icon(