|
|
|
@ -2,6 +2,7 @@ import 'package:doctor_app_flutter/config/config.dart';
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
import 'package:doctor_app_flutter/config/shared_pref_kay.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/enum/viewstate.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/service/home/dasboard_service.dart';
|
|
|
|
|
|
|
|
import 'package:doctor_app_flutter/core/service/home/doctor_reply_service.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/service/special_clinics/special_clinic_service.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
|
|
|
import 'package:doctor_app_flutter/models/dashboard/dashboard_model.dart';
|
|
|
|
@ -17,6 +18,7 @@ class DashboardViewModel extends BaseViewModel {
|
|
|
|
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
|
|
|
|
final FirebaseMessaging _firebaseMessaging = FirebaseMessaging();
|
|
|
|
DashboardService _dashboardService = locator<DashboardService>();
|
|
|
|
DashboardService _dashboardService = locator<DashboardService>();
|
|
|
|
SpecialClinicsService _specialClinicsService = locator<SpecialClinicsService>();
|
|
|
|
SpecialClinicsService _specialClinicsService = locator<SpecialClinicsService>();
|
|
|
|
|
|
|
|
DoctorReplyService _doctorReplyService = locator<DoctorReplyService>();
|
|
|
|
|
|
|
|
|
|
|
|
List<DashboardModel> get dashboardItemsList =>
|
|
|
|
List<DashboardModel> get dashboardItemsList =>
|
|
|
|
_dashboardService.dashboardItemsList;
|
|
|
|
_dashboardService.dashboardItemsList;
|
|
|
|
@ -24,6 +26,7 @@ class DashboardViewModel extends BaseViewModel {
|
|
|
|
bool get hasVirtualClinic => _dashboardService.hasVirtualClinic;
|
|
|
|
bool get hasVirtualClinic => _dashboardService.hasVirtualClinic;
|
|
|
|
|
|
|
|
|
|
|
|
String get sServiceID => _dashboardService.sServiceID;
|
|
|
|
String get sServiceID => _dashboardService.sServiceID;
|
|
|
|
|
|
|
|
int get notRepliedCount => _doctorReplyService.notRepliedCount;
|
|
|
|
|
|
|
|
|
|
|
|
List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList => _specialClinicsService.specialClinicalCareList;
|
|
|
|
List<GetSpecialClinicalCareListResponseModel> get specialClinicalCareList => _specialClinicsService.specialClinicalCareList;
|
|
|
|
|
|
|
|
|
|
|
|
@ -114,4 +117,16 @@ class DashboardViewModel extends BaseViewModel {
|
|
|
|
return special;
|
|
|
|
return special;
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future getNotRepliedCount() async {
|
|
|
|
|
|
|
|
setState(ViewState.Busy);
|
|
|
|
|
|
|
|
await getDoctorProfile();
|
|
|
|
|
|
|
|
await _doctorReplyService.getNotRepliedCount();
|
|
|
|
|
|
|
|
if (_doctorReplyService.hasError) {
|
|
|
|
|
|
|
|
error = _doctorReplyService.error;
|
|
|
|
|
|
|
|
setState(ViewState.Error);
|
|
|
|
|
|
|
|
} else
|
|
|
|
|
|
|
|
setState(ViewState.Idle);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|