updates & fixes

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

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

@ -201,9 +201,9 @@ class _BookConfirmState extends State<BookConfirm> {
disabledColor: new Color(0xFFbcc2c4),
onPressed: () async {
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);
} else {
insertAppointment(context, widget.doctor);
}
},
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);
if (res['MessageStatus'] == 1) {
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);
} else {
insertLiveCareScheduledAppointment(context, widget.doctor);
@ -376,7 +376,6 @@ class _BookConfirmState extends State<BookConfirm> {
getLiveCareAppointmentPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
widget.service.getLiveCareAppointmentPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);
GifLoaderDialogUtils.hideDialog(context);
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/models/Appointments/AppoimentAllHistoryResultList.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/MyAppointments/models/AppointmentType.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/ConfirmedButtonsAllowCheckIn.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/insurance/insurance_approval_screen.dart';
import 'package:diplomaticquarterapp/pages/medical/labs/laboratory_result_page.dart';
@ -57,6 +59,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
ToDoCountProviderModel model = Provider.of<ToDoCountProviderModel>(context);
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 itemWidth = size.width / 2;
@ -72,7 +75,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
onTap: shouldEnable
? null
: () {
_handleButtonClicks(appoButtonsList[index]);
_handleButtonClicks(appoButtonsList[index], model);
},
child: MedicalProfileItem(
title: appoButtonsList[index].title,
@ -88,7 +91,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
);
}
_handleButtonClicks(AppoDetailsButton) {
_handleButtonClicks(AppoDetailsButton, ToDoCountProviderModel model) {
switch (AppoDetailsButton.caller) {
case "openReschedule":
widget.tabController.animateTo((widget.tabController.index + 1) % 2);
@ -113,7 +116,8 @@ class _AppointmentActionsState extends State<AppointmentActions> {
);
break;
case "goToTodoList":
Navigator.of(context).pop();
// Navigator.of(context).pop();
navigateToToDoPage(context, model);
break;
case "askDoc":
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() {
widget.browser = new MyInAppBrowser();
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(
false,
widget.pointsAmountPerYear[widget.selectedIndexYear]
.pointsAmountPerMonth[index].month,
.pointsAmountPerMonth[index].month.toString(),
widget.pointsAmountPerYear[widget.selectedIndexYear]
.pointsAmountPerMonth[index].pointsPerMonth,
widget.pointsAmountPerYear[widget.selectedIndexYear]

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

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

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

Loading…
Cancel
Save