Skip to content
Snippets Groups Projects
Commit 607bb6fd authored by REGNAULT EVANN's avatar REGNAULT EVANN :fireworks:
Browse files

Validation indicator

parent 8a39cc48
Branches
No related merge requests found
......@@ -79,6 +79,7 @@ class _OperationPageState extends State<OperationPage> {
List<Widget> _buildOperationList() {
List<Operation> operations = medicalActs.map((e) =>
Operation(
isValidated: e.confirmationMutuelle ?? false,
title: 'Operation ${e.id}',
hospitalSpent: e.priseEnChargeHopital ?? 0,
mutuelleSpent: e.priseEnChargeMutuelle ?? 0,
......@@ -91,6 +92,12 @@ class _OperationPageState extends State<OperationPage> {
for (var operation in operations) {
operationWidgets.add(
GestureDetector(
onTap: () {
// todo : validate act
print('validate debug');
},
child:
Container(
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 16),
padding: EdgeInsets.all(16),
......@@ -109,13 +116,22 @@ class _OperationPageState extends State<OperationPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
operation.title,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
operation.title,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18,
),
),
(operation.isValidated) ? Icon( Icons.check, color: Colors.green,size: 20,) : Icon(Icons.close, color: Colors.red, size: 20,),
],
),
SizedBox(height: 8),
Text(
'Prise en charge Mutuelle: ${operation.mutuelleSpent.toStringAsFixed(2)}€',
......@@ -133,26 +149,8 @@ class _OperationPageState extends State<OperationPage> {
),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'Prise en charge :',
style: TextStyle(
fontSize: 15,
),
),
Text(
'+ ${operation.moneyReceived.toStringAsFixed(2)} \$',
style: TextStyle(
color: Colors.blueAccent,
fontSize: 25,
),
),
],
),
),
);
));
}
return operationWidgets;
......@@ -160,6 +158,7 @@ class _OperationPageState extends State<OperationPage> {
}
class Operation {
final bool isValidated;
final String title;
final double hospitalSpent;
final double mutuelleSpent;
......@@ -167,6 +166,7 @@ class Operation {
final String date;
Operation({
required this.isValidated,
required this.title,
required this.hospitalSpent,
required this.mutuelleSpent,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment