updates & fixes

merge-requests/598/head
haroon amjad 4 years ago
parent 4ba37d342c
commit 8d988ba994

@ -19,8 +19,8 @@ var PACKAGES_ORDERS = '/api/orders';
var PACKAGES_ORDER_HISTORY = '/api/orders/items'; var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:3334/'; // var BASE_URL = 'http://10.50.100.198:3334/';
var BASE_URL = 'https://uat.hmgwebservices.com/'; // var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/'; var BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
// var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // var BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';

@ -1381,7 +1381,7 @@ const Map localizedValues = {
"order-overview": {"en": "Order Overview", "ar": "ملخص الطلب"}, "order-overview": {"en": "Order Overview", "ar": "ملخص الطلب"},
"shipping-address": {"en": "Delivery Address", "ar": "عنوان التوصيل"}, "shipping-address": {"en": "Delivery Address", "ar": "عنوان التوصيل"},
"pharmacy-relogin": {"en": "Your session has timed out, please try again", "ar": "انتهت مهلة جلسة الخاص بها. يرجى المحاولة مرة أخرى"}, "pharmacy-relogin": {"en": "Your session has timed out, please try again", "ar": "انتهت مهلة جلسة الخاص بها. يرجى المحاولة مرة أخرى"},
"ancillary-orders": {"en": "Ancillary Orders", "ar": "الأوامر التبعية"}, "ancillary-orders": {"en": "Ancillary Orders", "ar": "الطلبات الاضافية"},
"onlineCheckInAgreement": { "onlineCheckInAgreement": {
"en": "en":
"The online check-in is for non-life threatening situationCall the red crescent (number) or go to the nearest emergency department if there are: signs of stroke or heart attack history of seizure or syncope there is limb or life threatening injury picture of severe injuries", "The online check-in is for non-life threatening situationCall the red crescent (number) or go to the nearest emergency department if there are: signs of stroke or heart attack history of seizure or syncope there is limb or life threatening injury picture of severe injuries",

@ -16,7 +16,6 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart'; import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_inappwebview/flutter_inappwebview.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -44,7 +43,8 @@ class BaseAppClient {
Function(String error, int statusCode) onFailure, Function(String error, int statusCode) onFailure,
bool isAllowAny = false, bool isAllowAny = false,
bool isExternal = false, bool isExternal = false,
bool isRCService = false, bool bypassConnectionCheck = false}) async { bool isRCService = false,
bool bypassConnectionCheck = false}) async {
String url; String url;
if (isExternal) { if (isExternal) {
url = endPoint; url = endPoint;
@ -137,9 +137,11 @@ class BaseAppClient {
body.removeWhere((key, value) => key == null || value == null); body.removeWhere((key, value) => key == null || value == null);
print("URL : $url"); if (BASE_URL == "https://uat.hmgwebservices.com/") {
final jsonBody = json.encode(body); print("URL : $url");
print(jsonBody); final jsonBody = json.encode(body);
print(jsonBody);
}
if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) { if (await Utils.checkConnection(bypassConnectionCheck: bypassConnectionCheck)) {
final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers); final response = await http.post(Uri.parse(url.trim()), body: json.encode(body), headers: headers);
@ -883,14 +885,12 @@ class BaseAppClient {
return token; return token;
} }
logApiFullUrlError(String fullUrl, error, code) {
logApiFullUrlError(String fullUrl, error, code){
final endpoint = Uri.parse(fullUrl).pathSegments.last; final endpoint = Uri.parse(fullUrl).pathSegments.last;
logApiEndpointError(endpoint, error, code); logApiEndpointError(endpoint, error, code);
} }
logApiEndpointError(String endPoint, error, code){ logApiEndpointError(String endPoint, error, code) {
_analytics.errorTracking.log(endPoint, error: error); _analytics.errorTracking.log(endPoint, error: error);
} }
} }

@ -0,0 +1,75 @@
class RRTRequestModel {
num patientId;
int patientOutSa;
bool isOutPatient;
int nearestProjectId;
num longitude;
num latitude;
String additionalDetails;
String nationality;
num paymentAmount;
List<Procedures> procedures;
RRTRequestModel(
{this.patientId,
this.patientOutSa,
this.isOutPatient,
this.nearestProjectId,
this.longitude,
this.latitude,
this.additionalDetails,
this.nationality,
this.paymentAmount,
this.procedures});
RRTRequestModel.fromJson(Map<String, dynamic> json) {
patientId = json['patientId'];
patientOutSa = json['patientOutSa'];
isOutPatient = json['isOutPatient'];
nearestProjectId = json['nearestProjectId'];
longitude = json['longitude'];
latitude = json['latitude'];
additionalDetails = json['additionalDetails'];
nationality = json['nationality'];
paymentAmount = json['paymentAmount'];
if (json['procedures'] != null) {
procedures = <Procedures>[];
json['procedures'].forEach((v) {
procedures.add(new Procedures.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['patientId'] = this.patientId;
data['patientOutSa'] = this.patientOutSa;
data['isOutPatient'] = this.isOutPatient;
data['nearestProjectId'] = this.nearestProjectId;
data['longitude'] = this.longitude;
data['latitude'] = this.latitude;
data['additionalDetails'] = this.additionalDetails;
data['nationality'] = this.nationality;
data['paymentAmount'] = this.paymentAmount;
if (this.procedures != null) {
data['procedures'] = this.procedures.map((v) => v.toJson()).toList();
}
return data;
}
}
class Procedures {
String serviceID;
Procedures({this.serviceID});
Procedures.fromJson(Map<String, dynamic> json) {
serviceID = json['ServiceID'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['ServiceID'] = this.serviceID;
return data;
}
}

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer
import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/rrt-view-model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/rrt/RRTProcedureList.dart'; import 'package:diplomaticquarterapp/models/rrt/RRTProcedureList.dart';
import 'package:diplomaticquarterapp/models/rrt/RRTRequestModel.dart';
import 'package:diplomaticquarterapp/models/rrt/service_price.dart'; import 'package:diplomaticquarterapp/models/rrt/service_price.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart'; import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/ComprehensiveMedicalCheckup/Dialog/confirm_dialog.dart';
import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart'; import 'package:diplomaticquarterapp/pages/ErService/rapid-response-team/rrt-main-screen.dart';
@ -173,20 +174,34 @@ class RRTPlaceOrderPage extends StatelessWidget {
if (selectedAddress != null && selectedAddress.latLong != null && selectedAddress.latLong.isNotEmpty && selectedAddress.latLong.split(',').length > 1) { if (selectedAddress != null && selectedAddress.latLong != null && selectedAddress.latLong.isNotEmpty && selectedAddress.latLong.split(',').length > 1) {
GifLoaderDialogUtils.showMyDialog(_context); GifLoaderDialogUtils.showMyDialog(_context);
RRTRequestModel rrtRequestModel = new RRTRequestModel();
Procedures procedures = new Procedures();
rrtRequestModel.procedures = [];
Map<String, dynamic> params = {}; Map<String, dynamic> params = {};
var cordinates = selectedAddress.latLong.split(','); var cordinates = selectedAddress.latLong.split(',');
var latlng = LatLng(double.parse(cordinates.first), double.parse(cordinates.last)); var latlng = LatLng(double.parse(cordinates.first), double.parse(cordinates.last));
params['latitude'] = latlng.latitude;
params['longitude'] = latlng.longitude;
params['additionalDetails'] = noteController.text;
params['nationality'] = projectViewModel.user.nationalityID;
params['paymentAmount'] = selectedProcedure.patientShareWithTax;
params['procedureId'] = selectedProcedure.procedureID;
// var response = await viewModel.createOrder(params);
// var requestId = await viewModel.createOrder(params);
var requestId = await viewModel.createOrderRC(params); procedures.serviceID = selectedProcedure.procedureID;
rrtRequestModel.latitude = latlng.latitude;
rrtRequestModel.longitude = latlng.longitude;
rrtRequestModel.additionalDetails = noteController.text;
rrtRequestModel.nationality = projectViewModel.user.nationalityID;
rrtRequestModel.paymentAmount = selectedProcedure.patientShareWithTax;
rrtRequestModel.nearestProjectId = 0;
rrtRequestModel.patientId = projectViewModel.user.patientID;
rrtRequestModel.patientOutSa = projectViewModel.user.outSA;
rrtRequestModel.procedures.add(procedures);
// params['latitude'] = latlng.latitude;
// params['longitude'] = latlng.longitude;
// params['additionalDetails'] = noteController.text;
// params['nationality'] = projectViewModel.user.nationalityID;
// params['paymentAmount'] = selectedProcedure.patientShareWithTax;
// params['procedureId'] = selectedProcedure.procedureID;
var requestId = await viewModel.createOrderRC(rrtRequestModel.toJson());
GifLoaderDialogUtils.hideDialog(_context); GifLoaderDialogUtils.hideDialog(_context);

@ -149,69 +149,74 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Row( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, flex: 2,
children: [ child: Row(
Padding( crossAxisAlignment: CrossAxisAlignment.start,
padding: const EdgeInsets.only(top: 4.0), children: [
child: widget.appoList[index].clinicID == 265 Padding(
? Container( padding: const EdgeInsets.only(top: 4.0),
margin: EdgeInsets.only(left: 5.0, right: 5.0), child: widget.appoList[index].clinicID == 265
child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0), ? Container(
) margin: EdgeInsets.only(left: 5.0, right: 5.0),
: widget.appoList[index].isLiveCareAppointment child: SvgPicture.asset("assets/images/new/CoronaIcon.svg", width: 35.0, height: 35.0),
? SvgPicture.asset("assets/images/new/virtual.svg") )
: SvgPicture.asset("assets/images/new/hospital-visit.svg"), : widget.appoList[index].isLiveCareAppointment
? SvgPicture.asset("assets/images/new/virtual.svg")
// SvgPicture.asset("assets/images/new/virtual.svg"), : SvgPicture.asset("assets/images/new/hospital-visit.svg"),
),
Column( // SvgPicture.asset("assets/images/new/virtual.svg"),
crossAxisAlignment: CrossAxisAlignment.start, ),
children: [ Column(
Padding( crossAxisAlignment: CrossAxisAlignment.start,
padding: const EdgeInsets.only(left: 8.0, right: 8.0), children: [
child: Text( Padding(
widget.appoList[index].clinicID == 265 padding: const EdgeInsets.only(left: 8.0, right: 8.0),
? TranslationBase.of(context).covidTestTodo child: Text(
: widget.appoList[index].isLiveCareAppointment widget.appoList[index].clinicID == 265
? TranslationBase.of(context).liveCareAppo ? TranslationBase.of(context).covidTestTodo
: TranslationBase.of(context).walkinAppo, : widget.appoList[index].isLiveCareAppointment
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)), ? TranslationBase.of(context).liveCareAppo
), : TranslationBase.of(context).walkinAppo,
Padding( style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48)),
padding: const EdgeInsets.only(left: 8.0, right: 8.0),
child: CountdownTimer(
controller:
new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (widget.appoList[index].remaniningHoursTocanPay * 1000) * 60),
widgetBuilder: (_, CurrentRemainingTime time) {
return time != null
? Text(
'${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} ' +
TranslationBase.of(context).upcomingTimeLeft,
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48))
: Container();
},
), ),
), Padding(
], padding: const EdgeInsets.only(left: 8.0, right: 8.0),
), child: CountdownTimer(
], controller:
), new CountdownTimerController(endTime: DateTime.now().millisecondsSinceEpoch + (widget.appoList[index].remaniningHoursTocanPay * 1000) * 60),
Container( widgetBuilder: (_, CurrentRemainingTime time) {
child: InkWell( return time != null
onTap: () { ? Text(
performNextAction(widget.appoList[index]); '${time.days != null ? time.days : "0"}:${time.hours != null ? time.hours.toString().length == 1 ? "0" + time.hours.toString() : time.hours : "00"}:${time.min}:${time.sec} \n' +
}, TranslationBase.of(context).upcomingTimeLeft,
child: Container( style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: CustomColors.accentColor, letterSpacing: -0.48))
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14), : Container();
decoration: BoxDecoration( },
color: getNextActionButtonColor(widget.appoList[index].nextAction), ),
border: Border.all(color: Colors.white, width: 1), ),
borderRadius: BorderRadius.circular(6), ],
), ),
child: Text( ],
getNextActionText(widget.appoList[index].nextAction), ),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4), ),
Expanded(
child: Container(
child: InkWell(
onTap: () {
performNextAction(widget.appoList[index]);
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 8, horizontal: 14),
decoration: BoxDecoration(
color: getNextActionButtonColor(widget.appoList[index].nextAction),
border: Border.all(color: Colors.white, width: 1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
getNextActionText(widget.appoList[index].nextAction),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Colors.white, letterSpacing: -0.4),
),
), ),
), ),
), ),

@ -192,55 +192,55 @@ class _PaymentMethodState extends State<PaymentMethod> {
), ),
), ),
), ),
Container( // Container(
width: double.infinity, // width: double.infinity,
child: InkWell( // child: InkWell(
onTap: () { // onTap: () {
updateSelectedPaymentMethod("TAMARA"); // updateSelectedPaymentMethod("TAMARA");
}, // },
child: Card( // child: Card(
elevation: 0.0, // elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0), // margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white, // color: Colors.white,
shape: RoundedRectangleBorder( // shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10), // borderRadius: BorderRadius.circular(10),
side: selectedPaymentMethod == "TAMARA" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0), // side: selectedPaymentMethod == "TAMARA" ? BorderSide(color: Colors.green, width: 2.0) : BorderSide(color: Colors.transparent, width: 0.0),
), // ),
child: Padding( // child: Padding(
padding: const EdgeInsets.all(12.0), // padding: const EdgeInsets.all(12.0),
child: Row( // child: Row(
children: [ // children: [
Container( // Container(
width: 24, // width: 24,
height: 24, // height: 24,
decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "TAMARA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5), // decoration: containerColorRadiusBorderWidth(selectedPaymentMethod == "TAMARA" ? CustomColors.accentColor : Colors.transparent, 100, Colors.grey, 0.5),
), // ),
mWidth(12), // mWidth(12),
Container( // Container(
height: 60.0, // height: 60.0,
padding: EdgeInsets.all(0.0), // padding: EdgeInsets.all(0.0),
width: 60, // width: 60,
child: Image.asset("assets/images/new/payment/tamara.png"), // child: Image.asset("assets/images/new/payment/tamara.png"),
), // ),
mFlex(1), // mFlex(1),
if (selectedPaymentMethod == "TAMARA") // if (selectedPaymentMethod == "TAMARA")
Container( // Container(
decoration: containerRadius(CustomColors.green, 200), // decoration: containerRadius(CustomColors.green, 200),
padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12), // padding: EdgeInsets.only(top: 6, bottom: 6, left: 12, right: 12),
child: Text( // child: Text(
TranslationBase.of(context).paymentSelected, // TranslationBase.of(context).paymentSelected,
style: TextStyle( // style: TextStyle(
color: Colors.white, // color: Colors.white,
fontSize: 11, // fontSize: 11,
), // ),
), // ),
), // ),
], // ],
), // ),
), // ),
), // ),
), // ),
), // ),
if (widget.isShowInstallments) if (widget.isShowInstallments)
Container( Container(
width: double.infinity, width: double.infinity,

@ -363,13 +363,13 @@ class Utils {
)); ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(14) ? Navigator.push(context, FadePage(page: AnicllaryOrders())) : null, onTap: () => projectViewModel.havePrivilege(85) ? Navigator.push(context, FadePage(page: AnicllaryOrders())) : null,
child: MedicalProfileItem( child: MedicalProfileItem(
title: TranslationBase.of(context).anicllaryOrders, title: TranslationBase.of(context).anicllaryOrders,
imagePath: 'assets/images/al-habib_online_payment_service_icon.png', imagePath: 'ancillary.svg',
isPngImage: true, isPngImage: false,
subTitle: TranslationBase.of(context).myInvoice, subTitle: TranslationBase.of(context).myInvoice,
isEnable: projectViewModel.havePrivilege(14), isEnable: projectViewModel.havePrivilege(85),
), ),
)); ));

@ -32,13 +32,13 @@ class MyInAppBrowser extends InAppBrowser {
static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWebLive/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL LIVE
// static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT // static String APPLE_PAY_PAYFORT_URL = 'https://hmgwebservices.com/PayFortWeb/PayFortApi/MakeApplePayRequest'; // Payfort Payment Gateway URL UAT
// static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort Payment Gateway URL UAT
static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE // static String SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort Payment Gateway URL LIVE
// static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWeb/pages/SendPayFortRequest.aspx'; // Payfort PreAuth Payment Gateway URL UAT
static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store // static String PREAUTH_SERVICE_URL = 'https://hmgwebservices.com/PayFortWebLive/pages/SendPayFortRequest.aspx'; //Payfort PreAuth Payment Gateway URL Live Store
// static String PRESCRIPTION_PAYMENT_WITH_ORDERID = // static String PRESCRIPTION_PAYMENT_WITH_ORDERID =
// 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID='; // 'https://uat.hmgwebservices.com/epharmacy/checkout/OpcCompleteRedirectionPaymentClientbyOrder?orderID=';

Loading…
Cancel
Save