From 001417f9b3f71425b7c29fc31e1b38fd460d0947 Mon Sep 17 00:00:00 2001 From: Sultan khan <> Date: Sun, 4 Feb 2024 10:17:30 +0300 Subject: [PATCH] fixes --- .../viewModels/er/am_request_view_model.dart | 5 +- .../Covid-DriveThru/Covid-TimeSlots.dart | 4 +- .../covid-payment-summary.dart | 2 + lib/pages/ErService/AmbulanceReq.dart | 1 + .../AmbulanceRequestIndex.dart | 5 +- .../AmbulanceRequestIndexPages/Summary.dart | 9 +- .../medical/reports/monthly_reports.dart | 2 +- lib/pages/settings/general_setting.dart | 100 +++++++++--------- .../appointment_services/GetDoctorsList.dart | 8 +- 9 files changed, 72 insertions(+), 64 deletions(-) diff --git a/lib/core/viewModels/er/am_request_view_model.dart b/lib/core/viewModels/er/am_request_view_model.dart index 9d8e8705..aa2a01b2 100644 --- a/lib/core/viewModels/er/am_request_view_model.dart +++ b/lib/core/viewModels/er/am_request_view_model.dart @@ -64,7 +64,7 @@ class AmRequestViewModel extends BaseViewModel { setState(ViewState.Error); } else // getPatientAllPresOrdersList(); - getPatientAllPresOrdersListRC(); + await getPatientAllPresOrdersListRC(); } Future getPatientAllPresOrdersListRC() async { @@ -118,6 +118,7 @@ class AmRequestViewModel extends BaseViewModel { setState(ViewState.ErrorLocal); } else // getAmRequestOrders(); - getPatientAllPresOrdersListRC(); + + await getPatientAllPresOrdersListRC(); } } diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart index d354a02b..a9a16ce7 100644 --- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart +++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart @@ -500,8 +500,8 @@ class _CovidTimeSlotsState extends State with TickerProviderStat DoctorsListService service = new DoctorsListService(); service.getPatientShare(appointmentNo, clinicID, projectID, languageID, context).then((res) { GifLoaderDialogUtils.hideDialog(context); - print(res); - widget.patientShareResponse = new PatientShareResponse.fromJson(res); + res = res['OnlineCheckInAppointments'][0]; + widget.patientShareResponse = PatientShareResponse.fromJson(res); updateCovidQuestionnaire(context, appointmentNo); navigateToPaymentAlert(); }).catchError((err) { diff --git a/lib/pages/Covid-DriveThru/covid-payment-summary.dart b/lib/pages/Covid-DriveThru/covid-payment-summary.dart index a88c56da..07e26627 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-summary.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-summary.dart @@ -1,5 +1,6 @@ import 'dart:io'; +import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; @@ -231,6 +232,7 @@ class _CovidPaymentSummaryState extends State { widget.patientShareResponse!.isLiveCareAppointment!, "2", "", + AppGlobal.context, widget.patientShareResponse!.appointmentDate, widget.patientShareResponse!.appointmentNo!, widget.patientShareResponse!.clinicID!, diff --git a/lib/pages/ErService/AmbulanceReq.dart b/lib/pages/ErService/AmbulanceReq.dart index 129d404c..afcf4e58 100644 --- a/lib/pages/ErService/AmbulanceReq.dart +++ b/lib/pages/ErService/AmbulanceReq.dart @@ -83,6 +83,7 @@ class _AmbulanceReqState extends State with SingleTickerProviderSt children: [ AmbulanceRequestIndexPage( amRequestViewModel: model, + tabController: _tabController, ), OrderLogPage( amRequestViewModel: model, diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart index bde7da6d..23a79403 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart @@ -24,8 +24,8 @@ import 'Summary.dart'; class AmbulanceRequestIndexPage extends StatefulWidget { final AmRequestViewModel amRequestViewModel; - - AmbulanceRequestIndexPage({Key? key, required this.amRequestViewModel}); + final TabController tabController; + AmbulanceRequestIndexPage({Key? key, required this.amRequestViewModel, required this.tabController}); @override _AmbulanceRequestIndexPageState createState() => _AmbulanceRequestIndexPageState(); @@ -363,6 +363,7 @@ class _AmbulanceRequestIndexPageState extends State { patientER: _patientER, patientER_RC: _patientER_RC, amRequestViewModel: widget.amRequestViewModel, + tabController: widget.tabController, ), ], ), diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart index f642923f..b566474e 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/Summary.dart @@ -11,18 +11,19 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; class Summary extends StatefulWidget { - final Function changeCurrentTab; + final Function(int)? changeCurrentTab; final PatientER patientER; final PatientER_RC patientER_RC; final AmRequestViewModel amRequestViewModel; - - Summary({Key? key, required this.changeCurrentTab, required this.patientER, required this.patientER_RC, required this.amRequestViewModel}); + final TabController tabController; + Summary({Key? key, required this.changeCurrentTab, required this.patientER, required this.patientER_RC, required this.amRequestViewModel, required this.tabController}); @override _SummaryState createState() => _SummaryState(); } class _SummaryState extends State { + @override Widget build(BuildContext context) { ProjectViewModel projectViewModel = Provider.of(context); @@ -137,6 +138,8 @@ class _SummaryState extends State { padding: EdgeInsets.all(12.0), child: DefaultButton(TranslationBase.of(context).send, () async { await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC); + widget.tabController.animateTo(1); + }), ), ); diff --git a/lib/pages/medical/reports/monthly_reports.dart b/lib/pages/medical/reports/monthly_reports.dart index f6b43c5e..4b59d7a0 100644 --- a/lib/pages/medical/reports/monthly_reports.dart +++ b/lib/pages/medical/reports/monthly_reports.dart @@ -143,7 +143,7 @@ class _MonthlyReportsPageState extends State { ), TextFormField( scrollPadding: EdgeInsets.zero, - keyboardType: TextInputType.number, + keyboardType: TextInputType.emailAddress, // controller: _controller, onChanged: (value) => {email = value}, initialValue: email, diff --git a/lib/pages/settings/general_setting.dart b/lib/pages/settings/general_setting.dart index 08434093..9cac9df0 100644 --- a/lib/pages/settings/general_setting.dart +++ b/lib/pages/settings/general_setting.dart @@ -45,56 +45,56 @@ class _GeneralSettings extends State with TickerProviderStateMi child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - TranslationBase.of(context).modes, - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.w600, - letterSpacing: -0.64, - ), - ), - Row( - children: [ - Checkbox( - value: vibration, - onChanged: (value) { - setState(() { - vibration = value!; - }); - }, - activeColor: CustomColors.accentColor, - ), - Text( - TranslationBase.of(context).vibration, - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - ), - ), - ], - ), - Row( - children: [ - Checkbox( - value: accsibility, - onChanged: (value) { - setState(() { - accsibility = value!; - }); - }, - activeColor: CustomColors.accentColor, - ), - Text( - TranslationBase.of(context).accessibility, - style: TextStyle( - fontSize: 12, - letterSpacing: -0.48, - ), - ), - ], - ), - mHeight(16), - mHeight(12), + // Text( + // TranslationBase.of(context).modes, + // style: TextStyle( + // fontSize: 16, + // fontWeight: FontWeight.w600, + // letterSpacing: -0.64, + // ), + // ), + // Row( + // children: [ + // Checkbox( + // value: vibration, + // onChanged: (value) { + // setState(() { + // vibration = value!; + // }); + // }, + // activeColor: CustomColors.accentColor, + // ), + // Text( + // TranslationBase.of(context).vibration, + // style: TextStyle( + // fontSize: 12, + // letterSpacing: -0.48, + // ), + // ), + // ], + // ), + // Row( + // children: [ + // Checkbox( + // value: accsibility, + // onChanged: (value) { + // setState(() { + // accsibility = value!; + // }); + // }, + // activeColor: CustomColors.accentColor, + // ), + // Text( + // TranslationBase.of(context).accessibility, + // style: TextStyle( + // fontSize: 12, + // letterSpacing: -0.48, + // ), + // ), + // ], + // ), + // mHeight(16), + // mHeight(12), Text( TranslationBase.of(context).blindMode, style: TextStyle( diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index 3f682608..0d2cb52b 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -28,10 +28,10 @@ class DoctorsListService extends BaseService { AuthenticatedUser authUser = new AuthenticatedUser(); AuthProvider authProvider = new AuthProvider(); - late double lat; - late double long; - late String deviceToken; - late String tokenID; + double? lat; + double? long; + String? deviceToken; + String? tokenID; List selectedBodyPartList = []; Future getDoctorsList(int clinicID, int projectID, bool isNearest, int languageID, BuildContext context, {doctorId, doctorName, isContinueDentalPlan = false}) async {