Merge branch 'development_new_design_2.0' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into development_new_design_2.0

merge-requests/390/head
Sultan Khan 5 years ago
commit d2d22ff1fc

@ -901,9 +901,9 @@ const Map localizedValues = {
"YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "I Accept the Terms And Conditions"}, "YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "I Accept the Terms And Conditions"},
"RRTDDetails": { "RRTDDetails": {
"en": "en":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home", "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home",
"ar": "ar":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a copmplete medical team at home" "The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home"
}, },
"rrtService": {"en": "RRT Service", "ar": "خدمة RRT"}, "rrtService": {"en": "RRT Service", "ar": "خدمة RRT"},
"bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"}, "bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"},
@ -1417,5 +1417,44 @@ const Map localizedValues = {
}, },
"dental-procedure-list": {"en": "Dental Procedures for this Appointment: ", "ar": "إجراءات الأسنان لهذا الموعد:"}, "dental-procedure-list": {"en": "Dental Procedures for this Appointment: ", "ar": "إجراءات الأسنان لهذا الموعد:"},
"time-needed": {"en": "Time Needed:", "ar": "الوقت اللازم:"}, "time-needed": {"en": "Time Needed:", "ar": "الوقت اللازم:"},
"total-time-needed": {"en": "Total Appointment Time:", "ar": "وقت المواعيد الكلي:"}, "total-time-needed": {
"en": "Total Appointment Time:",
"ar": "وقت المواعيد الكلي:"
},
"info-eye": {
"en": "This service allows you to view all the eye measurements, lenses, and eyeglasses that have been made in the Habib Medical Group.",
"ar": " خدمة قياسات النظر: هذه الخدمة تمكنك من الاطلاع على جميع قياسات النظر والعدسات والنظارات التي تمت في مجموعة الحبيب الطبية."
},
"info-vaccines": {
"en": "This service allows you to view all the vaccinations that were taken in Al Habib Medical Group.",
"ar": "خدمة تطعيماتي: هذه الخدمة تمكنك من الاطلاع على جميع التطعيمات التي تمت في مجموعة الحبيب الطبية."
},
"info-trackers": {
"en": "This service allows you to record the readings of the measurement of sugar, pressure, and weight and then refer to them as a reference in addition to view the statistics charts.",
"ar": "متابعة قراءاتي: هذه الخدمة تمكنك من تسجيل قراءات قياس السكر والضغط والوزن بشكل دوري ومن ثم الاطلاع عليها كمرجع وكذلك الاطلاع على الرسوم البيانية لمتابعة تطور الحالة."
},
"info-health-data": {
"en": "This service is designed to allows you to synchronize the health data from your smart watches into your health record system in Habib Medical Group so that the doctors you are visiting can analyze your health & activity level.",
"ar": "تم تصميم هذه الخدمة للسماح لك بمزامنة البيانات الصحية من ساعاتك الذكية الى نظام السجلات الصحية الخاص بك في مجموعة حبيب الطبية حتى يتمكن الأطباء الذين تزورهم من تحليل مستوى صحتك ونشاطك."
},
"info-ask-doc": {
"en": "This service allows you to ask the doctor you have visited during the last 14 days. When you receive a response from the doctor, you will be notified via the system to view the doctor's reply.",
"ar": "اسال طبيبك: هذه الخدمة تمكنك من توجيه استفسارات الى الطبيب الذي قمت بزيارته خلال اخر 14 يوم وكذلك عند تلقى الرد من الطبيب سوف يتم ابلاغك عن طريق النظام للاطلاع على رد الطبيب."
},
"info-auto-wifi": {
"en": "This service allows you to connect to the Internet directly without the need for entering a user name or password.",
"ar": "الاتصال بالانترنت: هذه الخدمة تمكنك من الاتصال بالانترنت مباشرة دون الحاجة الى اسم مستخدم او كلمة مرور."
},
"auto-wifi": {
"en": "Connect To Internet",
"ar": "الإتصال بالإنترنت"
},
"child-vaccine-info": {
"en": "This service to remind you of the deadlines of the necessary vaccinations for your childs against diseases targeted by immunization according to the MOH vaccinations schedule by sending a reminding message and notifications of the vaccination date to the registered mobile phone.",
"ar": "هذه الخدمة تم تصميمها لتذكيرك بالمواعيد النهائية للتحصينات اللازمة لطفلك ضد الأمراض المستهدفة بالتحصين وفقًا لجدول تطعيمات وزارة الصحة عن طريق إرسال رسالة تذكير وإشعارات عن مواعيد التطعيم على الجوال المسجل."
},
"h2o-info": {
"en": "This service is designed to help you to set drinking water goals and track the volume of water you are drinking on a daily basis. This service allows for schedule reminders and offers a basic statistical analysis of the amount of what you have consumed over the course of a day, week or month.",
"ar": "تم تصميم هذه الخدمة لمساعدتك في تحديد وتتبع كميات المياه التي يتوجب شربها بشكل يومي. كما توفر هذه الخدمة تذكيرات الجدول الزمني وتقدم تحليلًا إحصائيًا لمقدار ما استهلكته خلال اليوم أو الأسبوع أو الشهر."
},
}; };

