updates & fixes

merge-update-with-lab-changes
haroon amjad 4 years ago
parent 330f2d6c86
commit 9c0337aa01

@ -1,11 +1,11 @@
import 'PointsAmountPerday.dart'; import 'PointsAmountPerday.dart';
class PointsAmountPerMonth { class PointsAmountPerMonth {
double amountPerMonth; dynamic amountPerMonth;
String month; dynamic month;
int monthNumber; int monthNumber;
List<PointsAmountPerday> pointsAmountPerday; List<PointsAmountPerday> pointsAmountPerday;
double pointsPerMonth; dynamic pointsPerMonth;
PointsAmountPerMonth( PointsAmountPerMonth(
{this.amountPerMonth, {this.amountPerMonth,

@ -201,9 +201,9 @@ class _BookConfirmState extends State<BookConfirm> {
disabledColor: new Color(0xFFbcc2c4), disabledColor: new Color(0xFFbcc2c4),
onPressed: () async { onPressed: () async {
if (await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) != null && !await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) { if (await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) != null && !await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) {
insertAppointment(context, widget.doctor);
} else {
insertLiveCareScheduledAppointment(context, widget.doctor); insertLiveCareScheduledAppointment(context, widget.doctor);
} else {
insertAppointment(context, widget.doctor);
} }
}, },
child: Text(TranslationBase.of(context).bookAppo, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48)), child: Text(TranslationBase.of(context).bookAppo, style: TextStyle(fontSize: 16.0, letterSpacing: -0.48)),
@ -249,7 +249,7 @@ class _BookConfirmState extends State<BookConfirm> {
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) { if (res['MessageStatus'] == 1) {
Future.delayed(new Duration(milliseconds: 1500), () async { Future.delayed(new Duration(milliseconds: 1500), () async {
if (!await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) { if (await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT) != null && !await this.sharedPref.getBool(IS_LIVECARE_APPOINTMENT)) {
insertAppointment(context, widget.doctor); insertAppointment(context, widget.doctor);
} else { } else {
insertLiveCareScheduledAppointment(context, widget.doctor); insertLiveCareScheduledAppointment(context, widget.doctor);
@ -376,7 +376,6 @@ class _BookConfirmState extends State<BookConfirm> {
getLiveCareAppointmentPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) { getLiveCareAppointmentPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, context).then((res) { widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res); widget.patientShareResponse = new PatientShareResponse.fromJson(res);
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
navigateToBookSuccess(context, docObject, widget.patientShareResponse); navigateToBookSuccess(context, docObject, widget.patientShareResponse);

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart'; import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart'; import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/reminder_dialog.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ArrivedButtons.dart';
@ -14,6 +15,7 @@ import 'package:diplomaticquarterapp/pages/MyAppointments/models/BookedButtonsAl
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtons.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/ConfirmedButtonsAllowCheckIn.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/askDocDialog.dart';
import 'package:diplomaticquarterapp/pages/ToDoList/ToDo.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart'; import 'package:diplomaticquarterapp/pages/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart'; import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart';
@ -57,6 +59,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
ToDoCountProviderModel model = Provider.of<ToDoCountProviderModel>(context);
var size = MediaQuery.of(context).size; var size = MediaQuery.of(context).size;
final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2; final double itemHeight = projectViewModel.isArabic ? ((size.height - kToolbarHeight - 24) * 0.5) / 2 : ((size.height - kToolbarHeight - 24) * 0.45) / 2;
final double itemWidth = size.width / 2; final double itemWidth = size.width / 2;
@ -72,7 +75,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
onTap: shouldEnable onTap: shouldEnable
? null ? null
: () { : () {
_handleButtonClicks(appoButtonsList[index]); _handleButtonClicks(appoButtonsList[index], model);
}, },
child: MedicalProfileItem( child: MedicalProfileItem(
title: appoButtonsList[index].title, title: appoButtonsList[index].title,
@ -88,7 +91,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
); );
} }
_handleButtonClicks(AppoDetailsButton) { _handleButtonClicks(AppoDetailsButton, ToDoCountProviderModel model) {
switch (AppoDetailsButton.caller) { switch (AppoDetailsButton.caller) {
case "openReschedule": case "openReschedule":
widget.tabController.animateTo((widget.tabController.index + 1) % 2); widget.tabController.animateTo((widget.tabController.index + 1) % 2);
@ -113,7 +116,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
); );
break; break;
case "goToTodoList": case "goToTodoList":
Navigator.of(context).pop(); // Navigator.of(context).pop();
navigateToToDoPage(context, model);
break; break;
case "askDoc": case "askDoc":
askYourDoc(); askYourDoc();
@ -556,6 +560,18 @@ class _AppointmentActionsState extends State<AppointmentActions> {
))); )));
} }
navigateToToDoPage(BuildContext context, ToDoCountProviderModel model) {
if (widget.projectViewModel.isLogin) {
if (model.count != 0) {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).upcomingEmpty);
}
} else {
Navigator.push(context, FadePage(page: ToDo(isShowAppBar: true)));
}
}
rateAppointment() { rateAppointment() {
widget.browser = new MyInAppBrowser(); widget.browser = new MyInAppBrowser();
var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1'; var url = 'http://hmg.com/SitePages/pso.aspx?p=' + widget.appo.projectID.toString() + '.' + widget.appo.appointmentNo.toString() + '&c=1';

@ -66,7 +66,7 @@ class _LakumPointsYearPageState extends State<LakumPointsYearPage> {
(index) => LakumPointTableRowWidget( (index) => LakumPointTableRowWidget(
false, false,
widget.pointsAmountPerYear[widget.selectedIndexYear] widget.pointsAmountPerYear[widget.selectedIndexYear]
.pointsAmountPerMonth[index].month, .pointsAmountPerMonth[index].month.toString(),
widget.pointsAmountPerYear[widget.selectedIndexYear] widget.pointsAmountPerYear[widget.selectedIndexYear]
.pointsAmountPerMonth[index].pointsPerMonth, .pointsAmountPerMonth[index].pointsPerMonth,
widget.pointsAmountPerYear[widget.selectedIndexYear] widget.pointsAmountPerYear[widget.selectedIndexYear]

@ -57,13 +57,11 @@ class AvailabilityInfo extends StatelessWidget {
icon: Icon(Icons.location_on), icon: Icon(Icons.location_on),
color: Colors.red, color: Colors.red,
onPressed: () async { onPressed: () async {
// if (await MapLauncher.isMapAvailable(MapType.apple)) { await MapLauncher.showMarker(
await MapLauncher.showMarker( mapType: MapType.google,
mapType: MapType.google, coords: Coords(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude)),
coords: Coords(double.parse(previousModel.productLocationService[index].latitude), double.parse(previousModel.productLocationService[index].longitude)), title: previousModel.productLocationService[index].locationDescription,
title: previousModel.productLocationService[index].locationDescription, );
);
// }
}, },
), ),
), ),

@ -280,7 +280,7 @@ class _ProfileSettings extends State<ProfileSettings> with TickerProviderStateMi
TextField( TextField(
enabled: isEnable, enabled: isEnable,
scrollPadding: EdgeInsets.zero, scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.number, keyboardType: TextInputType.emailAddress,
controller: _controller, controller: _controller,
// onChanged: (value) => {validateForm()}, // onChanged: (value) => {validateForm()},
style: TextStyle( style: TextStyle(

@ -187,7 +187,7 @@ class LabResultWidget extends StatelessWidget {
), ),
Utils.tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: true), Utils.tableColumnValue(labResultList[i].resultValue + " " + labResultList[i].uOM, isLast: true),
Utils.tableColumnValue(labResultList[i].referanceRange, isLast: true, isCapitable: false), Utils.tableColumnValue(labResultList[i].referanceRange, isLast: true, isCapitable: false),
InkWell( !checkIfCovidLab(patientLabResultList) ? InkWell(
onTap: () { onTap: () {
Navigator.push( Navigator.push(
context, context,
@ -203,7 +203,7 @@ class LabResultWidget extends StatelessWidget {
padding: EdgeInsets.only(left: !projectViewModel.isArabic ? 0 : 12, right: !projectViewModel.isArabic ? 12 : 0), padding: EdgeInsets.only(left: !projectViewModel.isArabic ? 0 : 12, right: !projectViewModel.isArabic ? 12 : 0),
child: Utils.tableColumnValueWithUnderLine(TranslationBase.of(context).viewFlowChart, isLast: true, isCapitable: false), child: Utils.tableColumnValueWithUnderLine(TranslationBase.of(context).viewFlowChart, isLast: true, isCapitable: false),
), ),
), ) : Container(),
], ],
), ),
); );

Loading…
Cancel
Save