|
|
|
@ -165,6 +165,173 @@ class _BookSuccessState extends State<BookSuccess> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
bottomNavigationBar: getBottomContainer(),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget getBottomContainer() {
|
|
|
|
|
switch (widget.patientShareResponse.nextAction) {
|
|
|
|
|
case 0:
|
|
|
|
|
return Container();
|
|
|
|
|
break;
|
|
|
|
|
case 10:
|
|
|
|
|
return _getConfirmAppoButtons();
|
|
|
|
|
break;
|
|
|
|
|
case 15:
|
|
|
|
|
return _getPaymentPendingAppo();
|
|
|
|
|
break;
|
|
|
|
|
case 20:
|
|
|
|
|
return _getPayNowButtons();
|
|
|
|
|
break;
|
|
|
|
|
case 30:
|
|
|
|
|
return _getQRButtons();
|
|
|
|
|
break;
|
|
|
|
|
case 50:
|
|
|
|
|
return _getConfirmAppoButtons();
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _getQRButtons() {
|
|
|
|
|
return Container(
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.18,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF60686b),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
// navigateToQR(context);
|
|
|
|
|
getAppoQR(context);
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).viewQR.toUpperCase(),
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _getPayNowButtons() {
|
|
|
|
|
return Container(
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.2,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF60686b),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
startPaymentProcess();
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).payNow.toUpperCase(),
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF40ACC9),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
navigateToHome(context);
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).payLater.toUpperCase(),
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _getConfirmAppoButtons() {
|
|
|
|
|
return Container(
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
margin: EdgeInsets.only(bottom: 5.0),
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.15,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF60686b),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
AppoitmentAllHistoryResultList appo =
|
|
|
|
|
new AppoitmentAllHistoryResultList();
|
|
|
|
|
appo.clinicID = widget.docObject.clinicID;
|
|
|
|
|
appo.projectID = widget.docObject.projectID;
|
|
|
|
|
appo.appointmentNo = widget.patientShareResponse.appointmentNo;
|
|
|
|
|
appo.serviceID = widget.patientShareResponse.serviceID;
|
|
|
|
|
appo.isLiveCareAppointment =
|
|
|
|
|
widget.patientShareResponse.isLiveCareAppointment;
|
|
|
|
|
appo.doctorID = widget.patientShareResponse.doctorID;
|
|
|
|
|
confirmAppointment(appo);
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
widget.patientShareResponse.isLiveCareAppointment
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.confirmLiveCare
|
|
|
|
|
.toUpperCase()
|
|
|
|
|
: TranslationBase.of(context).confirm.toUpperCase(),
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF40ACC9),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
navigateToHome(context);
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).confirmLater.toUpperCase(),
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -238,8 +405,7 @@ class _BookSuccessState extends State<BookSuccess> {
|
|
|
|
|
_getBulletPoint("1"),
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
|
child: Text(
|
|
|
|
|
"Please confirm the appointment to avoid the cancellation",
|
|
|
|
|
child: Text(TranslationBase.of(context).upcomingConfirm,
|
|
|
|
|
overflow: TextOverflow.clip,
|
|
|
|
|
style: TextStyle(fontSize: 13.0)),
|
|
|
|
|
),
|
|
|
|
@ -263,7 +429,7 @@ class _BookSuccessState extends State<BookSuccess> {
|
|
|
|
|
Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
|
child: Text(
|
|
|
|
|
"The online payment process will be available 24 hours before the appointment.",
|
|
|
|
|
TranslationBase.of(context).upcomingConfirmMore,
|
|
|
|
|
overflow: TextOverflow.clip,
|
|
|
|
|
style: TextStyle(fontSize: 13.0)),
|
|
|
|
|
),
|
|
|
|
@ -277,67 +443,6 @@ class _BookSuccessState extends State<BookSuccess> {
|
|
|
|
|
margin: EdgeInsets.fromLTRB(50.0, 20.0, 50.0, 20.0),
|
|
|
|
|
child: Image.asset("assets/images/new-design/payment-method.png"),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.32,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF60686b),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
AppoitmentAllHistoryResultList appo =
|
|
|
|
|
new AppoitmentAllHistoryResultList();
|
|
|
|
|
appo.clinicID = widget.docObject.clinicID;
|
|
|
|
|
appo.projectID = widget.docObject.projectID;
|
|
|
|
|
appo.appointmentNo =
|
|
|
|
|
widget.patientShareResponse.appointmentNo;
|
|
|
|
|
appo.serviceID = widget.patientShareResponse.serviceID;
|
|
|
|
|
appo.isLiveCareAppointment =
|
|
|
|
|
widget.patientShareResponse.isLiveCareAppointment;
|
|
|
|
|
appo.doctorID = widget.patientShareResponse.doctorID;
|
|
|
|
|
confirmAppointment(appo);
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
widget.patientShareResponse.isLiveCareAppointment
|
|
|
|
|
? TranslationBase.of(context)
|
|
|
|
|
.confirmLiveCare
|
|
|
|
|
.toUpperCase()
|
|
|
|
|
: TranslationBase.of(context).confirm.toUpperCase(),
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF40ACC9),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
navigateToHome(context);
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).confirmLater.toUpperCase(),
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@ -463,52 +568,6 @@ class _BookSuccessState extends State<BookSuccess> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.2,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF60686b),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
startPaymentProcess();
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).payNow.toUpperCase(),
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF40ACC9),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
navigateToHome(context);
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
TranslationBase.of(context).payLater.toUpperCase(),
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
@ -770,34 +829,34 @@ class _BookSuccessState extends State<BookSuccess> {
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.18,
|
|
|
|
|
child: Column(
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
ButtonTheme(
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
),
|
|
|
|
|
minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
height: 45.0,
|
|
|
|
|
child: RaisedButton(
|
|
|
|
|
color: new Color(0xFF60686b),
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
disabledTextColor: Colors.white,
|
|
|
|
|
disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
onPressed: () {
|
|
|
|
|
// navigateToQR(context);
|
|
|
|
|
getAppoQR(context);
|
|
|
|
|
},
|
|
|
|
|
child: Text(TranslationBase.of(context).viewQR.toUpperCase(),
|
|
|
|
|
style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
// Container(
|
|
|
|
|
// alignment: Alignment.bottomCenter,
|
|
|
|
|
// height: MediaQuery.of(context).size.height * 0.18,
|
|
|
|
|
// child: Column(
|
|
|
|
|
// mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
|
// children: <Widget>[
|
|
|
|
|
// ButtonTheme(
|
|
|
|
|
// shape: RoundedRectangleBorder(
|
|
|
|
|
// borderRadius: BorderRadius.circular(10.0),
|
|
|
|
|
// ),
|
|
|
|
|
// minWidth: MediaQuery.of(context).size.width * 0.7,
|
|
|
|
|
// height: 45.0,
|
|
|
|
|
// child: RaisedButton(
|
|
|
|
|
// color: new Color(0xFF60686b),
|
|
|
|
|
// textColor: Colors.white,
|
|
|
|
|
// disabledTextColor: Colors.white,
|
|
|
|
|
// disabledColor: new Color(0xFFbcc2c4),
|
|
|
|
|
// onPressed: () {
|
|
|
|
|
// // navigateToQR(context);
|
|
|
|
|
// getAppoQR(context);
|
|
|
|
|
// },
|
|
|
|
|
// child: Text(TranslationBase.of(context).viewQR.toUpperCase(),
|
|
|
|
|
// style: TextStyle(fontSize: 18.0)),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|