Merge branch 'development' into ZohaibIqbalKambrani

* development:
  re-design child vaccine and fix some funcrionalities
  Fix ER service
  first step from fix CMC
  fix issue on cmc
  return CMC HHC
  Nearest Er fix design
  solving NearestEr design problem
  simple fix
  hot fixing
  fix design issues

# Conflicts:
#	lib/config/localized_values.dart
merge-requests/238/head
Zohaib Iqbal Kambrani 4 years ago
commit 9a5daed5c3

@ -0,0 +1,26 @@
<svg xmlns="http://www.w3.org/2000/svg" width="103.843" height="79.732" viewBox="0 0 103.843 79.732">
<g id="Group_776" data-name="Group 776" transform="translate(-67.806 -333.834)">
<g id="Group_772" data-name="Group 772" transform="translate(72.721 385.261)">
<path id="Rectangle_494" data-name="Rectangle 494" d="M3.513,0h5.5a3.512,3.512,0,0,1,3.512,3.512V24.794a3.512,3.512,0,0,1-3.512,3.512h-5.5A3.512,3.512,0,0,1,0,24.793V3.513A3.513,3.513,0,0,1,3.513,0Z" transform="translate(81.49)" fill="#404040"/>
<path id="Rectangle_495" data-name="Rectangle 495" d="M3.513,0h5.5a3.512,3.512,0,0,1,3.512,3.512V24.794a3.512,3.512,0,0,1-3.512,3.512h-5.5A3.512,3.512,0,0,1,0,24.793V3.513A3.513,3.513,0,0,1,3.513,0Z" transform="translate(0)" fill="#404040"/>
</g>
<g id="Group_774" data-name="Group 774" transform="translate(67.806 333.834)">
<g id="Group_773" data-name="Group 773" transform="translate(0 20.106)">
<path id="Path_964" data-name="Path 964" d="M202.791,368.713a2.117,2.117,0,0,1-1.4,1.881l.87,1.595a2.144,2.144,0,0,1,2.578-.721h.784v-2.755Z" transform="translate(-108.451 -364.552)" fill="#b2361d"/>
<path id="Path_965" data-name="Path 965" d="M212.887,366.617c.07,1.4-1.91,2.76-3.882,3.26-2.9.735-5.653-.648-5.653-3.515,0-2.783,1.939-4.222,4.769-3.4C210.072,363.532,212.818,365.233,212.887,366.617Z" transform="translate(-109.046 -362.733)" fill="#d84c2f"/>
<path id="Path_966" data-name="Path 966" d="M80.223,368.713a2.116,2.116,0,0,0,1.4,1.881l-.87,1.595a2.144,2.144,0,0,0-2.578-.721h-.785v-2.755Z" transform="translate(-70.722 -364.552)" fill="#b2361d"/>
<path id="Path_967" data-name="Path 967" d="M67.808,366.617c-.07,1.4,1.909,2.76,3.882,3.26,2.9.735,5.654-.648,5.654-3.515,0-2.783-1.939-4.222-4.769-3.4C70.623,363.532,67.877,365.233,67.808,366.617Z" transform="translate(-67.806 -362.733)" fill="#d84c2f"/>
</g>
<path id="Path_968" data-name="Path 968" d="M168.258,369.52c-.522-3.479-3.218-7.392-4.7-10.349s-6.929-16.872-8.262-19.307a10.983,10.983,0,0,0-7.653-5.435c-3.479-.522-18.843-.594-25.511-.594s-22.032.072-25.51.594a10.981,10.981,0,0,0-7.653,5.435c-1.334,2.435-6.784,16.35-8.262,19.307s-4.174,6.871-4.7,10.349-.348,24.09.522,27.482a7.356,7.356,0,0,0,6.61,5.479h77.982a7.356,7.356,0,0,0,6.61-5.479C168.606,393.61,168.78,373,168.258,369.52Z" transform="translate(-70.214 -333.834)" fill="#d84c2f"/>
<path id="Path_969" data-name="Path 969" d="M75.773,405.294c.09,5.924.349,11.778.779,13.45a7.356,7.356,0,0,0,6.61,5.479h77.982a7.356,7.356,0,0,0,6.61-5.479c.429-1.671.687-7.525.779-13.45Z" transform="translate(-70.23 -355.576)" fill="#d63828"/>
<path id="Path_970" data-name="Path 970" d="M160.494,364.834s4.871,7.37,5.508,9.221.725,3.533-1.1,4.374-15.567,4.261-18.7,4.261H101.385c-3.131,0-16.872-3.42-18.7-4.261s-1.739-2.522-1.1-4.374,5.508-9.221,5.508-9.221" transform="translate(-71.873 -343.266)" fill="none" stroke="#b2361d" stroke-miterlimit="10" stroke-width="0.5"/>
</g>
<path id="Path_971" data-name="Path 971" d="M165.792,420.908a1.465,1.465,0,0,1-1.364,2.224H83.859a1.465,1.465,0,0,1-1.364-2.224l1.75-4.285a3.366,3.366,0,0,1,2.887-1.956h74.025a3.364,3.364,0,0,1,2.887,1.956Z" transform="translate(-4.416 -24.593)" fill="#404040"/>
<path id="Path_972" data-name="Path 972" d="M152.824,394.283c-.522-1.565-2.783-2.783-5.044-2.783h-26.96c-2.261,0-4.522,1.218-5.044,2.783s1.826,8.009,2.7,9.179,1.826,1.46,4.609,1.46h22.438c2.783,0,3.74-.29,4.609-1.46S153.346,395.848,152.824,394.283Z" transform="translate(-14.572 -17.545)" fill="#404040"/>
<path id="Path_973" data-name="Path 973" d="M163.631,358.436c-.435-1.508-4.609-12.147-5.827-14.669s-2.87-3.392-4.088-3.392H98c-1.218,0-2.87.87-4.088,3.392s-5.392,13.161-5.827,14.669.261,2.2,1.391,2.2h72.764C163.37,360.639,164.066,359.943,163.631,358.436Z" transform="translate(-6.13 -1.99)" fill="#404040"/>
<g id="Group_775" data-name="Group 775" transform="translate(76.803 368.998)">
<path id="Path_974" data-name="Path 974" d="M175.9,389.332s3.827,4.783,5.74,4.783h11.045a2.421,2.421,0,0,0,2.522-2,23,23,0,0,0,0-7.74A90.156,90.156,0,0,1,175.9,389.332Z" transform="translate(-109.692 -384.375)" fill="#fff"/>
<path id="Path_975" data-name="Path 975" d="M100.374,389.332s-3.827,4.783-5.74,4.783H83.589a2.421,2.421,0,0,1-2.522-2,23,23,0,0,1,0-7.74A90.156,90.156,0,0,0,100.374,389.332Z" transform="translate(-80.738 -384.375)" fill="#fff"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.3 KiB

@ -41,5 +41,8 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
< key >NSCameraUsageDescription< /key >
< string >Camera permission is required for barcode scanning.< /string >
</dict>
</plist>

@ -162,7 +162,7 @@ PODS:
- "twilio_programmable_video (0.5.0+4)":
- Flutter
- TwilioVideo (~> 3.4)
- TwilioVideo (3.7.2)
- TwilioVideo (3.8.0)
- url_launcher (0.0.1):
- Flutter
- url_launcher_linux (0.0.1):
@ -436,7 +436,7 @@ SPEC CHECKSUMS:
TOCropViewController: da59f531f8ac8a94ef6d6c0fc34009350f9e8bfe
Try: 5ef669ae832617b3cee58cb2c6f99fb767a4ff96
twilio_programmable_video: 6a41593640f3d86af60b22541fd457b22deaae7f
TwilioVideo: 5257640fab00d1b9f44db060815b03516a9eb0e8
TwilioVideo: c13a51ceca375e91620eb7578d2573c90cf53b46
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0
url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313

