CR Implemented

dev_3.3_AmbulanceRequestCR
haroon amjad 11 months ago
parent b579e494c1
commit a0bca92195

@ -20,8 +20,8 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
@ -337,7 +337,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 11.1;
var VERSION_ID = 11.3;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;

@ -326,7 +326,7 @@ const Map localizedValues = {
"nearester": {"en": "Nearest ER", "ar": "أقرب طوارى"},
"locationa": {"en": "Location", "ar": "الموقع"},
"call_now": {"en": "Call now", "ar": "اتصل الان"},
"ambulancerequest": {"en": "Ambulance", "ar": "خدمات النقل "},
"ambulancerequest": {"en": "Ambulance", "ar": "طلب النقل "},
"requestA": {"en": "Request", "ar": "الاسعافي"},
"NoBookedAppointments": {"en": "No Booked Appointments", "ar": "لا توجد مواعيد محجوزة"},
"NoConfirmedAppointments": {"en": "No Confirmed Appointments", "ar": "لا توجد مواعيد مؤكدة"},
@ -1338,7 +1338,7 @@ const Map localizedValues = {
"covid-alert-header": {"en": "Pay With-in 15 mins to confirm the appointment", "ar": "الرجاء اتمام عملية الدفع خلال 15 دقيقه لتاكيد الموعد"},
"covid-alert-info": {
"en": "Payment for Covid-19 Test should Be made with-in 15 mins otherwise The system will Cancel the Scheduled appointment automatically",
"ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة"
"ar": "سيتم الغاء الموعد عن طريق النظام بشكل الي في حال عدم اتمام عمليه الدفع خلال 15 دقيقة"
},
"covid-alert-mins": {"en": "Pay With-in 15 mins", "ar": "ادفع خلال 15 دقيقة"},
"back": {"en": "Back", "ar": "رجوع"},
@ -1901,4 +1901,5 @@ const Map localizedValues = {
"habibCallCenter": {"en": "Please contact AlHabib call center to update your insurance manually.", "ar": "يرجى الاتصال بمركز اتصال الحبيب لتحديث التأمين الخاص بك يدوياً."},
"cashAmountUpdateInsurance": {"en": "Please note that this is the cash amount, If you want to update your insurance, Please tap below:", "ar": "يرجى ملاحظة أن هذا هو المبلغ النقدي، إذا كنت ترغب في تحديث التأمين الخاص بك، يرجى النقر أدناه:"},
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
"contactRRT": {"en": "Contact RRT", "ar": "تواصل مع فريق الاستجابة السريعة"},
};

@ -219,9 +219,12 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
TranslationBase.of(context).pickupLocation + ": ",
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
Text(
order.pickupLocation.trim().toString(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
Container(
width: MediaQuery.of(context).size.width * 0.7,
child: Text(
order.pickupLocation.trim().toString(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
),
),
],
),
@ -352,12 +355,13 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
BillAmount(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,
patientER_RC: _patientER_RC,
amRequestViewModel: widget.amRequestViewModel,
),
Container(),
// BillAmount(
// changeCurrentTab: _changeCurrentTab,
// patientER: _patientER,
// patientER_RC: _patientER_RC,
// amRequestViewModel: widget.amRequestViewModel,
// ),
Summary(
changeCurrentTab: _changeCurrentTab,
patientER: _patientER,

@ -6,12 +6,14 @@ import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.da
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/ambulanceRequest/locationDetails.dart';
import 'package:diplomaticquarterapp/theme/colors.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/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/location_util.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/radio_selection_dialog.dart';
@ -496,13 +498,39 @@ class _PickupLocationState extends State<PickupLocation> {
),
],
),
// SizedBox(
// height: 45,
// ),
// if (myAppointment != null)
// SizedBox(
// height: 100,
// ),
Container(
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar + (widget.patientER_RC.transportationDetails.tripType == 1 ? ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}' : ' ${(widget.patientER_RC.patientERTransportationMethod.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
],
)
],
),
),
SizedBox(
height: 45,
height: 100,
),
if (myAppointment != null)
SizedBox(
height: 100,
),
],
),
),
@ -510,62 +538,85 @@ class _PickupLocationState extends State<PickupLocation> {
bottomSheet: Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0),
child: DefaultButton(
TranslationBase.of(context).next,
() {
if (_result == null || _selectedHospital == null)
AppToast.showErrorToast(message: TranslationBase.of(context).selectAll);
else
setState(() {
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER_RC.transportationDetails.direction == 0) {
// To Hospital
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
} else {
// From Hospital
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6);
}
child: Row(
children: [
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).back,
() {
widget.changeCurrentTab(0);
},
),
),
SizedBox(width: 12.0),
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).next,
() {
if (_result == null || _selectedHospital == null)
AppToast.showErrorToast(message: TranslationBase.of(context).selectAll);
else
setState(() {
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
if (widget.patientER_RC.transportationDetails.direction == 0) {
// To Hospital
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
} else {
// From Hospital
widget.patientER_RC.transportationDetails.pickupLatitude = _selectedHospital.latitude;
widget.patientER_RC.transportationDetails.pickupLongitude = _selectedHospital.longitude;
widget.patientER_RC.transportationDetails.dropoffLatitude = _result.lat.toStringAsFixed(6);
widget.patientER_RC.transportationDetails.dropoffLongitude = _result.long.toStringAsFixed(6);
}
widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _result.formattedAddress : _selectedHospital.name;
widget.patientER_RC.transportationDetails.dropoffLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _result.formattedAddress : _selectedHospital.name;
widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo;
widget.patientER_RC.transportationDetails.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now());
widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _selectedHospital.name : _result.formattedAddress;
widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID;
widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID;
widget.patientER_RC.transportationDetails.requesterIsOutSA = false;
widget.patientER_RC.transportationDetails.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber;
widget.patientER_RC.transportationDetails.requesterFileNo = widget.amRequestViewModel.user.patientID;
widget.patientER_RC.patientIdentificationID = widget.amRequestViewModel.user.patientIdentificationNo;
widget.patientER_RC.transportationDetails.pickupDateTime = DateUtil.convertDateToStringLocation(DateTime.now());
widget.patientER_RC.transportationDetails.pickupLocationName = widget.patientER_RC.transportationDetails.direction == 1 ? _selectedHospital.name : _result.formattedAddress;
widget.patientER_RC.projectID = widget.amRequestViewModel.user.projectID;
widget.patientER_RC.patientID = widget.amRequestViewModel.user.patientID;
widget.patientER_RC.transportationDetails.requesterIsOutSA = false;
widget.patientER_RC.transportationDetails.requesterMobileNo = widget.amRequestViewModel.user.mobileNumber;
widget.patientER_RC.transportationDetails.requesterFileNo = widget.amRequestViewModel.user.patientID;
if (_haveAppointment == HaveAppointment.YES) {
widget.patientER_RC.transportationDetails.appointmentNo = myAppointment.appointmentNo.toString();
widget.patientER_RC.transportationDetails.appointmentClinicName = myAppointment.clinicName;
widget.patientER_RC.transportationDetails.appointmentDoctorName = myAppointment.doctorNameObj;
widget.patientER_RC.transportationDetails.appointmentBranch = myAppointment.projectName;
widget.patientER_RC.transportationDetails.appointmentTime = myAppointment.appointmentDate;
widget.patientER_RC.transportationDetails.haveAppointment = 1;
widget.patientER_RC.transportationDetails.dropoffLatitude = myAppointment.latitude;
widget.patientER_RC.transportationDetails.dropoffLongitude = myAppointment.longitude;
widget.patientER_RC.transportationDetails.dropoffLocationName = myAppointment.projectName;
} else {
widget.patientER_RC.transportationDetails.appointmentNo = "0";
widget.patientER_RC.transportationDetails.appointmentClinicName = "";
widget.patientER_RC.transportationDetails.appointmentDoctorName = "";
widget.patientER_RC.transportationDetails.appointmentBranch = "";
widget.patientER_RC.transportationDetails.appointmentTime = "";
widget.patientER_RC.transportationDetails.haveAppointment = 0;
}
if (_haveAppointment == HaveAppointment.YES) {
widget.patientER_RC.transportationDetails.appointmentNo = myAppointment.appointmentNo.toString();
widget.patientER_RC.transportationDetails.appointmentClinicName = myAppointment.clinicName;
widget.patientER_RC.transportationDetails.appointmentDoctorName = myAppointment.doctorNameObj;
widget.patientER_RC.transportationDetails.appointmentBranch = myAppointment.projectName;
widget.patientER_RC.transportationDetails.appointmentTime = myAppointment.appointmentDate;
widget.patientER_RC.transportationDetails.haveAppointment = 1;
widget.patientER_RC.transportationDetails.dropoffLatitude = myAppointment.latitude;
widget.patientER_RC.transportationDetails.dropoffLongitude = myAppointment.longitude;
widget.patientER_RC.transportationDetails.dropoffLocationName = myAppointment.projectName;
} else {
widget.patientER_RC.transportationDetails.appointmentNo = "0";
widget.patientER_RC.transportationDetails.appointmentClinicName = "";
widget.patientER_RC.transportationDetails.appointmentDoctorName = "";
widget.patientER_RC.transportationDetails.appointmentBranch = "";
widget.patientER_RC.transportationDetails.appointmentTime = "";
widget.patientER_RC.transportationDetails.haveAppointment = 0;
}
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
widget.changeCurrentTab(2);
});
},
widget.patientER_RC.transportationDetails.pickupSpot = _isInsideHome ? 1 : 0;
widget.patientER_RC.transportationDetails.ambulate = 3;
widget.patientER_RC.transportationDetails.ambulateTitle = "none";
widget.patientER_RC.transportationDetails.notes = "";
widget.changeCurrentTab(3);
});
},
color: CustomColors.green,
),
),
],
),
),
);

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.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/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
@ -13,6 +14,7 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
enum Direction { ToHospital, FromHospital }
enum Way { OneWay, TwoWays }
class SelectTransportationMethod extends StatefulWidget {
@ -122,7 +124,7 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
Expanded(
flex: 1,
child: Text(
TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].price}',
TranslationBase.of(context).sar + ' ${widget.amRequestViewModel.amRequestModeList[index].priceTotal}',
style: TextStyle(
fontSize: 12.0,
letterSpacing: -0.48,
@ -231,7 +233,6 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
height: 5,
),
Container(
margin: EdgeInsets.only(bottom: 65),
child: Row(
children: [
Expanded(
@ -288,12 +289,14 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
});
},
),
Text(TranslationBase.of(context).twoDirec,
style: TextStyle(
fontSize: 12.0,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
)),
Text(
TranslationBase.of(context).twoDirec,
style: TextStyle(
fontSize: 12.0,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
],
),
),
@ -303,13 +306,36 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
],
),
),
SizedBox(
height: 30,
),
// SizedBox(
// height: 30,
// ),
],
),
Container(
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar + (_way == Way.OneWay ? ' ${_erTransportationMethod.priceTotal}' : ' ${(_erTransportationMethod.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
],
)
],
),
),
SizedBox(
height: 15,
height: 100,
),
],
),
@ -318,38 +344,55 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
bottomSheet: Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0),
child: DefaultButton(
TranslationBase.of(context).next,
() {
setState(() {
// widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0;
// widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1;
// widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.patientERTransportationMethod = _erTransportationMethod;
// widget.patientER.orderServiceID = _orderService.getIdOrderService();
// widget.patientER.pickupUrgency = 1;
// widget.patientER.lineItemNo = 1;
// widget.patientER.cost = _erTransportationMethod.price.toDouble();
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
// widget.changeCurrentTab(1);
child: Row(
children: [
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).back,
() {
Navigator.pop(context);
},
)),
SizedBox(width: 12.0),
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).next,
() {
setState(() {
// widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0;
// widget.patientER.tripType = _way == Way.TwoWays ? 0 : 1;
// widget.patientER.selectedAmbulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.patientERTransportationMethod = _erTransportationMethod;
// widget.patientER.orderServiceID = _orderService.getIdOrderService();
// widget.patientER.pickupUrgency = 1;
// widget.patientER.lineItemNo = 1;
// widget.patientER.cost = _erTransportationMethod.price.toDouble();
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
// widget.changeCurrentTab(1);
// widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 0 : 1;
widget.patientER_RC.transportationDetails.tripType = _way == Way.TwoWays ? 0 : 1;
widget.patientER_RC.transportationDetails.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.transportationType = _erTransportationMethod.iD.toString();
widget.patientER_RC.patientERTransportationMethod = _erTransportationMethod;
widget.patientER_RC.transportationDetails.pickupUrgency = 1;
// widget.patientER.orderServiceID = _orderService.getIdOrderService();
// widget.patientER.lineItemNo = 1;
// widget.patientER.cost = _erTransportationMethod.price.toDouble();
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
widget.changeCurrentTab(1);
});
},
// widget.patientER_RC.transportationDetails.id = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.direction = _direction == Direction.ToHospital ? 0 : 1;
widget.patientER_RC.transportationDetails.tripType = _way == Way.TwoWays ? 0 : 1;
widget.patientER_RC.transportationDetails.ambulate = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
widget.patientER_RC.transportationDetails.transportationType = _erTransportationMethod.iD.toString();
widget.patientER_RC.patientERTransportationMethod = _erTransportationMethod;
widget.patientER_RC.transportationDetails.pickupUrgency = 1;
// widget.patientER.orderServiceID = _orderService.getIdOrderService();
// widget.patientER.lineItemNo = 1;
// widget.patientER.cost = _erTransportationMethod.price.toDouble();
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
widget.changeCurrentTab(1);
});
},
color: CustomColors.green,
),
),
],
),
),
);

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
@ -9,6 +10,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class Summary extends StatefulWidget {
final Function changeCurrentTab;
@ -86,48 +88,89 @@ class _SummaryState extends State<Summary> {
SizedBox(
height: 8,
),
_getNormalText(TranslationBase.of(context).selectAmbulate),
_getNormalText(TranslationBase.of(context).way),
_getNormalText(
'${widget.patientER_RC.transportationDetails.ambulateTitle}',
isBold: true,
),
SizedBox(
height: 8,
),
_getNormalText(TranslationBase.of(context).notes),
_getNormalText(
'${widget.patientER_RC.transportationDetails.notes ?? '---'}',
widget.patientER_RC.transportationDetails.tripType == 0 ? TranslationBase.of(context).twoDirec : TranslationBase.of(context).oneDirec,
isBold: true,
),
SizedBox(
height: 8,
),
// // _getNormalText(TranslationBase.of(context).notes),
// // _getNormalText(
// // '${widget.patientER_RC.transportationDetails.notes ?? '---'}',
// // isBold: true,
// // ),
// SizedBox(
// height: 8,
// ),
],
),
),
SizedBox(
height: 20,
),
Text(TranslationBase.of(context).billAmount, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(
height: 5,
// SizedBox(
// height: 20,
// ),
// Text(TranslationBase.of(context).billAmount, style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
// SizedBox(
// height: 5,
// ),
Container(
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(TranslationBase.of(context).billAmount + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(TranslationBase.of(context).patientShareTotalToDo, style: TextStyle(fontSize: 13.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
Text(
TranslationBase.of(context).sar +
(widget.patientER_RC.transportationDetails.tripType == 1
? ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}'
: ' ${(widget.patientER_RC.patientERTransportationMethod.priceTotal * 2)}'),
style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold),
),
],
)
],
),
),
Container(
height: 55,
padding: EdgeInsets.all(10),
margin: EdgeInsets.only(top: 12),
decoration: cardRadius(12),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_getNormalText(TranslationBase.of(context).patientShareTotal + ':'),
Container(
padding: EdgeInsets.only(left: 20.0, right: 20.0),
child: _getNormalText(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}', isBold: true, isTotal: true)
),
Text(TranslationBase.of(context).contactRRT + " : ", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.w600)),
SizedBox(height: 16.0),
InkWell(
onTap: () {
launchUrl(
Uri.parse("tel://0115259555"),
);
},
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("0115259555", style: TextStyle(fontSize: 16.0, letterSpacing: -0.64, fontWeight: FontWeight.bold)),
Icon(
Icons.headset_mic_rounded,
size: 30.0,
)
],
),
)
],
),
),
SizedBox(height: 50),
SizedBox(height: 80),
],
),
),
@ -135,9 +178,30 @@ class _SummaryState extends State<Summary> {
bottomSheet: Container(
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0),
child: DefaultButton(TranslationBase.of(context).send, () async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
}),
child: Row(
children: [
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).back,
() {
widget.changeCurrentTab(1);
},
),
),
SizedBox(width: 12.0),
Expanded(
flex: 1,
child: DefaultButton(
TranslationBase.of(context).submit,
() async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
},
color: CustomColors.green,
),
),
],
),
),
);
}

