diff --git a/lib/core/service/client/base_app_client.dart b/lib/core/service/client/base_app_client.dart index 175310f8..5c1361ab 100644 --- a/lib/core/service/client/base_app_client.dart +++ b/lib/core/service/client/base_app_client.dart @@ -569,7 +569,7 @@ class BaseAppClient { var model = Provider.of(AppGlobal.context, listen: false); _vitalSignService.weightKg = ""; _vitalSignService.heightCm = ""; - model.setState(0, false, 0); + model.setState(0, false, null); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); } diff --git a/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart b/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart index 455b5934..0b6d7a1d 100644 --- a/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart +++ b/lib/core/viewModels/medical/PrescriptionDeliveryViewModel.dart @@ -20,6 +20,7 @@ class PrescriptionDeliveryViewModel extends BaseViewModel { Future getCustomerInfo() async { setState(ViewState.Busy); await _pharmacyModuleService.generatePharmacyToken().then((value) async { + // await _customerAddressesService.getCustomerInfo(); await _customerAddressesService.getCustomerInfo(); }); if (_customerAddressesService.hasError) { diff --git a/lib/core/viewModels/notifications_view_model.dart b/lib/core/viewModels/notifications_view_model.dart index d5fbc598..80e89edb 100644 --- a/lib/core/viewModels/notifications_view_model.dart +++ b/lib/core/viewModels/notifications_view_model.dart @@ -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, num.tryParse(notificationCount)); + model.setState(model.count, true, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); }); diff --git a/lib/models/Appointments/toDoCountProviderModel.dart b/lib/models/Appointments/toDoCountProviderModel.dart index ff02c1b2..c185e4f7 100644 --- a/lib/models/Appointments/toDoCountProviderModel.dart +++ b/lib/models/Appointments/toDoCountProviderModel.dart @@ -2,16 +2,16 @@ import 'package:flutter/cupertino.dart'; class ToDoCountProviderModel with ChangeNotifier { int _count; - int _notificationsCount; + String _notificationsCount; bool _isShowBadge = false; int get count => _count == null ? 0 : _count; - int get notificationsCount => _notificationsCount == null ? 0 : _notificationsCount; + String get notificationsCount => _notificationsCount == null ? 0 : _notificationsCount; bool get isShowBadge => _isShowBadge; - void setState(int count, bool isShowBadge, int notifCount) { + void setState(int count, bool isShowBadge, String notifCount) { _count = count; _isShowBadge = isShowBadge; _notificationsCount = notifCount; diff --git a/lib/pages/landing/landing_page.dart b/lib/pages/landing/landing_page.dart index dd34a072..e5f8e35c 100644 --- a/lib/pages/landing/landing_page.dart +++ b/lib/pages/landing/landing_page.dart @@ -507,7 +507,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { setState(() { notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); - model.setState(model.count, true, num.tryParse(notificationCount)); + model.setState(model.count, true, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); }) } @@ -558,7 +558,7 @@ class _LandingPageState extends State with WidgetsBindingObserver { pageController.jumpToPage(0); }, ), - projectViewModel.isLogin && model.notificationsCount != 0 + projectViewModel.isLogin && model.notificationsCount != null ? new Positioned( right: projectViewModel.isArabic ? 35 : 0, top: 5, @@ -680,7 +680,7 @@ class _LandingPageState extends State 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, num.tryParse(notificationCount)); + model.setState(model.count, true, notificationCount); sharedPref.setString(NOTIFICATION_COUNT, notificationCount); } }), diff --git a/lib/pages/login/confirm-login.dart b/lib/pages/login/confirm-login.dart index 67425907..921bec0a 100644 --- a/lib/pages/login/confirm-login.dart +++ b/lib/pages/login/confirm-login.dart @@ -582,11 +582,11 @@ class _ConfirmLogin extends State { } getToDoCount() { - toDoProvider.setState(0, true, 0); + toDoProvider.setState(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"); } else {} }).catchError((err) { print(err); diff --git a/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart index b94bed4c..96283aa8 100644 --- a/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart +++ b/lib/pages/medical/prescriptions/PrescriptionOrderOverveiw.dart @@ -98,15 +98,6 @@ class PrescriptionOrderOverview extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - TranslationBase.of(context).invoiceNo + ": " + prescriptions.patientID.toString(), - style: TextStyle( - fontSize: 16, - fontWeight: FontWeight.bold, - color: Colors.black, - letterSpacing: -0.46, - ), - ), ...List.generate( prescriptionReportEnhList.length, (index) => Card( @@ -116,18 +107,23 @@ class PrescriptionOrderOverview extends StatelessWidget { elevation: 0, child: Row( children: [ - Padding( - padding: const EdgeInsets.all(8.0), + Container( + margin: EdgeInsets.only(bottom: 10.0), + decoration: BoxDecoration( + border: Border.all(width: 1.0, color: Color(0xffEBEBEB)), + borderRadius: BorderRadius.all(Radius.circular(30.0)), + ), child: ClipRRect( - borderRadius: BorderRadius.all(Radius.circular(5)), + borderRadius: BorderRadius.all(Radius.circular(30)), child: Image.network( prescriptionReportEnhList[index].imageSRCUrl, fit: BoxFit.cover, - width: 60, - height: 60, + width: 48, + height: 48, ), ), ), + SizedBox(width: 14), Expanded( child: Padding( padding: const EdgeInsets.all(8.0), diff --git a/lib/pages/medical/prescriptions/prescriptions_page.dart b/lib/pages/medical/prescriptions/prescriptions_page.dart index 389a50e5..863a2209 100644 --- a/lib/pages/medical/prescriptions/prescriptions_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_page.dart @@ -64,12 +64,10 @@ class PrescriptionsPage extends StatelessWidget { name: prescriptions.doctorName, profileUrl: prescriptions.doctorImageURL, rating: prescriptions.actualDoctorRate.toDouble(), - subName: prescriptions.name, + subName: _isSortByClinic ? prescriptions.name : prescriptions.clinicDescription, isSortByClinic: _isSortByClinic, isInOutPatient: prescriptions.isInOutPatient, isLiveCareAppointment: prescriptions.isLiveCareAppointment, - // appointmentTime: DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions - // .appointmentDate)), date: DateUtil.convertStringToDate(prescriptions .appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)), );