Merge branch 'haroon-new-design' into 'development_new_design_2.0'

Haroon new design

See merge request Cloud_Solution/diplomatic-quarter!427
merge-requests/428/head
haroon amjad 3 years ago
commit fa929adfd9

File diff suppressed because it is too large Load Diff

@ -11,6 +11,7 @@ class GetPatientICProjectsModel {
dynamic editedOn;
dynamic editedBy;
bool isActive;
dynamic distanceInKilometers;
GetPatientICProjectsModel(
{this.id,
@ -22,6 +23,7 @@ class GetPatientICProjectsModel {
this.createdBy,
this.editedOn,
this.editedBy,
this.distanceInKilometers,
this.isActive});
GetPatientICProjectsModel.fromJson(Map<String, dynamic> json) {
@ -35,6 +37,7 @@ class GetPatientICProjectsModel {
editedOn = json['EditedOn'];
editedBy = json['EditedBy'];
isActive = json['IsActive'];
distanceInKilometers = json['DistanceInKilometers'];
}
Map<String, dynamic> toJson() {
@ -49,6 +52,7 @@ class GetPatientICProjectsModel {
data['EditedOn'] = this.editedOn;
data['EditedBy'] = this.editedBy;
data['IsActive'] = this.isActive;
data['DistanceInKilometers'] = this.distanceInKilometers;
return data;
}
}

@ -7,7 +7,7 @@ class PharmacyPrescriptions {
int projectID;
String setupID;
String locationDescription;
Null locationDescriptionN;
dynamic locationDescriptionN;
String itemDescription;
Null itemDescriptionN;
String alias;
@ -16,7 +16,7 @@ class PharmacyPrescriptions {
Null companybarcode;
int cityID;
String cityName;
int distanceInKilometers;
dynamic distanceInKilometers;
String latitude;
int locationType;
String longitude;

@ -1,6 +1,6 @@
class RequestGetListPharmacyForPrescriptions {
int latitude;
int longitude;
dynamic latitude;
dynamic longitude;
double versionID;
int channel;
int languageID;

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

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/contactus/get_patientI_cprojects.dart';
import '../base_service.dart';
@ -12,6 +13,9 @@ class LiveChatService extends BaseService {
Future getAllLiveChatOrders() async {
hasError = false;
body['List_PatientICProjects'] = false;
body['Latitude'] = await this.sharedPref.getDouble(USER_LAT);
body['Longitude'] = await this.sharedPref.getDouble(USER_LONG);
await baseAppClient.post(GET_LIVECHAT_REQUEST,
onSuccess: (dynamic response, int statusCode) {
LivechatModelList.clear();

@ -41,10 +41,13 @@ class FeedbackService extends BaseService {
_requestInsertCOCItem.deviceInfo = Platform.localHostname;
_requestInsertCOCItem.resolution = "400x847";
_requestInsertCOCItem.projectID = 0;
_requestInsertCOCItem.tokenID = "C0c@@dm!n?T&A&A@Barcha202029582948";
_requestInsertCOCItem.identificationNo =
int.parse(user.patientIdentificationNo);
if (BASE_URL.contains('uat')) {
_requestInsertCOCItem.forDemo = true;
} else {
_requestInsertCOCItem.forDemo = false;
}
final Map<String, dynamic> body = _requestInsertCOCItem.toJson();

@ -18,15 +18,14 @@ class BloodSugarService extends BaseService {
Future getBloodSugar() async {
hasError = false;
Map<String, dynamic> body = Map();
monthDiabtectResultAverageList.clear();
weekDiabtectResultAverageList.clear();
yearDiabtecResultAverageList.clear();
monthDiabtecPatientResult.clear();
weekDiabtecPatientResult.clear();
yearDiabtecPatientResult.clear();
body['isDentalAllowedBackend'] = false;
await baseAppClient.post(GET_DIABETIC_RESULT_AVERAGE, onSuccess: (dynamic response, int statusCode) {
monthDiabtectResultAverageList.clear();
weekDiabtectResultAverageList.clear();
yearDiabtecResultAverageList.clear();
monthDiabtecPatientResult.clear();
weekDiabtecPatientResult.clear();
yearDiabtecPatientResult.clear();
response['List_MonthDiabtectResultAverage'].forEach((item) {
monthDiabtectResultAverageList.add(MonthDiabtectResultAverage.fromJson(item));
@ -47,10 +46,10 @@ class BloodSugarService extends BaseService {
Future getDiabtecResults() async {
hasError = false;
monthDiabtecPatientResult.clear();
weekDiabtecPatientResult.clear();
yearDiabtecPatientResult.clear();
await baseAppClient.post(GET_DIABTEC_RESULT, onSuccess: (dynamic response, int statusCode) {
monthDiabtecPatientResult.clear();
weekDiabtecPatientResult.clear();
yearDiabtecPatientResult.clear();
response['List_MonthDiabtecPatientResult'].forEach((item) {
monthDiabtecPatientResult.add(DiabtecPatientResult.fromJson(item));

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/Prescriptions.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/perscription_pharmacy.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report.dart';
@ -119,6 +120,13 @@ class PrescriptionsService extends BaseService {
Future getListPharmacyForPrescriptions({int itemId}) async {
hasError = false;
requestGetListPharmacyForPrescriptions.itemID = itemId;
requestGetListPharmacyForPrescriptions.latitude = await sharedPref.getDouble(USER_LAT);
requestGetListPharmacyForPrescriptions.longitude = await sharedPref.getDouble(USER_LONG);
// requestGetListPharmacyForPrescriptions.latitude = 24.709863;
// requestGetListPharmacyForPrescriptions.longitude = 46.668348;
pharmacyPrescriptionsList.clear();
await baseAppClient.post(GET_PHARMACY_LIST, onSuccess: (dynamic response, int statusCode) {
pharmacyPrescriptionsList.clear();

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/Manufacturer.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyImageObject.dart';
import 'package:diplomaticquarterapp/core/model/pharmacies/PharmacyProduct.dart';
import 'package:diplomaticquarterapp/core/service/AlHabibMedicalService/customer_addresses_service.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -12,6 +13,7 @@ class PharmacyModuleService extends BaseService {
bool isFinished = true;
String errorMsg = '';
String url = "";
CustomerInfo customerInfo;
List<PharmacyImageObject> bannerItems = List();
List<Manufacturer> manufacturerList = List();
@ -51,8 +53,12 @@ class PharmacyModuleService extends BaseService {
hasError = false;
try {
await baseAppClient.getPharmacy(PHARMACY_CREATE_CUSTOMER, onSuccess: (dynamic response, int statusCode) async {
if (!response['IsRegistered']) {}
await generatePharmacyToken();
if (!response['IsRegistered']) {
} else {
customerInfo = CustomerInfo.fromJson(response);
}
// await generatePharmacyToken();
}, onFailure: (String error, int statusCode) {
hasError = true;
super.error = error;

@ -113,8 +113,8 @@ class HomeHealthCareViewModel extends BaseViewModel {
// await _customerAddressesService.getCustomerInfo();
setState(ViewState.ErrorLocal);
} else {
// await _pharmacyModuleService.createUser();
await _customerAddressesService.getCustomerInfo();
await _pharmacyModuleService.createUser();
// await _customerAddressesService.getCustomerInfo();
await getCustomerAddresses();
}
}

@ -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 AskDoctorViewModel extends BaseViewModel {
});
} else {
setState(ViewState.Idle);
AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).askDocEmpty);
// AppToast.showErrorToast(message: TranslationBase.of(AppGlobal.context).askDocEmpty);
}
}

@ -1,39 +1,48 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_request_model.dart';
import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_response_model.dart';
import 'package:diplomaticquarterapp/core/model/notifications/mark_message_as_read_request_model.dart';
import 'package:diplomaticquarterapp/core/service/notifications_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import '../../locator.dart';
import 'base_view_model.dart';
class NotificationViewModel extends BaseViewModel {
NotificationService _notificationService = locator<NotificationService>();
ToDoCountProviderModel model = Provider.of<ToDoCountProviderModel>(AppGlobal.context);
List<GetNotificationsResponseModel> get notifications =>
_notificationService.notificationsList;
List<GetNotificationsResponseModel> get notifications => _notificationService.notificationsList;
Future getNotifications(
GetNotificationsRequestModel getNotificationsRequestModel, BuildContext context) async {
if(getNotificationsRequestModel.currentPage == 0)
setState(ViewState.Busy);
Future getNotifications(GetNotificationsRequestModel getNotificationsRequestModel, BuildContext context) async {
if (getNotificationsRequestModel.currentPage == 0) setState(ViewState.Busy);
await _notificationService
.getAllNotifications(getNotificationsRequestModel);
await _notificationService.getAllNotifications(getNotificationsRequestModel);
if (_notificationService.hasError) {
error = _notificationService.error;
setState(ViewState.Error);
setState(ViewState.Error);
} else {
setState(ViewState.Idle);
setState(ViewState.Idle);
}
}
Future markAsRead(id) async {
// setState(ViewState.Busy);
MarkMessageAsReadRequestModel markMessageAsReadRequestModel =
new MarkMessageAsReadRequestModel(notificationPoolID: id);
MarkMessageAsReadRequestModel markMessageAsReadRequestModel = new MarkMessageAsReadRequestModel(notificationPoolID: id);
final authService = new AuthProvider();
await _notificationService.markAsRead(markMessageAsReadRequestModel);
setState(ViewState.Idle);
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, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
});
setState(ViewState.Idle);
}
}
}

@ -2,15 +2,19 @@ import 'package:flutter/cupertino.dart';
class ToDoCountProviderModel with ChangeNotifier {
int _count;
String _notificationsCount;
bool _isShowBadge = false;
int get count => _count == null ? 0 : _count;
String get notificationsCount => _notificationsCount == null ? "0" : _notificationsCount;
bool get isShowBadge => _isShowBadge;
void setState(int count, bool isShowBadge) {
void setState(int count, bool isShowBadge, String notifCount) {
_count = count;
_isShowBadge = isShowBadge;
_notificationsCount = notifCount;
notifyListeners();
}
}
}

@ -346,12 +346,12 @@ class _BookConfirmState extends State<BookConfirm> {
}
getToDoCount() {
toDoProvider.setState(0, true);
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);

@ -146,7 +146,7 @@ class _DoctorProfileState extends State<DoctorProfile> with TickerProviderStateM
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.isLiveCareAppointment) {
if (widget.doctor.clinicID == 17 || widget.doctor.clinicID == 23 || widget.doctor.clinicID == 47 || widget.isLiveCareAppointment) {
_tabController.index = _tabController.previousIndex;
showFooterButton = false;
} else {

@ -99,7 +99,7 @@ class DoctorView extends StatelessWidget {
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
Icon(
if (isShowFlag) Icon(
Icons.arrow_forward,
color: Theme.of(context).primaryColor,
),

@ -45,7 +45,6 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
children: [
Text(
TranslationBase.of(context).instructions,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
SizedBox(height: 20),
@ -87,7 +86,7 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
children: <Widget>[
Expanded(
child: Text(
model.LiveChatModelList[index]?.projectName ?? "",
model.LiveChatModelList[index].projectName.toString() + "\n" + model.LiveChatModelList[index].distanceInKilometers.toString() + " " + TranslationBase.of(context).km_ ?? "",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: tappedIndex == index ? Colors.white : Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
),

@ -45,7 +45,7 @@ class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderSt
imagesInfo: imagesInfo,
title: TranslationBase.of(context).liveChat,
description: TranslationBase.of(context).infoChat,
appBarTitle: TranslationBase.of(context).service,
appBarTitle: TranslationBase.of(context).liveChat,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color,

@ -32,7 +32,6 @@ class PharmaciesLiveChatPage extends StatelessWidget {
SizedBox(height: 20),
Text(
TranslationBase.of(context).instructions,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
],
@ -44,14 +43,13 @@ class PharmaciesLiveChatPage extends StatelessWidget {
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).start,
() {
String chat;
chat =
"http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.isArabic ? 1 : 2}";
launch(chat);
},
color: Color(0xffD02127),
textColor: Colors.white,
null,
// () {
// String chat;
// chat =
// "http://chat.dshmg.com:7788/EPharmacyChat/EIndex.aspx?CustomerID=undefined&Name=${model.user.firstName}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.isArabic ? 1 : 2}";
// launch(chat);
// },
disabledColor: Color(0xffEAEAEA),
),
),

@ -485,12 +485,12 @@ class _CovidTimeSlotsState extends State<CovidTimeSlots> with TickerProviderStat
}
getToDoCount() {
toDoProvider.setState(0, true);
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);

@ -1,5 +1,6 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
@ -7,19 +8,23 @@ import 'package:diplomaticquarterapp/core/service/medical/vital_sign_service.dar
import 'package:diplomaticquarterapp/core/viewModels/appointment_rate_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/pharmacyModule/pharmacy_module_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
import 'package:diplomaticquarterapp/models/Authentication/check_activation_code_response.dart' as list;
import 'package:diplomaticquarterapp/models/FamilyFiles/GetAllSharedRecordByStatusResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/pages/landing/landing_page.dart';
import 'package:diplomaticquarterapp/pages/rateAppointment/rate_appointment_doctor.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/card/rounded_container.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
@ -28,16 +33,13 @@ import 'package:diplomaticquarterapp/widgets/text/app_texts_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/services/clinic_services/get_clinic_service.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
class MyFamily extends StatefulWidget {
final bool isAppbarVisible;
MyFamily({this.isAppbarVisible = true});
@override
_MyFamily createState() => _MyFamily();
}
@ -58,6 +60,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
ToDoCountProviderModel toDoProvider;
var isVaiable = false;
bool isSwitchUser = false;
@override
void initState() {
_tabController = new TabController(length: 2, vsync: this, initialIndex: 0);
@ -105,46 +108,64 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
// ),
// ),
// ),
// Center(
// child: Container(
// height: 60.0,
// // margin: EdgeInsets.only(top: 10.0),
// width: MediaQuery.of(context).size.width * 0.92, // 0.9,
// decoration: BoxDecoration(
// border: Border(
// bottom: BorderSide(color: Theme.of(context).dividerColor, width: 0.9), //width: 0.7
// ),
// color: Colors.white),
Center(
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.92, // 0.9,
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(color: Theme.of(context).dividerColor, width: 0.9), //width: 0.7
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
//indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
// indicatorColor: Theme.of(context).primaryColor,
// labelColor: Theme.of(context).primaryColor,
labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: AppText(TranslationBase.of(context).family),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: AppText(TranslationBase.of(context).request),
),
),
],
),
child:
// TabBar(
// isScrollable: true,
// controller: _tabController,
// indicatorWeight: 5.0,
// indicatorSize: TabBarIndicatorSize.tab,
// labelPadding: EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),
// unselectedLabelColor: Colors.grey[800],
// tabs: [
// Container(
// width: MediaQuery.of(context).size.width * 0.30,
// child: Center(
// child: AppText(TranslationBase.of(context).family),
// ),
// ),
// Container(
// width: MediaQuery.of(context).size.width * 0.30,
// child: Center(
// child: AppText(TranslationBase.of(context).request),
// ),
// ),
// ],
// ),
TabBar(
controller: _tabController,
indicatorWeight: 3.0,
indicatorSize: TabBarIndicatorSize.tab,
labelColor: Color(0xff2B353E),
unselectedLabelColor: Color(0xff575757),
labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
labelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).family), Text(TranslationBase.of(context).request)],
),
),
// ),
// ),
],
),
),
@ -162,15 +183,14 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
],
),
bottomSheet: Container(
width: MediaQuery.of(context).size.width,
height: 70.0,
margin: EdgeInsets.only(left: 15.0, right: 15.0, top: 10.0),
child: Button(
onTap: () async {
color: Theme.of(context).scaffoldBackgroundColor,
width: double.infinity,
padding: EdgeInsets.all(14),
child: DefaultButton(
TranslationBase.of(context).addFamilyMember,
() async {
Navigator.of(context).pushNamed(ADD_FAMILY_MEMBER_TYPE);
},
label: TranslationBase.of(context).addFamilyMember,
backgroundColor: Colors.red[900],
),
),
),
@ -671,12 +691,12 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
}
getToDoCount() {
toDoProvider.setState(0, true);
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1 && res['AppointmentActiveNumber'] != null) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);

@ -50,13 +50,12 @@ class NotificationsDetailsPage extends StatelessWidget {
height: 25,
),
Container(
// margin: EdgeInsets.only(left: 30),
width: double.infinity,
color: Colors.grey[400],
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(
getDateForm(notification.createdOn),
DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(notification.createdOn)) + " " + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(notification.createdOn), false),
fontSize: 16,
),
),

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/model/notifications/get_notifications_
import 'package:diplomaticquarterapp/core/viewModels/notifications_view_model.dart';
import 'package:diplomaticquarterapp/pages/DrawerPages/notifications/notification_details_page.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -60,8 +61,9 @@ class NotificationsPage extends StatelessWidget {
.map(
(notification) => InkWell(
onTap: () async {
if (!notification.isRead)
if (!notification.isRead) {
model.markAsRead(notification.id);
}
Navigator.push(
context,
FadePage(
@ -82,7 +84,7 @@ class NotificationsPage extends StatelessWidget {
border: Border.all(
color: notification.isRead
? Colors.grey[200]
: Theme.of(context).primaryColor,
: CustomColors.accentColor,
width: 0.5),
),
child: Row(
@ -93,7 +95,7 @@ class NotificationsPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(getDateForm(notification.createdOn)),
Texts(DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(notification.createdOn)) + " " + DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(notification.createdOn), false)),
SizedBox(
height: 5,
),

@ -87,7 +87,7 @@ class _ErOptionsState extends State<ErOptions> {
),
InkWell(
onTap: () {
Navigator.push(context, FadePage(page: RRTMainScreen()));
if(rrtLocked) Navigator.push(context, FadePage(page: RRTMainScreen()));
},
child: MedicalProfileItem(
title: TranslationBase.of(context).rrtService,

@ -108,8 +108,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
"",
//model.user.emailAddress,
),
isNeedToShowButton:
(widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true,
isNeedToShowButton: (widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) ? false : true,
buttonTitle: TranslationBase.of(context).schedule,
buttonIcon: 'assets/images/new/Boo_ Appointment.svg',
showConfirmMessageDialog: false,
@ -138,7 +137,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
onTap: (index) {
setState(() {
if (index == 1) {
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) {
if (widget.appo.clinicID == 17 || widget.appo.clinicID == 47 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment) {
_tabController.index = _tabController.previousIndex;
AppointmentDetails.showFooterButton = false;
} else {
@ -149,7 +148,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
},
tabs: [
Tab(child: Text(TranslationBase.of(context).appoActions, style: TextStyle(color: Colors.black))),
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment
widget.appo.clinicID == 17 || widget.appo.clinicID == 23 || widget.appo.clinicID == 47 || widget.appo.clinicID == 265 || widget.appo.isExecludeDoctor || widget.appo.isLiveCareAppointment
? Tab(
child: Text(TranslationBase.of(context).availableAppo, style: TextStyle(color: Colors.grey)),
)
@ -583,11 +582,11 @@ class _AppointmentDetailsState extends State<AppointmentDetails> with SingleTick
}
getToDoCount() {
toDoProvider.setState(0, true);
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);

@ -67,7 +67,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
padding: EdgeInsets.all(21),
shrinkWrap: true,
itemBuilder: (context, index) {
bool shouldEnable = (widget.appo.clinicID == 17 && appoButtonsList[index].caller == "openReschedule");
bool shouldEnable = (widget.appo.clinicID == 17 && widget.appo.clinicID == 47 && appoButtonsList[index].caller == "openReschedule");
return InkWell(
onTap: shouldEnable
? null

@ -47,7 +47,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
updateSelectedPaymentMethod("MADA");
},
child: Card(
elevation: 3.0,
elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
@ -83,7 +83,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
updateSelectedPaymentMethod("VISA");
},
child: Card(
elevation: 3.0,
elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
@ -119,7 +119,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
updateSelectedPaymentMethod("MASTERCARD");
},
child: Card(
elevation: 3.0,
elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
@ -155,7 +155,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
updateSelectedPaymentMethod("Installment");
},
child: Card(
elevation: 3.0,
elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(
@ -192,7 +192,7 @@ class _PaymentMethodState extends State<PaymentMethod> {
updateSelectedPaymentMethod("ApplePay");
},
child: Card(
elevation: 3.0,
elevation: 0.0,
margin: EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
color: Colors.white,
shape: RoundedRectangleBorder(

@ -5,7 +5,9 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -13,6 +15,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -49,6 +52,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
var reconizedWord;
var event = RobotProvider();
List<AppoitmentAllHistoryResultList> appoList = [];
String getSelected(BuildContext context) {
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
@ -111,7 +116,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
children: <Widget>[
Text(
TranslationBase.of(context).likeToHear,
textAlign: TextAlign.center,
// textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
SizedBox(height: 21),
@ -159,184 +164,50 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
isShowListAppointHistory = true;
});
},
child: Container(
// margin: EdgeInsets.all(8.0),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
child: Row(
children: <Widget>[
Container(
width: projectViewModel.isArabic ? 27 : 20,
height: projectViewModel.isArabic ? 105 : 90,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: appointHistory.isLiveCareAppointment
? Color(0xff404545)
: !appointHistory.isInOutPatient
? Colors.red[900]
: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
bottomLeft: projectViewModel.isArabic ? Radius.circular(0) : Radius.circular(8),
topRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
bottomRight: projectViewModel.isArabic ? Radius.circular(8) : Radius.circular(0),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
appointHistory.isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !appointHistory.isInOutPatient
? TranslationBase.of(context).inPatient.toUpperCase()
: TranslationBase.of(context).outpatient.toUpperCase(),
style: TextStyle(color: Colors.white, fontSize: 12),
),
)),
),
Expanded(
flex: 4,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: LargeAvatar(
name: appointHistory.doctorNameObj,
url: appointHistory.doctorImageURL,
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
appointHistory.doctorNameObj,
bold: true,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)),
variant: 'caption3',
),
StarRating(totalAverage: appointHistory.doctorRate.toDouble(), forceStars: true),
],
),
),
),
],
),
),
],
),
),
Expanded(
flex: 1,
child: Center(
child: Icon(
Icons.arrow_forward,
size: 15,
),
),
)
],
),
child: DoctorCard(
onTap: null,
isInOutPatient: appointHistory.isInOutPatient,
name: appointHistory.doctorTitle + " " + appointHistory.doctorNameObj,
// billNo: _appointmentResult.invoiceNo,
profileUrl: appointHistory.doctorImageURL,
subName: appointHistory.projectName,
isLiveCareAppointment: appointHistory.isLiveCareAppointment,
date: DateUtil.convertStringToDate(appointHistory.appointmentDate),
rating: appointHistory.actualDoctorRate + 0.0,
appointmentTime: appointHistory.startTime.substring(0, 5),
),
),
if (messageType == MessageType.ComplaintOnAnAppointment && model.appointHistoryList.length != 0 && isShowListAppointHistory)
SizedBox(height: 12),
if (messageType == MessageType.ComplaintOnAnAppointment && appoList.length != 0 && isShowListAppointHistory)
Container(
height: model.appointHistoryList.length > 2 ? MediaQuery.of(context).size.height * 0.25 : MediaQuery.of(context).size.height * 0.15,
margin: EdgeInsets.only(bottom: 10.0),
height: appoList.length > 2 ? MediaQuery.of(context).size.height * 0.35 : MediaQuery.of(context).size.height * 0.17,
child: ListView.builder(
itemCount: model.appointHistoryList.length,
itemCount: appoList.length,
itemBuilder: (context, index) => InkWell(
onTap: () {
setState(() {
appointHistory = model.appointHistoryList[index];
appointHistory = appoList[index];
isShowListAppointHistory = false;
});
},
child: Container(
margin: EdgeInsets.only(left: 8, right: 8),
color: Colors.white,
child: Column(
children: <Widget>[
Row(
children: <Widget>[
Expanded(
flex: 4,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Padding(
padding: const EdgeInsets.all(10.0),
child: Row(
children: <Widget>[
Expanded(
flex: 1,
child: LargeAvatar(
name: model.appointHistoryList[index].doctorNameObj,
url: model.appointHistoryList[index].doctorImageURL,
),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.all(10),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
model.appointHistoryList[index].doctorNameObj,
bold: true,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
variant: 'caption3',
),
StarRating(totalAverage: model.appointHistoryList[index].doctorRate.toDouble(), forceStars: true),
],
),
),
),
],
),
),
],
),
),
Expanded(
flex: 1,
child: Center(
child: Icon(
Icons.arrow_forward,
size: 15,
),
),
)
],
),
SizedBox(
height: 5,
),
Divider(
height: 0.5,
color: Colors.grey[400],
)
],
),
child: DoctorCard(
onTap: null,
isInOutPatient: appoList[index].isInOutPatient,
name: appoList[index].doctorTitle + " " + appoList[index].doctorNameObj,
profileUrl: appoList[index].doctorImageURL,
subName: appoList[index].projectName,
isLiveCareAppointment: appoList[index].isLiveCareAppointment,
date: DateUtil.convertStringToDate(appoList[index].appointmentDate),
rating: appoList[index].actualDoctorRate + 0.0,
appointmentTime: appoList[index].startTime.substring(0, 5),
),
),
),
),
inputWidget(TranslationBase.of(context).subject, "xxxxxxxx", titleController),
inputWidget(TranslationBase.of(context).subject, "", titleController),
SizedBox(height: 12),
inputWidget(TranslationBase.of(context).message, "xxxxxxxx", messageController, lines: 11, suffixTap: () {
inputWidget(TranslationBase.of(context).message, "", messageController, lines: 11, suffixTap: () {
openSpeechReco();
}),
SizedBox(height: 12),
@ -492,7 +363,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
TextField(
enabled: isEnable,
scrollPadding: EdgeInsets.zero,
keyboardType: TextInputType.number,
keyboardType: TextInputType.text,
controller: _controller,
maxLines: lines,
onChanged: (value) => {setState(() {})},
@ -515,19 +386,6 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
),
suffixIconConstraints: BoxConstraints(minWidth: 50),
suffixIcon: suffixTap == null ? null : IconButton(icon: Icon(Icons.mic, color: Color(0xff2E303A)), onPressed: suffixTap),
// prefixIconConstraints: BoxConstraints(minWidth: 50),
// prefixIcon: suffix == null
// ? null
// : Text(
// "+" + suffix,
// style: TextStyle(
// fontSize: 14,
// height: 21 / 14,
// fontWeight: FontWeight.w500,
// color: Color(0xff2E303A),
// letterSpacing: -0.56,
// ),
// ),
contentPadding: EdgeInsets.zero,
border: InputBorder.none,
focusedBorder: InputBorder.none,
@ -570,19 +428,39 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
// Show Dialog function
void confirmBox(FeedbackViewModel model) {
DoctorsListService service = new DoctorsListService();
showDialog(
context: context,
child: FeedbackTypeDialog(
messageTypeDialog: messageType,
onValueSelected: (MessageType value) {
if (value == MessageType.ComplaintOnAnAppointment) {
appoList.clear();
GifLoaderDialogUtils.showMyDialog(context);
model.getPatentAppointmentHistory().then((value) {
service.getPatientAppointmentHistory(false, context, isForCOC: true).then((res) {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
appointHistory = null;
if (res['MessageStatus'] == 1) {
if (res['AppoimentAllHistoryResultList'].length != 0) {
res['AppoimentAllHistoryResultList'].forEach((v) {
appoList.add(new AppoitmentAllHistoryResultList.fromJson(v));
});
setState(() {
appointHistory = null;
isShowListAppointHistory = true;
});
} else {}
} else {
}
});
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
// print(err);
// AppToast.showErrorToast(message: err);
// Navigator.of(context).pop();
});
} else {
isShowListAppointHistory = false;
}
setMessageType(value);
},
@ -694,7 +572,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio(
value: MessageType.NON,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
activeColor: CustomColors.accentColor,
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
@ -716,7 +594,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio(
value: MessageType.ComplaintOnAnAppointment,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
activeColor: CustomColors.accentColor,
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
@ -738,7 +616,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio(
value: MessageType.ComplaintWithoutAppointment,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
activeColor: CustomColors.accentColor,
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
@ -760,7 +638,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio(
value: MessageType.Question,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
activeColor: CustomColors.accentColor,
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
@ -782,7 +660,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio(
value: MessageType.Compliment,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
activeColor: CustomColors.accentColor,
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
@ -804,7 +682,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
leading: Radio(
value: MessageType.Suggestion,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
activeColor: CustomColors.accentColor,
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
@ -837,7 +715,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
child: Center(
child: Texts(
TranslationBase.of(context).cancel,
color: Theme.of(context).primaryColor,
color: CustomColors.accentColor,
),
),
),

@ -1,13 +1,16 @@
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class StatusFeedbackPage extends StatefulWidget {
@override
@ -17,6 +20,7 @@ class StatusFeedbackPage extends StatefulWidget {
class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<FeedbackViewModel>(
onModelReady: (model) => model.getCOC(),
builder: (_, model, widget) => AppScaffold(
@ -28,67 +32,69 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
child: model.cOCItemList.isNotEmpty
? Container(
margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0, bottom: 80),
padding: EdgeInsets.all(15.0),
child: ListView.builder(
itemCount: model.cOCItemList.length,
itemBuilder: (context, index) => InkWell(
onTap: () {
gotodetails(model.cOCItemList[index]);
},
child: Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
margin: EdgeInsets.all(4),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].cOCTitle}'),
Texts(
TranslationBase.of(context).number + ' : ${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].status}'),
Texts(
'${model.cOCItemList[index].date}',
variant: 'overline',
),
],
),
),
],
),
Texts('${model.cOCItemList[index].formType}'),
Divider(
height: 4.5,
color: Colors.grey[500],
)
],
onTap: () {
},
child: Card(
shape: cardRadius(12),
margin: EdgeInsets.all(10),
child: Padding(
padding: const EdgeInsets.all(12.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(projectViewModel.isArabic ? model.cOCItemList[index].statusAr : model.cOCItemList[index].status,
style: TextStyle(fontSize: 14.0, letterSpacing: -0.56, fontWeight: FontWeight.bold)),
Container(
margin: EdgeInsets.only(top: 5.0),
child: Text(model.cOCItemList[index].formType,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
color: Color(0xff2B353E),
letterSpacing: -0.48,
height: 18 / 12))),
myRichText(TranslationBase.of(context).number + ": ", model.cOCItemList[index].itemID.toString(), projectViewModel.isArabic),
Text(model.cOCItemList[index].cOCTitle,
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
color: Color(0xff2B353E),
letterSpacing: -0.48,
height: 18 / 12)),
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(model.cOCItemList[index].date.split(" ")[0],
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
color: Color(0xff2B353E),
letterSpacing: -0.48)),
Text(model.cOCItemList[index].date.split(" ")[1],
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
color: Color(0xff2B353E),
letterSpacing: -0.48)),
],
),
],
),
),
),
))),
)),
)
: Center(
child: Column(
@ -117,16 +123,17 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
),
),
),
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).search,
() => {},
),
),
],
),
bottomSheet: Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).search,
projectViewModel.isLogin ? null : () => {},
disabledColor: Colors.grey,
),
),
),
);
}