@ -66,74 +66,76 @@ class AppoimentAllHistoryResultList {
String qR; String qR;
int remaniningHoursTocanPay; int remaniningHoursTocanPay;
bool sMSButtonVisable; bool sMSButtonVisable;
bool isInOutPatient;
AppoimentAllHistoryResultList( AppoimentAllHistoryResultList({
{this.setupID, this.setupID,
this.projectID, this.projectID,
this.appointmentNo, this.appointmentNo,
this.appointmentDate, this.appointmentDate,
this.appointmentDateN, this.appointmentDateN,
this.appointmentType, this.appointmentType,
this.bookDate, this.bookDate,
this.patientID, this.patientID,
this.doctorID, this.doctorID,
this.endDate, this.endDate,
this.startTime, this.startTime,
this.endTime, this.endTime,
this.status, this.status,
this.visitFor, this.visitFor,
this.patientStatusType, this.patientStatusType,
this.companyID, this.companyID,
this.bookedBy, this.bookedBy,
this.bookedOn, this.bookedOn,
this.confirmedBy, this.confirmedBy,
this.confirmedOn, this.confirmedOn,
this.arrivalChangedBy, this.arrivalChangedBy,
this.arrivedOn, this.arrivedOn,
this.editedBy, this.editedBy,
this.editedOn, this.editedOn,
this.doctorName, this.doctorName,
this.doctorNameN, this.doctorNameN,
this.statusDesc, this.statusDesc,
this.statusDescN, this.statusDescN,
this.vitalStatus, this.vitalStatus,
this.vitalSignAppointmentNo, this.vitalSignAppointmentNo,
this.episodeID, this.episodeID,
this.actualDoctorRate, this.actualDoctorRate,
this.clinicName, this.clinicName,
this.complainExists, this.complainExists,
this.doctorImageURL, this.doctorImageURL,
this.doctorNameObj, this.doctorNameObj,
this.doctorRate, this.doctorRate,
this.doctorSpeciality, this.doctorSpeciality,
this.doctorTitle, this.doctorTitle,
this.gender, this.gender,
this.genderDescription, this.genderDescription,
this.iSAllowOnlineCheckedIN, this.iSAllowOnlineCheckedIN,
this.isActiveDoctor, this.isActiveDoctor,
this.isActiveDoctorProfile, this.isActiveDoctorProfile,
this.isDoctorAllowVedioCall, this.isDoctorAllowVedioCall,
this.isExecludeDoctor, this.isExecludeDoctor,
this.isFollowup, this.isFollowup,
this.isLiveCareAppointment, this.isLiveCareAppointment,
this.isMedicalReportRequested, this.isMedicalReportRequested,
this.isOnlineCheckedIN, this.isOnlineCheckedIN,
this.latitude, this.latitude,
this.listHISGetContactLensPerscription, this.listHISGetContactLensPerscription,
this.listHISGetGlassPerscription, this.listHISGetGlassPerscription,
this.longitude, this.longitude,
this.nextAction, this.nextAction,
this.noOfPatientsRate, this.noOfPatientsRate,
this.originalClinicID, this.originalClinicID,
this.originalProjectID, this.originalProjectID,
this.projectName, this.projectName,
this.qR, this.qR,
this.remaniningHoursTocanPay, this.remaniningHoursTocanPay,
this.sMSButtonVisable, this.sMSButtonVisable,
this.clinicID, this.clinicID,
this.patientType, this.patientType,
this.visitType,
this.visitType}); this.isInOutPatient,
});
AppoimentAllHistoryResultList.fromJson(Map<String, dynamic> json) { AppoimentAllHistoryResultList.fromJson(Map<String, dynamic> json) {
setupID = json['SetupID']; setupID = json['SetupID'];
@ -176,7 +178,7 @@ class AppoimentAllHistoryResultList {
doctorImageURL = json['DoctorImageURL']; doctorImageURL = json['DoctorImageURL'];
doctorNameObj = json['DoctorNameObj']; doctorNameObj = json['DoctorNameObj'];
doctorRate = json['DoctorRate']; doctorRate = json['DoctorRate'];
// doctorSpeciality = json['DoctorSpeciality'].cast<String>(); doctorSpeciality = json['DoctorSpeciality'].cast<String>();
doctorTitle = json['DoctorTitle']; doctorTitle = json['DoctorTitle'];
gender = json['Gender']; gender = json['Gender'];
genderDescription = json['GenderDescription']; genderDescription = json['GenderDescription'];
@ -191,18 +193,15 @@ class AppoimentAllHistoryResultList {
isOnlineCheckedIN = json['IsOnlineCheckedIN']; isOnlineCheckedIN = json['IsOnlineCheckedIN'];
latitude = json['Latitude']; latitude = json['Latitude'];
if (json['List_HIS_GetContactLensPerscription'] != null) { if (json['List_HIS_GetContactLensPerscription'] != null) {
listHISGetContactLensPerscription = listHISGetContactLensPerscription = new List<ListHISGetContactLensPerscription>();
new List<ListHISGetContactLensPerscription>();
json['List_HIS_GetContactLensPerscription'].forEach((v) { json['List_HIS_GetContactLensPerscription'].forEach((v) {
listHISGetContactLensPerscription listHISGetContactLensPerscription.add(new ListHISGetContactLensPerscription.fromJson(v));
.add(new ListHISGetContactLensPerscription.fromJson(v));
}); });
} }
if (json['List_HIS_GetGlassPerscription'] != null) { if (json['List_HIS_GetGlassPerscription'] != null) {
listHISGetGlassPerscription = new List<ListHISGetGlassPerscription>(); listHISGetGlassPerscription = new List<ListHISGetGlassPerscription>();
json['List_HIS_GetGlassPerscription'].forEach((v) { json['List_HIS_GetGlassPerscription'].forEach((v) {
listHISGetGlassPerscription listHISGetGlassPerscription.add(new ListHISGetGlassPerscription.fromJson(v));
.add(new ListHISGetGlassPerscription.fromJson(v));
}); });
} }
longitude = json['Longitude']; longitude = json['Longitude'];
@ -218,6 +217,7 @@ class AppoimentAllHistoryResultList {
patientType = json['patientType']; patientType = json['patientType'];
status = json['status']; status = json['status'];
visitType = json['visitType']; visitType = json['visitType'];
isInOutPatient = json['IsInOutPatient'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
@ -277,14 +277,10 @@ class AppoimentAllHistoryResultList {
data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN; data['IsOnlineCheckedIN'] = this.isOnlineCheckedIN;
data['Latitude'] = this.latitude; data['Latitude'] = this.latitude;
if (this.listHISGetContactLensPerscription != null) { if (this.listHISGetContactLensPerscription != null) {
data['List_HIS_GetContactLensPerscription'] = this data['List_HIS_GetContactLensPerscription'] = this.listHISGetContactLensPerscription.map((v) => v.toJson()).toList();
.listHISGetContactLensPerscription
.map((v) => v.toJson())
.toList();
} }
if (this.listHISGetGlassPerscription != null) { if (this.listHISGetGlassPerscription != null) {
data['List_HIS_GetGlassPerscription'] = data['List_HIS_GetGlassPerscription'] = this.listHISGetGlassPerscription.map((v) => v.toJson()).toList();
this.listHISGetGlassPerscription.map((v) => v.toJson()).toList();
} }
data['Longitude'] = this.longitude; data['Longitude'] = this.longitude;
data['NextAction'] = this.nextAction; data['NextAction'] = this.nextAction;
@ -325,23 +321,23 @@ class ListHISGetContactLensPerscription {
ListHISGetContactLensPerscription( ListHISGetContactLensPerscription(
{this.setupId, {this.setupId,
this.projectId, this.projectId,
this.patientType, this.patientType,
this.patientId, this.patientId,
this.encounterType, this.encounterType,
this.encounterNo, this.encounterNo,
this.oDOS, this.oDOS,
this.brand, this.brand,
this.baseCurve, this.baseCurve,
this.power, this.power,
this.diameter, this.diameter,
this.oZ, this.oZ,
this.cT, this.cT,
this.blend, this.blend,
this.remarks, this.remarks,
this.status, this.status,
this.isActive, this.isActive,
this.createdOn}); this.createdOn});
ListHISGetContactLensPerscription.fromJson(Map<String, dynamic> json) { ListHISGetContactLensPerscription.fromJson(Map<String, dynamic> json) {
setupId = json['SetupId']; setupId = json['SetupId'];
@ -415,28 +411,28 @@ class ListHISGetGlassPerscription {
ListHISGetGlassPerscription( ListHISGetGlassPerscription(
{this.projectID, {this.projectID,
this.setupID, this.setupID,
this.patientId, this.patientId,
this.encounterType, this.encounterType,
this.encounterNo, this.encounterNo,
this.visionType, this.visionType,
this.rightEyeSpherical, this.rightEyeSpherical,
this.rightEyeCylinder, this.rightEyeCylinder,
this.rightEyeAxis, this.rightEyeAxis,
this.rightEyePrism, this.rightEyePrism,
this.rightEyeVA, this.rightEyeVA,
this.rightEyeRemarks, this.rightEyeRemarks,
this.leftEyeSpherical, this.leftEyeSpherical,
this.leftEyeCylinder, this.leftEyeCylinder,
this.leftEyeAxis, this.leftEyeAxis,
this.leftEyePrism, this.leftEyePrism,
this.leftEyeVA, this.leftEyeVA,
this.leftEyeRemarks, this.leftEyeRemarks,
this.pD, this.pD,
this.bVD, this.bVD,
this.status, this.status,
this.isActive, this.isActive,
this.createdOn}); this.createdOn});
ListHISGetGlassPerscription.fromJson(Map<String, dynamic> json) { ListHISGetGlassPerscription.fromJson(Map<String, dynamic> json) {
projectID = json['ProjectID']; projectID = json['ProjectID'];
@ -492,6 +488,3 @@ class ListHISGetGlassPerscription {
return data; return data;
} }
} }

@ -9,12 +9,12 @@ class LabResultList {
class LabResult { class LabResult {
String description; String description;
Null femaleInterpretativeData; dynamic femaleInterpretativeData;
int gender; int gender;
bool isCertificateAllowed; bool isCertificateAllowed;
int lineItemNo; int lineItemNo;
Null maleInterpretativeData; dynamic maleInterpretativeData;
Null notes; dynamic notes;
int orderLineItemNo; int orderLineItemNo;
int orderNo; int orderNo;
String packageID; String packageID;
@ -27,11 +27,11 @@ class LabResult {
String sampleCollectedOn; String sampleCollectedOn;
String sampleReceivedOn; String sampleReceivedOn;
String setupID; String setupID;
Null superVerifiedOn; dynamic superVerifiedOn;
String testCode; String testCode;
String uOM; String uOM;
String verifiedOn; String verifiedOn;
Null verifiedOnDateTime; dynamic verifiedOnDateTime;
LabResult( LabResult(
{this.description, {this.description,

@ -7,9 +7,6 @@ class ErService extends BaseService {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List(); List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List();
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
String Latitude = "";
String Longitude = "";
String PhoneNumber = "";
Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async { Future getProjectAvgERWaitingTimeOrders({int id, int projectID}) async {
hasError = false; hasError = false;
@ -23,21 +20,15 @@ class ErService extends BaseService {
body['Latitude'] = lat ?? 0; body['Latitude'] = lat ?? 0;
body['Longitude'] = long ?? 0; body['Longitude'] = long ?? 0;
dynamic localRes;
await baseAppClient.post(GET_NEAREST_HOSPITAL, await baseAppClient.post(GET_NEAREST_HOSPITAL,
onSuccess: (dynamic response, int statusCode) { onSuccess: (dynamic response, int statusCode) {
projectAvgERWaitingTimeModelList.clear(); localRes = response;
response['List_ProjectAvgERWaitingTime'].forEach((vital) {
projectAvgERWaitingTimeModelList
.add(ProjectAvgERWaitingTime.fromJson(vital));
});
projectAvgERWaitingTimeModelList.forEach((element) {
Latitude = '${element.latitude}';
Longitude = '${element.longitude}';
PhoneNumber = '${element.phoneNumber}';
});
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;
}, body: body); }, body: body);
return Future.value(localRes);
} }
} }

@ -17,7 +17,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
class MyBalanceService extends BaseService { class MyBalanceService extends BaseService {
List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList = List(); List<PatientAdvanceBalanceAmount> patientAdvanceBalanceAmountList = List();
double totalAdvanceBalanceAmount; dynamic totalAdvanceBalanceAmount;
List<PatientInfo> patientInfoList = List(); List<PatientInfo> patientInfoList = List();
GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse = GetAllSharedRecordsByStatusResponse getAllSharedRecordsByStatusResponse =
GetAllSharedRecordsByStatusResponse(); GetAllSharedRecordsByStatusResponse();

@ -38,7 +38,7 @@ class MyBalanceViewModel extends BaseViewModel {
//=========================== //===========================
double get totalAdvanceBalanceAmount => dynamic get totalAdvanceBalanceAmount =>
_myBalanceService.totalAdvanceBalanceAmount; _myBalanceService.totalAdvanceBalanceAmount;
String get updatedRegisterBloodMessage => String get updatedRegisterBloodMessage =>

@ -43,9 +43,8 @@ class _CMCPageState extends State<CMCPage> with SingleTickerProviderStateMixin {
description: TranslationBase.of(context).infoCMC, description: TranslationBase.of(context).infoCMC,
imagesInfo: [ imagesInfo: [
ImagesInfo( ImagesInfo(
imageAr: 'assets/images/Wifi-AR.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/CMC/ar/0.png',
imageEn: 'assets/images/wifi-EN.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/CMC/en/0.png')
isAsset: true)
], ],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup, appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold( body: Scaffold(

@ -2,7 +2,6 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/all_habib_medical_services/e_referral_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.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';
@ -46,9 +45,8 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
appBarTitle: TranslationBase.of(context).homeHealthCare, appBarTitle: TranslationBase.of(context).homeHealthCare,
imagesInfo: [ imagesInfo: [
ImagesInfo( ImagesInfo(
imageAr: 'assets/images/Wifi-AR.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/HHC/ar/0.png',
imageEn: 'assets/images/wifi-EN.png', imageEn: 'https://hmgwebservices.com/Images/MobileApp/HHC/en/0.png')
isAsset: true)
], ],
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_mod
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/hmg_services.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/%E2%80%8B%20health_calculators.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ancillary-orders/ancillaryOrders.dart';
@ -15,6 +16,7 @@ import 'package:diplomaticquarterapp/pages/Blood/blood_donation.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/BookingOptions.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_vaccines_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/Covid-DriveThru/covid-drivethru-location.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart'; import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart'; import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_update_screen.dart';
@ -22,6 +24,7 @@ import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart'; import 'package:diplomaticquarterapp/pages/landing/landing_page_pharmcy.dart';
import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart'; import 'package:diplomaticquarterapp/pages/livecare/livecare_home.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart'; import 'package:diplomaticquarterapp/pages/paymentService/payment_service.dart';
import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart'; import 'package:diplomaticquarterapp/pages/symptom-checker/info.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
@ -56,11 +59,11 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser = new AuthenticatedUser(); AuthenticatedUser authUser = new AuthenticatedUser();
AuthProvider authProvider = new AuthProvider(); AuthProvider authProvider = new AuthProvider();
PharmacyModuleViewModel pharmacyModuleViewModel = PharmacyModuleViewModel pharmacyModuleViewModel = locator<PharmacyModuleViewModel>();
locator<PharmacyModuleViewModel>();
LocationUtils locationUtils; LocationUtils locationUtils;
var weather = '--'; var weather = '--';
WeatherService _weatherService = WeatherService(); WeatherService _weatherService = WeatherService();
List<HmgServices> hmgServices = [];
@override @override
void initState() { void initState() {
@ -71,9 +74,23 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
super.initState(); super.initState();
} }
initialiseHmgServices(bool isLogin) {
hmgServices.clear();
hmgServices.add(new HmgServices(0, TranslationBase.of(context).liveCare, TranslationBase.of(context).onlineConsulting, "assets/images/new/Live_Care.svg", isLogin));
hmgServices.add(new HmgServices(1, TranslationBase.of(context).covidTest, TranslationBase.of(context).driveThru, "assets/images/new/covid_test_drive_thru.svg", isLogin));
hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/visa.png", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).reachUs, TranslationBase.of(context).findUs, "assets/images/new/reach_us.svg", isLogin));
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
initialiseHmgServices(false);
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).alhabiServices, appBarTitle: TranslationBase.of(context).alhabiServices,
@ -211,7 +228,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage(), FadePage(page: CovidDrivethruLocation()),
), ),
imageLocation: 'assets/images/al-habib_online_payment_service_icon.png', imageLocation: 'assets/images/al-habib_online_payment_service_icon.png',
title: TranslationBase.of(context).covid19_driveThrueTest, title: TranslationBase.of(context).covid19_driveThrueTest,
@ -232,12 +249,6 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
), ),
ServicesContainer( ServicesContainer(
onTap: () => getPharmacyToken(), onTap: () => getPharmacyToken(),
// Navigator.push(
// context,
// FadePage(
// page: ParkingPage(),
// ),
// ),
imageLocation: 'assets/images/pharmacy_logo.png', imageLocation: 'assets/images/pharmacy_logo.png',
title: TranslationBase.of(context).pharmacy), title: TranslationBase.of(context).pharmacy),
ServicesContainer( ServicesContainer(
@ -282,18 +293,17 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
Navigator.pop(context); Navigator.pop(context);
LandingPage.shared.switchToDoFromHMGServices(); LandingPage.shared.switchToDoFromHMGServices();
}, },
imageLocation: imageLocation: 'assets/images/new-design/upcoming_icon_bottom_bar.png',
'assets/images/new-design/upcoming_icon_bottom_bar.png',
title: TranslationBase.of(context).todoList, title: TranslationBase.of(context).todoList,
), ),
if (projectViewModel.havePrivilege(42)) // if (projectViewModel.havePrivilege(42))
ServicesContainer( // ServicesContainer(
onTap: () => Navigator.push( // onTap: () => Navigator.push(
context, // context,
FadePage(page: SymptomInfo()), // FadePage(page: SymptomInfo()),
), // ),
imageLocation: 'assets/images/new-design/body_icon.png', // imageLocation: 'assets/images/new-design/body_icon.png',
title: TranslationBase.of(context).symptomCheckerTitle), // title: TranslationBase.of(context).symptomCheckerTitle),
if (projectViewModel.havePrivilege(36)) if (projectViewModel.havePrivilege(36))
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
@ -326,12 +336,6 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
if (projectViewModel.havePrivilege(38)) if (projectViewModel.havePrivilege(38))
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push(context, FadePage(page: H2OPage())), onTap: () => Navigator.push(context, FadePage(page: H2OPage())),
// Navigator.push(
// context,
// FadePage(
// page: H2OPageIndexPage(),
// ),
// ),
imageLocation: 'assets/images/new-design/water_icon.png', imageLocation: 'assets/images/new-design/water_icon.png',
title: TranslationBase.of(context).h2o, title: TranslationBase.of(context).h2o,
), ),
@ -339,7 +343,9 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
ServicesContainer( ServicesContainer(
onTap: () => Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage(), FadePage(
page: SmartWatchInstructions()
),
), ),
imageLocation: 'assets/images/new-design/smartwatch_icon.png', imageLocation: 'assets/images/new-design/smartwatch_icon.png',
title: TranslationBase.of(context).smartWatches, title: TranslationBase.of(context).smartWatches,

@ -1,12 +1,12 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/config/config.dart'; import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/H2O_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/h20_setting.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/month_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/today_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/h2o/week_page.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/family/my-family.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart'; import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart'; import 'package:diplomaticquarterapp/pages/medical/medical_profile_page.dart';
@ -49,22 +49,29 @@ class _H2OPageState extends State<H2OPage> with SingleTickerProviderStateMixin {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).waterTracker, appBarTitle: TranslationBase.of(context).waterTracker,
description: TranslationBase.of(context).h2oInfo,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/h2o/ar/0.png')
],
showHomeAppBarIcon: false, showHomeAppBarIcon: false,
baseViewModel: model, baseViewModel: model,
isHelp: true, isHelp: true,
appBarIcons: [ appBarIcons: [
IconButton( model.isLogin
icon: Image.asset("assets/images/new-design/setting_gear_icon.png"), ? IconButton(
color: Colors.white, icon: Image.asset("assets/images/new-design/setting_gear_icon.png"),
onPressed: () { color: Colors.white,
Navigator.push( onPressed: () {
context, Navigator.push(
FadePage( context,
page: H2oSetting(userDetailModel: model.userDetail, viewModel: model), FadePage(
), page: H2oSetting(userDetailModel: model.userDetail, viewModel: model),
); ),
}, );
), },
)
: Container(),
], ],
body: Scaffold( body: Scaffold(
extendBodyBehindAppBar: true, extendBodyBehindAppBar: true,

@ -56,28 +56,28 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
AuthenticatedUser authenticatedUser; AuthenticatedUser authenticatedUser;
GetAllSharedRecordsByStatusList selectedPatientFamily; GetAllSharedRecordsByStatusList selectedPatientFamily;
AdvanceModel advanceModel = AdvanceModel(); AdvanceModel advanceModel = AdvanceModel();
List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel bloodDetails = List_BloodGroupDetailsModel(bloodGroup: "A-");
List_BloodGroupDetailsModel(bloodGroup: "A-");
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
AuthenticatedUser authUser; AuthenticatedUser authUser;
var checkedValue = false; var checkedValue = false;
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
ProjectViewModel projectProvider;
@override @override
void initState() { void initState() {
imagesInfo.add(
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectProvider.isLogin) getAuthUser();
});
super.initState(); super.initState();
getAuthUser();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add( projectProvider = Provider.of(context);
ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/images-info-home/blood/ar/0.png'),
);
ProjectViewModel projectProvider = Provider.of(context);
return BaseView<MyBalanceViewModel>( return BaseView<MyBalanceViewModel>(
onModelReady: (model) => model.getCities(), //model.getHospitals(), onModelReady: (model) => model.getCities(), //model.getHospitals(),
@ -102,22 +102,16 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
height: 12, height: 12,
), ),
InkWell( InkWell(
onTap: () => onTap: () => confirmSelectHospitalDialog(model.CitiesModelList),
confirmSelectHospitalDialog(model.CitiesModelList),
//model.hospitals //model.hospitals
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [Texts(getHospitalName(projectProvider, context)), Icon(Icons.arrow_drop_down)],
Texts(getHospitalName(projectProvider, context)),
Icon(Icons.arrow_drop_down)
],
), ),
), ),
), ),
@ -132,9 +126,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -156,9 +148,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
width: double.infinity, width: double.infinity,
height: 65, height: 65,
decoration: BoxDecoration( decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: Theme.of(context).primaryColor),
borderRadius: BorderRadius.circular(12),
color: Theme.of(context).primaryColor),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@ -175,16 +165,14 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
Row( Row(
children: [ children: [
Container( Container(
child: Text( child: Text(TranslationBase.of(context).viewTermsConditions),
TranslationBase.of(context).viewTermsConditions),
), ),
SizedBox( SizedBox(
width: MediaQuery.of(context).size.height * 0.10, width: MediaQuery.of(context).size.height * 0.10,
), ),
InkWell( InkWell(
onTap: () { onTap: () {
Navigator.of(context) Navigator.of(context).push(FadePage(page: UserAgreementPage()));
.push(FadePage(page: UserAgreementPage()));
}, },
child: Container( child: Container(
child: Texts( child: Texts(
@ -220,12 +208,8 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
width: 10, width: 10,
), ),
Text( Text(
TranslationBase.of(context) TranslationBase.of(context).iAgreeToTheTermsAndConditions,
.iAgreeToTheTermsAndConditions, style: Theme.of(context).textTheme.subtitle1.copyWith(color: checkedValue ? Color(0xFFc5272d) : Colors.black),
style: Theme.of(context).textTheme.subtitle1.copyWith(
color: checkedValue
? Color(0xFFc5272d)
: Colors.black),
), ),
], ],
), ),
@ -247,23 +231,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
builder: (_) => AssetGiffyDialog( builder: (_) => AssetGiffyDialog(
title: Text( title: Text(
"", "",
style: TextStyle( style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
fontSize: 22.0,
fontWeight: FontWeight.w600),
), ),
image: Image.asset( image: Image.asset('assets/images/BloodChrt_EN.png'),
'assets/images/BloodChrt_EN.png'), buttonCancelText: Text(TranslationBase.of(context).cancel),
buttonCancelText: Text(
TranslationBase.of(context).cancel),
buttonCancelColor: Colors.grey, buttonCancelColor: Colors.grey,
onlyCancelButton: true, onlyCancelButton: true,
)); ));
}, },
child: Container( child: Container(width: 250, height: 200, child: Image.asset('assets/images/BloodChrt_EN.png')),
width: 250,
height: 200,
child: Image.asset(
'assets/images/BloodChrt_EN.png')),
), ),
), ),
), ),
@ -293,19 +269,15 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
label: TranslationBase.of(context).save, label: TranslationBase.of(context).save,
onTap: () async { onTap: () async {
if (_selectedHospital == null) { if (_selectedHospital == null) {
AppToast.showErrorToast( AppToast.showErrorToast(message: TranslationBase.of(context).selectCity);
message: TranslationBase.of(context).selectCity);
return; return;
} }
bloodDetails.city = projectProvider.isArabic bloodDetails.city = projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
? _selectedHospital.descriptionN
: _selectedHospital.description;
bloodDetails.cityCode = _selectedHospital.iD.toString(); bloodDetails.cityCode = _selectedHospital.iD.toString();
bloodDetails.gender = gender == Gender.Male ? 1 : 2; bloodDetails.gender = gender == Gender.Male ? 1 : 2;
await model.updateBloodGroup(bloodDetails); await model.updateBloodGroup(bloodDetails);
if (model.state == ViewState.Idle) { if (model.state == ViewState.Idle) {
AppToast.showSuccessToast( AppToast.showSuccessToast(message: model.updatedRegisterBloodMessage);
message: model.updatedRegisterBloodMessage);
} else { } else {
AppToast.showErrorToast(message: model.error); AppToast.showErrorToast(message: model.error);
} }
@ -325,8 +297,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
setState(() { setState(() {
if (value == BeneficiaryType.MyAccount) { if (value == BeneficiaryType.MyAccount) {
_fileTextController.text = model.user.patientID.toString(); _fileTextController.text = model.user.patientID.toString();
advanceModel.depositorName = advanceModel.depositorName = model.user.firstName + " " + model.user.lastName;
model.user.firstName + " " + model.user.lastName;
} else } else
_fileTextController.text = ""; _fileTextController.text = "";
@ -453,8 +424,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
); );
} }
void confirmSelectFamilyDialog( void confirmSelectFamilyDialog(List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList) {
showDialog( showDialog(
context: context, context: context,
child: SelectPatientFamilyDialog( child: SelectPatientFamilyDialog(
@ -463,8 +433,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
onValueSelected: (value) { onValueSelected: (value) {
setState(() { setState(() {
selectedPatientFamily = value; selectedPatientFamily = value;
_fileTextController.text = _fileTextController.text = selectedPatientFamily.patientID.toString();
selectedPatientFamily.patientID.toString();
advanceModel.depositorName = value.patientName; advanceModel.depositorName = value.patientName;
}); });
}, },
@ -538,12 +507,9 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
return "Select Blood Type"; //TranslationBase.of(context).selectBeneficiary; return "Select Blood Type"; //TranslationBase.of(context).selectBeneficiary;
} }
String getHospitalName( String getHospitalName(ProjectViewModel projectProvider, BuildContext context) {
ProjectViewModel projectProvider, BuildContext context) {
if (_selectedHospital != null) if (_selectedHospital != null)
return projectProvider.isArabic return projectProvider.isArabic ? _selectedHospital.descriptionN : _selectedHospital.description;
? _selectedHospital.descriptionN
: _selectedHospital.description;
else else
return TranslationBase.of(context).selectCity; return TranslationBase.of(context).selectCity;
// return List_BloodGroupDetailsModel.fromJson(0).city.toString();//"Select City";//TranslationBase.of(context).selectHospital; // return List_BloodGroupDetailsModel.fromJson(0).city.toString();//"Select City";//TranslationBase.of(context).selectHospital;
@ -558,8 +524,7 @@ class _BloodDonationPageState extends State<BloodDonationPage> {
getAuthUser() async { getAuthUser() async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
authUser = data; authUser = data;
}); });

@ -218,7 +218,9 @@ class ConfirmPaymentPage extends StatelessWidget {
authenticatedUser.patientID, authenticatedUser.patientID,
authenticatedUser, authenticatedUser,
browser, browser,
false); false,
null,
null);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {

@ -509,6 +509,8 @@ class _BookSuccessState extends State<BookSuccess> {
authenticatedUser, authenticatedUser,
widget.browser, widget.browser,
widget.patientShareResponse.isLiveCareAppointment, widget.patientShareResponse.isLiveCareAppointment,
null,
null,
widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo, widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID, widget.patientShareResponse.clinicID,

@ -1,6 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_view_model.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/user_information_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/my_balance_view_model.dart';
import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart'; import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -18,8 +17,7 @@ class ChildVaccinesPage extends StatefulWidget {
_ChildVaccinesPageState createState() => _ChildVaccinesPageState(); _ChildVaccinesPageState createState() => _ChildVaccinesPageState();
} }
class _ChildVaccinesPageState extends State<ChildVaccinesPage> class _ChildVaccinesPageState extends State<ChildVaccinesPage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TextEditingController titleController = TextEditingController(); TextEditingController titleController = TextEditingController();
var checkedValue = false; var checkedValue = false;
String addEmail = ""; String addEmail = "";
@ -30,9 +28,17 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
onModelReady: (model) => model.getUserInformationRequestOrders(), onModelReady: (model) => model.getUserInformationRequestOrders(),
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, isShowDecPage: true,
description: TranslationBase.of(context).childVaccineInfo,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/0.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/0.png'),
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/en/1.png',
imageAr: 'https://hmgwebservices.com/Images/MobileApp/images-info-home/child-vaccines/ar/1.png')
],
appBarTitle: TranslationBase.of(context).vaccination, appBarTitle: TranslationBase.of(context).vaccination,
//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Column( child: Column(
@ -80,16 +86,14 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
margin: EdgeInsets.only(left: 10, right: 10, top: 15), margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields( child: TextFields(
fillColor: Colors.red, fillColor: Colors.red,
hintText: model.user.emailAddress, hintText: model.user != null ? model.user.emailAddress : "",
controller: titleController, controller: titleController,
fontSize: 20, fontSize: 20,
hintColor: Colors.black, hintColor: Colors.black,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
onChanged: (text) { onChanged: (text) {
addEmail = text; addEmail = text;
model.user.emailAddress == addEmail model.user.emailAddress == addEmail ? checkedValue = false : checkedValue = true;
? checkedValue = false
: checkedValue = true;
}, },
validator: (value) { validator: (value) {
if (value == null) { if (value == null) {
@ -119,8 +123,7 @@ class _ChildVaccinesPageState extends State<ChildVaccinesPage>
// //
onTap: () { onTap: () {
model.user.emailAddress = addEmail.toString(); model.user.emailAddress = addEmail.toString();
AppToast.showSuccessToast( AppToast.showSuccessToast(message: TranslationBase.of(context).updateEmailMsg);
message: TranslationBase.of(context).updateEmailMsg);
// bloodDetails.city=_selectedHospital.toString(); // bloodDetails.city=_selectedHospital.toString();
// bloodDetails. // bloodDetails.

@ -152,6 +152,7 @@ class CovidDirveThruQuestionsState extends State<CovidDirveThruQuestions> {
service.getCovidPaymentInformation(context, int.parse(projectID), widget.proceduresList[0].procedureID).then((res) { service.getCovidPaymentInformation(context, int.parse(projectID), widget.proceduresList[0].procedureID).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
covidPaymentInfoResponse = CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
Navigator.push( Navigator.push(
context, context,
FadePage( FadePage(

@ -14,7 +14,6 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:maps_launcher/maps_launcher.dart'; import 'package:maps_launcher/maps_launcher.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'covid-dirvethru-questions.dart'; import 'covid-dirvethru-questions.dart';
@ -34,15 +33,14 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
String projectID = ""; String projectID = "";
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
DriveThroughTestingCenterModel selectedProject;
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
@override @override
void initState() { void initState() {
imagesInfo.add( imagesInfo.add(
ImagesInfo( ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'),
); );
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin) { if (projectViewModel.isLogin) {
@ -56,9 +54,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo( imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/covid/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/covid/ar/0.png'));
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,
@ -72,31 +68,17 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
children: <Widget>[ children: <Widget>[
Container( Container(
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
? Alignment.centerRight child: Text(TranslationBase.of(context).resultHeader, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 22.0, color: Colors.black)),
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).resultHeader,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 22.0,
color: Colors.black)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 10.0), margin: EdgeInsets.only(top: 10.0),
child: Text(TranslationBase.of(context).covidInfo, child: Text(TranslationBase.of(context).covidInfo, style: TextStyle(fontSize: 16.0, color: Colors.black)),
style: TextStyle(fontSize: 16.0, color: Colors.black)),
), ),
Container( Container(
margin: EdgeInsets.only(top: 20.0), margin: EdgeInsets.only(top: 20.0),
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
? Alignment.centerRight child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.grey[700])),
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
letterSpacing: 0.8,
color: Colors.grey[700])),
), ),
Container( Container(
height: 60.0, height: 60.0,
@ -112,18 +94,18 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton<String>( child: DropdownButton<DriveThroughTestingCenterModel>(
hint: new Text(TranslationBase.of(context).selectAddress), hint: new Text(TranslationBase.of(context).selectAddress),
value: projectDropdownValue, value: selectedProject,
items: projectsList.map((item) { items: projectsList.map((DriveThroughTestingCenterModel item) {
return new DropdownMenuItem<String>( return new DropdownMenuItem<DriveThroughTestingCenterModel>(
value: item.iD.toString(), value: item,
child: new Text(item.projectName), child: new Text(item.projectName),
); );
}).toList(), }).toList(),
onChanged: (newValue) { onChanged: (newValue) {
setState(() { setState(() {
projectDropdownValue = newValue; selectedProject = newValue;
setProjectLocation(newValue); setProjectLocation(newValue);
}); });
}, },
@ -132,15 +114,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
isLocationSelected isLocationSelected
? Container( ? Container(
margin: EdgeInsets.only(top: 15.0), margin: EdgeInsets.only(top: 15.0),
alignment: projectViewModel.isArabic alignment: projectViewModel.isArabic ? Alignment.centerRight : Alignment.centerLeft,
? Alignment.centerRight child: Text(TranslationBase.of(context).selectLocation, style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18.0, letterSpacing: 0.8, color: Colors.black)),
: Alignment.centerLeft,
child: Text(TranslationBase.of(context).selectLocation,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 18.0,
letterSpacing: 0.8,
color: Colors.black)),
) )
: Container(), : Container(),
isLocationSelected isLocationSelected
@ -149,16 +124,15 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(color: Colors.grey[400], width: 1.0), border: Border.all(color: Colors.grey[400], width: 1.0),
), ),
child: Image.network( child: Image.network("https://maps.googleapis.com/maps/api/staticmap?center=" +
"https://maps.googleapis.com/maps/api/staticmap?center=" + this.projectLat +
this.projectLat + "," +
"," + this.projectLong +
this.projectLong + "&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" +
"&zoom=15&size=800x400&maptype=roadmap&markers=color:red%7C" + this.projectLat +
this.projectLat + "," +
"," + this.projectLong +
this.projectLong + "&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
"&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8"),
) )
: SizedBox( : SizedBox(
height: MediaQuery.of(context).size.height * 0.35, height: MediaQuery.of(context).size.height * 0.35,
@ -184,8 +158,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
getDirections(); getDirections();
}, },
child: Text(TranslationBase.of(context).getDirections, child: Text(TranslationBase.of(context).getDirections, style: TextStyle(fontSize: 18.0)),
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -202,8 +175,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: minWidth: MediaQuery.of(context).size.width * 0.7,
MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF60686b), color: new Color(0xFF60686b),
@ -213,8 +185,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
back(); back();
}, },
child: Text(TranslationBase.of(context).back, child: Text(TranslationBase.of(context).back, style: TextStyle(fontSize: 18.0)),
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -227,8 +198,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), borderRadius: BorderRadius.circular(10.0),
), ),
minWidth: minWidth: MediaQuery.of(context).size.width * 0.7,
MediaQuery.of(context).size.width * 0.7,
height: 45.0, height: 45.0,
child: RaisedButton( child: RaisedButton(
color: new Color(0xFF60686b), color: new Color(0xFF60686b),
@ -238,8 +208,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
onPressed: () { onPressed: () {
next(); next();
}, },
child: Text(TranslationBase.of(context).next, child: Text(TranslationBase.of(context).next, style: TextStyle(fontSize: 18.0)),
style: TextStyle(fontSize: 18.0)),
), ),
), ),
), ),
@ -259,22 +228,17 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
getDirections() { getDirections() {
if (isLocationSelected) { if (isLocationSelected) {
MapsLauncher.launchCoordinates(double.parse(projectLat), MapsLauncher.launchCoordinates(double.parse(projectLat), double.parse(projectLong), this.projectName);
double.parse(projectLong), this.projectName);
} else { } else {
Utils.showErrorToast( Utils.showErrorToast("Please select address from the dropdown menu to get directions");
"Please select address from the dropdown menu to get directions");
} }
} }
next() { next() {
if (isLocationSelected) { if (isLocationSelected) {
Navigator.push( Navigator.push(context, FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList)));
context,
FadePage(page: CovidDirveThruQuestions(projectId: projectID, proceduresList: proceduresList,)));
} else { } else {
Utils.showErrorToast( Utils.showErrorToast("Please select address from the dropdown menu to continue");
"Please select address from the dropdown menu to continue");
} }
} }
@ -282,34 +246,25 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
Navigator.of(context).popAndPushNamed(HOME); Navigator.of(context).popAndPushNamed(HOME);
} }
setProjectLocation(newValue) { setProjectLocation(DriveThroughTestingCenterModel newValue) {
print(newValue);
setState(() { setState(() {
this.projectLat = this.projectLat = newValue.latitude.toString();
projectsList[(int.parse(newValue) - 1)].latitude.toString(); this.projectLong = newValue.longitude.toString();
this.projectLong = this.projectName = newValue.projectName;
projectsList[(int.parse(newValue) - 1)].longitude.toString(); this.projectID = newValue.projectID.toString();
this.projectName = projectsList[(int.parse(newValue) - 1)].projectName;
this.projectID =
projectsList[(int.parse(newValue) - 1)].projectID.toString();
isLocationSelected = true; isLocationSelected = true;
}); });
} }
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), proceduresList[0].procedureID).then((res) {
.getCovidPaymentInformation(
context, int.parse(projectID), proceduresList[0].procedureID)
.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']);
}); });
Navigator.push( Navigator.push(
context, context,
@ -329,8 +284,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidDriveThruService service = new CovidDriveThruService(); CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
CovidTestProceduresResponse covidTestProceduresResponse = CovidTestProceduresResponse covidTestProceduresResponse = new CovidTestProceduresResponse();
new CovidTestProceduresResponse();
service.getCovidTestProceduresList(context).then((res) { service.getCovidTestProceduresList(context).then((res) {
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {

@ -30,7 +30,6 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
@override @override
void initState() { void initState() {
print(widget.proceduresList[0].procedureName);
widget.selectedProcedure = widget.proceduresList[0]; widget.selectedProcedure = widget.proceduresList[0];
super.initState(); super.initState();
} }
@ -336,14 +335,6 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
widget.covidPaymentInfoResponse = widget.covidPaymentInfoResponse =
CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']); CovidPaymentInfoResponse.fromJson(res['COVID19_PatientShare']);
}); });
// Navigator.push(
// context,
// FadePage(
// page: CovidPaymentDetails(
// covidPaymentInfoResponse: covidPaymentInfoResponse,
// projectID: int.parse(projectID),
// proceduresList: proceduresList,
// )));
} else {} } else {}
}).catchError((err) { }).catchError((err) {
print(err); print(err);

@ -191,6 +191,8 @@ class _CovidPaymentSummaryState extends State<CovidPaymentSummary> {
authenticatedUser, authenticatedUser,
widget.browser, widget.browser,
widget.patientShareResponse.isLiveCareAppointment, widget.patientShareResponse.isLiveCareAppointment,
null,
null,
widget.patientShareResponse.appointmentDate, widget.patientShareResponse.appointmentDate,
widget.patientShareResponse.appointmentNo, widget.patientShareResponse.appointmentNo,
widget.patientShareResponse.clinicID, widget.patientShareResponse.clinicID,

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/er/TriageInformationRequest.dart
import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart'; import 'package:diplomaticquarterapp/core/model/er/TriageQuestionsModel.dart';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart'; import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -44,36 +45,39 @@ class _DdServicesPageState extends State<DdServicesPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return Scaffold( return AppScaffold(
appBar: AppBar( appBarTitle: 'ED Online',
elevation: 0, isShowDecPage: true,
textTheme: TextTheme( isShowAppBar: true,
headline6: TextStyle( // appBarTitle: AppBar(
color: Theme.of(context).textTheme.headline1.color, // elevation: 0,
fontWeight: FontWeight.bold), // textTheme: TextTheme(
), // headline6: TextStyle(
title: Text( // color: Theme.of(context).textTheme.headline1.color,
'ED Online', // fontWeight: FontWeight.bold),
style: TextStyle( // ),
fontWeight: FontWeight.bold, // title: Text(
color: Theme.of(context).textTheme.headline1.color, // 'ED Online',
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'), // style: TextStyle(
// bold: true, // fontWeight: FontWeight.bold,
// color: Colors.white, // color: Theme.of(context).textTheme.headline1.color,
), // fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans'),
leading: Builder( // // bold: true,
builder: (BuildContext context) { // // color: Colors.white,
return IconButton( // ),
icon: Icon(Icons.arrow_back), // leading: Builder(
color: Theme.of(context).textTheme.headline1.color, // builder: (BuildContext context) {
onPressed: () { // return IconButton(
showConfirmMessage(context); // icon: Icon(Icons.arrow_back),
}, // color: Theme.of(context).textTheme.headline1.color,
); // onPressed: () {
}, // showConfirmMessage(context);
), // },
centerTitle: true, // );
), // },
// ),
// centerTitle: true,
// ),
body: PageView( body: PageView(
physics: NeverScrollableScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: pageController, controller: pageController,

@ -1,16 +1,15 @@
import 'package:diplomaticquarterapp/core/viewModels/er/near_hospital_view_model.dart'; import 'package:diplomaticquarterapp/core/model/er/projectavgerwaitingtime.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/core/service/er/er_service.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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';
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 '../../uitl/translations_delegate_base.dart'; import '../../uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/pages/ErService/widgets/card_common.dart';
import 'widgets/card_position.dart'; import 'widgets/card_position.dart';
class NearestEr extends StatelessWidget { class NearestEr extends StatefulWidget {
static const String _url = "assets/images/"; static const String _url = "assets/images/";
int appointmentNo; int appointmentNo;
@ -18,92 +17,89 @@ class NearestEr extends StatelessWidget {
NearestEr({this.appointmentNo, this.projectID}); NearestEr({this.appointmentNo, this.projectID});
@override
_NearestErState createState() => _NearestErState();
}
class _NearestErState extends State<NearestEr> {
List<ProjectAvgERWaitingTime> projectAvgERWaitingTimeModelList = List();
@override
void initState() {
WidgetsBinding.instance.addPostFrameCallback((_) => getERList());
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var size = MediaQuery.of(context).size; var size = MediaQuery.of(context).size;
final double itemHeight = (size.height - kToolbarHeight - 24) / 2; final double itemHeight = (size.height - kToolbarHeight - 24) / 2;
final double itemWidth = size.width / 2; final double itemWidth = size.width / 2;
return BaseView<NearHospitalViewModel>( return AppScaffold(
onModelReady: appointmentNo != null && projectID != null isShowAppBar: true,
? (model) => model.getProjectAvgERWaitingTimeOrders( isShowDecPage: false,
id: appointmentNo, projectID: projectID) appBarTitle: TranslationBase.of(context).NearestEr,
: (model) => model.getProjectAvgERWaitingTimeOrders(), body: projectAvgERWaitingTimeModelList.length > 0
builder: (_, mode, widget) => AppScaffold( ? Container(
isShowAppBar: true, child: ListView(
isShowDecPage: false, children: <Widget>[
appBarTitle: TranslationBase.of(context).NearestEr, Text("${TranslationBase.of(context).NearestErDesc}",
baseViewModel: mode, textAlign: TextAlign.center, style: TextStyle(fontSize: 18.0, letterSpacing: 1.0, fontWeight: FontWeight.w900, color: new Color(0xFF60686b))),
body: mode.ProjectAvgERWaitingTimeModeList.length > 0 Container(
? Container( margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0),
child: ListView( child: GridView.count(
children: <Widget>[ crossAxisCount: 2,
Text( childAspectRatio: (itemWidth / itemWidth),
"${TranslationBase.of(context).NearestErDesc}", crossAxisSpacing: 10,
textAlign: TextAlign.center, mainAxisSpacing: 10,
style: TextStyle( controller: new ScrollController(keepScrollOffset: false),
fontSize: 18.0, shrinkWrap: true,
letterSpacing: 1.0, padding: const EdgeInsets.all(4.0),
fontWeight: FontWeight.w900, children: List.generate(7, (index) {
color: new Color(0xFF60686b))), return Container(
Container( child: CardPosition(
margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0), waitingTime: projectAvgERWaitingTimeModelList[index].avgTimeInHHMM.toString(),
child: GridView.count( text: projectAvgERWaitingTimeModelList[index].projectName.toString(),
crossAxisCount: 2, image: 'assets/images/new-design/find_us_icon.png',
childAspectRatio: (itemWidth / itemWidth), subText: '${projectAvgERWaitingTimeModelList[index].distanceInKilometers ?? 0.0} ${TranslationBase.of(context).km_}',
crossAxisSpacing: 10, type: projectAvgERWaitingTimeModelList[index].iD.toString(),
mainAxisSpacing: 10, telephone: projectAvgERWaitingTimeModelList[index].phoneNumber.toString(),
controller: networkImage: projectAvgERWaitingTimeModelList[index].projectImageURL.toString(),
new ScrollController(keepScrollOffset: false), latitude: projectAvgERWaitingTimeModelList[index].latitude,
shrinkWrap: true, longitude: projectAvgERWaitingTimeModelList[index].longitude,
padding: const EdgeInsets.all(4.0), projectname: projectAvgERWaitingTimeModelList[index].projectName,
children: List.generate(7, (index) { cardSize: itemWidth,
return Container( ),
child: CardPosition( );
waitingTime: mode }),
.ProjectAvgERWaitingTimeModeList[index]
.avgTimeInHHMM
.toString(),
text: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: '${mode.ProjectAvgERWaitingTimeModeList[index].distanceInKilometers ?? 0.0} ${TranslationBase.of(context).km_}',
type: mode
.ProjectAvgERWaitingTimeModeList[index].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[index]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[index]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[index]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectName,
cardSize: itemWidth,
),
);
}),
),
), ),
], ),
), ],
)
: Center(
child: Texts('No Data'),
), ),
), )
: Center(
child: Texts('No Data'),
),
); );
} }
getERList() async {
GifLoaderDialogUtils.showMyDialog(context);
ErService service = new ErService();
service.getProjectAvgERWaitingTimeOrders().then((response) {
if (response['MessageStatus'] == 1) {
setState(() {
projectAvgERWaitingTimeModelList.clear();
response['List_ProjectAvgERWaitingTime'].forEach((vital) {
projectAvgERWaitingTimeModelList.add(ProjectAvgERWaitingTime.fromJson(vital));
});
});
GifLoaderDialogUtils.hideDialog(context);
} else {}
}).catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
});
}
} }

@ -1,4 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-logs-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-request-page.dart';
@ -8,13 +8,12 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class RRTMainScreen extends StatefulWidget{ class RRTMainScreen extends StatefulWidget {
@override @override
State<StatefulWidget> createState() => RRTMainScreenState(); State<StatefulWidget> createState() => RRTMainScreenState();
} }
class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin{ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProviderStateMixin {
int currentIndex = 0; int currentIndex = 0;
TabController tabController; TabController tabController;
PageController pageController = PageController(initialPage: 0, keepPage: true); PageController pageController = PageController(initialPage: 0, keepPage: true);
@ -22,84 +21,85 @@ class RRTMainScreenState extends State<RRTMainScreen> with SingleTickerProvider
RRTViewModel viewModel; RRTViewModel viewModel;
bool loadingData; bool loadingData;
List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/RRT/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/RRT/ar/0.png'));
tabController = TabController(length: 2, vsync: this); tabController = TabController(length: 2, vsync: this);
} }
TranslationBase localize; TranslationBase localize;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
localize = TranslationBase.of(context); localize = TranslationBase.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: localize.rapidResponseTeam, appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true, isShowAppBar: true,
body: BaseView<RRTViewModel>( description: TranslationBase.of(context).rrtDDetails,
onModelReady: (vm) async { imagesInfo: imagesInfo,
viewModel = vm; body: BaseView<RRTViewModel>(
loadingData = true; onModelReady: (vm) async {
await vm.loadRequiredData().then((value){ viewModel = vm;
}).whenComplete(() => setState(() => loadingData = false)); loadingData = true;
}, await vm.loadRequiredData().then((value) {}).whenComplete(() => setState(() => loadingData = false));
builder: (ctx, vm, widget) => content(), },
) builder: (ctx, vm, widget) => content(),
); ));
} }
Widget content(){ Widget content() {
if(loadingData == true){ if (loadingData == true) {
return Center(child: CircularProgressIndicator()); return Center(child: CircularProgressIndicator());
// else if(viewModel.state == ViewState.Error) // else if(viewModel.state == ViewState.Error)
}else if(viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null){ } else if (viewModel.rrtServiceData != null && viewModel.rrtServiceData.servicePrice != null) {
return Column( return Column(
children: [ children: [tabBar(), Expanded(child: contentPager())],
tabBar(),
Expanded(
child: contentPager()
)
],
); );
}else{ } else {
return Container( return Container(
alignment: Alignment.center, alignment: Alignment.center,
child: Text(localize.somethingWentWrongTryLater, style: TextStyle(color: Colors.red), maxLines: 5,), child: Text(
localize.somethingWentWrongTryLater,
style: TextStyle(color: Colors.red),
maxLines: 5,
),
); );
} }
} }
Widget tabBar() => Container( Widget tabBar() => Container(
margin: EdgeInsets.all(15), margin: EdgeInsets.all(15),
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)), decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10)),
child: TabBar( child: TabBar(onTap: onPageChanged, indicatorWeight: 3, indicatorColor: Color(0xFFc5272d), isScrollable: false, controller: tabController, indicatorSize: TabBarIndicatorSize.label, tabs: [
onTap: onPageChanged,
indicatorWeight: 3,
indicatorColor: Color(0xFFc5272d),
isScrollable: false,
controller: tabController,
indicatorSize: TabBarIndicatorSize.label,
tabs: [
Tab( Tab(
child: Text(localize.rapidResponseTeam, style: TextStyle(color: Theme.of(context).appBarTheme.color),), child: Text(
localize.rapidResponseTeam,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
), ),
Tab( Tab(
child: Text(localize.orderLog, style: TextStyle(color: Theme.of(context).appBarTheme.color),), child: Text(
localize.orderLog,
style: TextStyle(color: Theme.of(context).appBarTheme.color),
),
), ),
] ]),
), );
);
Widget contentPager() => PageView( Widget contentPager() => PageView(
onPageChanged: onPageChanged, onPageChanged: onPageChanged,
controller: pageController, controller: pageController,
children: [ children: [
RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders), RRTRequestPage(servicePrice: viewModel.rrtServiceData.servicePrice, pendingOrders: viewModel.rrtServiceData.pendingOrders),
RRTLogPage(orders: viewModel.rrtServiceData.completedOrders), RRTLogPage(orders: viewModel.rrtServiceData.completedOrders),
], ],
); );
void onPageChanged(int index) { void onPageChanged(int index) {
pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut); pageController.animateToPage(index, duration: Duration(milliseconds: 200), curve: Curves.easeInOut);

@ -612,6 +612,8 @@ class _ToDoState extends State<ToDo> {
authenticatedUser, authenticatedUser,
widget.browser, widget.browser,
appo.isLiveCareAppointment, appo.isLiveCareAppointment,
null,
null,
appo.appointmentDate, appo.appointmentDate,
appo.appointmentNo, appo.appointmentNo,
appo.clinicID, appo.clinicID,

@ -46,7 +46,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
infoList: TranslationBase.of(context).infoInsuranceCardsPoints, infoList: TranslationBase.of(context).infoInsuranceCardsPoints,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
appBarIcons: [ appBarIcons: [
IconButton( model.isLogin ? IconButton(
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
icon: Container( icon: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
@ -64,7 +64,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
onPressed: () { onPressed: () {
Navigator.push(context, FadePage(page: InsuranceUpdate())); Navigator.push(context, FadePage(page: InsuranceUpdate()));
}, },
), ) : Container(),
], ],
body: Container( body: Container(
margin: EdgeInsets.only(left: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004, top: SizeConfig.screenWidth * 0.04), margin: EdgeInsets.only(left: SizeConfig.screenWidth * 0.004, right: SizeConfig.screenWidth * 0.004, top: SizeConfig.screenWidth * 0.04),

@ -26,9 +26,9 @@ import 'dart:math' as math;
class HomePageFragment2 extends StatefulWidget { class HomePageFragment2 extends StatefulWidget {
DashboardViewModel model; DashboardViewModel model;
Function onPharmacyClick, onLoginClick; Function onPharmacyClick, onLoginClick,onMedicalFileClick;
HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick}); HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick,this.onMedicalFileClick});
@override @override
_HomePageFragment2State createState() => _HomePageFragment2State(); _HomePageFragment2State createState() => _HomePageFragment2State();
@ -129,7 +129,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
), ),
FlatButton( FlatButton(
onPressed: () { onPressed: () {
navigateTo(context, MedicalProfilePageNew()); widget.onMedicalFileClick();
// navigateTo(context, MedicalProfilePageNew());
}, },
child: Text( child: Text(
TranslationBase.of(context).viewMedicalFile, TranslationBase.of(context).viewMedicalFile,

@ -1,11 +1,10 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart'; import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/E-Referral/e_referral_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart'; import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
@ -21,7 +20,6 @@ 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';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:feather_icons_flutter/feather_icons_flutter.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart'; import 'package:flutter_svg/flutter_svg.dart';
@ -603,14 +601,14 @@ class _HomePageState extends State<HomePage> {
SizedBox( SizedBox(
height: 8, height: 8,
), ),
InkWell( Container(
onTap: () => Navigator.push(context, FadePage(page: PaymentService())), margin: EdgeInsets.only(left: 15, right: 15),
child: Container( child: Row(
margin: EdgeInsets.only(left: 15, right: 15), mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Row( children: <Widget>[
mainAxisAlignment: MainAxisAlignment.spaceBetween, InkWell(
children: <Widget>[ onTap: () => Navigator.push(context, FadePage(page: PaymentService())),
Container( child: Container(
width: MediaQuery.of(context).size.width * 0.29, width: MediaQuery.of(context).size.width * 0.29,
child: Center( child: Center(
child: Padding( child: Padding(
@ -641,7 +639,12 @@ class _HomePageState extends State<HomePage> {
color: Colors.white, color: Colors.white,
), ),
), ),
Container( ),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: EReferralPage()));
},
child: Container(
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.all(15.0), padding: const EdgeInsets.all(15.0),
@ -656,7 +659,7 @@ class _HomePageState extends State<HomePage> {
height: 10, height: 10,
), ),
Texts( Texts(
TranslationBase.of(context).offersAndPackages, TranslationBase.of(context).ereferral,
textAlign: TextAlign.center, textAlign: TextAlign.center,
color: Colors.black87, color: Colors.black87,
bold: false, bold: false,
@ -672,51 +675,52 @@ class _HomePageState extends State<HomePage> {
borderRadius: BorderRadius.circular(6.0), borderRadius: BorderRadius.circular(6.0),
color: Colors.white, color: Colors.white,
)), )),
if (projectViewModel.havePrivilege(60)) ),
Container( if (projectViewModel.havePrivilege(60))
width: MediaQuery.of(context).size.width * 0.29, Container(
child: InkWell( width: MediaQuery.of(context).size.width * 0.29,
onTap: () => Navigator.push( child: InkWell(
context, onTap: () => Navigator.push(
FadePage( context,
page: ErOptions( FadePage(
isAppbar: true, page: ErOptions(
))), isAppbar: true,
child: Center( ))),
child: Padding( child: Center(
padding: const EdgeInsets.all(15.0), child: Padding(
child: Column( padding: const EdgeInsets.all(15.0),
children: <Widget>[ child: Column(
Image.asset( children: <Widget>[
'assets/images/Dr_Schedule_report.png', Image.asset(
width: 50, 'assets/images/Dr_Schedule_report.png',
height: 50, width: 50,
), height: 50,
SizedBox( ),
height: 10, SizedBox(
), height: 10,
Texts( ),
TranslationBase.of(context).emergencyServices, Texts(
textAlign: TextAlign.center, TranslationBase.of(context).emergencyServices,
color: Colors.black87, textAlign: TextAlign.center,
bold: false, color: Colors.black87,
fontSize: SizeConfig.textMultiplier * 1.7, bold: false,
) fontSize: SizeConfig.textMultiplier * 1.7,
], )
), ],
), ),
), ),
), ),
height: MediaQuery.of(context).size.width * 0.4,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
), ),
], height: MediaQuery.of(context).size.width * 0.4,
), decoration: BoxDecoration(
borderRadius: BorderRadius.circular(6.0),
color: Colors.white,
),
),
],
), ),
), ),
// ),
SizedBox( SizedBox(
height: 5, height: 5,
), ),

@ -25,9 +25,9 @@ import 'landing_page_pharmcy.dart';
class HomePage2 extends StatefulWidget { class HomePage2 extends StatefulWidget {
final Function goToMyProfile; final Function goToMyProfile;
Function onLoginClick; Function onLoginClick, onMedicalFileClick;
HomePage2({Key key, this.goToMyProfile, this.onLoginClick}); HomePage2({Key key, this.goToMyProfile, this.onLoginClick, this.onMedicalFileClick});
@override @override
_HomePageState2 createState() => _HomePageState2(); _HomePageState2 createState() => _HomePageState2();
@ -58,6 +58,9 @@ class _HomePageState2 extends State<HomePage2> {
onPharmacyClick: () { onPharmacyClick: () {
getPharmacyToken(model); getPharmacyToken(model);
}, },
onMedicalFileClick: () {
widget.onMedicalFileClick();
},
) )
], ],
), ),

@ -168,7 +168,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
if (currentTab > 0 && tab == 2) if (currentTab > 0 && tab == 2)
pageController.jumpToPage(0); pageController.jumpToPage(0);
else if (tab != 0) { else if (tab != 0) {
if (tab == 4 && model.count == 0) { if (tab == 4 && projectViewModel.isLogin && model.count == 0) {
AppToast.showErrorToast(message: TranslationBase.of(context).noBookedAppo); AppToast.showErrorToast(message: TranslationBase.of(context).noBookedAppo);
} else { } else {
pageController.jumpToPage(tab); pageController.jumpToPage(tab);
@ -615,6 +615,9 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
onLoginClick: () { onLoginClick: () {
login(); login();
}, },
onMedicalFileClick: () {
changeCurrentTab(1);
},
), ),
MedicalProfilePageNew(), MedicalProfilePageNew(),
Search(), Search(),

@ -106,6 +106,7 @@ class SliderView extends StatelessWidget {
color: Colors.white, color: Colors.white,
fontSize: 13, fontSize: 13,
letterSpacing: -0.39, letterSpacing: -0.39,
height: 1,
), ),
), ),
), ),

