Merge branch 'development_v2.5' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into fatima_v2

merge-requests/575/head
Fatimah Alshammari 4 years ago
commit 71a28e2ed6

@ -15,8 +15,8 @@ const PACKAGES_CUSTOMER = '/api/customers';
const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items'; const PACKAGES_SHOPPING_CART = '/api/shopping_cart_items';
const PACKAGES_ORDERS = '/api/orders'; const PACKAGES_ORDERS = '/api/orders';
const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara'; const PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
const BASE_URL = 'https://uat.hmgwebservices.com/'; // const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/'; const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs // Pharmacy UAT URLs
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/'; // const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
@ -600,7 +600,6 @@ const GET_PATIENT_ALL_PRES_ORD =
'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders'; 'Services/Patients.svc/REST/PatientER_GetPatientAllPresOrders';
const PATIENT_ER_INSERT_PRES_ORDER = const PATIENT_ER_INSERT_PRES_ORDER =
'Services/Patients.svc/REST/PatientER_InsertPresOrder'; 'Services/Patients.svc/REST/PatientER_InsertPresOrder';
const PHARMACY_MAKE_REVIEW = 'epharmacy/api/insertreviews';
const BLOOD_DONATION_REGISTER_BLOOD_TYPE = const BLOOD_DONATION_REGISTER_BLOOD_TYPE =
'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType'; 'Services/PatientVarification.svc/REST/BloodDonation_RegisterBloodType';
const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION = const ADD_USER_AGREEMENT_FOR_BLOOD_DONATION =
@ -639,6 +638,7 @@ const GET_PRODUCT_DETAIL = "products/";
const GET_LOCATION = "Services/Patients.svc/REST/GetPharmcyListBySKU"; const GET_LOCATION = "Services/Patients.svc/REST/GetPharmcyListBySKU";
const GET_SPECIFICATION = "productspecification/"; const GET_SPECIFICATION = "productspecification/";
const GET_BRAND_ITEMS = "products"; const GET_BRAND_ITEMS = "products";
const PHARMACY_MAKE_REVIEW = 'insertreviews';
// External API // External API
const ADD_ADDRESS_INFO = "addcustomeraddress"; const ADD_ADDRESS_INFO = "addcustomeraddress";

@ -1746,4 +1746,5 @@ const Map localizedValues = {
"yourTurn": {"en": "your turn is after", "ar": "دورك بعد"}, "yourTurn": {"en": "your turn is after", "ar": "دورك بعد"},
"patients": {"en": "patients", "ar": "مرضي"}, "patients": {"en": "patients", "ar": "مرضي"},
"group": {"en": "Group", "ar": "مجموعة"},
}; };

