Updates & fixes

dev_3.3_faiz_payfort
haroon amjad 10 months ago
parent aa04e943ef
commit fddb423451

@ -21,10 +21,10 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:4422/';
//var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'https://orash.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidauat.cloudsolutions.com.sa/';
// var BASE_URL = 'https://vidamergeuat.cloudsolutions.com.sa/';
@ -342,7 +342,7 @@ var UPDATE_COVID_QUESTIONNAIRE = 'Services/Doctors.svc/REST/COVID19_Questionnari
var CHANNEL = 3;
var GENERAL_ID = 'Cs2020@2016\$2958';
var IP_ADDRESS = '10.20.10.20';
var VERSION_ID = 11.7;
var VERSION_ID = 11.8;
var SETUP_ID = '91877';
var LANGUAGE = 2;
// var PATIENT_OUT_SA = 0;

@ -1903,4 +1903,6 @@ const Map localizedValues = {
"validInsurance": {"en": "Do you have a valid insurance?", "ar": "هل لديك تأمين صالح؟"},
"checkInViaLocation": {"en": "Check-In Via Location", "ar": "تسجيل الوصول عبر الموقع"},
"locationCheckInError": {"en": "Please make sure that you're within the hospital location to perform online check-in.", "ar": "يرجى التأكد من تواجدك داخل موقع المستشفى لإجراء تسجيل الوصول عبر الإنترنت."},
"upcoming": {"en": "Upcoming", "ar": "المواعيد القادمة"},
"noUpcomingAppointment": {"en": "No upcoming appointments", "ar": "لا توجد مواعيد القادمة"},
};

@ -170,7 +170,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021";
// body['PatientID'] = 1014144; //3844083
// body['PatientID'] = 291367; //3844083
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574
@ -710,7 +710,7 @@ class BaseAppClient {
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
model.setState(0, false, null);
model.setState(0, 0, false, null);
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
}

