Merge branch 'master' of https://git.c4m.mg/Andrii/CARING_RESTORANT
This commit is contained in:
commit
3b7d3f8cca
@ -8,7 +8,7 @@ plugins {
|
|||||||
android {
|
android {
|
||||||
namespace = "com.example.itrimobe"
|
namespace = "com.example.itrimobe"
|
||||||
compileSdk = flutter.compileSdkVersion
|
compileSdk = flutter.compileSdkVersion
|
||||||
ndkVersion = flutter.ndkVersion
|
ndkVersion = "27.0.12077973"
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility = JavaVersion.VERSION_11
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
|||||||
@ -10,10 +10,21 @@
|
|||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
|
|
||||||
<!-- Autorisations pour HTTP non-sécurisé -->
|
<!-- Autorisations pour HTTP non-sécurisé -->
|
||||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
<!-- Permissions pour l'impression et les fichiers -->
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
android:maxSdkVersion="28" />
|
||||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" tools:ignore="ScopedStorage" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
|
||||||
|
android:maxSdkVersion="32" />
|
||||||
|
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
|
||||||
|
android:minSdkVersion="30" />
|
||||||
|
|
||||||
|
<!-- Permissions pour l'impression -->
|
||||||
|
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||||
|
|
||||||
|
<!-- Permissions pour Android 13+ -->
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
|
||||||
|
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:label="itrimobe"
|
android:label="itrimobe"
|
||||||
|
|||||||
@ -10,10 +10,10 @@ class CaisseScreen extends StatefulWidget {
|
|||||||
final int tableNumber;
|
final int tableNumber;
|
||||||
|
|
||||||
const CaisseScreen({
|
const CaisseScreen({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.commandeId,
|
required this.commandeId,
|
||||||
required this.tableNumber,
|
required this.tableNumber,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_CaisseScreenState createState() => _CaisseScreenState();
|
_CaisseScreenState createState() => _CaisseScreenState();
|
||||||
@ -26,26 +26,26 @@ class _CaisseScreenState extends State<CaisseScreen> {
|
|||||||
bool isProcessingPayment = false;
|
bool isProcessingPayment = false;
|
||||||
|
|
||||||
final List<PaymentMethod> paymentMethods = [
|
final List<PaymentMethod> paymentMethods = [
|
||||||
PaymentMethod(
|
const PaymentMethod(
|
||||||
id: 'mvola',
|
id: 'mvola',
|
||||||
name: 'MVola',
|
name: 'MVola',
|
||||||
description: 'Paiement mobile MVola',
|
description: 'Paiement mobile MVola',
|
||||||
icon: Icons.phone,
|
icon: Icons.phone,
|
||||||
color: const Color(0xFF4285F4),
|
color: Color(0xFF4285F4),
|
||||||
),
|
),
|
||||||
PaymentMethod(
|
const PaymentMethod(
|
||||||
id: 'carte',
|
id: 'carte',
|
||||||
name: 'Carte Bancaire',
|
name: 'Carte Bancaire',
|
||||||
description: 'Paiement par carte',
|
description: 'Paiement par carte',
|
||||||
icon: Icons.credit_card,
|
icon: Icons.credit_card,
|
||||||
color: const Color(0xFF28A745),
|
color: Color(0xFF28A745),
|
||||||
),
|
),
|
||||||
PaymentMethod(
|
const PaymentMethod(
|
||||||
id: 'especes',
|
id: 'especes',
|
||||||
name: 'Espèces',
|
name: 'Espèces',
|
||||||
description: 'Paiement en liquide',
|
description: 'Paiement en liquide',
|
||||||
icon: Icons.attach_money,
|
icon: Icons.attach_money,
|
||||||
color: const Color(0xFFFF9500),
|
color: Color(0xFFFF9500),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
@ -9,14 +10,16 @@ import '../layouts/main_layout.dart';
|
|||||||
class CartPage extends StatefulWidget {
|
class CartPage extends StatefulWidget {
|
||||||
final int tableId;
|
final int tableId;
|
||||||
final int personne;
|
final int personne;
|
||||||
|
final String? tablename;
|
||||||
final List<dynamic> cartItems;
|
final List<dynamic> cartItems;
|
||||||
|
|
||||||
const CartPage({
|
const CartPage({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.tableId,
|
required this.tableId,
|
||||||
required this.personne,
|
required this.personne,
|
||||||
required this.cartItems,
|
required this.cartItems,
|
||||||
}) : super(key: key);
|
this.tablename,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<CartPage> createState() => _CartPageState();
|
State<CartPage> createState() => _CartPageState();
|
||||||
@ -47,7 +50,7 @@ class _CartPageState extends State<CartPage> {
|
|||||||
nom: item['nom'] ?? 'Article',
|
nom: item['nom'] ?? 'Article',
|
||||||
prix: _parsePrice(item['prix']),
|
prix: _parsePrice(item['prix']),
|
||||||
quantity: 1,
|
quantity: 1,
|
||||||
notes: item['notes'] ?? '',
|
commentaire: item['commentaire'] ?? '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -97,7 +100,7 @@ class _CartPageState extends State<CartPage> {
|
|||||||
barrierDismissible: false,
|
barrierDismissible: false,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text(
|
title: const Text(
|
||||||
'Confirmer la commande',
|
'Confirmer la commande',
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
@ -105,9 +108,9 @@ class _CartPageState extends State<CartPage> {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text('Êtes-vous sûr de vouloir valider cette commande ?'),
|
const Text('Êtes-vous sûr de vouloir valider cette commande ?'),
|
||||||
SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Text(
|
const Text(
|
||||||
'Récapitulatif:',
|
'Récapitulatif:',
|
||||||
style: TextStyle(fontWeight: FontWeight.bold),
|
style: TextStyle(fontWeight: FontWeight.bold),
|
||||||
),
|
),
|
||||||
@ -123,7 +126,8 @@ class _CartPageState extends State<CartPage> {
|
|||||||
child: Text('Annuler', style: TextStyle(color: Colors.grey[600])),
|
child: Text('Annuler', style: TextStyle(color: Colors.grey[600])),
|
||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: _isValidating
|
onPressed:
|
||||||
|
_isValidating
|
||||||
? null
|
? null
|
||||||
: () {
|
: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
@ -133,8 +137,9 @@ class _CartPageState extends State<CartPage> {
|
|||||||
backgroundColor: Colors.green[700],
|
backgroundColor: Colors.green[700],
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
),
|
),
|
||||||
child: _isValidating
|
child:
|
||||||
? SizedBox(
|
_isValidating
|
||||||
|
? const SizedBox(
|
||||||
width: 16,
|
width: 16,
|
||||||
height: 16,
|
height: 16,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
@ -144,7 +149,7 @@ class _CartPageState extends State<CartPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: Text('Valider'),
|
: const Text('Valider'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -165,12 +170,14 @@ class _CartPageState extends State<CartPage> {
|
|||||||
"reservation_id": 1, // Peut être null si pas de réservation
|
"reservation_id": 1, // Peut être null si pas de réservation
|
||||||
"serveur": "Serveur par défaut", // Valeur par défaut comme demandé
|
"serveur": "Serveur par défaut", // Valeur par défaut comme demandé
|
||||||
"commentaires": _getOrderComments(),
|
"commentaires": _getOrderComments(),
|
||||||
"items": _cartItems
|
"items":
|
||||||
|
_cartItems
|
||||||
.map(
|
.map(
|
||||||
(item) => {
|
(item) => {
|
||||||
"menu_id": item.id,
|
"menu_id": item.id,
|
||||||
"quantite": item.quantity,
|
"quantite": item.quantity,
|
||||||
"commentaires": item.notes.isNotEmpty ? item.notes : null,
|
"commentaires":
|
||||||
|
item.commentaire.isNotEmpty ? item.commentaire : null,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
.toList(),
|
.toList(),
|
||||||
@ -207,9 +214,10 @@ class _CartPageState extends State<CartPage> {
|
|||||||
|
|
||||||
String _getOrderComments() {
|
String _getOrderComments() {
|
||||||
// Concaténer toutes les notes des articles pour les commentaires généraux
|
// Concaténer toutes les notes des articles pour les commentaires généraux
|
||||||
List<String> allNotes = _cartItems
|
List<String> allNotes =
|
||||||
.where((item) => item.notes.isNotEmpty)
|
_cartItems
|
||||||
.map((item) => '${item.nom}: ${item.notes}')
|
.where((item) => item.commentaire.isNotEmpty)
|
||||||
|
.map((item) => '${item.nom}: ${item.commentaire}')
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
return allNotes.join('; ');
|
return allNotes.join('; ');
|
||||||
@ -225,11 +233,11 @@ class _CartPageState extends State<CartPage> {
|
|||||||
title: Row(
|
title: Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.check_circle, color: Colors.green[700]),
|
Icon(Icons.check_circle, color: Colors.green[700]),
|
||||||
SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text('Commande validée'),
|
const Text('Commande validée'),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
content: Text(
|
content: const Text(
|
||||||
'Votre commande a été envoyée en cuisine avec succès !',
|
'Votre commande a été envoyée en cuisine avec succès !',
|
||||||
),
|
),
|
||||||
actions: [
|
actions: [
|
||||||
@ -237,12 +245,13 @@ class _CartPageState extends State<CartPage> {
|
|||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context).pushAndRemoveUntil(
|
Navigator.of(context).pushAndRemoveUntil(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => MainLayout(child: TablesScreen()),
|
builder:
|
||||||
|
(context) => const MainLayout(child: TablesScreen()),
|
||||||
),
|
),
|
||||||
(route) => false,
|
(route) => false,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Text('OK'),
|
child: const Text('OK'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -252,23 +261,26 @@ class _CartPageState extends State<CartPage> {
|
|||||||
|
|
||||||
Future<void> _updateTableStatus() async {
|
Future<void> _updateTableStatus() async {
|
||||||
try {
|
try {
|
||||||
final updateResponse = await http.put(
|
final _ = await http.put(
|
||||||
Uri.parse(
|
Uri.parse(
|
||||||
'https://restaurant.careeracademy.mg/api/tables/${widget.tableId}'),
|
'https://restaurant.careeracademy.mg/api/tables/${widget.tableId}',
|
||||||
|
),
|
||||||
headers: {'Content-Type': 'application/json'},
|
headers: {'Content-Type': 'application/json'},
|
||||||
body: json.encode({"status": "occupied"}),
|
body: json.encode({"status": "occupied"}),
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
if (kDebugMode) {
|
||||||
print("Erreur lors de la mise à jour du statut de la table: $e");
|
print("Erreur lors de la mise à jour du statut de la table: $e");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void _showErrorDialog(String message) {
|
void _showErrorDialog(String message) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Row(
|
title: const Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.error, color: Colors.red),
|
Icon(Icons.error, color: Colors.red),
|
||||||
SizedBox(width: 8),
|
SizedBox(width: 8),
|
||||||
@ -279,7 +291,7 @@ class _CartPageState extends State<CartPage> {
|
|||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
child: Text('OK'),
|
child: const Text('OK'),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@ -287,6 +299,235 @@ class _CartPageState extends State<CartPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> _payerDirectement() async {
|
||||||
|
if (_cartItems.isEmpty) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(
|
||||||
|
content: Text('Aucun article dans le panier'),
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Calculer le total
|
||||||
|
double total = _cartItems.fold(0.0, (sum, item) {
|
||||||
|
return sum + (item.prix * item.quantity);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Confirmer le paiement
|
||||||
|
final bool? confirm = await showDialog<bool>(
|
||||||
|
context: context,
|
||||||
|
builder:
|
||||||
|
(context) => AlertDialog(
|
||||||
|
title: const Text('Confirmer le paiement'),
|
||||||
|
content: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Text('${widget.tablename}'),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Text('Articles: ${_cartItems.length}'),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
'Total: ${total.toStringAsFixed(0)} MGA',
|
||||||
|
style: const TextStyle(
|
||||||
|
fontSize: 18,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
const Text('Valider et payer cette commande ?'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(false),
|
||||||
|
child: const Text('Annuler'),
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () => Navigator.of(context).pop(true),
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: Colors.orange[600],
|
||||||
|
),
|
||||||
|
child: const Text('Confirmer le paiement'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (confirm != true) return;
|
||||||
|
|
||||||
|
setState(() {
|
||||||
|
_isValidating = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 1. Créer la commande avec les items du panier
|
||||||
|
final response = await http.post(
|
||||||
|
Uri.parse('https://restaurant.careeracademy.mg/api/commandes'),
|
||||||
|
headers: {'Content-Type': 'application/json'},
|
||||||
|
body: jsonEncode({
|
||||||
|
'table_id': widget.tableId,
|
||||||
|
'statut': 'payee', // Directement payée
|
||||||
|
'items':
|
||||||
|
_cartItems
|
||||||
|
.map(
|
||||||
|
(item) => {
|
||||||
|
'menu_id': item.id,
|
||||||
|
'quantite': item.quantity,
|
||||||
|
'prix_unitaire': item.prix,
|
||||||
|
'commentaire': item.commentaire,
|
||||||
|
// Pas de réservation
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
'methode_paiement': 'especes',
|
||||||
|
'montant_paye': total,
|
||||||
|
'date_paiement': DateTime.now().toIso8601String(),
|
||||||
|
'client_id': 1, // Valeur par défaut
|
||||||
|
'reservation_id': 1,
|
||||||
|
'serveur': 'Serveur par défaut', // Valeur par défaut
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
|
||||||
|
if (response.statusCode == 201) {
|
||||||
|
final commandeData = jsonDecode(response.body);
|
||||||
|
|
||||||
|
// 2. Libérer la table
|
||||||
|
await http.patch(
|
||||||
|
Uri.parse(
|
||||||
|
'https://restaurant.careeracademy.mg/api/tables/${widget.tableId}',
|
||||||
|
),
|
||||||
|
headers: {'Content-Type': 'application/json'},
|
||||||
|
body: jsonEncode({'statut': 'libre'}),
|
||||||
|
);
|
||||||
|
|
||||||
|
// 3. Succès
|
||||||
|
_showPaymentSuccessDialog(commandeData, total);
|
||||||
|
} else {
|
||||||
|
throw Exception('Erreur lors du paiement');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Erreur: ${e.toString()}'),
|
||||||
|
backgroundColor: Colors.red,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} finally {
|
||||||
|
setState(() {
|
||||||
|
_isValidating = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void _showPaymentSuccessDialog(
|
||||||
|
Map<String, dynamic> commandeData,
|
||||||
|
double total,
|
||||||
|
) {
|
||||||
|
showDialog(
|
||||||
|
context: context,
|
||||||
|
barrierDismissible: false,
|
||||||
|
builder:
|
||||||
|
(context) => AlertDialog(
|
||||||
|
title: const Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.check_circle, color: Colors.green, size: 28),
|
||||||
|
SizedBox(width: 8),
|
||||||
|
Text('Paiement confirmé'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
content: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Text('Commande #${commandeData['id']}'),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Text('Table ${widget.tablename} libérée'),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
Text(
|
||||||
|
'Montant: ${total.toStringAsFixed(2)} €',
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 16),
|
||||||
|
const Text('Voulez-vous imprimer un reçu ?'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
actions: [
|
||||||
|
TextButton(
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context).pop(); // Fermer le dialog
|
||||||
|
// Naviguer vers la page des tables
|
||||||
|
Navigator.of(context).pushAndRemoveUntil(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder:
|
||||||
|
(context) => const MainLayout(child: TablesScreen()),
|
||||||
|
),
|
||||||
|
(route) => false,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: const Text('Non merci'),
|
||||||
|
),
|
||||||
|
ElevatedButton(
|
||||||
|
onPressed: () async {
|
||||||
|
Navigator.of(context).pop(); // Fermer le dialog
|
||||||
|
await _imprimerTicketPaiement(commandeData, total);
|
||||||
|
// Naviguer vers la page des tables après l'impression
|
||||||
|
Navigator.of(context).pushAndRemoveUntil(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder:
|
||||||
|
(context) => const MainLayout(child: TablesScreen()),
|
||||||
|
),
|
||||||
|
(route) => false,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
style: ElevatedButton.styleFrom(backgroundColor: Colors.green),
|
||||||
|
child: const Text('Imprimer'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<void> _imprimerTicketPaiement(
|
||||||
|
Map<String, dynamic> commandeData,
|
||||||
|
double total,
|
||||||
|
) async {
|
||||||
|
try {
|
||||||
|
// Préparer les données pour l'impression
|
||||||
|
_cartItems
|
||||||
|
.map(
|
||||||
|
(item) => {
|
||||||
|
'nom': item.nom,
|
||||||
|
'quantite': item.quantity,
|
||||||
|
'prix_unitaire': item.prix,
|
||||||
|
'sous_total': item.prix * item.quantity,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
// Appeler le service d'impression
|
||||||
|
// await PlatformPrintService.printFacture(
|
||||||
|
// commande: widget.commande,
|
||||||
|
// paymentMethod: widget.paymentMethod,
|
||||||
|
// );
|
||||||
|
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
const SnackBar(
|
||||||
|
content: Text('Ticket imprimé avec succès'),
|
||||||
|
backgroundColor: Colors.green,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
|
SnackBar(
|
||||||
|
content: Text('Erreur d\'impression: ${e.toString()}'),
|
||||||
|
backgroundColor: Colors.orange,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
@ -296,9 +537,9 @@ class _CartPageState extends State<CartPage> {
|
|||||||
elevation: 0,
|
elevation: 0,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
icon: Icon(Icons.arrow_back, color: Colors.black),
|
icon: const Icon(Icons.arrow_back, color: Colors.black),
|
||||||
),
|
),
|
||||||
title: Text(
|
title: const Text(
|
||||||
'Panier',
|
'Panier',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.black,
|
color: Colors.black,
|
||||||
@ -309,15 +550,16 @@ class _CartPageState extends State<CartPage> {
|
|||||||
actions: [
|
actions: [
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () => Navigator.pop(context),
|
onPressed: () => Navigator.pop(context),
|
||||||
child: Text(
|
child: const Text(
|
||||||
'Retour au menu',
|
'Retour au menu',
|
||||||
style: TextStyle(color: Colors.black, fontSize: 16),
|
style: TextStyle(color: Colors.black, fontSize: 16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: _cartItems.isEmpty
|
body:
|
||||||
|
_cartItems.isEmpty
|
||||||
? Center(
|
? Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@ -327,7 +569,7 @@ class _CartPageState extends State<CartPage> {
|
|||||||
size: 80,
|
size: 80,
|
||||||
color: Colors.grey[400],
|
color: Colors.grey[400],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Text(
|
Text(
|
||||||
'Votre panier est vide',
|
'Votre panier est vide',
|
||||||
style: TextStyle(fontSize: 18, color: Colors.grey[600]),
|
style: TextStyle(fontSize: 18, color: Colors.grey[600]),
|
||||||
@ -340,10 +582,10 @@ class _CartPageState extends State<CartPage> {
|
|||||||
// Header avec infos table
|
// Header avec infos table
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
child: Text(
|
child: Text(
|
||||||
'Table ${widget.tableId} • ${widget.personne} personne${widget.personne > 1 ? 's' : ''}',
|
'${widget.tablename} • ${widget.personne} personne${widget.personne > 1 ? 's' : ''}',
|
||||||
style: TextStyle(fontSize: 16, color: Colors.grey[600]),
|
style: TextStyle(fontSize: 16, color: Colors.grey[600]),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -351,13 +593,14 @@ class _CartPageState extends State<CartPage> {
|
|||||||
// Liste des articles
|
// Liste des articles
|
||||||
Expanded(
|
Expanded(
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
padding: EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
itemCount: _cartItems.length,
|
itemCount: _cartItems.length,
|
||||||
separatorBuilder: (context, index) => SizedBox(height: 12),
|
separatorBuilder:
|
||||||
|
(context, index) => const SizedBox(height: 12),
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final item = _cartItems[index];
|
final item = _cartItems[index];
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.all(16),
|
padding: const EdgeInsets.all(16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
@ -365,7 +608,7 @@ class _CartPageState extends State<CartPage> {
|
|||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: Colors.black.withOpacity(0.05),
|
color: Colors.black.withOpacity(0.05),
|
||||||
blurRadius: 5,
|
blurRadius: 5,
|
||||||
offset: Offset(0, 2),
|
offset: const Offset(0, 2),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -373,12 +616,13 @@ class _CartPageState extends State<CartPage> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
item.nom,
|
item.nom,
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
@ -386,11 +630,11 @@ class _CartPageState extends State<CartPage> {
|
|||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => _removeItem(index),
|
onPressed: () => _removeItem(index),
|
||||||
icon: Icon(
|
icon: const Icon(
|
||||||
Icons.delete_outline,
|
Icons.delete_outline,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
),
|
),
|
||||||
constraints: BoxConstraints(),
|
constraints: const BoxConstraints(),
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -402,10 +646,10 @@ class _CartPageState extends State<CartPage> {
|
|||||||
color: Colors.grey[600],
|
color: Colors.grey[600],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (item.notes.isNotEmpty) ...[
|
if (item.commentaire.isNotEmpty) ...[
|
||||||
SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
'Notes: ${item.notes}',
|
'Notes: ${item.commentaire}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: Colors.grey[600],
|
color: Colors.grey[600],
|
||||||
@ -413,42 +657,45 @@ class _CartPageState extends State<CartPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
// Contrôles de quantité
|
// Contrôles de quantité
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => _updateQuantity(
|
onPressed:
|
||||||
|
() => _updateQuantity(
|
||||||
index,
|
index,
|
||||||
item.quantity - 1,
|
item.quantity - 1,
|
||||||
),
|
),
|
||||||
icon: Icon(Icons.remove),
|
icon: const Icon(Icons.remove),
|
||||||
style: IconButton.styleFrom(
|
style: IconButton.styleFrom(
|
||||||
backgroundColor: Colors.grey[200],
|
backgroundColor: Colors.grey[200],
|
||||||
minimumSize: Size(40, 40),
|
minimumSize: const Size(40, 40),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
Text(
|
Text(
|
||||||
item.quantity.toString(),
|
item.quantity.toString(),
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => _updateQuantity(
|
onPressed:
|
||||||
|
() => _updateQuantity(
|
||||||
index,
|
index,
|
||||||
item.quantity + 1,
|
item.quantity + 1,
|
||||||
),
|
),
|
||||||
icon: Icon(Icons.add),
|
icon: const Icon(Icons.add),
|
||||||
style: IconButton.styleFrom(
|
style: IconButton.styleFrom(
|
||||||
backgroundColor: Colors.grey[200],
|
backgroundColor: Colors.grey[200],
|
||||||
minimumSize: Size(40, 40),
|
minimumSize: const Size(40, 40),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@ -473,7 +720,7 @@ class _CartPageState extends State<CartPage> {
|
|||||||
|
|
||||||
// Récapitulatif
|
// Récapitulatif
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(20),
|
padding: const EdgeInsets.all(20),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
border: Border(top: BorderSide(color: Colors.grey[200]!)),
|
border: Border(top: BorderSide(color: Colors.grey[200]!)),
|
||||||
@ -481,53 +728,62 @@ class _CartPageState extends State<CartPage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
const Text(
|
||||||
'Récapitulatif',
|
'Récapitulatif',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text('Articles:', style: TextStyle(fontSize: 16)),
|
const Text(
|
||||||
|
'Articles:',
|
||||||
|
style: TextStyle(fontSize: 16),
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
_getTotalArticles().toString(),
|
_getTotalArticles().toString(),
|
||||||
style: TextStyle(fontSize: 16),
|
style: const TextStyle(fontSize: 16),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text('Table:', style: TextStyle(fontSize: 16)),
|
const Text(
|
||||||
|
'Table:',
|
||||||
|
style: TextStyle(fontSize: 16),
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
widget.tableId.toString(),
|
widget.tableId.toString(),
|
||||||
style: TextStyle(fontSize: 16),
|
style: const TextStyle(fontSize: 16),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text('Personnes:', style: TextStyle(fontSize: 16)),
|
const Text(
|
||||||
|
'Personnes:',
|
||||||
|
style: TextStyle(fontSize: 16),
|
||||||
|
),
|
||||||
Text(
|
Text(
|
||||||
widget.personne.toString(),
|
widget.personne.toString(),
|
||||||
style: TextStyle(fontSize: 16),
|
style: const TextStyle(fontSize: 16),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Divider(),
|
const Divider(),
|
||||||
SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
const Text(
|
||||||
'Total:',
|
'Total:',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
@ -536,24 +792,25 @@ class _CartPageState extends State<CartPage> {
|
|||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${_calculateTotal().toStringAsFixed(2)} MGA',
|
'${_calculateTotal().toStringAsFixed(2)} MGA',
|
||||||
style: TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 20),
|
const SizedBox(height: 20),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: _cartItems.isNotEmpty && !_isValidating
|
onPressed:
|
||||||
|
_cartItems.isNotEmpty && !_isValidating
|
||||||
? _showConfirmationDialog
|
? _showConfirmationDialog
|
||||||
: null,
|
: null,
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.green[700],
|
backgroundColor: Colors.green[700],
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: Colors.white,
|
||||||
padding: EdgeInsets.symmetric(vertical: 16),
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
@ -563,7 +820,7 @@ class _CartPageState extends State<CartPage> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
if (_isValidating) ...[
|
if (_isValidating) ...[
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
child: CircularProgressIndicator(
|
child: CircularProgressIndicator(
|
||||||
@ -573,8 +830,8 @@ class _CartPageState extends State<CartPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
const Text(
|
||||||
'Validation en cours...',
|
'Validation en cours...',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@ -582,9 +839,9 @@ class _CartPageState extends State<CartPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
] else ...[
|
] else ...[
|
||||||
Icon(Icons.check, size: 20),
|
const Icon(Icons.check, size: 20),
|
||||||
SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
const Text(
|
||||||
'Valider la commande',
|
'Valider la commande',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
@ -596,6 +853,63 @@ class _CartPageState extends State<CartPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
const SizedBox(height: 12),
|
||||||
|
|
||||||
|
// Bouton Payer directement
|
||||||
|
SizedBox(
|
||||||
|
width: double.infinity,
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed:
|
||||||
|
_cartItems.isNotEmpty && !_isValidating
|
||||||
|
? _payerDirectement
|
||||||
|
: null,
|
||||||
|
style: ElevatedButton.styleFrom(
|
||||||
|
backgroundColor: Colors.orange[600],
|
||||||
|
foregroundColor: Colors.white,
|
||||||
|
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||||
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
),
|
||||||
|
disabledBackgroundColor: Colors.grey[300],
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
if (_isValidating) ...[
|
||||||
|
const SizedBox(
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
child: CircularProgressIndicator(
|
||||||
|
strokeWidth: 2,
|
||||||
|
valueColor: AlwaysStoppedAnimation<Color>(
|
||||||
|
Colors.white,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
const Text(
|
||||||
|
'Traitement...',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
] else ...[
|
||||||
|
const Icon(Icons.payment, size: 20),
|
||||||
|
const SizedBox(width: 8),
|
||||||
|
const Text(
|
||||||
|
'Payer directement',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -610,13 +924,13 @@ class CartItemModel {
|
|||||||
final String nom;
|
final String nom;
|
||||||
final double prix;
|
final double prix;
|
||||||
int quantity;
|
int quantity;
|
||||||
final String notes;
|
final String commentaire;
|
||||||
|
|
||||||
CartItemModel({
|
CartItemModel({
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.nom,
|
required this.nom,
|
||||||
required this.prix,
|
required this.prix,
|
||||||
required this.quantity,
|
required this.quantity,
|
||||||
required this.notes,
|
required this.commentaire,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -311,7 +311,7 @@ class _OrdersManagementScreenState extends State<OrdersManagementScreen> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'Table ${order.tableId} - ${order.totalTtc.toStringAsFixed(2)} MGA',
|
'${order.tablename} - ${order.totalTtc.toStringAsFixed(2)} MGA',
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -515,7 +515,6 @@ class _OrdersManagementScreenState extends State<OrdersManagementScreen> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class OrderCard extends StatelessWidget {
|
class OrderCard extends StatelessWidget {
|
||||||
final Order order;
|
final Order order;
|
||||||
final Function(Order, String, {String? modePaiement}) onStatusUpdate;
|
final Function(Order, String, {String? modePaiement}) onStatusUpdate;
|
||||||
@ -587,7 +586,7 @@ class OrderCard extends StatelessWidget {
|
|||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: onViewDetails,
|
onTap: onViewDetails,
|
||||||
child: Text(
|
child: Text(
|
||||||
'Table ${order.tableId}',
|
'${order.tablename}',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
@ -662,7 +661,6 @@ class OrderCard extends StatelessWidget {
|
|||||||
color: Colors.black87,
|
color: Colors.black87,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -861,6 +859,7 @@ class Order {
|
|||||||
final DateTime createdAt;
|
final DateTime createdAt;
|
||||||
DateTime updatedAt;
|
DateTime updatedAt;
|
||||||
final List<OrderItem> items;
|
final List<OrderItem> items;
|
||||||
|
final String? tablename;
|
||||||
|
|
||||||
Order({
|
Order({
|
||||||
required this.id,
|
required this.id,
|
||||||
@ -880,6 +879,7 @@ class Order {
|
|||||||
required this.createdAt,
|
required this.createdAt,
|
||||||
required this.updatedAt,
|
required this.updatedAt,
|
||||||
this.items = const [],
|
this.items = const [],
|
||||||
|
this.tablename = '',
|
||||||
});
|
});
|
||||||
|
|
||||||
factory Order.fromJson(Map<String, dynamic> json) {
|
factory Order.fromJson(Map<String, dynamic> json) {
|
||||||
@ -912,6 +912,7 @@ class Order {
|
|||||||
createdAt: DateTime.parse(json['created_at']),
|
createdAt: DateTime.parse(json['created_at']),
|
||||||
updatedAt: DateTime.parse(json['updated_at']),
|
updatedAt: DateTime.parse(json['updated_at']),
|
||||||
items: orderItems,
|
items: orderItems,
|
||||||
|
tablename: json['tablename'] ?? '',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -925,7 +926,13 @@ class OrderItem {
|
|||||||
final String? nom;
|
final String? nom;
|
||||||
final double? pu;
|
final double? pu;
|
||||||
|
|
||||||
OrderItem({required this.menuId, required this.quantite, this.commentaires, this.nom, this.pu});
|
OrderItem({
|
||||||
|
required this.menuId,
|
||||||
|
required this.quantite,
|
||||||
|
this.commentaires,
|
||||||
|
this.nom,
|
||||||
|
this.pu,
|
||||||
|
});
|
||||||
|
|
||||||
factory OrderItem.fromJson(Map<String, dynamic> json) {
|
factory OrderItem.fromJson(Map<String, dynamic> json) {
|
||||||
return OrderItem(
|
return OrderItem(
|
||||||
@ -933,7 +940,8 @@ class OrderItem {
|
|||||||
quantite: json['quantite'],
|
quantite: json['quantite'],
|
||||||
commentaires: json['commentaires'],
|
commentaires: json['commentaires'],
|
||||||
nom: json['menu_nom'],
|
nom: json['menu_nom'],
|
||||||
pu: json['menu_prix_actuel'] != null
|
pu:
|
||||||
|
json['menu_prix_actuel'] != null
|
||||||
? double.tryParse(json['menu_prix_actuel'].toString())
|
? double.tryParse(json['menu_prix_actuel'].toString())
|
||||||
: null,
|
: null,
|
||||||
);
|
);
|
||||||
|
|||||||
@ -116,23 +116,23 @@ class _EncaissementScreenState extends State<EncaissementScreen> {
|
|||||||
),
|
),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
// Bouton Commande Directe
|
// Bouton Commande Directe
|
||||||
ElevatedButton.icon(
|
// ElevatedButton.icon(
|
||||||
onPressed: _showCommandeDirecteDialog,
|
// onPressed: _showCommandeDirecteDialog,
|
||||||
icon: const Icon(Icons.add_shopping_cart, size: 20),
|
// icon: const Icon(Icons.add_shopping_cart, size: 20),
|
||||||
label: const Text('Commande Directe'),
|
// label: const Text('Commande Directe'),
|
||||||
style: ElevatedButton.styleFrom(
|
// style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: const Color(0xFF007BFF),
|
// backgroundColor: const Color(0xFF007BFF),
|
||||||
foregroundColor: Colors.white,
|
// foregroundColor: Colors.white,
|
||||||
elevation: 2,
|
// elevation: 2,
|
||||||
padding: const EdgeInsets.symmetric(
|
// padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 16,
|
// horizontal: 16,
|
||||||
vertical: 12,
|
// vertical: 12,
|
||||||
),
|
// ),
|
||||||
shape: RoundedRectangleBorder(
|
// shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(8),
|
// borderRadius: BorderRadius.circular(8),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -9,8 +9,14 @@ import 'cart_page.dart'; // Assurez-vous que le fichier cart_page.dart est dans
|
|||||||
class MenuPage extends StatefulWidget {
|
class MenuPage extends StatefulWidget {
|
||||||
final int tableId;
|
final int tableId;
|
||||||
final int personne;
|
final int personne;
|
||||||
|
final String? tablename;
|
||||||
|
|
||||||
const MenuPage({super.key, required this.tableId, required this.personne});
|
const MenuPage({
|
||||||
|
super.key,
|
||||||
|
required this.tableId,
|
||||||
|
required this.personne,
|
||||||
|
this.tablename,
|
||||||
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<MenuPage> createState() => _MenuPageState();
|
State<MenuPage> createState() => _MenuPageState();
|
||||||
@ -126,6 +132,7 @@ class _MenuPageState extends State<MenuPage> {
|
|||||||
(context) => CartPage(
|
(context) => CartPage(
|
||||||
tableId: widget.tableId,
|
tableId: widget.tableId,
|
||||||
personne: widget.personne,
|
personne: widget.personne,
|
||||||
|
tablename: widget.tablename,
|
||||||
cartItems: List.from(
|
cartItems: List.from(
|
||||||
_cart,
|
_cart,
|
||||||
), // Copie de la liste pour éviter les modifications
|
), // Copie de la liste pour éviter les modifications
|
||||||
@ -169,7 +176,7 @@ class _MenuPageState extends State<MenuPage> {
|
|||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
child: Text(
|
child: Text(
|
||||||
"Table ${widget.tableId} • ${widget.personne} personne${widget.personne > 1 ? 's' : ''}",
|
"${widget.tablename} • ${widget.personne} personne${widget.personne > 1 ? 's' : ''}",
|
||||||
style: const TextStyle(fontSize: 16),
|
style: const TextStyle(fontSize: 16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -470,6 +470,7 @@ class _TablesScreenState extends State<TablesScreen> {
|
|||||||
tableId: table.id,
|
tableId: table.id,
|
||||||
personne:
|
personne:
|
||||||
table.capacity,
|
table.capacity,
|
||||||
|
tablename: table.nom,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
35
macos/Podfile.lock
Normal file
35
macos/Podfile.lock
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
PODS:
|
||||||
|
- FlutterMacOS (1.0.0)
|
||||||
|
- path_provider_foundation (0.0.1):
|
||||||
|
- Flutter
|
||||||
|
- FlutterMacOS
|
||||||
|
- printing (1.0.0):
|
||||||
|
- FlutterMacOS
|
||||||
|
- share_plus (0.0.1):
|
||||||
|
- FlutterMacOS
|
||||||
|
|
||||||
|
DEPENDENCIES:
|
||||||
|
- FlutterMacOS (from `Flutter/ephemeral`)
|
||||||
|
- path_provider_foundation (from `Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin`)
|
||||||
|
- printing (from `Flutter/ephemeral/.symlinks/plugins/printing/macos`)
|
||||||
|
- share_plus (from `Flutter/ephemeral/.symlinks/plugins/share_plus/macos`)
|
||||||
|
|
||||||
|
EXTERNAL SOURCES:
|
||||||
|
FlutterMacOS:
|
||||||
|
:path: Flutter/ephemeral
|
||||||
|
path_provider_foundation:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/path_provider_foundation/darwin
|
||||||
|
printing:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/printing/macos
|
||||||
|
share_plus:
|
||||||
|
:path: Flutter/ephemeral/.symlinks/plugins/share_plus/macos
|
||||||
|
|
||||||
|
SPEC CHECKSUMS:
|
||||||
|
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
|
||||||
|
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
|
||||||
|
printing: c4cf83c78fd684f9bc318e6aadc18972aa48f617
|
||||||
|
share_plus: 3c787998077d6b31e839225a282e9e27edf99274
|
||||||
|
|
||||||
|
PODFILE CHECKSUM: 7eb978b976557c8c1cd717d8185ec483fd090a82
|
||||||
|
|
||||||
|
COCOAPODS: 1.16.2
|
||||||
@ -27,6 +27,8 @@
|
|||||||
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; };
|
||||||
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; };
|
||||||
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; };
|
||||||
|
DE662059A3043873D5913CE6 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E5CC0BE35805CF999512F9F /* Pods_Runner.framework */; };
|
||||||
|
E133F2EBD00FFD072B98FDDB /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A24478FD7BC43A261DE1A80C /* Pods_RunnerTests.framework */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
@ -60,11 +62,13 @@
|
|||||||
/* End PBXCopyFilesBuildPhase section */
|
/* End PBXCopyFilesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
14210005D136C1BAFBE864EC /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
18B2FC21174471F9C0659F43 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
331C80D5294CF71000263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
|
||||||
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||||
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||||
33CC10ED2044A3C60003C045 /* itrimobe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "itrimobe.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
33CC10ED2044A3C60003C045 /* itrimobe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = itrimobe.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||||
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||||
@ -76,8 +80,14 @@
|
|||||||
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = "<group>"; };
|
||||||
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = "<group>"; };
|
||||||
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = "<group>"; };
|
||||||
|
563FC2B968AB0F12C9DFF280 /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
68DB5BB89EB253D2BA9F24BE /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
|
6DD58FF68D2F20F4B6E1A319 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
|
||||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = "<group>"; };
|
||||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = "<group>"; };
|
||||||
|
9E5CC0BE35805CF999512F9F /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
A24478FD7BC43A261DE1A80C /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
|
C3C31231CF22309AF942A4DA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@ -85,6 +95,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
E133F2EBD00FFD072B98FDDB /* Pods_RunnerTests.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@ -92,6 +103,7 @@
|
|||||||
isa = PBXFrameworksBuildPhase;
|
isa = PBXFrameworksBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
DE662059A3043873D5913CE6 /* Pods_Runner.framework in Frameworks */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
@ -125,6 +137,7 @@
|
|||||||
331C80D6294CF71000263BE5 /* RunnerTests */,
|
331C80D6294CF71000263BE5 /* RunnerTests */,
|
||||||
33CC10EE2044A3C60003C045 /* Products */,
|
33CC10EE2044A3C60003C045 /* Products */,
|
||||||
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
D73912EC22F37F3D000D13A0 /* Frameworks */,
|
||||||
|
3FC6292619E15A3F1F8BC3FA /* Pods */,
|
||||||
);
|
);
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
@ -172,9 +185,25 @@
|
|||||||
path = Runner;
|
path = Runner;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
3FC6292619E15A3F1F8BC3FA /* Pods */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
6DD58FF68D2F20F4B6E1A319 /* Pods-Runner.debug.xcconfig */,
|
||||||
|
18B2FC21174471F9C0659F43 /* Pods-Runner.release.xcconfig */,
|
||||||
|
C3C31231CF22309AF942A4DA /* Pods-Runner.profile.xcconfig */,
|
||||||
|
14210005D136C1BAFBE864EC /* Pods-RunnerTests.debug.xcconfig */,
|
||||||
|
563FC2B968AB0F12C9DFF280 /* Pods-RunnerTests.release.xcconfig */,
|
||||||
|
68DB5BB89EB253D2BA9F24BE /* Pods-RunnerTests.profile.xcconfig */,
|
||||||
|
);
|
||||||
|
name = Pods;
|
||||||
|
path = Pods;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
|
D73912EC22F37F3D000D13A0 /* Frameworks */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
9E5CC0BE35805CF999512F9F /* Pods_Runner.framework */,
|
||||||
|
A24478FD7BC43A261DE1A80C /* Pods_RunnerTests.framework */,
|
||||||
);
|
);
|
||||||
name = Frameworks;
|
name = Frameworks;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -186,6 +215,7 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
buildConfigurationList = 331C80DE294CF71000263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
|
B4AE9C55067DCB5B2D32CDF9 /* [CP] Check Pods Manifest.lock */,
|
||||||
331C80D1294CF70F00263BE5 /* Sources */,
|
331C80D1294CF70F00263BE5 /* Sources */,
|
||||||
331C80D2294CF70F00263BE5 /* Frameworks */,
|
331C80D2294CF70F00263BE5 /* Frameworks */,
|
||||||
331C80D3294CF70F00263BE5 /* Resources */,
|
331C80D3294CF70F00263BE5 /* Resources */,
|
||||||
@ -204,11 +234,13 @@
|
|||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
|
buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
|
D48CC48A091064CAD0F566B8 /* [CP] Check Pods Manifest.lock */,
|
||||||
33CC10E92044A3C60003C045 /* Sources */,
|
33CC10E92044A3C60003C045 /* Sources */,
|
||||||
33CC10EA2044A3C60003C045 /* Frameworks */,
|
33CC10EA2044A3C60003C045 /* Frameworks */,
|
||||||
33CC10EB2044A3C60003C045 /* Resources */,
|
33CC10EB2044A3C60003C045 /* Resources */,
|
||||||
33CC110E2044A8840003C045 /* Bundle Framework */,
|
33CC110E2044A8840003C045 /* Bundle Framework */,
|
||||||
3399D490228B24CF009A79C7 /* ShellScript */,
|
3399D490228B24CF009A79C7 /* ShellScript */,
|
||||||
|
842D90427A1F831501B6294C /* [CP] Embed Pods Frameworks */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@ -329,6 +361,67 @@
|
|||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire";
|
||||||
};
|
};
|
||||||
|
842D90427A1F831501B6294C /* [CP] Embed Pods Frameworks */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
name = "[CP] Embed Pods Frameworks";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
B4AE9C55067DCB5B2D32CDF9 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
|
D48CC48A091064CAD0F566B8 /* [CP] Check Pods Manifest.lock */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
);
|
||||||
|
inputPaths = (
|
||||||
|
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||||
|
"${PODS_ROOT}/Manifest.lock",
|
||||||
|
);
|
||||||
|
name = "[CP] Check Pods Manifest.lock";
|
||||||
|
outputFileListPaths = (
|
||||||
|
);
|
||||||
|
outputPaths = (
|
||||||
|
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
/* Begin PBXSourcesBuildPhase section */
|
||||||
@ -380,6 +473,7 @@
|
|||||||
/* Begin XCBuildConfiguration section */
|
/* Begin XCBuildConfiguration section */
|
||||||
331C80DB294CF71000263BE5 /* Debug */ = {
|
331C80DB294CF71000263BE5 /* Debug */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 14210005D136C1BAFBE864EC /* Pods-RunnerTests.debug.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
@ -394,6 +488,7 @@
|
|||||||
};
|
};
|
||||||
331C80DC294CF71000263BE5 /* Release */ = {
|
331C80DC294CF71000263BE5 /* Release */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 563FC2B968AB0F12C9DFF280 /* Pods-RunnerTests.release.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
@ -408,6 +503,7 @@
|
|||||||
};
|
};
|
||||||
331C80DD294CF71000263BE5 /* Profile */ = {
|
331C80DD294CF71000263BE5 /* Profile */ = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
|
baseConfigurationReference = 68DB5BB89EB253D2BA9F24BE /* Pods-RunnerTests.profile.xcconfig */;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
|
|||||||
@ -4,4 +4,7 @@
|
|||||||
<FileRef
|
<FileRef
|
||||||
location = "group:Runner.xcodeproj">
|
location = "group:Runner.xcodeproj">
|
||||||
</FileRef>
|
</FileRef>
|
||||||
|
<FileRef
|
||||||
|
location = "group:Pods/Pods.xcodeproj">
|
||||||
|
</FileRef>
|
||||||
</Workspace>
|
</Workspace>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user