diff --git a/lib/config/config.dart b/lib/config/config.dart index 0f8df420..d5e7054a 100644 --- a/lib/config/config.dart +++ b/lib/config/config.dart @@ -14,12 +14,12 @@ const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://hmgwebservices.com/'; // Pharmacy UAT URLs -// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; -// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; +const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // Pharmacy Production URLs -const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; -const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; +// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/'; +// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/'; const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity'; diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 4cababb4..c8fcb5ca 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -1078,7 +1078,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": "المعدل"}, 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/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/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart index aded1a3b..3dda95f9 100644 --- a/lib/pages/feedback/send_feedback_page.dart +++ b/lib/pages/feedback/send_feedback_page.dart @@ -418,7 +418,7 @@ class _SendFeedbackPageState extends State { ), ), bottomSheet: Container( - height: MediaQuery.of(context).size.height * 0.09, + height: 80.0, width: double.infinity, padding: EdgeInsets.all(15.0), child: Center( 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 8f80eeeb..b9cd6b53 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/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 9f959885..2ebfee2f 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) {