From b752b42a34905c405cdd84fd0d4f65a9f35acc3f Mon Sep 17 00:00:00 2001 From: haroon amjad Date: Sun, 7 Nov 2021 17:38:49 +0300 Subject: [PATCH] Updates & fixes --- .../service/medical/my_balance_service.dart | 2 +- lib/core/viewModels/er/rrt-view-model.dart | 2 +- .../BookAppointment/DentalComplaints.dart | 50 +++++++------------ .../components/SearchByClinic.dart | 4 +- .../AmbulanceRequestIndex.dart | 13 +++-- lib/pages/ErService/OrderLogPage.dart | 15 +++--- lib/pages/ToDoList/payment_method_select.dart | 6 ++- .../medical/balance/advance_payment_page.dart | 8 ++- lib/widgets/hospital_location.dart | 1 + 9 files changed, 47 insertions(+), 54 deletions(-) diff --git a/lib/core/service/medical/my_balance_service.dart b/lib/core/service/medical/my_balance_service.dart index fd6b5180..283eac4b 100644 --- a/lib/core/service/medical/my_balance_service.dart +++ b/lib/core/service/medical/my_balance_service.dart @@ -28,7 +28,7 @@ class MyBalanceService extends BaseService { locator(); MyBalanceService() { - getFamilyFiles(); + // getFamilyFiles(); } getPatientAdvanceBalanceAmount() async { diff --git a/lib/core/viewModels/er/rrt-view-model.dart b/lib/core/viewModels/er/rrt-view-model.dart index 093c29b6..3a5846da 100644 --- a/lib/core/viewModels/er/rrt-view-model.dart +++ b/lib/core/viewModels/er/rrt-view-model.dart @@ -159,7 +159,7 @@ class RRTViewModel extends BaseViewModel { } Future cancelOrderRC(GetCMCAllOrdersResponseModel order, {String reason = ""}) async { - Map body = {"Id": order.iD, "ClickButton": 16}; + Map body = {"Id": order.iD, "ClickButton": 14}; var success = false; await _service.baseAppClient.post(UPDATE_RRT_ORDER_RC, isRCService: true, body: body, onSuccess: (response, statusCode) { success = true; diff --git a/lib/pages/BookAppointment/DentalComplaints.dart b/lib/pages/BookAppointment/DentalComplaints.dart index 342bff21..4fb1b581 100644 --- a/lib/pages/BookAppointment/DentalComplaints.dart +++ b/lib/pages/BookAppointment/DentalComplaints.dart @@ -50,7 +50,7 @@ class _DentalComplaintsState extends State { Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, - appBarTitle: "Symptoms", + appBarTitle: TranslationBase.of(context).chiefComplaints, showNewAppBar: true, showNewAppBarTitle: true, isShowDecPage: false, @@ -77,13 +77,15 @@ class _DentalComplaintsState extends State { : Container( child: SingleChildScrollView( child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( - margin: EdgeInsets.only(top: 10.0), - child: Text(TranslationBase.of(context).dentalProcedureList, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, fontWeight: FontWeight.bold, letterSpacing: 0.5)), + margin: EdgeInsets.only(top: 12.0, left: 12.0, right: 12.0), + child: Text(TranslationBase.of(context).dentalProcedureList, style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold, letterSpacing: -0.46)), ), Container( - margin: EdgeInsets.only(top: 20.0), + decoration: cardRadius(10), + margin: EdgeInsets.all(12.0), child: Table( children: getProceduresData(), ), @@ -148,17 +150,14 @@ class _DentalComplaintsState extends State { children: [ Container( child: Container( - child: Center( - child: Text(TranslationBase.of(context).procedureName, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)), - ), + margin: EdgeInsets.all(12.0), + child: Text(TranslationBase.of(context).procedureName, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)), ), ), Container( child: Container( - margin: EdgeInsets.only(bottom: 10.0), - child: Center( - child: Text(TranslationBase.of(context).timeNeeded, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)), - ), + margin: EdgeInsets.all(12.0), + child: Text(TranslationBase.of(context).timeNeeded, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)), ), ), ], @@ -167,18 +166,12 @@ class _DentalComplaintsState extends State { dentalProceduresModel.listIsPatientHasOnGoingEstimation.forEach((procedure) { tableRow.add(TableRow(children: [ Container( - child: Container( - child: Center( - child: Text(procedure.procedureName, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 14.0)), - ), - ), + margin: EdgeInsets.all(12.0), + child: Text(procedure.procedureName, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46)), ), Container( - child: Container( - child: Center( - child: Text(procedure.neededTime.toString() + " mins", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontSize: 14.0)), - ), - ), + margin: EdgeInsets.all(12.0), + child: Text(procedure.neededTime.toString() + " " + TranslationBase.of(context).minute, style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: -0.46)), ), ])); }); @@ -186,19 +179,12 @@ class _DentalComplaintsState extends State { TableRow( children: [ Container( - child: Container( - child: Center( - child: Text(TranslationBase.of(context).totalTimeNeeded, textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)), - ), - ), + margin: EdgeInsets.all(12.0), + child: Text(TranslationBase.of(context).totalTimeNeeded, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)), ), Container( - child: Container( - margin: EdgeInsets.only(bottom: 10.0), - child: Center( - child: Text(totalAppointmentTime.toString() + " mins", textAlign: TextAlign.center, style: TextStyle(color: Colors.black, fontWeight: FontWeight.bold, fontSize: 14.0)), - ), - ), + margin: EdgeInsets.all(12.0), + child: Text(totalAppointmentTime.toString() + " " + TranslationBase.of(context).minute, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: -0.46)), ), ], ), diff --git a/lib/pages/BookAppointment/components/SearchByClinic.dart b/lib/pages/BookAppointment/components/SearchByClinic.dart index 9c28310e..c2f667c2 100644 --- a/lib/pages/BookAppointment/components/SearchByClinic.dart +++ b/lib/pages/BookAppointment/components/SearchByClinic.dart @@ -320,7 +320,7 @@ class _SearchByClinicState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - "Select Project", + TranslationBase.of(context).selectHospital, style: TextStyle( fontSize: 11, letterSpacing: -0.44, @@ -332,7 +332,7 @@ class _SearchByClinicState extends State { child: DropdownButtonHideUnderline( child: DropdownButton( key: projectDropdownKey, - hint: new Text("Select Project"), + hint: new Text(TranslationBase.of(context).selectHospital), value: projectDropdownValue, iconSize: 0, isExpanded: true, diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart index 806c0738..f9b2b190 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart @@ -67,8 +67,7 @@ class _AmbulanceRequestIndexPageState extends State { if(widget.amRequestViewModel.pendingAmbulanceRequestOrder != null) { int status = order.statusId; - String _statusDisp = order.statusText; - Color _color; + _statusDisp = order.statusText; if (status == 1) { //pending _color = Color(0xffCC9B14); @@ -184,7 +183,7 @@ class _AmbulanceRequestIndexPageState extends State { if (order.statusId == 1 || order.statusId == 2) InkWell( onTap: () { - showConfirmMessage(widget.amRequestViewModel, order.iD); + showConfirmMessage(widget.amRequestViewModel, order.iD, context); }, child: Container( padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), @@ -374,21 +373,21 @@ class _AmbulanceRequestIndexPageState extends State { ); } - void showConfirmMessage(AmRequestViewModel model, int presOrderID) { + void showConfirmMessage(AmRequestViewModel model, int presOrderID, BuildContext context) { showDialog( context: context, child: ConfirmWithMessageDialog( message: TranslationBase.of(context).cancelOrderMsg, onTap: () { Future.delayed(new Duration(milliseconds: 300)).then((value) async { - GifLoaderDialogUtils.showMyDialog(context); + // GifLoaderDialogUtils.showMyDialog(context); await model.updatePressOrder(presOrderID: presOrderID); if (model.state == ViewState.ErrorLocal) { Utils.showErrorToast(model.error); - GifLoaderDialogUtils.hideDialog(context); + // GifLoaderDialogUtils.hideDialog(context); } else { AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); - GifLoaderDialogUtils.hideDialog(context); + // GifLoaderDialogUtils.hideDialog(context); } }); }, diff --git a/lib/pages/ErService/OrderLogPage.dart b/lib/pages/ErService/OrderLogPage.dart index 644f3164..fb8de6d9 100644 --- a/lib/pages/ErService/OrderLogPage.dart +++ b/lib/pages/ErService/OrderLogPage.dart @@ -23,21 +23,21 @@ class OrderLogPage extends StatelessWidget { Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); - void showConfirmMessage(AmRequestViewModel model, int presOrderID) { + void showConfirmMessage(AmRequestViewModel model, int presOrderID, BuildContext context) { showDialog( context: context, child: ConfirmWithMessageDialog( message: TranslationBase.of(context).cancelOrderMsg, onTap: () { Future.delayed(new Duration(milliseconds: 300)).then((value) async { - GifLoaderDialogUtils.showMyDialog(context); + // GifLoaderDialogUtils.showMyDialog(context); await model.updatePressOrder(presOrderID: presOrderID); if (model.state == ViewState.ErrorLocal) { Utils.showErrorToast(model.error); - GifLoaderDialogUtils.hideDialog(context); + // GifLoaderDialogUtils.hideDialog(context); } else { AppToast.showSuccessToast(message: TranslationBase.of(context).processDoneSuccessfully); - GifLoaderDialogUtils.hideDialog(context); + // GifLoaderDialogUtils.hideDialog(context); } }); }, @@ -73,6 +73,7 @@ class OrderLogPage extends StatelessWidget { } return Container( + margin: EdgeInsets.only(bottom: 12.0), decoration: BoxDecoration( color: _color, borderRadius: BorderRadius.all( @@ -88,7 +89,7 @@ class OrderLogPage extends StatelessWidget { ), child: Container( margin: EdgeInsets.only(left: projectViewModel.isArabic ? 0 : 6, right: projectViewModel.isArabic ? 6 : 0), - padding: EdgeInsets.symmetric(vertical: 14, horizontal: 12), + padding: EdgeInsets.symmetric(vertical: 13, horizontal: 12), decoration: BoxDecoration( color: Colors.white, border: Border.all(color: Colors.white, width: 1), @@ -150,7 +151,7 @@ class OrderLogPage extends StatelessWidget { ], ), SizedBox( - height: 20.0, + height: 13.0, ), ], ), @@ -163,7 +164,7 @@ class OrderLogPage extends StatelessWidget { if (order.statusId == 1 || order.statusId == 2) InkWell( onTap: () { - showConfirmMessage(amRequestViewModel, order.iD); + showConfirmMessage(amRequestViewModel, order.iD, context); }, child: Container( padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), diff --git a/lib/pages/ToDoList/payment_method_select.dart b/lib/pages/ToDoList/payment_method_select.dart index 21b08fc3..ea583477 100644 --- a/lib/pages/ToDoList/payment_method_select.dart +++ b/lib/pages/ToDoList/payment_method_select.dart @@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/utils_new.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_svg/flutter_svg.dart'; class PaymentMethod extends StatefulWidget { Function onSelectedMethod; @@ -214,8 +215,9 @@ class _PaymentMethodState extends State { Container( height: 60.0, padding: EdgeInsets.all(7.0), - width: 60, - child: Image.asset("assets/images/new/payment/installments.png"), + width: 90, + // child: Image.asset("assets/images/new/payment/installments.png"), + child: SvgPicture.asset("assets/images/new/payment/instalmt.svg"), ), mFlex(1), if (selectedPaymentMethod == "Installment") diff --git a/lib/pages/medical/balance/advance_payment_page.dart b/lib/pages/medical/balance/advance_payment_page.dart index a7f308af..051b9b95 100644 --- a/lib/pages/medical/balance/advance_payment_page.dart +++ b/lib/pages/medical/balance/advance_payment_page.dart @@ -61,7 +61,10 @@ class _AdvancePaymentPageState extends State { @override Widget build(BuildContext context) { return BaseView( - onModelReady: (model) => model.getHospitals(), + onModelReady: (model) { + model.getHospitals(); + model.getFamilyFiles(); + }, builder: (_, model, w) => AppScaffold( isShowAppBar: true, imagesInfo: imagesInfo, @@ -396,7 +399,8 @@ class _AdvancePaymentPageState extends State { void confirmSelectFamilyDialog(List getAllSharedRecordsByStatusList) { if (getAllSharedRecordsByStatusList.isNotEmpty) { List list = [ - for (int i = 0; i < getAllSharedRecordsByStatusList.length; i++) RadioSelectionDialogModel(getAllSharedRecordsByStatusList[i].patientName, i), + for (int i = 0; i < getAllSharedRecordsByStatusList.length; i++) + if (getAllSharedRecordsByStatusList[i].status == 3) RadioSelectionDialogModel(getAllSharedRecordsByStatusList[i].patientName, i), ]; showDialog( context: context, diff --git a/lib/widgets/hospital_location.dart b/lib/widgets/hospital_location.dart index 401d62ef..8ba7b4bd 100644 --- a/lib/widgets/hospital_location.dart +++ b/lib/widgets/hospital_location.dart @@ -90,6 +90,7 @@ class HospitalLocation extends StatelessWidget { Widget contactButton(IconData _iconData, String title, VoidCallback callback) { return SizedBox( height: 32, + width: 100.0, child: FlatButton.icon( color: Color(0xffF5F5F5), shape: StadiumBorder(side: BorderSide(color: Color(0xffF0F0F0), width: 1)),