@ -39,7 +39,7 @@ class NotificationViewModel extends BaseViewModel {
await authService.getDashboard().then((value) {
var notificationCount = '';
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
model.setState(model.count, 0, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
});

@ -2,19 +2,23 @@ import 'package:flutter/cupertino.dart';
class ToDoCountProviderModel with ChangeNotifier {
int _count;
int _ancillaryCount;
String _notificationsCount;
bool _isShowBadge = false;
int get count => _count == null ? 0 : _count;
int get ancillaryCount => _ancillaryCount == null ? 0 : _ancillaryCount;
String get notificationsCount => _notificationsCount == null ? "0" : _notificationsCount;
bool get isShowBadge => _isShowBadge;
void setState(int count, bool isShowBadge, String notifCount) {
void setState(int count, int ancillaryCount, bool isShowBadge, String notifCount) {
_count = count;
_isShowBadge = isShowBadge;
_notificationsCount = notifCount;
_ancillaryCount = ancillaryCount;
notifyListeners();
}
}

@ -428,12 +428,13 @@ class _BookConfirmState extends State<BookConfirm> {
}
getToDoCount() {
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount);
// toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);
@ -441,9 +442,10 @@ class _BookConfirmState extends State<BookConfirm> {
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
int languageID = projectViewModel.isArabic ? 1 : 2;
String errorMsg = "";
GifLoaderDialogUtils.showMyDialog(context);
widget.service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
widget.service.getPatientShare(appointmentNo, clinicID, projectID, languageID, context).then((res) {
projectViewModel.selectedBodyPartList.clear();
projectViewModel.laserSelectionDuration = 0;
if(res['OnlineCheckInAppointments'].length != 0) {

@ -468,12 +468,13 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots> with TickerProviderStat
}
getToDoCount() {
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount);
// toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);
@ -499,8 +500,9 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots> with TickerProviderStat
}
getPatientShare(context, String appointmentNo, int clinicID, int projectID, DoctorList docObject) {
int languageID = projectViewModel.isArabic ? 1 : 2;
DoctorsListService service = new DoctorsListService();
service.getPatientShare(appointmentNo, clinicID, projectID, context).then((res) {
service.getPatientShare(appointmentNo, clinicID, projectID, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res);
widget.patientShareResponse = new PatientShareResponse.fromJson(res);

@ -600,13 +600,14 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
}
getToDoCount() async {
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount);
ClinicListService service = ClinicListService();
try {
var res = await service.getActiveAppointmentNo(context);
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1 && res['AppointmentActiveNumber'] != null) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
// toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount);
} else {}
} catch (ex) {
print("getToDoCount:$ex");

@ -11,6 +11,7 @@ import 'package:diplomaticquarterapp/models/header_model.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart';
import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/SchedulePage.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/AppointmentType.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
@ -260,6 +261,19 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
),
),
);
list.add(
SizedBox(width: 8),
);
if (AppointmentType.isBooked(widget.appo))
list.add(
Expanded(
child: DefaultButton(
TranslationBase.of(context).confirm,
confirmAppointment,
color: Color(0xff359846),
),
),
);
} else if (_tabController.index == 1) {
list.add(
Expanded(
@ -627,11 +641,12 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
}
getToDoCount() {
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
// toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);

@ -25,7 +25,8 @@ import 'package:provider/provider.dart';
import 'AppointmentDetails.dart';
class MyAppointments extends StatefulWidget {
List<AppoitmentAllHistoryResultList> appoList = [];
List<AppoitmentAllHistoryResultList> upcomingAppoList = [];
List<AppoitmentAllHistoryResultList> arrivedAppoListNew = [];
List<AppoitmentAllHistoryResultList> bookedAppoList = [];
List<AppoitmentAllHistoryResultList> confirmedAppoList = [];
@ -39,6 +40,9 @@ class MyAppointments extends StatefulWidget {
List<PatientAppointmentList> _patientConfirmedAppointmentListClinic = List();
List<PatientAppointmentList> _patientArrivedAppointmentListClinic = List();
List<PatientAppointmentList> _patientBookedAndConfirmedAppointmentListHospital = List();
List<PatientAppointmentList> _patientBookedAndConfirmedAppointmentListClinic = List();
@override
_MyAppointmentsState createState() => _MyAppointmentsState();
}
@ -52,7 +56,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
FilterType filterType;
int _currentPage = 0;
int _currentPage = 1;
ToDoCountProviderModel toDoProvider;
ProjectViewModel projectViewModel;
@ -61,7 +65,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
void initState() {
filterType = FilterType.Clinic;
WidgetsBinding.instance.addPostFrameCallback((_) {
if (Provider.of<ProjectViewModel>(context, listen: false).isLogin) getPatientAppointmentHistory();
if (Provider.of<ProjectViewModel>(context, listen: false).isLogin) getPatientAppointmentHistory(true, false);
});
imagesInfo.add(ImagesInfo(
imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-appointment/ar/0.png'));
@ -86,7 +90,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
showNewAppBar: true,
backgroundColor: Color(0xffF8F8F8),
showNewAppBarTitle: true,
showDropDown: true,
showDropDown: false,
dropdownIndexValue: _currentPage,
dropDownIndexChange: (index) {
setState(() {
@ -94,8 +98,8 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
});
},
dropDownList: [
TranslationBase.of(context).booked,
TranslationBase.of(context).confirmed,
// TranslationBase.of(context).booked,
TranslationBase.of(context).upcoming,
TranslationBase.of(context).arrived,
],
description: TranslationBase.of(context).infoMyAppointments,
@ -115,10 +119,10 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
Padding(
padding: EdgeInsets.only(left: 21, right: 21),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
myRadioButton(TranslationBase.of(context).booked, 0),
myRadioButton(TranslationBase.of(context).confirmed, 1),
myRadioButton(TranslationBase.of(context).upcoming, 1),
// myRadioButton(TranslationBase.of(context).upcoming, 1),
myRadioButton(TranslationBase.of(context).arrived, 2),
],
),
@ -127,7 +131,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
? Expanded(
child: IndexedStack(
index: _currentPage,
children: [getBookedAppointments(), getConfirmedAppointments(), getArrivedAppointments()],
children: [getBookedAppointments(), getBookedAndConfirmedAppointments(), getArrivedAppointments()],
),
)
: Container(),
@ -136,11 +140,14 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
);
}
getPatientAppointmentHistory() {
getPatientAppointmentHistory(bool isForUpcoming, bool isForArrived) {
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
widget.appoList.clear();
widget.upcomingAppoList.clear();
widget.arrivedAppoListNew.clear();
widget.bookedAppoList.clear();
widget.confirmedAppoList.clear();
widget.arrivedAppoList.clear();
@ -153,19 +160,23 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
widget._patientConfirmedAppointmentListClinic.clear();
widget._patientArrivedAppointmentListClinic.clear();
service.getPatientAppointmentHistory(false, languageID, context).then((res) {
widget._patientBookedAndConfirmedAppointmentListHospital.clear();
widget._patientBookedAndConfirmedAppointmentListClinic.clear();
service.getPatientAppointmentHistory(false, languageID, context, isForUpcomming: isForUpcoming, IsForArrived: isForArrived).then((res) {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
if (res['MessageStatus'] == 1) {
// setState(() {
if (res['AppoimentAllHistoryResultList'].length != 0) {
// isDataLoaded = true;
res['AppoimentAllHistoryResultList'].forEach((v) {
widget.appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
if (isForArrived) {
widget.arrivedAppoListNew.add(new AppoitmentAllHistoryResultList.fromJson(v));
} else {
widget.upcomingAppoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
}
});
sortAppointmentList();
sortAppointmentList(isForUpcoming, isForArrived);
} else {}
// });
} else {
AppToast.showErrorToast(message: res['ErrorEndUserMessage']);
}
@ -180,11 +191,12 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
}
getToDoCount() {
toDoProvider.setState(0, true, "0");
toDoProvider.setState(0, 0, true, "0");
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
// toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, "0");
} else {}
}).catchError((err) {
print(err);
@ -203,8 +215,23 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
return AppointmentType.isBooked(appo);
}
sortAppointmentList() {
widget.appoList.forEach((v) {
sortAppointmentList(bool isForUpcoming, bool isForArrived) {
if (isForArrived) {
widget.arrivedAppoListNew.forEach((v) {
if (isBooked(v)) {
widget.bookedAppoList.add(v);
}
if (isConfirmed(v)) {
widget.confirmedAppoList.add(v);
}
if (isArrived(v)) {
widget.arrivedAppoList.add(v);
}
});
} else {
widget.upcomingAppoList.forEach((v) {
if (isBooked(v)) {
widget.bookedAppoList.add(v);
}
@ -217,6 +244,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
widget.arrivedAppoList.add(v);
}
});
}
widget.bookedAppoList.forEach((element) {
List<PatientAppointmentList> doctorByClinic = widget._patientBookedAppointmentListClinic
@ -242,6 +270,10 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
} else {
widget._patientBookedAppointmentListHospital.add(PatientAppointmentList(filterName: element.projectName, patientDoctorAppointment: element));
}
//Merging Booked & Confirmed Appointments into Upcoming Tab
widget._patientBookedAndConfirmedAppointmentListHospital.addAll(widget._patientBookedAppointmentListHospital);
widget._patientBookedAndConfirmedAppointmentListClinic.addAll(widget._patientBookedAppointmentListClinic);
});
widget.confirmedAppoList.forEach((element) {
@ -268,6 +300,10 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
} else {
widget._patientConfirmedAppointmentListHospital.add(PatientAppointmentList(filterName: element.projectName, patientDoctorAppointment: element));
}
//Merging Booked & Confirmed Appointments into Upcoming Tab
widget._patientBookedAndConfirmedAppointmentListHospital.addAll(widget._patientConfirmedAppointmentListHospital);
widget._patientBookedAndConfirmedAppointmentListClinic.addAll(widget._patientConfirmedAppointmentListClinic);
});
widget.arrivedAppoList.forEach((element) {
@ -295,7 +331,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
widget._patientArrivedAppointmentListHospital.add(PatientAppointmentList(filterName: element.projectName, patientDoctorAppointment: element));
}
openAppointmentsTab();
// openAppointmentsTab();
});
}
@ -326,6 +362,11 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
return _getAppointment(widget.bookedAppoList.length, (filterType == FilterType.Clinic) ? widget._patientBookedAppointmentListClinic : widget._patientBookedAppointmentListHospital);
}
Widget getBookedAndConfirmedAppointments() {
return _getAppointment((widget.bookedAppoList.length + widget.confirmedAppoList.length),
(filterType == FilterType.Clinic) ? widget._patientBookedAndConfirmedAppointmentListClinic : widget._patientBookedAndConfirmedAppointmentListHospital);
}
Widget _getAppointment(int _listLength, List<PatientAppointmentList> _list) {
return Container(
child: Container(
@ -341,7 +382,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
Container(
margin: EdgeInsets.only(top: 10.0),
child: Text(
_currentPage == 0 ? TranslationBase.of(context).noBookedAppo : (_currentPage == 1 ? TranslationBase.of(context).noConfirmedAppo : TranslationBase.of(context).noArrivedAppo),
_currentPage == 0 ? TranslationBase.of(context).noBookedAppo : (_currentPage == 1 ? TranslationBase.of(context).noUpcomingAppointment : TranslationBase.of(context).noArrivedAppo),
style: TextStyle(
fontSize: 16.0,
),
@ -388,7 +429,7 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
),
),
).then((value) {
getPatientAppointmentHistory();
getPatientAppointmentHistory(true, false);
}),
isInOutPatient: _appointmentResult.isInOutPatient,
name: _appointmentResult.doctorTitle + " " + _appointmentResult.doctorNameObj,
@ -453,6 +494,12 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
onChanged: (index) {
setState(() {
_currentPage = index;
if (_value == 1) {
getPatientAppointmentHistory(true, false);
}
if (_value == 2) {
getPatientAppointmentHistory(false, true);
}
});
//_pageController.animateToPage(index, duration: Duration(milliseconds: 250), curve: Curves.easeInOut);
},

@ -402,13 +402,14 @@ class _CovidTimeSlotsState extends State<ObGyneTimeSlots> with TickerProviderSta
}
getToDoCount() {
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
// toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount);
} else {}
Navigator.pushAndRemoveUntil(
context,

@ -860,11 +860,11 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
getToDoCount() {
toDoProvider.setState(0, true, "0");
toDoProvider.setState(0, 0, true, "0");
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, "0");
} else {}
}).catchError((err) {
print(err);
@ -919,13 +919,14 @@ class _ToDoState extends State<ToDo> with SingleTickerProviderStateMixin {
}
getPatientShare(context, AppoitmentAllHistoryResultList appo) {
int languageID = projectViewModel.isArabic ? 1 : 2;
String errorMsg = "";
DoctorsListService service = new DoctorsListService();
if (appo.isLiveCareAppointment) {
getLiveCareAppointmentPatientShare(context, service, appo);
} else {
GifLoaderDialogUtils.showMyDialog(context);
service.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, context).then((res) {
service.getPatientShare(appo.appointmentNo.toString(), appo.clinicID, appo.projectID, languageID, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['OnlineCheckInAppointments'].length != 0) {
widget.patientShareResponse = new PatientShareResponse.fromJson(res['OnlineCheckInAppointments'][0]);

@ -67,7 +67,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
projectViewModel = Provider.of(context);
initialiseHmgServices(false);
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
var userProvider = Provider.of<ToDoCountProviderModel>(context);
// var userProvider = Provider.of<ToDoCountProviderModel>(context);
List<Widget> myMedicalList = Utils.myMedicalListHomePage(projectViewModel: projectViewModel, context: context, count: appoCountProvider.count, isLogin: projectViewModel.isLogin);
return Container(
width: double.infinity,

@ -253,13 +253,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
}
getToDoCount() {
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
// toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
@ -453,7 +454,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
setState(() {
notificationCount =
value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
model.setState(model.count, 0, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
}
@ -650,7 +651,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
setState(() {
if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString();
model.setState(model.count, true, notificationCount);
model.setState(model.count, 0, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
FlutterAppIconBadge.updateBadge(num.parse(notificationCount));
}

@ -492,8 +492,9 @@ class _clinic_listState extends State<ClinicList> {
addNewCallForPatientER(String clientRequestID) {
LiveCareService service = new LiveCareService();
int languageID = projectViewModel.isArabic ? 1 : 2;
GifLoaderDialogUtils.showMyDialog(context);
service.addNewCallForPatientER(selectedClinicID, clientRequestID, widget.isPharmacyLiveCare, context).then((res) {
service.addNewCallForPatientER(selectedClinicID, clientRequestID, languageID, widget.isPharmacyLiveCare, context).then((res) {
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: "New Call has been added successfully");
widget.getLiveCareHistory();

@ -677,11 +677,12 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
getToDoCount() {
toDoProvider.setState(0, true, "0");
toDoProvider.setState(0, 0, true, "0");
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, "0");
// toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
} else {}
}).catchError((err) {
print(err);

@ -387,12 +387,13 @@ class _Login extends State<Login> {
}
getToDoCount() {
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
// toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);

@ -748,11 +748,12 @@ class _RegisterInfo extends State<RegisterInfo> {
}
getToDoCount() {
toDoProvider.setState(0, true, "0");
toDoProvider.setState(0, 0, true, "0");
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
// toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, "0");
} else {}
}).catchError((err) {
print(err);

@ -443,7 +443,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientShare(String appoID, int clinicID, int projectID, BuildContext context) async {
Future<Map> getPatientShare(String appoID, int clinicID, int projectID, int languageID, BuildContext context) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -468,6 +468,7 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"LanguageID": languageID,
"PatientType": authUser.patientType
};
@ -604,7 +605,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientAppointmentHistory(bool isActiveAppointment, int languageID, BuildContext context, {bool isForCOC = false}) async {
Future<Map> getPatientAppointmentHistory(bool isActiveAppointment, int languageID, BuildContext context, {bool isForCOC = false, isForUpcomming = false, IsForArrived = false}) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -627,7 +628,9 @@ class DoctorsListService extends BaseService {
"PatientTypeID": authUser.patientType,
"IsComingFromCOC": isForCOC,
"PatientType": authUser.patientType,
"LanguageID": languageID
"LanguageID": languageID,
"isForUpcomming": isForUpcomming,
"IsForArrived": IsForArrived
};
dynamic localRes;

@ -565,7 +565,7 @@ class AuthProvider with ChangeNotifier {
await authenticatedUserObject.getUser();
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false;
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
model.setState(0, false, null);
model.setState(0, 0, false, null);
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
}
}

@ -209,7 +209,7 @@ class LiveCareService extends BaseService {
return Future.value(localRes);
}
Future<Map> addNewCallForPatientER(int serviceID, String clientRequestID, bool isPharma, BuildContext context) async {
Future<Map> addNewCallForPatientER(int serviceID, String clientRequestID, int languageID, bool isPharma, BuildContext context) async {
Map<String, dynamic> request;
String deviceToken;
@ -237,6 +237,7 @@ class LiveCareService extends BaseService {
"Age": authUser.age != null ? authUser.age : 0,
"PatientID": authUser.patientID != null ? authUser.patientID : 0,
"Gender": authUser.gender != null ? authUser.gender : 0,
"LanguageID": languageID,
"IsVoip": Platform.isIOS ? true : false
};

@ -2912,6 +2912,8 @@ class TranslationBase {
String get validInsurance => localizedValues["validInsurance"][locale.languageCode];
String get checkInViaLocation => localizedValues["checkInViaLocation"][locale.languageCode];
String get locationCheckInError => localizedValues["locationCheckInError"][locale.languageCode];
String get upcoming => localizedValues["upcoming"][locale.languageCode];
String get noUpcomingAppointment => localizedValues["noUpcomingAppointment"][locale.languageCode];
}

@ -114,7 +114,7 @@ class BottomNavigationItem extends StatelessWidget {
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(model.count.toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)),
child: Text((model.count + model.ancillaryCount).toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)),
),
),
),

@ -752,12 +752,13 @@ class _AppDrawerState extends State<AppDrawer> {
}
getToDoCount() {
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
toDoProvider.setState(0, 0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1 && res['AppointmentActiveNumber'] != null) {
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
// toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
toDoProvider.setState(res['AppointmentActiveNumber'], res['AncillaryOrderListCount'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);

Loading…
Cancel
Save