@ -220,7 +220,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
125A739F71A29FBAE7B4D5AC /* [CP] Embed Pods Frameworks */,
940F4A376A48B060117A1E5D /* [CP] Copy Pods Resources */,
CBB18A5CEEEB971DCFC36E00 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@ -337,36 +337,36 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
940F4A376A48B060117A1E5D /* [CP] Copy Pods Resources */ = {
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
CBB18A5CEEEB971DCFC36E00 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "Run Script";
outputPaths = (
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

@ -228,8 +228,8 @@ const GET_LIVECARE_HISTORY = 'Services/ER_VirtualCall.svc/REST/GetPatientErVirtu
const CANCEL_LIVECARE_REQUEST = 'Services/ER_VirtualCall.svc/REST/DeleteErRequest';
const SEND_LIVECARE_INVOICE_EMAIL = 'Services/Notifications.svc/REST/SendInvoiceForLiveCare';
const GET_USER_TERMS = '/Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS = '/services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
const GET_USER_TERMS = 'Services/Patients.svc/REST/GetUserTermsAndConditions';
const UPDATE_HEALTH_TERMS = 'services/Patients.svc/REST/UpdatePateintHealthSummaryReport';
//URL to get medicine and pharmacies list
const CHANNEL = 3;

@ -242,6 +242,10 @@ const Map localizedValues = {
"en": "Email Sent Successfully",
"ar": "تم إرسال البريد الإلكتروني بنجاح"
},
"EmailSentError": {
"en": "Error Sending Email",
"ar": "خطأ في إرسال البريد الإلكتروني"
},
"close": {"en": "Close", "ar": "مغلق"},
"booked": {"en": "Booked", "ar": "محجوز"},
"confirmed": {"en": "Confirmed", "ar": "مؤكد"},
@ -288,7 +292,7 @@ const Map localizedValues = {
},
"ksa": {"en": "KSA", "ar": "السعودية"},
"dubai": {"en": "Dubai", "ar": "دبي"},
"enter-email": {"en": "Enter Email", "ar": "ادخل البريد الالكتروني"},
"enter-email": {"en": "Please Enter Email", "ar": "ادخل البريد الالكتروني"},
"family": {"en": "My Family", "ar": "عائلتي"},
"family-title": {"en": "My Family Files", "ar": "ملفات العائلة"},
"myFamily": {"en": "My Family", "ar": "ملفات العائلة"},
@ -1065,7 +1069,7 @@ const Map localizedValues = {
"pickup-location": {"en": "Pickup Location", "ar": "نقطة الانطلاق"},
"pickup-spot": {"en": "Pickup Spot", "ar": "نقطة اللقاء"},
"inside-home": {"en": "Inside Home", "ar": "داخل المنزل"},
"have-appo": {"en": "Do you have an appointment?", "ar": "هل لديك موعد؟"},
"have-appo": {"en": "Do you have an appointment ?", "ar": "هل لديك موعد ؟"},
"dropoff-location": {"en": "Dropoff Location", "ar": "نقطة الوصول"},
"select-all": {
"en": "Please select all fields",
@ -1218,6 +1222,10 @@ const Map localizedValues = {
"en": "Send a copy of this report to the email",
"ar": "أرسل نسخة من هذا التقرير إلى البريد الإلكتروني"
},
"update-email-msg": {
"en": "Email updated",
"ar": "تم تحديث البريد الالكتروني"
},
"update-email": {"en": "Update Email", "ar": "تحديث البريد الالكتروني"},
"booked-success": {
"en": "The appointment has been successfully booked.",
@ -1449,9 +1457,62 @@ const Map localizedValues = {
"en": "View List of Children",
"ar": "عرض قائمة الأطفال"
},
"trackDeliveryDriver": {
"en": "Track Delivery Driver",
"ar": "trackDeliveryDriver"
},
"covidTest": {
"en": "COVID-19 TEST",
"ar": "فحص كورونا"
},
"driveThru": {
"en": "Drive-Thru",
"ar": "من السيارة"
},
"NearestErDesc": {
"en": "\nThis service Displays nearest branch\n among all the branches of All Habib \n medical Group based on your current Location",
"ar": "\nتعرض هذه الخدمة أقرب فرع\n من بين جميع فروع مجموعة \nالحبيب الطبية بناءً على موقعك الحالي."
},
"NearestEr": {
"en": "Nearest ER",
"ar": "أقرب ER"
},
"infoCMC": {
"en": "Through this service, you can request a set of tests that help you and your doctor to understand the current health condition and then identify potential risks.",
"ar": "من خلال هذه الخدمة يمكنك طلب مجموعة من الفحوصات التي تساعدك وتساعد طبيبك في فهم حالتك الصحية الحالية ومن ثم تحديد المخاطر المحتملة"
},
"instructionAgree": {
"en": "This monthly Health Summary Report reflects the health indicators and analysis results of the latest visits. Please note that this will be sent automatically from the system and it's not considered as an official report so no medical decisions should be taken based on it.",
"ar": "هذا ملخص التقرير الصحي الشهري و الذي يسرد المؤشرات الصحية و نتائج التحاليل لأخر الزيارات. يرجى ملاحظة أن هذا التقرير هو تقرير يتم ارساله بشكل آلي من النظام و لا يعتبر رسمي و لا تؤخذ عليه أي قرارات طبية"
},
"reqId": {
"en": "Request ID:",
"ar": " رقم الطلب"
},
"covid19_driveThrueTest": {
"en": "'Covid-19- Drive-Thru Test'",
"ar": "Covid-19- الفحص من خلال القيادة"
},
"E-Referral": {
"en": "'E-Referral'",
"ar": "الإحالة الإلكترونية"
},
"childName": {
"en": "'CHILD NAME'",
"ar": "إسم الطفل"
},
"recordDeleted": {
"en": "'Record Deleted'",
"ar": "تم حذف السجل"
},
"msg_email_address_up_to_date": {
"en": "Please ensure that the email address is up-to-date and process to view the schedule",
"ar": "يرجى التأكد من أن عنوان البريد الإلكتروني محدث وأن العملية لعرض الجدول الزمني"
},
"add-new-child": {"en" : "ADD NEW CHILD", "ar": "إضافة طفل جديد"},
"visit": {"en" : "Visit", "ar": "الزيارة"},
"send-child-email-msg": {"en" : "Send the child's schedule to the email", "ar": "أرسل جدول الطفل إلى البريد الإلكتروني"},
"vaccination-add-child-msg": {"en" : "Add the child's information below to receive the schedule of vaccinations.", "ar": "أضف معلومات الطفل أدناه للحصول على جدول التطعيمات."},
"child_added_successfully": {"en" : "Child added successfully", "ar": "تمت إضافة الطفل بنجاح"},
};

@ -1,6 +1,7 @@
class ImagesInfo {
final String imageAr;
final String imageEn;
final bool isAsset;
ImagesInfo({this.imageAr, this.imageEn});
ImagesInfo({this.imageAr, this.imageEn, this.isAsset = false});
}

@ -18,8 +18,8 @@ class PickUpRequestPresOrder {
int pickupSpot;
dynamic dropoffLocationId;
int transportationMethodId;
double cost;
double vAT;
dynamic cost;
dynamic vAT;
double totalPrice;
int amountCollected;
int selectedAmbulate;

@ -11,24 +11,24 @@ class Reports {
String setupId;
int patientID;
int doctorID;
Null clinicID;
dynamic clinicID;
DateTime requestDate;
bool isRead;
DateTime isReadOn;
int actualDoctorRate;
String clinicDescription;
Null clinicDescriptionN;
dynamic clinicDescriptionN;
String docName;
Null docNameN;
String doctorImageURL;
Null doctorName;
Null doctorNameN;
dynamic doctorName;
dynamic doctorNameN;
int doctorRate;
bool isDoctorAllowVedioCall;
bool isExecludeDoctor;
int noOfPatientsRate;
String projectName;
Null projectNameN;
dynamic projectNameN;
Reports(
{this.status,
@ -61,37 +61,41 @@ class Reports {
this.projectNameN});
Reports.fromJson(Map<String, dynamic> json) {
status = json['Status'];
encounterDate = DateUtil.convertStringToDate(
json['EncounterDate']); //json['EncounterDate'];
projectID = json['ProjectID'];
invoiceNo = json['InvoiceNo'];
encounterNo = json['EncounterNo'];
procedureId = json['ProcedureId'];
requestType = json['RequestType'];
setupId = json['SetupId'];
patientID = json['PatientID'];
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
requestDate = DateUtil.convertStringToDate(
json['RequestDate']); //json['RequestDate'];
isRead = json['IsRead'];
isReadOn =
DateUtil.convertStringToDate(json['IsReadOn']); //json['IsReadOn'];
actualDoctorRate = json['ActualDoctorRate'];
clinicDescription = json['ClinicDescription'];
clinicDescriptionN = json['ClinicDescriptionN'];
docName = json['DocName'];
docNameN = json['DocNameN'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
doctorRate = json['DoctorRate'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
noOfPatientsRate = json['NoOfPatientsRate'];
projectName = json['ProjectName'];
projectNameN = json['ProjectNameN'];
try {
status = json['Status'];
encounterDate = DateUtil.convertStringToDate(
json['EncounterDate']); //json['EncounterDate'];
projectID = json['ProjectID'];
invoiceNo = json['InvoiceNo'];
encounterNo = json['EncounterNo'];
procedureId = json['ProcedureId'];
requestType = json['RequestType'];
setupId = json['SetupId'];
patientID = json['PatientID'];
doctorID = json['DoctorID'];
clinicID = json['ClinicID'];
requestDate = DateUtil.convertStringToDate(
json['RequestDate']); //json['RequestDate'];
isRead = json['IsRead'];
isReadOn =
DateUtil.convertStringToDate(json['IsReadOn']); //json['IsReadOn'];
actualDoctorRate = json['ActualDoctorRate'];
clinicDescription = json['ClinicDescription'];
clinicDescriptionN = json['ClinicDescriptionN'];
docName = json['DocName'];
docNameN = json['DocNameN'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];
doctorNameN = json['DoctorNameN'];
doctorRate = json['DoctorRate'];
isDoctorAllowVedioCall = json['IsDoctorAllowVedioCall'];
isExecludeDoctor = json['IsExecludeDoctor'];
noOfPatientsRate = json['NoOfPatientsRate'];
projectName = json['ProjectName'];
projectNameN = json['ProjectNameN'];
}catch(e){
print(e);
}
}
Map<String, dynamic> toJson() {

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
@ -47,8 +48,9 @@ class CMCService extends BaseService {
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
onSuccess: (dynamic response, int statusCode) {
cmcAllPresOrdersList.clear();
cmcAllOrderDetail.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
if (data['ServiceID'] == 3)
if (data['ServiceID'] == OrderService.Comprehensive_Medical_Checkup.getIdOrderService())
cmcAllPresOrdersList
.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
});
@ -104,7 +106,7 @@ class CMCService extends BaseService {
Future insertPresPresOrder({CMCInsertPresOrderRequestModel order}) async {
hasError = false;
await baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER,
await baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER,
onSuccess: (dynamic response, int statusCode) {
isOrderUpdated = true;
}, onFailure: (String error, int statusCode) {

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_request_modle.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/HHC_get_all_services_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hHC_all_pres_orders_request_model.dart';
@ -7,6 +8,8 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import '../base_service.dart';
@ -15,9 +18,10 @@ class HomeHealthCareService extends BaseService {
List<GetHHCAllPresOrdersResponseModel> hhcAllPresOrdersList = List();
List<GetOrderDetailByOrderIDResponseModel> hhcAllOrderDetail = List();
List<AddressInfo> addressesList = List();
bool isOrderUpdated;
CustomerInfo customerInfo;
Future getHHCAllServices(
HHCGetAllServicesRequestModel hHCGetAllServicesRequestModel) async {
hasError = false;
@ -37,11 +41,11 @@ class HomeHealthCareService extends BaseService {
GetHHCAllPresOrdersRequestModel getHHCAllPresOrdersRequestModel =
GetHHCAllPresOrdersRequestModel();
hasError = false;
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORDERS,
await baseAppClient.post(GET_PATIENT_ALL_PRES_ORD,
onSuccess: (dynamic response, int statusCode) {
hhcAllPresOrdersList.clear();
response['PatientER_GetPatientAllPresOrdersList'].forEach((data) {
if (data['ServiceID'] == 2)
if (data['ServiceID'] == OrderService.HOME_HEALTH_CARE.getIdOrderService())
hhcAllPresOrdersList
.add(GetHHCAllPresOrdersResponseModel.fromJson(data));
});
@ -91,3 +95,5 @@ class HomeHealthCareService extends BaseService {
}, body: order.toJson());
}
}

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/user_information_model.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import '../base_service.dart';
class VaccinationTableService extends BaseService {
@ -10,19 +12,18 @@ class VaccinationTableService extends BaseService {
Future getCreateVaccinationTableOrders() async {
Future getCreateVaccinationTableOrders(List_BabyInformationModel babyInfo, bool sendEmail) async {
String babyBDFormatted = "${DateUtil.convertDateToString(babyInfo.dOB)}/";
hasError = false;
await getUser();
body['BabyName']="fffffffffff eeeeeeeeeeeeee";
body['DOB'] = "/Date(1585774800000+0300)/";
body['BabyName']= babyInfo.babyName;
body['DOB'] = babyBDFormatted;
body['EmailAddress'] = user.emailAddress;
body['isDentalAllowedBackend'] = false;
body['SendEmail'] = false;
body['SendEmail'] = sendEmail;
body['IsLogin'] =true;
await baseAppClient.post(GET_TABLE_REQUEST,
onSuccess: (dynamic response, int statusCode) {
createVaccinationTableModelList.clear();

@ -46,7 +46,7 @@ class BaseAppClient {
//Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
if (!isExternal) {
String token = await sharedPref.getString(TOKEN);
var languageID = await sharedPref.getString(APP_LANGUAGE);
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE,'ar');
var user = await sharedPref.getObject(USER_PROFILE);
if (body.containsKey('SetupID')) {
body['SetupID'] = body.containsKey('SetupID')
@ -58,15 +58,7 @@ class BaseAppClient {
body['VersionID'] = VERSION_ID;
body['Channel'] = CHANNEL;
body['LanguageID'] = body.containsKey('LanguageID')
? body['LanguageID'] != null
? body['LanguageID']
: languageID == 'ar'
? 1
: 2
: languageID == 'en'
? 2
: 1;
body['LanguageID'] = languageID == 'ar' ? 1 : 2;
body['IPAdress'] = IP_ADDRESS;
body['generalid'] = GENERAL_ID;

@ -68,6 +68,19 @@ class ReportsService extends BaseService {
}, body: body);
}
Future updateEmail({String email}) async {
Map<String, dynamic> body = Map<String, dynamic>();
body['EmailAddress'] = email;
body['isDentalAllowedBackend'] = false;
hasError = false;
await baseAppClient.post(UPDATE_PATENT_EMAIL,
onSuccess: (dynamic response, int statusCode) {},
onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
Future insertRequestForMedicalReport(
AppointmentHistory appointmentHistory) async {
Map<String, dynamic> body = new Map<String, dynamic>();

@ -40,7 +40,7 @@ class AppointmentRateViewModel extends BaseViewModel {
Future sendAppointmentRate(int rate, int appointmentNo, int projectID,
int doctorID, int clinicID, String note) async {
setState(ViewState.BusyLocal);
setState(ViewState.Busy);
await _appointmentRateService.sendAppointmentRate(
rate, appointmentNo, projectID, doctorID, clinicID, note);
if (_appointmentRateService.hasError) {

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/add_newchild_model.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/create_vaccination_table.dart';
import 'package:diplomaticquarterapp/core/service/childvaccines/add_new_child_service.dart';
@ -11,14 +12,12 @@ import '../base_view_model.dart';
class VaccinationTableViewModel extends BaseViewModel{
VaccinationTableService _creteVaccinationTableService = locator<VaccinationTableService>();
List<CreateVaccinationTable> get creteVaccinationTableModelList=> _creteVaccinationTableService.createVaccinationTableModelList;
// String get creteVaccinationTableContent => _creteVaccinationTableService.userAgreementContent;
//String get userAgreementContent => _creteNewBabyService.v//_reportsService.userAgreementContent;
List<CreateVaccinationTable> get creteVaccinationTableModelList=> _creteVaccinationTableService.createVaccinationTableModelList;//.createNewBabyModelList;
getCreateVaccinationTable() async {
getCreateVaccinationTable(List_BabyInformationModel babyInfo, bool sendEmail) async {
setState(ViewState.Busy);
await _creteVaccinationTableService.getCreateVaccinationTableOrders();//getCreateNewBabyOrders();
await _creteVaccinationTableService.getCreateVaccinationTableOrders(babyInfo, sendEmail);//getCreateNewBabyOrders();
if ( _creteVaccinationTableService.hasError) {
error = _creteVaccinationTableService.error;

@ -13,11 +13,9 @@ class ReportsMonthlyViewModel extends BaseViewModel {
ReportsService _reportsService = locator<ReportsService>();
String get userAgreementContent => _reportsService.userAgreementContent;
getUserTermsAndConditions() async{
getUserTermsAndConditions() async {
setState(ViewState.Busy);
await _reportsService.getUserTermsAndConditions();
if (_reportsService.hasError) {
@ -28,19 +26,33 @@ class ReportsMonthlyViewModel extends BaseViewModel {
}
}
updatePatientHealthSummaryReport({String message, bool isSummary})async{
updatePatientHealthSummaryReport(
{String message,
bool isSummary,
bool isUpdateEmail = false,
String email}) async {
setState(ViewState.BusyLocal);
await _reportsService.updatePatientHealthSummaryReport(isSummary: isSummary);
await _reportsService.updatePatientHealthSummaryReport(
isSummary: isSummary);
if (_reportsService.hasError) {
error = _reportsService.error;
AppToast.showErrorToast(message: error);
setState(ViewState.ErrorLocal);
} else {
AppToast.showSuccessToast(message: message);
setState(ViewState.Idle);
if (isUpdateEmail) {
await _reportsService.updateEmail(email: email);
if (_reportsService.hasError) {
error = _reportsService.error;
AppToast.showErrorToast(message: error);
setState(ViewState.ErrorLocal);
} else {
AppToast.showSuccessToast(message: message);
setState(ViewState.Idle);
}
} else {
AppToast.showSuccessToast(message: message);
setState(ViewState.Idle);
}
}
}
}

@ -100,14 +100,14 @@ class MyApp extends StatelessWidget {
backgroundColor: Color.fromRGBO(255, 255, 255, 1),
highlightColor: Colors.grey[100].withOpacity(0.4),
splashColor: Colors.transparent,
primaryColor: Colors.grey,
primaryColor: Color(0xff515A5D),
toggleableActiveColor: secondaryColor,
indicatorColor: secondaryColor,
bottomSheetTheme: BottomSheetThemeData(backgroundColor: HexColor('#E0E0E0')),
cursorColor: Colors.grey,
iconTheme: IconThemeData(),
appBarTheme: AppBarTheme(
color: Colors.grey[700],
color: Color(0xff515A5D),
brightness: Brightness.light,
elevation: 0.0,
actionsIconTheme: IconThemeData(

@ -30,7 +30,7 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
contentPadding: EdgeInsets.fromLTRB(28.0, 24.0, 28.0, 0.0),
title: Center(
child: Texts(
"Confirm",
TranslationBase.of(context).confirm,
color: Colors.black,
),
),
@ -40,7 +40,7 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
Divider(),
Center(
child: Texts(
"Are you sure!! want to cancel this order",
TranslationBase.of(context).cancelOrderMsg ,
color: Colors.grey,
),
),

@ -0,0 +1,148 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
class CMCLocationPage extends StatefulWidget {
final Function(PickResult) onPick;
final double latitude;
final double longitude;
final dynamic model;
const CMCLocationPage({Key key, this.onPick, this.latitude, this.longitude, this.model})
: super(key: key);
@override
_CMCLocationPageState createState() =>
_CMCLocationPageState();
}
class _CMCLocationPageState
extends State<CMCLocationPage> {
double latitude = 0;
double longitude = 0;
@override
void initState() {
latitude = widget.latitude;
longitude = widget.longitude;
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<CMCViewModel>(
onModelReady: (model) {},
builder: (_, model, widget) => AppScaffold(
isShowDecPage: false,
isShowAppBar: true,
baseViewModel: model,
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
searchForInitialValue: false,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: Column(
children: [
SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () async {
print(selectedPlace);
AddNewAddressRequestModel
addNewAddressRequestModel =
new AddNewAddressRequestModel(
customer: Customer(addresses: [
Addresses(
address1:
selectedPlace.formattedAddress,
address2: selectedPlace
.formattedAddress,
customerAttributes: "",
city: "",
createdOnUtc: "",
id: 0,
latLong: "$latitude,$longitude",
email: "")
]),
);
selectedPlace.addressComponents.forEach((e) {
if (e.types.contains("country")) {
addNewAddressRequestModel.customer
.addresses[0].country = e.longName;
}
if (e.types.contains("postal_code")) {
addNewAddressRequestModel.customer
.addresses[0].zipPostalCode =
e.longName;
}
if (e.types.contains("locality")) {
addNewAddressRequestModel.customer
.addresses[0].city =
e.longName;
}
});
await model.addAddressInfo(
addNewAddressRequestModel: addNewAddressRequestModel);
if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(
message: "Address Added Successfully");
}
Navigator.of(context).pop();
},
label: TranslationBase.of(context).addNewAddress,
),
],
),
),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
),
));
}
}

@ -3,15 +3,18 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/Comprehens
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_order_detail_by_order_iD_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_cancel_order_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/StepsWidget.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart';
import 'new_cmc_step_one_page.dart';
import 'new_cmc_step_three_page.dart';
@ -46,7 +49,7 @@ class _NewCMCPageState extends State<NewCMCPage>
price: widget.model.cmcAllServicesList[0].price,
serviceID: widget.model.cmcAllServicesList[0].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[0].description,
selectedServiceNameAR: widget.model.cmcAllServicesList[0].description,
selectedServiceNameAR: widget.model.cmcAllServicesList[0].descriptionN,
recordID: 1,
totalPrice: widget.model.cmcAllServicesList[0].totalPrice,
vAT: widget.model.cmcAllServicesList[0].vAT);
@ -85,6 +88,8 @@ class _NewCMCPageState extends State<NewCMCPage>
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(
CMCViewModel model, GetOrderDetailByOrderIDResponseModel order) {
showDialog(
@ -101,7 +106,7 @@ class _NewCMCPageState extends State<NewCMCPage>
if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(message: "Done Successfully");
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully );
await model.getCmcAllPresOrders();
}
},
@ -114,13 +119,16 @@ class _NewCMCPageState extends State<NewCMCPage>
height: MediaQuery.of(context).size.height * 0.8,
child: Column(
children: [
Container(
margin: EdgeInsets.only(left: MediaQuery.of(context).size.width*0.05, right: MediaQuery.of(context).size.width*0.05),
child: StepsWidget(
index: _currentIndex,
changeCurrentTab: changePageViewIndex,
if (widget.model.cmcAllOrderDetail.length == 0)
Container(
margin: EdgeInsets.only(
left: MediaQuery.of(context).size.width * 0.05,
right: MediaQuery.of(context).size.width * 0.05),
child: StepsWidget(
index: _currentIndex,
changeCurrentTab: changePageViewIndex,
),
),
),
Expanded(
child: PageView(
physics: NeverScrollableScrollPhysics(),
@ -134,183 +142,192 @@ class _NewCMCPageState extends State<NewCMCPage>
children: <Widget>[
widget.model.cmcAllOrderDetail.length != 0
? FractionallySizedBox(
heightFactor: 0.8,
widthFactor: 0.9,
child: Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: SingleChildScrollView(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].iD.toString(),
fontSize: 22,
height: 12,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].iD.toString(),
fontSize: 22,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Status",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
"Pending",
fontSize: 22,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
projectViewModel.isArabic ? widget.model.cmcAllOrderDetail[0]
.descriptionN : widget.model.cmcAllOrderDetail[0].description,
fontSize: 22,
),
],
),
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).pickupDate,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(widget.model.cmcAllOrderDetail[0].createdOn)),
fontSize: 22,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
bold: false,
fontSize: 13,
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).serviceName,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
!projectViewModel.isArabic?widget.model.cmcAllOrderDetail[0].description
.toString() :
widget.model.cmcAllOrderDetail[0]
.descriptionN
.toString(),
fontSize: 22,
),
],
),
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
widget.model.cmcAllOrderDetail[0]
.createdOn)),
fontSize: 22,
height: 12,
),
],
),
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.cmcAllOrderDetail[0]);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Service Name",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
widget.model.cmcAllOrderDetail[0].description
.toString() ??
widget.model.cmcAllOrderDetail[0]
.descriptionN
.toString(),
fontSize: 22,
height: 22,
),
],
),
),
SizedBox(
height: 12,
),
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.cmcAllOrderDetail[0]);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
SizedBox(
height: 12,
height: 22,
),
],
),

@ -1,11 +1,16 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_get_items_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class NewCMCStepOnePage extends StatefulWidget {
final CMCInsertPresOrderRequestModel cMCInsertPresOrderRequestModel;
@ -31,6 +36,8 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: false,
baseViewModel: widget.model,
@ -50,17 +57,17 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
height: 20,
),
Texts(
"Select Home Health Care Services",
TranslationBase.of(context).selectService,
textAlign: TextAlign.center,
),
Column(
children:
widget.model.cmcAllServicesList.map((service) {
widget.model.cmcAllServicesList.map((service) {
return Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
@ -72,50 +79,53 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
activeColor: Colors.red[800],
onChanged: (newValue) async {
PatientERCMCInsertServicesList
patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: service.price,
serviceID: service.serviceID
.toString(),
selectedServiceName:
service.description,
selectedServiceNameAR:
service.description,
recordID: 1,
totalPrice:
service.totalPrice,
vAT: service.vAT);
patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: service.price,
serviceID: service.serviceID
.toString(),
selectedServiceName:
service.description,
selectedServiceNameAR:
service.descriptionN,
recordID: 1,
totalPrice:
service.totalPrice,
vAT: service.vAT);
setState(() {
widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList = [
.patientERCMCInsertServicesList =
[
patientERCMCInsertServicesList
];
});
CMCGetItemsRequestModel
cMCGetItemsRequestModel =
new CMCGetItemsRequestModel(
checkupType: newValue);
cMCGetItemsRequestModel =
new CMCGetItemsRequestModel(
checkupType: newValue);
await widget.model.getCheckupItems(
cMCGetItemsRequestModel:
cMCGetItemsRequestModel);
cMCGetItemsRequestModel);
},
groupValue: widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList
.length >
0
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList
.length >
0
? int.parse(widget
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList[
0]
.serviceID)
.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList[
0]
.serviceID)
: 1),
Expanded(
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Texts(
service.description,
projectViewModel.isArabic ? service
.descriptionN : service
.description,
fontSize: 15,
),
),
@ -137,52 +147,67 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
color: Colors.white,
width: double.infinity,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: widget.model.checkupItems.map((item) {
return Center(
child: FractionallySizedBox(
widthFactor: 1,
child: Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 5, top: 5),
decoration: BoxDecoration(
border: BorderDirectional(
bottom: BorderSide(
style: BorderStyle.solid,
width: 0.5,
color: Colors.grey)),
//borderRadius: ,
color: Colors.white),
child: Column(
crossAxisAlignment:
children: [
Row(
children: [
Container(margin: EdgeInsets.only(
right: 10, left: 10), child: Texts(TranslationBase.of(context).coveredService, fontWeight: FontWeight.bold,))
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: widget.model.checkupItems.map((item) {
return Center(
child: FractionallySizedBox(
widthFactor: 1,
child: Container(
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment
.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 5, top: 5),
decoration: BoxDecoration(
border: BorderDirectional(
bottom: BorderSide(
style: BorderStyle.solid,
width: 0.5,
color: Colors.grey)),
//borderRadius: ,
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
item.itemName,
fontSize: 15,
children: [
Container(margin: EdgeInsets.only(
right: 10, left: 10),
child: Texts(
item.itemName,
fontSize: 15, fontWeight: FontWeight.bold
),
),
],
),
],
),
),
SizedBox(
height: 12,
),
SizedBox(
height: 12,
),
],
),
],
),
),
),
),
);
}).toList()),
);
}).toList()),
],
),
)
],
),
@ -197,28 +222,48 @@ class _NewCMCStepOnePageState extends State<NewCMCStepOnePage> {
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Next",
textColor: Theme.of(context).backgroundColor,
onTap: () {
if (widget.cMCInsertPresOrderRequestModel.patientERCMCInsertServicesList.length = null) {
label: TranslationBase
.of(context)
.next,
textColor: Theme
.of(context)
.backgroundColor,
color: Colors.grey[800],
onTap: () async {
if (widget.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList.length !=
0 ||
widget.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList ==
null) {
int index = widget.model.cmcAllServicesList.length;
PatientERCMCInsertServicesList
patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: widget.model.cmcAllServicesList[index-1].price,
serviceID: widget.model.cmcAllServicesList[index-1].serviceID.toString(),
selectedServiceName: widget.model.cmcAllServicesList[index-1].description,
selectedServiceNameAR: widget.model.cmcAllServicesList[index-1].description,
recordID: 1,
totalPrice: widget.model.cmcAllServicesList[index-1].totalPrice,
vAT: widget.model.cmcAllServicesList[index-1].vAT);
patientERCMCInsertServicesList =
new PatientERCMCInsertServicesList(
price: widget
.model.cmcAllServicesList[index - 1].price,
serviceID: widget
.model.cmcAllServicesList[index - 1].serviceID
.toString(),
selectedServiceName: widget.model
.cmcAllServicesList[index - 1].description,
selectedServiceNameAR: widget.model
.cmcAllServicesList[index - 1].descriptionN,
recordID: 1,
totalPrice: widget
.model.cmcAllServicesList[index - 1].totalPrice,
vAT: widget.model.cmcAllServicesList[index - 1].vAT);
widget.cMCInsertPresOrderRequestModel
.patientERCMCInsertServicesList = [
patientERCMCInsertServicesList
];
widget.changePageViewIndex(1);
await widget.model.getCustomerInfo();
if (widget.model.state == ViewState.ErrorLocal) {
Utils.showErrorToast();
} else {
widget.changePageViewIndex(1);
}
}
},
),

@ -2,15 +2,16 @@ import 'dart:async';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:provider/provider.dart';
class NewCMCStepThreePage extends StatefulWidget {
final CMCInsertPresOrderRequestModel cmcInsertPresOrderRequestModel;
@ -63,19 +64,23 @@ class _NewCMCStepThreePageState
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
height: 400,
height: 500,
width: double.maxFinite,
margin: EdgeInsets.only(left: 12, right: 12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Order Details'),
Texts(
TranslationBase.of(context).orderDetails,
fontWeight: FontWeight.bold,
),
SizedBox(
height: 12,
),
@ -87,7 +92,9 @@ class _NewCMCStepThreePageState
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Location :'),
Texts(TranslationBase
.of(context)
.orderLocation + " : ", fontWeight: FontWeight.bold,),
SizedBox(
height: 12,
),
@ -108,30 +115,40 @@ class _NewCMCStepThreePageState
SizedBox(
height: 12,
),
Texts('Selected Service :'),
Texts(TranslationBase
.of(context)
.selectedService),
...List.generate(
widget.cmcInsertPresOrderRequestModel.patientERCMCInsertServicesList.length,
(index) => Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Service Name :',
fontSize: 12,
),
SizedBox(
height: 5,
),
Texts(
widget
.cmcInsertPresOrderRequestModel.patientERCMCInsertServicesList[index]
.selectedServiceName,
fontSize: 15,
bold: true,
widget.cmcInsertPresOrderRequestModel
.patientERCMCInsertServicesList.length,
(index) =>
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.serviceName,
fontSize: 12, fontWeight: FontWeight.bold,
),
SizedBox(
height: 5,
),
Texts(
projectViewModel.isArabic ? widget
.cmcInsertPresOrderRequestModel
.patientERCMCInsertServicesList[index]
.selectedServiceNameAR : widget
.cmcInsertPresOrderRequestModel
.patientERCMCInsertServicesList[index]
.selectedServiceName,
fontSize: 15,
bold: true,
),
],
),
],
),
),
),
)
],
),
@ -148,14 +165,20 @@ class _NewCMCStepThreePageState
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Confirm",
label: TranslationBase
.of(context)
.confirm,
color: Colors.grey[800],
onTap: () async {
await widget.model.insertPresPresOrder(order: widget.cmcInsertPresOrderRequestModel);
await widget.model.insertPresPresOrder(
order: widget.cmcInsertPresOrderRequestModel);
if (widget.model.state != ViewState.ErrorLocal) {
widget.changePageViewIndex(0);
}
},
textColor: Theme.of(context).backgroundColor),
textColor: Theme
.of(context)
.backgroundColor),
),
],
),