@ -1,3 +1,6 @@
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart'; import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart'; import 'package:diplomaticquarterapp/pages/livecare/widgets/clinic_list.dart';
@ -27,6 +30,8 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
ErRequestHistoryList pendingERRequestHistoryList; ErRequestHistoryList pendingERRequestHistoryList;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
@override @override
void initState() { void initState() {
_tabController = new TabController(length: 2, vsync: this); _tabController = new TabController(length: 2, vsync: this);
@ -36,7 +41,7 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
imagesInfo.add(ImagesInfo( imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png')); imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png'));
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isDataLoaded) getLiveCareHistory(); if (!isDataLoaded && authenticatedUserObject.isLogin) getLiveCareHistory();
}); });
super.initState(); super.initState();

@ -39,7 +39,7 @@ class _State extends State<ClinicCard> {
children: <Widget>[ children: <Widget>[
Card( Card(
margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0), margin: EdgeInsets.fromLTRB(15.0, 10.0, 8.0, 8.0),
color: widget.isSelected ? Colors.blue : widget.isOnline == 1 ? Colors.white : Colors.grey, color: widget.isSelected ? Color(0xff06b806) : widget.patientERGetClinicsList.isOnline == 1 ? Colors.white : Colors.grey,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10), borderRadius: BorderRadius.circular(10),
), ),

@ -39,6 +39,9 @@ class _clinic_listState extends State<ClinicList> {
int currentSelectedIndex = 0; int currentSelectedIndex = 0;
LiveCareClinicsListResponse liveCareClinicsListResponse; LiveCareClinicsListResponse liveCareClinicsListResponse;
List<PatientERGetClinicsList> liveCareOnlineClinicsListResponse;
List<PatientERGetClinicsList> liveCareOfflineClinicsListResponse;
LiveCareScheduleClinicsListResponse liveCareScheduleClinicsListResponse; LiveCareScheduleClinicsListResponse liveCareScheduleClinicsListResponse;
bool isDataLoaded = false; bool isDataLoaded = false;
@ -62,8 +65,11 @@ class _clinic_listState extends State<ClinicList> {
@override @override
void initState() { void initState() {
liveCareClinicsListResponse = new LiveCareClinicsListResponse(); liveCareClinicsListResponse = new LiveCareClinicsListResponse();
liveCareScheduleClinicsListResponse =
new LiveCareScheduleClinicsListResponse(); liveCareOnlineClinicsListResponse = new List();
liveCareOfflineClinicsListResponse = new List();
liveCareScheduleClinicsListResponse = new LiveCareScheduleClinicsListResponse();
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isLiveCareTypeSelected) { if (!isLiveCareTypeSelected) {
@ -77,18 +83,14 @@ class _clinic_listState extends State<ClinicList> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return SingleChildScrollView( return SingleChildScrollView(child: currentSelectedLiveCareType == "immediate" ? getLiveCareImmediateClinicList() : getLiveCareScheduleClinicList());
child: currentSelectedLiveCareType == "immediate"
? getLiveCareImmediateClinicList()
: getLiveCareScheduleClinicList());
} }
void startLiveCare() { void startLiveCare() {
bool isError = false; bool isError = false;
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
ERAppointmentFeesResponse erAppointmentFeesResponse = ERAppointmentFeesResponse erAppointmentFeesResponse = new ERAppointmentFeesResponse();
new ERAppointmentFeesResponse();
service.getERAppointmentFees(selectedClinicID, context).then((res) { service.getERAppointmentFees(selectedClinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['HasAppointment'] == true) { if (res['HasAppointment'] == true) {
@ -98,9 +100,7 @@ class _clinic_listState extends State<ClinicList> {
erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res); erAppointmentFeesResponse = ERAppointmentFeesResponse.fromJson(res);
isError = false; isError = false;
} }
if (!isError) if (!isError) getERAppointmentTime(erAppointmentFeesResponse.getERAppointmentFeesList);
getERAppointmentTime(
erAppointmentFeesResponse.getERAppointmentFeesList);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
@ -158,8 +158,7 @@ class _clinic_listState extends State<ClinicList> {
service.getERAppointmentTime(selectedClinicID, context).then((res) { service.getERAppointmentTime(selectedClinicID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(res); print(res);
showLiveCarePaymentDialog( showLiveCarePaymentDialog(getERAppointmentFeesList, res['WatingtimeInteger']);
getERAppointmentFeesList, res['WatingtimeInteger']);
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print(err); print(err);
@ -167,22 +166,16 @@ class _clinic_listState extends State<ClinicList> {
}); });
} }
showLiveCarePaymentDialog( showLiveCarePaymentDialog(GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) {
GetERAppointmentFeesList getERAppointmentFeesList, int waitingTime) {
showGeneralDialog( showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5), barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) { transitionBuilder: (context, a1, a2, widget) {
final curvedValue = final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform( return Transform(
transform: transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity( child: Opacity(
opacity: a1.value, opacity: a1.value,
child: LiveCarePaymentDialog( child: LiveCarePaymentDialog(getERAppointmentFeesList: getERAppointmentFeesList, waitingTime: waitingTime, clinicName: selectedClinicName),
getERAppointmentFeesList: getERAppointmentFeesList,
waitingTime: waitingTime,
clinicName: selectedClinicName),
), ),
); );
}, },
@ -193,8 +186,7 @@ class _clinic_listState extends State<ClinicList> {
pageBuilder: (context, animation1, animation2) {}) pageBuilder: (context, animation1, animation2) {})
.then((value) { .then((value) {
if (value) { if (value) {
if (getERAppointmentFeesList.total == "0" || if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
getERAppointmentFeesList.total == "0.0") {
showLiveCareInfoDialog(getERAppointmentFeesList); showLiveCareInfoDialog(getERAppointmentFeesList);
} else { } else {
navigateToPaymentMethod(getERAppointmentFeesList, context); navigateToPaymentMethod(getERAppointmentFeesList, context);
@ -203,11 +195,9 @@ class _clinic_listState extends State<ClinicList> {
}); });
} }
showLiveCareInfoDialog( showLiveCareInfoDialog(GetERAppointmentFeesList getERAppointmentFeesList) async {
GetERAppointmentFeesList getERAppointmentFeesList) async {
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
authUser = data; authUser = data;
}); });
@ -216,11 +206,9 @@ class _clinic_listState extends State<ClinicList> {
showGeneralDialog( showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5), barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) { transitionBuilder: (context, a1, a2, widget) {
final curvedValue = final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform( return Transform(
transform: transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity( child: Opacity(
opacity: a1.value, opacity: a1.value,
child: LiveCareInfoDialog(), child: LiveCareInfoDialog(),
@ -234,11 +222,8 @@ class _clinic_listState extends State<ClinicList> {
pageBuilder: (context, animation1, animation2) {}) pageBuilder: (context, animation1, animation2) {})
.then((value) { .then((value) {
if (value) { if (value) {
if (getERAppointmentFeesList.total == "0" || if (getERAppointmentFeesList.total == "0" || getERAppointmentFeesList.total == "0.0") {
getERAppointmentFeesList.total == "0.0") { addNewCallForPatientER(authUser.patientID.toString() + "" + DateTime.now().millisecondsSinceEpoch.toString());
addNewCallForPatientER(authUser.patientID.toString() +
"" +
DateTime.now().millisecondsSinceEpoch.toString());
} else { } else {
navigateToPaymentMethod(getERAppointmentFeesList, context); navigateToPaymentMethod(getERAppointmentFeesList, context);
} }
@ -246,16 +231,14 @@ class _clinic_listState extends State<ClinicList> {
}); });
} }
Future navigateToPaymentMethod( Future navigateToPaymentMethod(GetERAppointmentFeesList getERAppointmentFeesList, context) async {
GetERAppointmentFeesList getERAppointmentFeesList, context) async {
AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList(); AppoitmentAllHistoryResultList appo = new AppoitmentAllHistoryResultList();
appo.clinicID = selectedClinicID; appo.clinicID = selectedClinicID;
appo.appointmentNo = DateTime.now().millisecondsSinceEpoch; appo.appointmentNo = DateTime.now().millisecondsSinceEpoch;
if (await this.sharedPref.getObject(USER_PROFILE) != null) { if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson( var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
await this.sharedPref.getObject(USER_PROFILE));
setState(() { setState(() {
authUser = data; authUser = data;
}); });
@ -264,32 +247,16 @@ class _clinic_listState extends State<ClinicList> {
Navigator.push(context, FadePage(page: PaymentMethod())).then((value) { Navigator.push(context, FadePage(page: PaymentMethod())).then((value) {
print(value); print(value);
if (value != null) { if (value != null) {
openPayment(value, authUser, openPayment(value, authUser, double.parse(getERAppointmentFeesList.total), appo);
double.parse(getERAppointmentFeesList.total), appo);
} }
}); });
} }
openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, openPayment(String paymentMethod, AuthenticatedUser authenticatedUser, double amount, AppoitmentAllHistoryResultList appo) {
double amount, AppoitmentAllHistoryResultList appo) { browser = new MyInAppBrowser(onExitCallback: onBrowserExit, appo: appo, onLoadStartCallback: onBrowserLoadStart);
browser = new MyInAppBrowser(
onExitCallback: onBrowserExit, browser.openPaymentBrowser(amount, "LiveCare Payment", Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo), "12", authenticatedUser.emailAddress, paymentMethod,
appo: appo, authenticatedUser.patientType, authenticatedUser.firstName, authenticatedUser.patientID, authenticatedUser, browser, false, "4", selectedClinicID.toString());
onLoadStartCallback: onBrowserLoadStart);
browser.openPaymentBrowser(
amount,
"LiveCare Payment",
Utils.getAppointmentTransID(12, appo.clinicID, appo.appointmentNo),
"12",
authenticatedUser.emailAddress,
paymentMethod,
authenticatedUser.patientType,
authenticatedUser.firstName,
authenticatedUser.patientID,
authenticatedUser,
browser,
false);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {
@ -321,19 +288,13 @@ class _clinic_listState extends State<ClinicList> {
checkPaymentStatus(AppoitmentAllHistoryResultList appo) { checkPaymentStatus(AppoitmentAllHistoryResultList appo) {
DoctorsListService service = new DoctorsListService(); DoctorsListService service = new DoctorsListService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service.checkPaymentStatus(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo), context).then((res) {
.checkPaymentStatus(
Utils.getAppointmentTransID(
appo.projectID, appo.clinicID, appo.appointmentNo),
context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
print("Printing Payment Status Reponse!!!!"); print("Printing Payment Status Reponse!!!!");
print(res); print(res);
String paymentInfo = res['Response_Message']; String paymentInfo = res['Response_Message'];
if (paymentInfo == 'Success') { if (paymentInfo == 'Success') {
addNewCallForPatientER(Utils.getAppointmentTransID( addNewCallForPatientER(Utils.getAppointmentTransID(appo.projectID, appo.clinicID, appo.appointmentNo));
appo.projectID, appo.clinicID, appo.appointmentNo));
} else { } else {
AppToast.showErrorToast(message: res['Response_Message']); AppToast.showErrorToast(message: res['Response_Message']);
} }
@ -347,12 +308,9 @@ class _clinic_listState extends State<ClinicList> {
addNewCallForPatientER(String clientRequestID) { addNewCallForPatientER(String clientRequestID) {
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
service service.addNewCallForPatientER(selectedClinicID, clientRequestID, context).then((res) {
.addNewCallForPatientER(selectedClinicID, clientRequestID, context)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast( AppToast.showSuccessToast(message: "New Call has been added successfully");
message: "New Call has been added successfully");
widget.getLiveCareHistory(); widget.getLiveCareHistory();
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -374,13 +332,19 @@ class _clinic_listState extends State<ClinicList> {
print(res['PatientER_GetClinicsList'].length); print(res['PatientER_GetClinicsList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
liveCareClinicsListResponse = liveCareOnlineClinicsListResponse.clear();
LiveCareClinicsListResponse.fromJson(res); liveCareClinicsListResponse = LiveCareClinicsListResponse.fromJson(res);
print(liveCareClinicsListResponse.patientERGetClinicsList.length);
selectedClinicID = liveCareClinicsListResponse.patientERGetClinicsList.forEach((clinic) {
liveCareClinicsListResponse.patientERGetClinicsList[0].serviceID; if (clinic.isOnline == 1) {
selectedClinicName = liveCareClinicsListResponse liveCareOnlineClinicsListResponse.add(clinic);
.patientERGetClinicsList[0].serviceName; } else {
liveCareOfflineClinicsListResponse.add(clinic);
}
});
selectedClinicID = liveCareClinicsListResponse.patientERGetClinicsList[0].serviceID;
selectedClinicName = liveCareClinicsListResponse.patientERGetClinicsList[0].serviceName;
isDataLoaded = true; isDataLoaded = true;
}); });
} else { } else {
@ -403,14 +367,10 @@ class _clinic_listState extends State<ClinicList> {
print(res['ClinicsHaveScheduleList'].length); print(res['ClinicsHaveScheduleList'].length);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
liveCareScheduleClinicsListResponse = liveCareScheduleClinicsListResponse = LiveCareScheduleClinicsListResponse.fromJson(res);
LiveCareScheduleClinicsListResponse.fromJson(res); print(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length);
print(liveCareScheduleClinicsListResponse selectedClinicID = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[0].serviceID;
.clinicsHaveScheduleList.length); selectedClinicName = liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[0].clinicDesc;
selectedClinicID = liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[0].serviceID;
selectedClinicName = liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[0].clinicDesc;
isDataLoaded = true; isDataLoaded = true;
}); });
} else { } else {
@ -483,25 +443,15 @@ class _clinic_listState extends State<ClinicList> {
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
itemCount: liveCareScheduleClinicsListResponse itemCount: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList.length,
.clinicsHaveScheduleList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return InkWell( return InkWell(
onTap: () { onTap: () {
updateSelectedScheduleIndex( updateSelectedScheduleIndex(liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index]);
liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[index]);
}, },
child: ScheduleClinicCard( child: ScheduleClinicCard(
isSelected: selectedClinicID == isSelected: selectedClinicID == liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index].serviceID ? true : false,
liveCareScheduleClinicsListResponse clinicsHaveScheduleList: liveCareScheduleClinicsListResponse.clinicsHaveScheduleList[index],
.clinicsHaveScheduleList[index]
.serviceID
? true
: false,
clinicsHaveScheduleList:
liveCareScheduleClinicsListResponse
.clinicsHaveScheduleList[index],
languageID: languageID, languageID: languageID,
), ),
); );
@ -555,39 +505,51 @@ class _clinic_listState extends State<ClinicList> {
children: <Widget>[ children: <Widget>[
Container( Container(
margin: EdgeInsets.all(15.0), margin: EdgeInsets.all(15.0),
child: Text("Online Clinics: ", child: Text("Online Clinics: ", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
style: TextStyle( ),
fontSize: 20.0, fontWeight: FontWeight.bold)), ListView.builder(
scrollDirection: Axis.vertical,
shrinkWrap: true,
physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0),
// itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length,
itemCount: liveCareOnlineClinicsListResponse.length,
itemBuilder: (context, index) {
return InkWell(
onTap: () {
updateSelectedIndex(liveCareOnlineClinicsListResponse[index]);
},
child: ClinicCard(
isSelected: selectedClinicID == liveCareOnlineClinicsListResponse[index].serviceID ? true : false,
patientERGetClinicsList: liveCareOnlineClinicsListResponse[index],
languageID: languageID,
),
);
},
),
Container(
margin: EdgeInsets.all(15.0),
child: Text("Offline Clinics: ", style: TextStyle(fontSize: 20.0, fontWeight: FontWeight.bold)),
), ),
ListView.builder( ListView.builder(
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
shrinkWrap: true, shrinkWrap: true,
physics: ScrollPhysics(), physics: ScrollPhysics(),
padding: EdgeInsets.all(0.0), padding: EdgeInsets.all(0.0),
itemCount: liveCareClinicsListResponse // itemCount: liveCareClinicsListResponse.patientERGetClinicsList.length,
.patientERGetClinicsList.length, itemCount: liveCareOfflineClinicsListResponse.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
return InkWell( return InkWell(
onTap: () { onTap: () {
if (liveCareClinicsListResponse // if (liveCareClinicsListResponse.patientERGetClinicsList[index].isOnline == 1) {
.patientERGetClinicsList[index].isOnline == // updateSelectedIndex(liveCareOnlineClinicsListResponse[index]);
1) { // } else {
updateSelectedIndex(liveCareClinicsListResponse // AppToast.showErrorToast(message: "Clinic is offline");
.patientERGetClinicsList[index]); // }
} else {
AppToast.showErrorToast(
message: "Clinic is offline");
}
}, },
child: ClinicCard( child: ClinicCard(
isSelected: selectedClinicID == isSelected: selectedClinicID == liveCareOfflineClinicsListResponse[index].serviceID ? true : false,
liveCareClinicsListResponse patientERGetClinicsList: liveCareOfflineClinicsListResponse[index],
.patientERGetClinicsList[index]
.serviceID
? true
: false,
patientERGetClinicsList: liveCareClinicsListResponse
.patientERGetClinicsList[index],
languageID: languageID, languageID: languageID,
), ),
); );
@ -633,11 +595,8 @@ class _clinic_listState extends State<ClinicList> {
List<DoctorList> doctorsList = []; List<DoctorList> doctorsList = [];
LiveCareService service = new LiveCareService(); LiveCareService service = new LiveCareService();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List<PatientDoctorAppointmentList> _patientDoctorAppointmentListHospital = List();
List(); service.getLiveCareScheduledDoctorList(context, selectedClinicID).then((res) {
service
.getLiveCareScheduledDoctorList(context, selectedClinicID)
.then((res) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
setState(() { setState(() {
@ -647,34 +606,23 @@ class _clinic_listState extends State<ClinicList> {
}); });
doctorsList.forEach((element) { doctorsList.forEach((element) {
List<PatientDoctorAppointmentList> doctorByHospital = List<PatientDoctorAppointmentList> doctorByHospital = _patientDoctorAppointmentListHospital
_patientDoctorAppointmentListHospital .where(
.where( (elementClinic) => elementClinic.filterName == element.projectName,
(elementClinic) => )
elementClinic.filterName == element.projectName, .toList();
)
.toList();
if (doctorByHospital.length != 0) { if (doctorByHospital.length != 0) {
_patientDoctorAppointmentListHospital[ _patientDoctorAppointmentListHospital[_patientDoctorAppointmentListHospital.indexOf(doctorByHospital[0])].patientDoctorAppointmentList.add(element);
_patientDoctorAppointmentListHospital
.indexOf(doctorByHospital[0])]
.patientDoctorAppointmentList
.add(element);
} else { } else {
_patientDoctorAppointmentListHospital.add( _patientDoctorAppointmentListHospital
PatientDoctorAppointmentList( .add(PatientDoctorAppointmentList(filterName: element.projectName, distanceInKMs: element.projectDistanceInKiloMeters.toString(), patientDoctorAppointment: element));
filterName: element.projectName,
distanceInKMs:
element.projectDistanceInKiloMeters.toString(),
patientDoctorAppointment: element));
} }
}); });
} else {} } else {}
}); });
this.sharedPref.setBool(IS_LIVECARE_APPOINTMENT, true); this.sharedPref.setBool(IS_LIVECARE_APPOINTMENT, true);
navigateToSearchResults( navigateToSearchResults(context, doctorsList, _patientDoctorAppointmentListHospital);
context, doctorsList, _patientDoctorAppointmentListHospital);
} else {} } else {}
}).catchError((err) { }).catchError((err) {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
@ -683,19 +631,8 @@ class _clinic_listState extends State<ClinicList> {
}); });
} }
Future navigateToSearchResults( Future navigateToSearchResults(context, List<DoctorList> docList, List<PatientDoctorAppointmentList> patientDoctorAppointmentListHospital) async {
context, Navigator.push(context, FadePage(page: SearchResults(doctorsList: docList, isLiveCareAppointment: true, patientDoctorAppointmentListHospital: patientDoctorAppointmentListHospital)));
List<DoctorList> docList,
List<PatientDoctorAppointmentList>
patientDoctorAppointmentListHospital) async {
Navigator.push(
context,
FadePage(
page: SearchResults(
doctorsList: docList,
isLiveCareAppointment: true,
patientDoctorAppointmentListHospital:
patientDoctorAppointmentListHospital)));
} }
updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) { updateSelectedIndex(PatientERGetClinicsList patientERGetClinicsList) {

@ -592,9 +592,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
Provider.of<ProjectViewModel>(context, listen: false).setUser(authenticatedUserObject.user); Provider.of<ProjectViewModel>(context, listen: false).setUser(authenticatedUserObject.user);
getToDoCount(); getToDoCount();
pharmacyModuleViewModel.generatePharmacyToken().then((value) async { // pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser(); // if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser();
}); // });
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()

@ -328,9 +328,9 @@ class _Login extends State<Login> {
projectViewModel.user = authenticatedUserObject.user; projectViewModel.user = authenticatedUserObject.user;
//await familyFileProvider.getSharedRecordByStatus(); //await familyFileProvider.getSharedRecordByStatus();
await pharmacyModuleViewModel.generatePharmacyToken().then((value) async { // await pharmacyModuleViewModel.generatePharmacyToken().then((value) async {
if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser(); // if (pharmacyModuleViewModel.error.isNotEmpty) await pharmacyModuleViewModel.createUser();
}); // });
appointmentRateViewModel appointmentRateViewModel
.getIsLastAppointmentRatedList() .getIsLastAppointmentRatedList()

@ -1,5 +1,6 @@
import 'dart:ui'; import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/enum/filter_type.dart'; import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/ask_doctor_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
@ -46,6 +47,12 @@ class _AskDoctorHomPageState extends State<AskDoctorHomPage> with SingleTickerPr
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: Color(0xffF8F8F8), backgroundColor: Color(0xffF8F8F8),
isShowDecPage: true,
description: TranslationBase.of(context).infoAskDoc,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/ask-doctor/ar/1.png')
],
body: Column( body: Column(
children: [ children: [
Row( Row(

@ -72,6 +72,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
appBarTitle: TranslationBase.of(context).advancePayment, appBarTitle: TranslationBase.of(context).advancePayment,
description: TranslationBase.of(context).infoAdvancePayment, description: TranslationBase.of(context).infoAdvancePayment,
isBottomBar: model.isLogin ? true : false,
body: SingleChildScrollView( body: SingleChildScrollView(
physics: ScrollPhysics(), physics: ScrollPhysics(),
child: Container( child: Container(

@ -226,7 +226,9 @@ class ConfirmPaymentPage extends StatelessWidget {
advanceModel.fileNumber, advanceModel.fileNumber,
authenticatedUser, authenticatedUser,
browser, browser,
false); false,
null,
null);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -16,119 +17,101 @@ class ClassesPage extends StatelessWidget {
final String projectName; final String projectName;
final int projectID; final int projectID;
const ClassesPage( const ClassesPage({Key key, this.glassPerscription, this.appointmentNo, this.projectName, this.projectID}) : super(key: key);
{Key key,
this.glassPerscription,
this.appointmentNo,
this.projectName,
this.projectID})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<EyeViewModel>( return SingleChildScrollView(
builder: (_, model, w) => AppScaffold( child: Container(
body: SingleChildScrollView( margin: EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 20),
child: Container( child: Column(
margin: EdgeInsets.only(top: 70, left: 15, right: 15, bottom: 15), children: [
child: Column( Card(
children: [ shape: cardRadius(12),
Container( elevation: 1,
decoration: BoxDecoration( child: Container(
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(Radius.circular(8)), child: Column(
color: Colors.white), crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, Padding(
children: [ padding: const EdgeInsets.all(8.0),
Padding( child: Text(
padding: const EdgeInsets.all(8.0), TranslationBase.of(context).rightEye,
child: Texts( style: TextStyle(
TranslationBase.of(context).rightEye, fontSize: 16,
fontSize: 23, fontWeight: FontWeight.w600,
bold: true, letterSpacing: -0.64,
), ),
), ),
getRow(TranslationBase.of(context).sphere, ),
'${glassPerscription.rightEyeSpherical}', '-'), getRow(TranslationBase.of(context).sphere, '${glassPerscription.rightEyeSpherical}', '-'),
getRow(TranslationBase.of(context).cylinder, getRow(TranslationBase.of(context).cylinder, '${glassPerscription.rightEyeCylinder}', '-'),
'${glassPerscription.rightEyeCylinder}', '-'), getRow(TranslationBase.of(context).axis, '${glassPerscription.rightEyeAxis}', '-'),
getRow(TranslationBase.of(context).axis, getRow(TranslationBase.of(context).prism, '${glassPerscription.rightEyePrism}', '-'),
'${glassPerscription.rightEyeAxis}', '-'), getRow(TranslationBase.of(context).va, '${glassPerscription.rightEyeVA}', '-',isLast:true),
getRow(TranslationBase.of(context).prism, ],
'${glassPerscription.rightEyePrism}', '-'),
getRow(TranslationBase.of(context).va,
'${glassPerscription.rightEyeVA}', '-'),
],
),
),
SizedBox(
height: 17,
), ),
Container( ),
decoration: BoxDecoration( ),
shape: BoxShape.rectangle, SizedBox(
borderRadius: BorderRadius.all(Radius.circular(8)), height: 12,
color: Colors.white), ),
child: Column( Card(
crossAxisAlignment: CrossAxisAlignment.start, shape: cardRadius(12),
children: [ elevation: 1,
Padding( child: Container( child: Column(
padding: const EdgeInsets.all(8.0), crossAxisAlignment: CrossAxisAlignment.start,
child: Texts( children: [
TranslationBase.of(context).leftEye, Padding(
fontSize: 23, padding: const EdgeInsets.all(8.0),
bold: true, child: Text(
), TranslationBase.of(context).leftEye,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
), ),
getRow(TranslationBase.of(context).sphere,
'${glassPerscription.leftEyeSpherical}', '-'),
getRow(TranslationBase.of(context).cylinder,
'${glassPerscription.leftEyeCylinder}', '-'),
getRow(TranslationBase.of(context).axis,
'${glassPerscription.leftEyeAxis}', '-'),
getRow(TranslationBase.of(context).prism,
'${glassPerscription.leftEyePrism}', '-'),
getRow(TranslationBase.of(context).va,
'${glassPerscription.leftEyeVA}', '-'),
],
),
),
SizedBox(
height: 17,
),
Container(
width: double.infinity,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
onTap: () {
showConfirmMessage(context, () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.sendGlassesPrescriptionEmail(
appointmentNo: appointmentNo,
projectName: projectName,
projectID: projectID);
GifLoaderDialogUtils.hideDialog(context);
}, model.user.emailAddress);
},
textColor: Colors.white,
color: Colors.red[700],
icon: Icon(
Icons.email,
color: Colors.white,
), ),
), ),
) getRow(TranslationBase.of(context).sphere, '${glassPerscription.leftEyeSpherical}', '-'),
], getRow(TranslationBase.of(context).cylinder, '${glassPerscription.leftEyeCylinder}', '-'),
getRow(TranslationBase.of(context).axis, '${glassPerscription.leftEyeAxis}', '-'),
getRow(TranslationBase.of(context).prism, '${glassPerscription.leftEyePrism}', '-'),
getRow(TranslationBase.of(context).va, '${glassPerscription.leftEyeVA}', '-',isLast:true),
],
),
),
), ),
), SizedBox(
height: 17,
),
// Container(
// width: double.infinity,
// child: SecondaryButton(
// label: TranslationBase.of(context).sendEmail,
// onTap: () {
// showConfirmMessage(context, () async {
// GifLoaderDialogUtils.showMyDialog(context);
// await model.sendGlassesPrescriptionEmail(appointmentNo: appointmentNo, projectName: projectName, projectID: projectID);
// GifLoaderDialogUtils.hideDialog(context);
// }, model.user.emailAddress);
// },
// textColor: Colors.white,
// color: Colors.red[700],
// icon: Icon(
// Icons.email,
// color: Colors.white,
// ),
// ),
// )
],
), ),
), ),
); );
} }
void showConfirmMessage( void showConfirmMessage(BuildContext context, GestureTapCallback onTap, String email) {
BuildContext context, GestureTapCallback onTap, String email) {
showDialog( showDialog(
context: context, context: context,
child: ConfirmSendEmailDialog( child: ConfirmSendEmailDialog(
@ -140,31 +123,40 @@ class ClassesPage extends StatelessWidget {
); );
} }
Widget getRow(String title, String val1, String val2) => Padding( Widget getRow(String title, String val1, String val2,{bool isLast=false}) => Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.only(left: 8,right: 8),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Row( Padding(
mainAxisAlignment: MainAxisAlignment.spaceAround, padding: const EdgeInsets.all(8.0),
crossAxisAlignment: CrossAxisAlignment.start, child: Row(
children: [ mainAxisAlignment: MainAxisAlignment.spaceAround,
Expanded(flex: 4, child: Texts(title)), crossAxisAlignment: CrossAxisAlignment.start,
Expanded( children: [
flex: 2, Expanded(flex: 4, child: Text(title,style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),)),
child: Row( Expanded(
mainAxisAlignment: MainAxisAlignment.spaceAround, flex: 2,
children: [ child: Row(
Texts(val1 == 'null' ? '-' : val1), mainAxisAlignment: MainAxisAlignment.spaceAround,
Texts(val2 != 'null' ? '-' : val2), children: [
], Text(
), val1 == 'null' ? '-' : val1,
) style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
], ),
), Text(
Divider() val2 != 'null' ? '-' : val2,
], style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
),
],
),
)
],
),
), ),
); isLast?Container(height: 4,): Divider()
],
),
);
} }

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.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/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
@ -18,120 +19,107 @@ class ContactLensPage extends StatelessWidget {
final String projectName; final String projectName;
final int projectID; final int projectID;
const ContactLensPage( const ContactLensPage({Key key, this.listHISGetContactLensPerscription, this.appointmentNo, this.projectName, this.projectID}) : super(key: key);
{Key key,
this.listHISGetContactLensPerscription,
this.appointmentNo,
this.projectName,
this.projectID})
: super(key: key);
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<EyeViewModel>( return BaseView<EyeViewModel>(
builder: (_,model,w)=> builder: (_, model, w) => AppScaffold(
AppScaffold(
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
margin: EdgeInsets.only(top: 70, left: 15, right: 15, bottom: 15), margin: EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 20),
child: Column( child: Column(
children: [ children: [
Container( Card(
decoration: BoxDecoration( shape: cardRadius(12),
shape: BoxShape.rectangle, elevation: 1,
borderRadius: BorderRadius.all(Radius.circular(8)), child: Container(
color: Colors.white), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Padding(
Padding( padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(8.0), child: Text(
child: Texts( TranslationBase.of(context).rightEye,
TranslationBase.of(context).rightEye, style: TextStyle(
fontSize: 23, fontSize: 16,
bold: true, fontWeight: FontWeight.w600,
letterSpacing: -0.64,
),
),
), ),
), getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription.brand}'),
getRow(TranslationBase.of(context).brand, getRow('B.C', '${listHISGetContactLensPerscription.baseCurve}'),
'${listHISGetContactLensPerscription.brand}'), getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription.power}'),
getRow('B.C', getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription.diameter}'),
'${listHISGetContactLensPerscription.baseCurve}'), getRow('OZ', '${listHISGetContactLensPerscription.oZ}'),
getRow(TranslationBase.of(context).power, getRow('CT', '${listHISGetContactLensPerscription.cT}'),
'${listHISGetContactLensPerscription.power}'), getRow('Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).diameter, getRow(TranslationBase.of(context).reminder, '${listHISGetContactLensPerscription.remarks}', isLast: true),
'${listHISGetContactLensPerscription.diameter}'), ],
getRow('OZ', '${listHISGetContactLensPerscription.oZ}'), ),
getRow('CT', '${listHISGetContactLensPerscription.cT}'),
getRow(
'Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).reminder,
'${listHISGetContactLensPerscription.remarks}'),
],
), ),
), ),
SizedBox( SizedBox(
height: 17, height: 12,
), ),
Container( Card(
decoration: BoxDecoration( shape: cardRadius(12),
shape: BoxShape.rectangle, elevation: 1,
borderRadius: BorderRadius.all(Radius.circular(8)), child: Container(
color: Colors.white), child: Column(
child: Column( crossAxisAlignment: CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, children: [
children: [ Padding(
Padding( padding: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(8.0), child: Text(
child: Texts( TranslationBase.of(context).leftEye,
TranslationBase.of(context).leftEye, style: TextStyle(
fontSize: 23, fontSize: 16,
bold: true, fontWeight: FontWeight.w600,
letterSpacing: -0.64,
),
),
), ),
), getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription.brand}'),
getRow(TranslationBase.of(context).brand, getRow('B.C', '${listHISGetContactLensPerscription.baseCurve}'),
'${listHISGetContactLensPerscription.brand}'), getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription.power}'),
getRow('B.C', getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription.diameter}'),
'${listHISGetContactLensPerscription.baseCurve}'), getRow('OZ', '${listHISGetContactLensPerscription.oZ}'),
getRow(TranslationBase.of(context).power, getRow('CT', '${listHISGetContactLensPerscription.cT}'),
'${listHISGetContactLensPerscription.power}'), getRow('Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).diameter, getRow(TranslationBase.of(context).reminder, '${listHISGetContactLensPerscription.remarks}', isLast: true),
'${listHISGetContactLensPerscription.diameter}'), ],
getRow('OZ', '${listHISGetContactLensPerscription.oZ}'), ),
getRow('CT', '${listHISGetContactLensPerscription.cT}'),
getRow(
'Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).reminder,
'${listHISGetContactLensPerscription.remarks}'),
],
), ),
), ),
SizedBox( SizedBox(
height: 17, height: 17,
), ),
if (projectViewModel.havePrivilege(15)) // if (projectViewModel.havePrivilege(15))
Container( // Container(
width: double.infinity, // width: double.infinity,
child: SecondaryButton( // child: SecondaryButton(
label: TranslationBase.of(context).sendEmail, // label: TranslationBase.of(context).sendEmail,
textColor: Colors.white, // textColor: Colors.white,
color: Colors.red[700], // color: Colors.red[700],
onTap: (){ // onTap: (){
showConfirmMessage(context, () async { // showConfirmMessage(context, () async {
GifLoaderDialogUtils.showMyDialog(context); // GifLoaderDialogUtils.showMyDialog(context);
await model.sendContactLensPrescriptionEmail( // await model.sendContactLensPrescriptionEmail(
appointmentNo: appointmentNo, // appointmentNo: appointmentNo,
projectName: projectName, // projectName: projectName,
projectID: projectID); // projectID: projectID);
GifLoaderDialogUtils.hideDialog(context); // GifLoaderDialogUtils.hideDialog(context);
}, model.user.emailAddress); // }, model.user.emailAddress);
}, // },
icon: Icon( // icon: Icon(
Icons.email, // Icons.email,
color: Colors.white, // color: Colors.white,
), // ),
), // ),
) // )
], ],
), ),
), ),
@ -140,35 +128,48 @@ class ContactLensPage extends StatelessWidget {
); );
} }
Widget getRow(String title, String val1) => Padding( Widget getRow(String title, String val1, {bool isLast = false}) => Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.only(left: 8, right: 8),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Padding(
mainAxisAlignment: MainAxisAlignment.spaceAround, padding: const EdgeInsets.all(8.0),
children: [ child: Row(
Expanded(flex: 4, child: Texts(title)), mainAxisAlignment: MainAxisAlignment.spaceAround,
Expanded( children: [
flex: 2, Expanded(
child: Row( flex: 4,
mainAxisAlignment: MainAxisAlignment.spaceAround, child: Text(
crossAxisAlignment: CrossAxisAlignment.start, title,
children: [ style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
Texts(val1 == 'null' ? '-' : val1), )),
], Expanded(
), flex: 2,
) child: Row(
], mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
val1 == 'null' ? '-' : val1,
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: -0.4),
),
],
),
)
],
),
), ),
Divider() isLast
? Container(
height: 4,
)
: Divider()
], ],
), ),
); );
void showConfirmMessage(BuildContext context, GestureTapCallback onTap, String email) {
void showConfirmMessage(
BuildContext context, GestureTapCallback onTap, String email) {
showDialog( showDialog(
context: context, context: context,
child: ConfirmSendEmailDialog( child: ConfirmSendEmailDialog(

@ -3,12 +3,25 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart'; import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/weight_pressure_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.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/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/new_design/doctor_header.dart';
import 'package:diplomaticquarterapp/widgets/new_design/my_tab_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
import 'ClassesPage.dart'; import 'ClassesPage.dart';
import 'ContactLensPage.dart'; import 'ContactLensPage.dart';
@ -16,21 +29,26 @@ import 'ContactLensPage.dart';
class EyeHomePage extends StatefulWidget { class EyeHomePage extends StatefulWidget {
final AppoimentAllHistoryResultList appointmentAllHistoryResultList; final AppoimentAllHistoryResultList appointmentAllHistoryResultList;
const EyeHomePage({Key key, this.appointmentAllHistoryResultList}) const EyeHomePage({Key key, this.appointmentAllHistoryResultList}) : super(key: key);
: super(key: key);
@override @override
_EyeHomePageState createState() => _EyeHomePageState(); _EyeHomePageState createState() => _EyeHomePageState();
} }
class _EyeHomePageState extends State<EyeHomePage> class _EyeHomePageState extends State<EyeHomePage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
List<DoctorRateDetails> doctorDetailsList = List();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
_tabController.addListener(() {
setState(() {
});
});
} }
@override @override
@ -41,76 +59,97 @@ class _EyeHomePageState extends State<EyeHomePage>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return AppScaffold( ProjectViewModel projectViewModel = Provider.of(context);
isShowAppBar: true, return BaseView<EyeViewModel>(
isShowDecPage: false, builder: (_, model, w) => AppScaffold(
appBarTitle: TranslationBase.of(context).measurements, isShowAppBar: true,
body: Scaffold( isShowDecPage: false,
extendBodyBehindAppBar: true, appBarTitle: widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj,
appBar: PreferredSize( showNewAppBarTitle: true,
preferredSize: Size.fromHeight(60.0), showNewAppBar: true,
child: Stack( backgroundColor: CustomColors.appBackgroudGreyColor,
children: <Widget>[ body: Column(
Positioned( children: <Widget>[
bottom: 1, DoctorHeader(
left: 0, headerModel: HeaderModel(
right: 0, widget.appointmentAllHistoryResultList.doctorTitle + " " + widget.appointmentAllHistoryResultList.doctorNameObj,
child: BackdropFilter( widget.appointmentAllHistoryResultList.doctorImageURL,
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), widget.appointmentAllHistoryResultList.doctorSpeciality,
child: Container( "",
color: Theme.of(context) widget.appointmentAllHistoryResultList.projectName,
.scaffoldBackgroundColor DateUtil.convertStringToDate(widget.appointmentAllHistoryResultList.appointmentDate),
.withOpacity(0.8), widget.appointmentAllHistoryResultList.startTime.substring(0, 5),
height: 70.0, null,
), widget.appointmentAllHistoryResultList.doctorRate,
), widget.appointmentAllHistoryResultList.actualDoctorRate,
widget.appointmentAllHistoryResultList.noOfPatientsRate,
"",
//model.user.emailAddress,
), ),
Center( isNeedToShowButton: _tabController.index==0?true:projectViewModel.havePrivilege(15),
child: Container( showConfirmMessageDialog: true,
height: 55.0, onRatingAndReviewTap: getDoctorRatingsDetails,
margin: EdgeInsets.only(left: 20,right: 20,top: 15), onTap: () {
color: Colors.white, showConfirmMessage(context, () async {
child: Center( GifLoaderDialogUtils.showMyDialog(context);
child: TabBar( await model.sendGlassesPrescriptionEmail(
isScrollable: true, appointmentNo: widget.appointmentAllHistoryResultList.appointmentNo,
controller: _tabController, projectName: widget.appointmentAllHistoryResultList.projectName,
indicatorWeight: 5.0, projectID: widget.appointmentAllHistoryResultList.projectID);
indicatorSize: TabBarIndicatorSize.tab, GifLoaderDialogUtils.hideDialog(context);
labelColor: Theme.of(context).primaryColor, }, model.user.emailAddress);
labelPadding: },
EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0), ),
unselectedLabelColor: Colors.grey[800], Container(
tabs: [ height: 45.0,
Container( width: double.infinity,
width: MediaQuery.of(context).size.width * 0.40, child: Center(
child: Center( child: TabBar(
child: Texts(TranslationBase.of(context).classes), isScrollable: false,
controller: _tabController,
indicatorWeight: 2.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
// width: double.infinity,
child: Center(
child: Text(
TranslationBase.of(context).classes,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.36,
), ),
), ),
Container( ),
width: MediaQuery.of(context).size.width * 0.40, ),
child: Center( Container(
child: Texts(TranslationBase.of(context).contactLens), // width: double.infinity,
child: Center(
child: Text(
TranslationBase.of(context).contactLens,
style: TextStyle(
fontWeight: FontWeight.w600,
fontSize: 12,
letterSpacing: -0.36,
), ),
), ),
], ),
), ),
), ],
), ),
), ),
], ),
),
),
body: Column(
children: <Widget>[
Expanded( Expanded(
child: TabBarView( child: TabBarView(
physics: BouncingScrollPhysics(), physics: NeverScrollableScrollPhysics(),
controller: _tabController, controller: _tabController,
children: <Widget>[ children: <Widget>[
ClassesPage( ClassesPage(
glassPerscription: widget.appointmentAllHistoryResultList glassPerscription: widget.appointmentAllHistoryResultList.listHISGetGlassPerscription[0],
.listHISGetGlassPerscription[0],
appointmentNo: widget.appointmentAllHistoryResultList.appointmentNo, appointmentNo: widget.appointmentAllHistoryResultList.appointmentNo,
projectName: widget.appointmentAllHistoryResultList.projectName, projectName: widget.appointmentAllHistoryResultList.projectName,
projectID: widget.appointmentAllHistoryResultList.projectID, projectID: widget.appointmentAllHistoryResultList.projectID,
@ -129,4 +168,233 @@ class _EyeHomePageState extends State<EyeHomePage>
), ),
); );
} }
void showConfirmMessage(BuildContext context, GestureTapCallback onTap, String email) {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: email,
onTapSendEmail: () {
onTap();
},
),
);
}
void getDoctorRatingsDetails() {
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getDoctorsRatingDetails(widget.appointmentAllHistoryResultList.doctorID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
doctorDetailsList.clear();
res['DoctorRatingDetailsList'].forEach((v) {
doctorDetailsList.add(new DoctorRateDetails.fromJson(v));
});
showRatingDialog(doctorDetailsList);
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: err);
print(err);
});
}
void showRatingDialog(List<DoctorRateDetails> doctorDetailsList) {
showGeneralDialog(
barrierColor: Colors.black.withOpacity(0.5),
transitionBuilder: (context, a1, a2, widget) {
final curvedValue = Curves.easeInOutBack.transform(a1.value) - 1.0;
return Transform(
transform: Matrix4.translationValues(0.0, curvedValue * 200, 0.0),
child: Opacity(
opacity: a1.value,
child: Dialog(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
// height: 400.0,
width: MediaQuery.of(context).size.width * 0.8,
color: Colors.white,
child: Column(
children: [
Container(
alignment: Alignment.center,
width: MediaQuery.of(context).size.width,
color: Theme.of(context).primaryColor,
margin: EdgeInsets.only(bottom: 5.0),
padding: EdgeInsets.all(10.0),
child: Text(TranslationBase.of(context).doctorRating, style: TextStyle(fontSize: 22.0, color: Colors.white))),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Text(this.widget.appointmentAllHistoryResultList.actualDoctorRate.ceilToDouble().toString(), style: TextStyle(fontSize: 32.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 5.0),
alignment: Alignment.center,
child: RatingBar.readOnly(
initialRating: this.widget.appointmentAllHistoryResultList.actualDoctorRate.toDouble(),
size: 35.0,
filledColor: Colors.yellow[700],
emptyColor: Colors.grey[500],
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star,
),
),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(this.widget.appointmentAllHistoryResultList.noOfPatientsRate.toString() + " " + TranslationBase.of(context).reviews,
style: TextStyle(fontSize: 14.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).excellent, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[0].patientNumber),
height: 6.0,
child: Container(
color: Colors.green[700],
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).v_good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[1].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffB7B723),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).good, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[2].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEBA727),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[3].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffEB7227),
),
),
),
],
),
),
Container(
child: Row(
children: [
Container(
width: 100.0,
margin: EdgeInsets.only(top: 10.0, left: 15.0, right: 15.0),
child: Text(TranslationBase.of(context).below_average, style: TextStyle(fontSize: 13.0, color: Colors.black))),
Container(
margin: EdgeInsets.only(top: 10.0),
child: SizedBox(
width: getRatingWidth(doctorDetailsList[4].patientNumber),
height: 6.0,
child: Container(
color: Color(0xffE20C0C),
),
),
),
],
),
),
Container(margin: EdgeInsets.only(top: 40.0), child: Divider()),
Container(
margin: EdgeInsets.only(top: 0.0),
child: Align(
alignment: FractionalOffset.bottomCenter,
child: ButtonTheme(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
minWidth: MediaQuery.of(context).size.width,
height: 40.0,
child: RaisedButton(
elevation: 0.0,
color: Colors.white,
textColor: Colors.red,
hoverColor: Colors.transparent,
focusColor: Colors.transparent,
highlightColor: Colors.transparent,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
Navigator.of(context).pop();
},
child: Text(TranslationBase.of(context).cancel, style: TextStyle(fontSize: 18.0)),
),
),
),
),
],
),
),
],
),
),
),
);
},
transitionDuration: Duration(milliseconds: 500),
barrierDismissible: true,
barrierLabel: '',
context: context,
pageBuilder: (context, animation1, animation2) {});
}
double getRatingWidth(int patientNumber) {
var width = (patientNumber / this.widget.appointmentAllHistoryResultList.noOfPatientsRate) * 100;
return width;
}
} }

