Merge branch 'development_v3.3' of http://34.17.52.79/Haroon6138/diplomatic-quarter into dev_v3.13.6

# Conflicts:
#	lib/config/localized_values.dart
#	lib/core/service/client/base_app_client.dart
#	lib/models/Appointments/toDoCountProviderModel.dart
#	lib/pages/MyAppointments/AppointmentDetails.dart
#	lib/pages/MyAppointments/MyAppointments.dart
#	lib/pages/ToDoList/ObGyne/ObGyne-TimeSlots.dart
#	lib/pages/ToDoList/ToDo.dart
#	lib/pages/login/login.dart
#	lib/services/authentication/auth_provider.dart
#	lib/widgets/drawer/app_drawer_widget.dart
dev_v3.13.6_voipcall
Sultan khan 2 years ago
commit 4b28581c55

@ -21,11 +21,11 @@ var PACKAGES_ORDER_HISTORY = '/api/orders/items';
var PACKAGES_TAMARA_OPT = '/api/orders/paymentoptions/tamara';
// var BASE_URL = 'http://10.50.100.198:2018/';
// var BASE_URL = 'http://10.50.100.198:4422/';
//var BASE_URL = 'https://uat.hmgwebservices.com/';
var BASE_URL = 'https://uat.hmgwebservices.com/';
// var BASE_URL = 'https://hmgwebservices.com/';
// var BASE_URL = 'http://10.20.200.111:1010/';
// 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/';
@ -343,7 +343,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;

@ -1949,6 +1949,6 @@ const Map localizedValues = {
"receive": {"en": "Receive", "ar": "تجهيز"},
"PRO": {"en": "PRO", "ar": "علاقات المرضى"},
"patientRelationOffice": {"en": "Patient Relation Office", "ar": "علاقات المرضى"},
"upcoming": {"en": "Upcoming", "ar": "المواعيد القادمة"},
"noUpcomingAppointment": {"en": "No upcoming appointments", "ar": "لا توجد مواعيد القادمة"},
};

@ -188,7 +188,7 @@ class BaseAppClient {
// body['IdentificationNo'] = 1023854217;
// body['MobileNo'] = "531940021";
// body['PatientID'] = 1014144; //3844083
// body['PatientID'] = 291367; //3844083
// body['TokenID'] = "@dm!n";
// Patient ID: 3027574
@ -867,7 +867,7 @@ class BaseAppClient {
Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
_vitalSignService.weightKg = "";
_vitalSignService.heightCm = "";
model.setState(0, false, "");
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);
});

@ -1,20 +1,25 @@
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!;
String get notificationsCount => _notificationsCount == null ? "0" : _notificationsCount!;
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();
}
}

@ -431,12 +431,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);
@ -444,9 +445,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) {

@ -464,12 +464,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);
@ -495,8 +496,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");

@ -13,6 +13,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';
@ -247,13 +248,21 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
list.add(
Expanded(
child: DefaultButton(
TranslationBase.of(context).cancelAppointment,
() {
TranslationBase
.of(context)
.cancelAppointment,
() {
ConfirmDialog dialog = new ConfirmDialog(
context: context,
confirmMessage: TranslationBase.of(context).cancelAppoMsg,
okText: TranslationBase.of(context).confirm,
cancelText: TranslationBase.of(context).cancel_nocaps,
confirmMessage: TranslationBase
.of(context)
.cancelAppoMsg,
okText: TranslationBase
.of(context)
.confirm,
cancelText: TranslationBase
.of(context)
.cancel_nocaps,
okFunction: cancelAppointment,
cancelFunction: () => {});
dialog.showAlertDialog(context);
@ -263,7 +272,8 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
),
),
);
} else if (_tabController!.index == 1) {
}
else if (_tabController!.index == 1) {
list.add(
Expanded(
child: DefaultButton(
@ -668,11 +678,13 @@ 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<PatientAppointmentList> _patientArrivedAppointmentListClinic =[];
List<PatientAppointmentList> _patientBookedAndConfirmedAppointmentListHospital = [];
List<PatientAppointmentList> _patientBookedAndConfirmedAppointmentListClinic = [];
@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() {
int languageID = projectViewModel!.isArabic! ? 1 : 2;
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,20 +215,36 @@ class _MyAppointmentsState extends State<MyAppointments> with SingleTickerProvid
return AppointmentType.isBooked(appo);
}
sortAppointmentList() {
widget.appoList.forEach((v) {
if (isBooked(v)) {
widget.bookedAppoList.add(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 (isConfirmed(v)) {
widget.confirmedAppoList.add(v);
}
if (isArrived(v)) {
widget.arrivedAppoList.add(v);
}
});
if (isArrived(v)) {
widget.arrivedAppoList.add(v);
}
});
} else {
widget.upcomingAppoList.forEach((v) {
if (isBooked(v)) {
widget.bookedAppoList.add(v);
}
if (isConfirmed(v)) {
widget.confirmedAppoList.add(v);
}
if (isArrived(v)) {
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,

@ -883,11 +883,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);
@ -942,13 +942,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]);

@ -85,7 +85,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
}
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,

@ -234,13 +234,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);
@ -437,7 +438,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);
})
}
@ -634,7 +635,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(int.parse(notificationCount));
}

@ -493,8 +493,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();

@ -728,11 +728,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);

@ -413,13 +413,14 @@ 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);

@ -446,7 +446,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) {
@ -471,6 +471,7 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"LanguageID": languageID,
"PatientType": authUser.patientType
};
@ -607,7 +608,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) {
@ -630,7 +631,9 @@ class DoctorsListService extends BaseService {
"PatientTypeID": authUser.patientType,
"IsComingFromCOC": isForCOC,
"PatientType": authUser.patientType,
"LanguageID": languageID
"LanguageID": languageID,
"isForUpcomming": isForUpcomming,
"IsForArrived": IsForArrived
};
dynamic localRes;

@ -627,11 +627,9 @@ class AuthProvider with ChangeNotifier {
await sharedPref.remove(LOGIN_TOKEN_ID);
await sharedPref.remove(PHARMACY_CUSTOMER_ID);
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, "");
Provider.of<ProjectViewModel>(AppGlobal.context, listen: false).isLogin = false;
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
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;
@ -238,6 +238,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
};

@ -2955,6 +2955,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];
}

@ -120,7 +120,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)),
),
),
),

@ -762,12 +762,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