@ -1,19 +1,22 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/close_back.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
import 'cmc_location_page.dart';
class NewCMCStepTowPage extends StatefulWidget {
final Function(PickResult) onPick;
final double latitude;
@ -41,12 +44,13 @@ class _NewCMCStepTowPageState
extends State<NewCMCStepTowPage> {
double latitude = 0;
double longitude = 0;
AddressInfo _selectedAddress;
@override
void initState() {
if (widget.cmcInsertPresOrderRequestModel.latitude == null) {
latitude = widget.latitude;
longitude = widget.longitude;
setLatitudeAndLongitude();
} else {
latitude = widget.cmcInsertPresOrderRequestModel.latitude;
longitude = widget.cmcInsertPresOrderRequestModel.longitude;
@ -54,60 +58,152 @@ class _NewCMCStepTowPageState
super.initState();
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) {
if (latLong == null)
latLong = widget.model.addressesList[widget.model.addressesList
.length - 1].latLong;
List latLongArr = latLong.split(',');
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
return AppScaffold(
isShowDecPage: false,
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.cmcInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.cmcInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).next,
),
body: Stack(
children: [
PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
searchForInitialValue: false,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: Column(
children: [
SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
CMCLocationPage(
latitude: latitude,
longitude: longitude,
),
),
);
},
label: TranslationBase.of(context).addNewAddress,
),
SizedBox(height: 10,),
SecondaryButton(
color: Colors.red
[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.cmcInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.cmcInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).confirm,
),
);
],
)
),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
),
Container(
child: InkWell(
onTap: () =>
confirmSelectLocationDialog(widget.model.addressesList),
child: Container(
padding: EdgeInsets.all(10),
width: double.infinity,
// height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(child: Texts(getAddressName(), fontSize: 14,),),
Icon(Icons.arrow_drop_down)
],
),
),
),
height: 56, width: double.infinity, color: Theme
.of(context)
.scaffoldBackgroundColor,
)
],
),
);
}
void confirmSelectLocationDialog(List<AddressInfo> addresses) {
showDialog(
context: context,
child: SelectLocationDialog(
addresses: addresses,
selectedAddress: _selectedAddress
,
onValueSelected: (value) {
setLatitudeAndLongitude(latLong: value.latLong);
setState(() {
_selectedAddress = value;
});
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: true,
),
);
}
String getAddressName() {
if (_selectedAddress != null)
return _selectedAddress.address1;
else
return TranslationBase.of(context).selectAddress;
}
}

@ -1,68 +0,0 @@
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.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/material.dart';
import 'package:hexcolor/hexcolor.dart';
import 'cmc_page.dart';
class CMCIndexPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).serviceInformation,
body: SingleChildScrollView(
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
"CMC",
fontWeight: FontWeight.normal,
fontSize: 25,
color: Color(0xff60686b),
),
SizedBox(
height: 12,
),
Texts(
"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.",
fontWeight: FontWeight.normal,
fontSize: 17,
),
SizedBox(
height: 22,
),
Center(
child: Image.asset(
'assets/images/AlHabibMedicalService/Wifi-AR.png')),
SizedBox(
height: 77,
),
],
)),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
child: Column(
children: <Widget>[
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
onTap: () => Navigator.push(
context,
FadePage(
page: CMCPage(),
),
),
label: "CMC",
textColor: Theme.of(context).backgroundColor),
),
],
),
));
}
}

@ -1,5 +1,6 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -35,12 +36,15 @@ class _CMCPageState extends State<CMCPage>
@override
Widget build(BuildContext context) {
return BaseView<CMCViewModel>(
onModelReady: (model){
model.getCmcAllPresOrders();
onModelReady: (model) async{
await model.getCmcAllPresOrders();
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).homeHealthCare,
description:TranslationBase.of(context).infoCMC,
imagesInfo: [ImagesInfo(imageAr: 'assets/images/AlHabibMedicalService/Wifi-AR.png',imageEn: 'assets/images/AlHabibMedicalService/Wifi-EN.png', isAsset: true)],
appBarTitle: TranslationBase.of(context).comprehensiveMedicalCheckup,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
@ -78,7 +82,7 @@ class _CMCPageState extends State<CMCPage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:
@ -88,7 +92,8 @@ class _CMCPageState extends State<CMCPage>
Container(
width: MediaQuery.of(context).size.width * 0.37,
child: Center(
child: Texts("CMC Service"),
child: Texts(TranslationBase.of(context)
.comprehensiveMedicalCheckup),
),
),
Container(

@ -2,13 +2,16 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/cmc_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'Dialog/confirm_cancel_order_dialog.dart';
@ -19,6 +22,9 @@ class OrdersLogDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(
CMCViewModel model, GetHHCAllPresOrdersResponseModel order) {
showDialog(
@ -35,7 +41,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
if(model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(message: "Done Successfully");
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully );
await model.getCmcAllPresOrders();
}
},
@ -78,7 +84,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -89,11 +95,12 @@ class OrdersLogDetailsPage extends StatelessWidget {
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
@ -110,7 +117,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -121,11 +128,12 @@ class OrdersLogDetailsPage extends StatelessWidget {
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Status",
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
@ -133,7 +141,9 @@ class OrdersLogDetailsPage extends StatelessWidget {
height: 4,
),
Texts(
order.description,
projectViewModel.isArabic ? order
.descriptionN : order.description,
fontSize: 22,
),
],
@ -142,7 +152,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -153,11 +163,10 @@ class OrdersLogDetailsPage extends StatelessWidget {
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
TranslationBase.of(context).pickupDate,
bold: false,
fontSize: 13,
),
@ -166,8 +175,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
order.createdOn)),
DateUtil.convertStringToDate(order.createdOn)),
fontSize: 22,
),
],
@ -176,7 +184,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -191,7 +199,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
CrossAxisAlignment.start,
children: [
Texts(
"Location",
TranslationBase.of(context).orderLocation,
bold: false,
fontSize: 13,
),
@ -199,10 +207,11 @@ class OrdersLogDetailsPage extends StatelessWidget {
height: 4,
),
Texts(
order.nearestProjectDescription
.toString() ??
order.nearestProjectDescriptionN
.toString(),
!projectViewModel.isArabic?order.
projectDescription.toString() :
order
.projectDescriptionN
.toString(),
fontSize: 22,
),
],
@ -212,32 +221,33 @@ class OrdersLogDetailsPage extends StatelessWidget {
height: 12,
),
if (order.status == 1 ||order.status == 2 )
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(model, order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () {
showConfirmMessage(model,
order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
),
SizedBox(
height: 12,
),
],
),
);
height: 22,
),
],
),
);
}).toList())
],
),

@ -78,7 +78,7 @@ class _EReferralPageState extends State<EReferralPage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:

@ -29,7 +29,7 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
contentPadding: EdgeInsets.fromLTRB(28.0, 24.0, 28.0, 0.0),
title: Center(
child: Texts(
"Confirm",
TranslationBase.of(context).confirm,
color: Colors.black,
),
),
@ -39,7 +39,7 @@ class _ConfirmCancelOrderDialogState extends State<ConfirmCancelOrderDialog> {
Divider(),
Center(
child: Texts(
"Are you sure!! want to cancel this order",
TranslationBase.of(context).cancelOrderMsg ,
color: Colors.grey,
),
),

@ -0,0 +1,146 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
class LocationPage extends StatefulWidget {
final Function(PickResult) onPick;
final double latitude;
final double longitude;
final dynamic model;
const LocationPage({Key key, this.onPick, this.latitude, this.longitude, this.model})
: super(key: key);
@override
_LocationPageState createState() =>
_LocationPageState();
}
class _LocationPageState
extends State<LocationPage> {
double latitude = 0;
double longitude = 0;
@override
void initState() {
latitude = widget.latitude;
longitude = widget.longitude;
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<HomeHealthCareViewModel>(
onModelReady: (model) {},
builder: (_, model, widget) => AppScaffold(
isShowDecPage: false,
isShowAppBar: true,
baseViewModel: model,
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
searchForInitialValue: false,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: Column(
children: [
SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () async {
AddNewAddressRequestModel
addNewAddressRequestModel =
new AddNewAddressRequestModel(
customer: Customer(addresses: [
Addresses(
address1:
selectedPlace.formattedAddress,
address2: selectedPlace
.formattedAddress,
customerAttributes: "",
city: "",
createdOnUtc: "",
id: 0,
latLong: "$latitude,$longitude",
email: "")
]),
);
selectedPlace.addressComponents.forEach((e) {
if (e.types.contains("country")) {
addNewAddressRequestModel.customer
.addresses[0].country = e.longName;
}
if (e.types.contains("postal_code")) {
addNewAddressRequestModel.customer
.addresses[0].zipPostalCode =
e.longName;
}
if (e.types.contains("locality")) {
addNewAddressRequestModel.customer
.addresses[0].city =
e.longName;
}
});
await model.addAddressInfo(
addNewAddressRequestModel: addNewAddressRequestModel);
if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(
message: "Address Added Successfully");
}
Navigator.of(context).pop();
},
label: TranslationBase.of(context).addNewAddress,
),
],
),
),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
),
));
}
}

