feat: start working on sell
This commit is contained in:
parent
f378c8c0be
commit
1803a2b119
8 changed files with 94 additions and 31 deletions
|
|
@ -129,32 +129,37 @@ class _ConfirmationPopupState extends State<ConfirmationPopup> {
|
|||
case Ok():
|
||||
if (context.mounted) {
|
||||
Navigator.of(context).pop();
|
||||
}
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(
|
||||
"ID : ${widget.viewModel.currentOwner!.firstName[0]}${widget.viewModel.currentOwner!.lastName[0]}${(price == 0) ? "PL" : price.toString()}",
|
||||
),
|
||||
content: Text(
|
||||
"Identifiant propriétaire de ce livre. Pensez à l'écrire pour retrouver lae propriétaire du livre lors de la vente ou du retour !",
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
widget.exitPopup(context);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text("Enregistré: ${widget.book.title}"),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Text("Ok"),
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
title: Text(
|
||||
"ID : ${widget.viewModel.currentOwner!.firstName[0].toUpperCase()}${widget.viewModel.currentOwner!.lastName[0].toUpperCase()}${(price == 0) ? "PL" : price.toString()}",
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
content: Text(
|
||||
(widget.viewModel.currentOwner!.id ==
|
||||
widget.viewModel.sectionOwner!.id)
|
||||
? "Ce livre appartient à la section. Vous pouvez mettre le code, ou poser une gomette, ..."
|
||||
: "Identifiant propriétaire de ce livre. Pensez à l'écrire pour retrouver lae propriétaire du livre lors de la vente ou du retour !",
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
widget.exitPopup(context);
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
"Enregistré: ${widget.book.title}",
|
||||
),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
);
|
||||
},
|
||||
child: Text("Ok"),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
break;
|
||||
case Error():
|
||||
if (context.mounted) {
|
||||
|
|
|
|||
Reference in a new issue