@ -1,5 +1,6 @@
import 'dart:io';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:flutter/cupertino.dart';
@ -154,8 +155,12 @@ class _AttachInsuranceCardImageDialogState extends State<AttachInsuranceCardImag
flex: 1,
child: InkWell(
onTap: () {
Navigator.pop(context);
widget.image(file, image);
if(file != null && image != null) {
Navigator.pop(context);
widget.image(file, image);
} else {
AppToast.showErrorToast(message: TranslationBase.of(context).noInsuranceCardAttached);
}
},
child: Padding(
padding: const EdgeInsets.all(8.0),

@ -2,7 +2,9 @@ import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/insurance_card_View_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/extensions/string_extensions.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils_new.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/data_display/medical/doctor_card.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -45,7 +47,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
description: TranslationBase.of(context).infoApprovals,
infoList: TranslationBase.of(context).infoApprovalPoints,
imagesInfo: imagesInfo,
body: ListView.separated(
body: model.insuranceApproval.length > 0 ? ListView.separated(
padding: EdgeInsets.all(21),
physics: BouncingScrollPhysics(),
itemBuilder: (_, index) {
@ -148,7 +150,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
height: 48,
alignment: Alignment.bottomRight,
child: Icon(
Icons.visibility_sharp,
Icons.arrow_forward,
color: Color(0xff2E303A),
),
)
@ -164,7 +166,7 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
);
},
separatorBuilder: (context, index) => SizedBox(height: 12),
itemCount: model.insuranceApproval.length)),
itemCount: model.insuranceApproval.length) : getNoDataWidget(context)),
);
}

