From 6300d3f0fc0176e351864ef15c5639305d5f2cd8 Mon Sep 17 00:00:00 2001 From: hussam al-habibeh Date: Mon, 5 Apr 2021 14:22:49 +0300 Subject: [PATCH] insurance approvals design fix --- .../patients/insurance_approvals_details.dart | 161 +++++++++++------- lib/widgets/shared/doctor_card_insurance.dart | 27 +-- 2 files changed, 115 insertions(+), 73 deletions(-) diff --git a/lib/screens/patients/insurance_approvals_details.dart b/lib/screens/patients/insurance_approvals_details.dart index ba93b780..98daef73 100644 --- a/lib/screens/patients/insurance_approvals_details.dart +++ b/lib/screens/patients/insurance_approvals_details.dart @@ -216,28 +216,26 @@ class _InsuranceApprovalsDetailsState extends State { Row( children: [ Texts( - 'Receipt on :', + 'Receipt on: ', color: Colors.grey[500], ), Texts( '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].rceiptOn), isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, - fontSize: 14, ), ], ), Row( children: [ Texts( - 'Exp on:', + 'Exp on: ', color: Colors.grey[500], ), Texts( '${DateUtils.getDayMonthYearDateFormatted(DateUtils.getDateTimeFromServerFormat(model.insuranceApproval[indexInsurance].expiryDate), isArabic: projectViewModel.isArabic)}', color: Colors.black, fontWeight: FontWeight.w600, - fontSize: 14, ), ], ), @@ -253,66 +251,109 @@ class _InsuranceApprovalsDetailsState extends State { Container( child: Column( children: [ - Row( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - children: [ - Texts('Procedure'), - Texts('Status'), - Texts('Usage Status') - ], + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8.0), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceAround, + children: [ + Container( + width: MediaQuery.of(context) + .size + .width * + 0.33, + child: Texts( + 'Procedure', + fontWeight: FontWeight.w700, + ), + ), + Container( + width: MediaQuery.of(context) + .size + .width * + 0.33, + child: Texts( + 'Status', + fontWeight: FontWeight.w700, + ), + ), + Container( + width: MediaQuery.of(context) + .size + .width * + 0.21, + child: Texts( + 'Usage Status', + fontWeight: FontWeight.w700, + ), + ) + ], + ), + ), + Divider( + color: Colors.black, + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8.0), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceAround, + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Container( + height: MediaQuery.of(context) + .size + .height * + 0.15, //130.0, + width: MediaQuery.of(context) + .size + .width * + 0.33, + child: Texts(model + .insuranceApproval[ + indexInsurance] + .approvalDetails + .procedureName), + ), + Container( + height: MediaQuery.of(context) + .size + .height * + 0.15, + width: MediaQuery.of(context) + .size + .width * + 0.33, + child: Texts(model + .insuranceApproval[ + indexInsurance] + .approvalDetails + .status), + ), + Container( + height: MediaQuery.of(context) + .size + .height * + 0.15, + width: MediaQuery.of(context) + .size + .width * + 0.21, + child: Texts(model + .insuranceApproval[ + indexInsurance] + .approvalDetails + .isInvoicedDesc), + ), + ], + ), ), Divider( color: Colors.black45, ), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceAround, - children: [ - Container( - height: MediaQuery.of(context) - .size - .height * - 0.2, //130.0, - width: MediaQuery.of(context) - .size - .width * - 0.33, - child: Texts(model - .insuranceApproval[indexInsurance] - .approvalDetails - .procedureName), - ), - Container( - height: MediaQuery.of(context) - .size - .height * - 0.2, - width: MediaQuery.of(context) - .size - .width * - 0.33, - child: Texts(model - .insuranceApproval[indexInsurance] - .approvalDetails - .status), - ), - Container( - height: MediaQuery.of(context) - .size - .height * - 0.2, - width: MediaQuery.of(context) - .size - .width * - 0.25, - child: Texts(model - .insuranceApproval[indexInsurance] - .approvalDetails - .isInvoicedDesc), - ), - ], - ) ], ), ), diff --git a/lib/widgets/shared/doctor_card_insurance.dart b/lib/widgets/shared/doctor_card_insurance.dart index 4c2bc6d1..e87f4663 100644 --- a/lib/widgets/shared/doctor_card_insurance.dart +++ b/lib/widgets/shared/doctor_card_insurance.dart @@ -43,17 +43,18 @@ class DoctorCardInsurance extends StatelessWidget { return Container( margin: EdgeInsets.all(10), decoration: BoxDecoration( - border: Border( - left: BorderSide( - color: approvalStatus == "Approved" - ? Color(0xff359846) - : Color(0xffD02127), - width: 3.5), - top: BorderSide(color: Colors.white, width: 0.5), - bottom: BorderSide(color: Colors.white, width: 0.5), - right: BorderSide(color: Colors.white, width: 0.5), - ), - color: Colors.white), + border: Border( + left: BorderSide( + color: approvalStatus == "Approved" + ? Color(0xff359846) + : Color(0xffD02127), + width: 3.5), + top: BorderSide(color: Colors.white, width: 0.5), + bottom: BorderSide(color: Colors.white, width: 0.5), + right: BorderSide(color: Colors.white, width: 0.5), + ), + color: Colors.white, + ), child: Padding( padding: const EdgeInsets.all(15.0), child: InkWell( @@ -79,9 +80,9 @@ class DoctorCardInsurance extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(5.0), child: Texts( - '$patientOut', + '$patientOut'.replaceAll(" ", ""), color: Colors.white, - fontSize: 15.0, + fontSize: 13.0, ), ), )