@ -1,9 +1,14 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart'; import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
@ -24,97 +29,75 @@ class EyeMeasurementsPage extends StatelessWidget {
builder: (_, model, w) => AppScaffold( builder: (_, model, w) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
baseViewModel: model, baseViewModel: model,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor,
description: TranslationBase.of(context).infoEye,
imagesInfo: [
ImagesInfo(
imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/ar/0.png',
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/eye-measurements/en/0.png')
],
appBarTitle: TranslationBase.of(context).eyeMeasurements, appBarTitle: TranslationBase.of(context).eyeMeasurements,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Column(
margin: EdgeInsets.all(8), children: [
child: Column( ListView.separated(
children: [ physics: NeverScrollableScrollPhysics(),
...List.generate( shrinkWrap: true,
model.appointmentFilter.length, padding: EdgeInsets.only(top: 12),
(index) => AppExpandableNotifier( separatorBuilder: (context, index) {
return Container(
height: 1,
margin: EdgeInsets.only(left: 21, right: 21),
color: Color(0xffD9D9D9),
);
},
itemBuilder: (context, index) {
List<AppoimentAllHistoryResultList> _appointmentAllHistoryResultList = model.appointmentFilter[index].appointmentAllHistoryResultList;
return AppExpandableNotifier(
title: model.appointmentFilter[index].filterName, title: model.appointmentFilter[index].filterName,
bodyWidget: Column( bodyWidget: ListView.separated(
crossAxisAlignment: CrossAxisAlignment.start, shrinkWrap: true,
mainAxisAlignment: MainAxisAlignment.spaceBetween, physics: NeverScrollableScrollPhysics(),
children: model.appointmentFilter[index] padding: EdgeInsets.only(bottom: 14, top: 14, left: 21, right: 21),
.appointmentAllHistoryResultList itemBuilder: (context, _index) {
.map((appointment) { AppoimentAllHistoryResultList _appointmentResult = _appointmentAllHistoryResultList[_index];
return InkWell(
onTap: () { return DoctorCard(
Navigator.push( onTap: () => Navigator.push(
context, context,
FadePage( FadePage(
page: EyeHomePage( page: EyeHomePage(
appointmentAllHistoryResultList: appointment, appointmentAllHistoryResultList: _appointmentResult,
),
),
);
},
child: Container(
margin: EdgeInsets.all(8),
padding: EdgeInsets.all(8.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(8),
color: Colors.white,
border: Border.all(color: Colors.grey),
),
child: Row(
children: [
Expanded(
flex: 1,
child: LargeAvatar(
name: appointment.doctorNameObj,
url: appointment.doctorImageURL,
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts(
appointment.doctorNameObj,
bold: true,
),
Texts(
appointment.clinicName,
variant: 'caption3',
),
Texts(
DateUtil.getMonthDayYearDateFormatted(
appointment.bookDate),
variant: 'caption3',
),
StarRating(
totalAverage: appointment
.actualDoctorRate
.toDouble(),
forceStars: true),
],
),
), ),
), ),
Icon( ),
projectViewModel.isArabic isInOutPatient: _appointmentResult.isInOutPatient,
? Icons.arrow_forward_ios name: _appointmentResult.doctorTitle + " " + _appointmentResult.doctorNameObj,
: Icons.arrow_back_ios, // billNo: "appointmentResult.do",
color: Colors.grey, profileUrl: _appointmentResult.doctorImageURL,
size: 18, subName: _appointmentResult.clinicName,
) isLiveCareAppointment: _appointmentResult.isLiveCareAppointment,
], date: DateUtil.convertStringToDate(_appointmentResult.appointmentDate),
), isSortByClinic: false,
), rating: _appointmentResult.actualDoctorRate + 0.0,
); // appointmentTime: _appointmentResult.startTime.substring(0, 5),
}).toList(), // remainingTimeInMinutes: (_appointmentResult.patientStatusType == AppointmentType.BOOKED || _appointmentResult.patientStatusType == AppointmentType.CONFIRMED)
), // ? _appointmentResult.remaniningHoursTocanPay
), // : null
),
], //projectViewModel.isArabic ? DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate) : DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
), );
},
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: _appointmentAllHistoryResultList.length),
);
},
itemCount: model.appointmentFilter.length,
),
],
), ),
), ),
), ),

