UI updates & fixes

merge-update-with-lab-changes
haroon amjad 4 years ago
parent 19e6954bc8
commit 46d800c0c6

@ -907,17 +907,15 @@ const Map localizedValues = {
"RRT-Summary": {"en": "Summary", "ar": "ملخص الطلب"},
"Rapid-Response-Team": {"en": "Rapid Response Team", "ar": "فريق الاستجابة السريع"},
"AmountBeforeTax": {"en": "Amount Before Tax:", "ar": "Amount Before Tax:"},
"ApproximateServiceFee": {"en": "Approximate Service Fee", "ar": "Approximate Service Fee"},
"ApproximateServiceFee": {"en": "Service fee starting from", "ar": "تبدأ رسوم الخدمة من"},
"TaxAmount": {"en": "Tax Amount:", "ar": "Tax Amount:"},
"somethingWentWrongTryLater": {"en": "Sorry something went wrong please try again later", "ar": "نعتذر لخدمتكم يرجى المحاولة لاحقا"},
"TotalAmountPayable": {"en": "Total Amount Payable:", "ar": "Total Amount Payable:"},
"iAcceptTermsConditions": {"en": "I Accept the Terms And Conditions", "ar": "You can pay by the following options:"},
"YouCanPayByTheFollowingOptions": {"en": "You can pay by the following options:", "ar": "I Accept the Terms And Conditions"},
"iAcceptTermsConditions": {"en": "I Accept the Terms And Conditions", "ar": "أوافق على الشروط والأحكام"},
"YouCanPayByTheFollowingOptions": {"en": "You can pay by the following Options:", "ar": "يمكنك الدفع عن طريق الخيارات التالية:"},
"RRTDDetails": {
"en":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home",
"ar":
"The RRT service provides medical services urgent and stable cases, not life-threatening situation or extremities and the service includes providing medical care from a complete medical team at home"
"en": "The RRT service provides medical service for urgent and stable cases, not life-threatening situations or extremities, and the service includes providing medical care from a complete medical team at home.",
"ar": "توفر خدمة فريق الاستجابة السريع RRT خدمه طبيه للحالات المستعجله والمستقره وليست الحالات المهدده للحياه او الاطراف ، وتشمل الخدمه تقديم رعايه طبيه من فريق طبي متكامل بالمنزل."
},
"rrtService": {"en": "RRT Service", "ar": "خدمة RRT"},
"bill-amount": {"en": "Bill Amount", "ar": "مبلغ الفاتورة"},
@ -1511,5 +1509,6 @@ const Map localizedValues = {
"covidBookAppo": { "en": "Booking Appointment For: ", "ar": "موعد الحجز لـ: " },
"emptySchedule": { "en": "Doctor has no schedule.", "ar": "لا يوجد جدول حضور مسجل للطبيب" },
"serviceNotAvailable": { "en": "Dear, this service is not available now, please try again later", "ar": "عزيزي المراجع, هذه الخدمة غير متوفرة الان يرجى المحاوله لاحقا"},
"doctorScheduleNot": {"en": "Doctor schedule not available", "ar": "جدول الطبيب غير متوفر"}
"doctorScheduleNot": {"en": "Doctor schedule not available", "ar": "جدول الطبيب غير متوفر"},
"RRTRequestSuccess": { "en": "Request has been sent successfully, You will be contacted soon.", "ar": "تم إرسال الطلب بنجاح ، وسيتم الاتصال بك باسرع وقت ممكن" },
};

@ -45,7 +45,7 @@ class PrescriptionsOrder {
return '$status';
}
String getFormattedDateTime()=> DateUtil.getDateFormatted(pickupDateTime);
String getFormattedDateTime()=> DateUtil.getWeekDayMonthDayYearDateFormatted(createdOn, isAppArabic ? 'ar' : 'en');
PrescriptionsOrder(
{this.iD,

@ -1,4 +1,3 @@
import 'dart:async';
import 'package:diplomaticquarterapp/config/config.dart';
@ -14,131 +13,131 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import '../base_view_model.dart';
class RRTService extends BaseService {}
class RRTService extends BaseService{
}
class _RRTServiceData{
class _RRTServiceData {
List<PrescriptionsOrder> pendingOrders = [];
List<PrescriptionsOrder> completedOrders = [];
ServicePrice servicePrice;
}
class RRTViewModel extends BaseViewModel{
class RRTViewModel extends BaseViewModel {
var _service = RRTService();
var _pharmacy_service = locator<PharmacyModuleService>();
var _pharmacy_address_service = locator<PharmacyAddressService>();
_RRTServiceData rrtServiceData = _RRTServiceData();
Future<_RRTServiceData> loadRequiredData() async{
Future<_RRTServiceData> loadRequiredData() async {
await getServicePrice();
await getAllOrders();
return rrtServiceData;
}
Future<int> createOrder(Map<String, dynamic> body) async{
Future<int> createOrder(Map<String, dynamic> body) async {
body['IdentificationNo'] = user.patientIdentificationNo;
body['NationalityID'] = user.nationalityID;
body['CreatedBy'] = user.patientIdentificationType;
body['OrderServiceID'] = 5;
var localRes;
int requestNo;
await _service.baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, body: body, onSuccess: (response, statusCode){
requestNo = response['RequestNo'];
}, onFailure: (error, statusCode){
await _service.baseAppClient.post(PATIENT_ER_INSERT_PRES_ORDER, body: body, onSuccess: (response, statusCode) {
localRes = response;
requestNo = response['RequestNo'];
}, onFailure: (error, statusCode) {
AppToast.showErrorToast(message: error);
});
return requestNo;
}
// Service ID: 4 == RRT
Future<_RRTServiceData> getAllOrders() async{
await _service.baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, body: {}, onSuccess: (response, statusCode){
Future<_RRTServiceData> getAllOrders() async {
await _service.baseAppClient.post(GET_PRESCRIPTIONS_ALL_ORDERS, body: {}, onSuccess: (response, statusCode) {
var data = response["PatientER_GetPatientAllPresOrdersList"];
if(data != null && data is List){
data.forEach((json){
if(json["ServiceID"] == 5){
if(json["Status"] == 1){ // Pending
rrtServiceData.pendingOrders.clear();
rrtServiceData.completedOrders.clear();
rrtServiceData.pendingOrders.clear();
if (data != null && data is List) {
data.forEach((json) {
if (json["ServiceID"] == 5) {
if (json["Status"] == 1 || json["Status"] == 2) {
// Pending
rrtServiceData.pendingOrders.add(PrescriptionsOrder.fromJson(json));
}else if (json["Status"] == 3){ // Completed
rrtServiceData.completedOrders.clear();
rrtServiceData.completedOrders.add(PrescriptionsOrder.fromJson(json));
}
// else if (json["Status"] == 3) {
// // Completed
// rrtServiceData.completedOrders.add(PrescriptionsOrder.fromJson(json));
// }
rrtServiceData.completedOrders.add(PrescriptionsOrder.fromJson(json));
}
return Future.error("404");
});
}
}, onFailure: (error, statusCode){
}, onFailure: (error, statusCode) {
AppToast.showErrorToast(message: error);
});
return rrtServiceData;
}
Future getOrderDetails() async{
Future getOrderDetails() async {
return null;
}
Future getAllQuestions() async{
dynamic response_;
await _service.baseAppClient.post(GET_ALL_RRT_QUESTIONS, body: {}, onSuccess: (response, statusCode){
Future getAllQuestions() async {
dynamic response_;
await _service.baseAppClient.post(GET_ALL_RRT_QUESTIONS, body: {}, onSuccess: (response, statusCode) {
response_ = response;
}, onFailure: (error, statusCode){
}, onFailure: (error, statusCode) {
AppToast.showErrorToast(message: error);
});
return response_;
}
Future<ServicePrice> getServicePrice() async{
Map<String,dynamic> body = {"IdentificationNo":user.patientIdentificationNo};
ServicePrice servicePrice;
await _service.baseAppClient.post(GET_RRT_SERVICE_PRICE, body: body, onSuccess: (response, statusCode){
Future<ServicePrice> getServicePrice() async {
Map<String, dynamic> body = {"IdentificationNo": user.patientIdentificationNo};
ServicePrice servicePrice;
await _service.baseAppClient.post(GET_RRT_SERVICE_PRICE, body: body, onSuccess: (response, statusCode) {
var data = response['PatientE_RealRRT_GetServicePriceList'];
if(data != null && data is List){
if (data != null && data is List) {
var priceData = data.first;
if(priceData != null){
if (priceData != null) {
servicePrice = ServicePrice.fromJson(priceData);
rrtServiceData.servicePrice = servicePrice;
}
}
}, onFailure: (error, statusCode){
}, onFailure: (error, statusCode) {
AppToast.showErrorToast(message: error);
});
return servicePrice;
}
Future<bool> cancelOrder(PrescriptionsOrder order, {String reason = ""}) async{
var body = {"PresOrderID":order.iD, "PresOrderStatus":4,"EditedBy":3,"RejectionReason":reason};
Future<bool> cancelOrder(PrescriptionsOrder order, {String reason = ""}) async {
var body = {"PresOrderID": order.iD, "PresOrderStatus": 4, "EditedBy": 3, "RejectionReason": reason};
var success = false;
await _service.baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER, body: body, onSuccess: (response, statusCode){
await _service.baseAppClient.post(PATIENT_ER_UPDATE_PRES_ORDER, body: body, onSuccess: (response, statusCode) {
success = true;
}, onFailure: (error, statusCode){
}, onFailure: (error, statusCode) {
AppToast.showErrorToast(message: error);
success = false;
});
return Future.value(success);
}
Future getCancelReasons(){
}
Future getCancelReasons() {}
Future<List<Addresses>> getAddresses() async{
Future<List<Addresses>> getAddresses() async {
Object error;
try{
try {
var token = await sharedPref.getString(PHARMACY_AUTORZIE_TOKEN);
if(token == null)
await _pharmacy_service.generatePharmacyToken();
if (token == null) await _pharmacy_service.generatePharmacyToken();
await _pharmacy_service.makeVerifyCustomer({'PatientID': user.patientID.toString()});
await _pharmacy_address_service.getAddresses();
return _pharmacy_address_service.addresses;
}catch(e){
} catch (e) {
error = e;
}
Future.error(error);
}
}
}

@ -50,7 +50,7 @@ class ConfirmDialog extends StatelessWidget {
],
),
Text(
"Request has been sent successfully. You will be contacted soon.",
TranslationBase.of(context).RRTRequestSuccess,
textAlign: TextAlign.start,
style: TextStyle(
fontSize: 14,
@ -60,7 +60,7 @@ class ConfirmDialog extends StatelessWidget {
),
mHeight(20),
Text(
"Request ID",
TranslationBase.of(context).reqId,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,

@ -42,106 +42,113 @@ class _NewHomeHealthCareStepOnePageState extends State<NewHomeHealthCareStepOneP
return AppScaffold(
isShowAppBar: false,
baseViewModel: widget.model,
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.only(left: MediaQuery.of(context).size.width * 0.05, right: MediaQuery.of(context).size.width * 0.05),
child: Center(
child: FractionallySizedBox(
widthFactor: 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Texts(
// TranslationBase.of(context).selectHomeHealthCareServices,
// textAlign: TextAlign.center,
// ),
Column(
children: widget.model.hhcAllServicesList.map((service) {
return Container(
margin: EdgeInsets.only(top: 10),
decoration: BoxDecoration(
// border: Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
),
child: Column(
children: [
Row(
children: [
Checkbox(
value: isServiceSelected(service.serviceID),
activeColor: Colors.red[800],
tristate: false,
onChanged: (bool newValue) {
setState(() {
if (!isServiceSelected(service.serviceID))
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.add(PatientERHHCInsertServicesList(
recordID: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length,
serviceID: service.serviceID,
serviceName: service.description));
else
removeSelected(service.serviceID);
// widget.patientERInsertPresOrderRequestModel
// isPatientInsured = newValue;
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 0.0, right: 10),
child: Texts(
projectViewModel.isArabic ? service.descriptionN : service.description.toLowerCase()?.capitalize(),
fontSize: 15,
style: 'letterSpacing: -0.48',
fontWeight: FontWeight.bold,
),
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.only(left: MediaQuery.of(context).size.width * 0.05, right: MediaQuery.of(context).size.width * 0.05, top: MediaQuery.of(context).size.width * 0.05),
child: Center(
child: FractionallySizedBox(
widthFactor: 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Texts(
// TranslationBase.of(context).selectHomeHealthCareServices,
// textAlign: TextAlign.center,
// ),
Column(
children: widget.model.hhcAllServicesList.map((service) {
return Container(
margin: EdgeInsets.only(top: 10),
decoration: BoxDecoration(
// border: Border.all(color: Colors.grey, width: 1),
borderRadius: BorderRadius.circular(12),
),
child: Column(
children: [
Row(
children: [
Checkbox(
value: isServiceSelected(service.serviceID),
activeColor: Colors.red[800],
tristate: false,
onChanged: (bool newValue) {
setState(() {
if (!isServiceSelected(service.serviceID))
widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.add(PatientERHHCInsertServicesList(
recordID: widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length,
serviceID: service.serviceID,
serviceName: service.description));
else
removeSelected(service.serviceID);
// widget.patientERInsertPresOrderRequestModel
// isPatientInsured = newValue;
});
}),
Expanded(
child: Padding(
padding: const EdgeInsets.only(left: 0.0, right: 10),
child: Texts(
projectViewModel.isArabic ? service.descriptionN : service.description.toLowerCase()?.capitalize(),
fontSize: 15,
style: 'letterSpacing: -0.48',
fontWeight: FontWeight.bold,
),
),
),
],
),
),
],
),
Divider(
height: 1,
color: Colors.grey,
)
],
Divider(
height: 1,
color: Colors.grey,
)
],
),
);
}).toList(),
),
);
}).toList(),
SizedBox(height: 20)
],
),
),
SizedBox(height: 70)
],
),
),
),
),
),
),
bottomSheet: Container(
width: MediaQuery.of(context).size.width,
height: 70.0,
color: Theme.of(context).scaffoldBackgroundColor,
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0),
child: Button(
onTap: () async {
widget.model.setState(ViewState.Busy);
await widget.model.getCustomerInfo();
if (widget.model.state == ViewState.ErrorLocal) {
Utils.showErrorToast();
} else {
Navigator.push(
context,
FadePage(
page: NewHomeHealthCareStepTowPage(
patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel,
model: widget.model,
),
),
);
}
},
label: TranslationBase.of(context).next,
backgroundColor: (this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0 || widget.model.state == ViewState.BusyLocal) ? Colors.grey : Colors.red[900],
disabled: this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0 || widget.model.state == ViewState.BusyLocal,
loading: widget.model.state == ViewState.BusyLocal,
),
Container(
width: MediaQuery.of(context).size.width,
height: 70.0,
color: Theme.of(context).scaffoldBackgroundColor,
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0),
child: Button(
onTap: () async {
widget.model.setState(ViewState.Busy);
await widget.model.getCustomerInfo();
if (widget.model.state == ViewState.ErrorLocal) {
Utils.showErrorToast();
} else {
Navigator.push(
context,
FadePage(
page: NewHomeHealthCareStepTowPage(
patientERInsertPresOrderRequestModel: widget.patientERInsertPresOrderRequestModel,
model: widget.model,
),
),
);
}
},
label: TranslationBase.of(context).next,
backgroundColor:
(this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0 || widget.model.state == ViewState.BusyLocal) ? Colors.grey : Colors.red[900],
disabled: this.widget.patientERInsertPresOrderRequestModel.patientERHHCInsertServicesList.length == 0 || widget.model.state == ViewState.BusyLocal,
loading: widget.model.state == ViewState.BusyLocal,
),
),
],
),
);
}

@ -22,6 +22,7 @@ class NewHomeHealthCarePage extends StatefulWidget {
NewHomeHealthCarePage({this.model});
final HomeHealthCareViewModel model;
@override
_NewHomeHealthCarePageState createState() => _NewHomeHealthCarePageState();
}
@ -94,15 +95,6 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
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: _changeCurrentTab,
// ),
// ),
Expanded(
child: PageView(
physics: NeverScrollableScrollPhysics(),
@ -190,25 +182,17 @@ class _NewHomeHealthCarePageState extends State<NewHomeHealthCarePage> with Tick
fontSize: 14,
),
mHeight(8),
SecondaryButton(
onTap: () {
showConfirmMessage(widget.model, widget.model.hhcAllOrderDetail[0]);
},
label: TranslationBase.of(context).cancel,
color: Colors.red[900],
small: true,
)
// SecondaryButton(
// onTap: () {
// showConfirmMessage(widget.model, widget.model.hhcAllOrderDetail[0]);
// },
// label: TranslationBase.of(context).cancel,
// color: Colors.red[900],
// small: true,
// )
],
),
],
// )
// ],
// )
// ],
// ),
// ],
//))
// ],
))),
))))
: NewHomeHealthCareStepOnePage(

@ -51,7 +51,7 @@ class OrdersLogDetailsPage extends StatelessWidget {
body: SingleChildScrollView(
physics: ScrollPhysics(),
child: Container(
margin: EdgeInsets.all(10),
margin: EdgeInsets.all(0),
child: Center(
child: FractionallySizedBox(
widthFactor: 0.94,

@ -358,6 +358,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
});
} else {
DocAvailableAppointments.areAppointmentsAvailable = false;
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);

@ -113,7 +113,7 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
),
),
Container(
height: 18,
height: 20,
child: DropdownButtonHideUnderline(
child: DropdownButton<DriveThroughTestingCenterModel>(
onTap: () {
@ -308,11 +308,8 @@ class _CovidDrivethruLocationState extends State<CovidDrivethruLocation> {
CovidDriveThruService service = new CovidDriveThruService();
GifLoaderDialogUtils.showMyDialog(context);
CovidTestProceduresResponse covidTestProceduresResponse = new CovidTestProceduresResponse();
service.getCovidTestProceduresList(context).then((res) {
if (res['MessageStatus'] == 1) {
print(res);
setState(() {
res['COVID19_TestProceduresList'].forEach((v) {
proceduresList.add(new CovidTestProceduresResponse.fromJson(v));

@ -116,7 +116,6 @@ class _CovidPaymentDetailsState extends State<CovidPaymentDetails> {
onChanged: (value) {
setState(() {
widget.selectedProcedure = value;
print(widget.selectedProcedure.procedureName);
getPaymentInfo(context, widget.projectID.toString(), widget.selectedProcedure.procedureID);
});
},

@ -1,71 +1,80 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
final _item_content_seperator = Container(height: 0.25, padding: EdgeInsets.all(10), color: Colors.grey.withOpacity(0.5));
class RRTLogListItem extends StatelessWidget{
class RRTLogListItem extends StatelessWidget {
final PrescriptionsOrder order;
final Function(PrescriptionsOrder) onCancel;
RRTLogListItem(this.order, {this.onCancel});
BuildContext _context;
TranslationBase localize;
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
_context = context;
localize = TranslationBase.of(context);
return Container(
padding: EdgeInsets.all(15), margin: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(15),
boxShadow: [BoxShadow(color: Colors.grey.withOpacity(0.25), spreadRadius: 1, blurRadius: 3)]
),
padding: EdgeInsets.all(15),
margin: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(15), boxShadow: [BoxShadow(color: Colors.grey.withOpacity(0.25), spreadRadius: 1, blurRadius: 3)]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
_contentItem(label: localize.reqId, value: order.iD.toString()),
_item_content_seperator,
_contentItem(label: localize.status, value: order.getStatusName(localize)),
_contentItem(label: localize.status, value: projectViewModel.isArabic ? order.descriptionN.toString() : order.description.toString()), //order.getStatusName(localize)),
_item_content_seperator,
_contentItem(label: localize.pickupDate, value: order.getFormattedDateTime()),
_item_content_seperator,
_contentItem(label: localize.location, value: order.getNearestProjectDescription()),
_item_content_seperator,
SizedBox(height: 10),
if(onCancel != null)
FractionallySizedBox(child: cancelButton())
if (onCancel != null && order.status == 1 && order.status == 2) FractionallySizedBox(child: cancelButton())
],
),
);
}
Widget _contentItem({@required String label, String value}){
Widget _contentItem({@required String label, String value}) {
return Container(
padding: EdgeInsets.symmetric(vertical: 10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(label, style: TextStyle(color: Theme.of(_context).appBarTheme.color, fontSize: 9, letterSpacing: 1),),
SizedBox(height: 5,),
Text(value, style: TextStyle(color: Theme.of(_context).appBarTheme.color,fontWeight: FontWeight.bold, fontSize: 14),),
Text(
label,
style: TextStyle(color: Theme.of(_context).appBarTheme.color, fontSize: 9, letterSpacing: 1),
),
SizedBox(
height: 5,
),
Text(
value,
style: TextStyle(color: Theme.of(_context).appBarTheme.color, fontWeight: FontWeight.bold, fontSize: 14),
),
],
),
);
}
Widget cancelButton() => MaterialButton(
height: 45,
color: Color(0xFFc5272d),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10) ),
onPressed: () => onCancel(order),
child: Text(localize.cancel, style: TextStyle(color: Colors.white, fontSize: 13),),
);
height: 45,
color: Color(0xFFc5272d),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
onPressed: () => onCancel(order),
child: Text(
localize.cancel,
style: TextStyle(color: Colors.white, fontSize: 13),
),
);
}

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/model/pharmacies/Addresses.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/models/rrt/service_price.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart';
import 'package:diplomaticquarterapp/pages/ErService/ErOptions.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -8,7 +9,6 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
@ -35,97 +35,87 @@ class RRTPlaceOrderPage extends StatelessWidget {
onModelReady: (vm) => viewModel = vm,
builder: (ctx, vm, wState) {
return AppScaffold(
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
body: Column(
appBarTitle: localize.rapidResponseTeam,
isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
body: SingleChildScrollView(
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Expanded(
child: SingleChildScrollView(
padding: EdgeInsets.all(20),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
localize.selectedLocation,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
),
selectedAddressField(),
AspectRatio(
aspectRatio: 3 / 1,
child: ClipRRect(
clipBehavior: Clip.hardEdge,
borderRadius: BorderRadius.circular(10),
child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=$lat,$lng &zoom=16&size=800x600&maptype=roadmap&markers=color:red%7C$lat,$lng&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8",
fit: BoxFit.cover,
),
),
),
SizedBox(
height: 10,
),
Container(
height: 80,
margin: EdgeInsets.symmetric(vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2, 2), color: Colors.grey.withOpacity(0.25))]),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
localize.totalAmountPayable,
style: TextStyle(fontSize: 13),
),
SizedBox(
height: 5,
),
Text(
"${servicePrice.totalPrice ?? '- - -'} ${localize.sar}",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
),
],
),
),
Container(
height: 70,
margin: EdgeInsets.symmetric(vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 0, vertical: 10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(10),
boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2, 2), color: Colors.grey.withOpacity(0.25))]),
child: TextField(
controller: noteController,
style: TextStyle(fontSize: 18.0),
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
labelText: localize.notes,
contentPadding: const EdgeInsets.only(left: 14.0, bottom: 8.0, top: 8.0),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white),
borderRadius: BorderRadius.circular(10),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white),
borderRadius: BorderRadius.circular(10),
),
)),
),
],
Text(
localize.selectedLocation,
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
),
selectedAddressField(),
AspectRatio(
aspectRatio: 3 / 1,
child: ClipRRect(
clipBehavior: Clip.hardEdge,
borderRadius: BorderRadius.circular(10),
child: Image.network(
"https://maps.googleapis.com/maps/api/staticmap?center=$lat,$lng &zoom=16&size=800x600&maptype=roadmap&markers=color:red%7C$lat,$lng&key=AIzaSyCyDbWUM9d_sBUGIE8PcuShzPaqO08NSC8",
fit: BoxFit.cover,
),
),
),
submitButton(context)
SizedBox(
height: 10,
),
Container(
height: 85,
margin: EdgeInsets.symmetric(vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(10), boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2, 2), color: Colors.grey.withOpacity(0.25))]),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
localize.patientShareWithTax,
style: TextStyle(fontSize: 13),
),
SizedBox(
height: 5,
),
Text(
"${servicePrice.totalPrice ?? '- - -'} ${localize.sar}",
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 18),
),
],
),
),
Container(
height: 70,
margin: EdgeInsets.symmetric(vertical: 5),
padding: EdgeInsets.symmetric(horizontal: 0, vertical: 10),
decoration: BoxDecoration(
color: Colors.white, borderRadius: BorderRadius.circular(10), boxShadow: [BoxShadow(blurRadius: 5, spreadRadius: 2, offset: Offset(2, 2), color: Colors.grey.withOpacity(0.25))]),
child: TextField(
controller: noteController,
style: TextStyle(fontSize: 18.0),
decoration: InputDecoration(
filled: true,
fillColor: Colors.white,
labelText: localize.notes,
contentPadding: const EdgeInsets.only(left: 14.0, bottom: 8.0, top: 8.0),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(color: Colors.white),
borderRadius: BorderRadius.circular(10),
),
enabledBorder: UnderlineInputBorder(
borderSide: BorderSide(color: Colors.white),
borderRadius: BorderRadius.circular(10),
),
)),
),
],
));
),
),
bottomSheet: submitButton(context),
);
},
);
}
@ -134,33 +124,34 @@ class RRTPlaceOrderPage extends StatelessWidget {
var address = "${selectedAddress.address1 ?? ''} ${selectedAddress.address2 ?? ''}";
return Container(
margin: EdgeInsets.symmetric(vertical: 10),
child: Expanded(
child: MaterialButton(
height: 50,
color: Colors.white,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
onPressed: () {},
child: Row(
children: [
Expanded(child: Text(address, style: TextStyle(color: Colors.black87, fontSize: 15, letterSpacing: 1))),
Icon(
Icons.location_on_rounded,
size: 30,
color: Colors.black,
)
],
),
child: MaterialButton(
height: 50,
color: Colors.white,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
onPressed: () {},
child: Row(
children: [
Expanded(child: Text(address, style: TextStyle(color: Colors.black87, fontSize: 15, letterSpacing: 1))),
Icon(
Icons.location_on_rounded,
size: 30,
color: Colors.black,
)
],
),
),
);
}
Widget submitButton(BuildContext context) {
return Padding(
padding: const EdgeInsets.all(15),
child: DefaultButton(
localize.submit,
() => placeOrder(),
return Container(
color: Theme.of(context).scaffoldBackgroundColor,
child: Padding(
padding: const EdgeInsets.all(15),
child: DefaultButton(
localize.submit,
() => placeOrder(),
),
),
);
}
@ -175,21 +166,34 @@ class RRTPlaceOrderPage extends StatelessWidget {
params['Latitude'] = latlng.latitude;
params['Longitude'] = latlng.longitude;
params['Notes'] = noteController.text;
// var response = await viewModel.createOrder(params);
var requestId = await viewModel.createOrder(params);
GifLoaderDialogUtils.hideDialog(_context);
if (requestId != null) {
AlertDialogBox(
context: _context,
title: '',
confirmMessage: localize.rrtOrderSuccessMessage,
okText: localize.ok,
okFunction: () {
AlertDialogBox.closeAlertDialog(_context);
gotoRRTRoot();
}).showAlertDialog(_context);
showCMCConfirmDialog(
_context,
requestId.toString(),
onClick: () {
gotoRRTRoot();
// Navigator.pop(_context);
// Navigator.pop(_context);
},
);
}
// if (requestId != null) {
// AlertDialogBox(
// context: _context,
// title: '',
// confirmMessage: localize.rrtOrderSuccessMessage,
// okText: localize.ok,
// okFunction: () {
// AlertDialogBox.closeAlertDialog(_context);
// gotoRRTRoot();
// }).showAlertDialog(_context);
// }
} else {
AppToast.showErrorToast(message: 'Invalid location selected');
}

@ -1,10 +1,10 @@
import 'package:diplomaticquarterapp/core/model/prescriptions/prescriptions_order.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/models/rrt/service_price.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-agreement-page.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-order-list-item.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-pickup-address-page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/reports/user_agreement_page.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -25,13 +25,10 @@ class RRTRequestPage extends StatefulWidget {
class RRTRequestPageState extends State<RRTRequestPage> {
bool acceptTerms = false;
TranslationBase localize;
RRTViewModel viewModel;
@override
Widget build(BuildContext context) {
localize = TranslationBase.of(context);
return BaseView<RRTViewModel>(
onModelReady: (vm) {
viewModel = vm;
@ -63,7 +60,8 @@ class RRTRequestPageState extends State<RRTRequestPage> {
Container(
padding: EdgeInsets.only(top: 20, bottom: 5),
alignment: Alignment.center,
child: Text(localize.youCanPayByTheFollowingOptions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color, fontWeight: FontWeight.w500), maxLines: 2)),
child: Text(TranslationBase.of(context).youCanPayByTheFollowingOptions,
style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color, fontWeight: FontWeight.w500), maxLines: 2)),
paymentOptions(),
],
@ -87,7 +85,7 @@ class RRTRequestPageState extends State<RRTRequestPage> {
Widget serviceDescription(BuildContext context) => Padding(
padding: const EdgeInsets.symmetric(horizontal: 10),
child: Text(
localize.rrtDDetails,
TranslationBase.of(context).rrtDDetails,
textAlign: TextAlign.justify,
style: TextStyle(color: Theme.of(context).appBarTheme.color, fontSize: 15, height: 1.5, fontWeight: FontWeight.w300),
),
@ -104,13 +102,13 @@ class RRTRequestPageState extends State<RRTRequestPage> {
Container(
height: 30,
decoration: BoxDecoration(color: Theme.of(context).appBarTheme.color, borderRadius: BorderRadius.only(topLeft: radius, topRight: radius)),
child: Center(child: Text(localize.approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))),
child: Center(child: Text(TranslationBase.of(context).approximateServiceFee, style: TextStyle(color: Colors.white, fontSize: 12, fontWeight: FontWeight.w500, letterSpacing: 1))),
),
pricingRow(label: localize.amountBeforeTax, value: '$amount ${localize.sar}'),
pricingRow(label: TranslationBase.of(context).patientShare, value: '$amount ${TranslationBase.of(context).sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
pricingRow(label: localize.taxAmount, value: '$vat ${localize.sar}'),
pricingRow(label: TranslationBase.of(context).patientTaxToDo, value: '$vat ${TranslationBase.of(context).sar}'),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
pricingRow(label: localize.totalAmountPayable, value: '$total ${localize.sar}', labelBold: true),
pricingRow(label: TranslationBase.of(context).patientShareWithTax, value: '$total ${TranslationBase.of(context).sar}', labelBold: true),
Container(height: 0.5, color: Theme.of(context).appBarTheme.color),
],
);
@ -149,14 +147,19 @@ class RRTRequestPageState extends State<RRTRequestPage> {
setState(() => acceptTerms = v);
}),
SizedBox(width: 10),
Expanded(child: Text(localize.iAcceptTermsConditions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color), maxLines: 2)),
Expanded(child: Text(TranslationBase.of(context).iAcceptTermsConditions, style: TextStyle(fontSize: 13, color: Theme.of(context).appBarTheme.color), maxLines: 2)),
Container(
alignment: Alignment.center,
width: MediaQuery.of(context).size.width * 0.25,
child: TextButton(
child: Text(localize.clickHere, style: TextStyle(fontSize: 12, color: Colors.blue, fontWeight: FontWeight.w400)),
child: Text(TranslationBase.of(context).clickHere, style: TextStyle(fontSize: 12, color: Colors.blue, fontWeight: FontWeight.w400)),
onPressed: () {
Navigator.push(context, FadePage(page: RRTAgreementPage()));
Navigator.push(
context,
FadePage(
page: UserAgreementContent(),
),
);
}),
)
],
@ -184,7 +187,7 @@ class RRTRequestPageState extends State<RRTRequestPage> {
if (acceptTerms)
goToPickupAddress();
else
AppToast.showErrorToast(message: localize.pleaseAcceptTerms);
AppToast.showErrorToast(message: TranslationBase.of(context).pleaseAcceptTerms);
},
),
),

@ -233,13 +233,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
_firebaseMessaging.setAutoInitEnabled(true);
// signalRUtil = new SignalRUtil(hubName: "http://192.168.8.101:5001/chatHub", context: context);
signalRUtil = new SignalRUtil(hubName: "https://api.cssynapses.com/chatsocket", context: context);
locationUtils = new LocationUtils(isShowConfirmDialog: false, context: context);
WidgetsBinding.instance.addPostFrameCallback((_) {
if (projectViewModel.isLogin && !projectViewModel.isLoginChild) {
familyFileProvider.getSharedRecordByStatus();
}
// signalRUtil.startSignalRConnection();
signalRUtil.startSignalRConnection();
});
// HMG (Guest/Internet) Wifi Access [Zohaib Kambrani]
//for now commented to reduce this call will enable it when needed

@ -1,5 +1,6 @@
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/FamilyFiles/PatientERVirtualHistoryResponse.dart';
import 'package:diplomaticquarterapp/pages/livecare/widgets/LiveCarePendingRequest.dart';
@ -10,6 +11,7 @@ import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LiveCareHome extends StatefulWidget {
static bool showFooterButton = true;
@ -30,7 +32,7 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
ErRequestHistoryList pendingERRequestHistoryList;
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
ProjectViewModel projectViewModel;
@override
void initState() {
@ -39,9 +41,9 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
pendingERRequestHistoryList = new ErRequestHistoryList();
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/ar/0.png'));
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_en/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/er-consultation_ar/ar/0.png'));
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!isDataLoaded && authenticatedUserObject.isLogin) getLiveCareHistory();
if (!isDataLoaded && projectViewModel.isLogin) getLiveCareHistory();
});
super.initState();
@ -49,6 +51,7 @@ class _LiveCareHomeState extends State<LiveCareHome> with SingleTickerProviderSt
@override
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
return AppScaffold(
appBarTitle: TranslationBase.of(context).livecare,
isShowAppBar: true,

@ -556,7 +556,7 @@ class _clinic_listState extends State<ClinicList> {
alignment: FractionalOffset.bottomCenter,
child: Container(
color: Colors.grey[100],
transform: Matrix4.translationValues(0.0, -40.0, 0.0),
transform: Matrix4.translationValues(0.0, -65.0, 0.0),
width: MediaQuery.of(context).size.width,
height: 50.0,
margin: EdgeInsets.fromLTRB(0.0, 10.0, 0.0, 20.0),

@ -391,13 +391,14 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
loginWithFingurePrintFace(type, int isActive) async {
if (isActive == 1) {
// this.startBiometricLoginIfAvailable();
if (isActive == 1 || isActive ==0) {
const iosStrings =
const IOSAuthMessages(cancelButton: 'cancel', goToSettingsButton: 'settings', goToSettingsDescription: 'Please set up your Touch ID.', lockOut: 'Please reenable your Touch ID');
try {
authenticated = await auth.authenticateWithBiometrics(localizedReason: 'Scan your fingerprint to authenticate', useErrorDialogs: true, stickyAuth: true, iOSAuthStrings: iosStrings);
} on PlatformException catch (e) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showErrorToast(message: 'Please enable your Touch or Face ID');
@ -645,7 +646,7 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
Widget _loginOptionButton(String _title, String _icon, int _flag, int _loginIndex) {
bool isDisable = (_flag == 3 && !checkIfBiometricAvailable(BiometricType.face));
bool isDisable = (_flag == 3 && !checkIfBiometricAvailable(BiometricType.face) || _flag == 2 && !checkIfBiometricAvailable(BiometricType.fingerprint));
return InkWell(
onTap: isDisable

@ -5,7 +5,8 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/vaccine_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/others/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -30,12 +31,13 @@ class _MyVaccinesState extends State<MyVaccines> {
onModelReady: (model) => model.getVaccine(),
builder: (BuildContext context, VaccineViewModel model, Widget child) => AppScaffold(
isShowAppBar: true,
showNewAppBar: true,
showNewAppBarTitle: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).myVaccines,
description: TranslationBase.of(context).infoVaccines,
imagesInfo: [
ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/ar/0.png')
ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-vacceines/ar/0.png')
],
body: Container(
margin: EdgeInsets.only(
@ -167,17 +169,41 @@ class _MyVaccinesState extends State<MyVaccines> {
if (projectViewModel.havePrivilege(27))
Container(
width: double.infinity,
// height: 80.0,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
color: Color(0xffF62426),
textColor: Colors.white,
disabled: model.vaccineList.length == 0,
loading: model.state == ViewState.BusyLocal,
onTap: () async {
model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
child: DefaultButton(
TranslationBase.of(context).sendEmail,
() {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: projectViewModel.user.emailAddress,
onTapSendEmail: () {
model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
},
),
);
},
),
// SecondaryButton(
// label: TranslationBase.of(context).sendEmail,
// color: Color(0xffF62426),
// textColor: Colors.white,
// disabled: model.vaccineList.length == 0,
// loading: model.state == ViewState.BusyLocal,
// onTap: () async {
// showDialog(
// context: context,
// child: ConfirmSendEmailDialog(
// email: projectViewModel.user.emailAddress,
// onTapSendEmail: () {
// // generateCovidCertificate(context, isOutsideKSA);
// model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
// },
// ),
// );
// // model.sendEmail(message: TranslationBase.of(context).emailSentSuccessfully);
// },
// ),
),
],
),

@ -18,31 +18,15 @@ class CovidDriveThruService extends BaseService {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig",
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"License": true
};
request = {};
dynamic localRes;
await baseAppClient.post(GET_COVID_DRIVETHRU_PROJECT_LIST,
onSuccess: (response, statusCode) async {
await baseAppClient.post(GET_COVID_DRIVETHRU_PROJECT_LIST, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
@ -54,35 +38,18 @@ class CovidDriveThruService extends BaseService {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig",
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"License": true
};
request = {};
dynamic localRes;
await baseAppClient.post(GET_COVID_DRIVETHRU_PROCEDURES_LIST,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
await baseAppClient.post(GET_COVID_DRIVETHRU_PROCEDURES_LIST, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
@ -90,37 +57,22 @@ class CovidDriveThruService extends BaseService {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"ProjectID": projectID,
"ProcedureId": procedureID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig",
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"License": true
"ProcedureId": procedureID
};
dynamic localRes;
await baseAppClient.post(GET_COVID_DRIVETHRU_PAYMENT_INFO,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
await baseAppClient.post(GET_COVID_DRIVETHRU_PAYMENT_INFO, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
@ -128,36 +80,19 @@ class CovidDriveThruService extends BaseService {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(
await this.sharedPref.getObject(USER_PROFILE));
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
Request req = appGlobal.getPublicRequest();
request = {
"LanguageID": languageID == 'ar' ? 1 : 2,
"IPAdress": "10.20.10.20",
"ProjectID": projectID,
"VersionID": req.VersionID,
"Channel": req.Channel,
"generalid": 'Cs2020@2016\$2958',
"PatientOutSA": authUser.outSA,
"TokenID": "",
"DeviceTypeID": req.DeviceTypeID,
"SessionID": "YckwoXhUmWBsnHKEKig",
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"License": true
};
request = {};
dynamic localRes;
await baseAppClient.post(GET_COVID_DRIVETHRU_FREE_SLOTS,
onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
await baseAppClient.post(GET_COVID_DRIVETHRU_FREE_SLOTS, onSuccess: (response, statusCode) async {
localRes = response;
}, onFailure: (String error, int statusCode) {
throw error;
}, body: request);
return Future.value(localRes);
}
}

@ -125,15 +125,16 @@ class LiveCareService extends BaseService {
Future<Map> getLivecareHistory(BuildContext context) async {
Map<String, dynamic> request;
request = {};
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
var data = AuthenticatedUser.fromJson(await this.sharedPref.getObject(USER_PROFILE));
authUser = data;
}
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
// var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
// Request req = appGlobal.getPublicRequest();
request = {"LanguageID": languageID == 'ar' ? 1 : 2, "TokenID": "", "SessionID": "YckwoXhUmWBsnHKEKig"};
// request = {"LanguageID": languageID == 'ar' ? 1 : 2, "TokenID": "", "SessionID": "YckwoXhUmWBsnHKEKig"};
dynamic localRes;

@ -2261,6 +2261,7 @@ class TranslationBase {
String get serviceNotAvailable => localizedValues["serviceNotAvailable"][locale.languageCode];
String get doctorScheduleNot => localizedValues["doctorScheduleNot"][locale.languageCode];
String get RRTRequestSuccess => localizedValues["RRTRequestSuccess"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -9,7 +9,6 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:connectivity/connectivity.dart';
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
@ -37,7 +36,6 @@ import 'package:diplomaticquarterapp/pages/vaccine/my_vaccines_screen.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/medical_profile_item.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/alert_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/not_auh_page.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -462,7 +460,9 @@ class Utils {
if (projectViewModel.isLogin && userData_ != null) {
String patientID = userData_.patientID.toString();
GifLoaderDialogUtils.showMyDialog(context);
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)});
projectViewModel.platformBridge().connectHMGInternetWifi(patientID).then((value) => {GifLoaderDialogUtils.hideDialog(context)}).catchError((err) {
print(err.toString());
});
} else {
AlertDialogBox(
context: context,
@ -595,7 +595,6 @@ class Utils {
MedicalProfileItem(title: TranslationBase.of(context).myDoctor, imagePath: 'my_doc.svg', subTitle: TranslationBase.of(context).myDoctorSubtitle, isEnable: projectViewModel.havePrivilege(6)),
));
return medical;
}
@ -632,11 +631,12 @@ class Utils {
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.48, height: 18 / 12),
),
SizedBox(height: 5),
if(showDivider) Divider(
height: 1,
color: Color(0xff2E303A),
thickness: 1,
)
if (showDivider)
Divider(
height: 1,
color: Color(0xff2E303A),
thickness: 1,
)
],
);
}

@ -122,7 +122,7 @@ class DoctorHeader extends StatelessWidget {
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
color: Color(0xff2B353E),
color: onRatingAndReviewTap != null ? Colors.blue[600] : Color(0xff2B353E),
letterSpacing: -0.48,
height: 18 / 12,
decoration: onRatingAndReviewTap != null ? TextDecoration.underline : null,

@ -19,13 +19,13 @@ class AppExpandableNotifier extends StatefulWidget {
bool expandFlag = false;
var controller = new ExpandableController();
bool isTitleSingleLine;
AppExpandableNotifier({this.headerWidget, this.bodyWidget, this.title, this.collapsed, this.isExpand = false, this.isTitleSingleLine = true});
_AppExpandableNotifier createState() => _AppExpandableNotifier();
}
class _AppExpandableNotifier extends State<AppExpandableNotifier> {
ProjectViewModel projectViewModel;
@override
@ -43,8 +43,9 @@ class _AppExpandableNotifier extends State<AppExpandableNotifier> {
Widget build(BuildContext context) {
projectViewModel = Provider.of(context);
String _mainTitle = (widget.title ?? TranslationBase.of(context).details);
String _title = projectViewModel.isArabic ? _mainTitle.split(" ")[1] : _mainTitle.split(" ")[0];
String _mainTitle = (widget.title ?? TranslationBase.of(context).details).trim();
String _title = _mainTitle.contains(" ") ? (projectViewModel.isArabic ? (_mainTitle.split(" ").length < 1 ? _mainTitle : _mainTitle.split(" ")[1]) : _mainTitle.split(" ")[0]) : _mainTitle;
// String _title = _mainTitle.split(" ")[0];
String _subTitle = _mainTitle.replaceAll(_title, "").trim();
if (_subTitle.length < 1) {

Loading…
Cancel
Save