@ -202,9 +202,12 @@ class OrderLogPage extends StatelessWidget {
TranslationBase.of(context).pickupLocation + ": ",
style: TextStyle(fontSize: 10, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
Text(
order.pickupLocation.trim().toString(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
Container(
width: MediaQuery.of(context).size.width * 0.7,
child: Text(
order.pickupLocation.trim().toString(),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, overflow: TextOverflow.clip),
),
),
],
),

@ -168,22 +168,122 @@ class RRTRequestPageState extends State<RRTRequestPage> {
String amount = selectedProcedure.patientShare.toString();
String vat = selectedProcedure.patientTaxAmount.toString();
String total = selectedProcedure.patientShareWithTax.toString();
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Container(
height: 30,
decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)),
child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))),
),
pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
],
return Container(
decoration: cardRadius(12),
padding: EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
TranslationBase.of(context).billAmount,
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.w600,
letterSpacing: -0.64,
),
),
mHeight(10),
Row(
children: [
Expanded(
child: Text(
TranslationBase.of(context).patientShareToDo,
style: TextStyle(
fontSize: 10,
letterSpacing: -0.4,
color: CustomColors.textColor,
fontWeight: FontWeight.w600,
),
),
),
Expanded(
child: Text(
'$amount ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
],
),
mHeight(4),
mDivider(CustomColors.lightGreyColor),
mHeight(4),
Row(
children: [
Expanded(
child: Text(
TranslationBase.of(context).patientTaxToDo,
style: TextStyle(
fontSize: 10,
letterSpacing: -0.4,
color: CustomColors.textColor,
fontWeight: FontWeight.w600,
),
),
),
Expanded(
child: Text(
'$vat ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 12,
letterSpacing: -0.48,
fontWeight: FontWeight.w600,
),
),
),
],
),
mHeight(4),
mDivider(CustomColors.lightGreyColor),
mHeight(4),
Row(
children: [
Expanded(
child: Text(
TranslationBase.of(context).patientShareTotalToDo,
style: TextStyle(
fontSize: 14,
letterSpacing: -0.4,
color: CustomColors.textColor,
fontWeight: FontWeight.bold,
),
),
),
Expanded(
child: Text(
'$total ${TranslationBase.of(context).sar}',
style: TextStyle(
fontSize: 14,
letterSpacing: -0.48,
fontWeight: FontWeight.bold,
),
),
),
],
),
],
),
);
// Column(
// crossAxisAlignment: CrossAxisAlignment.stretch,
// children: [
// Container(
// height: 30,
// decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)),
// child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))),
// ),
// pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'),
// Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
// pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'),
// Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
// pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true),
// Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
// ],
// );
}
Widget pricingRow({@required String label, @required String value, bool labelBold = false, bool valueBold = false}) {

@ -45,21 +45,21 @@ class StepsWidget extends StatelessWidget {
: CustomColors.grey2,
),
),
Expanded(
child: showProgress(
title: TranslationBase.of(context).otherInfo,
status: index == 2
? TranslationBase.of(context).inPrgress
: index > 2
? TranslationBase.of(context).completed
: TranslationBase.of(context).locked,
color: index == 2
? CustomColors.orange
: index > 2
? CustomColors.green
: CustomColors.grey2,
),
),
// Expanded(
// child: showProgress(
// title: TranslationBase.of(context).otherInfo,
// status: index == 2
// ? TranslationBase.of(context).inPrgress
// : index > 2
// ? TranslationBase.of(context).completed
// : TranslationBase.of(context).locked,
// color: index == 2
// ? CustomColors.orange
// : index > 2
// ? CustomColors.green
// : CustomColors.grey2,
// ),
// ),
showProgress(
title: TranslationBase.of(context).RRTSummary,
status: index == 3 ? TranslationBase.of(context).inPrgress : TranslationBase.of(context).locked,

@ -2910,6 +2910,7 @@ class TranslationBase {
String get habibCallCenter => localizedValues["habibCallCenter"][locale.languageCode];
String get cashAmountUpdateInsurance => localizedValues["cashAmountUpdateInsurance"][locale.languageCode];
String get validInsurance => localizedValues["validInsurance"][locale.languageCode];
String get contactRRT => localizedValues["contactRRT"][locale.languageCode];
}

Loading…
Cancel
Save