Merge branch 'haroon_development_2.5' into 'development_v2.5'

Haroon development 2.5

See merge request Cloud_Solution/diplomatic-quarter!577
merge-update-with-lab-changes
haroon amjad 4 years ago
commit 1fc45e3f7c

@ -31,7 +31,7 @@ const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapitest/api/';
// RC API URL
const RC_BASE_URL = 'https://livecare.hmg.com/';
const RC_BASE_URL = 'https://rc.hmg.com/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@ -146,18 +146,18 @@ const INSERT_ER_INERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder';
/// ER RRT
const GET_ALL_RC_TRANSPORTATION = 'rc/api/Transportation/getalltransportation';
const GET_ALL_TRANSPORTATIONS_RC = 'rc/api/Transportation/getalltransportation';
const GET_ALL_RC_TRANSPORTATION = 'api/Transportation/getalltransportation';
const GET_ALL_TRANSPORTATIONS_RC = 'api/Transportation/getalltransportation';
const GET_ALL_RRT_QUESTIONS =
'Services/Patients.svc/REST/PatientER_RRT_GetAllQuestions';
const GET_RRT_SERVICE_PRICE =
'Services/Patients.svc/REST/PatientE_RealRRT_GetServicePrice';
const GET_ALL_TRANSPORTATIONS_ORDERS = 'rc/api/Transportation/get';
const GET_ALL_TRANSPORTATIONS_ORDERS = 'api/Transportation/get';
const CANCEL_AMBULANCE_REQUEST = "rc/api/Transportation/update";
const CANCEL_AMBULANCE_REQUEST = "api/Transportation/update";
const INSERT_TRANSPORTATION_ORDER_RC = "rc/api/Transportation/add";
const INSERT_TRANSPORTATION_ORDER_RC = "api/Transportation/add";
///FindUs
const GET_FINDUS_REQUEST = 'Services/Lists.svc/REST/Get_HMG_Locations';
@ -606,27 +606,27 @@ const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION =
'Services/PatientVarification.svc/REST/AddUserAgreementForBloodDonation';
// HHC RC SERVICES
const HHC_GET_ALL_SERVICES_RC = "rc/api/HHC/getallhhc";
const ADD_HHC_ORDER_RC = "rc/api/HHC/add";
const GET_ALL_HHC_ORDERS_RC = 'rc/api/hhc/list';
const UPDATE_HHC_ORDER_RC = 'rc/api/hhc/update';
const HHC_GET_ALL_SERVICES_RC = "api/HHC/getallhhc";
const ADD_HHC_ORDER_RC = "api/HHC/add";
const GET_ALL_HHC_ORDERS_RC = 'api/hhc/list';
const UPDATE_HHC_ORDER_RC = 'api/hhc/update';
// CMC RC SERVICES
const GET_ALL_CMC_SERVICES_RC = 'rc/api/cmc/getallcmc';
const ADD_CMC_ORDER_RC = 'rc/api/cmc/add';
const GET_ALL_CMC_ORDERS_RC = 'rc/api/cmc/list';
const UPDATE_CMC_ORDER_RC = 'rc/api/cmc/update';
const GET_ALL_CMC_SERVICES_RC = 'api/cmc/getallcmc';
const ADD_CMC_ORDER_RC = 'api/cmc/add';
const GET_ALL_CMC_ORDERS_RC = 'api/cmc/list';
const UPDATE_CMC_ORDER_RC = 'api/cmc/update';
// RRT RC SERVICES
const ADD_RRT_ORDER_RC = "rc/api/rrt/add";
const GET_ALL_RRT_ORDERS_RC = "rc/api/rrt/list";
const UPDATE_RRT_ORDER_RC = 'rc/api/rrt/update';
const ADD_RRT_ORDER_RC = "api/rrt/add";
const GET_ALL_RRT_ORDERS_RC = "api/rrt/list";
const UPDATE_RRT_ORDER_RC = 'api/rrt/update';
// PRESCRIPTION RC SERVICES
const ADD_PRESCRIPTION_ORDER_RC = "rc/api/prescription/add";
const GET_ALL_PRESCRIPTION_ORDERS_RC = "rc/api/prescription/list";
const GET_ALL_PRESCRIPTION_INFO_RC = "rc/api/Prescription/info";
const UPDATE_PRESCRIPTION_ORDER_RC = 'rc/api/prescription/update';
const ADD_PRESCRIPTION_ORDER_RC = "api/prescription/add";
const GET_ALL_PRESCRIPTION_ORDERS_RC = "api/prescription/list";
const GET_ALL_PRESCRIPTION_INFO_RC = "api/Prescription/info";
const UPDATE_PRESCRIPTION_ORDER_RC = 'api/prescription/update';
//Pharmacy wishlist
const GET_WISHLIST = "shopping_cart_items/";