@ -1,10 +1,10 @@
import 'PointsDetails.dart'; import 'PointsDetails.dart';
class PointsAmountPerday { class PointsAmountPerday {
double amountPerDay; num amountPerDay;
String day; String day;
List<PointsDetails> pointsDetails; List<PointsDetails> pointsDetails;
double pointsPerDay; num pointsPerDay;
String transationDate; String transationDate;
PointsAmountPerday( PointsAmountPerday(

@ -1,11 +1,11 @@
class PointsDetails { class PointsDetails {
int accNumber; int accNumber;
String accountStatus; String accountStatus;
double amount; num amount;
int lineItemNo; int lineItemNo;
String operationType; String operationType;
double points; num points;
double purchasePoints; num purchasePoints;
int subTransactionType; int subTransactionType;
String subTransactionTypeDescription; String subTransactionTypeDescription;
String transactionDate; String transactionDate;

@ -39,8 +39,12 @@ class LacumService extends BaseService{
super.error = ""; super.error = "";
Map<String, dynamic> body = Map(); Map<String, dynamic> body = Map();
body['IdentificationNo'] = user.patientIdentificationNo; // body['IdentificationNo'] = user.patientIdentificationNo;
body['AccountNumber'] = "${lacumInformation.yahalaAccountNo}"; // body['AccountNumber'] = "${lacumInformation.yahalaAccountNo}";
body['IdentificationNo'] = "2076117163";
body['AccountNumber'] = "2019000006";
body['IsDetailsRequired'] = true; body['IsDetailsRequired'] = true;
try { try {

@ -77,7 +77,6 @@ class PharmacyAddressesViewModel extends BaseViewModel {
await _pharmacyAddressService.addCustomerAddress(sendingAddress); await _pharmacyAddressService.addCustomerAddress(sendingAddress);
} else { } else {
await _pharmacyAddressService.editCustomerAddress(sendingAddress).then((value) async { await _pharmacyAddressService.editCustomerAddress(sendingAddress).then((value) async {
// await _pharmacyAddressService.getAddresses();
}); });
} }
@ -85,6 +84,8 @@ class PharmacyAddressesViewModel extends BaseViewModel {
setState(ViewState.Idle); setState(ViewState.Idle);
} else { } else {
setState(ViewState.Idle); setState(ViewState.Idle);
await Future.delayed(Duration(milliseconds: 800));
getAddressesList();
} }
} }
@ -96,6 +97,8 @@ class PharmacyAddressesViewModel extends BaseViewModel {
setState(ViewState.Error); setState(ViewState.Error);
} else { } else {
setState(ViewState.Idle); setState(ViewState.Idle);
await Future.delayed(Duration(milliseconds: 800));
getAddressesList();
} }
} }

@ -148,13 +148,12 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
onTap: (index) { onTap: (index) {
setState(() { setState(() {
if (index == 1) { if (index == 1) {
if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.doctor.clinicID == 47 || widget.isLiveCareAppointment) { // if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.doctor.clinicID == 47 || widget.isLiveCareAppointment) {
_tabController.index = _tabController.previousIndex; // _tabController.index = _tabController.previousIndex;
showFooterButton = false; showFooterButton = false;
} else { } else {
showFooterButton = true; showFooterButton = true;
} }
}
print(showFooterButton); print(showFooterButton);
}); });
}, },

@ -52,7 +52,7 @@ class _SearchResultsState extends State<SearchResults> {
//widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index].speciality = null; //widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index].speciality = null;
return DoctorView( return DoctorView(
doctor: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index], doctor: widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index],
isLiveCareAppointment: widget.isLiveCareAppointment, isLiveCareAppointment: widget.isLiveCareAppointment ?? widget.patientDoctorAppointmentListHospital[index].patientDoctorAppointmentList[_index].isLiveCare,
); );
}, },
separatorBuilder: (context, index) => SizedBox(height: 14), separatorBuilder: (context, index) => SizedBox(height: 14),

@ -238,6 +238,7 @@ class _DocAvailableAppointmentsState extends State<DocAvailableAppointments> wit
}); });
openTimeSlotsPickerForDate(DateUtil.convertStringToDate(selectedDateJSON), docFreeSlots); openTimeSlotsPickerForDate(DateUtil.convertStringToDate(selectedDateJSON), docFreeSlots);
_calendarController.selectedDate = DateUtil.convertStringToDate(selectedDateJSON); _calendarController.selectedDate = DateUtil.convertStringToDate(selectedDateJSON);
_calendarController.displayDate = _calendarController.selectedDate;
return _eventsParsed; return _eventsParsed;
} }

@ -76,7 +76,7 @@ class _LandingPagePharmacyState extends State<LandingPagePharmacy> {
children: [ children: [
PharmacyPage(), PharmacyPage(),
PharmacyCategorisePage(), PharmacyCategorisePage(),
PharmacyProfilePage(moveToOrder: false), PharmacyProfilePage(moveToOrder: false, changeTab: changeCurrentTab),
CartOrderPage(changeTab: changeCurrentTab), CartOrderPage(changeTab: changeCurrentTab),
], ],
), ),

File diff suppressed because it is too large Load Diff

@ -334,7 +334,7 @@ class _ProductReviewPageState extends State<ProductReviewPage> {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute(builder: (context) { MaterialPageRoute(builder: (context) {
return PharmacyProfilePage(); return PharmacyProfilePage(moveToOrder: true);
}), }),
); );
}, },