@ -2,15 +2,16 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/PatientERHHCInsertServicesList.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
class NewHomeHealthCareStepOnePage extends StatefulWidget {
final PatientERInsertPresOrderRequestModel
@ -45,6 +46,8 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowAppBar: false,
baseViewModel: widget.model,
@ -64,7 +67,9 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
height: 12,
),
Texts(
"Select Home Health Care Services",
TranslationBase
.of(context)
.selectHomeHealthCareServices,
textAlign: TextAlign.center,
),
Column(
@ -90,13 +95,13 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.add(PatientERHHCInsertServicesList(
recordID: widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length,
serviceID: service.serviceID,
serviceName:
service.description));
recordID: widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length,
serviceID: service.serviceID,
serviceName:
service.description));
else
removeSelected(service.serviceID);
// widget.patientERInsertPresOrderRequestModel
@ -107,7 +112,8 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Texts(
service.description,
projectViewModel.isArabic ? service
.descriptionN : service.description,
fontSize: 15,
),
),
@ -133,14 +139,23 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Next",
label: TranslationBase
.of(context)
.next,
disabled: this
.widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length == 0,
onTap: (){
widget.changePageViewIndex(1);
.widget
.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList
.length == 0 || widget.model.state == ViewState.BusyLocal,
color: Colors.grey[800],
loading: widget.model.state == ViewState.BusyLocal,
onTap: () async {
await widget.model.getCustomerInfo();
if (widget.model.state == ViewState.ErrorLocal) {
Utils.showErrorToast();
} else {
widget.changePageViewIndex(1);
}
},
textColor: Theme.of(context).backgroundColor),
),

@ -3,12 +3,15 @@ import 'dart:async';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:provider/provider.dart';
class NewHomeHealthCareStepThreePage extends StatefulWidget {
final PatientERInsertPresOrderRequestModel
@ -62,6 +65,8 @@ class _NewHomeHealthCareStepThreePageState
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
baseViewModel: widget.model,
@ -73,7 +78,7 @@ class _NewHomeHealthCareStepThreePageState
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Order Details'),
Texts(TranslationBase.of(context).orderDetails, fontWeight: FontWeight.bold,),
SizedBox(
height: 12,
),
@ -85,7 +90,7 @@ class _NewHomeHealthCareStepThreePageState
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Location :'),
Texts(TranslationBase.of(context).orderLocation, fontWeight: FontWeight.bold),
SizedBox(
height: 12,
),
@ -106,7 +111,7 @@ class _NewHomeHealthCareStepThreePageState
SizedBox(
height: 12,
),
Texts('Selected Service :'),
Texts(TranslationBase.of(context).selectedService + " : ", fontWeight: FontWeight.bold),
...List.generate(
widget.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList.length,
@ -115,7 +120,7 @@ class _NewHomeHealthCareStepThreePageState
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'Service Name :',
TranslationBase.of(context).serviceName,
fontSize: 12,
),
SizedBox(
@ -151,10 +156,11 @@ class _NewHomeHealthCareStepThreePageState
Container(
width: MediaQuery.of(context).size.width * 0.9,
child: SecondaryButton(
label: "Confirm",
label: TranslationBase.of(context).confirm,
disabled: widget.patientERInsertPresOrderRequestModel
.patientERHHCInsertServicesList.length ==
0,
color: Colors.grey[800],
onTap: () async {
await widget.model.insertPresPresOrder(
order: widget.patientERInsertPresOrderRequestModel);

@ -1,17 +1,21 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/select_location_dialog.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/close_back.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:google_maps_place_picker/google_maps_place_picker.dart';
import 'package:provider/provider.dart';
import 'location_page.dart';
class NewHomeHealthCareStepTowPage extends StatefulWidget {
final Function(PickResult) onPick;
final double latitude;
@ -40,73 +44,163 @@ class _NewHomeHealthCareStepTowPageState
extends State<NewHomeHealthCareStepTowPage> {
double latitude = 0;
double longitude = 0;
AddressInfo _selectedAddress;
@override
void initState() {
if (widget.patientERInsertPresOrderRequestModel.latitude == null) {
latitude = widget.latitude;
longitude = widget.longitude;
setLatitudeAndLongitude();
} else {
latitude = widget.patientERInsertPresOrderRequestModel.latitude;
longitude = widget.patientERInsertPresOrderRequestModel.longitude;
}
super.initState();
}
setLatitudeAndLongitude({bool isSetState = false, String latLong}) {
if (latLong == null)
latLong = widget.model.addressesList[widget.model.addressesList
.length - 1].latLong;
List latLongArr = latLong.split(',');
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
body: PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.patientERInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.patientERInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).next,
),
),
);
body: Stack(
children: [
PlacePicker(
apiKey: GOOGLE_API_KEY,
enableMyLocationButton: true,
automaticallyImplyAppBarLeading: false,
autocompleteOnTrailingWhitespace: true,
selectInitialPosition: true,
autocompleteLanguage: projectViewModel.currentLanguage,
enableMapTypeButton: true,
searchForInitialValue: false,
onPlacePicked: (PickResult result) {
print(result.adrAddress);
widget.changePageViewIndex(3);
},
selectedPlaceWidgetBuilder:
(_, selectedPlace, state, isSearchBarFocused) {
print("state: $state, isSearchBarFocused: $isSearchBarFocused");
return isSearchBarFocused
? Container()
: FloatingCard(
bottomPosition: 0.0,
leftPosition: 0.0,
rightPosition: 0.0,
width: 500,
borderRadius: BorderRadius.circular(12.0),
child: state == SearchingState.Searching
? Center(child: CircularProgressIndicator())
: Container(
margin: EdgeInsets.all(12),
child: Column(
children: [
SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (BuildContext context) =>
LocationPage(
latitude: latitude,
longitude: longitude,
),
),
);
},
label: TranslationBase.of(context).addNewAddress,
),
SizedBox(height: 10,),
SecondaryButton(
color: Colors.red[800],
textColor: Colors.white,
onTap: () {
setState(() {
widget.patientERInsertPresOrderRequestModel
.latitude =
selectedPlace.geometry.location.lat;
widget.patientERInsertPresOrderRequestModel
.longitude =
selectedPlace.geometry.location.lng;
});
widget.changePageViewIndex(3);
},
label: TranslationBase.of(context).confirm,
),
],
),
),
);
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: false,
),
Container(
child: InkWell(
onTap: () =>
confirmSelectLocationDialog(widget.model.addressesList),
child: Container(
padding: EdgeInsets.all(10),
width: double.infinity,
// height: 65,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
color: Colors.white),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Expanded(child: Texts(getAddressName(), fontSize: 14,),),
Icon(Icons.arrow_drop_down)
],
),
),
),
height: 56, width: double.infinity, color: Theme
.of(context)
.scaffoldBackgroundColor,
)
],
),
);
}
void confirmSelectLocationDialog(List<AddressInfo> addresses) {
showDialog(
context: context,
child: SelectLocationDialog(
addresses: addresses,
selectedAddress: _selectedAddress
,
onValueSelected: (value) {
setLatitudeAndLongitude(latLong: value.latLong);
setState(() {
_selectedAddress = value;
});
},
initialPosition: LatLng(latitude, longitude),
useCurrentLocation: true,
),
);
}
String getAddressName() {
if (_selectedAddress != null)
return _selectedAddress.address1;
else
return TranslationBase.of(context).selectAddress;
}
}

@ -3,16 +3,19 @@ import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealth
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/patient_er_insert_pres_order_request_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/Dialog/confirm_cancel_order_dialog.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_three_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/new_Home_health_care_step_tow_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:provider/provider.dart';
import '../StepsWidget.dart';
import 'new_Home_health_care_step_one_page.dart';
@ -84,7 +87,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
if (model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(message: "Done Successfully");
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully );
await model.getHHCAllPresOrders();
// await model.getHHCAllServices();
}
@ -92,6 +95,8 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
));
}
ProjectViewModel projectViewModel = Provider.of(context);
return Scaffold(
body: SafeArea(
child: SingleChildScrollView(
@ -99,7 +104,6 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
height: MediaQuery.of(context).size.height * 0.8,
child: Column(
children: [
Container(
margin: EdgeInsets.only(left: MediaQuery.of(context).size.width*0.05, right: MediaQuery.of(context).size.width*0.05),
child: StepsWidget(
@ -138,7 +142,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -152,7 +156,9 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
@ -169,7 +175,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -183,7 +189,9 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Status",
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
@ -191,7 +199,11 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
height: 4,
),
Texts(
widget.model.pendingOrder.description,
projectViewModel.isArabic ? widget
.model.pendingOrder
.descriptionN : widget.model
.pendingOrder.description,
fontSize: 22,
),
],
@ -200,7 +212,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -214,7 +226,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
TranslationBase.of(context).pickupDate,
bold: false,
fontSize: 13,
),
@ -235,7 +247,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
(index) => Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
left: 15, bottom: 15, top: 15,right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -250,7 +262,9 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
CrossAxisAlignment.start,
children: [
Texts(
"Service Name",
TranslationBase
.of(context)
.serviceName,
bold: false,
fontSize: 13,
),
@ -258,7 +272,12 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
height: 4,
),
Texts(
widget.model.hhcAllOrderDetail[index]
projectViewModel.isArabic
? widget.model
.hhcAllOrderDetail[index]
.descriptionN
: widget.model
.hhcAllOrderDetail[index]
.description,
fontSize: 22,
bold: true,
@ -275,7 +294,7 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage>
width:
MediaQuery.of(context).size.width * 0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
label: TranslationBase.of(context).cancel.toUpperCase(),
onTap: () {
showConfirmMessage(widget.model,
widget.model.hhcAllOrderDetail[0]);

@ -42,6 +42,7 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
},
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
description: TranslationBase.of(context).HHCNotAuthMsg,
appBarTitle: TranslationBase.of(context).homeHealthCare,
body: Scaffold(
extendBodyBehindAppBar: true,
@ -80,7 +81,7 @@ class _HomeHealthCarePageState extends State<HomeHealthCarePage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:

@ -2,13 +2,16 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/get_hhc_all_pres_orders_response_model.dart';
import 'package:diplomaticquarterapp/core/model/AlHabibMedicalService/HomeHealthCare/update_pres_oreder_request_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/home_health_care_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'Dialog/confirm_cancel_order_dialog.dart';
@ -19,6 +22,8 @@ class OrdersLogDetailsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
void showConfirmMessage(
HomeHealthCareViewModel model, GetHHCAllPresOrdersResponseModel order) {
showDialog(
@ -29,212 +34,219 @@ class OrdersLogDetailsPage extends StatelessWidget {
UpdatePresOrderRequestModel updatePresOrderRequestModel =
UpdatePresOrderRequestModel(
presOrderID: order.iD,
rejectionReason: "",
presOrderStatus: 4, editedBy: 3);
rejectionReason: "",
presOrderStatus: 4, editedBy: 3);
await model.updateHHCPresOrder(updatePresOrderRequestModel);
if(model.state == ViewState.ErrorLocal) {
Utils.showErrorToast(model.error);
Utils.showErrorToast(model.error);
} else {
AppToast.showSuccessToast(message: "Done Successfully");
AppToast.showSuccessToast(message:TranslationBase.of(context).processDoneSuccessfully );
await model.getHHCAllPresOrders();
// await model.getHHCAllServices();
// await model.getHHCAllServices();
}
},
));
}
return AppScaffold(
isShowAppBar: false,
baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(12),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.94,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 50,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: model.hhcAllPresOrders.map((order) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Request ID",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.iD.toString(),
fontSize: 22,
isShowAppBar: false,
baseViewModel: model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(12),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.94,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 50,
),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: model.hhcAllPresOrders.map((order) {
return Container(
width: double.infinity,
margin: EdgeInsets.only(top: 15),
decoration: BoxDecoration(
border:
Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.requestID,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.iD.toString(),
fontSize: 22,
),
],
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Status",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.description,
fontSize: 22,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.OrderStatus,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
projectViewModel.isArabic ? order.descriptionN : order.description,
fontSize: 22,
),
],
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Pickup Date",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(
order.createdOn)),
fontSize: 22,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
TranslationBase
.of(context)
.pickupDate,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(order.createdOn)),
fontSize: 22,
),
],
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
"Location",
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
order.nearestProjectDescription
.toString() ??
order.nearestProjectDescriptionN
.toString(),
fontSize: 22,
),
SizedBox(
height: 12,
),
Container(
width: double.infinity,
padding: EdgeInsets.only(
left: 15, bottom: 15, top: 15, right: 15),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Colors.grey,
width: 1.0,
),
],
),
),
SizedBox(
height: 12,
),
if (order.status == 1 ||order.status == 2 )
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(model, order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
// borderRadius: BorderRadius.circular(12),
color: Colors.white),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Texts(
TranslationBase.of(context).orderLocation,
bold: false,
fontSize: 13,
),
SizedBox(
height: 4,
),
Texts(
!projectViewModel.isArabic ?order.nearestProjectDescription
.toString() :
order.nearestProjectDescriptionN
.toString(),
fontSize: 22,
),
],
),
),
SizedBox(
height: 12,
),
if (order.status == 1 ||order.status == 2 )
Center(
child: Container(
width: MediaQuery
.of(context)
.size
.width *
0.85,
child: SecondaryButton(
label: "Cancel".toUpperCase(),
onTap: () {
showConfirmMessage(model, order);
}
,
color: Colors.red[800],
disabled: false,
textColor: Theme
.of(context)
.backgroundColor),
),
SizedBox(
height: 12,
),
SizedBox(
height: 12,
),
],
),

