diff --git a/lib/config/config.dart b/lib/config/config.dart index b5691aa3..da6defa6 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -301,6 +301,9 @@ const GET_COVID_DRIVETHRU_PAYMENT_INFO = 'Services/Doctors.svc/REST/COVID19_GetP const GET_COVID_DRIVETHRU_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots'; +const GET_COVID_DRIVETHRU_PROCEDURES_LIST = + 'Services/Doctors.svc/REST/COVID19_GetTestProcedures'; + ///Smartwatch Integration Services const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index b0eda939..3adc4447 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -480,11 +480,11 @@ const Map localizedValues = { "gate": {"en": "Gate:", "ar": "بوابة"}, "building": {"en": "Building:", "ar": "المبنى"}, "branch": {"en": "Branch:", "ar": "الفرع"}, - "emergencyServices": {"en": "Emergency Services:", "ar": "خدمات الطوارئ"}, - "nearester": {"en": "Nearest ER:", "ar": "أقرب طوارى"}, - "locationa": {"en": "location:", "ar": "الموقع"}, - "ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "}, - "requestA": {"en": "Request:", "ar": "اسعاف"}, + "emergencyServices": {"en": "Emergency Services", "ar": "خدمات الطوارئ"}, + "nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"}, + "locationa": {"en": "location", "ar": "الموقع"}, + "ambulancerequest": {"en": "Ambulance ", "ar": "طلب نقل "}, + "requestA": {"en": "Request", "ar": "اسعاف"}, "MyAppointments": {"en": "Appointments", "ar": "مواعيدي"}, "NoBookedAppointments": { "en": "No Booked Appointments", @@ -1088,8 +1088,7 @@ const Map localizedValues = { }, "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"}, - - "ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"}, + "ResendOrder": {"en": "Refill Order & Delivery", "ar": "إعادة طلب و توصيل"}, "Ports": {"en": "Ports", "ar": "المنافذ"}, "Way": {"en": "Way", "ar": "الطزيقة"}, "Average": {"en": "Average", "ar": "المعدل"}, @@ -1131,6 +1130,7 @@ const Map localizedValues = { }, "question": {"en": "Question", "ar": "سؤال"}, "message-type": {"en": "Message Type", "ar": "نوع الرسالة"}, + "feedback-type": {"en": "Feedback Type", "ar": "نوع الرسالة"}, "compliment": {"en": "compliment", "ar": "ثناء"}, "suggestion": {"en": "Suggestion", "ar": "إقتراح"}, "your-feedback": { @@ -1233,6 +1233,7 @@ const Map localizedValues = { "ar": "حدد طريقة النقل" }, "RRT-direction-heading": {"en": "Select Direction", "ar": "حدد الاتجاه"}, + "RRT-way-heading": {"en": "Select Way", "ar": "حدد الطريق"}, "to-hospital": {"en": "To Hospital", "ar": "الى المستشفى"}, "from-hospital": {"en": "From Hospital", "ar": "من المستشفى"}, "one-direc": {"en": "One Way", "ar": "ذهاب"}, @@ -2030,11 +2031,11 @@ const Map localizedValues = { "ar": "علاقة الطالب" }, "newReferral": {"en": "New Referral", "ar": "إحالة جديدة"}, - "searchForReferrals": { - "en": "Search For Referrals", - "ar": "ابحث عن الإحالات" + "searchForReferrals": {"en": "Search For Referrals", "ar": "ابحث عن الإحالات"}, + "covid-select-procedure": { + "en": "Please select the procedure:", + "ar": "الرجاء تحديد الإجراء:" }, - "online-consultation": {"en": "Online Consultation", "ar": "استشارة مباشرة"}, "expected-weiting": { "en": "Waiting time to start LiveCare consultation ", diff --git a/lib/core/service/feedback/feedback_service.dart b/lib/core/service/feedback/feedback_service.dart index 9df5b0a6..9355daf0 100644 --- a/lib/core/service/feedback/feedback_service.dart +++ b/lib/core/service/feedback/feedback_service.dart @@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item import 'package:diplomaticquarterapp/core/service/base_service.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; +import 'package:diplomaticquarterapp/uitl/utils.dart'; class FeedbackService extends BaseService { List cOCItemList = List(); @@ -26,7 +27,7 @@ class FeedbackService extends BaseService { _requestInsertCOCItem.details = details; _requestInsertCOCItem.cOCTypeName = cOCTypeName; _requestInsertCOCItem.formTypeID = cOCTypeName; - _requestInsertCOCItem.mobileNo = user.mobileNumber; + _requestInsertCOCItem.mobileNo = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber); _requestInsertCOCItem.isUserLoggedIn = true; _requestInsertCOCItem.projectID = user.projectID; _requestInsertCOCItem.patientName = user.firstName + " " + user.lastName; @@ -64,7 +65,7 @@ class FeedbackService extends BaseService { hasError = false; Map body = new Map(); body['IdentificationNo'] = user.patientIdentificationNo; - body['MobileNo'] = user.mobileNumber; + body['MobileNo'] = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber); body['Searching_type'] = '1'; await baseAppClient.post(GET_STATUS_FOR_COCO, diff --git a/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart b/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart new file mode 100644 index 00000000..c104a1fc --- /dev/null +++ b/lib/models/CovidDriveThru/CovidTestProceduresResponse.dart @@ -0,0 +1,32 @@ +class CovidTestProceduresResponse { + String procedureID; + String procedureName; + String procedureNameN; + int projectID; + String setupID; + + CovidTestProceduresResponse( + {this.procedureID, + this.procedureName, + this.procedureNameN, + this.projectID, + this.setupID}); + + CovidTestProceduresResponse.fromJson(Map json) { + procedureID = json['ProcedureID']; + procedureName = json['ProcedureName']; + procedureNameN = json['ProcedureNameN']; + projectID = json['ProjectID']; + setupID = json['SetupID']; + } + + Map toJson() { + final Map data = new Map(); + data['ProcedureID'] = this.procedureID; + data['ProcedureName'] = this.procedureName; + data['ProcedureNameN'] = this.procedureNameN; + data['ProjectID'] = this.projectID; + data['SetupID'] = this.setupID; + return data; + } +} diff --git a/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart index 27c89383..e429418d 100644 --- a/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart +++ b/lib/pages/AlHabibMedicalService/health_converter/blood_sugar.dart @@ -42,6 +42,7 @@ class _BloodSugarState extends State { } void calculateBloodSugar() { + if (textController.text.isEmpty) return; if (cardMGColor == activeCardColor) { inputValue = double.parse(textController.text); inputValue = inputValue / 15; @@ -60,10 +61,18 @@ class _BloodSugarState extends State { double inputValue = 0; String unit; + @override + void initState() { + updateColor(1); + unit = 'mmol/l'; + super.initState(); + } + @override Widget build(BuildContext context) { return AppScaffold( isShowAppBar: true, + isShowDecPage: false, appBarTitle: TranslationBase.of(context).bloodSugarConversion, body: Padding( padding: const EdgeInsets.all(16.0), @@ -112,8 +121,11 @@ class _BloodSugarState extends State { onTap: () { setState(() { updateColor(1); - inputValue = double.parse(textController.text); - inputValue = inputValue / 15; + if (textController.text.isNotEmpty) { + inputValue = + double.parse(textController.text); + inputValue = inputValue / 15; + } unit = 'mmol/l'; }); }, @@ -126,14 +138,16 @@ class _BloodSugarState extends State { color: Colors.grey.withOpacity(0.5), spreadRadius: 3, blurRadius: 7, - offset: Offset(0, 3), // changes position of shadow + offset: Offset( + 0, 3), // changes position of shadow ), ], color: cardMGColor, borderRadius: BorderRadius.circular(3.0), ), child: Padding( - padding: const EdgeInsets.symmetric(vertical: 0.0, horizontal: 18.0), + padding: const EdgeInsets.symmetric( + vertical: 0.0, horizontal: 18.0), child: Texts('MG/DLt TO \nMMOL/L'), ), ), @@ -142,8 +156,11 @@ class _BloodSugarState extends State { onTap: () { setState(() { updateColor(2); - inputValue = double.parse(textController.text); - inputValue = inputValue * 18; + if (textController.text.isNotEmpty) { + inputValue = + double.parse(textController.text); + inputValue = inputValue / 18; + } unit = 'mg/dlt'; }); }, @@ -158,12 +175,14 @@ class _BloodSugarState extends State { color: Colors.grey.withOpacity(0.5), spreadRadius: 3, blurRadius: 7, - offset: Offset(0, 3), // changes position of shadow + offset: Offset( + 0, 3), // changes position of shadow ), ], ), child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 16.0), + padding: const EdgeInsets.symmetric( + horizontal: 16.0), child: Texts('\nMMOL/L TO MG/DLt '), ), ), @@ -191,7 +210,8 @@ class _BloodSugarState extends State { keyboardType: TextInputType.number, decoration: InputDecoration( labelText: TranslationBase.of(context).enterReadingValue, - border: OutlineInputBorder(borderSide: BorderSide(color: Colors.black45)), + border: OutlineInputBorder( + borderSide: BorderSide(color: Colors.black45)), labelStyle: TextStyle( color: Colors.black87, ), @@ -253,7 +273,9 @@ class _BloodSugarState extends State { label: TranslationBase.of(context).calculate, onTap: () { setState(() { - _visible == false ? _visible = !_visible : _visible = _visible; + _visible == false + ? _visible = !_visible + : _visible = _visible; calculateBloodSugar(); }); }, diff --git a/lib/pages/BookAppointment/components/SearchByDoctor.dart b/lib/pages/BookAppointment/components/SearchByDoctor.dart index a1ecb7a0..5b4f6dc3 100644 --- a/lib/pages/BookAppointment/components/SearchByDoctor.dart +++ b/lib/pages/BookAppointment/components/SearchByDoctor.dart @@ -93,6 +93,7 @@ class _SearchByDoctorState extends State { service .getDoctorsListByName(doctorNameController.text, context) .then((res) { + GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { if (res['DoctorList'].length != 0) { @@ -129,9 +130,12 @@ class _SearchByDoctorState extends State { navigateToSearchResults( context, doctorsList, _patientDoctorAppointmentListHospital); } else { + GifLoaderDialogUtils.hideDialog(context); AppToast.showErrorToast(message: res['ErrorEndUserMessage']); } }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + AppToast.showErrorToast(message: err); print(err); }); } diff --git a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart index 04a7178f..c12dd877 100644 --- a/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart +++ b/lib/pages/Covid-DriveThru/Covid-TimeSlots.dart @@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/timeSlot.dart'; +import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-alert.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; @@ -27,6 +28,7 @@ class CovidTimeSlots extends StatefulWidget { static DateTime selectedAppoDateTime; static String selectedDate; static String selectedTime; + CovidTestProceduresResponse selectedProcedure; int selectedClinicID; int selectedDoctorID; @@ -35,7 +37,7 @@ class CovidTimeSlots extends StatefulWidget { PatientShareResponse patientShareResponse; - CovidTimeSlots({@required this.projectID}); + CovidTimeSlots({@required this.projectID, @required this.selectedProcedure}); @override _CovidTimeSlotsState createState() => _CovidTimeSlotsState(); @@ -94,10 +96,12 @@ class _CovidTimeSlotsState extends State super.dispose(); } - void _onDaySelected(DateTime day, List events, ProjectViewModel projectViewModel) { + void _onDaySelected( + DateTime day, List events, ProjectViewModel projectViewModel) { final DateFormat formatter = DateFormat('yyyy-MM-dd'); setState(() { - this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en"); + this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted( + day, projectViewModel.isArabic ? "ar" : "en"); openTimeSlotsPickerForDate(day, docFreeSlots); CovidTimeSlots.selectedDate = formatter.format(day); print(CovidTimeSlots.selectedDate); @@ -260,7 +264,8 @@ class _CovidTimeSlotsState extends State onPressed: () { bookCovidTestAppointment(); }, - child: Text(TranslationBase.of(context).bookNow, style: TextStyle(fontSize: 18.0)), + child: Text(TranslationBase.of(context).bookNow, + style: TextStyle(fontSize: 18.0)), ), ), ), @@ -355,11 +360,7 @@ class _CovidTimeSlotsState extends State }, ), onDaySelected: (date, event, _) { - _onDaySelected( - date, - event, - projectViewModel - ); + _onDaySelected(date, event, projectViewModel); _animationController.forward(from: 0.0); }, onVisibleDaysChanged: _onVisibleDaysChanged, @@ -494,7 +495,8 @@ class _CovidTimeSlotsState extends State docObject.projectID, CovidTimeSlots.selectedTime, CovidTimeSlots.selectedDate, - context) + context, + widget.selectedProcedure.procedureID) .then((res) { if (res['MessageStatus'] == 1) { AppToast.showSuccessToast(message: "Appointment Booked Successfully"); diff --git a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart index c918cae4..31ea3e93 100644 --- a/lib/pages/Covid-DriveThru/covid-drivethru-location.dart +++ b/lib/pages/Covid-DriveThru/covid-drivethru-location.dart @@ -1,5 +1,7 @@ +import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart'; +import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart'; import 'package:diplomaticquarterapp/models/CovidDriveThru/DriveThroughTestingCenterModel.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart'; import 'package:diplomaticquarterapp/routes.dart'; @@ -22,6 +24,7 @@ class CovidDrivethruLocation extends StatefulWidget { class _CovidDrivethruLocationState extends State { String projectDropdownValue; List projectsList = []; + List proceduresList = []; bool isLocationSelected = false; String projectLat = ""; String projectLong = ""; @@ -42,21 +45,32 @@ class _CovidDrivethruLocationState extends State { imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'), ); + WidgetsBinding.instance.addPostFrameCallback((_) { + if (projectViewModel.isLogin) { + getProjectsList(context); + getTestProcedures(context); + } + }); super.initState(); } @override Widget build(BuildContext context) { projectViewModel = Provider.of(context); + imagesInfo.add(ImagesInfo( + imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', + imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png')); return AppScaffold( appBarTitle: TranslationBase.of(context).covidTest, isShowAppBar: true, imagesInfo: imagesInfo, description: TranslationBase.of(context).covidInfo, + isShowDecPage: true, body: SingleChildScrollView( child: Container( margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0), child: Column( + mainAxisSize: MainAxisSize.max, children: [ Container( alignment: projectViewModel.isArabic @@ -147,94 +161,98 @@ class _CovidDrivethruLocationState extends State { this.projectLong + "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"), ) - : Container(), - ], - ), - ), - ), - bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.15, - width: double.infinity, - child: Column( - children: [ - Container( - margin: EdgeInsets.only(top: 10.0), - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - minWidth: MediaQuery.of(context).size.width * 0.91, - height: 45.0, - child: RaisedButton( - color: new Color(0xFFc5272d), - textColor: Colors.white, - disabledTextColor: Colors.white, - disabledColor: Colors.red[300], - onPressed: () { - getDirections(); - }, - child: Text(TranslationBase.of(context).getDirections, - style: TextStyle(fontSize: 18.0)), - ), - ), - ), - Container( - margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0), - child: Flex( - direction: Axis.horizontal, - children: [ - Expanded( - flex: 1, - child: Container( - margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0), + : SizedBox( + height: MediaQuery.of(context).size.height * 0.35, + ), + Container( + height: MediaQuery.of(context).size.height * 0.15, + width: double.infinity, + child: Column( + children: [ + Container( + margin: EdgeInsets.only(top: 10.0), child: ButtonTheme( shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(10.0), ), - minWidth: MediaQuery.of(context).size.width * 0.7, + minWidth: MediaQuery.of(context).size.width * 0.91, height: 45.0, child: RaisedButton( - color: new Color(0xFF60686b), + color: new Color(0xFFc5272d), textColor: Colors.white, disabledTextColor: Colors.white, - disabledColor: Colors.grey[500], + disabledColor: Colors.red[300], onPressed: () { - back(); + getDirections(); }, - child: Text(TranslationBase.of(context).back, + child: Text(TranslationBase.of(context).getDirections, style: TextStyle(fontSize: 18.0)), ), ), ), - ), - Expanded( - flex: 1, - child: Container( - margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0), - child: ButtonTheme( - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(10.0), - ), - minWidth: MediaQuery.of(context).size.width * 0.7, - height: 45.0, - child: RaisedButton( - color: new Color(0xFF60686b), - textColor: Colors.white, - disabledTextColor: Colors.white, - disabledColor: Colors.grey[500], - onPressed: () { - next(); - }, - child: Text(TranslationBase.of(context).next, - style: TextStyle(fontSize: 18.0)), - ), + Container( + margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0), + child: Flex( + direction: Axis.horizontal, + children: [ + Expanded( + flex: 1, + child: Container( + margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: + MediaQuery.of(context).size.width * 0.7, + height: 45.0, + child: RaisedButton( + color: new Color(0xFF60686b), + textColor: Colors.white, + disabledTextColor: Colors.white, + disabledColor: Colors.grey[500], + onPressed: () { + back(); + }, + child: Text(TranslationBase.of(context).back, + style: TextStyle(fontSize: 18.0)), + ), + ), + ), + ), + Expanded( + flex: 1, + child: Container( + margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0), + child: ButtonTheme( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(10.0), + ), + minWidth: + MediaQuery.of(context).size.width * 0.7, + height: 45.0, + child: RaisedButton( + color: new Color(0xFF60686b), + textColor: Colors.white, + disabledTextColor: Colors.white, + disabledColor: Colors.grey[500], + onPressed: () { + next(); + }, + child: Text(TranslationBase.of(context).next, + style: TextStyle(fontSize: 18.0)), + ), + ), + ), + ), + ], ), ), - ), - ], + ], + ), ), - ), - ], + ], + ), ), ), ); @@ -279,21 +297,18 @@ class _CovidDrivethruLocationState extends State { getPaymentInfo(BuildContext context, String projectID) { CovidDriveThruService service = new CovidDriveThruService(); - CovidPaymentInfoResponse covidPaymentInfoResponse = new CovidPaymentInfoResponse(); - GifLoaderDialogUtils.showMyDialog(context); - service - .getCovidPaymentInformation(context, int.parse(projectID)) + .getCovidPaymentInformation( + context, int.parse(projectID), proceduresList[0].procedureID) .then((res) { GifLoaderDialogUtils.hideDialog(context); if (res['MessageStatus'] == 1) { setState(() { covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); - print(covidPaymentInfoResponse.procedureNameField); }); Navigator.push( context, @@ -301,6 +316,7 @@ class _CovidDrivethruLocationState extends State { page: CovidPaymentDetails( covidPaymentInfoResponse: covidPaymentInfoResponse, projectID: int.parse(projectID), + proceduresList: proceduresList, ))); } else {} }).catchError((err) { @@ -308,13 +324,36 @@ class _CovidDrivethruLocationState extends State { }); } + getTestProcedures(BuildContext context) { + CovidDriveThruService service = new CovidDriveThruService(); + GifLoaderDialogUtils.showMyDialog(context); + + CovidTestProceduresResponse covidTestProceduresResponse = + new CovidTestProceduresResponse(); + + service.getCovidTestProceduresList(context).then((res) { + if (res['MessageStatus'] == 1) { + print(res); + setState(() { + res['COVID19_TestProceduresList'].forEach((v) { + proceduresList.add(new CovidTestProceduresResponse.fromJson(v)); + }); + }); + print(proceduresList.length); + print(proceduresList[0].procedureName); + GifLoaderDialogUtils.hideDialog(context); + } else {} + }).catchError((err) { + GifLoaderDialogUtils.hideDialog(context); + print(err); + }); + } + getProjectsList(BuildContext context) { CovidDriveThruService service = new CovidDriveThruService(); GifLoaderDialogUtils.showMyDialog(context); service.getCovidProjectsList(context).then((res) { - print(res); if (res['MessageStatus'] == 1) { - print(res); setState(() { res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) { projectsList.add(new DriveThroughTestingCenterModel.fromJson(v)); diff --git a/lib/pages/Covid-DriveThru/covid-payment-details.dart b/lib/pages/Covid-DriveThru/covid-payment-details.dart index e6c87d0a..488dd3bf 100644 --- a/lib/pages/Covid-DriveThru/covid-payment-details.dart +++ b/lib/pages/Covid-DriveThru/covid-payment-details.dart @@ -1,5 +1,8 @@ import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart'; +import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidTestProceduresResponse.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/Covid-TimeSlots.dart'; +import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; +import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; 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'; @@ -10,9 +13,13 @@ import 'package:flutter_svg/flutter_svg.dart'; class CovidPaymentDetails extends StatefulWidget { CovidPaymentInfoResponse covidPaymentInfoResponse; int projectID; + List proceduresList; + CovidTestProceduresResponse selectedProcedure; CovidPaymentDetails( - {@required this.covidPaymentInfoResponse, @required this.projectID}); + {@required this.covidPaymentInfoResponse, + @required this.projectID, + @required this.proceduresList}); @override _CovidPaymentDetailsState createState() => _CovidPaymentDetailsState(); @@ -21,6 +28,13 @@ class CovidPaymentDetails extends StatefulWidget { class _CovidPaymentDetailsState extends State { bool isAgree = false; + @override + void initState() { + print(widget.proceduresList[0].procedureName); + widget.selectedProcedure = widget.proceduresList[0]; + super.initState(); + } + @override Widget build(BuildContext context) { return AppScaffold( @@ -28,7 +42,7 @@ class _CovidPaymentDetailsState extends State { isShowAppBar: true, body: SingleChildScrollView( child: Container( - margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0), + margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 100.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ @@ -82,13 +96,75 @@ class _CovidPaymentDetailsState extends State { borderRadius: BorderRadius.circular(10.0), color: Colors.white), margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0), - padding: EdgeInsets.fromLTRB(20.0, 0.0, 20.0, 20.0), + padding: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 20.0), child: Column( children: [ Container( alignment: Alignment.center, margin: - EdgeInsets.only(left: 0.0, right: 20.0, top: 30.0), + EdgeInsets.only(left: 0.0, right: 20.0, top: 10.0), + child: Text( + TranslationBase.of(context).covidSelectProcedure, + style: TextStyle( + color: Colors.black, + fontSize: 20.0, + fontWeight: FontWeight.bold)), + ), + ...List.generate( + widget.proceduresList.length, + (index) => Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 1, + ), + Row( + children: [ + Expanded( + flex: 1, + child: InkWell( + onTap: () { + setState(() { + widget.selectedProcedure = + widget.proceduresList[index]; + }); + }, + child: ListTile( + title: Text( + widget.proceduresList[index] + .procedureName, + style: TextStyle(fontSize: 14.0)), + leading: Radio( + value: widget.proceduresList[index], + groupValue: widget.selectedProcedure, + activeColor: Colors.red[800], + toggleable: true, + onChanged: (value) { + setState(() { + widget.selectedProcedure = value; + print(widget + .selectedProcedure.procedureName); + getPaymentInfo( + context, + widget.projectID.toString(), + widget.selectedProcedure + .procedureID); + }); + }, + ), + ), + ), + ) + ], + ), + ], + ), + ), + Divider(), + Container( + alignment: Alignment.center, + margin: + EdgeInsets.only(left: 0.0, right: 20.0, top: 10.0), child: Text(TranslationBase.of(context).testFee, style: TextStyle( color: Colors.black, @@ -144,7 +220,7 @@ class _CovidPaymentDetailsState extends State { isAgree = !isAgree; }); }, - activeColor: Colors.blue, + activeColor: Color(0xffB8382C), ), Texts(TranslationBase.of(context) .iAgreeToTheTermsAndConditions), @@ -238,6 +314,7 @@ class _CovidPaymentDetailsState extends State { FadePage( page: CovidTimeSlots( projectID: widget.projectID, + selectedProcedure: widget.selectedProcedure, ))); } @@ -245,6 +322,34 @@ class _CovidPaymentDetailsState extends State { Navigator.pop(context); } + getPaymentInfo( + BuildContext context, String projectID, String selectedProcedureID) { + CovidDriveThruService service = new CovidDriveThruService(); + GifLoaderDialogUtils.showMyDialog(context); + service + .getCovidPaymentInformation( + context, int.parse(projectID), selectedProcedureID) + .then((res) { + GifLoaderDialogUtils.hideDialog(context); + if (res['MessageStatus'] == 1) { + setState(() { + widget.covidPaymentInfoResponse = + CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); + }); + // Navigator.push( + // context, + // FadePage( + // page: CovidPaymentDetails( + // covidPaymentInfoResponse: covidPaymentInfoResponse, + // projectID: int.parse(projectID), + // proceduresList: proceduresList, + // ))); + } else {} + }).catchError((err) { + print(err); + }); + } + _getNormalText(text) { return Container( margin: EdgeInsets.only(top: 20.0, right: 10.0), diff --git a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart index 63d915d1..6f3281dc 100644 --- a/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart +++ b/lib/pages/ErService/AmbulanceRequestIndexPages/SelectTransportationMethod.dart @@ -206,7 +206,7 @@ class _SelectTransportationMethodState SizedBox( height: 8, ), - Texts(TranslationBase.of(context).directionHeading), + Texts(TranslationBase.of(context).wayHeading), SizedBox( height: 5, ), diff --git a/lib/pages/ErService/ErOptions.dart b/lib/pages/ErService/ErOptions.dart index a6a61749..1b920cdd 100644 --- a/lib/pages/ErService/ErOptions.dart +++ b/lib/pages/ErService/ErOptions.dart @@ -46,6 +46,7 @@ class _ErOptionsState extends State { return AppScaffold( isShowAppBar: widget.isAppbar, appBarTitle: 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/ErService/NearestEr.dart b/lib/pages/ErService/NearestEr.dart index eaf0d4ef..cbafacce 100644 --- a/lib/pages/ErService/NearestEr.dart +++ b/lib/pages/ErService/NearestEr.dart @@ -31,6 +31,7 @@ class NearestEr extends StatelessWidget { : (model) => model.getProjectAvgERWaitingTimeOrders(), builder: (_, mode, widget) => AppScaffold( isShowAppBar: true, + isShowDecPage: false, appBarTitle: TranslationBase.of(context).NearestEr, baseViewModel: mode, body: mode.ProjectAvgERWaitingTimeModeList.length > 0 diff --git a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart index 51e18ff4..31a7cb2d 100644 --- a/lib/pages/MyAppointments/widgets/AppointmentCardView.dart +++ b/lib/pages/MyAppointments/widgets/AppointmentCardView.dart @@ -195,7 +195,7 @@ class _ApointmentCardState extends State { widgetBuilder: (_, CurrentRemainingTime time) { return time != null ? Text( - '${time.days}:${time.hours}:${time.min}:${time.sec} ' + + '${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours : "0"}:${time.min}:${time.sec} ' + TranslationBase.of(context) .upcomingTimeLeft, style: TextStyle( diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 7eb17b0d..74feef0b 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -82,121 +82,109 @@ class _HomePageState extends State { child: Row( children: [ Expanded( - child: Visibility( - // visible: - // model.user.outSA == 1 - // ? false - // : true, + child: Container( + height: 125, + padding: EdgeInsets.all(5), + margin: EdgeInsets.all(5), + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage( + "assets/images/new-design/covid_bg_transparent.png"), + fit: BoxFit.fill, + ), + color: + Colors.white.withOpacity(0.3), + borderRadius: BorderRadius.all( + Radius.circular(5))), child: Container( - height: 125, - padding: EdgeInsets.all(5), - margin: EdgeInsets.all(5), - decoration: BoxDecoration( - image: DecorationImage( - image: AssetImage( - "assets/images/new-design/covid_bg_transparent.png"), - fit: BoxFit.fill, + child: Column( + children: [ + Texts( + TranslationBase.of(context) + .covidTest, + color: Colors.white, + fontWeight: FontWeight.w700, ), - color: Colors.white - .withOpacity(0.3), - borderRadius: BorderRadius.all( - Radius.circular(5))), - child: Container( - child: Column( - children: [ - Texts( - TranslationBase.of(context) - .covidTest, - color: Colors.white, - fontWeight: FontWeight.w700, - ), - Row( - mainAxisAlignment: - MainAxisAlignment - .spaceAround, - children: [ - Container( - margin: EdgeInsets.only( - top: 15.0, - ), - child: SvgPicture.asset( - 'assets/images/new-design/covid-19-car.svg', - width: 45.0, - height: 45.0), + Row( + mainAxisAlignment: + MainAxisAlignment + .spaceAround, + children: [ + Container( + margin: EdgeInsets.only( + top: 15.0, ), - Container( - margin: EdgeInsets.only( - top: 5.0), - child: Column( - children: [ - Texts( - TranslationBase.of( - context) - .driveThru, - fontWeight: - FontWeight - .w700, - color: - Colors.white, + child: SvgPicture.asset( + 'assets/images/new-design/covid-19-car.svg', + width: 45.0, + height: 45.0), + ), + Container( + margin: EdgeInsets.only( + top: 5.0), + child: Column( + children: [ + Texts( + TranslationBase.of( + context) + .driveThru, + fontWeight: + FontWeight.w700, + color: Colors.white, + ), + ButtonTheme( + shape: + RoundedRectangleBorder( + borderRadius: + BorderRadius + .circular( + 5.0), ), - ButtonTheme( - shape: - RoundedRectangleBorder( - borderRadius: - BorderRadius - .circular( - 5.0), - ), - minWidth: MediaQuery.of( - context) - .size - .width * - 0.15, - height: 25.0, - child: - RaisedButton( - color: Colors - .red[800], - textColor: - Colors - .white, - disabledTextColor: - Colors - .white, - disabledColor: - new Color( - 0xFFbcc2c4), - onPressed: () { - navigateToCovidDriveThru(); - }, + minWidth: MediaQuery.of( + context) + .size + .width * + 0.15, + height: 25.0, + child: RaisedButton( + color: Colors + .red[800], + textColor: + Colors.white, + disabledTextColor: + Colors.white, + disabledColor: + new Color( + 0xFFbcc2c4), + onPressed: () { + navigateToCovidDriveThru(); + }, + child: Center( child: Center( child: Center( child: Center( child: - Center( - child: - Texts( - TranslationBase.of(context) - .bookNow, - fontWeight: - FontWeight.w700, - color: - Colors.white, - ), + Texts( + TranslationBase.of(context) + .bookNow, + fontWeight: + FontWeight.w700, + color: Colors + .white, ), ), ), ), ), ), - ], - ), + ), + ], ), - ], - ), - ], - ), + ), + ], + ), + ], ), ), ), @@ -564,7 +552,6 @@ class _HomePageState extends State { if (projectViewModel.havePrivilege(64) || projectViewModel.havePrivilege(65) || projectViewModel.havePrivilege(67)) - // if (model.user.outSA == 0) Container( margin: EdgeInsets.only(left: 15, right: 15), child: Row( @@ -572,39 +559,52 @@ class _HomePageState extends State { children: [ if (projectViewModel.havePrivilege(64)) DashboardItem( - onTap: () { - Navigator.push( - context, - FadePage( - page: HomeHealthCarePage(), - ), - ); - }, + onTap: (model.user != null && model.user.outSA == 1) + ? () {} + : () { + Navigator.push( + context, + FadePage( + page: HomeHealthCarePage(), + ), + ); + }, child: Center( child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/home_health_care_icon.png', - width: 50, - height: 50, - ), - SizedBox( - height: 10, - ), - Texts( - TranslationBase.of(context) - .homeHealthCare, - textAlign: TextAlign.center, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: - SizeConfig.textMultiplier * 1.55, - ) - ], - ), - ), + padding: const EdgeInsets.all(15.0), + child: (model.user != null && + model.user.outSA == 1) + ? Container( + width: double.infinity, + height: double.infinity, + color: Colors.grey.withOpacity(0.7), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + : Column( + children: [ + Image.asset( + 'assets/images/home_health_care_icon.png', + width: 50, + height: 50, + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context) + .homeHealthCare, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: + SizeConfig.textMultiplier * + 1.55, + ) + ], + )), ), height: MediaQuery.of(context).size.width * 0.4, imageName: 'home_healthcare_service_bg.png', @@ -612,31 +612,52 @@ class _HomePageState extends State { ), if (projectViewModel.havePrivilege(65)) DashboardItem( - onTap: () => getPharmacyToken(model), + onTap: () => + (model.user != null && model.user.outSA == 1) + ? () {} + : getPharmacyToken(model), child: Center( child: Padding( padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/pharmacy_logo.png', - width: 40, - height: 40, - ), - SizedBox( - height: 20, - ), - Texts( - TranslationBase.of(context) - .onlinePharmacy, - textAlign: TextAlign.center, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: - SizeConfig.textMultiplier * 1.55, - ) - ], - ), + child: (model.user != null && + model.user.outSA == 1) + ? Container( + width: double.infinity, + height: double.infinity, + color: Colors.grey.withOpacity(0.7), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + : Column( + children: [ + // if (projectViewModel.user != null && model.isLogin && model.user.outSA == 1) + // Image.asset( + // 'assets/images/lock_icon.png', + // width: 50, + // height: 50, + // ), + Image.asset( + 'assets/images/pharmacy_logo.png', + width: 40, + height: 40, + ), + SizedBox( + height: 20, + ), + Texts( + TranslationBase.of(context) + .onlinePharmacy, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: + SizeConfig.textMultiplier * + 1.55, + ) + ], + ), ), ), height: MediaQuery.of(context).size.width * 0.4, @@ -644,38 +665,52 @@ class _HomePageState extends State { ), if (projectViewModel.havePrivilege(67)) DashboardItem( - onTap: () { - Navigator.push( - context, - FadePage( - page: CMCPage(), - ), - ); - }, + onTap: (model.user != null && model.user.outSA == 1) + ? () {} + : () { + Navigator.push( + context, + FadePage( + page: CMCPage(), + ), + ); + }, child: Center( child: Padding( - padding: const EdgeInsets.all(15.0), - child: Column( - children: [ - Image.asset( - 'assets/images/comprehensive_medical_checkup_logo.png', - width: 50, - height: 50, - ), - SizedBox( - height: 10, - ), - Texts( - TranslationBase.of(context).cmcHeading, - textAlign: TextAlign.center, - color: Colors.white, - fontWeight: FontWeight.w700, - fontSize: - SizeConfig.textMultiplier * 1.55, - ) - ], - ), - ), + padding: const EdgeInsets.all(15.0), + child: (model.user != null && + model.user.outSA == 1) + ? Container( + width: double.infinity, + height: double.infinity, + color: Colors.grey.withOpacity(0.7), + child: Icon( + Icons.lock_outline, + size: 40, + ), + ) + : Column( + children: [ + Image.asset( + 'assets/images/comprehensive_medical_checkup_logo.png', + width: 50, + height: 50, + ), + SizedBox( + height: 10, + ), + Texts( + TranslationBase.of(context) + .cmcHeading, + textAlign: TextAlign.center, + color: Colors.white, + fontWeight: FontWeight.w700, + fontSize: + SizeConfig.textMultiplier * + 1.55, + ) + ], + )), ), height: MediaQuery.of(context).size.width * 0.4, color: HexColor("#747C80"), diff --git a/lib/pages/medical/ask_doctor/request_type.dart b/lib/pages/medical/ask_doctor/request_type.dart index 55e04a73..eaf2913d 100644 --- a/lib/pages/medical/ask_doctor/request_type.dart +++ b/lib/pages/medical/ask_doctor/request_type.dart @@ -104,7 +104,8 @@ class _RequestTypePageState extends State { ), bottomSheet: Container( width: double.maxFinite, - height: MediaQuery.of(context).size.height * 0.1, + // height: MediaQuery.of(context).size.height * 0.1, + height: 80.0, child: Padding( padding: const EdgeInsets.all(12.0), child: SecondaryButton( diff --git a/lib/pages/medical/balance/my_balance_page.dart b/lib/pages/medical/balance/my_balance_page.dart index 7639bb2f..f097bda5 100644 --- a/lib/pages/medical/balance/my_balance_page.dart +++ b/lib/pages/medical/balance/my_balance_page.dart @@ -8,7 +8,6 @@ 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 'advance_payment_page.dart'; @@ -105,12 +104,12 @@ class MyBalancePage extends StatelessWidget { ), ), bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.12, + // height: MediaQuery.of(context).size.height * 0.12, + height: 70.0, color: Colors.white, width: double.infinity, padding: EdgeInsets.all(12), child: SecondaryButton( - // color: Colors.grey[900], textColor: Colors.white, label: TranslationBase.of(context).createAdvancedPayment, onTap: () { diff --git a/lib/services/appointment_services/GetDoctorsList.dart b/lib/services/appointment_services/GetDoctorsList.dart index c894c84c..7ca568ae 100644 --- a/lib/services/appointment_services/GetDoctorsList.dart +++ b/lib/services/appointment_services/GetDoctorsList.dart @@ -321,7 +321,7 @@ class DoctorsListService extends BaseService { } Future insertAppointment(int docID, int clinicID, int projectID, - String selectedTime, String selectedDate, BuildContext context) async { + String selectedTime, String selectedDate, BuildContext context, [String procedureID]) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { @@ -341,6 +341,7 @@ class DoctorsListService extends BaseService { "StartTime": selectedTime, "SelectedTime": selectedTime, "EndTime": selectedTime, + "ProcedureID": procedureID, "InitialSlotDuration": 0, "StrAppointmentDate": selectedDate, "IsVirtual": false, diff --git a/lib/services/covid-drivethru/covid-drivethru.dart b/lib/services/covid-drivethru/covid-drivethru.dart index 3943a8b3..35e8fb2f 100644 --- a/lib/services/covid-drivethru/covid-drivethru.dart +++ b/lib/services/covid-drivethru/covid-drivethru.dart @@ -50,7 +50,43 @@ class CovidDriveThruService extends BaseService { return Future.value(localRes); } - Future getCovidPaymentInformation(BuildContext context, int projectID) async { + Future getCovidTestProceduresList(BuildContext context) async { + Map request; + + if (await this.sharedPref.getObject(USER_PROFILE) != null) { + var data = AuthenticatedUser.fromJson( + await this.sharedPref.getObject(USER_PROFILE)); + authUser = data; + } + + var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar'); + Request req = appGlobal.getPublicRequest(); + request = { + "LanguageID": languageID == 'ar' ? 1 : 2, + "IPAdress": "10.20.10.20", + "VersionID": req.VersionID, + "Channel": req.Channel, + "generalid": 'Cs2020@2016\$2958', + "PatientOutSA": authUser.outSA, + "TokenID": "", + "DeviceTypeID": req.DeviceTypeID, + "SessionID": "YckwoXhUmWBsnHKEKig", + "PatientID": authUser.patientID != null ? authUser.patientID : 0, + "License": true + }; + + dynamic localRes; + + await baseAppClient.post(GET_COVID_DRIVETHRU_PROCEDURES_LIST, + onSuccess: (response, statusCode) async { + localRes = response; + }, onFailure: (String error, int statusCode) { + throw error; + }, body: request); + return Future.value(localRes); + } + + Future getCovidPaymentInformation(BuildContext context, int projectID, String procedureID) async { Map request; if (await this.sharedPref.getObject(USER_PROFILE) != null) { @@ -65,6 +101,7 @@ class CovidDriveThruService extends BaseService { "LanguageID": languageID == 'ar' ? 1 : 2, "IPAdress": "10.20.10.20", "ProjectID": projectID, + "ProcedureId": procedureID, "VersionID": req.VersionID, "Channel": req.Channel, "generalid": 'Cs2020@2016\$2958', diff --git a/lib/services/pharmacy_services/pharmacyAddress_service.dart b/lib/services/pharmacy_services/pharmacyAddress_service.dart index 592359ca..2909f18d 100644 --- a/lib/services/pharmacy_services/pharmacyAddress_service.dart +++ b/lib/services/pharmacy_services/pharmacyAddress_service.dart @@ -89,7 +89,7 @@ class PharmacyAddressService extends BaseService { Map body = Map(); body["customer"] = customerObject; - await baseAppClient.post("$url", onSuccess: (response, statusCode) async { + await baseAppClient.postPharmacy("$url", onSuccess: (response, statusCode) async { addresses.clear(); response['customers'][0]['addresses'].forEach((item) { addresses.add(Addresses.fromJson(item)); diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index b5d5ab59..48395df7 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -4,7 +4,8 @@ import 'package:intl/intl.dart'; class DateUtil { /// convert String To Date function /// [date] String we want to convert - static DateTime convertStringToDate(String date) { // /Date(1585774800000+0300)/ + static DateTime convertStringToDate(String date) { + // /Date(1585774800000+0300)/ if (date != null) { const start = "/Date("; const end = "+0300)"; @@ -241,6 +242,25 @@ class DateUtil { } } + static getWeekDayEnglish(int weekDay) { + switch (weekDay) { + case 1: + return "Monday"; + case 2: + return "Tuesday"; + case 3: + return "Wednesday"; + case 4: + return "Thursday"; + case 5: + return "Friday"; + case 6: + return "Saturday "; + case 7: + return "Sunday"; + } + } + /// get data formatted like Apr 26,2020 /// [dateTime] convert DateTime to data formatted static String getMonthDayYearDateFormatted(DateTime dateTime) { @@ -253,6 +273,7 @@ class DateUtil { else return ""; } + /// get data formatted like Apr 26,2020 /// [dateTime] convert DateTime to data formatted Arabic static String getMonthDayYearDateFormattedAr(DateTime dateTime) { @@ -270,9 +291,12 @@ class DateUtil { /// [dateTime] convert DateTime to date formatted static String getWeekDayMonthDayYearDateFormatted( DateTime dateTime, String lang) { + // print(dateTime); + // print(dateTime.weekday); + // print(dateTime.weekday.getDayOfWeekEnumValue.value); if (dateTime != null) return lang == 'en' - ? getDay(dateTime.weekday.getDayOfWeekEnumValue) + + ? getWeekDayEnglish(dateTime.weekday) + ", " + getMonth(dateTime.month) + " " + @@ -357,9 +381,8 @@ class DateUtil { return ""; } - static String getFormattedDate(DateTime dateTime, String formattedString){ - return DateFormat(formattedString) - .format(dateTime); + static String getFormattedDate(DateTime dateTime, String formattedString) { + return DateFormat(formattedString).format(dateTime); } static convertISODateToJsonDate(String isoDate) { diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index b26982dd..1a5b4a61 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1132,6 +1132,8 @@ class TranslationBase { localizedValues['RRT-transport-heading'][locale.languageCode]; String get directionHeading => localizedValues['RRT-direction-heading'][locale.languageCode]; + String get wayHeading => + localizedValues['RRT-way-heading'][locale.languageCode]; String get toHospital => localizedValues['to-hospital'][locale.languageCode]; String get fromHospital => localizedValues['from-hospital'][locale.languageCode]; @@ -1624,6 +1626,8 @@ class TranslationBase { String get insuranceID => localizedValues["insurance-id"][locale.languageCode]; String get enterFile => localizedValues["enter-file"][locale.languageCode]; + String get feedbackType => localizedValues["feedback-type"][locale.languageCode]; + String get allow => localizedValues["allow"][locale.languageCode]; String get reject => localizedValues["reject"][locale.languageCode]; String get enterReferralRequesterName => @@ -1635,6 +1639,8 @@ class TranslationBase { String get newReferral => localizedValues["newReferral"][locale.languageCode]; String get searchForReferrals => localizedValues["searchForReferrals"][locale.languageCode]; + String get covidSelectProcedure => + localizedValues["covid-select-procedure"][locale.languageCode]; String get onlineConsultation => localizedValues["online-consultation"][locale.languageCode]; String get expectedWaiting => diff --git a/lib/widgets/buttons/secondary_button.dart b/lib/widgets/buttons/secondary_button.dart index b5a4655a..8c4ba851 100644 --- a/lib/widgets/buttons/secondary_button.dart +++ b/lib/widgets/buttons/secondary_button.dart @@ -241,7 +241,7 @@ class _SecondaryButtonState extends State widget.label, style: TextStyle( color: widget.textColor, - fontSize: widget.small ? 12.0 : 15.0, + fontSize: widget.small ? 12.0 : 14.0, // fontWeight: FontWeight.w800, fontFamily: projectViewModel.isArabic ? 'Cairo'