pharmacy fixes

merge-requests/574/head
haroon amjad 4 years ago
parent 2ebff634c4
commit c05772c63a

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

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

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

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

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

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

@ -1011,7 +1011,7 @@ class TranslationBase {
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];

Loading…
Cancel
Save