@ -314,26 +314,24 @@ class _AddressItemWidgetState extends State<AddressItemWidget> {
textColor: Color(0x99FF0000), textColor: Color(0x99FF0000),
handler: () { handler: () {
ConfirmDialog dialog = new ConfirmDialog( ConfirmDialog dialog = new ConfirmDialog(
// context: context, context: context,
title: TranslationBase.of(context).deleteAddress, title: TranslationBase.of(context).deleteAddress,
//"Are you sure want to delete",
confirmMessage: "${widget.address.address1} ${widget.address.address2}", confirmMessage: "${widget.address.address1} ${widget.address.address2}",
okText: TranslationBase.of(context).delete, okText: TranslationBase.of(context).delete,
cancelText: TranslationBase.of(context).cancel_nocaps, cancelText: TranslationBase.of(context).cancel_nocaps,
okFunction: () => { okFunction: () => {
widget.model.deleteAddresses(widget.address).then((_) { ConfirmDialog.closeAlertDialog(context),
ConfirmDialog.closeAlertDialog(context); setState(() {
AppToast.showErrorToast( widget.model.deleteAddresses(widget.address).then((_) {
message: TranslationBase.of(context).deletedAddress, AppToast.showSuccessToast(
// "Address has been deleted" message: TranslationBase.of(context).deletedAddress,
); );
}) // widget.model.getAddressesList();
});
}),
}, },
cancelFunction: () => {}); cancelFunction: () => {});
dialog.showAlertDialog(context); dialog.showAlertDialog(context);
setState(() {
widget.model.deleteAddresses(widget.address);
});
}, },
icon: Icon( icon: Icon(
Icons.delete, Icons.delete,

@ -30,8 +30,9 @@ dynamic languageID;
class PharmacyProfilePage extends StatefulWidget { class PharmacyProfilePage extends StatefulWidget {
final bool moveToOrder; final bool moveToOrder;
final Function(int) changeTab;
PharmacyProfilePage({@required this.moveToOrder}); PharmacyProfilePage({@required this.moveToOrder, this.changeTab});
@override @override
_ProfilePageState createState() => _ProfilePageState(); _ProfilePageState createState() => _ProfilePageState();
@ -114,6 +115,9 @@ class _ProfilePageState extends State<PharmacyProfilePage> {
showPharmacyCart: false, showPharmacyCart: false,
showHomeAppBarIcon: false, showHomeAppBarIcon: false,
isMainPharmacyPages: true, isMainPharmacyPages: true,
backButtonTab: () {
widget.changeTab(0);
},
body: user != null body: user != null
? Container( ? Container(
color: Colors.white, color: Colors.white,

@ -58,7 +58,7 @@ class OrderDetailsService extends BaseService{
reviewBody["store_id"] = 2; reviewBody["store_id"] = 2;
reviewBody["title"] = ""; reviewBody["title"] = "";
body['review'] = reviewBody; body['review'] = reviewBody;
await baseAppClient.post("$PHARMACY_MAKE_REVIEW", await baseAppClient.postPharmacy("$PHARMACY_MAKE_REVIEW",
onSuccess: (response, statusCode) async { onSuccess: (response, statusCode) async {
/* /*
"success": { "success": {

@ -104,7 +104,7 @@ class PharmacyAddressService extends BaseService {
response['customers'][0]['addresses'].forEach((item) { response['customers'][0]['addresses'].forEach((item) {
addresses.add(AddressInfo.fromJson(item)); addresses.add(AddressInfo.fromJson(item));
}); });
getAddresses(); // getAddresses();
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -1011,7 +1011,7 @@ class TranslationBase {
String get deleteAddress => localizedValues['deleteAddress'][locale.languageCode]; String get deleteAddress => localizedValues['deleteAddress'][locale.languageCode];
String get deletedAddress => localizedValues['deletedAddress'][locale.languageCode]; String get deletedAddress => localizedValues['deletedAddres'][locale.languageCode];
String get addNewAddress => localizedValues['addNewAddress'][locale.languageCode]; String get addNewAddress => localizedValues['addNewAddress'][locale.languageCode];
@ -2818,6 +2818,7 @@ class TranslationBase {
String get requestedDateLiveCare => localizedValues["requestedDateLiveCare"][locale.languageCode]; String get requestedDateLiveCare => localizedValues["requestedDateLiveCare"][locale.languageCode];
String get yourTurn => localizedValues["yourTurn"][locale.languageCode]; String get yourTurn => localizedValues["yourTurn"][locale.languageCode];
String get patients => localizedValues["patients"][locale.languageCode]; String get patients => localizedValues["patients"][locale.languageCode];
String get group => localizedValues["group"][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

Loading…
Cancel
Save