@ -150,7 +150,9 @@ class InsurancePage extends StatelessWidget {
patientID: patientID,
patientIdentificationID: patientIdentificationID,
name: name,
)));
))).then((value) {
model.getInsuranceUpdated();
});
} else {
AppToast.showErrorToast(message: _insuranceCardService.error);
}

@ -77,6 +77,8 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
SignalRUtil signalRUtil;
ToDoCountProviderModel toDoProvider;
bool _showBottomNavigationBar = true;
///inject the user data
@ -505,6 +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, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
})
}
@ -555,14 +558,14 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(0);
},
),
projectViewModel.isLogin && notificationCount != ''
projectViewModel.isLogin && model.notificationsCount != null
? new Positioned(
right: projectViewModel.isArabic ? 35 : 0,
top: 5,
child: new Container(
padding: EdgeInsets.all(4),
decoration: new BoxDecoration(
color: Colors.red,
color: CustomColors.accentColor,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
@ -570,7 +573,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
minHeight: 20,
),
child: new Text(
notificationCount,
model.notificationsCount.toString(),
style: new TextStyle(
color: Colors.white,
fontSize: projectViewModel.isArabic ? 8 : 9,
@ -677,6 +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, notificationCount);
sharedPref.setString(NOTIFICATION_COUNT, notificationCount);
}
}),