@ -20,7 +20,7 @@ class PrescriptionDeliveryService extends BaseService {
}, body: body);
}
Future insertDeliveryOrderRC({double latitude, double longitude, int appointmentNo, int createdBy, int dischargeID}) async {
Future insertDeliveryOrderRC({double latitude, double longitude, int appointmentNo, int createdBy, int dischargeID, int projectID}) async {
hasError = false;
Map<String, dynamic> body = Map();
body['latitude'] = latitude;
@ -28,8 +28,8 @@ class PrescriptionDeliveryService extends BaseService {
body['AppointmentNo'] = appointmentNo.toString();
// body['CreatedBy'] = createdBy;
body['DischargeID'] = dischargeID.toString();
body['ProjectID'] = projectID;
await baseAppClient.post(ADD_PRESCRIPTION_ORDER_RC, isRCService: true, onSuccess: (dynamic response, int statusCode) {
var asd = "";
}, onFailure: (String error, int statusCode) {
hasError = true;
print(error);

@ -27,12 +27,12 @@ class PrescriptionDeliveryViewModel extends BaseViewModel {
await getCustomerAddresses();
}
Future insertDeliveryOrder({int lineItemNo, double latitude, double longitude, int appointmentNo, int createdBy, int dischargeID}) async {
Future insertDeliveryOrder({int lineItemNo, double latitude, double longitude, int appointmentNo, int createdBy, int dischargeID, int projectID}) async {
setState(ViewState.BusyLocal);
// await _prescriptionDeliveryService.insertDeliveryOrder(
// lineItemNo: lineItemNo, latitude: latitude, longitude: longitude, appointmentNo: appointmentNo, createdBy: createdBy, dischargeID: dischargeID);
await _prescriptionDeliveryService.insertDeliveryOrderRC(
latitude: latitude, longitude: longitude, appointmentNo: appointmentNo, createdBy: createdBy, dischargeID: dischargeID);
latitude: latitude, longitude: longitude, appointmentNo: appointmentNo, createdBy: createdBy, dischargeID: dischargeID, projectID: projectID);
if (_prescriptionDeliveryService.hasError) {
error = _prescriptionDeliveryService.error;
setState(ViewState.ErrorLocal);

@ -82,6 +82,8 @@ class PharmacyAddressesViewModel extends BaseViewModel {
if (_pharmacyAddressService.hasError) {
setState(ViewState.Idle);
await Future.delayed(Duration(milliseconds: 800));
getAddressesList();
} else {
setState(ViewState.Idle);
await Future.delayed(Duration(milliseconds: 800));

@ -280,7 +280,8 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
child: InkWell(
onTap: () {
AuthenticatedUser user = projectViewModel.user;
if (projectViewModel.havePrivilege(82)) Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesHomePage(user)));
// if (projectViewModel.havePrivilege(82))
Navigator.of(context).push(MaterialPageRoute(builder: (context) => PackagesHomePage(user)));
},
child: Stack(
children: [
@ -427,18 +428,18 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
],
),
),
projectViewModel.havePrivilege(82)
? Container()
: Container(
width: double.infinity,
height: double.infinity,
clipBehavior: Clip.antiAlias,
decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)),
child: Icon(
Icons.lock_outline,
size: 40,
),
)
// projectViewModel.havePrivilege(82)
// ? Container()
// : Container(
// width: double.infinity,
// height: double.infinity,
// clipBehavior: Clip.antiAlias,
// decoration: containerRadiusWithGradientServices(20, lightColor: CustomColors.lightGreyColor.withOpacity(0.7), darkColor: CustomColors.lightGreyColor.withOpacity(0.7)),
// child: Icon(
// Icons.lock_outline,
// size: 40,
// ),
// )
],
),
),

@ -196,6 +196,7 @@ class PrescriptionOrderOverview extends StatelessWidget {
latitude: latitude,
appointmentNo: prescriptions.appointmentNo,
dischargeID: prescriptions.dischargeNo,
projectID: prescriptions.projectID,
createdBy: model.user.patientID)
.then((value) {
GifLoaderDialogUtils.hideDialog(context);

@ -45,7 +45,7 @@ class PaymentBottomWidget extends StatelessWidget {
child: Row(
children: [
isChecked ? Texts(
"${TranslationBase.of(context).sar} ${(model.cartResponse.totalAmount - model.paymentCheckoutData.lacumInformation.lakumInquiryInformationObjVersion.pointsBalanceAmount).toStringAsFixed(2)}",
"${TranslationBase.of(context).sar} ${model.cartResponse.totalAmount}",
fontSize: 14,
fontWeight: FontWeight.bold,
color: Color(0xff929295),

@ -34,11 +34,16 @@ class PharmacyAddressesPage extends StatefulWidget {
class _PharmacyAddressesState extends State<PharmacyAddressesPage> {
void navigateToAddressPage(BuildContext ctx, PharmacyAddressesViewModel model, AddressInfo address) {
Navigator.push(
ctx,
FadePage(
page: AddAddressPage(address, (pickResult) async {
await model.addEditAddress(pickResult, address);
}))).then((value) async {
ctx,
FadePage(
page: AddAddressPage(
address,
(pickResult) async {
await model.addEditAddress(pickResult, address);
},
),
),
).then((value) async {
// await model.getAddressesList();
});
}
@ -320,7 +325,7 @@ class _AddressItemWidgetState extends State<AddressItemWidget> {
okText: TranslationBase.of(context).delete,
cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => {
ConfirmDialog.closeAlertDialog(context),
ConfirmDialog.closeAlertDialog(context),
setState(() {
widget.model.deleteAddresses(widget.address).then((_) {
AppToast.showSuccessToast(

@ -162,12 +162,15 @@ class _pharmacyContactsPageState extends State<pharmacyContactsPage> {
SizedBox(
width: 30,
),
Text(projectViewModel.isArabic ? "2833400 " + " -11- 966+": "+966 " + " -11- 2833400",
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
Directionality(
textDirection: TextDirection.ltr,
child: Text("+966" +"-11-2833400",
style: TextStyle(
color: Colors.grey[700],
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.68)),
),
],
),
SizedBox(

@ -74,7 +74,7 @@ class PharmacyAddressService extends BaseService {
Future addCustomerAddress(AddressInfo address) async {
await makeCustomerAddress(address, ADD_CUSTOMER_ADDRESS);
// if(!hasError) {
selectedAddressIndex = addresses.length +1;
// selectedAddressIndex = addresses.length + 1;
// }
}
@ -100,14 +100,14 @@ class PharmacyAddressService extends BaseService {
body["customer"] = customerObject;
await baseAppClient.postPharmacy("$url", onSuccess: (response, statusCode) async {
addresses.clear();
response['customers'][0]['addresses'].forEach((item) {
addresses.add(AddressInfo.fromJson(item));
});
// addresses.clear();
// response['customers'][0]['addresses'].forEach((item) {
// addresses.add(AddressInfo.fromJson(item));
// });
// getAddresses();
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
},isAllowAny: true, body: body);
}
}

@ -162,8 +162,9 @@ class ProductDetailService extends BaseService {
Future getWishlistItems() async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
var custGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID);
hasError = false;
await baseAppClient.getPharmacy(GET_WISHLIST + customerId + "?shopping_cart_type=2", onSuccess: (dynamic response, int statusCode) {
await baseAppClient.getPharmacy(GET_WISHLIST + customerId + "/$custGUID" + "?shopping_cart_type=2", onSuccess: (dynamic response, int statusCode) {
_wishListProducts.clear();
response['shopping_carts'].forEach((item) {
_wishListProducts.add(Wishlist.fromJson(item));
@ -176,8 +177,9 @@ class ProductDetailService extends BaseService {
Future deleteItemFromWishlist(itemID, context) async {
var customerId = await sharedPref.getString(PHARMACY_CUSTOMER_ID);
var custGUID = await sharedPref.getObject(PHARMACY_CUSTOMER_GUID);
hasError = false;
await baseAppClient.getPharmacy(DELETE_WISHLIST + customerId + "+&product_id=" + itemID + "&cart_type=Wishlist", onSuccess: (dynamic response, int statusCode) {
await baseAppClient.getPharmacy(DELETE_WISHLIST + customerId + "/$custGUID" + "+&product_id=" + itemID + "&cart_type=Wishlist", onSuccess: (dynamic response, int statusCode) {
_wishListProducts.clear();
response['shopping_carts'].forEach((item) {
_wishListProducts.add(Wishlist.fromJson(item));

Loading…
Cancel
Save