@ -203,7 +203,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
imageLocation:
'assets/images/al-habib_online_payment_service_icon.png',
title: 'Covid-19- Drive-Thru Test',
title: TranslationBase.of(context).covid19_driveThrueTest,
),
ServicesContainer(
onTap: () {
@ -227,7 +227,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
),
imageLocation: 'assets/images/pharmacy_logo.png',
title: 'Pharmacy'),
title: TranslationBase.of(context).pharmacy),
ServicesContainer(
onTap: () => Navigator.push(
context,
@ -248,7 +248,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
: EReferralPage()),
),
imageLocation: 'assets/images/ereferral_service_icon.png',
title: 'E-Referral',
title: TranslationBase.of(context).ereferral,
),
ServicesContainer(
onTap: () => Navigator.push(
@ -259,7 +259,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
imageLocation:
'assets/images/new-design/family_menu_icon_red.png',
title: 'My Family',
title: TranslationBase.of(context).myFamily,
),
if(projectViewModel.havePrivilege(35))
ServicesContainer(
@ -269,7 +269,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
imageLocation:
'assets/images/new-design/children_vaccines_icon.png',
title: 'Child Vaccines',
title: TranslationBase.of(context).childVaccine,
),
ServicesContainer(
onTap: () => Navigator.push(
@ -289,7 +289,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
FadePage(page: SymptomInfo()),
),
imageLocation: 'assets/images/new-design/body_icon.png',
title: 'Symptom Checker'),
title: TranslationBase.of(context).symptomCheckerTitle),
if(projectViewModel.havePrivilege(36))
ServicesContainer(
onTap: () => Navigator.push(
@ -297,7 +297,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
FadePage(page: BloodDonationPage()),
),
imageLocation: 'assets/images/new-design/blood_icon.png',
title: 'Blood Donation',
title: TranslationBase.of(context).bloodD,
),
ServicesContainer(
onTap: () => Navigator.push(
@ -308,7 +308,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
imageLocation:
'assets/images/new-design/health_calculator_icon.png',
title: 'Health Calculators',
title: TranslationBase.of(context).calculators,
),
ServicesContainer(
onTap: () => Navigator.push(
@ -319,7 +319,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
),
imageLocation:
'assets/images/new-design/health_convertor_icon.png',
title: 'Health Converter',
title: TranslationBase.of(context).converters,
),
if(projectViewModel.havePrivilege(38))
ServicesContainer(
@ -370,7 +370,7 @@ class _AllHabibMedicalServiceState extends State<AllHabibMedicalService> {
},
imageLocation:
'assets/images/new-design/twitter_dashboard_icon.png',
title: 'Latest News',
title: TranslationBase.of(context).latestNews,
),
ServicesContainer(
onTap: () => Navigator.push(

@ -68,7 +68,7 @@ class _H2OPageState extends State<H2OPage>
isScrollable: false,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/pages/ChildVaccines/child_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/active_medications/DayCheckBoxDialog.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -84,10 +85,12 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
return BaseView<AddNewChildViewModel>(
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
appBarTitle: "Vaccintion",
appBarTitle: TranslationBase.of(context).vaccination,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
@ -96,10 +99,10 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
// crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 50,
height: 20,
),
Texts(
"Add the child's information below to recieve the schedule of vaccinations.",
TranslationBase.of(context).vaccinationAddChildMsg,
//+model.user.firstName,
textAlign: TextAlign.center,
),
@ -107,14 +110,14 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
height: 12,
),
NewTextFields(
hintText: "First Name",
hintText: TranslationBase.of(context).firstName,
controller: _firstTextController,
),
SizedBox(
height: 12,
),
NewTextFields(
hintText: "Second Name",
hintText: TranslationBase.of(context).middleName,
controller: _secondTextController,
),
SizedBox(
@ -124,62 +127,57 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Gender:",
TranslationBase.of(context).gender,
textAlign: TextAlign.end,
),
],
),
Container(
height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity,
height: size.height * 0.12,
padding: EdgeInsets.all(12),
child: Row(
crossAxisAlignment: CrossAxisAlignment.stretch,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
height: MediaQuery.of(context).size.height * 0.12,
width: 175,
color: Colors.white,
child: SecondaryButton(
textColor:
checkedValue == 1 ? Colors.white : Colors.black,
color: checkedValue == 1 ? Colors.red : Colors.white,
label: "Male",
//
onTap: () {
Expanded(
child: Container(
color: Colors.white,
child: SecondaryButton(
textColor:
checkedValue == 1 ? Colors.white : Colors.black,
color: checkedValue == 1 ? Colors.red : Colors.white,
label: TranslationBase.of(context).male,
onTap: () {
setState(() {
checkedValue = 1;
print("checkedValue=" + checkedValue.toString());
});
setState(() {
checkedValue = 1;
print("checkedValue=" + checkedValue.toString());
});
// bloodDetails.
},
// bloodDetails.
},
),
),
),
Container(
height: MediaQuery.of(context).size.height * 0.12,
width: 175,
color: Colors.white,
child: SecondaryButton(
textColor:
checkedValue == 2 ? Colors.white : Colors.black,
color: checkedValue == 2 ? Colors.red : Colors.white,
label: "Female",
//
onTap: () {
setState(() {
checkedValue = 2;
print("checkedValue=" + checkedValue.toString());
});
// bloodDetails.city=_selectedHospital.toString();
Expanded(
child: Container(
color: Colors.white,
child: SecondaryButton(
textColor:
checkedValue == 2 ? Colors.white : Colors.black,
color: checkedValue == 2 ? Colors.red : Colors.white,
label: TranslationBase.of(context).female,
//
onTap: () {
setState(() {
checkedValue = 2;
print("checkedValue=" + checkedValue.toString());
});
// bloodDetails.city=_selectedHospital.toString();
// bloodDetails.
},
// bloodDetails.
},
),
),
)
],
@ -193,7 +191,7 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Date Of Birth::",
TranslationBase.of(context).dob,
textAlign: TextAlign.end,
),
],
@ -249,29 +247,29 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
color: checkedValue == false
? Colors.white24
: Color.fromRGBO(
63,
72,
74,
1,
),
label: "Add",
63,
72,
74,
1,
),
label: TranslationBase.of(context).add,
//
onTap: () async{
newChild.babyName = _firstTextController.text + " " + _secondTextController.text;
onTap: () async {
newChild.babyName = _firstTextController.text +
" " +
_secondTextController.text;
newChild.gender = checkedValue.toString();
newChild.strDOB = getStartDay();
newChild.tempValue = true;
newChild.isLogin = true;
await model.createNewBabyOrders(newChild: newChild);
if(model.isAdded){
AppToast.showSuccessToast(message: "Record Added");
Navigator.pop(context,model.isAdded);
}else{
if (model.isAdded) {
AppToast.showSuccessToast(message: TranslationBase.of(context).childAddedSuccessfully);
Navigator.pop(context, model.isAdded);
} else {
//TODO handling error
}
},
),
),
@ -280,7 +278,7 @@ class _AddNewChildPageState extends State<AddNewChildPage> {
),
),
),
// bottomSheet:
// bottomSheet:
),
);
}

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/pages/ChildVaccines/add_newchild_page.dart'
import 'package:diplomaticquarterapp/pages/ChildVaccines/vaccinationtable_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -22,30 +23,51 @@ class ChildPage extends StatefulWidget {
class _ChildPageState extends State<ChildPage>
with SingleTickerProviderStateMixin {
DeleteBaby deleteBaby = DeleteBaby();
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
final double height = (size.height - kToolbarHeight - 60);
final double itemWidth = size.width / 2;
final double itemHeight = height / 2 + 40;
var checkedValue = true;
return BaseView<ChildVaccinesViewModel>(
onModelReady: (model) => model.getNewUserOrders(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: " Vaccination",
appBarTitle: TranslationBase.of(context).vaccination,
baseViewModel: model,
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 15, right: 15, top: 70),
child: Column(
children: [
...List.generate(
body: Container(
height: height * 0.85,
child: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 8, right: 8, top: 16),
child: GridView.count(
crossAxisCount: 2,
childAspectRatio: (itemWidth / (itemHeight + 0)),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
controller: ScrollController(keepScrollOffset: true),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
children: [
...List.generate(
model.babyInformationModelList.length,
(index) => Container(
margin: EdgeInsets.only(
left: 0, right: 0, bottom: 20),
decoration: BoxDecoration(
(index) => InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: VaccinationTablePage(model.babyInformationModelList[index]),
),
);
},
child: Container(
margin: EdgeInsets.only(
left: 0, right: 0, bottom: 20),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.white, width: 0.5),
@ -54,11 +76,12 @@ class _ChildPageState extends State<ChildPage>
color: Colors.white,
),
padding: EdgeInsets.all(12),
width: 200,//double.infinity,
//double.infinity,
child: Column(
children: [
Row(children: [
Texts("CHILD NAME"),
Texts(TranslationBase.of(context)
.childName),
]),
Row(children: [
Texts(model
@ -96,19 +119,14 @@ class _ChildPageState extends State<ChildPage>
Navigator.push(
context,
FadePage(
page: VaccinationTablePage(),
page: VaccinationTablePage(model.babyInformationModelList[index]),
),
);
},
)
]),
Row(children: [
Texts("Birthday"),
Texts(TranslationBase.of(context).dob),
]),
Row(children: [
IconButton(
@ -116,9 +134,7 @@ class _ChildPageState extends State<ChildPage>
'assets/images/new-design/calender-secondary.png'),
tooltip: '',
onPressed: () {
setState(() {
});
setState(() {});
},
),
Texts(DateUtil.yearMonthDay(model
@ -130,73 +146,71 @@ class _ChildPageState extends State<ChildPage>
icon: new Image.asset(
'assets/images/new-design/garbage.png'),
tooltip: '',
onPressed: ()async {
onPressed: () async {
//=====================
await model.deleteBabyOrders(newChild:deleteBaby );
await model.deleteBabyOrders(
newChild: deleteBaby);
deleteBaby.babyID=model.babyInformationModelList[index]
deleteBaby.babyID = model
.babyInformationModelList[index]
.babyID;
await model.deleteBabyOrders(newChild:deleteBaby );
if(model.isDeleted){
AppToast.showSuccessToast(message: "Record Deleted");
Navigator.pop(context,model.isDeleted);
}else{
//TODO handling error
}
await model.deleteBabyOrders(
newChild: deleteBaby);
if (model.isDeleted) {
AppToast.showSuccessToast(
message:
TranslationBase.of(context)
.recordDeleted);
Navigator.pop(
context, model.isDeleted);
} else {
//TODO handling error
}
},
),
Texts("Delete"),
Texts(TranslationBase.of(context)
.deleteView),
]),
SizedBox(
height: 12,
),
],
),
),
),
)
],
))
)
],
))),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity,
padding: EdgeInsets.all(15),
child: SecondaryButton(
textColor: Colors.white,
color: checkedValue == false
? Colors.white24
: Color.fromRGBO(
63,
72,
74,
1,
),
label: "ADD NEW CHILD ",
//
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddNewChildPage(),
),
).then((value) {
if (value) model.getNewUserOrders();
});
},
),
bottomSheet: Container(
height: height * 0.15,
width: double.infinity,
padding: EdgeInsets.all(16),
child: SecondaryButton(
textColor: Colors.white,
color: checkedValue == false
? Colors.white24
: Color.fromRGBO(
63,
72,
74,
1,
),
label: TranslationBase.of(context).addNewChild,
//
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => AddNewChildPage(),
),
).then((value) {
if (value) model.getNewUserOrders();
});
},
),
),
));
}
}

@ -1,10 +1,10 @@
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/child_vaccines_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/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
@ -13,214 +13,218 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ChildVaccinesPage extends StatefulWidget {
@override
_ChildVaccinesPageState createState() => _ChildVaccinesPageState();
}
class _ChildVaccinesPageState extends State<ChildVaccinesPage>
with SingleTickerProviderStateMixin{
with SingleTickerProviderStateMixin {
TextEditingController titleController = TextEditingController();
var checkedValue=false;
String addEmail="";
var checkedValue = false;
String addEmail = "";
@override
Widget build(BuildContext context) {
return BaseView<UserInformationViewModel>(
onModelReady: (model) => model.getUserInformationRequestOrders(),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: " Vaccination",//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(
height: 20,
),
Padding(
padding: const EdgeInsets.all(10.0),
child:Container(
child: Texts("Welcome back",fontSize: 20,),
) ,
),
Divider(color:Colors.black , indent: 10,
endIndent: 10,),
SizedBox(
height: 20,
),
Padding(
padding: const EdgeInsets.all(10.0),
child:Container(
child: Texts("Please ensure that the email address is up-to-date and process to view the schedule",fontSize: 20,),
) ,
isShowAppBar: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).vaccination,
//TranslationBase.of(context).advancePayment,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
SizedBox(
height: 20,
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
child: Texts(
TranslationBase.of(context).welcomeBack,
fontSize: 20,
),
Divider(color:Colors.black , indent: 10,
endIndent: 10,),
Padding(
padding: const EdgeInsets.all(10.0),
child:Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
fillColor: Colors.red,
hintText: model.user.emailAddress,
controller: titleController,
fontSize: 20,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
onChanged: (text) {
addEmail=text;
model.user.emailAddress==addEmail?checkedValue=false:checkedValue=true;
},
validator: (value) {
if (value == null)
{
return model.user.emailAddress;
}
else
{
return model.user.emailAddress;}
},
),
),
),
),
Divider(
color: Colors.black,
indent: 10,
endIndent: 10,
),
SizedBox(
height: 20,
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
child: Texts(
TranslationBase.of(context).msg_email_address_up_to_date,
fontSize: 20,
),
Container(
height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity,
padding: EdgeInsets.all(15),
child: SecondaryButton(
textColor: Colors.white,
color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,),
label: "UPDATE EMAIL",
//
onTap: (){
model.user.emailAddress=addEmail.toString();
AppToast.showSuccessToast(
message: "Email updated");
// bloodDetails.city=_selectedHospital.toString();
// bloodDetails.
},
),
),
),
Divider(
color: Colors.black,
indent: 10,
endIndent: 10,
),
Padding(
padding: const EdgeInsets.all(10.0),
child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
fillColor: Colors.red,
hintText: model.user.emailAddress,
controller: titleController,
fontSize: 20,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
onChanged: (text) {
addEmail = text;
model.user.emailAddress == addEmail
? checkedValue = false
: checkedValue = true;
},
validator: (value) {
if (value == null) {
return model.user.emailAddress;
} else {
return model.user.emailAddress;
}
},
),
Container(
height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity,
padding: EdgeInsets.all(15),
child: SecondaryButton(
textColor: Colors.white,
color: Color.fromRGBO(63, 72, 74, 1,),
label: " VIEW LIST OF CHILDREN",
//
onTap: () => Navigator.push(
context,
FadePage(
page: ChildPage(),
),
),
),
Container(
height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity,
padding: EdgeInsets.all(15),
child: SecondaryButton(
textColor: Colors.white,
color: checkedValue == false
? Colors.white24
: Color.fromRGBO(
63,
72,
74,
1,
),
),
),
// Texts(
// // TranslationBase.of(context).advancePaymentLabel,
// model.user.emailAddress,
// textAlign: TextAlign.center,
// ),
SizedBox(
height: 12,
),
SizedBox(
height: 12,
),
SizedBox(
height: 12,
label: TranslationBase.of(context).updateEmail,
//
onTap: () {
model.user.emailAddress = addEmail.toString();
AppToast.showSuccessToast(
message: TranslationBase.of(context).updateEmailMsg);
// bloodDetails.city=_selectedHospital.toString();
// bloodDetails.
},
),
),
Container(
height: MediaQuery.of(context).size.height * 0.12,
width: double.infinity,
padding: EdgeInsets.all(15),
child: SecondaryButton(
textColor: Colors.white,
color: Color.fromRGBO(
63,
72,
74,
1,
),
SizedBox(
height: 12,
label: TranslationBase.of(context).viewListChildren,
//
onTap: () => Navigator.push(
context,
FadePage(
page: ChildPage(),
),
),
),
),
SizedBox(
height: 12,
),
// Texts(
// // TranslationBase.of(context).advancePaymentLabel,
// model.user.emailAddress,
// textAlign: TextAlign.center,
// ),
SizedBox(
height: 12,
),
SizedBox(
height: 12,
),
SizedBox(
height: 12,
),
SizedBox(
height: 10,
),
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Center(
// child: Container(
// color: Colors.white,
// width: 350,
// child: InkWell(
// onTap: () {
// showDialog(
// context: context,
// builder: (_) =>
// AssetGiffyDialog(
// title: Text(
// "",
// style: TextStyle(
// fontSize: 22.0,
// fontWeight:
// FontWeight
// .w600),
// ),
// image: Image.asset(
// 'assets/images/BloodChrt_EN.png'),
// buttonCancelText:
// Text('cancel'),
// buttonCancelColor:
// Colors.grey,
// onlyCancelButton: true,
// ));
// },
// child: Container(
// width: 250,
// height: 200,
// child:Image.asset(
// 'assets/images/BloodChrt_EN.png')),
// ),
// ),
// ),
// ],
// ),
SizedBox(
height: 12,
),
SizedBox(
height: MediaQuery.of(context).size.height * 0.15,
)
],
SizedBox(
height: 12,
),
SizedBox(
height: 10,
),
// Row(
// mainAxisAlignment: MainAxisAlignment.center,
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Center(
// child: Container(
// color: Colors.white,
// width: 350,
// child: InkWell(
// onTap: () {
// showDialog(
// context: context,
// builder: (_) =>
// AssetGiffyDialog(
// title: Text(
// "",
// style: TextStyle(
// fontSize: 22.0,
// fontWeight:
// FontWeight
// .w600),
// ),
// image: Image.asset(
// 'assets/images/BloodChrt_EN.png'),
// buttonCancelText:
// Text('cancel'),
// buttonCancelColor:
// Colors.grey,
// onlyCancelButton: true,
// ));
// },
// child: Container(
// width: 250,
// height: 200,
// child:Image.asset(
// 'assets/images/BloodChrt_EN.png')),
// ),
// ),
// ),
// ],
// ),
SizedBox(
height: MediaQuery.of(context).size.height * 0.15,
)
],
),
),
),
),
);
}
}

@ -7,8 +7,11 @@ import 'package:flutter/material.dart';
class SelectGenderDialog extends StatefulWidget {
final Email;
final Function okFunction;
const SelectGenderDialog({Key key, this.Email, this.okFunction})
: super(key: key);
const SelectGenderDialog({Key key, this.Email}) : super(key: key);
@override
_SelectGenderDialogState createState() => _SelectGenderDialogState();
}
@ -33,9 +36,8 @@ class _SelectGenderDialogState extends State<SelectGenderDialog> {
});
},
child: ListTile(
title: Text("Send the child's schedule to the email\n Tamer.dasdasdas@gmail.com "),
title: Text(
"${TranslationBase.of(context).sendChildEmailMsg}\n Tamer.dasdasdas@gmail.com "),
),
),
)
@ -44,7 +46,6 @@ class _SelectGenderDialogState extends State<SelectGenderDialog> {
SizedBox(
height: 5.0,
),
SizedBox(
height: 5.0,
),
@ -82,7 +83,7 @@ class _SelectGenderDialogState extends State<SelectGenderDialog> {
flex: 1,
child: InkWell(
onTap: () {
AppToast.showSuccessToast(message: "Email Sended");
widget.okFunction();
// widget.onValueSelected(beneficiaryType);
Navigator.pop(context);
},
@ -105,7 +106,4 @@ class _SelectGenderDialogState extends State<SelectGenderDialog> {
],
);
}
}