@ -170,11 +170,11 @@ class _LiveCareTypeSelectState extends State<LiveCareTypeSelect> {
),
InkWell(
onTap: (){
Navigator.pop(context, "schedule");
// Navigator.pop(context, "schedule");
},
child: Container(
decoration: BoxDecoration(
color: Colors.grey[700],
color: Colors.grey[400],
borderRadius: BorderRadius.all(Radius.circular(10.0))),
height: 100.0,
margin: EdgeInsets.only(top: 20.0),

@ -160,9 +160,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
),
Text(
user.editedOn != null
? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.editedOn), projectViewModel.isArabic)
? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user.editedOn))
: user.createdOn != null
? DateUtil.formatDateToDate(DateUtil.convertStringToDate(user.createdOn), projectViewModel.isArabic)
? DateUtil.getDayMonthYearDateFormatted(DateUtil.convertStringToDate(user.createdOn))
: '--',
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48),
),
@ -191,9 +191,9 @@ class _ConfirmLogin extends State<ConfirmLogin> {
Expanded(child: SizedBox()),
Text(
user.editedOn != null
? DateUtil.formatDateToTime(DateUtil.convertStringToDate(user.editedOn))
? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user.editedOn), false)
: user.createdOn != null
? DateUtil.formatDateToTime(DateUtil.convertStringToDate(user.createdOn))
? DateUtil.formatDateToTimeLang(DateUtil.convertStringToDate(user.createdOn), false)
: '--',
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.48),
),
@ -582,11 +582,11 @@ class _ConfirmLogin extends State<ConfirmLogin> {
}
getToDoCount() {
toDoProvider.setState(0, true);
toDoProvider.setState(0, true, "0");
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
toDoProvider.setState(res['AppointmentActiveNumber'], true, "0");
} else {}
}).catchError((err) {
print(err);

@ -359,12 +359,12 @@ class _Login extends State<Login> {
}
getToDoCount() {
toDoProvider.setState(0, true);
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);

@ -24,7 +24,7 @@ class ActiveMedicationsPage extends StatelessWidget {
isShowDecPage: true,
baseViewModel: model,
appBarTitle: TranslationBase.of(context).activeMedications,
body: Container(
body: model.activePrescriptionReport.length > 0 ? Container(
child: ListView.builder(
itemCount: model.activePrescriptionReport.length,
itemBuilder: (context, index) => Container(
@ -197,7 +197,7 @@ class ActiveMedicationsPage extends StatelessWidget {
),
),
),
),
) : getNoDataWidget(context),
),
);
}

