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

@ -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 ",

@ -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<COCItem> 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<String, dynamic> body = new Map<String, dynamic>();
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,

@ -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() {
if (textController.text.isEmpty) return;
if (cardMGColor == activeCardColor) {
inputValue = double.parse(textController.text);
inputValue = inputValue / 15;
@ -60,10 +61,18 @@ class _BloodSugarState extends State<BloodSugar> {
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<BloodSugar> {
onTap: () {
setState(() {
updateColor(1);
inputValue = double.parse(textController.text);
if (textController.text.isNotEmpty) {
inputValue =
double.parse(textController.text);
inputValue = inputValue / 15;
}
unit = 'mmol/l';
});
},
@ -126,14 +138,16 @@ class _BloodSugarState extends State<BloodSugar> {
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<BloodSugar> {
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<BloodSugar> {
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<BloodSugar> {
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<BloodSugar> {
label: TranslationBase.of(context).calculate,
onTap: () {
setState(() {
_visible == false ? _visible = !_visible : _visible = _visible;
_visible == false
? _visible = !_visible
: _visible = _visible;
calculateBloodSugar();
});
},

@ -93,6 +93,7 @@ class _SearchByDoctorState extends State<SearchByDoctor> {
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<SearchByDoctor> {
navigateToSearchResults(
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: 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/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<CovidTimeSlots>
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<CovidTimeSlots>
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<CovidTimeSlots>
},
),
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<CovidTimeSlots>
docObject.projectID,
CovidTimeSlots.selectedTime,
CovidTimeSlots.selectedDate,
context)
context,
widget.selectedProcedure.procedureID)
.then((res) {
if (res['MessageStatus'] == 1) {
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/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<CovidDrivethruLocation> {
String projectDropdownValue;
List<DriveThroughTestingCenterModel> projectsList = [];
List<CovidTestProceduresResponse> proceduresList = [];
bool isLocationSelected = false;
String projectLat = "";
String projectLong = "";
@ -42,21 +45,32 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
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: <Widget>[
Container(
alignment: projectViewModel.isArabic
@ -147,12 +161,10 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
this.projectLong +
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
)
: Container(),
],
),
: SizedBox(
height: MediaQuery.of(context).size.height * 0.35,
),
),
bottomSheet: Container(
Container(
height: MediaQuery.of(context).size.height * 0.15,
width: double.infinity,
child: Column(
@ -191,7 +203,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
minWidth:
MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
@ -215,7 +228,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width * 0.7,
minWidth:
MediaQuery.of(context).size.width * 0.7,
height: 45.0,
child: RaisedButton(
color: new Color(0xFF60686b),
@ -237,6 +251,10 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
],
),
),
],
),
),
),
);
}
@ -279,21 +297,18 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
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<CovidDrivethruLocation> {
page: CovidPaymentDetails(
covidPaymentInfoResponse: covidPaymentInfoResponse,
projectID: int.parse(projectID),
proceduresList: proceduresList,
)));
} else {}
}).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) {
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));

@ -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<CovidTestProceduresResponse> 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<CovidPaymentDetails> {
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<CovidPaymentDetails> {
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: <Widget>[
@ -82,13 +96,75 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
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: <Widget>[
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: <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,
style: TextStyle(
color: Colors.black,
@ -144,7 +220,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
isAgree = !isAgree;
});
},
activeColor: Colors.blue,
activeColor: Color(0xffB8382C),
),
Texts(TranslationBase.of(context)
.iAgreeToTheTermsAndConditions),
@ -238,6 +314,7 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
FadePage(
page: CovidTimeSlots(
projectID: widget.projectID,
selectedProcedure: widget.selectedProcedure,
)));
}
@ -245,6 +322,34 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
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),

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