@ -1,8 +1,13 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/childvaccines/List_BabyInformationModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/child_vaccines/vaccination_table_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/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -12,91 +17,161 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'dialogs/SelectGenderDialog.dart';
class VaccinationTablePage extends StatelessWidget {
final List_BabyInformationModel babyInfo;
VaccinationTablePage(this.babyInfo);
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
final double height = (size.height - kToolbarHeight - 60);
var checkedValue;
return BaseView<VaccinationTableViewModel>(
onModelReady: (model) => model.getCreateVaccinationTable(),//getUserTermsAndConditions(),
onModelReady: (model) => model.getCreateVaccinationTable(babyInfo, false),
builder: (_, model, w) => AppScaffold(
isShowAppBar: true,
baseViewModel: model,
appBarTitle: "Vaccination",
body: SingleChildScrollView(
child:Container(
margin: EdgeInsets.only(left: 15,right: 15,top: 70),
child: Column(
children: [//babyInformationModelList.length
...List.generate(model.creteVaccinationTableModelList.length, (index) =>
Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
padding: EdgeInsets.all(12),
width: double.infinity,
child: Column(
children: [
Row(children: [
Text(model.creteVaccinationTableModelList[index].visit),
SizedBox(width: 10,),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Html(
// data:"<html><head><style type='text/css'>.Test {list-style-image:url('http://10.50.100.198:4444/Images/Bullet_List_Small.png');}</style></head><body><table><tr align='left'><td align='left'>BCG</td></tr><tr align='left'><td align='left'>HEPATITIS B</td></tr></table></body></html>"//model.creteVaccinationTableModelList[index].vaccinesDescription
data:model.creteVaccinationTableModelList[index].vaccinesDescription,
),
],),
),
Text(model.creteVaccinationTableModelList[index].givenAt),
],),
Divider(color:Colors.black ,),
],
)
)
)
],
appBarTitle: TranslationBase.of(context).vaccination,
body: Container(
height: height * 0.85,
child: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(left: 16, right: 16, top: 16),
child: Column(
children: [
Row(
children: [
Expanded(
child: Texts(TranslationBase.of(context).childName),
),
Expanded(
child: Texts(TranslationBase.of(context).dob),
),
],
),
SizedBox(
height: 10,
),
Row(
children: [
Expanded(
child: Texts(babyInfo.babyName),
),
Expanded(
child: Texts(DateUtil.getFormattedDate(
babyInfo.dOB, "MMM dd,yyyy")),
),
],
),
SizedBox(
height: 10,
),
Divider(
color: Colors.black,
),
Row(
children: [
Text(TranslationBase.of(context).visit),
SizedBox(
width: 25,
),
Expanded(
child: Text(TranslationBase.of(context).description)),
Text(TranslationBase.of(context).dueDate),
],
),
...List.generate(
model.creteVaccinationTableModelList.length,
(index) => Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
// border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
// color: Colors.white,
),
padding: EdgeInsets.all(12),
width: double.infinity,
child: Column(
children: [
Row(
children: [
Text(model
.creteVaccinationTableModelList[index]
.visit),
SizedBox(
width: 10,
),
Expanded(
child: Column(
mainAxisAlignment:
MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Html(
// data:"<html><head><style type='text/css'>.Test {list-style-image:url('http://10.50.100.198:4444/Images/Bullet_List_Small.png');}</style></head><body><table><tr align='left'><td align='left'>BCG</td></tr><tr align='left'><td align='left'>HEPATITIS B</td></tr></table></body></html>"//model.creteVaccinationTableModelList[index].vaccinesDescription
data: model
.creteVaccinationTableModelList[
index]
.vaccinesDescription,
),
],
),
),
Text(model
.creteVaccinationTableModelList[index]
.givenAt),
],
),
Divider(
color: Colors.black,
),
],
)))
],
),
),
),
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.12,
height: height * 0.15,
width: double.infinity,
padding: EdgeInsets.all(12),
child: SecondaryButton(
textColor: Colors.white,
color: checkedValue== false ?Colors.white24:Color.fromRGBO(63, 72, 74, 1,),
label: "Send Email ",
//
onTap: () {
//SelectGenderDialog();
textColor: Colors.white,
color: checkedValue == false
? Colors.white24
: Color.fromRGBO(
63,
72,
74,
1,
),
label: TranslationBase.of(context).sendEmail,
//
onTap: () {
//SelectGenderDialog();
//===============
showDialog(
context: context,
child: SelectGenderDialog(
),
);
//=========
}
),
showDialog(
context: context,
child: SelectGenderDialog(
okFunction: () async {
await model.getCreateVaccinationTable(babyInfo, true);
if (model.state == ViewState.Idle) {
AppToast.showSuccessToast(
message: TranslationBase.of(context)
.emailSentSuccessfully);
} else {
AppToast.showErrorToast(
message: TranslationBase.of(context)
.EmailSentError);
}
},
),
);
//=========
}),
),
),
);

@ -78,10 +78,7 @@ class _FindUsPageState extends State<FindUsPage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
//indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),

@ -7,6 +7,8 @@ import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../../Constants.dart';
class CardCommonContact extends StatelessWidget {
final image;
final text;
@ -37,7 +39,7 @@ class CardCommonContact extends StatelessWidget {
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: Texts(this.text,
// overflow: TextOverflow.clip,
color:Theme.of(context).primaryColor,
color:secondaryColor,
fontWeight: FontWeight.w700,
fontSize: 20.0),
),

@ -79,7 +79,7 @@ class _AmbulanceReqState extends State<AmbulanceReq>
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.93,
width: MediaQuery.of(context).size.width * 0.90,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
@ -93,7 +93,6 @@ class _AmbulanceReqState extends State<AmbulanceReq>
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),

@ -46,7 +46,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
@override
Widget build(BuildContext context) {
return AppScaffold(
body: widget.amRequestViewModel.pickUpRequestPresOrder != null
body: false
? Column(
children: [
SizedBox(
@ -62,18 +62,18 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
OrderLogItem(
title: 'Request ID',
title: TranslationBase.of(context).reqId,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.presOrderID
.toString(),
),
OrderLogItem(
title: 'Status',
title: TranslationBase.of(context).status,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.ambulateDescription,
),
OrderLogItem(
title: 'Last edit time',
title: TranslationBase.of(context).pickupDate,
value: DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(widget
.amRequestViewModel
@ -81,17 +81,17 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
.lastEditDate)),
),
OrderLogItem(
title: 'Pickup Location',
title: TranslationBase.of(context).pickupLocation,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.pickupLocationName,
),
OrderLogItem(
title: 'Drop off Location',
title: TranslationBase.of(context).dropoffLocation,
value: widget.amRequestViewModel.pickUpRequestPresOrder
.dropoffLocationName,
),
OrderLogItem(
title: 'Trasfaer way',
title: TranslationBase.of(context).transportMethod,
value: widget
.amRequestViewModel.pickUpRequestPresOrder.title,
),

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/Ambulate.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
@ -51,7 +52,7 @@ class _BillAmountState extends State<BillAmount> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Bill Amount '),
Texts(TranslationBase.of(context).billAmount),
SizedBox(
height: 10,
),
@ -73,7 +74,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'Amount before tax: ',
TranslationBase.of(context).patientShareB,
textAlign: TextAlign.start,
color: Colors.black,
fontSize: 15,
@ -91,7 +92,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'SR ${widget.patientER.patientERTransportationMethod.price}',
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.price}',
color: Colors.black,
textAlign: TextAlign.start,
fontSize: 15,
@ -108,7 +109,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'Tax amount :',
TranslationBase.of(context).patientShareTax,
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -121,7 +122,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'SR ${widget.patientER.patientERTransportationMethod.vAT}',
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.vAT}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -143,7 +144,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'Total amount payable',
TranslationBase.of(context).patientShareTotal,
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -162,7 +163,7 @@ class _BillAmountState extends State<BillAmount> {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
'SR ${widget.patientER.patientERTransportationMethod.totalPrice}',
TranslationBase.of(context).sar+' ${widget.patientER.patientERTransportationMethod.totalPrice}',
color: Colors.black,
fontSize: 15,
textAlign: TextAlign.start,
@ -176,7 +177,7 @@ class _BillAmountState extends State<BillAmount> {
SizedBox(
height: 10,
),
Texts('Select Ambulate',bold: true,),
Texts(TranslationBase.of(context).selectAmbulate,bold: true,),
SizedBox(height: 5,),
Row(
children: [
@ -196,7 +197,7 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text('Wheelchair'),
title: Text(TranslationBase.of(context).wheelchair),
leading: Radio(
value: Ambulate.Wheelchair,
groupValue: _ambulate,
@ -227,7 +228,7 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text('Walker'),
title: Text(TranslationBase.of(context).walker),
leading: Radio(
value: Ambulate.Walker,
groupValue: _ambulate,
@ -263,7 +264,7 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text('Stretcher'),
title: Text(TranslationBase.of(context).stretcher),
leading: Radio(
value: Ambulate.Stretcher,
groupValue: _ambulate,
@ -294,7 +295,7 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text('None'),
title: Text(TranslationBase.of(context).none),
leading: Radio(
value: Ambulate.None,
groupValue: _ambulate,
@ -313,7 +314,7 @@ class _BillAmountState extends State<BillAmount> {
),
SizedBox(height: 12,),
NewTextFields(
hintText: 'Note',
hintText: TranslationBase.of(context).notes,
initialValue: note,
onChanged: (value){
setState(() {
@ -340,7 +341,7 @@ class _BillAmountState extends State<BillAmount> {
widget.changeCurrentTab(3);
});
},
label: 'Next',
label: TranslationBase.of(context).next,
),
)
],

@ -9,6 +9,7 @@ import 'package:diplomaticquarterapp/pages/landing/home_page.dart';
import 'package:diplomaticquarterapp/uitl/ProgressDialog.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart';
@ -78,7 +79,7 @@ class _PickupLocationState extends State<PickupLocation> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Pickup Location'),
Texts(TranslationBase.of(context).pickupLocation),
SizedBox(
height: 15,
),
@ -110,7 +111,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getSelectFromMapName()),
Texts(getSelectFromMapName(context)),
Icon(
FontAwesomeIcons.mapMarkerAlt,
size: 24,
@ -123,7 +124,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 12,
),
Texts('Pickup Spot'),
Texts(TranslationBase.of(context).pickupSpot),
SizedBox(
height: 5,
),
@ -141,7 +142,7 @@ class _PickupLocationState extends State<PickupLocation> {
color: Colors.white,
),
child: ListTile(
title: Texts('Inside Home'),
title: Texts(TranslationBase.of(context).insideHome),
leading: Checkbox(
activeColor: Colors.red[800],
value: _isInsideHome,
@ -157,7 +158,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 12,
),
Texts('Do you have an appointment ?'),
Texts(TranslationBase.of(context).haveAppo),
SizedBox(
height: 5,
),
@ -182,7 +183,7 @@ class _PickupLocationState extends State<PickupLocation> {
color: Colors.white,
),
child: ListTile(
title: Text('Yes'),
title: Texts(TranslationBase.of(context).yes),
leading: Radio(
value: HaveAppointment.YES,
groupValue: _haveAppointment,
@ -217,7 +218,7 @@ class _PickupLocationState extends State<PickupLocation> {
color: Colors.white,
),
child: ListTile(
title: Text('No'),
title: Texts(TranslationBase.of(context).no),
leading: Radio(
value: HaveAppointment.NO,
groupValue: _haveAppointment,
@ -250,7 +251,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 12,
),
Texts('Drop off Location'),
Texts(TranslationBase.of(context).dropoffLocation),
SizedBox(
height: 8,
),
@ -270,7 +271,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName('Pickup Location')),
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)),
Icon(
Icons.arrow_drop_down,
size: 24,
@ -286,7 +287,7 @@ class _PickupLocationState extends State<PickupLocation> {
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Pickup Location'),
Texts(TranslationBase.of(context).pickupLocation),
SizedBox(
height: 15,
),
@ -306,7 +307,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName('Pickup Location')),
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)),
Icon(
Icons.arrow_drop_down,
size: 24,
@ -319,7 +320,7 @@ class _PickupLocationState extends State<PickupLocation> {
SizedBox(
height: 12,
),
Texts('Drop off Location'),
Texts(TranslationBase.of(context).dropoffLocation),
SizedBox(
height: 8,
),
@ -351,7 +352,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getSelectFromMapName()),
Texts(getSelectFromMapName(context)),
Icon(
FontAwesomeIcons.mapMarkerAlt,
size: 24,
@ -377,7 +378,7 @@ class _PickupLocationState extends State<PickupLocation> {
onTap: () {
if (_result == null || _selectedHospital == null)
AppToast.showErrorToast(
message: 'please select all fields');
message: TranslationBase.of(context).selectAll);
else
setState(() {
widget.patientER.pickupSpot = _isInsideHome ? 1 : 0;
@ -427,7 +428,7 @@ class _PickupLocationState extends State<PickupLocation> {
widget.changeCurrentTab(2);
});
},
label: 'Next',
label: TranslationBase.of(context).next,
),
)
],
@ -455,8 +456,8 @@ class _PickupLocationState extends State<PickupLocation> {
return _selectedHospital == null ? title : _selectedHospital.name;
}
String getSelectFromMapName() {
return _result != null ? _result.formattedAddress : 'Select From Map';
String getSelectFromMapName(context) {
return _result != null ? _result.formattedAddress : TranslationBase.of(context).selectMap;
}
getAppointment() {
@ -494,7 +495,7 @@ class _PickupLocationState extends State<PickupLocation> {
setState(() {
_haveAppointment = HaveAppointment.NO;
});
AppToast.showErrorToast(message: 'You don\'t have any appointment');
AppToast.showErrorToast(message: TranslationBase.of(context).noAppointment);
}
}).catchError((e) {
ProgressDialogUtil.hideProgressDialog(context);

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/enum/OrderService.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method_list_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
@ -67,7 +68,7 @@ class _SelectTransportationMethodState
SizedBox(
height: 12,
),
Texts('Select Transportation Method'),
Texts(TranslationBase.of(context).transportHeading),
...List.generate(
widget.amRequestViewModel.amRequestModeList.length,
(index) => InkWell(
@ -108,7 +109,7 @@ class _SelectTransportationMethodState
Expanded(
flex: 1,
child: Texts(
'SR ${widget.amRequestViewModel.amRequestModeList[index].price}'),
TranslationBase.of(context).sar+' ${widget.amRequestViewModel.amRequestModeList[index].price}'),
)
],
),
@ -118,7 +119,7 @@ class _SelectTransportationMethodState
SizedBox(
height: 12,
),
Texts('Select Direction'),
Texts(TranslationBase.of(context).directionHeading),
SizedBox(
height: 5,
),
@ -144,7 +145,7 @@ class _SelectTransportationMethodState
color: Colors.white,
),
child: ListTile(
title: Text('To Hospital'),
title: Text(TranslationBase.of(context).toHospital),
leading: Radio(
value: Direction.ToHospital,
groupValue: _direction,
@ -175,7 +176,7 @@ class _SelectTransportationMethodState
color: Colors.white,
),
child: ListTile(
title: Text('Form Hospital'),
title: Text(TranslationBase.of(context).fromHospital),
leading: Radio(
value: Direction.FromHospital,
groupValue: _direction,
@ -200,7 +201,7 @@ class _SelectTransportationMethodState
SizedBox(
height: 8,
),
Texts('Select Direction'),
Texts(TranslationBase.of(context).directionHeading),
SizedBox(
height: 5,
),
@ -222,7 +223,7 @@ class _SelectTransportationMethodState
color: Colors.white,
),
child: ListTile(
title: Text('One Way'),
title: Text(TranslationBase.of(context).oneDirec),
leading: Radio(
value: Way.OneWay,
groupValue: _way,
@ -253,7 +254,7 @@ class _SelectTransportationMethodState
color: Colors.white,
),
child: ListTile(
title: Text('Two Ways'),
title: Text(TranslationBase.of(context).twoDirec),
leading: Radio(
value: Way.TwoWays,
groupValue: _way,
@ -298,7 +299,7 @@ class _SelectTransportationMethodState
widget.changeCurrentTab(1);
});
},
label: 'Next',
label: TranslationBase.of(context).next,
),
)
],

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
@ -27,7 +28,7 @@ class _SummaryState extends State<Summary> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Summary'),
Texts(TranslationBase.of(context).RRTSummary),
SizedBox(height: 5,),
Container(
width: double.infinity,
@ -39,11 +40,11 @@ class _SummaryState extends State<Summary> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts('Transportation Method',color: Colors.grey,),
Texts(TranslationBase.of(context).transportMethod,color: Colors.grey,),
Texts('${widget.patientER.patientERTransportationMethod.title}',bold: true,),
SizedBox(height: 8,),
Texts('Direction',color: Colors.grey,),
Texts(TranslationBase.of(context).directions,color: Colors.grey,),
Texts('From Hospital',bold: true,),
SizedBox(height: 8,),
@ -92,7 +93,7 @@ class _SummaryState extends State<Summary> {
child:SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
label: 'Send',
label: TranslationBase.of(context).send,
onTap: () async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER);

@ -20,6 +20,10 @@ class NearestEr extends StatelessWidget {
@override
Widget build(BuildContext context) {
var size = MediaQuery.of(context).size;
final double itemHeight = (size.height - kToolbarHeight - 24) / 2;
final double itemWidth = size.width / 2;
return BaseView<NearHospitalViewModel>(
onModelReady: appointmentNo != null && projectID != null
? (model) => model.getProjectAvgERWaitingTimeOrders(
@ -27,14 +31,14 @@ class NearestEr extends StatelessWidget {
: (model) => model.getProjectAvgERWaitingTimeOrders(),
builder: (_, mode, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: 'Nearest ER',
appBarTitle: TranslationBase.of(context).NearestEr,
baseViewModel: mode,
body: mode.ProjectAvgERWaitingTimeModeList.length > 0
? Container(
child: ListView(
children: <Widget>[
Text(
"\nThis service Displays nearest branch\n among all the branches of All Habib \n medical Group based on your current Location",
"${TranslationBase.of(context).NearestErDesc}",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 18.0,
@ -42,301 +46,55 @@ class NearestEr extends StatelessWidget {
fontWeight: FontWeight.w900,
color: new Color(0xFF60686b))),
Container(
margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 10.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: Container(
child: CardPosition(
text: mode
.ProjectAvgERWaitingTimeModeList[0]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: mode
.ProjectAvgERWaitingTimeModeList[0]
.distanceInKilometers
.toString(),
type: mode
.ProjectAvgERWaitingTimeModeList[0].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[0]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[0]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[0]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[0]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[0]
.projectName,
),
),
),
Expanded(
child: Container(
child: CardPosition(
text: mode
.ProjectAvgERWaitingTimeModeList[1]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: mode
.ProjectAvgERWaitingTimeModeList[1]
.distanceInKilometers
.toString(),
type: mode
.ProjectAvgERWaitingTimeModeList[1].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[1]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[1]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[1]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[1]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[1]
.projectName,
),
),
)
],
),
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: Container(
child: CardPosition(
text: mode
.ProjectAvgERWaitingTimeModeList[2]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: mode
.ProjectAvgERWaitingTimeModeList[2]
.distanceInKilometers
.toString(),
type: mode
.ProjectAvgERWaitingTimeModeList[2].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[2]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[2]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[2]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[2]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[2]
.projectName,
),
),
),
Expanded(
child: Container(
child: CardPosition(
text: mode
.ProjectAvgERWaitingTimeModeList[3]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: mode
.ProjectAvgERWaitingTimeModeList[3]
.distanceInKilometers
.toString(),
type: mode
.ProjectAvgERWaitingTimeModeList[3].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[3]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[3]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[3]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[3]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[3]
.projectName,
),
),
flex: 0,
)
],
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: Container(
child: CardPosition(
text: mode
.ProjectAvgERWaitingTimeModeList[4]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: mode
.ProjectAvgERWaitingTimeModeList[4]
.distanceInKilometers
.toString(),
type: mode
.ProjectAvgERWaitingTimeModeList[4].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[4]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[4]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[4]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[4]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[4]
.projectName,
),
),
),
Expanded(
child: Container(
child: CardPosition(
text: mode
.ProjectAvgERWaitingTimeModeList[5]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: mode
.ProjectAvgERWaitingTimeModeList[5]
.distanceInKilometers
.toString(),
type: mode
.ProjectAvgERWaitingTimeModeList[5].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[5]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[5]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[5]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[5]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[5]
.projectName,
),
),
)
],
margin: EdgeInsets.fromLTRB(2.0, 10.0, 0.0, 10.0),
child: GridView.count(
crossAxisCount: 2,
childAspectRatio: (itemWidth / itemWidth),
crossAxisSpacing: 10,
mainAxisSpacing: 10,
controller:
new ScrollController(keepScrollOffset: false),
shrinkWrap: true,
padding: const EdgeInsets.all(4.0),
children: List.generate(7, (index) {
return Container(
child: CardPosition(
text: mode
.ProjectAvgERWaitingTimeModeList[index]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: mode
.ProjectAvgERWaitingTimeModeList[index]
.distanceInKilometers
.toString(),
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,
),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Expanded(
child: Container(
child: CardPosition(
text: mode
.ProjectAvgERWaitingTimeModeList[6]
.projectName
.toString(),
image:
'assets/images/new-design/find_us_icon.png',
subText: mode
.ProjectAvgERWaitingTimeModeList[6]
.distanceInKilometers
.toString(),
type: mode
.ProjectAvgERWaitingTimeModeList[6].iD
.toString(),
telephone: mode
.ProjectAvgERWaitingTimeModeList[6]
.phoneNumber
.toString(),
networkImage: mode
.ProjectAvgERWaitingTimeModeList[6]
.projectImageURL
.toString(),
latitude: mode
.ProjectAvgERWaitingTimeModeList[6]
.latitude,
longitude: mode
.ProjectAvgERWaitingTimeModeList[6]
.longitude,
projectname: mode
.ProjectAvgERWaitingTimeModeList[6]
.projectName,
),
),
flex: 0,
),
],
),
],
)),
);
}),
),
),
],
),
)
@ -347,4 +105,3 @@ class NearestEr extends StatelessWidget {
);
}
}

