Merge branch 'development' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan-patientapp

merge-requests/341/head
Sultan Khan 4 years ago
commit ed20ba65b3

@ -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_FREE_SLOTS = 'Services/Doctors.svc/REST/COVID19_GetFreeSlots';
const GET_COVID_DRIVETHRU_PROCEDURES_LIST =
'Services/Doctors.svc/REST/COVID19_GetTestProcedures';
///Smartwatch Integration Services ///Smartwatch Integration Services
const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord'; const GET_PATIENT_LAST_RECORD = 'Services/Patients.svc/REST/Med_GetPatientLastRecord';

@ -480,11 +480,11 @@ const Map localizedValues = {
"gate": {"en": "Gate:", "ar": "بوابة"}, "gate": {"en": "Gate:", "ar": "بوابة"},
"building": {"en": "Building:", "ar": "المبنى"}, "building": {"en": "Building:", "ar": "المبنى"},
"branch": {"en": "Branch:", "ar": "الفرع"}, "branch": {"en": "Branch:", "ar": "الفرع"},
"emergencyServices": {"en": "Emergency Services:", "ar": "خدمات الطوارئ"}, "emergencyServices": {"en": "Emergency Services", "ar": "خدمات الطوارئ"},
"nearester": {"en": "Nearest ER:", "ar": "أقرب طوارى"}, "nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"},
"locationa": {"en": "location:", "ar": "الموقع"}, "locationa": {"en": "location", "ar": "الموقع"},
"ambulancerequest": {"en": "Ambulance :", "ar": "طلب نقل "}, "ambulancerequest": {"en": "Ambulance ", "ar": "طلب نقل "},
"requestA": {"en": "Request:", "ar": "اسعاف"}, "requestA": {"en": "Request", "ar": "اسعاف"},
"MyAppointments": {"en": "Appointments", "ar": "مواعيدي"}, "MyAppointments": {"en": "Appointments", "ar": "مواعيدي"},
"NoBookedAppointments": { "NoBookedAppointments": {
"en": "No Booked Appointments", "en": "No Booked Appointments",
@ -1088,8 +1088,7 @@ const Map localizedValues = {
}, },
"MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "}, "MoreDetails": {"en": "More details", "ar": " المزيد من التفاصيل "},
"SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"}, "SendCopy": {"en": "Send Copy", "ar": "ارسال نسخة"},
"ResendOrder": {"en": "Refill Order & Delivery", "ar": "إعادة طلب و توصيل"},
"ResendOrder": {"en": "Resend order & deliver", "ar": "إعادة طلب و توصيل"},
"Ports": {"en": "Ports", "ar": "المنافذ"}, "Ports": {"en": "Ports", "ar": "المنافذ"},
"Way": {"en": "Way", "ar": "الطزيقة"}, "Way": {"en": "Way", "ar": "الطزيقة"},
"Average": {"en": "Average", "ar": "المعدل"}, "Average": {"en": "Average", "ar": "المعدل"},
@ -1131,6 +1130,7 @@ const Map localizedValues = {
}, },
"question": {"en": "Question", "ar": "سؤال"}, "question": {"en": "Question", "ar": "سؤال"},
"message-type": {"en": "Message Type", "ar": "نوع الرسالة"}, "message-type": {"en": "Message Type", "ar": "نوع الرسالة"},
"feedback-type": {"en": "Feedback Type", "ar": "نوع الرسالة"},
"compliment": {"en": "compliment", "ar": "ثناء"}, "compliment": {"en": "compliment", "ar": "ثناء"},
"suggestion": {"en": "Suggestion", "ar": "إقتراح"}, "suggestion": {"en": "Suggestion", "ar": "إقتراح"},
"your-feedback": { "your-feedback": {
@ -1233,6 +1233,7 @@ const Map localizedValues = {
"ar": "حدد طريقة النقل" "ar": "حدد طريقة النقل"
}, },
"RRT-direction-heading": {"en": "Select Direction", "ar": "حدد الاتجاه"}, "RRT-direction-heading": {"en": "Select Direction", "ar": "حدد الاتجاه"},
"RRT-way-heading": {"en": "Select Way", "ar": "حدد الطريق"},
"to-hospital": {"en": "To Hospital", "ar": "الى المستشفى"}, "to-hospital": {"en": "To Hospital", "ar": "الى المستشفى"},
"from-hospital": {"en": "From Hospital", "ar": "من المستشفى"}, "from-hospital": {"en": "From Hospital", "ar": "من المستشفى"},
"one-direc": {"en": "One Way", "ar": "ذهاب"}, "one-direc": {"en": "One Way", "ar": "ذهاب"},
@ -2030,11 +2031,11 @@ const Map localizedValues = {
"ar": "علاقة الطالب" "ar": "علاقة الطالب"
}, },
"newReferral": {"en": "New Referral", "ar": "إحالة جديدة"}, "newReferral": {"en": "New Referral", "ar": "إحالة جديدة"},
"searchForReferrals": { "searchForReferrals": {"en": "Search For Referrals", "ar": "ابحث عن الإحالات"},
"en": "Search For Referrals", "covid-select-procedure": {
"ar": "ابحث عن الإحالات" "en": "Please select the procedure:",
"ar": "الرجاء تحديد الإجراء:"
}, },
"online-consultation": {"en": "Online Consultation", "ar": "استشارة مباشرة"}, "online-consultation": {"en": "Online Consultation", "ar": "استشارة مباشرة"},
"expected-weiting": { "expected-weiting": {
"en": "Waiting time to start LiveCare consultation ", "en": "Waiting time to start LiveCare consultation ",

@ -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/core/service/base_service.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart'; import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
class FeedbackService extends BaseService { class FeedbackService extends BaseService {
List<COCItem> cOCItemList = List(); List<COCItem> cOCItemList = List();
@ -26,7 +27,7 @@ class FeedbackService extends BaseService {
_requestInsertCOCItem.details = details; _requestInsertCOCItem.details = details;
_requestInsertCOCItem.cOCTypeName = cOCTypeName; _requestInsertCOCItem.cOCTypeName = cOCTypeName;
_requestInsertCOCItem.formTypeID = cOCTypeName; _requestInsertCOCItem.formTypeID = cOCTypeName;
_requestInsertCOCItem.mobileNo = user.mobileNumber; _requestInsertCOCItem.mobileNo = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
_requestInsertCOCItem.isUserLoggedIn = true; _requestInsertCOCItem.isUserLoggedIn = true;
_requestInsertCOCItem.projectID = user.projectID; _requestInsertCOCItem.projectID = user.projectID;
_requestInsertCOCItem.patientName = user.firstName + " " + user.lastName; _requestInsertCOCItem.patientName = user.firstName + " " + user.lastName;
@ -64,7 +65,7 @@ class FeedbackService extends BaseService {
hasError = false; hasError = false;
Map<String, dynamic> body = new Map<String, dynamic>(); Map<String, dynamic> body = new Map<String, dynamic>();
body['IdentificationNo'] = user.patientIdentificationNo; body['IdentificationNo'] = user.patientIdentificationNo;
body['MobileNo'] = user.mobileNumber; body['MobileNo'] = "966" + Utils.getPhoneNumberWithoutZero(user.mobileNumber);
body['Searching_type'] = '1'; body['Searching_type'] = '1';
await baseAppClient.post(GET_STATUS_FOR_COCO, await baseAppClient.post(GET_STATUS_FOR_COCO,

@ -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<String, dynamic> json) {
procedureID = json['ProcedureID'];
procedureName = json['ProcedureName'];
procedureNameN = json['ProcedureNameN'];
projectID = json['ProjectID'];
setupID = json['SetupID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ProcedureID'] = this.procedureID;
data['ProcedureName'] = this.procedureName;
data['ProcedureNameN'] = this.procedureNameN;
data['ProjectID'] = this.projectID;
data['SetupID'] = this.setupID;
return data;
}
}

@ -42,6 +42,7 @@ class _BloodSugarState extends State<BloodSugar> {
} }
void calculateBloodSugar() { void calculateBloodSugar() {
if (textController.text.isEmpty) return;
if (cardMGColor == activeCardColor) { if (cardMGColor == activeCardColor) {
inputValue = double.parse(textController.text); inputValue = double.parse(textController.text);
inputValue = inputValue / 15; inputValue = inputValue / 15;
@ -60,10 +61,18 @@ class _BloodSugarState extends State<BloodSugar> {
double inputValue = 0; double inputValue = 0;
String unit; String unit;
@override
void initState() {
updateColor(1);
unit = 'mmol/l';
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).bloodSugarConversion, appBarTitle: TranslationBase.of(context).bloodSugarConversion,
body: Padding( body: Padding(
padding: const EdgeInsets.all(16.0), padding: const EdgeInsets.all(16.0),
@ -112,8 +121,11 @@ class _BloodSugarState extends State<BloodSugar> {
onTap: () { onTap: () {
setState(() { setState(() {
updateColor(1); updateColor(1);
inputValue = double.parse(textController.text); if (textController.text.isNotEmpty) {
inputValue = inputValue / 15; inputValue =
double.parse(textController.text);
inputValue = inputValue / 15;
}
unit = 'mmol/l'; unit = 'mmol/l';
}); });
}, },
@ -126,14 +138,16 @@ class _BloodSugarState extends State<BloodSugar> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow offset: Offset(
0, 3), // changes position of shadow
), ),
], ],
color: cardMGColor, color: cardMGColor,
borderRadius: BorderRadius.circular(3.0), borderRadius: BorderRadius.circular(3.0),
), ),
child: Padding( 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'), child: Texts('MG/DLt TO \nMMOL/L'),
), ),
), ),
@ -142,8 +156,11 @@ class _BloodSugarState extends State<BloodSugar> {
onTap: () { onTap: () {
setState(() { setState(() {
updateColor(2); updateColor(2);
inputValue = double.parse(textController.text); if (textController.text.isNotEmpty) {
inputValue = inputValue * 18; inputValue =
double.parse(textController.text);
inputValue = inputValue / 18;
}
unit = 'mg/dlt'; unit = 'mg/dlt';
}); });
}, },
@ -158,12 +175,14 @@ class _BloodSugarState extends State<BloodSugar> {
color: Colors.grey.withOpacity(0.5), color: Colors.grey.withOpacity(0.5),
spreadRadius: 3, spreadRadius: 3,
blurRadius: 7, blurRadius: 7,
offset: Offset(0, 3), // changes position of shadow offset: Offset(
0, 3), // changes position of shadow
), ),
], ],
), ),
child: Padding( child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16.0), padding: const EdgeInsets.symmetric(
horizontal: 16.0),
child: Texts('\nMMOL/L TO MG/DLt '), child: Texts('\nMMOL/L TO MG/DLt '),
), ),
), ),
@ -191,7 +210,8 @@ class _BloodSugarState extends State<BloodSugar> {
keyboardType: TextInputType.number, keyboardType: TextInputType.number,
decoration: InputDecoration( decoration: InputDecoration(
labelText: TranslationBase.of(context).enterReadingValue, labelText: TranslationBase.of(context).enterReadingValue,
border: OutlineInputBorder(borderSide: BorderSide(color: Colors.black45)), border: OutlineInputBorder(
borderSide: BorderSide(color: Colors.black45)),
labelStyle: TextStyle( labelStyle: TextStyle(
color: Colors.black87, color: Colors.black87,
), ),
@ -253,7 +273,9 @@ class _BloodSugarState extends State<BloodSugar> {
label: TranslationBase.of(context).calculate, label: TranslationBase.of(context).calculate,
onTap: () { onTap: () {
setState(() { setState(() {
_visible == false ? _visible = !_visible : _visible = _visible; _visible == false
? _visible = !_visible
: _visible = _visible;
calculateBloodSugar(); calculateBloodSugar();
}); });
}, },

@ -93,6 +93,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
service service
.getDoctorsListByName(doctorNameController.text, context) .getDoctorsListByName(doctorNameController.text, context)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
if (res['DoctorList'].length != 0) { if (res['DoctorList'].length != 0) {
@ -129,9 +130,12 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
navigateToSearchResults( navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital); context, doctorsList, _patientDoctorAppointmentListHospital);
} else { } else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']); AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
} }
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err); print(err);
}); });
} }

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart'; import 'package:diplomaticquarterapp/models/Appointments/FreeSlot.dart';
import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart'; import 'package:diplomaticquarterapp/models/Appointments/PatientShareResposne.dart';
import 'package:diplomaticquarterapp/models/Appointments/timeSlot.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/pages/Covid-DriveThru/covid-payment-alert.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart'; import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart'; import 'package:diplomaticquarterapp/services/covid-drivethru/covid-drivethru.dart';
@ -27,6 +28,7 @@ class CovidTimeSlots extends StatefulWidget {
static DateTime selectedAppoDateTime; static DateTime selectedAppoDateTime;
static String selectedDate; static String selectedDate;
static String selectedTime; static String selectedTime;
CovidTestProceduresResponse selectedProcedure;
int selectedClinicID; int selectedClinicID;
int selectedDoctorID; int selectedDoctorID;
@ -35,7 +37,7 @@ class CovidTimeSlots extends StatefulWidget {
PatientShareResponse patientShareResponse; PatientShareResponse patientShareResponse;
CovidTimeSlots({@required this.projectID}); CovidTimeSlots({@required this.projectID, @required this.selectedProcedure});
@override @override
_CovidTimeSlotsState createState() => _CovidTimeSlotsState(); _CovidTimeSlotsState createState() => _CovidTimeSlotsState();
@ -94,10 +96,12 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
super.dispose(); 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'); final DateFormat formatter = DateFormat('yyyy-MM-dd');
setState(() { setState(() {
this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(day, projectViewModel.isArabic ? "ar" : "en"); this.selectedDate = DateUtil.getWeekDayMonthDayYearDateFormatted(
day, projectViewModel.isArabic ? "ar" : "en");
openTimeSlotsPickerForDate(day, docFreeSlots); openTimeSlotsPickerForDate(day, docFreeSlots);
CovidTimeSlots.selectedDate = formatter.format(day); CovidTimeSlots.selectedDate = formatter.format(day);
print(CovidTimeSlots.selectedDate); print(CovidTimeSlots.selectedDate);
@ -260,7 +264,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
onPressed: () { onPressed: () {
bookCovidTestAppointment(); 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<CovidTimeSlots>
}, },
), ),
onDaySelected: (date, event, _) { onDaySelected: (date, event, _) {
_onDaySelected( _onDaySelected(date, event, projectViewModel);
date,
event,
projectViewModel
);
_animationController.forward(from: 0.0); _animationController.forward(from: 0.0);
}, },
onVisibleDaysChanged: _onVisibleDaysChanged, onVisibleDaysChanged: _onVisibleDaysChanged,
@ -494,7 +495,8 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots>
docObject.projectID, docObject.projectID,
CovidTimeSlots.selectedTime, CovidTimeSlots.selectedTime,
CovidTimeSlots.selectedDate, CovidTimeSlots.selectedDate,
context) context,
widget.selectedProcedure.procedureID)
.then((res) { .then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
AppToast.showSuccessToast(message: "Appointment Booked Successfully"); AppToast.showSuccessToast(message: "Appointment Booked Successfully");

@ -1,5 +1,7 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.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/models/CovidDriveThru/DriveThroughTestingCenterModel.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart'; import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-payment-details.dart';
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
@ -22,6 +24,7 @@ class CovidDrivethruLocation extends StatefulWidget {
class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> { class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectDropdownValue; String projectDropdownValue;
List<DriveThroughTestingCenterModel> projectsList = []; List<DriveThroughTestingCenterModel> projectsList = [];
List<CovidTestProceduresResponse> proceduresList = [];
bool isLocationSelected = false; bool isLocationSelected = false;
String projectLat = ""; String projectLat = "";
String projectLong = ""; String projectLong = "";
@ -42,21 +45,32 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
imageAr: imageAr:
'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'), 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
); );
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin) {
getProjectsList(context);
getTestProcedures(context);
}
});
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(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( return AppScaffold(
appBarTitle: TranslationBase.of(context).covidTest, appBarTitle: TranslationBase.of(context).covidTest,
isShowAppBar: true, isShowAppBar: true,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
description: TranslationBase.of(context).covidInfo, description: TranslationBase.of(context).covidInfo,
isShowDecPage: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0), margin: EdgeInsets.fromLTRB(15.0, 15.0, 15.0, 0.0),
child: Column( child: Column(
mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic
@ -147,94 +161,98 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
this.projectLong + this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"), "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
) )
: Container(), : SizedBox(
], height: MediaQuery.of(context).size.height * 0.35,
), ),
), Container(
), height: MediaQuery.of(context).size.height * 0.15,
bottomSheet: Container( width: double.infinity,
height: MediaQuery.of(context).size.height * 0.15, child: Column(
width: double.infinity, children: <Widget>[
child: Column( Container(
children: <Widget>[ margin: EdgeInsets.only(top: 10.0),
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: <Widget>[
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
child: ButtonTheme( child: ButtonTheme(
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: MediaQuery.of(context).size.width * 0.7, minWidth: MediaQuery.of(context).size.width * 0.91,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF60686b), color: new Color(0xFFc5272d),
textColor: Colors.white, textColor: Colors.white,
disabledTextColor: Colors.white, disabledTextColor: Colors.white,
disabledColor: Colors.grey[500], disabledColor: Colors.red[300],
onPressed: () { onPressed: () {
back(); getDirections();
}, },
child: Text(TranslationBase.of(context).back, child: Text(TranslationBase.of(context).getDirections,
style: TextStyle(fontSize: 18.0)), style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
), Container(
Expanded( margin: EdgeInsets.fromLTRB(10.0, 5.0, 10.0, 5.0),
flex: 1, child: Flex(
child: Container( direction: Axis.horizontal,
margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0), children: <Widget>[
child: ButtonTheme( Expanded(
shape: RoundedRectangleBorder( flex: 1,
borderRadius: BorderRadius.circular(10.0), child: Container(
), margin: EdgeInsets.fromLTRB(10.0, 0.0, 5.0, 0.0),
minWidth: MediaQuery.of(context).size.width * 0.7, child: ButtonTheme(
height: 45.0, shape: RoundedRectangleBorder(
child: RaisedButton( borderRadius: BorderRadius.circular(10.0),
color: new Color(0xFF60686b), ),
textColor: Colors.white, minWidth:
disabledTextColor: Colors.white, MediaQuery.of(context).size.width * 0.7,
disabledColor: Colors.grey[500], height: 45.0,
onPressed: () { child: RaisedButton(
next(); color: new Color(0xFF60686b),
}, textColor: Colors.white,
child: Text(TranslationBase.of(context).next, disabledTextColor: Colors.white,
style: TextStyle(fontSize: 18.0)), 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<CovidDrivethruLocation> {
getPaymentInfo(BuildContext context, String projectID) { getPaymentInfo(BuildContext context, String projectID) {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
CovidPaymentInfoResponse covidPaymentInfoResponse = CovidPaymentInfoResponse covidPaymentInfoResponse =
new CovidPaymentInfoResponse(); new CovidPaymentInfoResponse();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service
.getCovidPaymentInformation(context, int.parse(projectID)) .getCovidPaymentInformation(
context, int.parse(projectID), proceduresList[0].procedureID)
.then((res) { .then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
covidPaymentInfoResponse = covidPaymentInfoResponse =
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
print(covidPaymentInfoResponse.procedureNameField);
}); });
Navigator.push( Navigator.push(
context, context,
@ -301,6 +316,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
page: CovidPaymentDetails( page: CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse, covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID), projectID: int.parse(projectID),
proceduresList: proceduresList,
))); )));
} else {} } else {}
}).catchError((err) { }).catchError((err) {
@ -308,13 +324,36 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
}); });
} }
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) { getProjectsList(BuildContext context) {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service.getCovidProjectsList(context).then((res) { service.getCovidProjectsList(context).then((res) {
print(res);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
print(res);
setState(() { setState(() {
res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) { res['List_COVID19_ProjectDriveThroughTestingCenter'].forEach((v) {
projectsList.add(new DriveThroughTestingCenterModel.fromJson(v)); projectsList.add(new DriveThroughTestingCenterModel.fromJson(v));

@ -1,5 +1,8 @@
import 'package:diplomaticquarterapp/models/CovidDriveThru/CovidPaymentInfoResponse.dart'; 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/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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.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 { class CovidPaymentDetails extends StatefulWidget {
CovidPaymentInfoResponse covidPaymentInfoResponse; CovidPaymentInfoResponse covidPaymentInfoResponse;
int projectID; int projectID;
List<CovidTestProceduresResponse> proceduresList;
CovidTestProceduresResponse selectedProcedure;
CovidPaymentDetails( CovidPaymentDetails(
{@required this.covidPaymentInfoResponse, @required this.projectID}); {@required this.covidPaymentInfoResponse,
@required this.projectID,
@required this.proceduresList});
@override @override
_CovidPaymentDetailsState createState() => _CovidPaymentDetailsState(); _CovidPaymentDetailsState createState() => _CovidPaymentDetailsState();
@ -21,6 +28,13 @@ class CovidPaymentDetails extends StatefulWidget {
class _CovidPaymentDetailsState extends State<CovidPaymentDetails> { class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
bool isAgree = false; bool isAgree = false;
@override
void initState() {
print(widget.proceduresList[0].procedureName);
widget.selectedProcedure = widget.proceduresList[0];
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( return AppScaffold(
@ -28,7 +42,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
isShowAppBar: true, isShowAppBar: true,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( 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( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
@ -82,13 +96,75 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
color: Colors.white), color: Colors.white),
margin: EdgeInsets.fromLTRB(0.0, 30.0, 0.0, 5.0), 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( child: Column(
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: Alignment.center, alignment: Alignment.center,
margin: 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: <Widget>[
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, child: Text(TranslationBase.of(context).testFee,
style: TextStyle( style: TextStyle(
color: Colors.black, color: Colors.black,
@ -144,7 +220,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
isAgree = !isAgree; isAgree = !isAgree;
}); });
}, },
activeColor: Colors.blue, activeColor: Color(0xffB8382C),
), ),
Texts(TranslationBase.of(context) Texts(TranslationBase.of(context)
.iAgreeToTheTermsAndConditions), .iAgreeToTheTermsAndConditions),
@ -238,6 +314,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
FadePage( FadePage(
page: CovidTimeSlots( page: CovidTimeSlots(
projectID: widget.projectID, projectID: widget.projectID,
selectedProcedure: widget.selectedProcedure,
))); )));
} }
@ -245,6 +322,34 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
Navigator.pop(context); 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) { _getNormalText(text) {
return Container( return Container(
margin: EdgeInsets.only(top: 20.0, right: 10.0), margin: EdgeInsets.only(top: 20.0, right: 10.0),

@ -206,7 +206,7 @@ class _SelectTransportationMethodState
SizedBox( SizedBox(
height: 8, height: 8,
), ),
Texts(TranslationBase.of(context).directionHeading), Texts(TranslationBase.of(context).wayHeading),
SizedBox( SizedBox(
height: 5, height: 5,
), ),

@ -46,6 +46,7 @@ class _ErOptionsState extends State<ErOptions> {
return AppScaffold( return AppScaffold(
isShowAppBar: widget.isAppbar, isShowAppBar: widget.isAppbar,
appBarTitle: TranslationBase.of(context).bookAppo, appBarTitle: TranslationBase.of(context).bookAppo,
isShowDecPage: false,
body: Container( body: Container(
margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0), margin: EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 10.0),
child: Column( child: Column(

@ -31,6 +31,7 @@ class NearestEr extends StatelessWidget {
: (model) => model.getProjectAvgERWaitingTimeOrders(), : (model) => model.getProjectAvgERWaitingTimeOrders(),
builder: (_, mode, widget) => AppScaffold( builder: (_, mode, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).NearestEr, appBarTitle: TranslationBase.of(context).NearestEr,
baseViewModel: mode, baseViewModel: mode,
body: mode.ProjectAvgERWaitingTimeModeList.length > 0 body: mode.ProjectAvgERWaitingTimeModeList.length > 0

@ -195,7 +195,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
widgetBuilder: (_, CurrentRemainingTime time) { widgetBuilder: (_, CurrentRemainingTime time) {
return time != null return time != null
? Text( ? 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) TranslationBase.of(context)
.upcomingTimeLeft, .upcomingTimeLeft,
style: TextStyle( style: TextStyle(

@ -82,121 +82,109 @@ class _HomePageState extends State<HomePage> {
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Visibility( child: Container(
// visible: height: 125,
// model.user.outSA == 1 padding: EdgeInsets.all(5),
// ? false margin: EdgeInsets.all(5),
// : true, 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( child: Container(
height: 125, child: Column(
padding: EdgeInsets.all(5), children: <Widget>[
margin: EdgeInsets.all(5), Texts(
decoration: BoxDecoration( TranslationBase.of(context)
image: DecorationImage( .covidTest,
image: AssetImage( color: Colors.white,
"assets/images/new-design/covid_bg_transparent.png"), fontWeight: FontWeight.w700,
fit: BoxFit.fill,
), ),
color: Colors.white Row(
.withOpacity(0.3), mainAxisAlignment:
borderRadius: BorderRadius.all( MainAxisAlignment
Radius.circular(5))), .spaceAround,
child: Container( children: <Widget>[
child: Column( Container(
children: <Widget>[ margin: EdgeInsets.only(
Texts( top: 15.0,
TranslationBase.of(context)
.covidTest,
color: Colors.white,
fontWeight: FontWeight.w700,
),
Row(
mainAxisAlignment:
MainAxisAlignment
.spaceAround,
children: <Widget>[
Container(
margin: EdgeInsets.only(
top: 15.0,
),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
), ),
Container( child: SvgPicture.asset(
margin: EdgeInsets.only( 'assets/images/new-design/covid-19-car.svg',
top: 5.0), width: 45.0,
child: Column( height: 45.0),
children: <Widget>[ ),
Texts( Container(
TranslationBase.of( margin: EdgeInsets.only(
context) top: 5.0),
.driveThru, child: Column(
fontWeight: children: <Widget>[
FontWeight Texts(
.w700, TranslationBase.of(
color: context)
Colors.white, .driveThru,
fontWeight:
FontWeight.w700,
color: Colors.white,
),
ButtonTheme(
shape:
RoundedRectangleBorder(
borderRadius:
BorderRadius
.circular(
5.0),
), ),
ButtonTheme( minWidth: MediaQuery.of(
shape: context)
RoundedRectangleBorder( .size
borderRadius: .width *
BorderRadius 0.15,
.circular( height: 25.0,
5.0), child: RaisedButton(
), color: Colors
minWidth: MediaQuery.of( .red[800],
context) textColor:
.size Colors.white,
.width * disabledTextColor:
0.15, Colors.white,
height: 25.0, disabledColor:
child: new Color(
RaisedButton( 0xFFbcc2c4),
color: Colors onPressed: () {
.red[800], navigateToCovidDriveThru();
textColor: },
Colors child: Center(
.white,
disabledTextColor:
Colors
.white,
disabledColor:
new Color(
0xFFbcc2c4),
onPressed: () {
navigateToCovidDriveThru();
},
child: Center( child: Center(
child: Center( child: Center(
child: child:
Center( Center(
child: child:
Center( Texts(
child: TranslationBase.of(context)
Texts( .bookNow,
TranslationBase.of(context) fontWeight:
.bookNow, FontWeight.w700,
fontWeight: color: Colors
FontWeight.w700, .white,
color:
Colors.white,
),
), ),
), ),
), ),
), ),
), ),
), ),
], ),
), ],
), ),
], ),
), ],
], ),
), ],
), ),
), ),
), ),
@ -564,7 +552,6 @@ class _HomePageState extends State<HomePage> {
if (projectViewModel.havePrivilege(64) || if (projectViewModel.havePrivilege(64) ||
projectViewModel.havePrivilege(65) || projectViewModel.havePrivilege(65) ||
projectViewModel.havePrivilege(67)) projectViewModel.havePrivilege(67))
// if (model.user.outSA == 0)
Container( Container(
margin: EdgeInsets.only(left: 15, right: 15), margin: EdgeInsets.only(left: 15, right: 15),
child: Row( child: Row(
@ -572,39 +559,52 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[ children: <Widget>[
if (projectViewModel.havePrivilege(64)) if (projectViewModel.havePrivilege(64))
DashboardItem( DashboardItem(
onTap: () { onTap: (model.user != null && model.user.outSA == 1)
Navigator.push( ? () {}
context, : () {
FadePage( Navigator.push(
page: HomeHealthCarePage(), context,
), FadePage(
); page: HomeHealthCarePage(),
}, ),
);
},
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: (model.user != null &&
children: <Widget>[ model.user.outSA == 1)
Image.asset( ? Container(
'assets/images/home_health_care_icon.png', width: double.infinity,
width: 50, height: double.infinity,
height: 50, color: Colors.grey.withOpacity(0.7),
), child: Icon(
SizedBox( Icons.lock_outline,
height: 10, size: 40,
), ),
Texts( )
TranslationBase.of(context) : Column(
.homeHealthCare, children: <Widget>[
textAlign: TextAlign.center, Image.asset(
color: Colors.white, 'assets/images/home_health_care_icon.png',
fontWeight: FontWeight.w700, width: 50,
fontSize: height: 50,
SizeConfig.textMultiplier * 1.55, ),
) 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, height: MediaQuery.of(context).size.width * 0.4,
imageName: 'home_healthcare_service_bg.png', imageName: 'home_healthcare_service_bg.png',
@ -612,31 +612,52 @@ class _HomePageState extends State<HomePage> {
), ),
if (projectViewModel.havePrivilege(65)) if (projectViewModel.havePrivilege(65))
DashboardItem( DashboardItem(
onTap: () => getPharmacyToken(model), onTap: () =>
(model.user != null && model.user.outSA == 1)
? () {}
: getPharmacyToken(model),
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: (model.user != null &&
children: <Widget>[ model.user.outSA == 1)
Image.asset( ? Container(
'assets/images/pharmacy_logo.png', width: double.infinity,
width: 40, height: double.infinity,
height: 40, color: Colors.grey.withOpacity(0.7),
), child: Icon(
SizedBox( Icons.lock_outline,
height: 20, size: 40,
), ),
Texts( )
TranslationBase.of(context) : Column(
.onlinePharmacy, children: <Widget>[
textAlign: TextAlign.center, // if (projectViewModel.user != null && model.isLogin && model.user.outSA == 1)
color: Colors.white, // Image.asset(
fontWeight: FontWeight.w700, // 'assets/images/lock_icon.png',
fontSize: // width: 50,
SizeConfig.textMultiplier * 1.55, // 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, height: MediaQuery.of(context).size.width * 0.4,
@ -644,38 +665,52 @@ class _HomePageState extends State<HomePage> {
), ),
if (projectViewModel.havePrivilege(67)) if (projectViewModel.havePrivilege(67))
DashboardItem( DashboardItem(
onTap: () { onTap: (model.user != null && model.user.outSA == 1)
Navigator.push( ? () {}
context, : () {
FadePage( Navigator.push(
page: CMCPage(), context,
), FadePage(
); page: CMCPage(),
}, ),
);
},
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
child: Column( child: (model.user != null &&
children: <Widget>[ model.user.outSA == 1)
Image.asset( ? Container(
'assets/images/comprehensive_medical_checkup_logo.png', width: double.infinity,
width: 50, height: double.infinity,
height: 50, color: Colors.grey.withOpacity(0.7),
), child: Icon(
SizedBox( Icons.lock_outline,
height: 10, size: 40,
), ),
Texts( )
TranslationBase.of(context).cmcHeading, : Column(
textAlign: TextAlign.center, children: <Widget>[
color: Colors.white, Image.asset(
fontWeight: FontWeight.w700, 'assets/images/comprehensive_medical_checkup_logo.png',
fontSize: width: 50,
SizeConfig.textMultiplier * 1.55, 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, height: MediaQuery.of(context).size.width * 0.4,
color: HexColor("#747C80"), color: HexColor("#747C80"),

@ -104,7 +104,8 @@ class _RequestTypePageState extends State<RequestTypePage> {
), ),
bottomSheet: Container( bottomSheet: Container(
width: double.maxFinite, width: double.maxFinite,
height: MediaQuery.of(context).size.height * 0.1, // height: MediaQuery.of(context).size.height * 0.1,
height: 80.0,
child: Padding( child: Padding(
padding: const EdgeInsets.all(12.0), padding: const EdgeInsets.all(12.0),
child: SecondaryButton( child: SecondaryButton(

@ -8,7 +8,6 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'advance_payment_page.dart'; import 'advance_payment_page.dart';
@ -105,12 +104,12 @@ class MyBalancePage extends StatelessWidget {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.12, // height: MediaQuery.of(context).size.height * 0.12,
height: 70.0,
color: Colors.white, color: Colors.white,
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
child: SecondaryButton( child: SecondaryButton(
// color: Colors.grey[900],
textColor: Colors.white, textColor: Colors.white,
label: TranslationBase.of(context).createAdvancedPayment, label: TranslationBase.of(context).createAdvancedPayment,
onTap: () { onTap: () {

@ -321,7 +321,7 @@ class DoctorsListService extends BaseService {
} }
Future<Map> insertAppointment(int docID, int clinicID, int projectID, Future<Map> insertAppointment(int docID, int clinicID, int projectID,
String selectedTime, String selectedDate, BuildContext context) async { String selectedTime, String selectedDate, BuildContext context, [String procedureID]) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -341,6 +341,7 @@ class DoctorsListService extends BaseService {
"StartTime": selectedTime, "StartTime": selectedTime,
"SelectedTime": selectedTime, "SelectedTime": selectedTime,
"EndTime": selectedTime, "EndTime": selectedTime,
"ProcedureID": procedureID,
"InitialSlotDuration": 0, "InitialSlotDuration": 0,
"StrAppointmentDate": selectedDate, "StrAppointmentDate": selectedDate,
"IsVirtual": false, "IsVirtual": false,

@ -50,7 +50,43 @@ class CovidDriveThruService extends BaseService {
return Future.value(localRes); return Future.value(localRes);
} }
Future<Map> getCovidPaymentInformation(BuildContext context, int projectID) async { Future<Map> getCovidTestProceduresList(BuildContext context) async {
Map<String, dynamic> 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<Map> getCovidPaymentInformation(BuildContext context, int projectID, String procedureID) async {
Map<String, dynamic> request; Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -65,6 +101,7 @@ class CovidDriveThruService extends BaseService {
"LanguageID": languageID == 'ar' ? 1 : 2, "LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20", "IPAdress": "10.20.10.20",
"ProjectID": projectID, "ProjectID": projectID,
"ProcedureId": procedureID,
"VersionID": req.VersionID, "VersionID": req.VersionID,
"Channel": req.Channel, "Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958', "generalid": 'Cs2020@2016\$2958',

@ -89,7 +89,7 @@ class PharmacyAddressService extends BaseService {
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body["customer"] = customerObject; body["customer"] = customerObject;
await baseAppClient.post("$url", onSuccess: (response, statusCode) async { await baseAppClient.postPharmacy("$url", onSuccess: (response, statusCode) async {
addresses.clear(); addresses.clear();
response['customers'][0]['addresses'].forEach((item) { response['customers'][0]['addresses'].forEach((item) {
addresses.add(Addresses.fromJson(item)); addresses.add(Addresses.fromJson(item));

@ -4,7 +4,8 @@ import 'package:intl/intl.dart';
class DateUtil { class DateUtil {
/// convert String To Date function /// convert String To Date function
/// [date] String we want to convert /// [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) { if (date != null) {
const start = "/Date("; const start = "/Date(";
const end = "+0300)"; 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 /// get data formatted like Apr 26,2020
/// [dateTime] convert DateTime to data formatted /// [dateTime] convert DateTime to data formatted
static String getMonthDayYearDateFormatted(DateTime dateTime) { static String getMonthDayYearDateFormatted(DateTime dateTime) {
@ -253,6 +273,7 @@ class DateUtil {
else else
return ""; return "";
} }
/// get data formatted like Apr 26,2020 /// get data formatted like Apr 26,2020
/// [dateTime] convert DateTime to data formatted Arabic /// [dateTime] convert DateTime to data formatted Arabic
static String getMonthDayYearDateFormattedAr(DateTime dateTime) { static String getMonthDayYearDateFormattedAr(DateTime dateTime) {
@ -270,9 +291,12 @@ class DateUtil {
/// [dateTime] convert DateTime to date formatted /// [dateTime] convert DateTime to date formatted
static String getWeekDayMonthDayYearDateFormatted( static String getWeekDayMonthDayYearDateFormatted(
DateTime dateTime, String lang) { DateTime dateTime, String lang) {
// print(dateTime);
// print(dateTime.weekday);
// print(dateTime.weekday.getDayOfWeekEnumValue.value);
if (dateTime != null) if (dateTime != null)
return lang == 'en' return lang == 'en'
? getDay(dateTime.weekday.getDayOfWeekEnumValue) + ? getWeekDayEnglish(dateTime.weekday) +
", " + ", " +
getMonth(dateTime.month) + getMonth(dateTime.month) +
" " + " " +
@ -357,9 +381,8 @@ class DateUtil {
return ""; return "";
} }
static String getFormattedDate(DateTime dateTime, String formattedString){ static String getFormattedDate(DateTime dateTime, String formattedString) {
return DateFormat(formattedString) return DateFormat(formattedString).format(dateTime);
.format(dateTime);
} }
static convertISODateToJsonDate(String isoDate) { static convertISODateToJsonDate(String isoDate) {

@ -1132,6 +1132,8 @@ class TranslationBase {
localizedValues['RRT-transport-heading'][locale.languageCode]; localizedValues['RRT-transport-heading'][locale.languageCode];
String get directionHeading => String get directionHeading =>
localizedValues['RRT-direction-heading'][locale.languageCode]; 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 toHospital => localizedValues['to-hospital'][locale.languageCode];
String get fromHospital => String get fromHospital =>
localizedValues['from-hospital'][locale.languageCode]; localizedValues['from-hospital'][locale.languageCode];
@ -1624,6 +1626,8 @@ class TranslationBase {
String get insuranceID => String get insuranceID =>
localizedValues["insurance-id"][locale.languageCode]; localizedValues["insurance-id"][locale.languageCode];
String get enterFile => localizedValues["enter-file"][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 allow => localizedValues["allow"][locale.languageCode];
String get reject => localizedValues["reject"][locale.languageCode]; String get reject => localizedValues["reject"][locale.languageCode];
String get enterReferralRequesterName => String get enterReferralRequesterName =>
@ -1635,6 +1639,8 @@ class TranslationBase {
String get newReferral => localizedValues["newReferral"][locale.languageCode]; String get newReferral => localizedValues["newReferral"][locale.languageCode];
String get searchForReferrals => String get searchForReferrals =>
localizedValues["searchForReferrals"][locale.languageCode]; localizedValues["searchForReferrals"][locale.languageCode];
String get covidSelectProcedure =>
localizedValues["covid-select-procedure"][locale.languageCode];
String get onlineConsultation => String get onlineConsultation =>
localizedValues["online-consultation"][locale.languageCode]; localizedValues["online-consultation"][locale.languageCode];
String get expectedWaiting => String get expectedWaiting =>

@ -241,7 +241,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
widget.label, widget.label,
style: TextStyle( style: TextStyle(
color: widget.textColor, color: widget.textColor,
fontSize: widget.small ? 12.0 : 15.0, fontSize: widget.small ? 12.0 : 14.0,
// fontWeight: FontWeight.w800, // fontWeight: FontWeight.w800,
fontFamily: projectViewModel.isArabic fontFamily: projectViewModel.isArabic
? 'Cairo' ? 'Cairo'

Loading…
Cancel
Save