@ -46,6 +46,7 @@ class _ErOptionsState extends State<ErOptions> {
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(

@ -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

@ -195,7 +195,7 @@ class _ApointmentCardState extends State<AppointmentCard> {
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(

@ -82,11 +82,6 @@ class _HomePageState extends State<HomePage> {
child: Row(
children: <Widget>[
Expanded(
child: Visibility(
// visible:
// model.user.outSA == 1
// ? false
// : true,
child: Container(
height: 125,
padding: EdgeInsets.all(5),
@ -97,8 +92,8 @@ class _HomePageState extends State<HomePage> {
"assets/images/new-design/covid_bg_transparent.png"),
fit: BoxFit.fill,
),
color: Colors.white
.withOpacity(0.3),
color:
Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.all(
Radius.circular(5))),
child: Container(
@ -134,10 +129,8 @@ class _HomePageState extends State<HomePage> {
context)
.driveThru,
fontWeight:
FontWeight
.w700,
color:
Colors.white,
FontWeight.w700,
color: Colors.white,
),
ButtonTheme(
shape:
@ -153,16 +146,13 @@ class _HomePageState extends State<HomePage> {
.width *
0.15,
height: 25.0,
child:
RaisedButton(
child: RaisedButton(
color: Colors
.red[800],
textColor:
Colors
.white,
Colors.white,
disabledTextColor:
Colors
.white,
Colors.white,
disabledColor:
new Color(
0xFFbcc2c4),
@ -171,8 +161,7 @@ class _HomePageState extends State<HomePage> {
},
child: Center(
child: Center(
child:
Center(
child: Center(
child:
Center(
child:
@ -181,8 +170,8 @@ class _HomePageState extends State<HomePage> {
.bookNow,
fontWeight:
FontWeight.w700,
color:
Colors.white,
color: Colors
.white,
),
),
),
@ -200,7 +189,6 @@ class _HomePageState extends State<HomePage> {
),
),
),
),
Expanded(
child: InkWell(
onTap: () => Navigator.push(context,
@ -564,7 +552,6 @@ class _HomePageState extends State<HomePage> {
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,7 +559,9 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[
if (projectViewModel.havePrivilege(64))
DashboardItem(
onTap: () {
onTap: (model.user != null && model.user.outSA == 1)
? () {}
: () {
Navigator.push(
context,
FadePage(
@ -583,7 +572,18 @@ class _HomePageState extends State<HomePage> {
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
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: <Widget>[
Image.asset(
'assets/images/home_health_care_icon.png',
@ -600,11 +600,11 @@ class _HomePageState extends State<HomePage> {
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize:
SizeConfig.textMultiplier * 1.55,
SizeConfig.textMultiplier *
1.55,
)
],
),
),
)),
),
height: MediaQuery.of(context).size.width * 0.4,
imageName: 'home_healthcare_service_bg.png',
@ -612,12 +612,32 @@ class _HomePageState extends State<HomePage> {
),
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(
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: <Widget>[
// 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,
@ -633,7 +653,8 @@ class _HomePageState extends State<HomePage> {
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize:
SizeConfig.textMultiplier * 1.55,
SizeConfig.textMultiplier *
1.55,
)
],
),
@ -644,7 +665,9 @@ class _HomePageState extends State<HomePage> {
),
if (projectViewModel.havePrivilege(67))
DashboardItem(
onTap: () {
onTap: (model.user != null && model.user.outSA == 1)
? () {}
: () {
Navigator.push(
context,
FadePage(
@ -655,7 +678,18 @@ class _HomePageState extends State<HomePage> {
child: Center(
child: Padding(
padding: const EdgeInsets.all(15.0),
child: Column(
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: <Widget>[
Image.asset(
'assets/images/comprehensive_medical_checkup_logo.png',
@ -666,16 +700,17 @@ class _HomePageState extends State<HomePage> {
height: 10,
),
Texts(
TranslationBase.of(context).cmcHeading,
TranslationBase.of(context)
.cmcHeading,
textAlign: TextAlign.center,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize:
SizeConfig.textMultiplier * 1.55,
SizeConfig.textMultiplier *
1.55,
)
],
),
),
)),
),
height: MediaQuery.of(context).size.width * 0.4,
color: HexColor("#747C80"),

@ -104,7 +104,8 @@ class _RequestTypePageState extends State<RequestTypePage> {
),
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(

@ -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: () {

@ -321,7 +321,7 @@ class DoctorsListService extends BaseService {
}
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;
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,

@ -50,7 +50,43 @@ class CovidDriveThruService extends BaseService {
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;
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',

@ -89,7 +89,7 @@ class PharmacyAddressService extends BaseService {
Map<String, dynamic> 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));

@ -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) {

@ -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 =>

@ -241,7 +241,7 @@ class _SecondaryButtonState extends State<SecondaryButton>
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'

Loading…
Cancel
Save