@ -19,6 +19,8 @@ class CardPosition extends StatelessWidget {
final latitude;
final longitude;
final projectname;
final cardSize;
const CardPosition(
{
@required this.image,
@ -30,6 +32,7 @@ class CardPosition extends StatelessWidget {
@required this.latitude,
@required this.longitude,
@required this.projectname ,
@required this.cardSize ,
});
@override
@ -40,17 +43,17 @@ class CardPosition extends StatelessWidget {
},
child: Container(
width:MediaQuery.of(context).size.width * 0.47,//165,
margin: EdgeInsets.fromLTRB(7.0, 7.0, 7.0, 7.0),
// width:MediaQuery.of(context).size.width * 0.47,//165,
margin: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 8.0),
decoration: BoxDecoration(boxShadow: [
BoxShadow(color: Colors.grey[400], blurRadius: 2.0, spreadRadius: 0.0)
], borderRadius: BorderRadius.circular(10), color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
height: cardSize * 0.2 - 8,
margin: EdgeInsets.fromLTRB(8.0, 8.0, 8.0, 0.0),
child: Text(this.text,
overflow: TextOverflow.clip,
style: TextStyle(
@ -59,12 +62,14 @@ class CardPosition extends StatelessWidget {
fontSize: 2 * SizeConfig.textMultiplier)),
),
Container(
height: cardSize * 0.5 - 8,
alignment: Alignment.center,
margin: EdgeInsets.fromLTRB(0.0, 0.0, 10.0, 8.0),
child: Image.asset(this.image, width: 60.0, height: 60.0),
margin: EdgeInsets.fromLTRB(0.0, 0.0, 8.0, 8.0),
child: Image.asset(this.image, width: 60.0, height: cardSize * 0.4),
),
Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
margin: EdgeInsets.fromLTRB(8.0, 0.0, 8.0, 0.0),
height: cardSize * 0.2 - 8,
child: Text(this.subText,
overflow: TextOverflow.clip,
style: TextStyle(

@ -73,8 +73,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorColor: Colors.red[800],
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),

@ -8,6 +8,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
@ -417,27 +418,26 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.13,
height: MediaQuery.of(context).size.height * 0.09,
width: double.infinity,
padding: EdgeInsets.all(8.0),
padding: EdgeInsets.all(15.0),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.1,
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
height: MediaQuery.of(context).size.height * 0.8,
child: SecondaryButton(
label: TranslationBase.of(context).send,
loading: model.state == ViewState.BusyLocal,
disabled: (titleController.text.toString().isEmpty || messageController.text.toString().isEmpty|| messageType == MessageType.NON),
onTap: () {
final form = formKey.currentState;
if (form.validate()) if (messageType != MessageType.NON)
model
.sendCOCItem(
if (form.validate())
if (messageType != MessageType.NON){
GifLoaderDialogUtils.showMyDialog(context);
model.sendCOCItem(
title: titleController.text,
attachment: images.length > 0 ? images[0] : "",
details: messageController.text,
cOCTypeName: getCOCName(),
appointHistory:messageType ==
MessageType.ComplaintOnAnAppointment
appointHistory:messageType == MessageType.ComplaintOnAnAppointment
? appointHistory
: null)
.then((value) {
@ -448,12 +448,14 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
images = [];
});
setMessageType(MessageType.NON);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(
message: TranslationBase.of(context).yourFeedback);
} else {
AppToast.showErrorToast(message: model.error);
GifLoaderDialogUtils.hideDialog(context);
}
});
});}
else {
AppToast.showErrorToast(message: TranslationBase.of(context).selectPart);
}

@ -1,7 +1,7 @@
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/viewModels/dashboard_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/cmc_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/home_health_care_index_page.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/all_habib_medical_service_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/contact_us_page.dart';
@ -73,7 +73,7 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[
Expanded(
child: Container(
height: 120,
height: 125,
padding: EdgeInsets.all(5),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
@ -87,72 +87,50 @@ class _HomePageState extends State<HomePage> {
borderRadius: BorderRadius.all(
Radius.circular(5))),
child: Container(
margin: EdgeInsets.only(top: 10.0),
child: Column(
children: <Widget>[
Text("COVID-19 TEST",
style: TextStyle(
color: Colors.white,
fontWeight:
FontWeight.bold,
fontSize: 18.0)),
Texts(TranslationBase.of(context).covidTest,
color: Colors.white,
fontWeight: FontWeight.w700,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Container(
margin: EdgeInsets.only(
top: 15.0, left: 3.5, right: 3.5),
top: 15.0,),
child: SvgPicture.asset(
'assets/images/new-design/covid-19-car.svg',
width: 45.0,
height: 45.0),
),
Container(
margin: EdgeInsets.only(
left: 10.0,
top: 10.0),
margin: EdgeInsets.only(top: 5.0),
child: Column(
children: <Widget>[
Text("Drive-Thru",
style: TextStyle(
color: Colors
.white,
fontWeight:
FontWeight
.bold,
fontSize:
16.0)),
Texts(TranslationBase.of(context).driveThru,
fontWeight: FontWeight.w700,
color: Colors.white,),
ButtonTheme(
shape:
RoundedRectangleBorder(
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius
.circular(
5.0),
),
minWidth: MediaQuery.of(
context)
.size
.width *
0.15,
BorderRadius.circular(5.0),),
minWidth: MediaQuery.of(context).size.width * 0.15,
height: 25.0,
child: RaisedButton(
color: Colors
.red[800],
textColor:
Colors.white,
disabledTextColor:
Colors.white,
disabledColor:
new Color(
0xFFbcc2c4),
color: Colors.red[800],
textColor: Colors.white,
disabledTextColor: Colors.white,
disabledColor: new Color(0xFFbcc2c4),
onPressed: () {
navigateToCovidDriveThru();
},
child: Text(
"BOOK NOW",
style: TextStyle(
fontSize:
12.0)),
child: Texts(
TranslationBase.of(context).bookNow,
fontWeight: FontWeight.w700,
color: Colors.white,
),
),
),
],
@ -170,7 +148,7 @@ class _HomePageState extends State<HomePage> {
onTap: () => Navigator.push(context,
FadePage(page: LiveCareHome())),
child: Container(
height: 120,
height: 125,
padding: EdgeInsets.all(15),
margin: EdgeInsets.all(5),
decoration: BoxDecoration(
@ -193,7 +171,7 @@ class _HomePageState extends State<HomePage> {
],
),
),
Container(width: double.infinity, height: 80)
Container(width: double.infinity, height:projectViewModel.isArabic ?110: 80)
],
),
Positioned(
@ -208,7 +186,7 @@ class _HomePageState extends State<HomePage> {
Orientation.landscape
? 0.02
: 0.03),
child: (!model.isLogin && projectViewModel.user == null)
child: (!model.isLogin)
? Container(
width: double.infinity,
height: 125,
@ -229,17 +207,15 @@ class _HomePageState extends State<HomePage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
height: 2,
),
Texts(
TranslationBase.of(context).myMedicalFile,
color: Colors.black87,
bold: true,
fontWeight: FontWeight.w700,
fontSize: 23,
),
SizedBox(
height: 5,
),
Texts(
TranslationBase.of(context)
.myMedicalFileSubTitle,
@ -248,14 +224,14 @@ class _HomePageState extends State<HomePage> {
),
Align(
alignment: projectViewModel.isArabic
? Alignment.bottomRight
: Alignment.bottomLeft,
? Alignment.bottomLeft
: Alignment.bottomRight,
child: InkWell(
onTap: () {
widget.goToMyProfile();
},
child: Container(
margin: EdgeInsets.all(2),
margin: EdgeInsets.only(left: 15,right: 15),
width: 90,
height: 30,
decoration: BoxDecoration(
@ -265,13 +241,13 @@ class _HomePageState extends State<HomePage> {
color: Colors.transparent,
width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(9)),
Radius.circular(0)),
),
child: Center(
child: Texts(
TranslationBase.of(context)
.viewMore,
TranslationBase.of(context).viewMore,
color: Colors.white,
fontWeight: FontWeight.w700,
fontSize: 12,
),
),
@ -284,7 +260,7 @@ class _HomePageState extends State<HomePage> {
)
: Container(
width: double.infinity,
height: 130,
height: projectViewModel.isArabic ? 160:130,
decoration: BoxDecoration(
color: HexColor('#A59E9E'),
shape: BoxShape.rectangle,
@ -303,7 +279,7 @@ class _HomePageState extends State<HomePage> {
children: <Widget>[
Row(
children: <Widget>[
if (model.user != null)
if (projectViewModel.user != null && model.isLogin)
Expanded(
child: Column(
crossAxisAlignment:
@ -368,13 +344,9 @@ class _HomePageState extends State<HomePage> {
],
),
Row(
//crossAxisAlignment: CrossAxisAlignment.center,
//mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(
'assets/images/height_icon.png',
@ -384,6 +356,7 @@ class _HomePageState extends State<HomePage> {
Texts(
"${model.heightCm}",
color: Colors.white,
fontSize: 17,
)
],
),
@ -393,8 +366,6 @@ class _HomePageState extends State<HomePage> {
),
Expanded(
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Image.asset(
'assets/images/weight_icon.png',
@ -404,6 +375,7 @@ class _HomePageState extends State<HomePage> {
Texts(
'${model.weightKg}',
color: Colors.white,
fontSize: 17
)
],
),
@ -467,12 +439,11 @@ class _HomePageState extends State<HomePage> {
height: 3,
),
Texts(
TranslationBase.of(context)
.homeHealthCareService,
TranslationBase.of(context).homeHealthCareService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: SizeConfig.textMultiplier * 1.7,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
),
@ -503,8 +474,8 @@ class _HomePageState extends State<HomePage> {
TranslationBase.of(context).onlinePharmacy,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: SizeConfig.textMultiplier * 1.7,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
),
@ -519,7 +490,7 @@ class _HomePageState extends State<HomePage> {
Navigator.push(
context,
FadePage(
page: CMCIndexPage(),
page: CMCPage(),
),
);
},
@ -540,8 +511,8 @@ class _HomePageState extends State<HomePage> {
TranslationBase.of(context).emergencyService,
textAlign: TextAlign.center,
color: Colors.white,
bold: true,
fontSize: SizeConfig.textMultiplier * 1.7,
fontWeight: FontWeight.w700,
fontSize: SizeConfig.textMultiplier * 1.55,
)
],
),
@ -811,10 +782,8 @@ class DashboardItem extends StatelessWidget {
onTap: onTap,
child: Container(
width: width != null ? width : MediaQuery.of(context).size.width * 0.29,
height: height != null
? height
: MediaQuery.of(context).orientation == Orientation.portrait
? MediaQuery.of(context).size.height * 0.19
height: height != null ? height : MediaQuery.of(context).orientation == Orientation.portrait
? MediaQuery.of(context).size.height * 0.17
: MediaQuery.of(context).size.height * 0.35,
decoration: BoxDecoration(
color: !hasBorder

@ -238,15 +238,13 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.13,
height: MediaQuery.of(context).size.height * 0.10,
width: double.infinity,
padding: EdgeInsets.all(12),
padding: EdgeInsets.all(18),
child: SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).submit,
disabled: amount.isEmpty ||
_fileTextController.text.isEmpty ||
_selectedHospital == null,
disabled: amount.isEmpty || _fileTextController.text.isEmpty || _selectedHospital == null,
onTap: () {
var mobileNum;
var patientName;

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../../Constants.dart';
import '../advance_payment_page.dart';
class SelectBeneficiaryDialog extends StatefulWidget {
@ -45,7 +46,7 @@ class _SelectBeneficiaryDialogState extends State<SelectBeneficiaryDialog> {
leading: Radio(
value: BeneficiaryType.MyAccount,
groupValue: beneficiaryType,
activeColor: Color(0xFF40ACC9),
activeColor: secondaryColor,
onChanged: (BeneficiaryType value) {
setState(() {
beneficiaryType = value;

@ -4,6 +4,8 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../../Constants.dart';
class SelectHospitalDialog extends StatefulWidget {
final List<HospitalsModel> hospitals;
final Function(HospitalsModel) onValueSelected;
@ -54,7 +56,7 @@ class _SelectHospitalDialogState extends State<SelectHospitalDialog> {
leading: Radio(
value: widget.hospitals[index],
groupValue: widget.selectedHospital,
activeColor: Color(0xFF40ACC9),
activeColor: secondaryColor,
onChanged: (value) {
setState(() {
widget.selectedHospital = value;

@ -4,6 +4,8 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../../Constants.dart';
class SelectPatientFamilyDialog extends StatefulWidget {
final List<GetAllSharedRecordsByStatusList> getAllSharedRecordsByStatusList;
final Function(GetAllSharedRecordsByStatusList) onValueSelected;
@ -53,7 +55,7 @@ class _SelectPatientFamilyDialogState extends State<SelectPatientFamilyDialog> {
leading: Radio(
value: widget.getAllSharedRecordsByStatusList[index],
groupValue: widget.selectedPatientFamily,
activeColor: Colors.red[800],
activeColor: secondaryColor,
onChanged: (value) {
setState(() {
widget.selectedPatientFamily = value;

@ -6,6 +6,8 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import '../../../../Constants.dart';
class SelectPatientInfoDialog extends StatefulWidget {
final List<PatientInfo> patientInfoList ;
final Function(PatientInfo) onValueSelected;
@ -55,7 +57,7 @@ class _SelectPatientInfoDialogState extends State<SelectPatientInfoDialog> {
leading: Radio(
value: widget.patientInfoList[index],
groupValue: widget.selectedPatientInfo,
activeColor: Colors.red[800],
activeColor: secondaryColor,
onChanged: (value) {
setState(() {
widget.selectedPatientInfo = value;

@ -74,7 +74,7 @@ class _EyeHomePageState extends State<EyeHomePage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0),

@ -70,7 +70,7 @@ class _WeightHomePageState extends State<WeightHomePage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
labelColor: Theme.of(context).primaryColor,
labelPadding:

@ -73,7 +73,7 @@ class _BloodPressureHomePageState extends State<BloodPressureHomePage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0),

@ -74,7 +74,7 @@ class _BloodSugarHomePageState extends State<BloodSugarHomePage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0),

@ -71,12 +71,12 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.9,
width: MediaQuery.of(context).size.width * 0.92,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.7),
width: 0.9), //width: 0.7
),
color: Colors.white),
child: Center(
@ -84,10 +84,10 @@ class _HomePrescriptionsPageState extends State<HomePrescriptionsPage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(

@ -2,10 +2,12 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_monthly_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/input/custom_switch.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
@ -19,6 +21,8 @@ class MonthlyReportsPage extends StatefulWidget {
class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
bool isAgree = false;
bool isSummary = false;
String email = "";
final formKey = GlobalKey<FormState>();
@override
Widget build(BuildContext context) {
@ -29,135 +33,161 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
body: SingleChildScrollView(
child: Container(
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.all(9),
height: 55,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
shape: BoxShape.rectangle,
border: Border.all(color: Colors.grey)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context).patientHealthSummaryReport,
bold: true,
),
CustomSwitch(
value: isSummary,
activeColor: Colors.red,
inactiveColor: Colors.grey,
onChanged: () async {
setState(() {
isSummary = !isSummary;
});
},
)
],
child: Form(
key: formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.all(9),
height: 55,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(8)),
shape: BoxShape.rectangle,
border: Border.all(color: Colors.grey)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
TranslationBase.of(context).patientHealthSummaryReport,
bold: true,
),
CustomSwitch(
value: isSummary,
activeColor: Colors.red,
inactiveColor: Colors.grey,
onChanged: () async {
setState(() {
isSummary = !isSummary;
});
if(!isSummary) {
GifLoaderDialogUtils.showMyDialog(context);
await model.updatePatientHealthSummaryReport(
message: TranslationBase
.of(context)
.updateSuccessfully, isSummary: isSummary);
GifLoaderDialogUtils.hideDialog(context);
}
},
)
],
),
),
),
SizedBox(
height: 15,
),
Container(
margin: EdgeInsets.all(8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(
model.user.emailAddress,
bold: true,
),
],
SizedBox(
height: 15,
),
),
Divider(
height: 10.4,
thickness: 1.0,
),
SizedBox(
height: 15,
),
Container(
margin: EdgeInsets.all(8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
Container(
margin: EdgeInsets.all(8),
child: TextFields(
fillColor: Colors.red,
hintText: 'email@email.com',
fontSize: 20,
initialValue: model.user.emailAddress,
fontWeight: FontWeight.w600,
onChanged: (text) {
email = text;
},
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).enterEmail;
else
return null;
},
),
),
Divider(
height: 10.4,
thickness: 1.0,
),
SizedBox(
height: 15,
),
Container(
margin: EdgeInsets.all(8),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Texts(TranslationBase.of(context)
.toViewTheTermsAndConditions),
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: UserAgreementContent(),
),
);
},
child: Texts(
TranslationBase.of(context).clickHere,
color: Colors.blue,
),
)
],
),
),
SizedBox(
height: 5,
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Expanded(
child: Texts(TranslationBase.of(context)
.toViewTheTermsAndConditions),
),
InkWell(
onTap: () {
Navigator.push(
context,
FadePage(
page: UserAgreementContent(),
),
);
Checkbox(
value: isAgree,
onChanged: (value) {
setState(() {
isAgree = !isAgree;
});
},
child: Texts(
TranslationBase.of(context).clickHere,
color: Colors.blue,
),
)
activeColor: Colors.red,
),
Texts(TranslationBase.of(context).iAgreeToTheTermsAndConditions),
],
),
),
SizedBox(
height: 5,
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Checkbox(
value: isAgree,
onChanged: (value) {
setState(() {
isAgree = !isAgree;
});
Container(
margin: EdgeInsets.all(8),
width: double.infinity,
child: SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).save,
disabled: (!isAgree || !isSummary ),
onTap: () async {
final form = formKey.currentState;
if (form.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
await model.updatePatientHealthSummaryReport(
message: TranslationBase
.of(context)
.updateSuccessfully,
isSummary: isSummary,
isUpdateEmail: true,
email: email.isNotEmpty ? email : model.user
.emailAddress);
GifLoaderDialogUtils.hideDialog(context);
}
},
activeColor: Colors.red,
),
Texts(TranslationBase.of(context)
.iAgreeToTheTermsAndConditions),
],
),
Container(
margin: EdgeInsets.all(8),
width: double.infinity,
child: SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).save,
disabled: !isAgree,
loading: model.state == ViewState.BusyLocal,
onTap: () {
model.updatePatientHealthSummaryReport(
message: TranslationBase.of(context)
.updateSuccessfully,
isSummary: isSummary);
},
),
),
Padding(
padding: const EdgeInsets.all(5.0),
child: Texts(
TranslationBase.of(context)
.iAgreeToTheTermsAndConditionsSubtitle,
fontWeight: FontWeight.normal,
Padding(
padding: const EdgeInsets.all(5.0),
child: Texts(
TranslationBase.of(context)
.instructionAgree,
fontWeight: FontWeight.normal,
),
),
SizedBox(
height: 12,
),
),
SizedBox(
height: 12,
),
Center(child: Image.asset('assets/images/report.jpg'))
],
Center(child: Image.asset('assets/images/report.jpg'))
],
),
),
),
),

@ -101,7 +101,7 @@ class _HomeReportPageState extends State<HomeReportPage>
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Theme.of(context).primaryColor,
unselectedLabelColor: Colors.grey[800],
tabs: [

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/vital_sign/vital_sign_res_model.dart';
import 'package:diplomaticquarterapp/pages/medical/vital_sign/vital_sign_details_wideget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/charts/app_time_series_chart.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:flutter/material.dart';

@ -74,7 +74,7 @@ class PaymentService extends StatelessWidget {
),
),
),
if(!projectViewModel.havePrivilege(33))
//if(!projectViewModel.havePrivilege(33))
Expanded(
child: InkWell(
onTap: () => navigateToToDoPage(context),
@ -117,7 +117,7 @@ class PaymentService extends StatelessWidget {
)
],
),
if(!projectViewModel.havePrivilege(33))
// if(!projectViewModel.havePrivilege(33))
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
@ -136,12 +136,12 @@ class PaymentService extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(
'My Balances',
TranslationBase.of(context).hmg,
color: HexColor('#B61422'),
bold: true,
),
Texts(
TranslationBase.of(context).payment,
TranslationBase.of(context).wallet,
fontSize: 14,
fontWeight: FontWeight.normal,
),

@ -28,7 +28,6 @@ class CartOrderPage extends StatelessWidget {
child: AppScaffold(
appBarTitle: TranslationBase.of(context).shoppingCart,
isShowAppBar: true,
isShowDecPage: false,
isPharmacy: true,
baseViewModel: model,
backgroundColor: Colors.white,

@ -208,8 +208,8 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
}
},
label: TranslationBase.of(context).submit,
disabled: model.state == ViewState.BusyLocal,
loading: model.state == ViewState.BusyLocal,
disabled: (model.state == ViewState.Busy || rating==0),
// loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
),
SizedBox(

@ -206,7 +206,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
}
},
label: TranslationBase.of(context).next,
disabled: model.state == ViewState.BusyLocal|| rating==0,
disabled: (model.state == ViewState.BusyLocal || rating==0),
loading: model.state == ViewState.BusyLocal,
textColor: Theme.of(context).backgroundColor),
),

@ -4,7 +4,7 @@ import 'package:intl/intl.dart';
class DateUtil {
/// convert String To Date function
/// [date] String we want to convert
static DateTime convertStringToDate(String date) {
static DateTime convertStringToDate(String date) { // /Date(1585774800000+0300)/
if (date != null) {
const start = "/Date(";
const end = "+0300)";

@ -582,6 +582,8 @@ class TranslationBase {
localizedValues['UpdateSuccessfully'][locale.languageCode];
String get emailSentSuccessfully =>
localizedValues['EmailSentSuccessfully'][locale.languageCode];
String get EmailSentError =>
localizedValues['EmailSentError'][locale.languageCode];
String get checkVaccineAvailability =>
localizedValues['CHECK_VACCINE_AVAILABILITY'][locale.languageCode];
String get myVaccinesAvailability =>
@ -1043,7 +1045,7 @@ class TranslationBase {
String get selectAmbulate =>
localizedValues['select-ambulate'][locale.languageCode];
String get wheelchair => localizedValues['wheelchair'][locale.languageCode];
String get walker => localizedValues['walker"'][locale.languageCode];
String get walker => localizedValues['walker'][locale.languageCode];
String get stretcher => localizedValues['stretcher'][locale.languageCode];
String get none => localizedValues['none'][locale.languageCode];
String get RRTSummary => localizedValues['RRT-Summary'][locale.languageCode];
@ -1173,6 +1175,7 @@ class TranslationBase {
String get infoInsurCards => localizedValues['info-insur-cards'][locale.languageCode];
String get scanNow => localizedValues['scan-now'][locale.languageCode];
String get pharmacyServiceTermsCondition => localizedValues['pharmacyServiceTermsCondition'][locale.languageCode];
String get recordDeleted => localizedValues['recordDeleted'][locale.languageCode];
String get referralStatus =>
localizedValues['referralStatus'][locale.languageCode];
@ -1215,7 +1218,6 @@ class TranslationBase {
String get viewListChildren =>
localizedValues['view-list-children'][locale.languageCode];
String get addChild => localizedValues['add-child'][locale.languageCode];
String get childName => localizedValues['child-name'][locale.languageCode];
String get childDob => localizedValues['childDob'][locale.languageCode];
String get deletedChildMes =>
localizedValues['deleted-child-mes'][locale.languageCode];
@ -1244,7 +1246,24 @@ class TranslationBase {
localizedValues['termOfService'][locale.languageCode];
String get shoppingCart =>
localizedValues['shoppingCart'][locale.languageCode];
String get covidTest => localizedValues['covidTest'][locale.languageCode];
String get driveThru => localizedValues['driveThru'][locale.languageCode];
String get NearestErDesc => localizedValues['NearestErDesc'][locale.languageCode];
String get NearestEr => localizedValues['NearestEr'][locale.languageCode];
String get infoCMC => localizedValues['infoCMC'][locale.languageCode];
String get instructionAgree => localizedValues['instructionAgree'][locale.languageCode];
String get reqId => localizedValues['reqId'][locale.languageCode];
String get covid19_driveThrueTest => localizedValues['covid19_driveThrueTest'][locale.languageCode];
String get eReferral => localizedValues['E-Referral'][locale.languageCode];
String get vaccination => localizedValues["vaccination"][locale.languageCode];
String get msg_email_address_up_to_date => localizedValues["msg_email_address_up_to_date"][locale.languageCode];
String get updateEmailMsg => localizedValues["update-email-msg"][locale.languageCode];
String get childName => localizedValues["childName"][locale.languageCode];
String get addNewChild => localizedValues["add-new-child"][locale.languageCode];
String get sendChildEmailMsg => localizedValues["send-child-email-msg"][locale.languageCode];
String get vaccinationAddChildMsg => localizedValues["vaccination-add-child-msg"][locale.languageCode];
String get childAddedSuccessfully => localizedValues["child_added_successfully"][locale.languageCode];
}

@ -23,7 +23,7 @@ class SecondaryButton extends StatefulWidget {
this.icon,
this.iconOnly = false,
this.color ,
this.textColor,
this.textColor = Colors.white,
this.onTap,
this.loading: false,
this.small = false,

@ -26,7 +26,6 @@ class MedicalProfileItem extends StatelessWidget {
showBorder: true,
borderWidth: 0,
margin: 4,
height: 120,
child: Container(
padding: EdgeInsets.all(10),
child: Column(

@ -0,0 +1,139 @@
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
// ignore: must_be_immutable
class SelectLocationDialog extends StatefulWidget {
final List<AddressInfo> addresses;
final Function(AddressInfo) onValueSelected;
AddressInfo selectedAddress;
SelectLocationDialog(
{Key key, this.addresses, this.onValueSelected, this.selectedAddress});
@override
_SelectLocationDialogState createState() => _SelectLocationDialogState();
}
class _SelectLocationDialogState extends State<SelectLocationDialog> {
@override
void initState() {
super.initState();
widget.selectedAddress = widget.selectedAddress ?? widget.addresses[0];
}
@override
Widget build(BuildContext context) {
return SimpleDialog(
title: Texts(TranslationBase.of(context).selectAddress),
children: [
Column(
children: [
Container(
height: 150,
child: SingleChildScrollView(
child: Column(
children: [
Divider(),
...List.generate(
widget.addresses.length,
(index) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 2,
),
Row(
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
setState(() {
widget.selectedAddress = widget.addresses[index];
});
},
child: ListTile(
title: Text(widget.addresses[index].address1),
leading: Radio(
value: widget.addresses[index],
groupValue: widget.selectedAddress,
activeColor: Colors.red[800],
onChanged: (value) {
setState(() {
widget.selectedAddress = value;
});
},
),
),
),
)
],
),
SizedBox(
height: 5.0,
),
],
),
),
SizedBox(
height: 5.0,
),
],
),
),
),
Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
flex: 1,
child: InkWell(
onTap: () {
Navigator.pop(context);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child: Center(
child: Texts(
TranslationBase.of(context).cancel.toUpperCase(),
color: Colors.red,
),
),
),
),
),
),
Container(
width: 1,
height: 30,
color: Colors.grey[500],
),
Expanded(
flex: 1,
child: InkWell(
onTap: () {
widget.onValueSelected(widget.selectedAddress);
Navigator.pop(context);
},
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
TranslationBase.of(context).ok,
fontWeight: FontWeight.w400,
)),
),
),
),
],
)
],
)
],
);
}
}

@ -46,8 +46,7 @@ class TextFields extends StatefulWidget {
this.suffixIcon,
this.autoFocus,
this.onChanged,
// this.initialValue,
this.initialValue,
this.minLines,
this.maxLines,
this.inputFormatters,
@ -78,8 +77,7 @@ class TextFields extends StatefulWidget {
: super(key: key);
final String hintText;
// final String initialValue;
final String initialValue;
final String type;
final bool autoFocus;
final IconData suffixIcon;
@ -230,7 +228,7 @@ class _TextFieldsState extends State<TextFields> {
minLines: widget.minLines ?? 1,
maxLines: widget.maxLines ?? 1,
maxLengthEnforced: widget.maxLengthEnforced,
// initialValue: widget.initialValue,
initialValue: widget.initialValue,
onChanged: widget.onChanged,
focusNode: _focusNode,
maxLength: widget.maxLength ?? null,

@ -84,6 +84,7 @@ class AppScaffold extends StatelessWidget {
isShowDecPage: isShowDecPage,
image: image,
):null,
bottomSheet: bottomSheet,
body: (!Provider.of<ProjectViewModel>(context, listen: false).isLogin &&
isShowDecPage)
? NotAutPage(

@ -108,7 +108,7 @@ class _NotAutPageState extends State<NotAutPage> {
builder: (BuildContext context){
return SizedBox(
width: MediaQuery.of(context).size.width * 0.50,
child: Image.network(projectViewModel.isArabic ? image.imageAr : image.imageEn));
child: image.isAsset? Image.asset(projectViewModel.isArabic ? image.imageAr : image.imageEn) : Image.network(projectViewModel.isArabic ? image.imageAr : image.imageEn));
},
);
}).toList(),

Loading…
Cancel
Save