@ -4,9 +4,11 @@ import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart
import 'package:diplomaticquarterapp/pages/BookAppointment/widgets/DoctorView.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/ask_doctor/request_type.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_expandable_notifier.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -22,7 +24,20 @@ class AskDoctorPage extends StatelessWidget {
onModelReady: (model) => model.getMyDoctor(),
builder: (_, model, w) => AppScaffold(
baseViewModel: model,
body: _appointmentExpandableList(model.patientDoctorAppointmentListHospital, model),
body: model.patientDoctorAppointmentListHospital.length > 0 ? _appointmentExpandableList(model.patientDoctorAppointmentListHospital, model) : noDoctor(context),
),
);
}
Widget noDoctor(BuildContext context) {
return Container(
margin: EdgeInsets.only(left: 50.0, right: 50.0),
child: Center(
child: Text(TranslationBase.of(context).askDocEmpty, textAlign: TextAlign.center, style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w400,
color: CustomColors.accentColor
)),
),
);
}

@ -15,6 +15,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
@ -258,16 +259,13 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
),
),
bottomSheet: Container(
height: 70,
width: double.infinity,
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12),
color: Colors.white,
child: SecondaryButton(
textColor: Colors.white,
label: TranslationBase.of(context).submit,
color: CustomColors.accentColor,
disabled: amount.isEmpty || _fileTextController.text.isEmpty || _selectedHospital == null,
onTap: () {
child: DefaultButton(
TranslationBase.of(context).submit,
(amount.isEmpty || _fileTextController.text.isEmpty || _selectedHospital == null) ? null :
() {
var mobileNum;
var patientName;
@ -320,6 +318,7 @@ class _AdvancePaymentPageState extends State<AdvancePaymentPage> {
}
});
},
disabledColor: Colors.grey,
),
)),
);

