Merge branch 'fix_eye_balance' into 'development'

Fix eye balance

See merge request Cloud_Solution/diplomatic-quarter!293
merge-requests/294/merge
Mohammad Aljammal 4 years ago
commit 256ffd05ea

@ -17,12 +17,12 @@ const BASE_URL = 'https://uat.hmgwebservices.com/';
// const BASE_URL = 'https://hmgwebservices.com/';
// Pharmacy UAT URLs
// const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
const BASE_PHARMACY_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
const PHARMACY_BASE_URL = 'https://uat.hmgwebservices.com/epharmacy/api/';
// Pharmacy Production URLs
const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
// const BASE_PHARMACY_URL = 'https://mdlaboratories.com/exacartapi/api/';
// const PHARMACY_BASE_URL = 'https://mdlaboratories.com/exacartapi/api/';
const PING_SERVICE = 'Services/Weather.svc/REST/CheckConnectivity';
@ -220,6 +220,10 @@ const GET_PATIENT_SHARE =
const GET_PATIENT_APPOINTMENT_HISTORY =
"Services/Doctors.svc/REST/PateintHasAppoimentHistory";
const SEND_REPORT_EYE_EMAIL = "Services/Notifications.svc/REST/SendGlassesPrescriptionEmail";
const SEND_CONTACT_LENS_PRESCRIPTION_EMAIL = "Services/Notifications.svc/REST/SendContactLensPrescriptionEmail";
//URL to get patient appointment curfew history
const GET_PATIENT_APPOINTMENT_CURFEW_HISTORY =
"Services/Doctors.svc/REST/AppoimentHistoryForCurfew";

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:intl/intl.dart';
import '../../../locator.dart';
import '../base_service.dart';
class CustomerAddressesService extends BaseService {
@ -9,6 +11,7 @@ class CustomerAddressesService extends BaseService {
List<AddressInfo> addressesList = List();
CustomerInfo customerInfo;
Future addAddressInfo({ AddNewAddressRequestModel
addNewAddressRequestModel }) async {
@ -25,7 +28,7 @@ class CustomerAddressesService extends BaseService {
var date = f.format(DateTime.now().toUtc()) + " GMT";
addNewAddressRequestModel.customer.addresses[0].createdOnUtc = date;
hasError = false;
await baseAppClient.post(BASE_PHARMACY_URL+ADD_ADDRESS_INFO,
await baseAppClient.post(ADD_CUSTOMER_ADDRESS,
onSuccess: (dynamic response, int statusCode) {
addressesList.clear();
response["customers"][0]["addresses"].forEach((data) {
@ -35,7 +38,7 @@ class CustomerAddressesService extends BaseService {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: addNewAddressRequestModel.toJson(), isExternal: true, isAllowAny: true);
}, body: addNewAddressRequestModel.toJson(), isAllowAny: true);
}
Future getCustomerAddresses() async {

@ -115,7 +115,9 @@ class BaseAppClient {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': pharmacyToken,
'Mobilenumber': user['MobileNumber'].toString(),
'Mobilenumber': user != null
? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
: "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user['PatientID'].toString(),
};
@ -237,7 +239,7 @@ class BaseAppClient {
'Accept': 'application/json',
'Authorization': token ?? '',
'Mobilenumber': user != null
? getPhoneNumberWithoutZero(user['MobileNumber'].toString())
? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
: "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
@ -477,7 +479,7 @@ class BaseAppClient {
'Accept': 'application/json',
'Authorization': token ?? '',
'Mobilenumber': user != null
? getPhoneNumberWithoutZero(user['MobileNumber'].toString())
? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
: "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
@ -772,7 +774,7 @@ class BaseAppClient {
'Accept': 'application/json',
'Authorization': token ?? '',
'Mobilenumber': user != null
? getPhoneNumberWithoutZero(user['MobileNumber'].toString())
? Utils.getPhoneNumberWithoutZero(user['MobileNumber'].toString())
: "",
'Statictoken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9',
'Username': user != null ? user['PatientID'].toString() : "",
@ -858,12 +860,3 @@ class BaseAppClient {
}
}
}
getPhoneNumberWithoutZero(String number) {
String newNumber = number;
if (number.startsWith('0')) {
newNumber = number.substring(1);
}
return newNumber;
}

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
class EyeService extends BaseService {
List<AppoimentAllHistoryResultList> appoimentAllHistoryResultList = List();
@ -23,4 +24,53 @@ class EyeService extends BaseService {
super.error = error;
}, body: body);
}
sendGlassesPrescriptionEmail({int appointmentNo,String projectName,int projectID}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['PatientIditificationNum'] = user.patientIdentificationNo;
body['PatientName'] = user.firstName+" "+user.lastName;
body['To'] = user.emailAddress;
body['SetupID'] = user.setupID;
body['DateofBirth'] = user.dateofBirth;
body['ProjectID'] = projectID;
body['AppointmentNo'] = appointmentNo;
body['ProjectName'] = projectName;
body['PatientID'] = user.patientID;
body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber);
await baseAppClient.post(SEND_REPORT_EYE_EMAIL,
onSuccess: (response, statusCode) async {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
sendContactLensPrescriptionEmail({int appointmentNo,String projectName,int projectID}) async {
hasError = false;
super.error = "";
Map<String, dynamic> body = Map();
body['isDentalAllowedBackend'] = false;
body['AppointmentNo'] = appointmentNo;
body['PatientIditificationNum'] = user.patientIdentificationNo;
body['PatientName'] = user.firstName+" "+user.lastName;
body['To'] = user.emailAddress;
body['SetupID'] = user.setupID;
body['DateofBirth'] = user.dateofBirth;
body['ProjectID'] = projectID;
body['AppointmentNo'] = appointmentNo;
body['ProjectName'] = projectName;
body['PatientID'] = user.patientID;
body['PatientMobileNumber'] = Utils.getPhoneNumberWithoutZero(user.mobileNumber);
await baseAppClient.post(SEND_CONTACT_LENS_PRESCRIPTION_EMAIL,
onSuccess: (response, statusCode) async {
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;
}, body: body);
}
}

@ -55,7 +55,7 @@ class Addresses {
String firstName;
String lastName;
String email;
Null company;
dynamic company;
int countryId;
String country;
Null stateProvinceId;
@ -64,7 +64,7 @@ class Addresses {
String address2;
String zipPostalCode;
String phoneNumber;
Null faxNumber;
dynamic faxNumber;
String customerAttributes;
String createdOnUtc;
Null province;

@ -40,6 +40,8 @@ class HomeHealthCareViewModel extends BaseViewModel {
PharmacyModuleService _pharmacyModuleService = locator<PharmacyModuleService>();
bool get isOrderUpdated => _homeHealthCareService.isOrderUpdated;
GetHHCAllPresOrdersResponseModel pendingOrder;
@ -136,9 +138,13 @@ class HomeHealthCareViewModel extends BaseViewModel {
{AddNewAddressRequestModel addNewAddressRequestModel}) async {
setState(ViewState.Busy);
await _pharmacyModuleService.generatePharmacyToken().then((value) async{
await _customerAddressesService.addAddressInfo(
addNewAddressRequestModel: addNewAddressRequestModel
);
});
if (_customerAddressesService.hasError) {
error = _customerAddressesService.error;
setState(ViewState.ErrorLocal);

@ -43,4 +43,34 @@ class EyeViewModel extends BaseViewModel {
setState(ViewState.Idle);
}
}
sendGlassesPrescriptionEmail({int appointmentNo, String projectName, int projectID}) async {
setState(ViewState.Busy);
await _eyeService.sendGlassesPrescriptionEmail(
appointmentNo: appointmentNo,
projectID: projectID,
projectName: projectName);
if (_eyeService.hasError) {
error = _eyeService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
sendContactLensPrescriptionEmail({int appointmentNo, String projectName, int projectID}) async {
setState(ViewState.Busy);
await _eyeService.sendContactLensPrescriptionEmail(
appointmentNo: appointmentNo,
projectID: projectID,
projectName: projectName);
if (_eyeService.hasError) {
error = _eyeService.error;
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
}
}
}

@ -122,6 +122,7 @@ class _LocationPageState
}
});
await model.addAddressInfo(
addNewAddressRequestModel: addNewAddressRequestModel);
if (model.state == ViewState.ErrorLocal) {
@ -130,7 +131,7 @@ class _LocationPageState
AppToast.showSuccessToast(
message: "Address Added Successfully");
}
Navigator.of(context).pop();
Navigator.of(context).pop(addNewAddressRequestModel);
},
label: TranslationBase.of(context).addNewAddress,
),

@ -237,7 +237,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.10,
height: 90,
width: double.infinity,
padding: EdgeInsets.all(18),
child: SecondaryButton(

@ -49,7 +49,7 @@ class MyBalancePage extends StatelessWidget {
width: double.infinity,
height: 65,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
color: Colors.red[700],
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7),
),
@ -79,7 +79,7 @@ class MyBalancePage extends StatelessWidget {
height: 65,
margin: EdgeInsets.only(top: 8),
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
color: Colors.white,
shape: BoxShape.rectangle,
borderRadius: BorderRadius.circular(7),
),

@ -1,17 +1,28 @@
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
class ClassesPage extends StatelessWidget {
final ListHISGetGlassPerscription glassPerscription;
final int appointmentNo;
final String projectName;
final int projectID;
const ClassesPage({Key key, this.glassPerscription}) : super(key: key);
const ClassesPage(
{Key key,
this.glassPerscription,
this.appointmentNo,
this.projectName,
this.projectID})
: super(key: key);
@override
Widget build(BuildContext context) {
@ -38,11 +49,16 @@ class ClassesPage extends StatelessWidget {
bold: true,
),
),
getRow(TranslationBase.of(context).sphere, '${glassPerscription.rightEyeSpherical}', '-'),
getRow(TranslationBase.of(context).cylinder, '${glassPerscription.rightEyeCylinder}', '-'),
getRow(TranslationBase.of(context).axis, '${glassPerscription.rightEyeAxis}', '-'),
getRow(TranslationBase.of(context).prism, '${glassPerscription.rightEyePrism}', '-'),
getRow(TranslationBase.of(context).va, '${glassPerscription.rightEyeVA}', '-'),
getRow(TranslationBase.of(context).sphere,
'${glassPerscription.rightEyeSpherical}', '-'),
getRow(TranslationBase.of(context).cylinder,
'${glassPerscription.rightEyeCylinder}', '-'),
getRow(TranslationBase.of(context).axis,
'${glassPerscription.rightEyeAxis}', '-'),
getRow(TranslationBase.of(context).prism,
'${glassPerscription.rightEyePrism}', '-'),
getRow(TranslationBase.of(context).va,
'${glassPerscription.rightEyeVA}', '-'),
],
),
),
@ -65,11 +81,16 @@ class ClassesPage extends StatelessWidget {
bold: true,
),
),
getRow(TranslationBase.of(context).sphere, '${glassPerscription.leftEyeSpherical}', '-'),
getRow(TranslationBase.of(context).cylinder, '${glassPerscription.leftEyeCylinder}', '-'),
getRow(TranslationBase.of(context).axis, '${glassPerscription.leftEyeAxis}', '-'),
getRow(TranslationBase.of(context).prism, '${glassPerscription.leftEyePrism}', '-'),
getRow(TranslationBase.of(context).va, '${glassPerscription.leftEyeVA}', '-'),
getRow(TranslationBase.of(context).sphere,
'${glassPerscription.leftEyeSpherical}', '-'),
getRow(TranslationBase.of(context).cylinder,
'${glassPerscription.leftEyeCylinder}', '-'),
getRow(TranslationBase.of(context).axis,
'${glassPerscription.leftEyeAxis}', '-'),
getRow(TranslationBase.of(context).prism,
'${glassPerscription.leftEyePrism}', '-'),
getRow(TranslationBase.of(context).va,
'${glassPerscription.leftEyeVA}', '-'),
],
),
),
@ -80,6 +101,16 @@ class ClassesPage extends StatelessWidget {
width: double.infinity,
child: SecondaryButton(
label: TranslationBase.of(context).sendEmail,
onTap: () {
showConfirmMessage(context, () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.sendGlassesPrescriptionEmail(
appointmentNo: appointmentNo,
projectName: projectName,
projectID: projectID);
GifLoaderDialogUtils.hideDialog(context);
}, model.user.emailAddress);
},
textColor: Colors.white,
color: Colors.red[700],
icon: Icon(
@ -96,6 +127,19 @@ class ClassesPage extends StatelessWidget {
);
}
void showConfirmMessage(
BuildContext context, GestureTapCallback onTap, String email) {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: email,
onTapSendEmail: () {
onTap();
},
),
);
}
Widget getRow(String title, String val1, String val2) => Padding(
padding: const EdgeInsets.all(8.0),
child: Column(

@ -1,8 +1,12 @@
import 'package:diplomaticquarterapp/core/model/eye/AppoimentAllHistoryResult.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/EyeViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_send_email_dialog.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
@ -10,14 +14,24 @@ import 'package:provider/provider.dart';
class ContactLensPage extends StatelessWidget {
final ListHISGetContactLensPerscription listHISGetContactLensPerscription;
final int appointmentNo;
final String projectName;
final int projectID;
const ContactLensPage({Key key, this.listHISGetContactLensPerscription})
const ContactLensPage(
{Key key,
this.listHISGetContactLensPerscription,
this.appointmentNo,
this.projectName,
this.projectID})
: super(key: key);
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
return BaseView<EyeViewModel>(
builder: (_,model,w)=>
AppScaffold(
body: SingleChildScrollView(
child: Container(
margin: EdgeInsets.only(top: 70, left: 15, right: 15, bottom: 15),
@ -39,16 +53,20 @@ class ContactLensPage extends StatelessWidget {
bold: true,
),
),
getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription.brand}'),
getRow('B.C', '${listHISGetContactLensPerscription.baseCurve}'),
getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription.power}'),
getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription.diameter}'),
getRow(TranslationBase.of(context).brand,
'${listHISGetContactLensPerscription.brand}'),
getRow('B.C',
'${listHISGetContactLensPerscription.baseCurve}'),
getRow(TranslationBase.of(context).power,
'${listHISGetContactLensPerscription.power}'),
getRow(TranslationBase.of(context).diameter,
'${listHISGetContactLensPerscription.diameter}'),
getRow('OZ', '${listHISGetContactLensPerscription.oZ}'),
getRow('CT', '${listHISGetContactLensPerscription.cT}'),
getRow('Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).reminder, '${listHISGetContactLensPerscription.remarks}'),
getRow(
'Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).reminder,
'${listHISGetContactLensPerscription.remarks}'),
],
),
),
@ -71,14 +89,20 @@ class ContactLensPage extends StatelessWidget {
bold: true,
),
),
getRow(TranslationBase.of(context).brand, '${listHISGetContactLensPerscription.brand}'),
getRow('B.C', '${listHISGetContactLensPerscription.baseCurve}'),
getRow(TranslationBase.of(context).power, '${listHISGetContactLensPerscription.power}'),
getRow(TranslationBase.of(context).diameter, '${listHISGetContactLensPerscription.diameter}'),
getRow(TranslationBase.of(context).brand,
'${listHISGetContactLensPerscription.brand}'),
getRow('B.C',
'${listHISGetContactLensPerscription.baseCurve}'),
getRow(TranslationBase.of(context).power,
'${listHISGetContactLensPerscription.power}'),
getRow(TranslationBase.of(context).diameter,
'${listHISGetContactLensPerscription.diameter}'),
getRow('OZ', '${listHISGetContactLensPerscription.oZ}'),
getRow('CT', '${listHISGetContactLensPerscription.cT}'),
getRow('Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).reminder, '${listHISGetContactLensPerscription.remarks}'),
getRow(
'Blend', '${listHISGetContactLensPerscription.blend}'),
getRow(TranslationBase.of(context).reminder,
'${listHISGetContactLensPerscription.remarks}'),
],
),
),
@ -92,6 +116,16 @@ class ContactLensPage extends StatelessWidget {
label: TranslationBase.of(context).sendEmail,
textColor: Colors.white,
color: Colors.red[700],
onTap: (){
showConfirmMessage(context, () async {
GifLoaderDialogUtils.showMyDialog(context);
await model.sendContactLensPrescriptionEmail(
appointmentNo: appointmentNo,
projectName: projectName,
projectID: projectID);
GifLoaderDialogUtils.hideDialog(context);
}, model.user.emailAddress);
},
icon: Icon(
Icons.email,
color: Colors.white,
@ -102,6 +136,7 @@ class ContactLensPage extends StatelessWidget {
),
),
),
),
);
}
@ -130,4 +165,18 @@ class ContactLensPage extends StatelessWidget {
],
),
);
void showConfirmMessage(
BuildContext context, GestureTapCallback onTap, String email) {
showDialog(
context: context,
child: ConfirmSendEmailDialog(
email: email,
onTapSendEmail: () {
onTap();
},
),
);
}
}

