Booking Filters Update

merge-update-with-lab-changes
Mirza.Shafique 5 years ago
parent 3af1676730
commit afb08fcd0a

@ -52,6 +52,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
final GlobalKey clinicDropdownKey = GlobalKey(); final GlobalKey clinicDropdownKey = GlobalKey();
final GlobalKey projectDropdownKey = GlobalKey(); final GlobalKey projectDropdownKey = GlobalKey();
TextEditingController ageController = new TextEditingController();
ProjectViewModel projectViewModel; ProjectViewModel projectViewModel;
String radioValue = null; String radioValue = null;
@ -65,12 +66,30 @@ class _SearchByClinicState extends State<SearchByClinic> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectViewModel = Provider.of(context); projectViewModel = Provider.of(context);
if (radioValue == null) radioValue = TranslationBase.of(context).female; if (projectViewModel.isLogin) {
if (radioValue == null) {
if (projectViewModel.user.gender == 1) {
radioValue = TranslationBase.of(context).male;
} else {
radioValue = TranslationBase.of(context).female;
}
}
} else if (radioValue == null) {
radioValue = TranslationBase.of(context).female;
}
if (ageController.text.isEmpty) {
ageController.text = projectViewModel.isLogin ? projectViewModel.user.age.toString() : "";
ageController.selection = TextSelection.fromPosition(TextPosition(offset: ageController.text.length));
}
return Container( return Container(
child: SingleChildScrollView( child: SingleChildScrollView(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
if (projectViewModel.isLogin)
Column(
children: [
Padding( Padding(
padding: const EdgeInsets.only( padding: const EdgeInsets.only(
left: 20, left: 20,
@ -159,7 +178,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
width: double.infinity, width: double.infinity,
decoration: containerRadius(Colors.white, 12), decoration: containerRadius(Colors.white, 12),
margin: EdgeInsets.only(left: 20, right: 20), margin: EdgeInsets.only(left: 20, right: 20),
padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 12), padding: EdgeInsets.only(left: 10, right: 10, top: 12, bottom: 2),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
@ -172,17 +191,33 @@ class _SearchByClinicState extends State<SearchByClinic> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
Text( TextField(
projectViewModel.isLogin ? projectViewModel.user.age.toString() : "", controller: ageController,
style: TextStyle( style: TextStyle(
fontSize: 15, fontSize: 15,
letterSpacing: -0.59, letterSpacing: -0.59,
color: Colors.black, color: Colors.black,
), ),
decoration: InputDecoration(
contentPadding: EdgeInsets.zero,
border: OutlineInputBorder(
borderSide: BorderSide.none,
),
), ),
),
// Text(
// projectViewModel.isLogin ? projectViewModel.user.age.toString() : "",
// style: TextStyle(
// fontSize: 15,
// letterSpacing: -0.59,
// color: Colors.black,
// ),
// ),
], ],
), ),
), ),
],
),
Padding( Padding(
padding: const EdgeInsets.only(left: 6, right: 6, top: 16), padding: const EdgeInsets.only(left: 6, right: 6, top: 16),
child: Row( child: Row(

@ -208,7 +208,7 @@ class ConfirmPaymentPage extends StatelessWidget {
transID = Utils.getAdvancePaymentTransID(advanceModel.hospitalsModel.iD, int.parse(advanceModel.fileNumber)); transID = Utils.getAdvancePaymentTransID(advanceModel.hospitalsModel.iD, int.parse(advanceModel.fileNumber));
browser.openPaymentBrowser(amount, "Advance Payment", transID, advanceModel.hospitalsModel.iD.toString(), advanceModel.email, paymentMethod, patientInfoAndMobileNumber.patientType, browser.openPaymentBrowser(amount, "Advance Payment", transID, advanceModel.hospitalsModel.iD.toString(), advanceModel.email, paymentMethod, patientInfoAndMobileNumber.patientType,
advanceModel.patientName, advanceModel.fileNumber, authenticatedUser, browser, false); advanceModel.patientName, advanceModel.fileNumber, authenticatedUser, browser, false,null,null);
} }
onBrowserLoadStart(String url) { onBrowserLoadStart(String url) {

Loading…
Cancel
Save