@ -129,7 +129,11 @@ class WeightWeeklyPage extends StatelessWidget {
model: model,
),
),
);
).then((value) {
if (model.weekWeightMeasurementResult.isEmpty) {
model.weightWeekTimeSeriesData.clear();
}
});
},
child: Container(
// height: 70,

@ -111,7 +111,12 @@ class BloodPressureWeeklyPage extends StatelessWidget {
measureTimeSelectedType: diabtec.measuredArmDesc,
),
),
);
).then((value) {
if(model.weekDiabtecPatientResult.isEmpty) {
model.weightWeekTimeSeriesDataTop.clear();
model.weightWeekTimeSeriesDataLow.clear();
}
});
},
child: Container(
// height: 70,

@ -116,7 +116,11 @@ class BloodSugarWeeklyPage extends StatelessWidget {
bloodSugarViewMode: bloodSugarViewMode,
),
),
);
).then((value) {
if(bloodSugarViewMode.weekDiabtecPatientResult.isEmpty) {
timeSeriesData.clear();
}
});
},
child: Container(
// height: 70,

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

@ -6,6 +6,7 @@ import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:giffy_dialog/giffy_dialog.dart';
import 'package:maps_launcher/maps_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
@ -53,9 +54,7 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(prescriptionReport.itemDescription.isNotEmpty
? prescriptionReport.itemDescription
: prescriptionReport.itemDescriptionN ?? ''),
child: Texts(prescriptionReport.itemDescription.isNotEmpty ? prescriptionReport.itemDescription : prescriptionReport.itemDescriptionN ?? ''),
),
),
)
@ -68,70 +67,172 @@ class PharmacyForPrescriptionsPage extends StatelessWidget {
scrollDirection: Axis.vertical,
physics: BouncingScrollPhysics(),
itemBuilder: (context, index) => Container(
width: double.infinity,
margin: EdgeInsets.only(top: 10, left: 10, right: 10),
padding: EdgeInsets.all(8.0),
margin: EdgeInsets.all(12.0),
padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
border: Border.all(color: Colors.grey[200], width: 0.5),
),
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(5)),
child: Image.network(
model.pharmacyPrescriptionsList[index].projectImageURL,
fit: BoxFit.cover,
width: 60,
height: 70,
InkWell(
onTap: () {
showDialog(
context: context,
builder: (_) => AssetGiffyDialog(
title: Text(
model.pharmacyPrescriptionsList[index].locationDescription,
style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
),
image: Image.network(
model.pharmacyPrescriptionsList[index].projectImageURL.toString(),
fit: BoxFit.cover,
),
buttonCancelText: Text(TranslationBase.of(context).cancel),
buttonCancelColor: Colors.grey,
onlyCancelButton: true,
),
);
},
child: ClipRRect(
borderRadius: BorderRadius.circular(12),
child: Image.network(
model.pharmacyPrescriptionsList[index].projectImageURL.toString(),
width: 48,
height: 48,
fit: BoxFit.cover,
),
),
),
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(model.pharmacyPrescriptionsList[index].locationDescription),
SizedBox(
height: 5,
),
Texts(model.pharmacyPrescriptionsList[index].cityName),
],
padding: EdgeInsets.only(left: 12, right: 12),
child: Text(
model.pharmacyPrescriptionsList[index].locationDescription?.trim().toString() +
"\n" +
model.pharmacyPrescriptionsList[index].cityName.trim().toString() +
"\n" +
model.pharmacyPrescriptionsList[index].distanceInKilometers.toString() +
" " +
TranslationBase.of(context).km_ ??
"",
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: Color(0xff2E303A),
letterSpacing: -0.56,
),
),
),
),
InkWell(
onTap: () {
MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude));
},
child: Icon(
Icons.pin_drop,
size: 18,
color: Colors.red[900],
), //model.cOCItemList[index].cOCTitl
IconButton(
icon: Icon(
Icons.location_on,
color: Color(0xff2B353E),
),
constraints: BoxConstraints(),
padding: EdgeInsets.all(8),
tooltip: '',
onPressed: () {
// setState(() {
MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude),
model.pharmacyPrescriptionsList[index].locationDescription);
// });
},
),
SizedBox(
width: 15,
),
InkWell(
onTap: Feedback.wrapForTap(() {
launch("tel://${model.pharmacyPrescriptionsList[index].phoneNumber}");
}, context),
child: Container(
child: Icon(
Icons.call,
size: 18,
color: Colors.red[900],
),
IconButton(
icon: Icon(
Icons.phone,
color: Color(0xff2B353E),
),
)
constraints: BoxConstraints(),
padding: EdgeInsets.all(8),
tooltip: '',
onPressed: () {
// setState(() {
launch("tel://" + model.pharmacyPrescriptionsList[index].phoneNumber);
// });
},
),
],
),
),
// Container(
// width: double.infinity,
// margin: EdgeInsets.only(top: 10, left: 10, right: 10),
// padding: EdgeInsets.all(8.0),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.all(
// Radius.circular(10.0),
// ),
// border: Border.all(color: Colors.grey[200], width: 0.5),
// ),
// child: Row(
// children: <Widget>[
// ClipRRect(
// borderRadius: BorderRadius.all(Radius.circular(5)),
// child: Image.network(
// model.pharmacyPrescriptionsList[index].projectImageURL,
// fit: BoxFit.cover,
// width: 60,
// height: 70,
// ),
// ),
// Expanded(
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// Texts(model.pharmacyPrescriptionsList[index].locationDescription),
// SizedBox(
// height: 5,
// ),
// Texts(model.pharmacyPrescriptionsList[index].cityName),
// ],
// ),
// ),
// ),
// InkWell(
// onTap: () {
// MapsLauncher.launchCoordinates(double.parse(model.pharmacyPrescriptionsList[index].latitude), double.parse(model.pharmacyPrescriptionsList[index].longitude));
// },
// child: Icon(
// Icons.pin_drop,
// size: 18,
// color: Colors.red[900],
// ),
// ),
// SizedBox(
// width: 15,
// ),
// InkWell(
// onTap: Feedback.wrapForTap(() {
// launch("tel://${model.pharmacyPrescriptionsList[index].phoneNumber}");
// }, context),
// child: Container(
// child: Icon(
// Icons.call,
// size: 18,
// color: Colors.red[900],
// ),
// ),
// )
// ],
// ),
// ),
itemCount: model.pharmacyPrescriptionsList.length,
),
)

@ -109,11 +109,11 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.formatDateToDate(prescriptionsOrder.createdOn, projectViewModel.isArabic),
DateUtil.getDayMonthYearDateFormatted(prescriptionsOrder.createdOn),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
Text(
DateUtil.formatDateToTime(prescriptionsOrder.createdOn),
DateUtil.formatDateToTimeLang(prescriptionsOrder.createdOn, false),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
],

@ -119,11 +119,11 @@ class PrescriptionsHistoryPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.formatDateToDate(prescriptionsViewModel.prescriptionsHistory[index].createdOn, projectViewModel.isArabic),
DateUtil.getDayMonthYearDateFormatted(prescriptionsViewModel.prescriptionsHistory[index].createdOn),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.4, height: 16 / 10),
),
Text(
DateUtil.formatDateToTime(prescriptionsViewModel.prescriptionsHistory[index].createdOn),
DateUtil.formatDateToTimeLang(prescriptionsViewModel.prescriptionsHistory[index].createdOn, false),
style: TextStyle(fontSize: 12, fontWeight: FontWeight.w600, color: Color(0xff575757), letterSpacing: -0.4, height: 16 / 10),
),
],

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