@ -43,6 +43,7 @@ class _EyeHomePageState extends State<EyeHomePage>
Widget build(BuildContext context) {
return AppScaffold(
isShowAppBar: true,
isShowDecPage: false,
appBarTitle: TranslationBase.of(context).measurements,
body: Scaffold(
extendBodyBehindAppBar: true,
@ -81,13 +82,13 @@ class _EyeHomePageState extends State<EyeHomePage>
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.27,
width: MediaQuery.of(context).size.width * 0.40,
child: Center(
child: Texts(TranslationBase.of(context).classes),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.27,
width: MediaQuery.of(context).size.width * 0.40,
child: Center(
child: Texts(TranslationBase.of(context).contactLens),
),
@ -110,11 +111,15 @@ class _EyeHomePageState extends State<EyeHomePage>
ClassesPage(
glassPerscription: widget.appointmentAllHistoryResultList
.listHISGetGlassPerscription[0],
appointmentNo: widget.appointmentAllHistoryResultList.appointmentNo,
projectName: widget.appointmentAllHistoryResultList.projectName,
projectID: widget.appointmentAllHistoryResultList.projectID,
),
ContactLensPage(
listHISGetContactLensPerscription: widget
.appointmentAllHistoryResultList
.listHISGetContactLensPerscription[0],
listHISGetContactLensPerscription: widget.appointmentAllHistoryResultList.listHISGetContactLensPerscription[0],
appointmentNo: widget.appointmentAllHistoryResultList.appointmentNo,
projectName: widget.appointmentAllHistoryResultList.projectName,
projectID: widget.appointmentAllHistoryResultList.projectID,
)
],
),

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/AlHabibMedicalService/add_new_address_Request_Model.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/PrescriptionDeliveryViewModel.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/AlHabibMedicalService/HomeHealthCare/NewHomeHealthCare/location_page.dart';
@ -212,7 +213,51 @@ class _PrescriptionDeliveryAddressPageState
latitude: latitude,
longitude: longitude,
)),
).then((value) {
if (value != null &&
value is AddNewAddressRequestModel) {
setState(() {
_selectedAddress = AddressInfo(
id: value.customer.id.toString(),
email: value.customer.email,
firstName: value.customer.addresses[0].firstName,
lastName: value.customer.addresses[0].lastName,
address1: value.customer.addresses[0].address1,
address2: value.customer.addresses[0].address2,
city: value.customer.addresses[0].city,
country: value.customer.addresses[0].country,
phoneNumber: value.customer.addresses[0].phoneNumber,
latLong: value.customer.addresses[0].latLong,
company: value.customer.addresses[0].company,
countryId: value.customer.addresses[0].countryId,
createdOnUtc: value.customer.addresses[0].createdOnUtc,
customerAttributes: value.customer.addresses[0].customerAttributes,
faxNumber: value.customer.addresses[0].faxNumber,
province: value.customer.addresses[0].province,
stateProvinceId: value.customer.addresses[0].stateProvinceId,
zipPostalCode: value.customer.addresses[0].zipPostalCode,
);
List latLongArr = _selectedAddress.latLong.split(',');
latitude = double.parse(latLongArr[0]);
longitude = double.parse(latLongArr[1]);
markers = Set();
markers.add(
Marker(
markerId: MarkerId(
_selectedAddress.latLong.hashCode.toString(),
),
position: LatLng(latitude, longitude),
),
);
_kGooglePlex = CameraPosition(
target: LatLng(latitude, longitude),
zoom: 14.4746,
);
});
}
});
},
),
),

