|
|
|
@ -19,6 +19,7 @@ import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart';
|
|
|
|
import 'package:flutter_datetime_picker_plus/flutter_datetime_picker_plus.dart';
|
|
|
|
|
|
|
|
|
|
|
|
bool isAppArabic = false;
|
|
|
|
bool isAppArabic = false;
|
|
|
|
|
|
|
|
|
|
|
|
class ProjectViewModel extends BaseViewModel {
|
|
|
|
class ProjectViewModel extends BaseViewModel {
|
|
|
|
GAnalytics get analytics => locator<GAnalytics>();
|
|
|
|
GAnalytics get analytics => locator<GAnalytics>();
|
|
|
|
|
|
|
|
|
|
|
|
@ -30,7 +31,7 @@ class ProjectViewModel extends BaseViewModel {
|
|
|
|
AppSharedPreferences sharedPref = AppSharedPreferences();
|
|
|
|
AppSharedPreferences sharedPref = AppSharedPreferences();
|
|
|
|
Locale _appLocale = Locale('ar');
|
|
|
|
Locale _appLocale = Locale('ar');
|
|
|
|
String currentLanguage = 'ar';
|
|
|
|
String currentLanguage = 'ar';
|
|
|
|
bool _isArabic = false;
|
|
|
|
bool _isArabic = true;
|
|
|
|
bool isInternetConnection = true;
|
|
|
|
bool isInternetConnection = true;
|
|
|
|
bool isLoading = false;
|
|
|
|
bool isLoading = false;
|
|
|
|
bool isError = false;
|
|
|
|
bool isError = false;
|
|
|
|
@ -38,6 +39,7 @@ class ProjectViewModel extends BaseViewModel {
|
|
|
|
dynamic searchvalue;
|
|
|
|
dynamic searchvalue;
|
|
|
|
bool isLogin = false;
|
|
|
|
bool isLogin = false;
|
|
|
|
bool _isAllAppointmentsLoaded = false;
|
|
|
|
bool _isAllAppointmentsLoaded = false;
|
|
|
|
|
|
|
|
|
|
|
|
bool get isAllAppointmentsLoaded => _isAllAppointmentsLoaded;
|
|
|
|
bool get isAllAppointmentsLoaded => _isAllAppointmentsLoaded;
|
|
|
|
bool isPatientAdmitted = false;
|
|
|
|
bool isPatientAdmitted = false;
|
|
|
|
bool patientHasAdmissionRequest = false;
|
|
|
|
bool patientHasAdmissionRequest = false;
|
|
|
|
@ -50,10 +52,10 @@ class ProjectViewModel extends BaseViewModel {
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RegisterInfoResponse _registerInfo = RegisterInfoResponse();
|
|
|
|
RegisterInfoResponse _registerInfo = RegisterInfoResponse();
|
|
|
|
|
|
|
|
|
|
|
|
RegisterInfoResponse get registerInfo => _registerInfo;
|
|
|
|
RegisterInfoResponse get registerInfo => _registerInfo;
|
|
|
|
|
|
|
|
|
|
|
|
dynamic get searchValue => searchvalue;
|
|
|
|
dynamic get searchValue => searchvalue;
|
|
|
|
|
|
|
|
|
|
|
|
Locale get appLocal => _appLocale;
|
|
|
|
Locale get appLocal => _appLocale;
|
|
|
|
@ -70,7 +72,9 @@ class ProjectViewModel extends BaseViewModel {
|
|
|
|
List<ProjectDetailListModel> _projectDetailListModel = [];
|
|
|
|
List<ProjectDetailListModel> _projectDetailListModel = [];
|
|
|
|
|
|
|
|
|
|
|
|
List<PrivilegeModel> get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser;
|
|
|
|
List<PrivilegeModel> get privileges => isLoginChild ? privilegeChildUser : privilegeChildUser;
|
|
|
|
|
|
|
|
|
|
|
|
List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel;
|
|
|
|
List<VidaPlusProjectListModel> get vidaPlusProjectList => _vidaPlusProjectListModel;
|
|
|
|
|
|
|
|
|
|
|
|
List<HMCProjectListModel> get hMCProjectListModel => _hMCProjectListModel;
|
|
|
|
List<HMCProjectListModel> get hMCProjectListModel => _hMCProjectListModel;
|
|
|
|
|
|
|
|
|
|
|
|
List<ProjectDetailListModel> get projectDetailListModel => _projectDetailListModel;
|
|
|
|
List<ProjectDetailListModel> get projectDetailListModel => _projectDetailListModel;
|
|
|
|
@ -200,8 +204,6 @@ class ProjectViewModel extends BaseViewModel {
|
|
|
|
notifyListeners();
|
|
|
|
notifyListeners();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool havePrivilege(int id) {
|
|
|
|
bool havePrivilege(int id) {
|
|
|
|
bool isHavePrivilege = false;
|
|
|
|
bool isHavePrivilege = false;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
@ -222,7 +224,7 @@ class ProjectViewModel extends BaseViewModel {
|
|
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
void dispose() {
|
|
|
|
void dispose() {
|
|
|
|
if (subscription != null) subscription.cancel();
|
|
|
|
if (subscription != null) subscription.cancel();
|
|
|
|
super.dispose();
|
|
|
|
super.dispose();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|