updates & fixes

merge-requests/427/head
haroon amjad 5 years ago
parent 230d87c473
commit 2c4ff16f0c

@ -569,7 +569,7 @@ class BaseAppClient {
var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false); var model = Provider.of<ToDoCountProviderModel>(AppGlobal.context, listen: false);
_vitalSignService.weightKg = ""; _vitalSignService.weightKg = "";
_vitalSignService.heightCm = ""; _vitalSignService.heightCm = "";
model.setState(0, false, 0); model.setState(0, false, null);
Navigator.of(AppGlobal.context).pushReplacementNamed(HOME); Navigator.of(AppGlobal.context).pushReplacementNamed(HOME);
} }

@ -20,6 +20,7 @@ class PrescriptionDeliveryViewModel extends BaseViewModel {
Future getCustomerInfo() async { Future getCustomerInfo() async {
setState(ViewState.Busy); setState(ViewState.Busy);
await _pharmacyModuleService.generatePharmacyToken().then((value) async { await _pharmacyModuleService.generatePharmacyToken().then((value) async {
// await _customerAddressesService.getCustomerInfo();
await _customerAddressesService.getCustomerInfo(); await _customerAddressesService.getCustomerInfo();
}); });
if (_customerAddressesService.hasError) { if (_customerAddressesService.hasError) {

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

@ -2,16 +2,16 @@ import 'package:flutter/cupertino.dart';
class ToDoCountProviderModel with ChangeNotifier { class ToDoCountProviderModel with ChangeNotifier {
int _count; int _count;
int _notificationsCount; String _notificationsCount;
bool _isShowBadge = false; bool _isShowBadge = false;
int get count => _count == null ? 0 : _count; 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; bool get isShowBadge => _isShowBadge;
void setState(int count, bool isShowBadge, int notifCount) { void setState(int count, bool isShowBadge, String notifCount) {
_count = count; _count = count;
_isShowBadge = isShowBadge; _isShowBadge = isShowBadge;
_notificationsCount = notifCount; _notificationsCount = notifCount;

@ -507,7 +507,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
setState(() { setState(() {
notificationCount = notificationCount =
value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); 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); sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
}) })
} }
@ -558,7 +558,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(0); pageController.jumpToPage(0);
}, },
), ),
projectViewModel.isLogin && model.notificationsCount != 0 projectViewModel.isLogin && model.notificationsCount != null
? new Positioned( ? new Positioned(
right: projectViewModel.isArabic ? 35 : 0, right: projectViewModel.isArabic ? 35 : 0,
top: 5, top: 5,
@ -680,7 +680,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
setState(() { setState(() {
if (value != null) { if (value != null) {
notificationCount = value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'] > 99 ? '99+' : value['List_PatientDashboard'][0]['UnreadPatientNotificationCount'].toString(); 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); sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
} }
}), }),

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

@ -98,15 +98,6 @@ class PrescriptionOrderOverview extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text(
TranslationBase.of(context).invoiceNo + ": " + prescriptions.patientID.toString(),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Colors.black,
letterSpacing: -0.46,
),
),
...List.generate( ...List.generate(
prescriptionReportEnhList.length, prescriptionReportEnhList.length,
(index) => Card( (index) => Card(
@ -116,18 +107,23 @@ class PrescriptionOrderOverview extends StatelessWidget {
elevation: 0, elevation: 0,
child: Row( child: Row(
children: <Widget>[ children: <Widget>[
Padding( Container(
padding: const EdgeInsets.all(8.0), 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( child: ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)), borderRadius: BorderRadius.all(Radius.circular(30)),
child: Image.network( child: Image.network(
prescriptionReportEnhList[index].imageSRCUrl, prescriptionReportEnhList[index].imageSRCUrl,
fit: BoxFit.cover, fit: BoxFit.cover,
width: 60, width: 48,
height: 60, height: 48,
), ),
), ),
), ),
SizedBox(width: 14),
Expanded( Expanded(
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),

@ -64,12 +64,10 @@ class PrescriptionsPage extends StatelessWidget {
name: prescriptions.doctorName, name: prescriptions.doctorName,
profileUrl: prescriptions.doctorImageURL, profileUrl: prescriptions.doctorImageURL,
rating: prescriptions.actualDoctorRate.toDouble(), rating: prescriptions.actualDoctorRate.toDouble(),
subName: prescriptions.name, subName: _isSortByClinic ? prescriptions.name : prescriptions.clinicDescription,
isSortByClinic: _isSortByClinic, isSortByClinic: _isSortByClinic,
isInOutPatient: prescriptions.isInOutPatient, isInOutPatient: prescriptions.isInOutPatient,
isLiveCareAppointment: prescriptions.isLiveCareAppointment, isLiveCareAppointment: prescriptions.isLiveCareAppointment,
// appointmentTime: DateUtil.formatDateToTime(DateUtil.convertStringToDate(prescriptions
// .appointmentDate)),
date: DateUtil.convertStringToDate(prescriptions date: DateUtil.convertStringToDate(prescriptions
.appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)), .appointmentDate) //projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr( DateUtil.convertStringToDate(prescriptions.appointmentDate) ):DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(prescriptions.appointmentDate)),
); );

Loading…
Cancel
Save