@ -1,3 +1,4 @@
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/Appointments/DoctorListResponse.dart' import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'
as DoctorListResponse; as DoctorListResponse;
@ -24,21 +25,28 @@ class _MyInvoicesState extends State<MyInvoices> {
GetDentalAppointmentsResponse getDentalAppointmentsResponse; GetDentalAppointmentsResponse getDentalAppointmentsResponse;
DentalInvoiceDetailResponse dentalInvoiceDetailResponse; DentalInvoiceDetailResponse dentalInvoiceDetailResponse;
ProjectViewModel projectViewModel;
List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-invoice/ar/0.png'));
WidgetsBinding.instance.addPostFrameCallback((_) { WidgetsBinding.instance.addPostFrameCallback((_) {
getDentalAppointments(); if(projectViewModel.isLogin)
getDentalAppointments();
}); });
super.initState(); super.initState();
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myInvoice, appBarTitle: TranslationBase.of(context).myInvoice,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: true, isShowDecPage: true,
imagesInfo: imagesInfo,
body: Container( body: Container(
child: SingleChildScrollView( child: SingleChildScrollView(
physics: BouncingScrollPhysics(), physics: BouncingScrollPhysics(),

@ -1,3 +1,4 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.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';
@ -15,7 +16,11 @@ class MyTrackers extends StatelessWidget {
return AppScaffold( return AppScaffold(
appBarTitle: TranslationBase.of(context).myTracker, appBarTitle: TranslationBase.of(context).myTracker,
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: false, isShowDecPage: true,
description: TranslationBase.of(context).infoTrackers,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-trackers/ar/0.png')
],
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
@ -33,8 +38,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35, height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -59,8 +63,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35, height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
@ -90,8 +93,7 @@ class MyTrackers extends StatelessWidget {
margin: EdgeInsets.all(5), margin: EdgeInsets.all(5),
width: MediaQuery.of(context).size.width * 0.35, width: MediaQuery.of(context).size.width * 0.35,
height: MediaQuery.of(context).size.width * 0.35, height: MediaQuery.of(context).size.width * 0.35,
decoration: BoxDecoration( decoration: BoxDecoration(shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
shape: BoxShape.rectangle, borderRadius: BorderRadius.circular(8), color: Colors.white),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart'; import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart';
@ -24,6 +25,23 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
String email; String email;
final formKey = GlobalKey<FormState>(); final formKey = GlobalKey<FormState>();
List<ImagesInfo> imagesInfo = List();
@override
void initState() {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/0.png'));
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/1.png'));
super.initState();
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BaseView<ReportsMonthlyViewModel>(builder: (_, model, w) { return BaseView<ReportsMonthlyViewModel>(builder: (_, model, w) {
@ -39,6 +57,8 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).monthlyReports, appBarTitle: TranslationBase.of(context).monthlyReports,
imagesInfo: imagesInfo,
description: TranslationBase.of(context).infoMonthReport,
body: SingleChildScrollView( body: SingleChildScrollView(
child: Container( child: Container(
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),

@ -1,9 +1,13 @@
import 'dart:io'; import 'dart:io';
import 'package:carousel_slider/carousel_slider.dart'; import 'package:carousel_slider/carousel_slider.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/health_data_list.dart';
import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart'; import 'package:diplomaticquarterapp/services/smartwatch_integration/SmartWatchIntegrationService.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -19,10 +23,13 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
bool hasAlreadySynced = false; bool hasAlreadySynced = false;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
@override @override
void initState() { void initState() {
WidgetsBinding.instance.addPostFrameCallback((timeStamp) { WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
getLastPatientRecord(context); if(authenticatedUserObject.isLogin) getLastPatientRecord(context);
}); });
super.initState(); super.initState();
} }
@ -32,6 +39,12 @@ class _SmartWatchInstructionsState extends State<SmartWatchInstructions> {
return AppScaffold( return AppScaffold(
appBarTitle: "Sync Health Data", appBarTitle: "Sync Health Data",
isShowAppBar: true, isShowAppBar: true,
isShowDecPage: true,
description: TranslationBase.of(context).infoHealthData,
imagesInfo: [
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/0.png'),
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/health-data/ar/1.png')
],
body: Container( body: Container(
child: Platform.isIOS child: Platform.isIOS
? _getAppleWatchInstructions() ? _getAppleWatchInstructions()

@ -87,15 +87,15 @@ class VitalSignDetailsScreen extends StatelessWidget {
height: MediaQuery.of(context).size.width / 2.8, height: MediaQuery.of(context).size.width / 2.8,
child: Row( child: Row(
children: [ children: [
showMass(context, "Underweight", "<18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8), showMass(context, "Underweight", "< 18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8),
mWidth(12), mWidth(12),
showMass(context, "Normal", "18.5-24.9", (double.parse(mode.bodyMax) >= 18.5 || double.parse(mode.bodyMax) >= 24.6) ? Colors.red : Colors.black, 6), showMass(context, "Normal", "18.5 - 24.9", (double.parse(mode.bodyMax) > 18.5 && double.parse(mode.bodyMax) < 25) ? Colors.red : Colors.black, 6),
mWidth(12), mWidth(12),
showMass(context, "Overweight", "25-29.9", (double.parse(mode.bodyMax) >= 25 || double.parse(mode.bodyMax) >= 29.9) ? Colors.red : Colors.black, 4), showMass(context, "Overweight", "25 - 29.9", (double.parse(mode.bodyMax) >= 25 && double.parse(mode.bodyMax) < 30) ? Colors.red : Colors.black, 4),
mWidth(12), mWidth(12),
showMass(context, "Obese", "30-34.9", (double.parse(mode.bodyMax) >= 30 || double.parse(mode.bodyMax) >= 34.9) ? Colors.red : Colors.black, 2), showMass(context, "Obese", "30 - 34.9", (double.parse(mode.bodyMax) >= 30 && double.parse(mode.bodyMax) < 35) ? Colors.red : Colors.black, 2),
mWidth(12), mWidth(12),
showMass(context, "Extreme Obese", ">35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0), showMass(context, "Extreme Obese", "> 35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0),
], ],
), ),
), ),

@ -1,19 +1,19 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart'; import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
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/core/viewModels/vaccine_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import '../base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:popup_box/popup_box.dart';
import '../base/base_view.dart';
import 'my_vaccines_item_screen.dart'; import 'my_vaccines_item_screen.dart';
//TODO fix by jammal we have a static data //TODO fix by jammal we have a static data
@ -28,192 +28,164 @@ class _MyVaccinesState extends State<MyVaccines> {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<VaccineViewModel>( return BaseView<VaccineViewModel>(
onModelReady: (model) => model.getVaccine(), onModelReady: (model) => model.getVaccine(),
builder: (BuildContext context, VaccineViewModel model, Widget child) => builder: (BuildContext context, VaccineViewModel model, Widget child) => AppScaffold(
AppScaffold( isShowAppBar: true,
isShowAppBar: true, baseViewModel: model,
baseViewModel: model, appBarTitle: TranslationBase.of(context).myVaccines,
appBarTitle: TranslationBase.of(context).myVaccines, description: TranslationBase.of(context).infoVaccines,
body: Container( imagesInfo: [
margin: EdgeInsets.only( ImagesInfo(
left: SizeConfig.screenWidth * 0.004, imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/ar/0.png')
right: SizeConfig.screenWidth * 0.004, ],
top: SizeConfig.screenWidth * 0.04, body: Container(
), margin: EdgeInsets.only(
child: Column( left: SizeConfig.screenWidth * 0.004,
children: <Widget>[ right: SizeConfig.screenWidth * 0.004,
RoundedContainer( top: SizeConfig.screenWidth * 0.04,
backgroundColor: Colors.white, ),
child: ExpansionTile( child: Column(
title: Container( children: <Widget>[
height: 65.0, RoundedContainer(
child: Text('2018'), backgroundColor: Colors.white,
), child: ExpansionTile(
children: <Widget>[ title: Container(
Container( height: 65.0,
child: ListView.builder( child: Text('2018'),
scrollDirection: Axis.vertical, ),
shrinkWrap: true, children: <Widget>[
itemCount: model.vaccineList == null Container(
? 0 child: ListView.builder(
: model.vaccineList.length, scrollDirection: Axis.vertical,
itemBuilder: (BuildContext context, int index) { shrinkWrap: true,
return Column( itemCount: model.vaccineList == null ? 0 : model.vaccineList.length,
children: <Widget>[ itemBuilder: (BuildContext context, int index) {
RoundedContainer( return Column(
child: Column( children: <Widget>[
RoundedContainer(
child: Column(
children: <Widget>[
Row(
children: <Widget>[ children: <Widget>[
Row( Expanded(
children: <Widget>[ child: Column(
Expanded( children: <Widget>[
child: Column( Padding(
children: <Widget>[ padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 20.0),
Padding( child: Image.network(
padding: EdgeInsets model.vaccineList[index].doctorImageURL,
.symmetric( height: SizeConfig.imageSizeMultiplier * 23,
horizontal: width: SizeConfig.imageSizeMultiplier * 20,
20.0, fit: BoxFit.fill,
vertical: 20.0),
child: Image.network(
model
.vaccineList[
index]
.doctorImageURL,
height: SizeConfig
.imageSizeMultiplier *
23,
width: SizeConfig
.imageSizeMultiplier *
20,
fit: BoxFit.fill,
),
),
],
),
flex: 2,
),
Expanded(
child: Container(
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
Text(
model
.vaccineList[
index]
.doctorTitle +
model
.vaccineList[
index]
.doctorName,
style: TextStyle(
fontWeight:
FontWeight.w900,
fontSize: 16.6,
),
),
SizedBox(height: 7.0),
Text(
model
.vaccineList[
index]
.projectName,
style: TextStyle(
fontSize: 17.0,
letterSpacing: 0.5,
),
),
SizedBox(height: 7.0),
Text(
model
.vaccineList[
index]
.vaccineName,
style: TextStyle(
fontSize: 17.0,
),
),
SizedBox(height: 7.0),
Text(
'Date Taken ' +
convertDateFormat(model
.vaccineList[
index]
.invoiceDate),
style: TextStyle(
fontSize: 17.0),
),
],
), ),
), ),
flex: 5, ],
),
flex: 2,
),
Expanded(
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text(
model.vaccineList[index].doctorTitle + model.vaccineList[index].doctorName,
style: TextStyle(
fontWeight: FontWeight.w900,
fontSize: 16.6,
),
),
SizedBox(height: 7.0),
Text(
model.vaccineList[index].projectName,
style: TextStyle(
fontSize: 17.0,
letterSpacing: 0.5,
),
),
SizedBox(height: 7.0),
Text(
model.vaccineList[index].vaccineName,
style: TextStyle(
fontSize: 17.0,
),
),
SizedBox(height: 7.0),
Text(
'Date Taken ' + convertDateFormat(model.vaccineList[index].invoiceDate),
style: TextStyle(fontSize: 17.0),
),
],
), ),
], ),
flex: 5,
), ),
], ],
), ),
), ],
], ),
); ),
}), ],
) );
], }),
), )
), ],
// SpaceBetweenTexts(space: 165.0), ),
],
), ),
), // SpaceBetweenTexts(space: 165.0),
bottomSheet: model.state == ViewState.Busy?Container(height: 0,): model.vaccineList.length > 0 ],
),
),
bottomSheet: model.state == ViewState.Busy
? Container(
height: 0,
)
: model.vaccineList.length > 0
? Container( ? Container(
color: Theme.of(context).scaffoldBackgroundColor, color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
height: MediaQuery.of(context).size.height * 0.25, height: MediaQuery.of(context).size.height * 0.25,
width: double.infinity,
child: Column(
children: [
Divider(
height: 2,
thickness: 1,
),
SizedBox(
height: 6,
),
Container(
width: double.infinity, width: double.infinity,
// height: 80.0, child: Column(
child: Button( children: [
disabled: true, Divider(
label: TranslationBase.of(context) height: 2,
.checkVaccineAvailability, thickness: 1,
backgroundColor: Color(0xff9EA3A4), ),
onTap: () => Navigator.push( SizedBox(
context, FadePage(page: MyVaccinesItemPage())), height: 6,
),
Container(
width: double.infinity,
// height: 80.0,
child: Button(
disabled: true,
label: TranslationBase.of(context).checkVaccineAvailability,
backgroundColor: Color(0xff9EA3A4),
onTap: () => Navigator.push(context, FadePage(page: MyVaccinesItemPage())),
),
),
if (projectViewModel.havePrivilege(27))
Container(
width: double.infinity,
// height: 80.0,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
color: Color(0xffF62426),
textColor: Colors.white,
disabled: model.vaccineList.length == 0,
loading: model.state == ViewState.BusyLocal,
onTap: () async {
model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
},
),
),
],
), ),
)
: Container(
height: 0,
), ),
if (projectViewModel.havePrivilege(27)) ),
Container(
width: double.infinity,
// height: 80.0,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
color: Color(0xffF62426),
textColor: Colors.white,
disabled: model.vaccineList.length == 0,
loading: model.state == ViewState.BusyLocal,
onTap: () async {
model.sendEmail(
message: TranslationBase.of(context)
.emailSentSuccessfully);
},
),
),
],
),
)
: Container(height: 0,),
),
); );
} }
@ -224,13 +196,8 @@ class _MyVaccinesState extends State<MyVaccines> {
final startIndex = Date.indexOf(start); final startIndex = Date.indexOf(start);
final endIndex = Date.indexOf(end, startIndex + start.length); final endIndex = Date.indexOf(end, startIndex + start.length);
var date = new DateTime.fromMillisecondsSinceEpoch( var date = new DateTime.fromMillisecondsSinceEpoch(int.parse(Date.substring(startIndex + start.length, endIndex)));
int.parse(Date.substring(startIndex + start.length, endIndex))); String newDate = date.year.toString() + "-" + date.month.toString().padLeft(2, '0') + "-" + date.day.toString().padLeft(2, '0');
String newDate = date.year.toString() +
"-" +
date.month.toString().padLeft(2, '0') +
"-" +
date.day.toString().padLeft(2, '0');
return newDate.toString(); return newDate.toString();
} }

@ -2142,7 +2142,26 @@ class TranslationBase {
String get aboutApp => localizedValues["about-app"][locale.languageCode]; String get aboutApp => localizedValues["about-app"][locale.languageCode];
String get aboutPointsLength => localizedValues["about-points"]['length'][locale.languageCode]; String get aboutPointsLength => localizedValues["about-points"]['length'][locale.languageCode];
String get timeNeeded => localizedValues["time-needed"][locale.languageCode]; String get timeNeeded => localizedValues["time-needed"][locale.languageCode];
String get totalTimeNeeded => localizedValues["total-time-needed"][locale.languageCode]; String get totalTimeNeeded =>
localizedValues["total-time-needed"][locale.languageCode];
String get infoEye =>
localizedValues["info-eye"][locale.languageCode];
String get infoVaccines =>
localizedValues["info-vaccines"][locale.languageCode];
String get infoTrackers =>
localizedValues["info-trackers"][locale.languageCode];
String get infoHealthData =>
localizedValues["info-health-data"][locale.languageCode];
String get infoAskDoc =>
localizedValues["info-ask-doc"][locale.languageCode];
String get infoAutoWifi =>
localizedValues["info-auto-wifi"][locale.languageCode];
String get autoWifi =>
localizedValues["auto-wifi"][locale.languageCode];
String get childVaccineInfo =>
localizedValues["child-vaccine-info"][locale.languageCode];
String get h2oInfo =>
localizedValues["h2o-info"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -7,6 +7,7 @@ import 'package:badges/badges.dart';
import 'package:cached_network_image/cached_network_image.dart'; import 'package:cached_network_image/cached_network_image.dart';
import 'package:connectivity/connectivity.dart'; import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart'; import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
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/Authentication/authenticated_user.dart'; import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/MyAppointments.dart';
@ -31,15 +32,16 @@ import 'package:diplomaticquarterapp/pages/medical/reports/report_home_page.dart
import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart'; import 'package:diplomaticquarterapp/pages/medical/smart_watch_health_data/smart_watch_instructions.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart'; import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_screen.dart';
import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart'; import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart'; import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.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:flutter_hms_gms_availability/flutter_hms_gms_availability.dart'; import 'package:flutter_hms_gms_availability/flutter_hms_gms_availability.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
import '../Constants.dart'; import '../Constants.dart';
import 'app_shared_preferences.dart'; import 'app_shared_preferences.dart';
import 'app_toast.dart'; import 'app_toast.dart';
@ -766,21 +768,26 @@ class Utils {
if (projectViewModel.havePrivilege(32) || true) { if (projectViewModel.havePrivilege(32) || true) {
medical.add(InkWell( medical.add(InkWell(
onTap: () { onTap: () {
userData().then((userData_) { if (projectViewModel.isLogin) {
if (projectViewModel.isLogin && userData_ != null) { userData().then((userData_) {
String patientID = userData_.patientID.toString(); String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)}); projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
} else { });
AlertDialogBox( } else {
context: context, Navigator.push(
confirmMessage: "Please login with your account first to use this feature", context,
okText: "OK", FadePage(
okFunction: () { page: NotAutPage(
AlertDialogBox.closeAlertDialog(context); title: TranslationBase.of(context).autoWifi,
}).showAlertDialog(context); description: TranslationBase.of(context).infoAutoWifi,
} infoList: [],
}); imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/connect-to/ar/0.png'),
],
)));
}
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).internet, title: TranslationBase.of(context).internet,

@ -15,8 +15,6 @@ import 'package:provider/provider.dart';
import '../../d_q_icons_icons.dart'; import '../../d_q_icons_icons.dart';
import 'bottom_navigation_item.dart'; import 'bottom_navigation_item.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
class BottomNavBar extends StatefulWidget { class BottomNavBar extends StatefulWidget {
final ValueChanged<int> changeIndex; final ValueChanged<int> changeIndex;

@ -2,7 +2,6 @@ import 'package:badges/badges.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';

@ -156,7 +156,6 @@ class LabResultWidget extends StatelessWidget {
isCovidResult = true; isCovidResult = true;
covidLabResult = order; covidLabResult = order;
} }
print(covidLabResult.testCode);
}); });
return isCovidResult; return isCovidResult;

@ -256,6 +256,7 @@ class _TimeLineViewState extends State<TimeLineView> {
color: Colors.white, color: Colors.white,
fontSize: 12, fontSize: 12,
letterSpacing: -0.33, letterSpacing: -0.33,
height: 1,
), ),
), ),
), ),

@ -23,23 +23,23 @@ var _InAppBrowserOptions = InAppBrowserClassOptions(
class MyInAppBrowser extends InAppBrowser { class MyInAppBrowser extends InAppBrowser {
_PAYMENT_TYPE paymentType; _PAYMENT_TYPE paymentType;
static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = // static String SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = static String SERVICE_URL =
'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String PREAUTH_SERVICE_URL = // static String PREAUTH_SERVICE_URL =
// 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store // 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PRESCRIPTION_PAYMENT_WITH_ORDERID = static String PREAUTH_SERVICE_URL =
'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://mdlaboratories.com/exacartapi/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; //Live // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';
static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
'https://mdlaboratories.com/exacartapi/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; //Live
// Packages // Packages
static String PACKAGES_REQUEST_PAYMENT_URL = static String PACKAGES_REQUEST_PAYMENT_URL =
@ -167,6 +167,8 @@ class MyInAppBrowser extends InAppBrowser {
AuthenticatedUser authenticatedUser, AuthenticatedUser authenticatedUser,
InAppBrowser browser, InAppBrowser browser,
bool isLiveCareAppo, bool isLiveCareAppo,
var servID,
var LiveServID,
[var appoDate, [var appoDate,
var appoNo, var appoNo,
var clinicID, var clinicID,
@ -185,6 +187,8 @@ class MyInAppBrowser extends InAppBrowser {
patientID, patientID,
authenticatedUser, authenticatedUser,
isLiveCareAppo, isLiveCareAppo,
servID,
LiveServID,
appoDate, appoDate,
appoNo, appoNo,
clinicID, clinicID,
@ -232,13 +236,13 @@ class MyInAppBrowser extends InAppBrowser {
dynamic patientID, dynamic patientID,
AuthenticatedUser authUser, AuthenticatedUser authUser,
bool isLiveCareAppo, bool isLiveCareAppo,
var servID,
var LiveServID,
[var appoDate, [var appoDate,
var appoNo, var appoNo,
var clinicID, var clinicID,
var doctorID, var doctorID,
var patientData, var patientData]) async {
var servID,
var LiveServID]) async {
getDeviceToken(); getDeviceToken();
String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN'; String currentLanguageID = getLanguageID() == 'ar' ? 'AR' : 'EN';
String form = isLiveCareAppo ? getLiveCareForm() : getForm(); String form = isLiveCareAppo ? getLiveCareForm() : getForm();

Loading…
Cancel
Save