@ -106,26 +106,26 @@ class _HomeReportPageState extends State<HomeReportPage>
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.15,
width: MediaQuery.of(context).size.width * 0.20,
child: Center(
child: Texts(TranslationBase.of(context).requested,fontSize: 11,),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.15,
width: MediaQuery.of(context).size.width * 0.20,
child: Center(
child: Texts(TranslationBase.of(context).ready,fontSize: 11,),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.15,
width: MediaQuery.of(context).size.width * 0.20,
child: Center(
child:
Texts(TranslationBase.of(context).completed,fontSize: 11,),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.15,
width: MediaQuery.of(context).size.width * 0.20,
child: Center(
child:
Texts(TranslationBase.of(context).cancelled,fontSize: 11,),

@ -48,9 +48,7 @@ class MedicalReports extends StatelessWidget {
)),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: Container(
Container(
margin: EdgeInsets.only(left: 5, right: 5),
child: LargeAvatar(
width: 50,
@ -59,7 +57,6 @@ class MedicalReports extends StatelessWidget {
url: model.appointHistoryList[index].doctorImageURL,
),
),
),
Expanded(
flex: 4,
child: Padding(
@ -85,13 +82,11 @@ class MedicalReports extends StatelessWidget {
),
),
),
Expanded(
flex: 1,
child: InkWell(
InkWell(
onTap: () =>
confirmBox(model.appointHistoryList[index], model),
child: Container(
width: 85,
width: 120,
height: 50,
decoration: BoxDecoration(
color: Colors.black54,
@ -111,7 +106,6 @@ class MedicalReports extends StatelessWidget {
),
),
),
),
SizedBox(
width: 12,
),

@ -81,7 +81,7 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
height: 20,
decoration: BoxDecoration(
shape: BoxShape.rectangle,
color: Colors.grey),
color: Colors.red),
),
SizedBox(width: 5,),
Texts(TranslationBase.of(context).diastolicLng)
@ -125,7 +125,6 @@ class LineChartCurvedBloodPressure extends StatelessWidget {
fontSize: 10,
),
rotateAngle: -65,
//rotateAngle:-65,
margin: 22,
getTitles: (value) {
if (timeSeries1.length < 15) {

Loading…
Cancel
Save