updates & fixes

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

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

@ -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) {

@ -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);
});

@ -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;

@ -507,7 +507,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, num.tryParse(notificationCount));
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
}
@ -558,7 +558,7 @@ class _LandingPageState extends State<LandingPage> 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<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, num.tryParse(notificationCount));
model.setState(model.count, true, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
}
}),

@ -582,11 +582,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
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);

@ -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: <Widget>[
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),

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

Loading…
Cancel
Save