@ -33,7 +33,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
// vitalSigns.add(new VitalSign(TranslationBase.of(context).body, mode.bodyMax, TranslationBase.of(context).mass, "assets/images/new/"));
vitalSigns.add(new VitalSign(TranslationBase.of(context).temperature, mode.temperatureCelcius, TranslationBase.of(context).tempC, "assets/images/new/temperature.svg"));
vitalSigns.add(new VitalSign(TranslationBase.of(context).heart, mode.hartRat, TranslationBase.of(context).bpm, "assets/images/new/heart_rate.svg"));
vitalSigns.add(new VitalSign(TranslationBase.of(context).respirationRate, mode.respirationBeatPerMinute, TranslationBase.of(context).bpm, "assets/images/new/respiration_rate.svg"));
vitalSigns.add(new VitalSign(TranslationBase.of(context).respirationRate, mode.respirationBeatPerMinute, TranslationBase.of(context).respirationBPM, "assets/images/new/respiration_rate.svg"));
vitalSigns.add(new VitalSign(TranslationBase.of(context).bloodPressure, mode.bloodPressure, TranslationBase.of(context).sysDias, "assets/images/new/blood_pressure.svg"));
}
@ -71,7 +71,7 @@ class VitalSignDetailsScreen extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Body Mass Index is: " + mode.bodyMax,
TranslationBase.of(context).bodyMassIndex + mode.bodyMax,
style: TextStyle(
fontSize: 16,
letterSpacing: -0.64,
@ -83,15 +83,15 @@ class VitalSignDetailsScreen extends StatelessWidget {
height: MediaQuery.of(context).size.width / 2.8,
child: Row(
children: [
showMass(context, "Underweight", "< 18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8),
showMass(context, TranslationBase.of(context).underWeight, "< 18.5", double.parse(mode.bodyMax) <= 18.5 ? Colors.red : Colors.black, 8),
mWidth(12),
showMass(context, "Normal", "18.5 - 24.9", (double.parse(mode.bodyMax) > 18.5 && double.parse(mode.bodyMax) < 25) ? Colors.red : Colors.black, 6),
showMass(context, TranslationBase.of(context).healthy, "18.5 - 24.9", (double.parse(mode.bodyMax) > 18.5 && double.parse(mode.bodyMax) < 25) ? Colors.red : Colors.black, 6),
mWidth(12),
showMass(context, "Overweight", "25 - 29.9", (double.parse(mode.bodyMax) >= 25 && double.parse(mode.bodyMax) < 30) ? Colors.red : Colors.black, 4),
showMass(context, TranslationBase.of(context).overWeight, "25 - 29.9", (double.parse(mode.bodyMax) >= 25 && double.parse(mode.bodyMax) < 30) ? Colors.red : Colors.black, 4),
mWidth(12),
showMass(context, "Obese", "30 - 34.9", (double.parse(mode.bodyMax) >= 30 && double.parse(mode.bodyMax) < 35) ? Colors.red : Colors.black, 2),
showMass(context, TranslationBase.of(context).obese, "30 - 34.9", (double.parse(mode.bodyMax) >= 30 && double.parse(mode.bodyMax) < 35) ? Colors.red : Colors.black, 2),
mWidth(12),
showMass(context, "Extreme Obese", "> 35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0),
showMass(context, TranslationBase.of(context).extremeObese, "> 35", (double.parse(mode.bodyMax) >= 35) ? Colors.red : Colors.black, 0),
],
),
),

@ -96,7 +96,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
height: 25 / 16),
),
Text(
model.appointmentDetails.startTime,
model.appointmentDetails.startTime.toString().substring(0, 5),
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
@ -131,7 +131,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
projectViewModel.isArabic),
myRichText(
TranslationBase.of(context).date + ":",
DateUtil.getMonthDayYearDateFormatted(
DateUtil.getDayMonthYearDateFormatted(
DateUtil.convertStringToDate(model
.appointmentDetails
.appointmentDate)),

@ -111,7 +111,6 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
color: rating >= (index + 1)
? Color.fromRGBO(255, 186, 0, 1.0)
: Colors.grey[400],
// Theme.of(context).hintColor,
icon: Icon(rating >= (index + 1)
? Icons.star
: Icons.star)),

@ -53,7 +53,7 @@ class _MyVaccinesState extends State<MyVaccines> {
separatorBuilder: (context, index) => SizedBox(height: 14),
itemBuilder: (BuildContext context, int index) {
return DoctorCard(
onTap: () {},
onTap: null,
isInOutPatient: true,
isShowInOutPatient: false,
name: TranslationBase.of(context).dr.toString() + " " + model.vaccineList[index].doctorName,

@ -496,7 +496,7 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getPatientAppointmentHistory(bool isActiveAppointment, BuildContext context) async {
Future<Map> getPatientAppointmentHistory(bool isActiveAppointment, BuildContext context, {bool isForCOC = false}) async {
Map<String, dynamic> request;
if (await this.sharedPref.getObject(USER_PROFILE) != null) {
@ -520,6 +520,7 @@ class DoctorsListService extends BaseService {
"DeviceTypeID": req.DeviceTypeID,
"PatientID": authUser.patientID,
"PatientTypeID": authUser.patientType,
"IsComingFromCOC": isForCOC,
"PatientType": authUser.patientType
};

@ -406,7 +406,7 @@ class DateUtil {
/// get data formatted like 10:30 according to lang
static String formatDateToTimeLang(DateTime date, bool isArabic) {
return DateFormat('hh:mm a', isArabic ? "ar_SA" : "en_US").format(date);
return DateFormat('HH:mm', isArabic ? "ar_SA" : "en_US").format(date);
}
/// get data formatted like 26/4/2020 10:30

@ -2334,6 +2334,16 @@ class TranslationBase {
String get rateDoctor => localizedValues["rateDoctor"][locale.languageCode];
String get rateAppointment => localizedValues["rateAppointment"][locale.languageCode];
String get noInsuranceCardAttached => localizedValues["noInsuranceCardAttached"][locale.languageCode];
String get bodyMassIndex => localizedValues["bodyMassIndex"][locale.languageCode];
String get extremeObese => localizedValues["extremeObese"][locale.languageCode];
String get respirationBPM => localizedValues["respirationBPM"][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,6 +1,9 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
Decoration appGradient = BoxDecoration(
gradient: LinearGradient(
@ -23,6 +26,22 @@ Color getColorFromHex(String hexColor) {
return Color(int.parse(hexColor, radix: 16));
}
Widget getNoDataWidget(BuildContext context) {
return Container(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset('assets/images/new/not_found.svg', width: 110.0, height: 110.0),
Container(
margin: EdgeInsets.only(top: 15.0),
child: Text(TranslationBase.of(context).noResultFound, style: TextStyle(fontSize: 14, fontWeight: FontWeight.w400, color: Color(0xFFBABABA)))),
],
),
),
);
}
spacerVertical(double v) {
return Container(
height: v,

@ -65,6 +65,7 @@ class _BottomNavBarState extends State<BottomNavBar> {
index: widget.index,
currentIndex: 3,
name: TranslationBase.of(context).myFamily,
// isDisabled: projectViewModel.isLoginChild,
),
if (widget.index == 0)
(widget.showHomeIcon)

@ -16,17 +16,11 @@ class BottomNavigationItem extends StatelessWidget {
final int index;
final int currentIndex;
final String name;
final bool isDisabled;
AuthenticatedUserObject authenticatedUserObject =
locator<AuthenticatedUserObject>();
AuthenticatedUserObject authenticatedUserObject = locator<AuthenticatedUserObject>();
BottomNavigationItem(
{this.icon,
this.activeIcon,
this.changeIndex,
this.index,
this.currentIndex,
this.name});
BottomNavigationItem({this.icon, this.activeIcon, this.changeIndex, this.index, this.currentIndex, this.name, this.isDisabled = false});
@override
Widget build(BuildContext context) {
@ -39,7 +33,9 @@ class BottomNavigationItem extends StatelessWidget {
child: InkWell(
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
onTap: () => changeIndex(currentIndex),
onTap: () {
if (!isDisabled) changeIndex(currentIndex);
},
child: currentIndex != 4
? Column(
mainAxisSize: MainAxisSize.min,
@ -49,11 +45,7 @@ class BottomNavigationItem extends StatelessWidget {
height: 15,
),
Container(
child: Icon(currentIndex == index ? activeIcon : icon,
color: currentIndex == index
? secondaryColor
: Colors.grey,
size: 22.0),
child: Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? secondaryColor : Colors.grey, size: 22.0),
),
SizedBox(
height: 2,
@ -61,9 +53,7 @@ class BottomNavigationItem extends StatelessWidget {
Texts(
name,
textAlign: TextAlign.center,
color: currentIndex == index
? secondaryColor
: Colors.grey,
color: currentIndex == index ? secondaryColor : Colors.grey,
fontSize: 11,
),
SizedBox(
@ -86,9 +76,7 @@ class BottomNavigationItem extends StatelessWidget {
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(model.count.toString(),
style: TextStyle(
color: Colors.white, fontSize: 14.0)),
child: Text(model.count.toString(), style: TextStyle(color: Colors.white, fontSize: 14.0)),
),
),
),
@ -100,12 +88,7 @@ class BottomNavigationItem extends StatelessWidget {
height: 15,
),
Container(
child: Icon(
currentIndex == index ? activeIcon : icon,
color: currentIndex == index
? secondaryColor
: Theme.of(context).dividerColor,
size: 22.0),
child: Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? secondaryColor : Theme.of(context).dividerColor, size: 22.0),
),
SizedBox(
height: 2,
@ -113,9 +96,7 @@ class BottomNavigationItem extends StatelessWidget {
Texts(
name,
textAlign: TextAlign.center,
color: currentIndex == index
? Theme.of(context).primaryColor
: Colors.grey,
color: currentIndex == index ? Theme.of(context).primaryColor : Colors.grey,
fontSize: 11,
),
SizedBox(
@ -133,12 +114,7 @@ class BottomNavigationItem extends StatelessWidget {
height: 15,
),
Container(
child: Icon(
currentIndex == index ? activeIcon : icon,
color: currentIndex == index
? secondaryColor
: Theme.of(context).dividerColor,
size: 22.0),
child: Icon(currentIndex == index ? activeIcon : icon, color: currentIndex == index ? secondaryColor : isDisabled ? Colors.grey[300] : Theme.of(context).dividerColor, size: 22.0),
),
SizedBox(
height: 2,
@ -146,9 +122,7 @@ class BottomNavigationItem extends StatelessWidget {
Texts(
name,
textAlign: TextAlign.center,
color: currentIndex == index
? secondaryColor
: Colors.grey,
color: currentIndex == index ? secondaryColor : isDisabled ? Colors.grey[300] : Colors.grey,
fontSize: 11,
),
SizedBox(

@ -135,7 +135,7 @@ class DoctorCard extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
DateUtil.getDayMonthYearDateFormattedLang(date, projectViewModel.isArabic),
DateUtil.getDayMonthYearDateFormatted(date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
Text(
@ -216,10 +216,10 @@ class DoctorCard extends StatelessWidget {
color: Theme.of(context).primaryColor,
),
)
: Icon(
: onTap != null ? Icon(
Icons.arrow_forward,
color: Theme.of(context).primaryColor,
),
) : SizedBox(),
),
),
],

@ -20,6 +20,7 @@ import 'package:diplomaticquarterapp/pages/webRTC/call_page.dart';
import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/theme/theme_notifier.dart';
import 'package:diplomaticquarterapp/theme/theme_value.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
@ -328,12 +329,12 @@ class _AppDrawerState extends State<AppDrawer> {
letterSpacing: -0.84,
fontSize: 14,
projectProvider: projectProvider,
count: notificationCount != null
count: toDoProvider.notificationsCount != 0
? new Container(
padding: EdgeInsets.all(4),
margin: EdgeInsets.all(2),
decoration: new BoxDecoration(
color: Colors.red,
color: CustomColors.accentColor,
borderRadius: BorderRadius.circular(20),
),
constraints: BoxConstraints(
@ -341,7 +342,7 @@ class _AppDrawerState extends State<AppDrawer> {
minHeight: 20,
),
child: new Text(
notificationCount,
toDoProvider.notificationsCount.toString(),
style: new TextStyle(
color: Colors.white,
fontSize: projectProvider.isArabic ? 8 : 9,
@ -529,7 +530,7 @@ class _AppDrawerState extends State<AppDrawer> {
this.familyFileProvider.silentLoggin(user is AuthenticatedUser ? null : user, mainUser: user is AuthenticatedUser).then((value) {
// GifLoaderDialogUtils.hideDialog(context);
// Navigator.of(context).pop();
loginAfter(value, context);
loginAfter(value, context, user is AuthenticatedUser);
}).catchError((err) {
GifLoaderDialogUtils.hideDialog(context);
print(err);
@ -538,9 +539,9 @@ class _AppDrawerState extends State<AppDrawer> {
});
}
loginAfter(result, context) async {
loginAfter(result, context, isMainUser) async {
Utils.hideProgressDialog();
Provider.of<ProjectViewModel>(context, listen: false).setPrivilege(privilegeList: result, isLoginChild: true);
Provider.of<ProjectViewModel>(context, listen: false).setPrivilege(privilegeList: result, isLoginChild: !isMainUser);
result = CheckActivationCode.fromJson(result);
var familyFile = await sharedPref.getObject(FAMILY_FILE);
@ -605,12 +606,12 @@ class _AppDrawerState extends State<AppDrawer> {
}
getToDoCount() {
toDoProvider.setState(0, true);
toDoProvider.setState(0, true, toDoProvider.notificationsCount);
ClinicListService service = new ClinicListService();
service.getActiveAppointmentNo(context).then((res) {
print(res['AppointmentActiveNumber']);
if (res['MessageStatus'] == 1 && res['AppointmentActiveNumber'] != null) {
toDoProvider.setState(res['AppointmentActiveNumber'], true);
toDoProvider.setState(res['AppointmentActiveNumber'], true, toDoProvider.notificationsCount);
} else {}
}).catchError((err) {
print(err);

@ -79,7 +79,7 @@ class DoctorHeader extends StatelessWidget {
children: [
if (headerModel.date != null)
Text(
DateUtil.getDayMonthYearDateFormattedLang(headerModel.date, projectViewModel.isArabic),
DateUtil.getDayMonthYearDateFormatted(headerModel.date),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
if (headerModel.time != null)
@ -126,7 +126,7 @@ class DoctorHeader extends StatelessWidget {
),
SizedBox(width: 6),
Text(
"${headerModel.totalReviews} ${TranslationBase.of(context).reviews}",
"${headerModel.totalReviews == null ? 0 : headerModel.totalReviews} ${TranslationBase.of(context).reviews}",
style: TextStyle(
fontSize: 12,
fontWeight: FontWeight.w600,

@ -9,11 +9,11 @@ class ArrowBack extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
// ProjectViewModel projectViewModel = Provider.of(context);
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: Feedback.wrapForTap(() {
onTap != null ? onTap() : Navigator.pop(context);
onTap != null ? onTap() : Navigator.maybePop(context);
}, context),
child: Icon(
Icons.arrow_back_ios,

@ -241,6 +241,7 @@ flutter:
- assets/images/new/mass/
- assets/images/new/bottom_nav/
- assets/images/new/services/
- assets/images/new/appointment-rating/
fonts:
- family: WorkSans

Loading…
Cancel
Save