From f543126152217317eb318fad4e2ca03487940b47 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Thu, 1 Oct 2020 09:26:26 +0300 Subject: [PATCH 1/6] Ambulance Service --- assets/images/covid-car.png | Bin 0 -> 3140 bytes assets/images/covid_bg_transparent.png | Bin 0 -> 11952 bytes assets/images/home_health_care_icon.png | Bin 0 -> 4679 bytes lib/config/config.dart | 4 +- lib/core/model/er/PatientAllPresOrders.dart | 132 ++++++++++++++++++ lib/core/service/er/am_service.dart | 26 +++- .../viewModels/er/am_request_view_model.dart | 45 ++++-- lib/pages/ErService/AmbulanceReq.dart | 15 +- .../ErService/AmbulanceRequestIndex.dart | 59 ++++++++ lib/pages/ErService/BillAmount.dart | 37 +++++ lib/pages/ErService/PickupLocation.dart | 36 +++++ .../ErService/SelectTransportationMethod.dart | 39 ++++++ lib/pages/ErService/Summary.dart | 37 +++++ .../ErService/widgets/StepesWideget.dart | 114 +++++++++++++++ lib/pages/landing/home_page.dart | 77 ++++++++-- 15 files changed, 577 insertions(+), 44 deletions(-) create mode 100644 assets/images/covid-car.png create mode 100644 assets/images/covid_bg_transparent.png create mode 100644 assets/images/home_health_care_icon.png create mode 100644 lib/core/model/er/PatientAllPresOrders.dart create mode 100644 lib/pages/ErService/AmbulanceRequestIndex.dart create mode 100644 lib/pages/ErService/BillAmount.dart create mode 100644 lib/pages/ErService/PickupLocation.dart create mode 100644 lib/pages/ErService/SelectTransportationMethod.dart create mode 100644 lib/pages/ErService/Summary.dart create mode 100644 lib/pages/ErService/widgets/StepesWideget.dart diff --git a/assets/images/covid-car.png b/assets/images/covid-car.png new file mode 100644 index 0000000000000000000000000000000000000000..01090b744bda40c3e6ae3d0b4d9c1f631099bdc3 GIT binary patch literal 3140 zcmV-K47>A*P){hY5kj{0_78lgk?J%;l2XGxVc`cEO39xvr-em^ixVV<7mK#weTJ?rY*o1} zA<59S1-xOqDUfYxzX%^MvJ`B__}uz%tIBMZ#J}%4>xteHFk}|3Uj}k%#w445w_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M&5tjo+7woOhmKWww^``ziPlp!VQOssNnn{!Ez{q~;m>ob7T>0IE@SIP38HzMvL zQFJ4cbT9oTWP8a(U+B*3UI%SN(k_dO^IpLT-G~><-eb8;e&2LFZ{AvtGOkPSXl;%& zH6DC2Y8>VG=|-uA1mwf3$2VO?;!IxXiZxX&uG$`oHBryX$~ttQvUFmjqlog(aEO6{ z!ELI}J9mWyBMHT$&_#jn>D86^(&H?4A4fGfhKv19rxWJh$E&5Gzq}uY&pI zX2cZu@lOWNOqZCj0wM5Vc5hqSQHQ8jXwB*uIfZm9Qs0YR4(ARuWFs$J*mPs2yfPx~ z_}(Yg5<(XcumZ7eR&%J*)%q7HL&MX8vF?`OV{`~44Nqk9`G_dDBSW} zotY&S9rZHwxVRCMUnNNs4L+i>BIR~!he?y`jH2)Uc%4PiP=h+nxqJn}{%A(5QkLh^m$Ng~y@tL)a zjj>tYu0E zmfzA*@k*8C5#KEe#nNM9mWXa6Y)_l>fqlp0S_J}u>QKnS3aCPQtntl0=c~ptt#xz? zI json) { + iD = json['ID']; + patientID = json['PatientID']; + patientOutSA = json['PatientOutSA']; + isOutPatient = json['IsOutPatient']; + projectID = json['ProjectID']; + nearestProjectID = json['NearestProjectID']; + longitude = json['Longitude']; + latitude = json['Latitude']; + appointmentNo = json['AppointmentNo']; + dischargeID = json['DischargeID']; + lineItemNo = json['LineItemNo']; + status = json['Status']; + description = json['Description']; + descriptionN = json['DescriptionN']; + createdOn = json['CreatedOn']; + serviceID = json['ServiceID']; + createdBy = json['CreatedBy']; + editedOn = json['EditedOn']; + editedBy = json['EditedBy']; + channel = json['Channel']; + clientRequestID = json['ClientRequestID']; + returnedToQueue = json['ReturnedToQueue']; + pickupDateTime = json['PickupDateTime']; + pickupLocationName = json['PickupLocationName']; + dropoffLocationName = json['DropoffLocationName']; + realRRTHaveTransactions = json['RealRRT_HaveTransactions']; + nearestProjectDescription = json['NearestProjectDescription']; + nearestProjectDescriptionN = json['NearestProjectDescriptionN']; + projectDescription = json['ProjectDescription']; + projectDescriptionN = json['ProjectDescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['ID'] = this.iD; + data['PatientID'] = this.patientID; + data['PatientOutSA'] = this.patientOutSA; + data['IsOutPatient'] = this.isOutPatient; + data['ProjectID'] = this.projectID; + data['NearestProjectID'] = this.nearestProjectID; + data['Longitude'] = this.longitude; + data['Latitude'] = this.latitude; + data['AppointmentNo'] = this.appointmentNo; + data['DischargeID'] = this.dischargeID; + data['LineItemNo'] = this.lineItemNo; + data['Status'] = this.status; + data['Description'] = this.description; + data['DescriptionN'] = this.descriptionN; + data['CreatedOn'] = this.createdOn; + data['ServiceID'] = this.serviceID; + data['CreatedBy'] = this.createdBy; + data['EditedOn'] = this.editedOn; + data['EditedBy'] = this.editedBy; + data['Channel'] = this.channel; + data['ClientRequestID'] = this.clientRequestID; + data['ReturnedToQueue'] = this.returnedToQueue; + data['PickupDateTime'] = this.pickupDateTime; + data['PickupLocationName'] = this.pickupLocationName; + data['DropoffLocationName'] = this.dropoffLocationName; + data['RealRRT_HaveTransactions'] = this.realRRTHaveTransactions; + data['NearestProjectDescription'] = this.nearestProjectDescription; + data['NearestProjectDescriptionN'] = this.nearestProjectDescriptionN; + data['ProjectDescription'] = this.projectDescription; + data['ProjectDescriptionN'] = this.projectDescriptionN; + return data; + } +} diff --git a/lib/core/service/er/am_service.dart b/lib/core/service/er/am_service.dart index 181ad37b..016cc2df 100644 --- a/lib/core/service/er/am_service.dart +++ b/lib/core/service/er/am_service.dart @@ -1,25 +1,39 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import '../base_service.dart'; class AmService extends BaseService { - List AmModelList = List(); - Map body = Map(); + List amModelList = List(); + List patientAllPresOrdersList = List(); Future getAllTransportationOrders() async { hasError = false; - await baseAppClient.post(GET_AMBULANCE_REQUEST, onSuccess: (dynamic response, int statusCode) { - AmModelList.clear(); + amModelList.clear(); response['AmModelList'].forEach((vital) { - AmModelList.add( + amModelList.add( PatientER_RRT_GetAllTransportationMethodListModel.fromJson(vital)); }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: body); + }, body: Map()); + } + + Future getPatientAllPresOrdersList() async { + hasError = false; + await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, + onSuccess: (dynamic response, int statusCode) { + patientAllPresOrdersList.clear(); + response['PatientER_GetPatientAllPresOrdersList'].forEach((vital) { + patientAllPresOrdersList.add(PatientAllPresOrders.fromJson(vital)); + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); } } diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart index db1acbf0..6e08d984 100644 --- a/lib/core/viewModels/er/am_request_view_model.dart +++ b/lib/core/viewModels/er/am_request_view_model.dart @@ -1,32 +1,49 @@ - import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import 'package:diplomaticquarterapp/core/service/er/am_service.dart'; +import 'package:diplomaticquarterapp/core/service/hospital_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import '../base_view_model.dart'; import '../../../locator.dart'; -class AmRequestViewModel extends BaseViewModel{ +class AmRequestViewModel extends BaseViewModel { + AmService _amService = locator(); + HospitalService _hospitalService = locator(); + List + get amRequestModeList => _amService.amModelList; - AmService _amService = locator(); + List get patientAllPresOrdersList =>_amService.patientAllPresOrdersList; - List get AmRequestModeList=> - _amService.AmModelList; - getAmRequestOrders({int id, int projectID}) async { + Future getAmRequestOrders() async { setState(ViewState.Busy); + await _amService.getAllTransportationOrders(); + if (_amService.hasError) { + error = _amService.error; + setState(ViewState.Error); + } else + getHospitals(); + } + Future getHospitals() async { + setState(ViewState.Busy); + await _hospitalService.getHospitals(); + if (_hospitalService.hasError) { + error = _hospitalService.error; + setState(ViewState.Error); + } else + getPatientAllPresOrdersList(); + } - await _amService.getAllTransportationOrders(); - - if ( _amService.hasError) { - error = _amService.error; + Future getPatientAllPresOrdersList()async{ + setState(ViewState.Busy); + await _amService.getPatientAllPresOrdersList(); + if (_hospitalService.hasError) { + error = _hospitalService.error; setState(ViewState.Error); } else setState(ViewState.Idle); } - - - -} \ No newline at end of file +} diff --git a/lib/pages/ErService/AmbulanceReq.dart b/lib/pages/ErService/AmbulanceReq.dart index 9c4dfa29..8e9f54bc 100644 --- a/lib/pages/ErService/AmbulanceReq.dart +++ b/lib/pages/ErService/AmbulanceReq.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_page.dart'; @@ -9,6 +10,8 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'AmbulanceRequestIndex.dart'; + class AmbulanceReq extends StatefulWidget { @override _AmbulanceReqState createState() => _AmbulanceReqState(); @@ -30,8 +33,8 @@ class _AmbulanceReqState extends State } @override Widget build(BuildContext context) { - return BaseView( - onModelReady: (model) => model.getPrescriptions(), + return BaseView( + // onModelReady: (model) => model.getAmRequestOrders(), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, appBarTitle: "Ambulance Request", @@ -106,12 +109,8 @@ class _AmbulanceReqState extends State physics: BouncingScrollPhysics(), controller: _tabController, children: [ - PrescriptionsPage( - prescriptionsViewModel: model, - ), - PrescriptionsHistoryPage( - prescriptionsViewModel: model, - ) + AmbulanceRequestIndex(), + Container() ], ), ) diff --git a/lib/pages/ErService/AmbulanceRequestIndex.dart b/lib/pages/ErService/AmbulanceRequestIndex.dart new file mode 100644 index 00000000..863d3b57 --- /dev/null +++ b/lib/pages/ErService/AmbulanceRequestIndex.dart @@ -0,0 +1,59 @@ +import 'package:diplomaticquarterapp/pages/ErService/widgets/StepesWideget.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; + +import 'BillAmount.dart'; +import 'PickupLocation.dart'; +import 'SelectTransportationMethod.dart'; +import 'Summary.dart'; + +class AmbulanceRequestIndex extends StatefulWidget { + @override + _AmbulanceRequestIndexState createState() => _AmbulanceRequestIndexState(); +} + +class _AmbulanceRequestIndexState extends State { + + int currentIndex = 0; + PageController pageController; + + _changeCurrentTab(int tab) { + setState(() { + currentIndex = tab; + }); + pageController.animateToPage(tab, duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart); + } + + @override + void initState() { + super.initState(); + pageController = new PageController(); + + } + + @override + Widget build(BuildContext context) { + return AppScaffold( + body: Column( + children: [ + SizedBox(height: 80,), + Container( + margin: EdgeInsets.only(left: 12,right: 12), + child: StepesWidget(index: currentIndex,changeCurrentTab: _changeCurrentTab,)), + Expanded( + child: PageView( + physics: NeverScrollableScrollPhysics(), + controller: pageController, + children: [ + SelectTransportationMethod(changeCurrentTab: _changeCurrentTab,), + PickupLocation(changeCurrentTab: _changeCurrentTab,), + BillAmount(changeCurrentTab: _changeCurrentTab,), + Summary(changeCurrentTab: _changeCurrentTab,), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/pages/ErService/BillAmount.dart b/lib/pages/ErService/BillAmount.dart new file mode 100644 index 00000000..86b0d181 --- /dev/null +++ b/lib/pages/ErService/BillAmount.dart @@ -0,0 +1,37 @@ +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class BillAmount extends StatefulWidget { + final Function changeCurrentTab; + + BillAmount({Key key, this.changeCurrentTab}); + + @override + _BillAmountState createState() => _BillAmountState(); +} + +class _BillAmountState extends State { + @override + Widget build(BuildContext context) { + return Column( + children: [ + Texts('BillAmount 3'), + SizedBox(height: 45,), + Container( + padding: EdgeInsets.all(15), + width: double.maxFinite, + height: 76, + child:SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: ()=> widget.changeCurrentTab(3), + label: 'Next', + + ), + ) + ], + ); + } +} diff --git a/lib/pages/ErService/PickupLocation.dart b/lib/pages/ErService/PickupLocation.dart new file mode 100644 index 00000000..bdb1ea52 --- /dev/null +++ b/lib/pages/ErService/PickupLocation.dart @@ -0,0 +1,36 @@ +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class PickupLocation extends StatefulWidget { + final Function changeCurrentTab; + + PickupLocation({Key key, this.changeCurrentTab}); + + @override + _PickupLocationState createState() => _PickupLocationState(); +} + +class _PickupLocationState extends State { + @override + Widget build(BuildContext context) { + return Column( + children: [ + Texts('PickupLocation 2'), + SizedBox(height: 45,), + Container( + padding: EdgeInsets.all(15), + width: double.maxFinite, + height: 76, + child:SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: ()=> widget.changeCurrentTab(2), + label: 'Next', + ), + ) + ], + ); + } +} diff --git a/lib/pages/ErService/SelectTransportationMethod.dart b/lib/pages/ErService/SelectTransportationMethod.dart new file mode 100644 index 00000000..a5fcbb75 --- /dev/null +++ b/lib/pages/ErService/SelectTransportationMethod.dart @@ -0,0 +1,39 @@ +import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class SelectTransportationMethod extends StatefulWidget { + final Function changeCurrentTab; + + SelectTransportationMethod({Key key, this.changeCurrentTab}); + + @override + _SelectTransportationMethodState createState() => + _SelectTransportationMethodState(); +} + +class _SelectTransportationMethodState + extends State { + @override + Widget build(BuildContext context) { + return Column( + children: [ + Texts('SelectTransportationMethod 1'), + SizedBox(height: 45,), + Container( + padding: EdgeInsets.all(15), + width: double.maxFinite, + height: 76, + child:SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: ()=> widget.changeCurrentTab(1), + label: 'Next', + ), + ) + ], + ); + } +} diff --git a/lib/pages/ErService/Summary.dart b/lib/pages/ErService/Summary.dart new file mode 100644 index 00000000..4f792b68 --- /dev/null +++ b/lib/pages/ErService/Summary.dart @@ -0,0 +1,37 @@ +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class Summary extends StatefulWidget { + final Function changeCurrentTab; + + Summary({Key key, this.changeCurrentTab}); + + @override + _SummaryState createState() => _SummaryState(); +} + +class _SummaryState extends State

{ + @override + Widget build(BuildContext context) { + return Column( + children: [ + Texts('Summary 4'), + SizedBox(height: 45,), + Container( + padding: EdgeInsets.all(15), + width: double.maxFinite, + height: 76, + child:SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + label: 'Next', + + // onTap: ()=> widget.changeCurrentTab(2), + ), + ) + ], + ); + } +} diff --git a/lib/pages/ErService/widgets/StepesWideget.dart b/lib/pages/ErService/widgets/StepesWideget.dart new file mode 100644 index 00000000..3f6b57a4 --- /dev/null +++ b/lib/pages/ErService/widgets/StepesWideget.dart @@ -0,0 +1,114 @@ +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class StepesWidget extends StatelessWidget { + final int index; + final Function changeCurrentTab; + + StepesWidget({Key key, this.index, this.changeCurrentTab}); + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + Container( + height: 50, + width: MediaQuery.of(context).size.width, + color: Colors.transparent, + child: Center( + child: Divider( + color: Colors.black, + height: 3, + thickness: 3, + ), + ), + ), + Positioned( + top: 10, + left: 0, + child: InkWell( + onTap: () => changeCurrentTab(0), + child: Container( + width: 25, + height: 25, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: index == 0 ? Colors.grey[800] : Colors.white, + ), + child: Center( + child: Texts( + '1', + color: index == 0 ? Colors.white:Colors.grey[800] , + ), + ), + ), + ), + ), + Positioned( + top: 10, + left: MediaQuery.of(context).size.width *0.3, + child: InkWell( + onTap: () => changeCurrentTab(1), + child: Container( + width: 25, + height: 25, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: index == 1 ? Colors.grey[800] : Colors.white, + ), + child: Center( + child: Texts( + '2', + color: index == 1 ? Colors.white:Colors.grey[800], + ), + ), + ), + ), + ), + Positioned( + top: 10, + left: MediaQuery.of(context).size.width *0.6, + child: InkWell( + onTap: () => changeCurrentTab(2), + child: Container( + width: 25, + height: 25, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: index == 2 ? Colors.grey[800] : Colors.white, + ), + child: Center( + child: Texts( + '3', + color: index == 2 ? Colors.white: Colors.grey[800] , + ), + ), + ), + ), + ), + Positioned( + top: 10, + right: 0, + child: InkWell( + onTap: () => changeCurrentTab(3), + child: Container( + width: 25, + height: 25, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: index == 3 ? Colors.grey[800] : Colors.white, + ), + child: Center( + child: Texts( + '4', + color: index == 3 ? Colors.white:Colors.grey[800] , + ), + ), + ), + ), + ), + ], + ); + } +} diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 59c0a167..b811ef8f 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -64,6 +64,68 @@ class _HomePageState extends State { MediaQuery.of(context).size.width * 0.8, child: Row( children: [ + Expanded( + child: Container( + height: 110, + // padding: EdgeInsets.all(15), + margin: EdgeInsets.all(5), + decoration: BoxDecoration( + color: + Colors.white.withOpacity(0.3), + borderRadius: BorderRadius.all( + Radius.circular(5), + ), + image: DecorationImage( + image: ExactAssetImage( + 'assets/images/covid_bg_transparent.png'), + fit: BoxFit.cover), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + SizedBox(height: 8,), + Texts('COVID-19 TEST',color: Colors.white,), + SizedBox(height: 15,), + Row( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + Image.asset( + 'assets/images/covid-car.png',width: 55,height: 55,fit: BoxFit.cover, + ), + Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Texts('Drove-Thru',color: Colors.white,fontSize: 14,), + SizedBox(height: 4,), + Container( + margin: EdgeInsets.all(2), + width: 90, + height: 30, + decoration: BoxDecoration( + color: Hexcolor('#D81A2E'), + shape: BoxShape.rectangle, + border: Border.all( + color: Colors.transparent, + width: 0.5), + borderRadius: BorderRadius.all( + Radius.circular(5)), + ), + child: Center( + child: Texts('BOOK Now', + color: Colors.white, + fontSize: 12, + ), + ), + ) + ], + ) + ], + ) + ], + ) + ), + ), Expanded( child: InkWell( onTap: () => Navigator.push(context, @@ -83,19 +145,6 @@ class _HomePageState extends State { ), ), ), - Expanded( - child: Container( - height: 110, - padding: EdgeInsets.all(15), - margin: EdgeInsets.all(5), - decoration: BoxDecoration( - color: - Colors.white.withOpacity(0.3), - borderRadius: BorderRadius.all( - Radius.circular(5))), - // child: Image.asset('assets/images/livecare_white_logo.png',), - ), - ), ], ), ), @@ -359,7 +408,7 @@ class _HomePageState extends State { child: Column( children: [ Image.asset( - 'assets/images/Dr_Schedule_report.png', + 'assets/images/home_health_care_icon.png', width: 50, height: 50, ), From c7d396875e13240b960309d6f02d8f70d834de4d Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 4 Oct 2020 10:06:01 +0300 Subject: [PATCH 2/6] Ambulance Service steps --- lib/core/model/er/PatientER.dart | 200 +++++++++++++ ..._all_transportation_method_list_model.dart | 10 +- lib/core/service/er/am_service.dart | 7 +- .../viewModels/er/am_request_view_model.dart | 2 +- lib/pages/ErService/AmbulanceReq.dart | 5 +- .../ErService/AmbulanceRequestIndex.dart | 49 +++- lib/pages/ErService/BillAmount.dart | 6 +- lib/pages/ErService/PickupLocation.dart | 7 +- .../ErService/SelectTransportationMethod.dart | 272 ++++++++++++++++-- lib/pages/ErService/Summary.dart | 6 +- .../{StepesWideget.dart => StepsWidget.dart} | 55 ++-- 11 files changed, 552 insertions(+), 67 deletions(-) create mode 100644 lib/core/model/er/PatientER.dart rename lib/pages/ErService/widgets/{StepesWideget.dart => StepsWidget.dart} (55%) diff --git a/lib/core/model/er/PatientER.dart b/lib/core/model/er/PatientER.dart new file mode 100644 index 00000000..9c2d660e --- /dev/null +++ b/lib/core/model/er/PatientER.dart @@ -0,0 +1,200 @@ +class PatientER { + double versionID; + int channel; + int languageID; + String iPAdress; + String generalid; + int patientOutSA; + String sessionID; + bool isDentalAllowedBackend; + int deviceTypeID; + int patientID; + String tokenID; + int patientTypeID; + int patientType; + int orderServiceID; + String patientIdentificationID; + int direction; + bool haveAppointment; + int tripType; + int pickupUrgency; + int pickupSpot; + String pickupDateTime; + int transportationMethodId; + int selectedAmbulate; + String requesterNote; + int requesterFileNo; + String requesterMobileNo; + bool requesterIsOutSA; + int isOutPatient; + String pickupLocationName; + String dropoffLocationName; + int projectID; + int createdBy; + int lineItemNo; + int cost; + double vAT; + double totalPrice; + String pickupLocationLattitude; + String pickupLocationLongitude; + String dropoffLocationLattitude; + String dropoffLocationLongitude; + String latitude; + String longitude; + String appointmentNo; + dynamic appointmentClinicName; + dynamic appointmentDoctorName; + dynamic appointmentBranch; + dynamic appointmentTime; + + PatientER( + {this.versionID, + this.channel, + this.languageID, + this.iPAdress, + this.generalid, + this.patientOutSA, + this.sessionID, + this.isDentalAllowedBackend, + this.deviceTypeID, + this.patientID, + this.tokenID, + this.patientTypeID, + this.patientType, + this.orderServiceID = 4, + this.patientIdentificationID, + this.direction, + this.haveAppointment, + this.tripType, + this.pickupUrgency, + this.pickupSpot, + this.pickupDateTime, + this.transportationMethodId, + this.selectedAmbulate, + this.requesterNote, + this.requesterFileNo, + this.requesterMobileNo, + this.requesterIsOutSA, + this.isOutPatient, + this.pickupLocationName, + this.dropoffLocationName, + this.projectID, + this.createdBy, + this.lineItemNo, + this.cost, + this.vAT, + this.totalPrice, + this.pickupLocationLattitude, + this.pickupLocationLongitude, + this.dropoffLocationLattitude, + this.dropoffLocationLongitude, + this.latitude, + this.longitude, + this.appointmentNo, + this.appointmentClinicName, + this.appointmentDoctorName, + this.appointmentBranch, + this.appointmentTime}); + + PatientER.fromJson(Map json) { + versionID = json['VersionID']; + channel = json['Channel']; + languageID = json['LanguageID']; + iPAdress = json['IPAdress']; + generalid = json['generalid']; + patientOutSA = json['PatientOutSA']; + sessionID = json['SessionID']; + isDentalAllowedBackend = json['isDentalAllowedBackend']; + deviceTypeID = json['DeviceTypeID']; + patientID = json['PatientID']; + tokenID = json['TokenID']; + patientTypeID = json['PatientTypeID']; + patientType = json['PatientType']; + orderServiceID = json['OrderServiceID']; + patientIdentificationID = json['PatientIdentificationID']; + direction = json['Direction']; + haveAppointment = json['HaveAppointment']; + tripType = json['TripType']; + pickupUrgency = json['PickupUrgency']; + pickupSpot = json['PickupSpot']; + pickupDateTime = json['PickupDateTime']; + transportationMethodId = json['TransportationMethodId']; + selectedAmbulate = json['SelectedAmbulate']; + requesterNote = json['RequesterNote']; + requesterFileNo = json['RequesterFileNo']; + requesterMobileNo = json['RequesterMobileNo']; + requesterIsOutSA = json['RequesterIsOutSA']; + isOutPatient = json['IsOutPatient']; + pickupLocationName = json['PickupLocationName']; + dropoffLocationName = json['DropoffLocationName']; + projectID = json['ProjectID']; + createdBy = json['CreatedBy']; + lineItemNo = json['LineItemNo']; + cost = json['Cost']; + vAT = json['VAT']; + totalPrice = json['TotalPrice']; + pickupLocationLattitude = json['PickupLocationLattitude']; + pickupLocationLongitude = json['PickupLocationLongitude']; + dropoffLocationLattitude = json['DropoffLocationLattitude']; + dropoffLocationLongitude = json['DropoffLocationLongitude']; + latitude = json['Latitude']; + longitude = json['Longitude']; + appointmentNo = json['AppointmentNo']; + appointmentClinicName = json['AppointmentClinicName']; + appointmentDoctorName = json['AppointmentDoctorName']; + appointmentBranch = json['AppointmentBranch']; + appointmentTime = json['AppointmentTime']; + } + + Map toJson() { + final Map data = new Map(); + data['VersionID'] = this.versionID; + data['Channel'] = this.channel; + data['LanguageID'] = this.languageID; + data['IPAdress'] = this.iPAdress; + data['generalid'] = this.generalid; + data['PatientOutSA'] = this.patientOutSA; + data['SessionID'] = this.sessionID; + data['isDentalAllowedBackend'] = this.isDentalAllowedBackend; + data['DeviceTypeID'] = this.deviceTypeID; + data['PatientID'] = this.patientID; + data['TokenID'] = this.tokenID; + data['PatientTypeID'] = this.patientTypeID; + data['PatientType'] = this.patientType; + data['OrderServiceID'] = this.orderServiceID; + data['PatientIdentificationID'] = this.patientIdentificationID; + data['Direction'] = this.direction; + data['HaveAppointment'] = this.haveAppointment; + data['TripType'] = this.tripType; + data['PickupUrgency'] = this.pickupUrgency; + data['PickupSpot'] = this.pickupSpot; + data['PickupDateTime'] = this.pickupDateTime; + data['TransportationMethodId'] = this.transportationMethodId; + data['SelectedAmbulate'] = this.selectedAmbulate; + data['RequesterNote'] = this.requesterNote; + data['RequesterFileNo'] = this.requesterFileNo; + data['RequesterMobileNo'] = this.requesterMobileNo; + data['RequesterIsOutSA'] = this.requesterIsOutSA; + data['IsOutPatient'] = this.isOutPatient; + data['PickupLocationName'] = this.pickupLocationName; + data['DropoffLocationName'] = this.dropoffLocationName; + data['ProjectID'] = this.projectID; + data['CreatedBy'] = this.createdBy; + data['LineItemNo'] = this.lineItemNo; + data['Cost'] = this.cost; + data['VAT'] = this.vAT; + data['TotalPrice'] = this.totalPrice; + data['PickupLocationLattitude'] = this.pickupLocationLattitude; + data['PickupLocationLongitude'] = this.pickupLocationLongitude; + data['DropoffLocationLattitude'] = this.dropoffLocationLattitude; + data['DropoffLocationLongitude'] = this.dropoffLocationLongitude; + data['Latitude'] = this.latitude; + data['Longitude'] = this.longitude; + data['AppointmentNo'] = this.appointmentNo; + data['AppointmentClinicName'] = this.appointmentClinicName; + data['AppointmentDoctorName'] = this.appointmentDoctorName; + data['AppointmentBranch'] = this.appointmentBranch; + data['AppointmentTime'] = this.appointmentTime; + return data; + } +} diff --git a/lib/core/model/er/get_all_transportation_method_list_model.dart b/lib/core/model/er/get_all_transportation_method_list_model.dart index 3402873e..b149e296 100644 --- a/lib/core/model/er/get_all_transportation_method_list_model.dart +++ b/lib/core/model/er/get_all_transportation_method_list_model.dart @@ -1,5 +1,5 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; -class PatientER_RRT_GetAllTransportationMethodListModel { +class PatientERTransportationMethod { int id; DateTime createDate; DateTime lastEditDate; @@ -9,15 +9,15 @@ class PatientER_RRT_GetAllTransportationMethodListModel { String title; String titleAR; int price; - Null isDefault; + dynamic isDefault; int visibility; - Null durationId; + dynamic durationId; String description; String descriptionAR; int totalPrice; int vAT; - PatientER_RRT_GetAllTransportationMethodListModel( + PatientERTransportationMethod( { this.id, this.createDate, @@ -36,7 +36,7 @@ class PatientER_RRT_GetAllTransportationMethodListModel { this.totalPrice, this.vAT}); - PatientER_RRT_GetAllTransportationMethodListModel.fromJson( + PatientERTransportationMethod.fromJson( Map json) { id = json['Id']; createDate = DateUtil.convertStringToDate(json['CreateDate']); diff --git a/lib/core/service/er/am_service.dart b/lib/core/service/er/am_service.dart index 016cc2df..6c9704ae 100644 --- a/lib/core/service/er/am_service.dart +++ b/lib/core/service/er/am_service.dart @@ -5,17 +5,20 @@ import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method import '../base_service.dart'; class AmService extends BaseService { - List amModelList = List(); + List amModelList = List(); List patientAllPresOrdersList = List(); Future getAllTransportationOrders() async { hasError = false; + Map body = Map(); + body['isDentalAllowedBackend']= false; + body['IdentificationNo'] = user.patientIdentificationNo; await baseAppClient.post(GET_AMBULANCE_REQUEST, onSuccess: (dynamic response, int statusCode) { amModelList.clear(); response['AmModelList'].forEach((vital) { amModelList.add( - PatientER_RRT_GetAllTransportationMethodListModel.fromJson(vital)); + PatientERTransportationMethod.fromJson(vital)); }); }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart index 6e08d984..9045ee90 100644 --- a/lib/core/viewModels/er/am_request_view_model.dart +++ b/lib/core/viewModels/er/am_request_view_model.dart @@ -11,7 +11,7 @@ class AmRequestViewModel extends BaseViewModel { AmService _amService = locator(); HospitalService _hospitalService = locator(); - List + List get amRequestModeList => _amService.amModelList; List get patientAllPresOrdersList =>_amService.patientAllPresOrdersList; diff --git a/lib/pages/ErService/AmbulanceReq.dart b/lib/pages/ErService/AmbulanceReq.dart index 8e9f54bc..c50093be 100644 --- a/lib/pages/ErService/AmbulanceReq.dart +++ b/lib/pages/ErService/AmbulanceReq.dart @@ -34,10 +34,11 @@ class _AmbulanceReqState extends State @override Widget build(BuildContext context) { return BaseView( - // onModelReady: (model) => model.getAmRequestOrders(), + onModelReady: (model) => model.getAmRequestOrders(), builder: (_, model, widget) => AppScaffold( isShowAppBar: true, appBarTitle: "Ambulance Request", + baseViewModel: model, body: Scaffold( extendBodyBehindAppBar: true, appBar: PreferredSize( @@ -109,7 +110,7 @@ class _AmbulanceReqState extends State physics: BouncingScrollPhysics(), controller: _tabController, children: [ - AmbulanceRequestIndex(), + AmbulanceRequestIndex(amRequestViewModel: model,), Container() ], ), diff --git a/lib/pages/ErService/AmbulanceRequestIndex.dart b/lib/pages/ErService/AmbulanceRequestIndex.dart index 863d3b57..46d803cd 100644 --- a/lib/pages/ErService/AmbulanceRequestIndex.dart +++ b/lib/pages/ErService/AmbulanceRequestIndex.dart @@ -1,4 +1,6 @@ -import 'package:diplomaticquarterapp/pages/ErService/widgets/StepesWideget.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; +import 'package:diplomaticquarterapp/pages/ErService/widgets/StepsWidget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:flutter/cupertino.dart'; @@ -8,27 +10,31 @@ import 'SelectTransportationMethod.dart'; import 'Summary.dart'; class AmbulanceRequestIndex extends StatefulWidget { + final AmRequestViewModel amRequestViewModel; + + AmbulanceRequestIndex({Key key, this.amRequestViewModel}); + @override _AmbulanceRequestIndexState createState() => _AmbulanceRequestIndexState(); } class _AmbulanceRequestIndexState extends State { - int currentIndex = 0; PageController pageController; + PatientER _patientER = PatientER(); _changeCurrentTab(int tab) { setState(() { currentIndex = tab; }); - pageController.animateToPage(tab, duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart); + pageController.animateToPage(tab, + duration: Duration(milliseconds: 800), curve: Curves.easeOutQuart); } @override void initState() { super.initState(); pageController = new PageController(); - } @override @@ -36,19 +42,40 @@ class _AmbulanceRequestIndexState extends State { return AppScaffold( body: Column( children: [ - SizedBox(height: 80,), + SizedBox( + height: 80, + ), Container( - margin: EdgeInsets.only(left: 12,right: 12), - child: StepesWidget(index: currentIndex,changeCurrentTab: _changeCurrentTab,)), + margin: EdgeInsets.only(left: 12, right: 12), + child: StepsWidget( + index: currentIndex, + changeCurrentTab: _changeCurrentTab, + )), Expanded( child: PageView( physics: NeverScrollableScrollPhysics(), controller: pageController, children: [ - SelectTransportationMethod(changeCurrentTab: _changeCurrentTab,), - PickupLocation(changeCurrentTab: _changeCurrentTab,), - BillAmount(changeCurrentTab: _changeCurrentTab,), - Summary(changeCurrentTab: _changeCurrentTab,), + SelectTransportationMethod( + changeCurrentTab: _changeCurrentTab, + patientER: _patientER, + amRequestViewModel: widget.amRequestViewModel, + ), + PickupLocation( + changeCurrentTab: _changeCurrentTab, + patientER: _patientER, + amRequestViewModel: widget.amRequestViewModel, + ), + BillAmount( + changeCurrentTab: _changeCurrentTab, + patientER: _patientER, + amRequestViewModel: widget.amRequestViewModel, + ), + Summary( + changeCurrentTab: _changeCurrentTab, + patientER: _patientER, + amRequestViewModel: widget.amRequestViewModel, + ), ], ), ), diff --git a/lib/pages/ErService/BillAmount.dart b/lib/pages/ErService/BillAmount.dart index 86b0d181..3dca195f 100644 --- a/lib/pages/ErService/BillAmount.dart +++ b/lib/pages/ErService/BillAmount.dart @@ -1,3 +1,5 @@ +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; @@ -5,8 +7,10 @@ import 'package:flutter/material.dart'; class BillAmount extends StatefulWidget { final Function changeCurrentTab; + final PatientER patientER; + final AmRequestViewModel amRequestViewModel; - BillAmount({Key key, this.changeCurrentTab}); + BillAmount({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel}); @override _BillAmountState createState() => _BillAmountState(); diff --git a/lib/pages/ErService/PickupLocation.dart b/lib/pages/ErService/PickupLocation.dart index bdb1ea52..2b44d4cb 100644 --- a/lib/pages/ErService/PickupLocation.dart +++ b/lib/pages/ErService/PickupLocation.dart @@ -1,3 +1,5 @@ +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; @@ -5,8 +7,9 @@ import 'package:flutter/material.dart'; class PickupLocation extends StatefulWidget { final Function changeCurrentTab; - - PickupLocation({Key key, this.changeCurrentTab}); + final PatientER patientER; + PickupLocation({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel}); + final AmRequestViewModel amRequestViewModel; @override _PickupLocationState createState() => _PickupLocationState(); diff --git a/lib/pages/ErService/SelectTransportationMethod.dart b/lib/pages/ErService/SelectTransportationMethod.dart index a5fcbb75..d8148b3c 100644 --- a/lib/pages/ErService/SelectTransportationMethod.dart +++ b/lib/pages/ErService/SelectTransportationMethod.dart @@ -1,13 +1,24 @@ -import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +enum Direction { ToHospital, FromHospital } +enum Way { OneWay, TwoWays } + class SelectTransportationMethod extends StatefulWidget { final Function changeCurrentTab; + final PatientER patientER; + final AmRequestViewModel amRequestViewModel; - SelectTransportationMethod({Key key, this.changeCurrentTab}); + SelectTransportationMethod( + {Key key, + this.changeCurrentTab, + this.patientER, + this.amRequestViewModel}); @override _SelectTransportationMethodState createState() => @@ -16,24 +27,251 @@ class SelectTransportationMethod extends StatefulWidget { class _SelectTransportationMethodState extends State { + PatientERTransportationMethod _erTransportationMethod = + PatientERTransportationMethod(); + Direction _direction = Direction.FromHospital; + Way _way = Way.OneWay; + @override Widget build(BuildContext context) { - return Column( - children: [ - Texts('SelectTransportationMethod 1'), - SizedBox(height: 45,), - Container( - padding: EdgeInsets.all(15), - width: double.maxFinite, - height: 76, - child:SecondaryButton( - color: Colors.grey[800], - textColor: Colors.white, - onTap: ()=> widget.changeCurrentTab(1), - label: 'Next', + return Container( + margin: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + Texts('Select Transportation Method'), + ...List.generate( + widget.amRequestViewModel.amRequestModeList.length, + (index) => InkWell( + onTap: () { + setState(() { + _erTransportationMethod = + widget.amRequestViewModel.amRequestModeList[index]; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + children: [ + Expanded( + flex: 3, + child: ListTile( + title: Text(widget + .amRequestViewModel.amRequestModeList[index].title), + leading: Radio( + value: widget + .amRequestViewModel.amRequestModeList[index], + groupValue: _erTransportationMethod, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _erTransportationMethod = value; + }); + }, + ), + ), + ), + Expanded( + flex: 1, + child: Texts( + 'SR ${widget.amRequestViewModel.amRequestModeList[index].price}'), + ) + ], + ), + ), + ), + ), + SizedBox( + height: 12, + ), + Texts('Select Direction'), + SizedBox( + height: 5, + ), + Row( + children: [ + Expanded( + child: InkWell( + onTap: () { + setState(() { + _direction = Direction.ToHospital; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + children: [ + ListTile( + title: Text('To Hospital'), + leading: Radio( + value: Direction.ToHospital, + groupValue: _direction, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _direction = value; + }); + }, + ), + ), + ], + ), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + setState(() { + _direction = Direction.FromHospital; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + children: [ + ListTile( + title: Text('To Hospital'), + leading: Radio( + value: Direction.FromHospital, + groupValue: _direction, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _direction = value; + }); + }, + ), + ), + ], + ), + ), + ), + ), + ], + ), + if (_direction == Direction.ToHospital) + Column( + children: [ + Texts('Select Direction'), + SizedBox( + height: 5, + ), + Row( + children: [ + Expanded( + child: InkWell( + onTap: () { + setState(() { + _way = Way.OneWay; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + children: [ + ListTile( + title: Text('One Way'), + leading: Radio( + value: Way.OneWay, + groupValue: _way, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _way = value; + }); + }, + ), + ), + ], + ), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + setState(() { + _way = Way.TwoWays; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + children: [ + ListTile( + title: Text('Two Ways'), + leading: Radio( + value: Way.TwoWays, + groupValue: _way, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _way = value; + }); + }, + ), + ), + ], + ), + ), + ), + ), + ], + ), + ], + ), + SizedBox( + height: 15, ), - ) - ], + Container( + padding: EdgeInsets.all(15), + width: double.maxFinite, + height: 76, + child: SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: () { + setState(() { + widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 2; + widget.patientER.tripType = _way == Way.TwoWays ? 1 : 2; + widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod)+1); + widget.changeCurrentTab(1); + }); + }, + label: 'Next', + ), + ) + ], + ), ); } } diff --git a/lib/pages/ErService/Summary.dart b/lib/pages/ErService/Summary.dart index 4f792b68..13beee8c 100644 --- a/lib/pages/ErService/Summary.dart +++ b/lib/pages/ErService/Summary.dart @@ -1,3 +1,5 @@ +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; @@ -5,8 +7,10 @@ import 'package:flutter/material.dart'; class Summary extends StatefulWidget { final Function changeCurrentTab; + final PatientER patientER; + final AmRequestViewModel amRequestViewModel; - Summary({Key key, this.changeCurrentTab}); + Summary({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel}); @override _SummaryState createState() => _SummaryState(); diff --git a/lib/pages/ErService/widgets/StepesWideget.dart b/lib/pages/ErService/widgets/StepsWidget.dart similarity index 55% rename from lib/pages/ErService/widgets/StepesWideget.dart rename to lib/pages/ErService/widgets/StepsWidget.dart index 3f6b57a4..1e4077cb 100644 --- a/lib/pages/ErService/widgets/StepesWideget.dart +++ b/lib/pages/ErService/widgets/StepsWidget.dart @@ -2,11 +2,11 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -class StepesWidget extends StatelessWidget { +class StepsWidget extends StatelessWidget { final int index; final Function changeCurrentTab; - StepesWidget({Key key, this.index, this.changeCurrentTab}); + StepsWidget({Key key, this.index, this.changeCurrentTab}); @override Widget build(BuildContext context) { @@ -18,9 +18,9 @@ class StepesWidget extends StatelessWidget { color: Colors.transparent, child: Center( child: Divider( - color: Colors.black, - height: 3, - thickness: 3, + color: Colors.grey, + height: 0.75, + thickness: 0.75, ), ), ), @@ -30,16 +30,17 @@ class StepesWidget extends StatelessWidget { child: InkWell( onTap: () => changeCurrentTab(0), child: Container( - width: 25, - height: 25, + width: 35, + height: 35, decoration: BoxDecoration( + border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75), shape: BoxShape.circle, - color: index == 0 ? Colors.grey[800] : Colors.white, + color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white, ), child: Center( child: Texts( '1', - color: index == 0 ? Colors.white:Colors.grey[800] , + color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800], ), ), ), @@ -47,20 +48,21 @@ class StepesWidget extends StatelessWidget { ), Positioned( top: 10, - left: MediaQuery.of(context).size.width *0.3, + left: MediaQuery.of(context).size.width * 0.3, child: InkWell( - onTap: () => changeCurrentTab(1), + onTap: () => index >= 2 ? changeCurrentTab(1) : null, child: Container( - width: 25, - height: 25, + width: 35, + height: 35, decoration: BoxDecoration( + border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75), shape: BoxShape.circle, - color: index == 1 ? Colors.grey[800] : Colors.white, + color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white, ), child: Center( child: Texts( '2', - color: index == 1 ? Colors.white:Colors.grey[800], + color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800], ), ), ), @@ -68,20 +70,21 @@ class StepesWidget extends StatelessWidget { ), Positioned( top: 10, - left: MediaQuery.of(context).size.width *0.6, + left: MediaQuery.of(context).size.width * 0.6, child: InkWell( - onTap: () => changeCurrentTab(2), + onTap: () => index >= 3 ? changeCurrentTab(2) : null, child: Container( - width: 25, - height: 25, + width: 35, + height: 35, decoration: BoxDecoration( shape: BoxShape.circle, - color: index == 2 ? Colors.grey[800] : Colors.white, + border: index > 2 ? null:Border.all(color: Colors.black,width: 0.75), + color: index == 2 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white, ), child: Center( child: Texts( '3', - color: index == 2 ? Colors.white: Colors.grey[800] , + color: index == 2? Colors.white : index > 1 ?Colors.white: Colors.grey[800], ), ), ), @@ -91,18 +94,20 @@ class StepesWidget extends StatelessWidget { top: 10, right: 0, child: InkWell( - onTap: () => changeCurrentTab(3), + onTap: () => index == 2 ?changeCurrentTab(3):null, child: Container( - width: 25, - height: 25, + width: 35, + height: 35, decoration: BoxDecoration( + border: Border.all(color: Colors.black,width: 0.75), + shape: BoxShape.circle, color: index == 3 ? Colors.grey[800] : Colors.white, ), child: Center( child: Texts( '4', - color: index == 3 ? Colors.white:Colors.grey[800] , + color: index == 3 ? Colors.white : Colors.grey[800], ), ), ), From 3d6eafe4731c72a7a24dd0ee32373aa308c8c97b Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 4 Oct 2020 15:05:10 +0300 Subject: [PATCH 3/6] Ambulance Service first step --- ..._all_transportation_method_list_model.dart | 14 +- lib/core/service/er/am_service.dart | 7 +- .../ErService/AmbulanceRequestIndex.dart | 1 + lib/pages/ErService/PickupLocation.dart | 277 +++++++++++- .../ErService/SelectTransportationMethod.dart | 408 +++++++++--------- 5 files changed, 484 insertions(+), 223 deletions(-) diff --git a/lib/core/model/er/get_all_transportation_method_list_model.dart b/lib/core/model/er/get_all_transportation_method_list_model.dart index b149e296..ebc9caf7 100644 --- a/lib/core/model/er/get_all_transportation_method_list_model.dart +++ b/lib/core/model/er/get_all_transportation_method_list_model.dart @@ -1,21 +1,21 @@ import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; class PatientERTransportationMethod { - int id; + dynamic id; DateTime createDate; DateTime lastEditDate; - int createdBy; - int lastEditBy; + dynamic createdBy; + dynamic lastEditBy; bool isActive; String title; String titleAR; - int price; + dynamic price; dynamic isDefault; - int visibility; + dynamic visibility; dynamic durationId; String description; String descriptionAR; - int totalPrice; - int vAT; + dynamic totalPrice; + dynamic vAT; PatientERTransportationMethod( { diff --git a/lib/core/service/er/am_service.dart b/lib/core/service/er/am_service.dart index 6c9704ae..b6a91871 100644 --- a/lib/core/service/er/am_service.dart +++ b/lib/core/service/er/am_service.dart @@ -16,14 +16,13 @@ class AmService extends BaseService { await baseAppClient.post(GET_AMBULANCE_REQUEST, onSuccess: (dynamic response, int statusCode) { amModelList.clear(); - response['AmModelList'].forEach((vital) { - amModelList.add( - PatientERTransportationMethod.fromJson(vital)); + response['PatientER_RRT_GetAllTransportationMethodList'].forEach((vital) { + amModelList.add(PatientERTransportationMethod.fromJson(vital)); }); }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: Map()); + }, body: body); } Future getPatientAllPresOrdersList() async { diff --git a/lib/pages/ErService/AmbulanceRequestIndex.dart b/lib/pages/ErService/AmbulanceRequestIndex.dart index 46d803cd..16d07b88 100644 --- a/lib/pages/ErService/AmbulanceRequestIndex.dart +++ b/lib/pages/ErService/AmbulanceRequestIndex.dart @@ -56,6 +56,7 @@ class _AmbulanceRequestIndexState extends State { physics: NeverScrollableScrollPhysics(), controller: pageController, children: [ + //Container(), SelectTransportationMethod( changeCurrentTab: _changeCurrentTab, patientER: _patientER, diff --git a/lib/pages/ErService/PickupLocation.dart b/lib/pages/ErService/PickupLocation.dart index 2b44d4cb..46a8928b 100644 --- a/lib/pages/ErService/PickupLocation.dart +++ b/lib/pages/ErService/PickupLocation.dart @@ -4,11 +4,20 @@ import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:font_awesome_flutter/font_awesome_flutter.dart'; + +enum HaveAppointment { YES, NO } class PickupLocation extends StatefulWidget { final Function changeCurrentTab; final PatientER patientER; - PickupLocation({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel}); + + PickupLocation( + {Key key, + this.changeCurrentTab, + this.patientER, + this.amRequestViewModel}); + final AmRequestViewModel amRequestViewModel; @override @@ -16,24 +25,258 @@ class PickupLocation extends StatefulWidget { } class _PickupLocationState extends State { + bool _isInsideHome = false; + HaveAppointment _haveAppointment = HaveAppointment.NO; + @override Widget build(BuildContext context) { - return Column( - children: [ - Texts('PickupLocation 2'), - SizedBox(height: 45,), - Container( - padding: EdgeInsets.all(15), - width: double.maxFinite, - height: 76, - child:SecondaryButton( - color: Colors.grey[800], - textColor: Colors.white, - onTap: ()=> widget.changeCurrentTab(2), - label: 'Next', - ), - ) - ], + return SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + margin: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + if (widget.patientER.direction == 1) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts('Pickup Location'), + SizedBox( + height: 15, + ), + Container( + padding: EdgeInsets.all(12), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts('Select From Map'), + Icon( + FontAwesomeIcons.mapMarkerAlt, + size: 24, + color: Colors.black, + ) + ], + ), + ), + SizedBox( + height: 12, + ), + Texts('Pickup Spot'), + SizedBox( + height: 5, + ), + InkWell( + onTap: () { + setState(() { + _isInsideHome = !_isInsideHome; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( + title: Texts('Inside Home'), + leading: Checkbox( + activeColor: Colors.red[800], + value: _isInsideHome, + onChanged: (value) { + setState(() { + _isInsideHome = value; + }); + }, + ), + ), + ), + ), + SizedBox( + height: 12, + ), + Texts('Do you have an appointment ?'), + SizedBox( + height: 5, + ), + Row( + children: [ + Expanded( + child: InkWell( + onTap: () { + setState(() { + _haveAppointment = HaveAppointment.YES; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: + Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( + title: Text('Yes'), + leading: Radio( + value: HaveAppointment.YES, + groupValue: _haveAppointment, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _haveAppointment = value; + }); + }, + ), + ), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + setState(() { + _haveAppointment = HaveAppointment.NO; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: + Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( + title: Text('No'), + leading: Radio( + value: HaveAppointment.NO, + groupValue: _haveAppointment, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _haveAppointment = value; + }); + }, + ), + ), + ), + ), + ), + ], + ), + SizedBox( + height: 12, + ), + Texts('Drop off Location'), + SizedBox( + height: 8, + ), + Container( + padding: EdgeInsets.all(12), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts('Pickup Location'), + Icon( + Icons.arrow_drop_down, + size: 24, + color: Colors.black, + ) + ], + ), + ), + ], + ), + if (widget.patientER.direction == 2) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts('Pickup Location'), + SizedBox( + height: 15, + ), + Container( + padding: EdgeInsets.all(12), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts('Pickup Location'), + Icon( + Icons.arrow_drop_down, + size: 24, + color: Colors.black, + ) + ], + ), + ), + SizedBox( + height: 12, + ), + Texts('Drop off Location'), + SizedBox( + height: 8, + ), + Container( + padding: EdgeInsets.all(12), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts('Select From Map'), + Icon( + FontAwesomeIcons.mapMarkerAlt, + size: 24, + color: Colors.black, + ) + ], + ), + ), + ], + ), + //TODO show dialog projects + + SizedBox( + height: 45, + ), + Container( + padding: EdgeInsets.all(15), + width: double.maxFinite, + height: 76, + child: SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: () => widget.changeCurrentTab(2), + label: 'Next', + ), + ) + ], + ), + ), ); } } diff --git a/lib/pages/ErService/SelectTransportationMethod.dart b/lib/pages/ErService/SelectTransportationMethod.dart index d8148b3c..38eec5b4 100644 --- a/lib/pages/ErService/SelectTransportationMethod.dart +++ b/lib/pages/ErService/SelectTransportationMethod.dart @@ -32,89 +32,108 @@ class _SelectTransportationMethodState Direction _direction = Direction.FromHospital; Way _way = Way.OneWay; + @override + void initState() { + super.initState(); + if (widget.patientER.direction != null) { + _direction = widget.patientER.direction == 1 + ? Direction.ToHospital + : Direction.FromHospital; + _way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays; + _erTransportationMethod = widget.amRequestViewModel + .amRequestModeList[(widget.patientER.selectedAmbulate - 1)]; + } + } + @override Widget build(BuildContext context) { - return Container( - margin: EdgeInsets.only(left: 12, right: 12), - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - SizedBox( - height: 12, - ), - Texts('Select Transportation Method'), - ...List.generate( - widget.amRequestViewModel.amRequestModeList.length, - (index) => InkWell( - onTap: () { - setState(() { - _erTransportationMethod = - widget.amRequestViewModel.amRequestModeList[index]; - }); - }, - child: Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.grey, width: 0.5), - color: Colors.white, - ), - child: Row( - children: [ - Expanded( - flex: 3, - child: ListTile( - title: Text(widget - .amRequestViewModel.amRequestModeList[index].title), - leading: Radio( - value: widget - .amRequestViewModel.amRequestModeList[index], - groupValue: _erTransportationMethod, - activeColor: Colors.red[800], - onChanged: (value) { - setState(() { - _erTransportationMethod = value; - }); - }, + return SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + margin: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + Texts('Select Transportation Method'), + ...List.generate( + widget.amRequestViewModel.amRequestModeList.length, + (index) => InkWell( + onTap: () { + setState(() { + _erTransportationMethod = + widget.amRequestViewModel.amRequestModeList[index]; + }); + }, + child: Container( + margin: EdgeInsets.all(5), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + children: [ + Expanded( + flex: 3, + child: ListTile( + title: Text(widget.amRequestViewModel + .amRequestModeList[index].title), + leading: Radio( + value: widget + .amRequestViewModel.amRequestModeList[index], + groupValue: _erTransportationMethod, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _erTransportationMethod = value; + }); + }, + ), ), ), - ), - Expanded( - flex: 1, - child: Texts( - 'SR ${widget.amRequestViewModel.amRequestModeList[index].price}'), - ) - ], + Expanded( + flex: 1, + child: Texts( + 'SR ${widget.amRequestViewModel.amRequestModeList[index].price}'), + ) + ], + ), ), ), ), - ), - SizedBox( - height: 12, - ), - Texts('Select Direction'), - SizedBox( - height: 5, - ), - Row( - children: [ - Expanded( - child: InkWell( - onTap: () { - setState(() { - _direction = Direction.ToHospital; - }); - }, - child: Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.grey, width: 0.5), - color: Colors.white, - ), - child: Row( - children: [ - ListTile( + SizedBox( + height: 12, + ), + Texts('Select Direction'), + SizedBox( + height: 5, + ), + Container( + width: double.maxFinite, + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Expanded( + child: InkWell( + onTap: () { + setState(() { + _direction = Direction.ToHospital; + }); + }, + child: Container( + width: double.maxFinite, + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( title: Text('To Hospital'), leading: Radio( value: Direction.ToHospital, @@ -127,29 +146,26 @@ class _SelectTransportationMethodState }, ), ), - ], + ), ), ), - ), - ), - Expanded( - child: InkWell( - onTap: () { - setState(() { - _direction = Direction.FromHospital; - }); - }, - child: Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.grey, width: 0.5), - color: Colors.white, - ), - child: Row( - children: [ - ListTile( - title: Text('To Hospital'), + Expanded( + child: InkWell( + onTap: () { + setState(() { + _direction = Direction.FromHospital; + }); + }, + child: Container( + width: double.maxFinite, + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( + title: Text('Form Hospital'), leading: Radio( value: Direction.FromHospital, groupValue: _direction, @@ -161,116 +177,118 @@ class _SelectTransportationMethodState }, ), ), - ], + ), ), ), - ), + ], ), - ], - ), - if (_direction == Direction.ToHospital) - Column( - children: [ - Texts('Select Direction'), - SizedBox( - height: 5, - ), - Row( - children: [ - Expanded( - child: InkWell( - onTap: () { - setState(() { - _way = Way.OneWay; - }); - }, - child: Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.grey, width: 0.5), - color: Colors.white, - ), - child: Row( - children: [ - ListTile( - title: Text('One Way'), - leading: Radio( - value: Way.OneWay, - groupValue: _way, - activeColor: Colors.red[800], - onChanged: (value) { - setState(() { - _way = value; - }); - }, - ), + ), + if (_direction == Direction.ToHospital) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 8, + ), + Texts('Select Direction'), + SizedBox( + height: 5, + ), + Row( + children: [ + Expanded( + child: InkWell( + onTap: () { + setState(() { + _way = Way.OneWay; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: + Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( + title: Text('One Way'), + leading: Radio( + value: Way.OneWay, + groupValue: _way, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _way = value; + }); + }, ), - ], + ), ), ), ), - ), - Expanded( - child: InkWell( - onTap: () { - setState(() { - _way = Way.TwoWays; - }); - }, - child: Container( - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.grey, width: 0.5), - color: Colors.white, - ), - child: Row( - children: [ - ListTile( - title: Text('Two Ways'), - leading: Radio( - value: Way.TwoWays, - groupValue: _way, - activeColor: Colors.red[800], - onChanged: (value) { - setState(() { - _way = value; - }); - }, - ), + Expanded( + child: InkWell( + onTap: () { + setState(() { + _way = Way.TwoWays; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: + Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( + title: Text('Two Ways'), + leading: Radio( + value: Way.TwoWays, + groupValue: _way, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _way = value; + }); + }, ), - ], + ), ), ), ), - ), - ], - ), - ], - ), - SizedBox( - height: 15, - ), - Container( - padding: EdgeInsets.all(15), - width: double.maxFinite, - height: 76, - child: SecondaryButton( - color: Colors.grey[800], - textColor: Colors.white, - onTap: () { - setState(() { - widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 2; - widget.patientER.tripType = _way == Way.TwoWays ? 1 : 2; - widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod)+1); - widget.changeCurrentTab(1); - }); - }, - label: 'Next', + ], + ), + ], + ), + SizedBox( + height: 15, ), - ) - ], + Container( + padding: EdgeInsets.all(15), + width: double.maxFinite, + height: 76, + child: SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: () { + setState(() { + widget.patientER.direction = + _direction == Direction.ToHospital ? 1 : 2; + widget.patientER.tripType = _way == Way.TwoWays ? 2 : 1; + widget.patientER.selectedAmbulate = (widget + .amRequestViewModel.amRequestModeList + .indexOf(_erTransportationMethod) + + 1); + widget.changeCurrentTab(1); + }); + }, + label: 'Next', + ), + ) + ], + ), ), ); } From 1ce55e687f8ee2b0a175a788ecaff529d04d2ffc Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Tue, 6 Oct 2020 18:02:35 +0300 Subject: [PATCH 4/6] Ambulance Service second step --- android/app/build.gradle | 4 +- android/app/src/main/AndroidManifest.xml | 6 + android/gradle.properties | 2 +- lib/core/enum/Ambulate.dart | 27 ++ lib/core/model/er/PatientER.dart | 11 +- lib/core/service/medical/medical_service.dart | 9 +- .../viewModels/er/am_request_view_model.dart | 17 + .../ErService/AvailableAppointmentsPage.dart | 45 +++ lib/pages/ErService/BillAmount.dart | 327 +++++++++++++++++- lib/pages/ErService/PickupLocation.dart | 163 +++++++-- .../ErService/SelectTransportationMethod.dart | 6 + lib/pages/ErService/Summary.dart | 98 +++++- .../ErService/widgets/AppointmentCard.dart | 47 +++ lib/pages/ErService/widgets/StepsWidget.dart | 109 +++++- lib/uitl/ProgressDialog.dart | 12 + pubspec.yaml | 6 +- 16 files changed, 819 insertions(+), 70 deletions(-) create mode 100644 lib/core/enum/Ambulate.dart create mode 100644 lib/pages/ErService/AvailableAppointmentsPage.dart create mode 100644 lib/pages/ErService/widgets/AppointmentCard.dart create mode 100644 lib/uitl/ProgressDialog.dart diff --git a/android/app/build.gradle b/android/app/build.gradle index 1f71421f..9640ea61 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -27,7 +27,7 @@ apply plugin: 'com.google.gms.google-services' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - compileSdkVersion 30 + compileSdkVersion 28 sourceSets { main.java.srcDirs += 'src/main/kotlin' @@ -41,7 +41,7 @@ android { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.cloud.diplomaticquarterapp" minSdkVersion 21 - targetSdkVersion 30 + targetSdkVersion 28 versionCode flutterVersionCode.toInteger() versionName flutterVersionName multiDexEnabled true diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index f1a5a3f8..8c32edfd 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -17,6 +17,9 @@ + + + + + diff --git a/android/gradle.properties b/android/gradle.properties index 3f45ee5b..9c0729c9 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -2,4 +2,4 @@ android.enableR8=true android.useAndroidX=true android.enableJetifier=true -org.gradle.jvmargs=-Xmx4608m \ No newline at end of file +org.gradle.jvmargs=-Xmx4608m diff --git a/lib/core/enum/Ambulate.dart b/lib/core/enum/Ambulate.dart new file mode 100644 index 00000000..059a281c --- /dev/null +++ b/lib/core/enum/Ambulate.dart @@ -0,0 +1,27 @@ +import 'package:flutter/cupertino.dart'; + +enum Ambulate { Wheelchair, Walker, Stretcher, None } + +extension SelectedAmbulate on Ambulate { + String getAmbulateTitle(BuildContext context) { + switch (this) { + case Ambulate.Wheelchair: + // TODO: Handle this case. + return 'Wheelchair'; + break; + case Ambulate.Walker: + // TODO: Handle this case. + return 'Walker'; + break; + case Ambulate.Stretcher: + // TODO: Handle this case. + return 'Stretcher'; + break; + case Ambulate.None: + // TODO: Handle this case. + return 'None'; + break; + } + return 'None'; + } +} diff --git a/lib/core/model/er/PatientER.dart b/lib/core/model/er/PatientER.dart index 9c2d660e..d0827311 100644 --- a/lib/core/model/er/PatientER.dart +++ b/lib/core/model/er/PatientER.dart @@ -1,3 +1,7 @@ +import 'package:diplomaticquarterapp/core/enum/Ambulate.dart'; + +import 'get_all_transportation_method_list_model.dart'; + class PatientER { double versionID; int channel; @@ -46,7 +50,8 @@ class PatientER { dynamic appointmentDoctorName; dynamic appointmentBranch; dynamic appointmentTime; - + PatientERTransportationMethod patientERTransportationMethod; + Ambulate ambulate; PatientER( {this.versionID, this.channel, @@ -94,7 +99,9 @@ class PatientER { this.appointmentClinicName, this.appointmentDoctorName, this.appointmentBranch, - this.appointmentTime}); + this.appointmentTime, + this.patientERTransportationMethod, + this.ambulate}); PatientER.fromJson(Map json) { versionID = json['VersionID']; diff --git a/lib/core/service/medical/medical_service.dart b/lib/core/service/medical/medical_service.dart index 90230f6d..572e5096 100644 --- a/lib/core/service/medical/medical_service.dart +++ b/lib/core/service/medical/medical_service.dart @@ -5,9 +5,14 @@ import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResu class MedicalService extends BaseService { List appoitmentAllHistoryResultList = List(); - getAppointmentHistory() async { + getAppointmentHistory({bool isActiveAppointment = false}) async { hasError = false; super.error = ""; + Map body = Map(); + if(isActiveAppointment) { + body['IsActiveAppointment'] = true; + body['isDentalAllowedBackend'] = false; + } await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, onSuccess: (response, statusCode) async { @@ -19,6 +24,6 @@ class MedicalService extends BaseService { }, onFailure: (String error, int statusCode) { hasError = true; super.error = error; - }, body: Map()); + }, body: body); } } diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart index 9045ee90..a5261456 100644 --- a/lib/core/viewModels/er/am_request_view_model.dart +++ b/lib/core/viewModels/er/am_request_view_model.dart @@ -3,19 +3,36 @@ import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import 'package:diplomaticquarterapp/core/service/er/am_service.dart'; import 'package:diplomaticquarterapp/core/service/hospital_service.dart'; +import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import '../base_view_model.dart'; import '../../../locator.dart'; class AmRequestViewModel extends BaseViewModel { AmService _amService = locator(); HospitalService _hospitalService = locator(); + MedicalService _medicalService = locator(); List get amRequestModeList => _amService.amModelList; List get patientAllPresOrdersList =>_amService.patientAllPresOrdersList; + List get appoitmentAllHistoryResultList => + _medicalService.appoitmentAllHistoryResultList; + + Future getAppointmentHistory() async { + setState(ViewState.BusyLocal); + await _medicalService.getAppointmentHistory(isActiveAppointment: true); + if (_medicalService.hasError) { + error = _medicalService.error; + setState(ViewState.ErrorLocal); + } else + setState(ViewState.Idle); + } + + Future getAmRequestOrders() async { setState(ViewState.Busy); diff --git a/lib/pages/ErService/AvailableAppointmentsPage.dart b/lib/pages/ErService/AvailableAppointmentsPage.dart new file mode 100644 index 00000000..7180d5dd --- /dev/null +++ b/lib/pages/ErService/AvailableAppointmentsPage.dart @@ -0,0 +1,45 @@ +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/pages/ErService/widgets/AppointmentCard.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class AvailableAppointmentsPage extends StatelessWidget { + final List appointmentsAllHistoryList; + + const AvailableAppointmentsPage({Key key, this.appointmentsAllHistoryList}) + : super(key: key); + + @override + Widget build(BuildContext context) { + return AppScaffold( + isShowAppBar: true, + appBarTitle: 'Available Appointments', + body: SingleChildScrollView( + child: Container( + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Texts('Available Appointments'), + SizedBox( + height: 12, + ), + ...List.generate( + appointmentsAllHistoryList.length, + (index) => InkWell( + onTap: (){ + Navigator.pop(context, appointmentsAllHistoryList[index]); + }, + child: AppointmentCard(appointment: appointmentsAllHistoryList[index],), + ), + ) + ], + ), + ), + ), + ); + } +} + + diff --git a/lib/pages/ErService/BillAmount.dart b/lib/pages/ErService/BillAmount.dart index 3dca195f..44e17c3a 100644 --- a/lib/pages/ErService/BillAmount.dart +++ b/lib/pages/ErService/BillAmount.dart @@ -1,41 +1,334 @@ +import 'package:diplomaticquarterapp/core/enum/Ambulate.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; +import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; + class BillAmount extends StatefulWidget { final Function changeCurrentTab; final PatientER patientER; final AmRequestViewModel amRequestViewModel; - BillAmount({Key key, this.changeCurrentTab, this.patientER, this.amRequestViewModel}); + BillAmount( + {Key key, + this.changeCurrentTab, + this.patientER, + this.amRequestViewModel}); @override _BillAmountState createState() => _BillAmountState(); } class _BillAmountState extends State { + Ambulate _ambulate = Ambulate.None; + String note =""; @override Widget build(BuildContext context) { - return Column( - children: [ - Texts('BillAmount 3'), - SizedBox(height: 45,), - Container( - padding: EdgeInsets.all(15), - width: double.maxFinite, - height: 76, - child:SecondaryButton( - color: Colors.grey[800], - textColor: Colors.white, - onTap: ()=> widget.changeCurrentTab(3), - label: 'Next', + return SingleChildScrollView( + physics: BouncingScrollPhysics(), + child: Container( + margin: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts('Bill Amount '), + SizedBox( + height: 10, + ), + Table( + border: TableBorder.symmetric( + inside: BorderSide(width: 1.0, color: Colors.grey[300]), + outside: BorderSide(width: 1.0, color: Colors.grey[300])), + children: [ + TableRow( + children: [ + Container( + height: MediaQuery.of(context).size.height * 0.09, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10.0), + ), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + 'Amount before tax: ', + textAlign: TextAlign.start, + color: Colors.black, + fontSize: 15, + ), + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.09, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topRight: Radius.circular(10.0), + ), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + 'SR ${widget.patientER.patientERTransportationMethod.price}', + color: Colors.black, + textAlign: TextAlign.start, + fontSize: 15, + ), + ), + ), + ], + ), + TableRow( + children: [ + Container( + color: Colors.white, + height: MediaQuery.of(context).size.height * 0.09, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + 'Tax amount :', + color: Colors.black, + fontSize: 15, + textAlign: TextAlign.start, + ), + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.09, + color: Colors.white, + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + 'SR ${widget.patientER.patientERTransportationMethod.vAT}', + color: Colors.black, + fontSize: 15, + textAlign: TextAlign.start, + ), + ), + ), + ], + ), + TableRow( + children: [ + Container( + height: MediaQuery.of(context).size.height * 0.09, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + bottomLeft: Radius.circular(10.0), + ), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + 'Total amount payable', + color: Colors.black, + fontSize: 15, + textAlign: TextAlign.start, + bold: true, + ), + ), + ), + Container( + height: MediaQuery.of(context).size.height * 0.09, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + bottomRight: Radius.circular(10.0), + ), + ), + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Texts( + 'SR ${widget.patientER.patientERTransportationMethod.totalPrice}', + color: Colors.black, + fontSize: 15, + textAlign: TextAlign.start, + ), + ), + ), + ], + ), + ], + ), + SizedBox( + height: 10, + ), + Texts('Select Ambulate',bold: true,), + SizedBox(height: 5,), + Row( + children: [ + Expanded( + child: InkWell( + onTap: () { + setState(() { + _ambulate = Ambulate.Wheelchair; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: + Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( + title: Text('Wheelchair'), + leading: Radio( + value: Ambulate.Wheelchair, + groupValue: _ambulate, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _ambulate = value; + }); + }, + ), + ), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + setState(() { + _ambulate = Ambulate.Walker; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: + Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( + title: Text('Walker'), + leading: Radio( + value: Ambulate.Walker, + groupValue: _ambulate, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _ambulate = value; + }); + }, + ), + ), + ), + ), + ), + ], + ), + SizedBox(height: 5,), + Row( + children: [ + Expanded( + child: InkWell( + onTap: () { + setState(() { + _ambulate = Ambulate.Stretcher; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: + Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( + title: Text('Stretcher'), + leading: Radio( + value: Ambulate.Stretcher, + groupValue: _ambulate, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _ambulate = value; + }); + }, + ), + ), + ), + ), + ), + Expanded( + child: InkWell( + onTap: () { + setState(() { + _ambulate = Ambulate.None; + }); + }, + child: Container( + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: + Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: ListTile( + title: Text('Walker'), + leading: Radio( + value: Ambulate.None, + groupValue: _ambulate, + activeColor: Colors.red[800], + onChanged: (value) { + setState(() { + _ambulate = value; + }); + }, + ), + ), + ), + ), + ), + ], + ), + SizedBox(height: 12,), + NewTextFields( + hintText: 'Note', + initialValue: note, + onChanged: (value){ + setState(() { + note = value; + }); + }, + ), - ), - ) - ], + SizedBox( + height: 15, + ), + Container( + padding: EdgeInsets.all(15), + width: double.maxFinite, + height: 76, + child: SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + onTap: () { + setState(() { + widget.patientER.ambulate = _ambulate; + widget.patientER.requesterNote = note; + widget.changeCurrentTab(3); + }); + }, + label: 'Next', + ), + ) + ], + ), + ), ); } } diff --git a/lib/pages/ErService/PickupLocation.dart b/lib/pages/ErService/PickupLocation.dart index 46a8928b..4b32c9bb 100644 --- a/lib/pages/ErService/PickupLocation.dart +++ b/lib/pages/ErService/PickupLocation.dart @@ -1,16 +1,29 @@ +import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/pages/ErService/widgets/AppointmentCard.dart'; +import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; +import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; +import 'package:geolocator/geolocator.dart'; +import 'package:google_maps_place_picker/google_maps_place_picker.dart'; +import 'package:google_maps_flutter/google_maps_flutter.dart'; + +import 'AmbulanceReq.dart'; +import 'AvailableAppointmentsPage.dart'; enum HaveAppointment { YES, NO } class PickupLocation extends StatefulWidget { final Function changeCurrentTab; final PatientER patientER; + final AmRequestViewModel amRequestViewModel; PickupLocation( {Key key, @@ -18,8 +31,6 @@ class PickupLocation extends StatefulWidget { this.patientER, this.amRequestViewModel}); - final AmRequestViewModel amRequestViewModel; - @override _PickupLocationState createState() => _PickupLocationState(); } @@ -27,6 +38,26 @@ class PickupLocation extends StatefulWidget { class _PickupLocationState extends State { bool _isInsideHome = false; HaveAppointment _haveAppointment = HaveAppointment.NO; + double _latitude; + double _longitude; + AppoitmentAllHistoryResultList myAppointment; + + @override + void initState() { + super.initState(); + _getCurrentLocation(); + } + + _getCurrentLocation() async { + await getLastKnownPosition().then((value) { + _latitude = value.latitude; + _longitude = value.longitude; + }).catchError((e) { + _longitude = 0; + _latitude = 0; + }); + // currentLocation = LatLng(position.latitude, position.longitude); + } @override Widget build(BuildContext context) { @@ -111,9 +142,12 @@ class _PickupLocationState extends State { Expanded( child: InkWell( onTap: () { - setState(() { - _haveAppointment = HaveAppointment.YES; - }); + if(myAppointment == null) { + getAppointment(); + setState(() { + _haveAppointment = HaveAppointment.YES; + }); + } }, child: Container( decoration: BoxDecoration( @@ -130,9 +164,13 @@ class _PickupLocationState extends State { groupValue: _haveAppointment, activeColor: Colors.red[800], onChanged: (value) { - setState(() { - _haveAppointment = value; - }); + if(myAppointment == null) { + getAppointment(); + setState(() { + _haveAppointment = value; + }); + } + }, ), ), @@ -144,6 +182,7 @@ class _PickupLocationState extends State { onTap: () { setState(() { _haveAppointment = HaveAppointment.NO; + myAppointment = null; }); }, child: Container( @@ -163,6 +202,7 @@ class _PickupLocationState extends State { onChanged: (value) { setState(() { _haveAppointment = value; + myAppointment = null; }); }, ), @@ -172,6 +212,18 @@ class _PickupLocationState extends State { ), ], ), + + if(myAppointment!=null) + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 12, + ), + AppointmentCard(appointment: myAppointment,) + ], + ), + SizedBox( height: 12, ), @@ -209,24 +261,43 @@ class _PickupLocationState extends State { SizedBox( height: 15, ), - Container( - padding: EdgeInsets.all(12), - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.grey, width: 0.5), - color: Colors.white, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Texts('Pickup Location'), - Icon( - Icons.arrow_drop_down, - size: 24, - color: Colors.black, - ) - ], + InkWell( + onTap: () { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => PlacePicker( + apiKey: 'AIzaSyCiD4YqVqLNYbt8-htvFy4Wp8XSph9E3wM​', + // Put YOUR OWN KEY here. + onPlacePicked: (PickResult result) { + print(result.adrAddress); + Navigator.of(context).pop(); + }, + initialPosition: LatLng(_latitude, _longitude), + useCurrentLocation: true, + ), + ), + ); + }, + child: Container( + padding: EdgeInsets.all(12), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts('Pickup Location'), + Icon( + Icons.arrow_drop_down, + size: 24, + color: Colors.black, + ) + ], + ), ), ), SizedBox( @@ -270,7 +341,12 @@ class _PickupLocationState extends State { child: SecondaryButton( color: Colors.grey[800], textColor: Colors.white, - onTap: () => widget.changeCurrentTab(2), + onTap: () { + setState(() { + widget.patientER.pickupSpot = _isInsideHome ? 1 : 0; + widget.changeCurrentTab(2); + }); + }, label: 'Next', ), ) @@ -279,4 +355,37 @@ class _PickupLocationState extends State { ), ); } + + getAppointment() { + widget.amRequestViewModel.getAppointmentHistory().then((value) { + if (widget.amRequestViewModel.state == ViewState.Error || + widget.amRequestViewModel.state == ViewState.ErrorLocal) { + AppToast.showErrorToast(message: widget.amRequestViewModel.error); + } else if (widget.amRequestViewModel.appoitmentAllHistoryResultList.length > 0) { + Navigator.push( + context, + MaterialPageRoute( + builder: (context) => AvailableAppointmentsPage( + appointmentsAllHistoryList: + widget.amRequestViewModel.appoitmentAllHistoryResultList, + ), + ), + ).then((value) { + if (value != null) + setState(() { + myAppointment = value; + }); + else + setState(() { + _haveAppointment = HaveAppointment.NO; + }); + }); + } else { + setState(() { + _haveAppointment = HaveAppointment.NO; + }); + AppToast.showErrorToast(message: 'You don\'t have any appointment'); + } + }); + } } diff --git a/lib/pages/ErService/SelectTransportationMethod.dart b/lib/pages/ErService/SelectTransportationMethod.dart index 38eec5b4..261b9f83 100644 --- a/lib/pages/ErService/SelectTransportationMethod.dart +++ b/lib/pages/ErService/SelectTransportationMethod.dart @@ -42,6 +42,10 @@ class _SelectTransportationMethodState _way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays; _erTransportationMethod = widget.amRequestViewModel .amRequestModeList[(widget.patientER.selectedAmbulate - 1)]; + } else { + if (widget.amRequestViewModel.amRequestModeList.length != 0) + _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[ + widget.amRequestViewModel.amRequestModeList.length - 1]; } } @@ -281,6 +285,8 @@ class _SelectTransportationMethodState .amRequestViewModel.amRequestModeList .indexOf(_erTransportationMethod) + 1); + widget.patientER.patientERTransportationMethod = + _erTransportationMethod; widget.changeCurrentTab(1); }); }, diff --git a/lib/pages/ErService/Summary.dart b/lib/pages/ErService/Summary.dart index 13beee8c..4c189707 100644 --- a/lib/pages/ErService/Summary.dart +++ b/lib/pages/ErService/Summary.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:diplomaticquarterapp/core/enum/Ambulate.dart'; class Summary extends StatefulWidget { final Function changeCurrentTab; @@ -19,23 +20,86 @@ class Summary extends StatefulWidget { class _SummaryState extends State { @override Widget build(BuildContext context) { - return Column( - children: [ - Texts('Summary 4'), - SizedBox(height: 45,), - Container( - padding: EdgeInsets.all(15), - width: double.maxFinite, - height: 76, - child:SecondaryButton( - color: Colors.grey[800], - textColor: Colors.white, - label: 'Next', - - // onTap: ()=> widget.changeCurrentTab(2), - ), - ) - ], + return SingleChildScrollView( + child: Container( + margin: EdgeInsets.only(left: 12, right: 12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts('Summary'), + SizedBox(height: 5,), + Container( + width: double.infinity, + + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(12), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts('Transportation Method',color: Colors.grey,), + Texts('${widget.patientER.patientERTransportationMethod.title}',bold: true,), + SizedBox(height: 8,), + + Texts('Direction',color: Colors.grey,), + Texts('From Hospital',bold: true,), + SizedBox(height: 8,), + + Texts('Pickup Location',color: Colors.grey,), + Texts('SZR Medical Center',bold: true,), + SizedBox(height: 8,), + + Texts('Drop off location',color: Colors.grey,), + Texts('6199, Al Ameen wlfn nif',bold: true,), + SizedBox(height: 8,), + + Texts('Select Ambulate',color: Colors.grey,), + Texts('${widget.patientER.ambulate.getAmbulateTitle(context)}',bold: true,), + SizedBox(height: 8,), + + Texts('Note',color: Colors.grey,), + Texts('${widget.patientER.requesterNote?? '---'}',bold: true,), + SizedBox(height: 8,), + ], + ), + ), + SizedBox(height: 20,), + Texts('Bill Amount',textAlign: TextAlign.start,), + SizedBox(height: 5,), + Container( + height: 55, + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8) + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts('Total amount payable:'), + Texts('SR ${widget.patientER.patientERTransportationMethod.totalPrice}') + ], + ), + ), + + SizedBox(height: 45,), + Container( + padding: EdgeInsets.all(15), + width: double.maxFinite, + height: 76, + child:SecondaryButton( + color: Colors.grey[800], + textColor: Colors.white, + label: 'Next', + + // onTap: ()=> widget.changeCurrentTab(2), + ), + ) + ], + ), + ), ); } } diff --git a/lib/pages/ErService/widgets/AppointmentCard.dart b/lib/pages/ErService/widgets/AppointmentCard.dart new file mode 100644 index 00000000..0437c32f --- /dev/null +++ b/lib/pages/ErService/widgets/AppointmentCard.dart @@ -0,0 +1,47 @@ +import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class AppointmentCard extends StatelessWidget { + final AppoitmentAllHistoryResultList appointment; + + const AppointmentCard({Key key, this.appointment}) : super(key: key); + @override + Widget build(BuildContext context) { + return Container( + width: double.infinity, + margin: EdgeInsets.all(8), + padding: EdgeInsets.all(10), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + ), + child: Row( + children: [ + LargeAvatar( + url: appointment.doctorImageURL, + name: appointment.doctorNameObj, + ), + Expanded( + child: Padding( + padding: const EdgeInsets.all(8.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(appointment.doctorNameObj,bold: true,), + SizedBox(height: 4,), + Texts(appointment.projectName), + Texts(appointment.clinicName), + Texts(DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointment.bookDate))), + ], + ), + ), + ) + ], + ), + ); + } +} diff --git a/lib/pages/ErService/widgets/StepsWidget.dart b/lib/pages/ErService/widgets/StepsWidget.dart index 1e4077cb..c5864710 100644 --- a/lib/pages/ErService/widgets/StepsWidget.dart +++ b/lib/pages/ErService/widgets/StepsWidget.dart @@ -1,6 +1,8 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; +import 'package:provider/provider.dart'; class StepsWidget extends StatelessWidget { final int index; @@ -10,7 +12,8 @@ class StepsWidget extends StatelessWidget { @override Widget build(BuildContext context) { - return Stack( + ProjectViewModel projectViewModel = Provider.of(context); + return projectViewModel.isArabic? Stack( children: [ Container( height: 50, @@ -114,6 +117,110 @@ class StepsWidget extends StatelessWidget { ), ), ], + ):Stack( + children: [ + Container( + height: 50, + width: MediaQuery.of(context).size.width, + color: Colors.transparent, + child: Center( + child: Divider( + color: Colors.grey, + height: 0.75, + thickness: 0.75, + ), + ), + ), + Positioned( + top: 10, + right: 0, + child: InkWell( + onTap: () => changeCurrentTab(0), + child: Container( + width: 35, + height: 35, + decoration: BoxDecoration( + border: index > 0 ? null:Border.all(color: Colors.black,width: 0.75), + shape: BoxShape.circle, + color: index == 0 ? Colors.grey[800] : index > 0 ?Colors.green: Colors.white, + ), + child: Center( + child: Texts( + '1', + color: index == 0 ? Colors.white : index > 0 ?Colors.white: Colors.grey[800], + ), + ), + ), + ), + ), + Positioned( + top: 10, + right: MediaQuery.of(context).size.width * 0.3, + child: InkWell( + onTap: () => index >= 2 ? changeCurrentTab(1) : null, + child: Container( + width: 35, + height: 35, + decoration: BoxDecoration( + border: index > 1 ? null:Border.all(color: Colors.black,width: 0.75), + shape: BoxShape.circle, + color: index == 1 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white, + ), + child: Center( + child: Texts( + '2', + color: index == 1? Colors.white : index > 1 ?Colors.white: Colors.grey[800], + ), + ), + ), + ), + ), + Positioned( + top: 10, + right: MediaQuery.of(context).size.width * 0.6, + child: InkWell( + onTap: () => index >= 3 ? changeCurrentTab(2) : null, + child: Container( + width: 35, + height: 35, + decoration: BoxDecoration( + shape: BoxShape.circle, + border: index > 2 ? null:Border.all(color: Colors.black,width: 0.75), + color: index == 2 ? Colors.grey[800] : index > 1 ?Colors.green: Colors.white, + ), + child: Center( + child: Texts( + '3', + color: index == 2? Colors.white : index > 1 ?Colors.white: Colors.grey[800], + ), + ), + ), + ), + ), + Positioned( + top: 10, + left: 0, + child: InkWell( + onTap: () => index == 2 ?changeCurrentTab(3):null, + child: Container( + width: 35, + height: 35, + decoration: BoxDecoration( + border: Border.all(color: Colors.black,width: 0.75), + + shape: BoxShape.circle, + color: index == 3 ? Colors.grey[800] : Colors.white, + ), + child: Center( + child: Texts( + '4', + color: index == 3 ? Colors.white : Colors.grey[800], + ), + ), + ), + ), + ), + ], ); } } diff --git a/lib/uitl/ProgressDialog.dart b/lib/uitl/ProgressDialog.dart new file mode 100644 index 00000000..728b27dd --- /dev/null +++ b/lib/uitl/ProgressDialog.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class ProgressDialogUtil{ + + static AlertDialog alert = AlertDialog( + content: new Row( + children: [ + CircularProgressIndicator(), + Container(margin: EdgeInsets.only(left: 7),child:Text("Loading..." )), + ],), + ); +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 8bc2c52a..6e9349ab 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -5,7 +5,7 @@ description: A new Flutter application. version: 1.0.0+1 environment: - sdk: ">=2.2.2 <3.0.0" + sdk: ">=2.6.0 <3.0.0" dependencies: flutter: @@ -128,6 +128,10 @@ dependencies: #Handle Geolocation geolocator: ^6.0.0+1 + + #google maps places + google_maps_place_picker: ^0.10.0 + #Dependencies for video call implementation native_device_orientation: ^0.3.0 enum_to_string: ^1.0.9 From 06416b49345000080c8955eca05b79cf2a66baa6 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Sun, 11 Oct 2020 14:32:14 +0300 Subject: [PATCH 5/6] add Not authenticated Page --- assets/images/Wifi-AR.png | Bin 0 -> 18245 bytes assets/images/wifi-EN.png | Bin 0 -> 19261 bytes lib/config/config.dart | 4 +- lib/config/localized_values.dart | 11 +- lib/core/enum/Ambulate.dart | 41 +++- lib/core/enum/OrderService.dart | 22 ++ lib/core/model/er/PickUpRequestPresOrder.dart | 204 ++++++++++++++++++ lib/core/service/client/base_app_client.dart | 4 +- lib/core/service/er/am_service.dart | 49 ++++- lib/core/service/medical/medical_service.dart | 19 ++ lib/core/viewModels/base_view_model.dart | 1 + .../viewModels/er/am_request_view_model.dart | 30 ++- .../viewModels/medical/labs_view_model.dart | 86 ++++---- .../medical/medical_view_model.dart | 19 +- lib/pages/ErService/AmbulanceReq.dart | 21 +- .../AmbulanceRequestIndex.dart | 8 +- .../BillAmount.dart | 19 +- .../PickupLocation.dart | 200 ++++++++++++----- .../SelectTransportationMethod.dart | 23 +- .../Summary.dart | 0 lib/pages/ErService/OrderLogPage.dart | 62 ++++++ lib/pages/base/base_view.dart | 4 +- lib/pages/landing/home_page.dart | 1 + lib/pages/login/confirm-login.dart | 1 + lib/pages/login/forgot-password.dart | 1 + lib/pages/login/login-type.dart | 1 + lib/pages/login/login.dart | 1 + lib/pages/login/register-info.dart | 1 + lib/pages/login/register.dart | 1 + lib/pages/login/welcome.dart | 1 + lib/pages/medical/labs/labs_home_page.dart | 1 + lib/pages/medical/medical_profile_page.dart | 1 + .../radiology/radiology_home_page.dart | 1 + lib/uitl/ProgressDialog.dart | 32 ++- lib/uitl/translations_delegate_base.dart | 4 + lib/widgets/others/OrderLogItem.dart | 32 +++ lib/widgets/others/app_scaffold_widget.dart | 95 ++++---- lib/widgets/others/not_auh_page.dart | 79 +++++++ pubspec.yaml | 3 + 39 files changed, 884 insertions(+), 199 deletions(-) create mode 100644 assets/images/Wifi-AR.png create mode 100644 assets/images/wifi-EN.png create mode 100644 lib/core/enum/OrderService.dart create mode 100644 lib/core/model/er/PickUpRequestPresOrder.dart rename lib/pages/ErService/{ => AmbulanceRequestIndexPages}/AmbulanceRequestIndex.dart (89%) rename lib/pages/ErService/{ => AmbulanceRequestIndexPages}/BillAmount.dart (96%) rename lib/pages/ErService/{ => AmbulanceRequestIndexPages}/PickupLocation.dart (67%) rename lib/pages/ErService/{ => AmbulanceRequestIndexPages}/SelectTransportationMethod.dart (92%) rename lib/pages/ErService/{ => AmbulanceRequestIndexPages}/Summary.dart (100%) create mode 100644 lib/pages/ErService/OrderLogPage.dart create mode 100644 lib/widgets/others/OrderLogItem.dart create mode 100644 lib/widgets/others/not_auh_page.dart diff --git a/assets/images/Wifi-AR.png b/assets/images/Wifi-AR.png new file mode 100644 index 0000000000000000000000000000000000000000..a8e2d9af3fd23ab15c89bc14bb4602cf257c7567 GIT binary patch literal 18245 zcmXV$bx<2^7sUx0q*!n%!HZjQcbDSs))OJy`w{&qg zak79BHMcjl0Ly+iv9eILFfsRZ9I+69fss0pl@L|;SU&Yd`ez`S{64M-1_n}LddYvn zhA#;IEWT0rX@tU5RMO(T>XhQ=U!fD`{>V|3=9;Q1l*m?Q3Ii3D42U{%2QqRy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_8Noj6pR6Mo-<^*QkEsY z1Ozw24(t?JHrG$s<_V`OSI6Ky4#o`MN$qr<>t?Wp7*R?*cZ(bH4m}8*3#sTQ)PycP zbUTCSeSs|BlI3O7{bLaCcuki1vP_d@9rX$&;;`m^5%D}7$2lTPP_OFNJIUBR-!+O$ z`xr2gi>JiRvYaZ*eYQuBL3YCP^2h74Y%0s-I#w56Q=&be>*M7sQzT1l!KBx5;yico z<>)#+DpYL5itQ2)%5u6aSIe?E3ITN<^mymzJ7t+<>)iU2_VGTObV-3VCY}Ez9|`yo$MDjKjmGAvV-x<9e zLRNCk{Xq(U%?qQ+P=S8;$mh4q@6YKN4DP||Jh2EUGb{kbJ|N3q*oeJ+oUGg$+_zx} zc{_B1`da3qP7IAJzAs0LHA!RdY1J`)5uQK0BdVP#McFGQHO^xQYg?`SKvsTP$!1q& zBO9*!%Cem-Tg%Va)W)mikD7NBUDSV%$n|}d^~JGGUZW=(e4oej4aX%G+F(j_AEDmQ z$Y8pSIIJ$jqGi{U8f-7gR!!#%tp-I8^}s;B`dw5{CzzT@#NpD%D-2Vzb}U+ z62_2;@u0t#I;4$43{azKm|XV3lm}-aKXVk9pig_1G~V+);KK>(#lsy!0bPBzy!J79 z?V^s25&;nbMIa#f;Ej$>^IGTUD>1kYfj}S- k2m}IwKp+e|{=WbN0DRXX)M3hnVgLXD07*qoM6N<$f*0@>M*si- literal 0 HcmV?d00001 diff --git a/assets/images/wifi-EN.png b/assets/images/wifi-EN.png new file mode 100644 index 0000000000000000000000000000000000000000..5711925c73665a7cbccd0bba985c4b9acafad527 GIT binary patch literal 19261 zcmYgXRajeX69j_06bQxL-91>5;ts{NxVyW%ySo*NyBBwNcP$PD{(N_TZjvWA$vN-N z?Ci{*2t|2G6vVHH5D*Y3(o*8e;P)8_2*?_ESnwxvyVq^-8=kX-rn8EjnX{XrqbY=l ziJg%tiL{NOxv8?Lp^1mXsHp%1gv_?IxQMFz+JzuOBc+6knq4R*JZhC}Ki5SEa^wg! zyg{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#)>UEBwWB%SOai z!p2Bf^t10W7Zl?nbDmfNniS`xxTg5|O7U{r7T3&VBx~_RoLV{rs|d?T4{$1>`cf_9 z=2FoUdq`sFfN)#?(3LI(vFaclhrm>QO4nd;gBTDTP+SYdR8ALFyo@scu3S>MziadI zjj@&f@!$2$r;K|K>$+GzbFH6mU1Oe!xe9Kc_P$f^yrAI32jn1t8Hvx|QVbMMY$4=z zg<^1XWCAA&$=j)lW~^l{E5|hAcye&0T--bNnN}0)N44@<;L_qcNt7N2>gp`>mXRCH zDz4p&>&?ZrTk%pGIOA2!Qu9R7#s2rCTt8G9p zw6U;gTE$C%SHr8YL?Q$-F`g9G(js*o#a8&M zg~CkvlyDc}U_YY_sUv$CVF!^kKC+)zx<)S0X&^ZcM3O=<+@pelfq{X6fq{X6fq{X6 jfq{X6fnh}9{{> localizedValues = { "All":{"en":"All","ar":"الكل"}, "QuestionHere":{"en":"Enter the question here...","ar":"اضف الاستفسار هنا"}, "ViewDoctorResponses":{"en":"View Doctor Responses","ar":"الاطلاع على ردود الأطباء"}, - + "ServiceInformationButton":{"en":"LOGIN / REGISTER","ar":"دخول / تسجيل"}, + "ServiceInformationTitle":{"en":"Service Information","ar":"معلومات الخدمة"}, + "info-lab": { + "en": "This service allows you to view the results of all laboratory tests performed in Al Habib Medical Group as well as sending the report via e-mail.", + "ar": "خدمة نتائج المختبر: هذه الخدمة تمكنك من الاطلاع على نتائج جميع الفحوصات المخبرية التي تمت في مجموعة الحبيب الطبية." + }, + "info-radiology": { + "en": "This service allows you to view the reports and photos of radiology in Al Habib Medical Group as well as send the report by e-mail.", + "ar": "خدمة الاشعة: هذه الخدمة تمكنك من الاطلاع على تقارير وصور الاشعة التي تمت في مجموعة الحبيب الطبية وكذلك ارسال التقرير عن طريق الايميل." + }, }; diff --git a/lib/core/enum/Ambulate.dart b/lib/core/enum/Ambulate.dart index 059a281c..f8b2e8be 100644 --- a/lib/core/enum/Ambulate.dart +++ b/lib/core/enum/Ambulate.dart @@ -6,22 +6,55 @@ extension SelectedAmbulate on Ambulate { String getAmbulateTitle(BuildContext context) { switch (this) { case Ambulate.Wheelchair: - // TODO: Handle this case. return 'Wheelchair'; break; case Ambulate.Walker: - // TODO: Handle this case. return 'Walker'; break; case Ambulate.Stretcher: - // TODO: Handle this case. return 'Stretcher'; break; case Ambulate.None: - // TODO: Handle this case. return 'None'; break; } return 'None'; } + + int selectAmbulateNumber() { + switch (this) { + case Ambulate.Wheelchair: + return 0; + break; + case Ambulate.Walker: + return 1; + break; + case Ambulate.Stretcher: + return 2; + break; + case Ambulate.None: + return 3; + break; + } + return 3; + } + + Ambulate getAmbulateById(int id) { + switch (id) { + case 0: + return Ambulate.Wheelchair; + break; + case 1: + return Ambulate.Walker; + break; + case 2: + return Ambulate.Stretcher; + break; + case 3: + return Ambulate.None; + break; + } + + return Ambulate.None; + } } diff --git a/lib/core/enum/OrderService.dart b/lib/core/enum/OrderService.dart new file mode 100644 index 00000000..e6ce24eb --- /dev/null +++ b/lib/core/enum/OrderService.dart @@ -0,0 +1,22 @@ +enum OrderService { AMBULANCE } + +extension SelectedOrderService on OrderService { + int getIdOrderService() { + switch (this) { + case OrderService.AMBULANCE: + return 4; + break; + } + return 4; + } + + OrderService getOrderServiceById(int id) { + switch (id) { + case 4: + return OrderService.AMBULANCE; + break; + } + + return OrderService.AMBULANCE; + } +} diff --git a/lib/core/model/er/PickUpRequestPresOrder.dart b/lib/core/model/er/PickUpRequestPresOrder.dart new file mode 100644 index 00000000..9ce3e678 --- /dev/null +++ b/lib/core/model/er/PickUpRequestPresOrder.dart @@ -0,0 +1,204 @@ +class PickUpRequestPresOrder { + int id; + int presOrderID; + String createDate; + String lastEditDate; + int createdBy; + int lastEditBy; + bool isActive; + String requestNo; + int requesterId; + int direction; + bool haveAppointment; + dynamic appointmentId; + int tripType; + int pickupUrgency; + String pickupDateTime; + dynamic pickupLocationId; + int pickupSpot; + dynamic dropoffLocationId; + int transportationMethodId; + int cost; + double vAT; + double totalPrice; + int amountCollected; + int selectedAmbulate; + String requesterNote; + int status; + int paymentStatus; + dynamic rejectReason; + int visibility; + dynamic durationId; + dynamic imageId; + String requesterFileNo; + String requesterMobileNo; + bool requesterIsOutSA; + String pickupLocationLongitude; + String pickupLocationLattitude; + String dropoffLocationLongitude; + String dropoffLocationLattitude; + dynamic appointmentClinicName; + dynamic appointmentDoctorName; + dynamic appointmentBranch; + dynamic appointmentTime; + String pickupLocationName; + String dropoffLocationName; + String title; + String titleAR; + String ambulateDescription; + String ambulateDescriptionN; + + PickUpRequestPresOrder( + {this.id, + this.presOrderID, + this.createDate, + this.lastEditDate, + this.createdBy, + this.lastEditBy, + this.isActive, + this.requestNo, + this.requesterId, + this.direction, + this.haveAppointment, + this.appointmentId, + this.tripType, + this.pickupUrgency, + this.pickupDateTime, + this.pickupLocationId, + this.pickupSpot, + this.dropoffLocationId, + this.transportationMethodId, + this.cost, + this.vAT, + this.totalPrice, + this.amountCollected, + this.selectedAmbulate, + this.requesterNote, + this.status, + this.paymentStatus, + this.rejectReason, + this.visibility, + this.durationId, + this.imageId, + this.requesterFileNo, + this.requesterMobileNo, + this.requesterIsOutSA, + this.pickupLocationLongitude, + this.pickupLocationLattitude, + this.dropoffLocationLongitude, + this.dropoffLocationLattitude, + this.appointmentClinicName, + this.appointmentDoctorName, + this.appointmentBranch, + this.appointmentTime, + this.pickupLocationName, + this.dropoffLocationName, + this.title, + this.titleAR, + this.ambulateDescription, + this.ambulateDescriptionN}); + + PickUpRequestPresOrder.fromJson(Map json) { + id = json['Id']; + presOrderID = json['PresOrderID']; + createDate = json['CreateDate']; + lastEditDate = json['LastEditDate']; + createdBy = json['CreatedBy']; + lastEditBy = json['LastEditBy']; + isActive = json['IsActive']; + requestNo = json['RequestNo']; + requesterId = json['RequesterId']; + direction = json['Direction']; + haveAppointment = json['HaveAppointment']; + appointmentId = json['AppointmentId']; + tripType = json['TripType']; + pickupUrgency = json['PickupUrgency']; + pickupDateTime = json['PickupDateTime']; + pickupLocationId = json['PickupLocationId']; + pickupSpot = json['PickupSpot']; + dropoffLocationId = json['DropoffLocationId']; + transportationMethodId = json['TransportationMethodId']; + cost = json['Cost']; + vAT = json['VAT']; + totalPrice = json['TotalPrice']; + amountCollected = json['AmountCollected']; + selectedAmbulate = json['SelectedAmbulate']; + requesterNote = json['RequesterNote']; + status = json['Status']; + paymentStatus = json['PaymentStatus']; + rejectReason = json['RejectReason']; + visibility = json['Visibility']; + durationId = json['DurationId']; + imageId = json['ImageId']; + requesterFileNo = json['RequesterFileNo']; + requesterMobileNo = json['RequesterMobileNo']; + requesterIsOutSA = json['RequesterIsOutSA']; + pickupLocationLongitude = json['PickupLocationLongitude']; + pickupLocationLattitude = json['PickupLocationLattitude']; + dropoffLocationLongitude = json['DropoffLocationLongitude']; + dropoffLocationLattitude = json['DropoffLocationLattitude']; + appointmentClinicName = json['AppointmentClinicName']; + appointmentDoctorName = json['AppointmentDoctorName']; + appointmentBranch = json['AppointmentBranch']; + appointmentTime = json['AppointmentTime']; + pickupLocationName = json['PickupLocationName']; + dropoffLocationName = json['DropoffLocationName']; + title = json['Title']; + titleAR = json['TitleAR']; + ambulateDescription = json['AmbulateDescription']; + ambulateDescriptionN = json['AmbulateDescriptionN']; + } + + Map toJson() { + final Map data = new Map(); + data['Id'] = this.id; + data['PresOrderID'] = this.presOrderID; + data['CreateDate'] = this.createDate; + data['LastEditDate'] = this.lastEditDate; + data['CreatedBy'] = this.createdBy; + data['LastEditBy'] = this.lastEditBy; + data['IsActive'] = this.isActive; + data['RequestNo'] = this.requestNo; + data['RequesterId'] = this.requesterId; + data['Direction'] = this.direction; + data['HaveAppointment'] = this.haveAppointment; + data['AppointmentId'] = this.appointmentId; + data['TripType'] = this.tripType; + data['PickupUrgency'] = this.pickupUrgency; + data['PickupDateTime'] = this.pickupDateTime; + data['PickupLocationId'] = this.pickupLocationId; + data['PickupSpot'] = this.pickupSpot; + data['DropoffLocationId'] = this.dropoffLocationId; + data['TransportationMethodId'] = this.transportationMethodId; + data['Cost'] = this.cost; + data['VAT'] = this.vAT; + data['TotalPrice'] = this.totalPrice; + data['AmountCollected'] = this.amountCollected; + data['SelectedAmbulate'] = this.selectedAmbulate; + data['RequesterNote'] = this.requesterNote; + data['Status'] = this.status; + data['PaymentStatus'] = this.paymentStatus; + data['RejectReason'] = this.rejectReason; + data['Visibility'] = this.visibility; + data['DurationId'] = this.durationId; + data['ImageId'] = this.imageId; + data['RequesterFileNo'] = this.requesterFileNo; + data['RequesterMobileNo'] = this.requesterMobileNo; + data['RequesterIsOutSA'] = this.requesterIsOutSA; + data['PickupLocationLongitude'] = this.pickupLocationLongitude; + data['PickupLocationLattitude'] = this.pickupLocationLattitude; + data['DropoffLocationLongitude'] = this.dropoffLocationLongitude; + data['DropoffLocationLattitude'] = this.dropoffLocationLattitude; + data['AppointmentClinicName'] = this.appointmentClinicName; + data['AppointmentDoctorName'] = this.appointmentDoctorName; + data['AppointmentBranch'] = this.appointmentBranch; + data['AppointmentTime'] = this.appointmentTime; + data['PickupLocationName'] = this.pickupLocationName; + data['DropoffLocationName'] = this.dropoffLocationName; + data['Title'] = this.title; + data['TitleAR'] = this.titleAR; + data['AmbulateDescription'] = this.ambulateDescription; + data['AmbulateDescriptionN'] = this.ambulateDescriptionN; + return data; + } +} diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index f5494049..4ad8de79 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -15,7 +15,7 @@ AppSharedPreferences sharedPref = new AppSharedPreferences(); ///await BaseAppClient.post('', /// onSuccess: (dynamic response, int statusCode) {}, /// onFailure: (String error, int statusCode) {}, -/// body: null); +/// body: Map(); class BaseAppClient { post(String endPoint, @@ -78,7 +78,7 @@ class BaseAppClient { print("URL : $url"); print("Body : ${json.encode(body)}"); - var asd=""; + if (await Utils.checkConnection()) { final response = await http.post(url.trim(), body: json.encode(body), diff --git a/lib/core/service/er/am_service.dart b/lib/core/service/er/am_service.dart index b6a91871..b654e0eb 100644 --- a/lib/core/service/er/am_service.dart +++ b/lib/core/service/er/am_service.dart @@ -1,23 +1,30 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; +import 'package:diplomaticquarterapp/core/model/er/PickUpRequestPresOrder.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import '../base_service.dart'; class AmService extends BaseService { List amModelList = List(); List patientAllPresOrdersList = List(); + bool hasPendingOrder = false; + int pendingOrderID = 0; + String pendingOrderStatus = ""; + String pendingOrderStatusAR = ""; + PickUpRequestPresOrder pickUpRequestPresOrder; Future getAllTransportationOrders() async { hasError = false; Map body = Map(); - body['isDentalAllowedBackend']= false; + body['isDentalAllowedBackend'] = false; body['IdentificationNo'] = user.patientIdentificationNo; await baseAppClient.post(GET_AMBULANCE_REQUEST, onSuccess: (dynamic response, int statusCode) { - amModelList.clear(); - response['PatientER_RRT_GetAllTransportationMethodList'].forEach((vital) { - amModelList.add(PatientERTransportationMethod.fromJson(vital)); + amModelList.clear(); + response['PatientER_RRT_GetAllTransportationMethodList'].forEach((item) { + amModelList.add(PatientERTransportationMethod.fromJson(item)); }); }, onFailure: (String error, int statusCode) { hasError = true; @@ -27,11 +34,39 @@ class AmService extends BaseService { Future getPatientAllPresOrdersList() async { hasError = false; + hasPendingOrder = false; await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS, onSuccess: (dynamic response, int statusCode) { - patientAllPresOrdersList.clear(); - response['PatientER_GetPatientAllPresOrdersList'].forEach((vital) { - patientAllPresOrdersList.add(PatientAllPresOrders.fromJson(vital)); + patientAllPresOrdersList.clear(); + response['PatientER_GetPatientAllPresOrdersList'].forEach((item) { + if (item['ServiceID'] == OrderService.AMBULANCE.getIdOrderService()) { + var order = PatientAllPresOrders.fromJson(item); + patientAllPresOrdersList.add(order); + if (order.status == 1) { + hasPendingOrder = true; + pendingOrderID = order.iD; + pendingOrderStatus = order.description; + pendingOrderStatusAR = order.descriptionN; + } + } + }); + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: Map()); + } + + Future getOrderDetails() async { + hasError = false; + hasPendingOrder = false; + Map body = Map(); + body['PresOrderID'] = pendingOrderID; + await baseAppClient.post(GET_PICK_UP_REQUEST_BY_PRES_ORDER_ID, + onSuccess: (dynamic response, int statusCode) { + patientAllPresOrdersList.clear(); + response['PatientER_RRT_GetPickUpRequestByPresOrderIDList'] + .forEach((item) { + pickUpRequestPresOrder = PickUpRequestPresOrder.fromJson(item); }); }, onFailure: (String error, int statusCode) { hasError = true; diff --git a/lib/core/service/medical/medical_service.dart b/lib/core/service/medical/medical_service.dart index 572e5096..f90280cf 100644 --- a/lib/core/service/medical/medical_service.dart +++ b/lib/core/service/medical/medical_service.dart @@ -1,6 +1,8 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:flutter/cupertino.dart'; class MedicalService extends BaseService { List appoitmentAllHistoryResultList = List(); @@ -26,4 +28,21 @@ class MedicalService extends BaseService { super.error = error; }, body: body); } + + addAmbulanceRequest({@required PatientER patientER}) async { + hasError = false; + super.error = ""; + Map body = Map(); + body['RequesterFileNo'] = user.patientID; + body['RequesterMobileNo'] = user.mobileNumber; + body['RequesterIsOutSA'] = user.outSA; + await baseAppClient.post(GET_PATIENT_APPOINTMENT_HISTORY, + onSuccess: (response, statusCode) async { + + + }, onFailure: (String error, int statusCode) { + hasError = true; + super.error = error; + }, body: body); + } } diff --git a/lib/core/viewModels/base_view_model.dart b/lib/core/viewModels/base_view_model.dart index 7e16d22d..18ab02e3 100644 --- a/lib/core/viewModels/base_view_model.dart +++ b/lib/core/viewModels/base_view_model.dart @@ -18,6 +18,7 @@ class BaseViewModel extends ChangeNotifier { AuthenticatedUser user; AppSharedPreferences sharedPref = AppSharedPreferences(); + AuthenticatedUserObject authenticatedUserObject = locator(); void setState(ViewState viewState) { _state = viewState; diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart index a5261456..fbd3d95d 100644 --- a/lib/core/viewModels/er/am_request_view_model.dart +++ b/lib/core/viewModels/er/am_request_view_model.dart @@ -1,6 +1,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/service/er/am_service.dart'; import 'package:diplomaticquarterapp/core/service/hospital_service.dart'; import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart'; @@ -14,17 +15,22 @@ class AmRequestViewModel extends BaseViewModel { HospitalService _hospitalService = locator(); MedicalService _medicalService = locator(); - List - get amRequestModeList => _amService.amModelList; + List get amRequestModeList => + _amService.amModelList; - List get patientAllPresOrdersList =>_amService.patientAllPresOrdersList; + List get patientAllPresOrdersList => + _amService.patientAllPresOrdersList; List get appoitmentAllHistoryResultList => _medicalService.appoitmentAllHistoryResultList; + List get hospitals => _hospitalService.hospitals; + + bool get hasPendingOrder =>_amService.hasPendingOrder; + Future getAppointmentHistory() async { setState(ViewState.BusyLocal); - await _medicalService.getAppointmentHistory(isActiveAppointment: true); + await _medicalService.getAppointmentHistory(isActiveAppointment: true); if (_medicalService.hasError) { error = _medicalService.error; setState(ViewState.ErrorLocal); @@ -32,8 +38,6 @@ class AmRequestViewModel extends BaseViewModel { setState(ViewState.Idle); } - - Future getAmRequestOrders() async { setState(ViewState.Busy); await _amService.getAllTransportationOrders(); @@ -54,9 +58,21 @@ class AmRequestViewModel extends BaseViewModel { getPatientAllPresOrdersList(); } - Future getPatientAllPresOrdersList()async{ + Future getPatientAllPresOrdersList() async { setState(ViewState.Busy); await _amService.getPatientAllPresOrdersList(); + if (_hospitalService.hasError) { + error = _hospitalService.error; + setState(ViewState.Error); + } else if (_amService.hasPendingOrder) { + getOrderDetails(); + } else + setState(ViewState.Idle); + } + + Future getOrderDetails() async { + setState(ViewState.Busy); + await _amService.getOrderDetails(); if (_hospitalService.hasError) { error = _hospitalService.error; setState(ViewState.Error); diff --git a/lib/core/viewModels/medical/labs_view_model.dart b/lib/core/viewModels/medical/labs_view_model.dart index 032aeb1e..8cbf0efc 100644 --- a/lib/core/viewModels/medical/labs_view_model.dart +++ b/lib/core/viewModels/medical/labs_view_model.dart @@ -21,52 +21,54 @@ class LabsViewModel extends BaseViewModel { : _patientLabOrdersListHospital; void getLabs() async { - setState(ViewState.Busy); - await _labsService.getPatientLabOrdersList(); - if (_labsService.hasError) { - error = _labsService.error; - setState(ViewState.Error); - } else { - _labsService.patientLabOrdersList.forEach((element) { - List patientLabOrdersClinic = - _patientLabOrdersListClinic - .where((elementClinic) => - elementClinic.filterName == element.clinicDescription) - .toList(); + if (authenticatedUserObject.isLogin) { + setState(ViewState.Busy); + await _labsService.getPatientLabOrdersList(); + if (_labsService.hasError) { + error = _labsService.error; + setState(ViewState.Error); + } else { + _labsService.patientLabOrdersList.forEach((element) { + List patientLabOrdersClinic = + _patientLabOrdersListClinic + .where((elementClinic) => + elementClinic.filterName == element.clinicDescription) + .toList(); - if (patientLabOrdersClinic.length != 0) { - _patientLabOrdersListClinic[_patientLabOrdersListClinic - .indexOf(patientLabOrdersClinic[0])] - .patientLabOrdersList - .add(element); - } else { - _patientLabOrdersListClinic.add(PatientLabOrdersList( - filterName: element.clinicDescription, - patientDoctorAppointment: element)); - } + if (patientLabOrdersClinic.length != 0) { + _patientLabOrdersListClinic[_patientLabOrdersListClinic + .indexOf(patientLabOrdersClinic[0])] + .patientLabOrdersList + .add(element); + } else { + _patientLabOrdersListClinic.add(PatientLabOrdersList( + filterName: element.clinicDescription, + patientDoctorAppointment: element)); + } - // doctor list sort via project - List patientLabOrdersHospital = - _patientLabOrdersListHospital - .where( - (elementClinic) => - elementClinic.filterName == element.projectName, - ) - .toList(); + // doctor list sort via project + List patientLabOrdersHospital = + _patientLabOrdersListHospital + .where( + (elementClinic) => + elementClinic.filterName == element.projectName, + ) + .toList(); - if (patientLabOrdersHospital.length != 0) { - _patientLabOrdersListHospital[_patientLabOrdersListHospital - .indexOf(patientLabOrdersHospital[0])] - .patientLabOrdersList - .add(element); - } else { - _patientLabOrdersListHospital.add(PatientLabOrdersList( - filterName: element.projectName, - patientDoctorAppointment: element)); - } - }); + if (patientLabOrdersHospital.length != 0) { + _patientLabOrdersListHospital[_patientLabOrdersListHospital + .indexOf(patientLabOrdersHospital[0])] + .patientLabOrdersList + .add(element); + } else { + _patientLabOrdersListHospital.add(PatientLabOrdersList( + filterName: element.projectName, + patientDoctorAppointment: element)); + } + }); - setState(ViewState.Idle); + setState(ViewState.Idle); + } } } diff --git a/lib/core/viewModels/medical/medical_view_model.dart b/lib/core/viewModels/medical/medical_view_model.dart index fa330aad..4563f615 100644 --- a/lib/core/viewModels/medical/medical_view_model.dart +++ b/lib/core/viewModels/medical/medical_view_model.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/medical/medical_service.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; @@ -11,13 +12,15 @@ class MedicalViewModel extends BaseViewModel { _medicalService.appoitmentAllHistoryResultList; getAppointmentHistory() async { - setState(ViewState.Busy); - if (_medicalService.appoitmentAllHistoryResultList.length == 0) - await _medicalService.getAppointmentHistory(); - if (_medicalService.hasError) { - error = _medicalService.error; - setState(ViewState.Error); - } else - setState(ViewState.Idle); + if (authenticatedUserObject.isLogin) { + setState(ViewState.Busy); + if (_medicalService.appoitmentAllHistoryResultList.length == 0) + await _medicalService.getAppointmentHistory(); + if (_medicalService.hasError) { + error = _medicalService.error; + setState(ViewState.Error); + } else + setState(ViewState.Idle); + } } } diff --git a/lib/pages/ErService/AmbulanceReq.dart b/lib/pages/ErService/AmbulanceReq.dart index c50093be..ec96f482 100644 --- a/lib/pages/ErService/AmbulanceReq.dart +++ b/lib/pages/ErService/AmbulanceReq.dart @@ -10,7 +10,8 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; -import 'AmbulanceRequestIndex.dart'; +import 'AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart'; +import 'OrderLogPage.dart'; class AmbulanceReq extends StatefulWidget { @override @@ -26,11 +27,13 @@ class _AmbulanceReqState extends State super.initState(); _tabController = TabController(length: 2, vsync: this); } + @override void dispose() { super.dispose(); _tabController.dispose(); } + @override Widget build(BuildContext context) { return BaseView( @@ -80,13 +83,14 @@ class _AmbulanceReqState extends State indicatorColor: Colors.red[800], labelColor: Theme.of(context).primaryColor, labelPadding: - EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), + EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( width: MediaQuery.of(context).size.width * 0.40, child: Center( - child: Texts("Ambulance Request"),//TranslationBase.of(context).prescriptions + child: Texts( + "Ambulance Request"), //TranslationBase.of(context).prescriptions ), ), Container( @@ -110,8 +114,14 @@ class _AmbulanceReqState extends State physics: BouncingScrollPhysics(), controller: _tabController, children: [ - AmbulanceRequestIndex(amRequestViewModel: model,), - Container() + model.hasPendingOrder + ? Container() + : AmbulanceRequestIndexPage( + amRequestViewModel: model, + ), + OrderLogPage( + amRequestViewModel: model, + ) ], ), ) @@ -121,5 +131,4 @@ class _AmbulanceReqState extends State ), ); } - } diff --git a/lib/pages/ErService/AmbulanceRequestIndex.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart similarity index 89% rename from lib/pages/ErService/AmbulanceRequestIndex.dart rename to lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart index 16d07b88..55e75e22 100644 --- a/lib/pages/ErService/AmbulanceRequestIndex.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart @@ -9,16 +9,16 @@ import 'PickupLocation.dart'; import 'SelectTransportationMethod.dart'; import 'Summary.dart'; -class AmbulanceRequestIndex extends StatefulWidget { +class AmbulanceRequestIndexPage extends StatefulWidget { final AmRequestViewModel amRequestViewModel; - AmbulanceRequestIndex({Key key, this.amRequestViewModel}); + AmbulanceRequestIndexPage({Key key, this.amRequestViewModel}); @override - _AmbulanceRequestIndexState createState() => _AmbulanceRequestIndexState(); + _AmbulanceRequestIndexPageState createState() => _AmbulanceRequestIndexPageState(); } -class _AmbulanceRequestIndexState extends State { +class _AmbulanceRequestIndexPageState extends State { int currentIndex = 0; PageController pageController; PatientER _patientER = PatientER(); diff --git a/lib/pages/ErService/BillAmount.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart similarity index 96% rename from lib/pages/ErService/BillAmount.dart rename to lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart index 44e17c3a..cc6af0f2 100644 --- a/lib/pages/ErService/BillAmount.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/BillAmount.dart @@ -26,6 +26,22 @@ class BillAmount extends StatefulWidget { class _BillAmountState extends State { Ambulate _ambulate = Ambulate.None; String note =""; + + + @override + void initState() { + + if(widget.patientER.ambulate!=null) + { + setState(() { + _ambulate = widget.patientER.ambulate; + note = widget.patientER.requesterNote; + }); + } + super.initState(); + } + + @override Widget build(BuildContext context) { return SingleChildScrollView( @@ -278,7 +294,7 @@ class _BillAmountState extends State { color: Colors.white, ), child: ListTile( - title: Text('Walker'), + title: Text('None'), leading: Radio( value: Ambulate.None, groupValue: _ambulate, @@ -320,6 +336,7 @@ class _BillAmountState extends State { setState(() { widget.patientER.ambulate = _ambulate; widget.patientER.requesterNote = note; + widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber(); widget.changeCurrentTab(3); }); }, diff --git a/lib/pages/ErService/PickupLocation.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart similarity index 67% rename from lib/pages/ErService/PickupLocation.dart rename to lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart index 4b32c9bb..795f4dcc 100644 --- a/lib/pages/ErService/PickupLocation.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/PickupLocation.dart @@ -1,9 +1,12 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; +import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; +import 'package:diplomaticquarterapp/pages/Blood/dialogs/SelectHospitalDialog.dart'; import 'package:diplomaticquarterapp/pages/ErService/widgets/AppointmentCard.dart'; import 'package:diplomaticquarterapp/pages/landing/home_page.dart'; +import 'package:diplomaticquarterapp/uitl/ProgressDialog.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; @@ -15,8 +18,8 @@ import 'package:geolocator/geolocator.dart'; import 'package:google_maps_place_picker/google_maps_place_picker.dart'; import 'package:google_maps_flutter/google_maps_flutter.dart'; -import 'AmbulanceReq.dart'; -import 'AvailableAppointmentsPage.dart'; +import '../AmbulanceReq.dart'; +import '../AvailableAppointmentsPage.dart'; enum HaveAppointment { YES, NO } @@ -41,6 +44,8 @@ class _PickupLocationState extends State { double _latitude; double _longitude; AppoitmentAllHistoryResultList myAppointment; + HospitalsModel _selectedHospital; + PickResult _result; @override void initState() { @@ -142,7 +147,7 @@ class _PickupLocationState extends State { Expanded( child: InkWell( onTap: () { - if(myAppointment == null) { + if (myAppointment == null) { getAppointment(); setState(() { _haveAppointment = HaveAppointment.YES; @@ -164,13 +169,12 @@ class _PickupLocationState extends State { groupValue: _haveAppointment, activeColor: Colors.red[800], onChanged: (value) { - if(myAppointment == null) { + if (myAppointment == null) { getAppointment(); setState(() { _haveAppointment = value; }); } - }, ), ), @@ -212,18 +216,18 @@ class _PickupLocationState extends State { ), ], ), - - if(myAppointment!=null) + if (myAppointment != null) Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ SizedBox( height: 12, ), - AppointmentCard(appointment: myAppointment,) + AppointmentCard( + appointment: myAppointment, + ) ], ), - SizedBox( height: 12, ), @@ -231,29 +235,35 @@ class _PickupLocationState extends State { SizedBox( height: 8, ), - Container( - padding: EdgeInsets.all(12), - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.grey, width: 0.5), - color: Colors.white, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Texts('Pickup Location'), - Icon( - Icons.arrow_drop_down, - size: 24, - color: Colors.black, - ) - ], + InkWell( + onTap: () { + confirmSelectHospitalDialog( + widget.amRequestViewModel.hospitals); + }, + child: Container( + padding: EdgeInsets.all(12), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(getHospitalName('Pickup Location')), + Icon( + Icons.arrow_drop_down, + size: 24, + color: Colors.black, + ) + ], + ), ), ), ], ), - if (widget.patientER.direction == 2) + if (widget.patientER.direction == 1) Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -261,6 +271,39 @@ class _PickupLocationState extends State { SizedBox( height: 15, ), + InkWell( + onTap: () { + confirmSelectHospitalDialog( + widget.amRequestViewModel.hospitals); + }, + child: Container( + padding: EdgeInsets.all(12), + decoration: BoxDecoration( + shape: BoxShape.rectangle, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: Colors.grey, width: 0.5), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Texts(getHospitalName('Pickup Location')), + Icon( + Icons.arrow_drop_down, + size: 24, + color: Colors.black, + ) + ], + ), + ), + ), + SizedBox( + height: 12, + ), + Texts('Drop off Location'), + SizedBox( + height: 8, + ), InkWell( onTap: () { Navigator.push( @@ -271,6 +314,9 @@ class _PickupLocationState extends State { // Put YOUR OWN KEY here. onPlacePicked: (PickResult result) { print(result.adrAddress); + setState(() { + _result = result; + }); Navigator.of(context).pop(); }, initialPosition: LatLng(_latitude, _longitude), @@ -290,9 +336,9 @@ class _PickupLocationState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - Texts('Pickup Location'), + Texts('Select From Map'), Icon( - Icons.arrow_drop_down, + FontAwesomeIcons.mapMarkerAlt, size: 24, color: Colors.black, ) @@ -300,33 +346,6 @@ class _PickupLocationState extends State { ), ), ), - SizedBox( - height: 12, - ), - Texts('Drop off Location'), - SizedBox( - height: 8, - ), - Container( - padding: EdgeInsets.all(12), - decoration: BoxDecoration( - shape: BoxShape.rectangle, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: Colors.grey, width: 0.5), - color: Colors.white, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Texts('Select From Map'), - Icon( - FontAwesomeIcons.mapMarkerAlt, - size: 24, - color: Colors.black, - ) - ], - ), - ), ], ), //TODO show dialog projects @@ -342,7 +361,41 @@ class _PickupLocationState extends State { color: Colors.grey[800], textColor: Colors.white, onTap: () { + if(_result==null || _selectedHospital == null) + AppToast.showErrorToast(message: 'please select all fields'); + else setState(() { + widget.patientER.pickupSpot = _isInsideHome ? 1 : 0; + if (widget.patientER.direction == 0) { + widget.patientER.pickupLocationLattitude = _result.geometry.location.lat.toString(); + widget.patientER.pickupLocationLongitude = _result.geometry.location.lng.toString(); + widget.patientER.dropoffLocationLattitude = _selectedHospital.latitude; + widget.patientER.dropoffLocationLongitude = _selectedHospital.longitude; + + } else { + widget.patientER.pickupLocationLattitude = _selectedHospital.latitude; + widget.patientER.pickupLocationLongitude = _selectedHospital.longitude; + widget.patientER.dropoffLocationLattitude = _result.geometry.location.lat.toString(); + widget.patientER.dropoffLocationLongitude = _result.geometry.location.lng.toString(); + } + + widget.patientER.latitude = widget.patientER.pickupLocationLattitude; + widget.patientER.longitude = widget.patientER.pickupLocationLongitude; + + if(_haveAppointment == HaveAppointment.YES){ + widget.patientER.appointmentNo = myAppointment.appointmentNo.toString(); + widget.patientER.appointmentClinicName = myAppointment.clinicName; + widget.patientER.appointmentDoctorName = myAppointment.doctorNameObj; + widget.patientER.appointmentBranch = myAppointment.projectName; + widget.patientER.appointmentTime = myAppointment.appointmentDate; + }else{ + widget.patientER.appointmentNo ="0"; + widget.patientER.appointmentClinicName = null; + widget.patientER.appointmentDoctorName = null; + widget.patientER.appointmentBranch = null; + widget.patientER.appointmentTime = null; + } + widget.patientER.pickupSpot = _isInsideHome ? 1 : 0; widget.changeCurrentTab(2); }); @@ -356,12 +409,35 @@ class _PickupLocationState extends State { ); } + void confirmSelectHospitalDialog(List hospitals) { + showDialog( + context: context, + child: SelectHospitalDialog( + hospitals: hospitals, + selectedHospital: _selectedHospital, + onValueSelected: (value) { + setState(() { + _selectedHospital = value; + }); + }, + ), + ); + } + + String getHospitalName(String title) { + return _selectedHospital == null ? title : _selectedHospital.name; + } + getAppointment() { + ProgressDialogUtil.showProgressDialog(context); widget.amRequestViewModel.getAppointmentHistory().then((value) { if (widget.amRequestViewModel.state == ViewState.Error || widget.amRequestViewModel.state == ViewState.ErrorLocal) { AppToast.showErrorToast(message: widget.amRequestViewModel.error); - } else if (widget.amRequestViewModel.appoitmentAllHistoryResultList.length > 0) { + } else if (widget + .amRequestViewModel.appoitmentAllHistoryResultList.length > + 0) { + ProgressDialogUtil.hideProgressDialog(context); Navigator.push( context, MaterialPageRoute( @@ -375,17 +451,23 @@ class _PickupLocationState extends State { setState(() { myAppointment = value; }); - else + else { + ProgressDialogUtil.hideProgressDialog(context); setState(() { _haveAppointment = HaveAppointment.NO; }); + } }); } else { + ProgressDialogUtil.hideProgressDialog(context); setState(() { _haveAppointment = HaveAppointment.NO; }); AppToast.showErrorToast(message: 'You don\'t have any appointment'); } + }).catchError((e) { + ProgressDialogUtil.hideProgressDialog(context); + AppToast.showErrorToast(message: e); }); } } diff --git a/lib/pages/ErService/SelectTransportationMethod.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart similarity index 92% rename from lib/pages/ErService/SelectTransportationMethod.dart rename to lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart index 261b9f83..436aabe8 100644 --- a/lib/pages/ErService/SelectTransportationMethod.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/enum/OrderService.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; @@ -32,11 +33,13 @@ class _SelectTransportationMethodState Direction _direction = Direction.FromHospital; Way _way = Way.OneWay; + OrderService _orderService = OrderService.AMBULANCE; + @override void initState() { super.initState(); if (widget.patientER.direction != null) { - _direction = widget.patientER.direction == 1 + _direction = widget.patientER.direction == 0 ? Direction.ToHospital : Direction.FromHospital; _way = widget.patientER.tripType == 1 ? Way.OneWay : Way.TwoWays; @@ -278,15 +281,17 @@ class _SelectTransportationMethodState textColor: Colors.white, onTap: () { setState(() { - widget.patientER.direction = - _direction == Direction.ToHospital ? 1 : 2; + widget.patientER.direction = _direction == Direction.ToHospital ? 0 : 1; widget.patientER.tripType = _way == Way.TwoWays ? 2 : 1; - widget.patientER.selectedAmbulate = (widget - .amRequestViewModel.amRequestModeList - .indexOf(_erTransportationMethod) + - 1); - widget.patientER.patientERTransportationMethod = - _erTransportationMethod; + widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); + widget.patientER.patientERTransportationMethod = _erTransportationMethod; + widget.patientER.orderServiceID = _orderService.getIdOrderService(); + widget.patientER.pickupUrgency = 1; + widget.patientER.lineItemNo = 1; + widget.patientER.cost = _erTransportationMethod.price; + widget.patientER.vAT = _erTransportationMethod.vAT ?? 0; + widget.patientER.totalPrice = _erTransportationMethod.totalPrice; + widget.changeCurrentTab(1); }); }, diff --git a/lib/pages/ErService/Summary.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart similarity index 100% rename from lib/pages/ErService/Summary.dart rename to lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart diff --git a/lib/pages/ErService/OrderLogPage.dart b/lib/pages/ErService/OrderLogPage.dart new file mode 100644 index 00000000..cbb508e5 --- /dev/null +++ b/lib/pages/ErService/OrderLogPage.dart @@ -0,0 +1,62 @@ +import 'package:diplomaticquarterapp/core/model/er/PatientAllPresOrders.dart'; +import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; +import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/OrderLogItem.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class OrderLogPage extends StatelessWidget { + final AmRequestViewModel amRequestViewModel; + + OrderLogPage({Key key, @required this.amRequestViewModel}); + + @override + Widget build(BuildContext context) { + return Container( + margin: EdgeInsets.all(10), + padding: EdgeInsets.all(8), + child: ListView.builder( + itemCount: amRequestViewModel.patientAllPresOrdersList.length, + itemBuilder: (context, index) => Container( + margin: EdgeInsets.all(8), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(2), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + OrderLogItem( + title: 'Request ID', + value: amRequestViewModel.patientAllPresOrdersList[index].iD + .toString(), + ), + OrderLogItem( + title: 'Status', + value: amRequestViewModel + .patientAllPresOrdersList[index].description, + ), + OrderLogItem( + title: 'Pickup Date', + value: DateUtil.getDayMonthYearDateFormatted( + DateUtil.convertStringToDate(amRequestViewModel + .patientAllPresOrdersList[index].createdOn)), + ), + OrderLogItem( + title: 'Pickup Location', + value: amRequestViewModel + .patientAllPresOrdersList[index].pickupLocationName, + ), + OrderLogItem( + title: 'Drop off Location', + value: amRequestViewModel + .patientAllPresOrdersList[index].dropoffLocationName, + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/pages/base/base_view.dart b/lib/pages/base/base_view.dart index 6014b6c3..f5311aae 100644 --- a/lib/pages/base/base_view.dart +++ b/lib/pages/base/base_view.dart @@ -1,3 +1,4 @@ +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; @@ -19,10 +20,11 @@ class BaseView extends StatefulWidget { class _BaseViewState extends State> { T model = locator(); + AuthenticatedUserObject authenticatedUserObject = locator(); @override void initState() { - if (widget.onModelReady != null) { + if (widget.onModelReady != null && authenticatedUserObject.isLogin) { widget.onModelReady(model); } super.initState(); diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index b811ef8f..b20648e2 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -34,6 +34,7 @@ class _HomePageState extends State { return BaseView( onModelReady: (model) => model.getPatientRadOrders(), builder: (_, model, wi) => AppScaffold( + isShowDecPage: false, body: Container( width: double.infinity, child: SingleChildScrollView( diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index ac36c7d6..52afe85f 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -74,6 +74,7 @@ class _ConfirmLogin extends State { return AppScaffold( appBarTitle: TranslationBase.of(context).confirm, isShowAppBar: true, + isShowDecPage: false, body: isLoading == false ? SingleChildScrollView( child: Container( diff --git a/lib/pages/login/forgot-password.dart b/lib/pages/login/forgot-password.dart index c1fa7b18..bbdbb1ae 100644 --- a/lib/pages/login/forgot-password.dart +++ b/lib/pages/login/forgot-password.dart @@ -21,6 +21,7 @@ class _ForgotPassword extends State { return AppScaffold( appBarTitle: TranslationBase.of(context).forgotPassword, isShowAppBar: true, + isShowDecPage: false, body: SingleChildScrollView( child: Container( padding: EdgeInsets.only(top: 10, left: 20, right: 20), diff --git a/lib/pages/login/login-type.dart b/lib/pages/login/login-type.dart index 7a8a940d..d1ac54bb 100644 --- a/lib/pages/login/login-type.dart +++ b/lib/pages/login/login-type.dart @@ -16,6 +16,7 @@ class LoginType extends StatelessWidget { return AppScaffold( appBarTitle: TranslationBase.of(context).welcome, isShowAppBar: true, + isShowDecPage: false, body: Padding( padding: EdgeInsets.all(20), child: Column( diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index c1f04a71..22178444 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -57,6 +57,7 @@ class _Login extends State { return AppScaffold( appBarTitle: TranslationBase.of(context).login, isShowAppBar: true, + isShowDecPage: false, body: isLoading == true ? AppCircularProgressIndicator() : SingleChildScrollView( diff --git a/lib/pages/login/register-info.dart b/lib/pages/login/register-info.dart index 70e5fb29..e94c1af6 100644 --- a/lib/pages/login/register-info.dart +++ b/lib/pages/login/register-info.dart @@ -39,6 +39,7 @@ class _RegisterInfo extends State { return AppScaffold( appBarTitle: TranslationBase.of(context).register, isShowAppBar: true, + isShowDecPage: false, body: SingleChildScrollView( child: Container( padding: EdgeInsets.only(top: 10, left: 20, right: 20, bottom: 30), diff --git a/lib/pages/login/register.dart b/lib/pages/login/register.dart index 3706f452..3ee13a4c 100644 --- a/lib/pages/login/register.dart +++ b/lib/pages/login/register.dart @@ -45,6 +45,7 @@ class _Register extends State { return AppScaffold( appBarTitle: TranslationBase.of(context).register, isShowAppBar: true, + isShowDecPage: false, body: isLoading == true ? AppCircularProgressIndicator() : SingleChildScrollView( diff --git a/lib/pages/login/welcome.dart b/lib/pages/login/welcome.dart index b4b05900..90bc2a2c 100644 --- a/lib/pages/login/welcome.dart +++ b/lib/pages/login/welcome.dart @@ -28,6 +28,7 @@ class _WelcomeLogin extends State { Widget build(BuildContext context) { return AppScaffold( appBarTitle: TranslationBase.of(context).welcome, + isShowDecPage: false, isShowAppBar: true, body: Padding( padding: EdgeInsets.all(20), diff --git a/lib/pages/medical/labs/labs_home_page.dart b/lib/pages/medical/labs/labs_home_page.dart index 325d5dcd..995365d9 100644 --- a/lib/pages/medical/labs/labs_home_page.dart +++ b/lib/pages/medical/labs/labs_home_page.dart @@ -20,6 +20,7 @@ class LabsHomePage extends StatelessWidget { builder: (context, LabsViewModel model, widget) => AppScaffold( baseViewModel: model, isShowAppBar: true, + description: TranslationBase.of(context).infoLab, appBarTitle: TranslationBase.of(context).labOrders, body: SingleChildScrollView( physics: BouncingScrollPhysics(), diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index d2b9a9ea..2c5a6fb2 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -48,6 +48,7 @@ class _MedicalProfilePageState extends State { return BaseView( onModelReady: (model) => model.getAppointmentHistory(), builder: (_, model, widget) => AppScaffold( + isShowDecPage: false, baseViewModel: model, body: Container( child: SingleChildScrollView( diff --git a/lib/pages/medical/radiology/radiology_home_page.dart b/lib/pages/medical/radiology/radiology_home_page.dart index 0f9f4c7b..995ac485 100644 --- a/lib/pages/medical/radiology/radiology_home_page.dart +++ b/lib/pages/medical/radiology/radiology_home_page.dart @@ -20,6 +20,7 @@ class RadiologyHomePage extends StatelessWidget { isShowAppBar: true, appBarTitle: TranslationBase.of(context).radiology, baseViewModel: model, + description: TranslationBase.of(context).infoRadiology, body: FractionallySizedBox( widthFactor: 1.0, child: ListView( diff --git a/lib/uitl/ProgressDialog.dart b/lib/uitl/ProgressDialog.dart index 728b27dd..6820a6d5 100644 --- a/lib/uitl/ProgressDialog.dart +++ b/lib/uitl/ProgressDialog.dart @@ -1,12 +1,26 @@ import 'package:flutter/material.dart'; -class ProgressDialogUtil{ +AlertDialog _alert = AlertDialog( + content: Row( + children: [ + CircularProgressIndicator(), + Container(margin: EdgeInsets.only(left: 7), child: Text("Loading...")), + ], + ), +); - static AlertDialog alert = AlertDialog( - content: new Row( - children: [ - CircularProgressIndicator(), - Container(margin: EdgeInsets.only(left: 7),child:Text("Loading..." )), - ],), - ); -} \ No newline at end of file +class ProgressDialogUtil { + static showProgressDialog(BuildContext context) { + showDialog( + barrierDismissible: false, + context: context, + builder: (BuildContext context) { + return _alert; + }, + ); + } + + static hideProgressDialog(BuildContext context) { + Navigator.pop(context); + } +} diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 28b273e5..493bc327 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -589,6 +589,10 @@ class TranslationBase { String get all => localizedValues['All'][locale.languageCode]; String get questionHere => localizedValues['QuestionHere'][locale.languageCode]; String get viewDoctorResponses => localizedValues['ViewDoctorResponses'][locale.languageCode]; + String get serviceInformationButton => localizedValues['ServiceInformationButton'][locale.languageCode]; + String get serviceInformationTitle => localizedValues['ServiceInformationTitle'][locale.languageCode]; + String get infoLab => localizedValues['info-lab'][locale.languageCode]; + String get infoRadiology => localizedValues['info-radiology'][locale.languageCode]; } diff --git a/lib/widgets/others/OrderLogItem.dart b/lib/widgets/others/OrderLogItem.dart new file mode 100644 index 00000000..3e8305d3 --- /dev/null +++ b/lib/widgets/others/OrderLogItem.dart @@ -0,0 +1,32 @@ +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +class OrderLogItem extends StatelessWidget { + final String title; + final String value; + OrderLogItem({ this.title, this.value}); + @override + Widget build(BuildContext context) { + return Container( + padding: EdgeInsets.all(10), + width: double.maxFinite, + margin: EdgeInsets.only(bottom: 4,left: 4,right: 4), + decoration: BoxDecoration( + borderRadius: BorderRadius.only( + bottomRight: Radius.circular(12), + bottomLeft: Radius.circular(12), + ), + color: Colors.white + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts(title,color: Colors.grey,), + SizedBox(height: 4,), + Texts(value??''), + ], + ), + ); + } +} diff --git a/lib/widgets/others/app_scaffold_widget.dart b/lib/widgets/others/app_scaffold_widget.dart index 80a3e7af..dabe3097 100644 --- a/lib/widgets/others/app_scaffold_widget.dart +++ b/lib/widgets/others/app_scaffold_widget.dart @@ -1,8 +1,10 @@ import 'package:diplomaticquarterapp/config/config.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page.dart'; import 'package:diplomaticquarterapp/routes.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/others/bottom_bar.dart'; import 'package:diplomaticquarterapp/widgets/progress_indicator/app_loader_widget.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; @@ -12,10 +14,12 @@ import 'package:flutter/material.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:provider/provider.dart'; +import '../../locator.dart'; import 'floating_button_search.dart'; import '../progress_indicator/app_loader_widget.dart'; import 'arrow_back.dart'; import 'network_base_view.dart'; +import 'not_auh_page.dart'; class AppScaffold extends StatelessWidget { final String appBarTitle; @@ -26,6 +30,12 @@ class AppScaffold extends StatelessWidget { final bool hasAppBarParam; final BaseViewModel baseViewModel; final Widget floatingActionButton; + final String title; + final String description; + final bool isShowDecPage; + + AuthenticatedUserObject authenticatedUserObject = + locator(); AppScaffold( {@required this.body, @@ -34,50 +44,61 @@ class AppScaffold extends StatelessWidget { this.isShowAppBar = false, this.hasAppBarParam, this.bottomSheet, - this.baseViewModel, this.floatingActionButton}); + this.baseViewModel, + this.floatingActionButton, + this.title, + this.description, + this.isShowDecPage = true}); @override Widget build(BuildContext context) { AppGlobal.context = context; return Scaffold( - backgroundColor: Theme.of(context).scaffoldBackgroundColor, - appBar: isShowAppBar - ? AppBar( - elevation: 0, - backgroundColor: Theme.of(context).appBarTheme.color, - textTheme: TextTheme( - headline6: TextStyle( - color: Colors.white, fontWeight: FontWeight.bold), - ), - title: Text(appBarTitle.toUpperCase()), - leading: Builder( - builder: (BuildContext context) { - return ArrowBack(); + backgroundColor: Theme.of(context).scaffoldBackgroundColor, + appBar: isShowAppBar + ? AppBar( + elevation: 0, + backgroundColor: Theme.of(context).appBarTheme.color, + textTheme: TextTheme( + headline6: + TextStyle(color: Colors.white, fontWeight: FontWeight.bold), + ), + title: Text(authenticatedUserObject.isLogin + ? appBarTitle.toUpperCase() + : TranslationBase.of(context).serviceInformationTitle), + leading: Builder( + builder: (BuildContext context) { + return ArrowBack(); + }, + ), + centerTitle: true, + actions: [ + IconButton( + icon: Icon(FontAwesomeIcons.home), + color: Colors.white, + onPressed: () { + Navigator.of(context).popUntil(ModalRoute.withName('/')); }, ), - centerTitle: true, - actions: [ - IconButton( - icon: Icon(FontAwesomeIcons.home), - color: Colors.white, - onPressed: () { - Navigator.of(context).popUntil(ModalRoute.withName('/')); - }, - ), - ], - ) - : null, - body: baseViewModel != null - ? NetworkBaseView( - child: buildBodyWidget(), - baseViewModel: baseViewModel, - ) - : buildBodyWidget(), - bottomSheet: bottomSheet, - // bottomNavigationBar: BottomBarSearch() - floatingActionButton: floatingActionButton??floatingActionButton, - ); + ], + ) + : null, + body: (!authenticatedUserObject.isLogin && isShowDecPage) + ? NotAutPage( + title: appBarTitle, + description: description, + ) + : baseViewModel != null + ? NetworkBaseView( + child: buildBodyWidget(), + baseViewModel: baseViewModel, + ) + : buildBodyWidget(), + bottomSheet: bottomSheet, + // bottomNavigationBar: BottomBarSearch() + floatingActionButton: floatingActionButton ?? floatingActionButton, + ); } buildAppLoaderWidget(bool isLoading) { @@ -85,6 +106,6 @@ class AppScaffold extends StatelessWidget { } buildBodyWidget() { - return body ;//Stack(children: [body, buildAppLoaderWidget(isLoading)]); + return body; //Stack(children: [body, buildAppLoaderWidget(isLoading)]); } } diff --git a/lib/widgets/others/not_auh_page.dart b/lib/widgets/others/not_auh_page.dart new file mode 100644 index 00000000..298b5609 --- /dev/null +++ b/lib/widgets/others/not_auh_page.dart @@ -0,0 +1,79 @@ +import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; +import 'package:diplomaticquarterapp/pages/login/login-type.dart'; +import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; +import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; +import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; +import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; +import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:hexcolor/hexcolor.dart'; +import 'package:provider/provider.dart'; + +class NotAutPage extends StatelessWidget { + final String title; + final String description; + + NotAutPage({@required this.title, @required this.description}); + + @override + Widget build(BuildContext context) { + ProjectViewModel projectViewModel = Provider.of(context); + return Scaffold( + body: SingleChildScrollView( + padding: EdgeInsets.all(12), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Texts( + title ?? 'Service', + fontWeight: FontWeight.w800, + fontSize: 25, + bold: true, + color: Hexcolor("#60686b"), + ), + SizedBox( + height: 12, + ), + Texts( + description ?? 'Description', + fontWeight: FontWeight.normal, + fontSize: 17, + ), + SizedBox( + height: 22, + ), + Center( + child: SizedBox( + height: MediaQuery.of(context).size.height * 0.55, + width: MediaQuery.of(context).size.width * 0.50, + child: Image.asset(projectViewModel.isArabic + ? 'assets/images/wifi-EN.png' + : 'assets/images/Wifi-AR.png'), + ), + ), + SizedBox( + height: 77, + ), + ], + ), + ), + bottomSheet: Container( + height: MediaQuery.of(context).size.height * 0.10, + width: double.infinity, + child: Column( + children: [ + Container( + width: MediaQuery.of(context).size.width * 0.9, + child: SecondaryButton( + onTap: () => Navigator.pushReplacement( + context, FadePage(page: LoginType())), + label: TranslationBase.of(context).serviceInformationButton, + textColor: Theme.of(context).backgroundColor), + ), + ], + ), + ), + ); + } +} diff --git a/pubspec.yaml b/pubspec.yaml index 6e9349ab..2b078a1d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -60,6 +60,9 @@ dependencies: image_picker: ^0.6.7+1 image_cropper: ^1.2.1 + #GIF image + flutter_gifimage: ^1.0.1 + # UI Reqs dotted_border: 1.0.5 expandable: ^4.1.4 From 53bbafdc2b265f69853eb51697a271e48f7266f4 Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Tue, 13 Oct 2020 11:22:49 +0300 Subject: [PATCH 6/6] fix Authenticated User Object --- lib/core/service/AuthenticatedUserObject.dart | 10 +++++++--- lib/core/service/base_service.dart | 1 + lib/core/viewModels/medical/medical_view_model.dart | 2 +- .../all_habib_medical_service_page.dart | 1 + .../{hmg_service.dart => contact_us_page.dart} | 7 ++++--- lib/pages/landing/home_page.dart | 4 ++-- lib/pages/login/login.dart | 5 +++++ lib/pages/medical/medical_profile_page.dart | 1 + lib/services/authentication/auth_provider.dart | 5 +++++ lib/widgets/drawer/app_drawer_widget.dart | 8 ++++---- 10 files changed, 31 insertions(+), 13 deletions(-) rename lib/pages/ContactUs/{hmg_service.dart => contact_us_page.dart} (93%) diff --git a/lib/core/service/AuthenticatedUserObject.dart b/lib/core/service/AuthenticatedUserObject.dart index 1aaa4755..600e17e1 100644 --- a/lib/core/service/AuthenticatedUserObject.dart +++ b/lib/core/service/AuthenticatedUserObject.dart @@ -2,16 +2,17 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; -class AuthenticatedUserObject{ +class AuthenticatedUserObject { AuthenticatedUser user; AppSharedPreferences sharedPref = AppSharedPreferences(); bool isLogin = false; - AuthenticatedUserObject(){ + + AuthenticatedUserObject() { getUser(); } getUser() async { - if (user==null) { + if (user == null) { var userData = await sharedPref.getObject(USER_PROFILE); if (userData != null) user = AuthenticatedUser.fromJson(userData); } @@ -20,4 +21,7 @@ class AuthenticatedUserObject{ this.isLogin = isLogin != null; } + logout() async { + isLogin = false; + } } diff --git a/lib/core/service/base_service.dart b/lib/core/service/base_service.dart index f2820dc1..fdb80604 100644 --- a/lib/core/service/base_service.dart +++ b/lib/core/service/base_service.dart @@ -17,6 +17,7 @@ class BaseService { AppSharedPreferences sharedPref = AppSharedPreferences(); BaseService() { + authenticatedUserObject.getUser(); user = authenticatedUserObject.user; // getUser(); } diff --git a/lib/core/viewModels/medical/medical_view_model.dart b/lib/core/viewModels/medical/medical_view_model.dart index 4563f615..f8b14c6e 100644 --- a/lib/core/viewModels/medical/medical_view_model.dart +++ b/lib/core/viewModels/medical/medical_view_model.dart @@ -12,7 +12,7 @@ class MedicalViewModel extends BaseViewModel { _medicalService.appoitmentAllHistoryResultList; getAppointmentHistory() async { - if (authenticatedUserObject.isLogin) { + if (authenticatedUserObject.isLogin) { setState(ViewState.Busy); if (_medicalService.appoitmentAllHistoryResultList.length == 0) await _medicalService.getAppointmentHistory(); diff --git a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart index 3fa2aeab..5117ba4b 100644 --- a/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart +++ b/lib/pages/AlHabibMedicalService/all_habib_medical_service_page.dart @@ -39,6 +39,7 @@ class _AllHabibMedicalServiceState extends State { return AppScaffold( isShowAppBar: true, appBarTitle: TranslationBase.of(context).alhabiServices, + isShowDecPage: false, body: Column( children: [ Expanded( diff --git a/lib/pages/ContactUs/hmg_service.dart b/lib/pages/ContactUs/contact_us_page.dart similarity index 93% rename from lib/pages/ContactUs/hmg_service.dart rename to lib/pages/ContactUs/contact_us_page.dart index 4f19e8f8..7d2192f9 100644 --- a/lib/pages/ContactUs/hmg_service.dart +++ b/lib/pages/ContactUs/contact_us_page.dart @@ -6,12 +6,12 @@ import 'package:flutter/material.dart'; import '../../uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart'; -class HmgServicePage extends StatefulWidget { +class ContactUsPage extends StatefulWidget { @override - _HmgServicePageState createState() => _HmgServicePageState(); + _ContactUsPageState createState() => _ContactUsPageState(); } -class _HmgServicePageState extends State { +class _ContactUsPageState extends State { LocationUtils locationUtils; @@ -29,6 +29,7 @@ class _HmgServicePageState extends State { return AppScaffold( isShowAppBar: true,//widget.isAppbar, appBarTitle: "HMG Services",//TranslationBase.of(context).bookAppo, + isShowDecPage: false, body: Container( margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), child: Column( diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index b20648e2..933f6f50 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -2,7 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; -import 'package:diplomaticquarterapp/pages/ContactUs/hmg_service.dart'; +import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; @@ -663,7 +663,7 @@ class _HomePageState extends State { // Navigator.push( // context, FadePage(page: FeedbackHomePage())); Navigator.push( - context, FadePage(page: HmgServicePage())); + context, FadePage(page: ContactUsPage())); }, child: Container( width: double.infinity, diff --git a/lib/pages/login/login.dart b/lib/pages/login/login.dart index 22178444..a575f8c4 100644 --- a/lib/pages/login/login.dart +++ b/lib/pages/login/login.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/size_config.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart'; import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; @@ -40,6 +41,9 @@ class _Login extends State { AppointmentRateViewModel appointmentRateViewModel = locator(); + AuthenticatedUserObject authenticatedUserObject = locator(); + + @override void initState() { // getDeviceToken(); @@ -196,6 +200,7 @@ class _Login extends State { // request.isRegister = false; this.authService.checkActivationCode(request, code).then((result) => { result = CheckActivationCode.fromJson(result), + authenticatedUserObject.getUser(), this.sharedPref.setObject(USER_PROFILE, result.list), this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID), this.sharedPref.setString(TOKEN, result.authenticationTokenID), diff --git a/lib/pages/medical/medical_profile_page.dart b/lib/pages/medical/medical_profile_page.dart index 2c5a6fb2..e7d75e7f 100644 --- a/lib/pages/medical/medical_profile_page.dart +++ b/lib/pages/medical/medical_profile_page.dart @@ -74,6 +74,7 @@ class _MedicalProfilePageState extends State { fit: BoxFit.cover, width: double.infinity, ), + if(model.authenticatedUserObject.isLogin) ListView.builder( itemBuilder: (context, index) => TimeLineWidget( isUp: index % 2 == 1, diff --git a/lib/services/authentication/auth_provider.dart b/lib/services/authentication/auth_provider.dart index 1598184c..c8d88f9d 100644 --- a/lib/services/authentication/auth_provider.dart +++ b/lib/services/authentication/auth_provider.dart @@ -1,5 +1,6 @@ import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_request.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart'; @@ -14,6 +15,8 @@ import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:flutter/cupertino.dart'; +import '../../locator.dart'; + // SharedPreferences sharedPref = new SharedPreferences(); enum APP_STATUS { LOADING, UNAUTHENTICATED, AUTHENTICATED } AppSharedPreferences sharedPref = new AppSharedPreferences(); @@ -41,6 +44,8 @@ class AuthProvider with ChangeNotifier { bool isLogin = false; bool isLoading = true; dynamic authenticatedUser; + AuthenticatedUserObject authenticatedUserObject = locator(); + AuthProvider() { getUserAuthentication(); } diff --git a/lib/widgets/drawer/app_drawer_widget.dart b/lib/widgets/drawer/app_drawer_widget.dart index 3c5ac608..9a387e4e 100644 --- a/lib/widgets/drawer/app_drawer_widget.dart +++ b/lib/widgets/drawer/app_drawer_widget.dart @@ -1,4 +1,5 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; +import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/client/base_app_client.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; @@ -16,6 +17,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../../config/size_config.dart'; +import '../../locator.dart'; import 'drawer_item_widget.dart'; class AppDrawer extends StatefulWidget { @@ -34,6 +36,7 @@ class _AppDrawerState extends State { var sharedPref = new AppSharedPreferences(); var familyFileProvider = FamilyFilesProvider(); AuthenticatedUser user; + AuthenticatedUserObject authenticatedUserObject = locator(); @override Widget build(BuildContext context) { @@ -329,10 +332,7 @@ class _AppDrawerState extends State { } logout() async { - // this.sharedPref.remove(USER_PROFILE); - // this.sharedPref.remove(IMEI_USER_DATA); - // this.sharedPref.remove(TOKEN); - // this.sharedPref.remove(LOGIN_TOKEN_ID); + authenticatedUserObject.logout(); await sharedPref.clear(); this.user = null;