Updates & fixes

merge-requests/432/head
haroon amjad 3 years ago
parent 6c4afaf114
commit cb220031dd

@ -103,6 +103,7 @@ class TransportationDetails {
String pickupDateTime; String pickupDateTime;
String transportationType; String transportationType;
int ambulate; int ambulate;
String ambulateTitle;
String notes; String notes;
int requesterFileNo; int requesterFileNo;
String requesterMobileNo; String requesterMobileNo;
@ -128,6 +129,7 @@ class TransportationDetails {
this.pickupDateTime, this.pickupDateTime,
this.transportationType, this.transportationType,
this.ambulate, this.ambulate,
this.ambulateTitle,
this.notes, this.notes,
this.requesterFileNo, this.requesterFileNo,
this.requesterMobileNo, this.requesterMobileNo,
@ -153,6 +155,7 @@ class TransportationDetails {
pickupDateTime = json['pickupDateTime']; pickupDateTime = json['pickupDateTime'];
transportationType = json['transportationType']; transportationType = json['transportationType'];
ambulate = json['ambulate']; ambulate = json['ambulate'];
ambulateTitle = "";
notes = json['notes']; notes = json['notes'];
requesterFileNo = json['requesterFileNo']; requesterFileNo = json['requesterFileNo'];
requesterMobileNo = json['requesterMobileNo']; requesterMobileNo = json['requesterMobileNo'];
@ -180,6 +183,7 @@ class TransportationDetails {
data['pickupDateTime'] = this.pickupDateTime; data['pickupDateTime'] = this.pickupDateTime;
data['transportationType'] = this.transportationType; data['transportationType'] = this.transportationType;
data['ambulate'] = this.ambulate; data['ambulate'] = this.ambulate;
data['ambulateTitle'] = this.ambulateTitle;
data['notes'] = this.notes; data['notes'] = this.notes;
data['requesterFileNo'] = this.requesterFileNo; data['requesterFileNo'] = this.requesterFileNo;
data['requesterMobileNo'] = this.requesterMobileNo; data['requesterMobileNo'] = this.requesterMobileNo;

@ -86,6 +86,7 @@ class FeedbackService extends BaseService {
response['ListCOCItems'].forEach((cOC) { response['ListCOCItems'].forEach((cOC) {
cOCItemList.add(COCItem.fromJson(cOC)); cOCItemList.add(COCItem.fromJson(cOC));
}); });
cOCItemList = cOCItemList.reversed.toList(); // Sort list in desc order
}, onFailure: (String error, int statusCode) { }, onFailure: (String error, int statusCode) {
hasError = true; hasError = true;
super.error = error; super.error = error;

@ -21,14 +21,15 @@ class PrescriptionDeliveryViewModel extends BaseViewModel {
setState(ViewState.Busy); setState(ViewState.Busy);
await _pharmacyModuleService.generatePharmacyToken().then((value) async { await _pharmacyModuleService.generatePharmacyToken().then((value) async {
// await _customerAddressesService.getCustomerInfo(); // await _customerAddressesService.getCustomerInfo();
await _customerAddressesService.getCustomerInfo(); // await _customerAddressesService.getCustomerInfo();
await _pharmacyModuleService.createUser();
}); });
if (_customerAddressesService.hasError) { if (_customerAddressesService.hasError) {
error = _customerAddressesService.error; error = _customerAddressesService.error;
setState(ViewState.ErrorLocal); setState(ViewState.ErrorLocal);
} else { } else {
await getCustomerAddresses();
} }
await getCustomerAddresses();
} }
Future insertDeliveryOrder( Future insertDeliveryOrder(

@ -1,7 +1,4 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/pharmaciesLivechat_page.dart';
import 'package:diplomaticquarterapp/theme/colors.dart'; import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -49,40 +46,7 @@ class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderSt
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color, backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column( body: HospitalsLiveChatPage(),
children: <Widget>[
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(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [Text(TranslationBase.of(context).hospitals), Text(TranslationBase.of(context).pharmacies)],
),
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
HospitalsLiveChatPage(), //SendFeedbackPage(),
PharmaciesLiveChatPage()
//StatusFeedbackPage()
],
),
)
],
),
); );
} }
} }

@ -5,6 +5,7 @@ import 'package:diplomaticquarterapp/core/model/family-file/insert_share_file_re
import 'package:diplomaticquarterapp/routes.dart'; import 'package:diplomaticquarterapp/routes.dart';
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart'; import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart'; import 'package:diplomaticquarterapp/services/family_files/family_files_provider.dart';
import 'package:diplomaticquarterapp/theme/colors.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
@ -12,7 +13,6 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart'; import 'package:diplomaticquarterapp/uitl/utils.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart'; import 'package:diplomaticquarterapp/widgets/dialogs/confirm_dialog.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart'; import 'package:diplomaticquarterapp/widgets/mobile-no/mobile_no.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart'; import 'package:diplomaticquarterapp/widgets/otp/sms-popup.dart';
@ -41,6 +41,7 @@ class _AddMember extends State<AddMember> {
var familyFileProvider = FamilyFilesProvider(); var familyFileProvider = FamilyFilesProvider();
var patientShareRequestID; var patientShareRequestID;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
@ -101,7 +102,7 @@ class _AddMember extends State<AddMember> {
child: DefaultButton( child: DefaultButton(
TranslationBase.of(context).add, TranslationBase.of(context).add,
() => {this.addMember()}, () => {this.addMember()},
color: isButtonDisabled == true ? Colors.grey : Colors.red[600], color: isButtonDisabled == true ? Colors.grey : CustomColors.accentColor,
textColor: Colors.white, textColor: Colors.white,
)) ))
], ],
@ -139,7 +140,7 @@ class _AddMember extends State<AddMember> {
request.isRegister = false; request.isRegister = false;
request.patientStatus = 2; request.patientStatus = 2;
loading(true); loading(true);
familyFileProvider.addFamilyFile(request).then((value) => manageFamily(value)).catchError(() { familyFileProvider.addFamilyFile(request).then((value) => manageFamily(value)).catchError((err) {
loading(false); loading(false);
}); });
} }
@ -183,6 +184,7 @@ class _AddMember extends State<AddMember> {
} }
var tempType; var tempType;
startSMSService(type, result) { startSMSService(type, result) {
tempType = type; tempType = type;
loading(false); loading(false);

@ -2,12 +2,13 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart'; import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart'; import 'AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart';
import 'OrderLogPage.dart'; import 'OrderLogPage.dart';
@ -17,8 +18,7 @@ class AmbulanceReq extends StatefulWidget {
_AmbulanceReqState createState() => _AmbulanceReqState(); _AmbulanceReqState createState() => _AmbulanceReqState();
} }
class _AmbulanceReqState extends State<AmbulanceReq> class _AmbulanceReqState extends State<AmbulanceReq> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
@ -36,101 +36,61 @@ class _AmbulanceReqState extends State<AmbulanceReq>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo( ProjectViewModel projectViewModel = Provider.of(context);
imageEn: imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
return BaseView<AmRequestViewModel>( return BaseView<AmRequestViewModel>(
onModelReady: (model) => model.getAmRequestOrders(), onModelReady: (model) => model.getAmRequestOrders(),
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
isShowAppBar: true, isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).transportationService, appBarTitle: TranslationBase.of(context).transportationService,
description: TranslationBase.of(context).infoAmbulance, description: TranslationBase.of(context).infoAmbulance,
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
baseViewModel: model, baseViewModel: model,
body: Scaffold( body: Column(
extendBodyBehindAppBar: true, children: [
appBar: PreferredSize( TabBar(
preferredSize: Size.fromHeight(65.0), isScrollable: false,
child: Stack( controller: _tabController,
children: <Widget>[ indicatorWeight: 3.0,
Positioned( indicatorSize: TabBarIndicatorSize.tab,
bottom: 1, labelColor: Color(0xff2B353E),
left: 0, unselectedLabelColor: Color(0xff575757),
right: 0, labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
child: BackdropFilter( labelStyle: TextStyle(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
child: Container( fontSize: 15,
color: Theme.of(context) fontWeight: FontWeight.w600,
.scaffoldBackgroundColor letterSpacing: -0.48,
.withOpacity(0.8), ),
height: 70.0, unselectedLabelStyle: TextStyle(
), fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
), fontSize: 15,
), fontWeight: FontWeight.w600,
Center( letterSpacing: -0.48,
child: Container( ),
height: 60.0, tabs: [
margin: EdgeInsets.only(top: 10.0), Text(TranslationBase.of(context).transportationService),
width: MediaQuery.of(context).size.width * 0.90, Text(TranslationBase.of(context).ordersLog),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
color: Theme.of(context).dividerColor,
width: 0.7),
),
color: Colors.white),
child: Center(
child: TabBar(
isScrollable: true,
controller: _tabController,
indicatorWeight: 5.0,
indicatorSize: TabBarIndicatorSize.label,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 18.0, right: 18.0),
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.40,
child: Center(
child: Texts(TranslationBase.of(context).transportationService),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(TranslationBase.of(context).ordersLog),
),
),
],
),
),
),
),
], ],
), ),
), Expanded(
body: Column( child: TabBarView(
children: <Widget>[ physics: BouncingScrollPhysics(),
Expanded( controller: _tabController,
child: TabBarView( children: <Widget>[
physics: BouncingScrollPhysics(), AmbulanceRequestIndexPage(
controller: _tabController, amRequestViewModel: model,
children: <Widget>[ ),
AmbulanceRequestIndexPage( OrderLogPage(
amRequestViewModel: model, amRequestViewModel: model,
), )
OrderLogPage( ],
amRequestViewModel: model, ),
) )
], ],
),
)
],
),
), ),
), ),
); );

@ -56,7 +56,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
child: Column( child: Column(
children: [ children: [
SizedBox( SizedBox(
height: 80, height: 10,
), ),
Container( Container(
margin: EdgeInsets.only(left: 18, right: 18), margin: EdgeInsets.only(left: 18, right: 18),

@ -4,7 +4,7 @@ import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart'; import 'package:diplomaticquarterapp/pages/Blood/new_text_Field.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -174,7 +174,7 @@ class _BillAmountState extends State<BillAmount> {
), ),
Texts( Texts(
TranslationBase.of(context).selectAmbulate, TranslationBase.of(context).selectAmbulate,
bold: true, bold: false,
), ),
SizedBox( SizedBox(
height: 5, height: 5,
@ -196,7 +196,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: Text(TranslationBase.of(context).wheelchair), title: Text(TranslationBase.of(context).wheelchair, style: TextStyle(
fontSize: 14.0
)),
leading: Radio( leading: Radio(
value: Ambulate.Wheelchair, value: Ambulate.Wheelchair,
groupValue: _ambulate, groupValue: _ambulate,
@ -225,7 +227,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: Text(TranslationBase.of(context).walker), title: Text(TranslationBase.of(context).walker, style: TextStyle(
fontSize: 14.0
)),
leading: Radio( leading: Radio(
value: Ambulate.Walker, value: Ambulate.Walker,
groupValue: _ambulate, groupValue: _ambulate,
@ -261,7 +265,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: Text(TranslationBase.of(context).stretcher), title: Text(TranslationBase.of(context).stretcher, style: TextStyle(
fontSize: 14.0
)),
leading: Radio( leading: Radio(
value: Ambulate.Stretcher, value: Ambulate.Stretcher,
groupValue: _ambulate, groupValue: _ambulate,
@ -290,7 +296,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white, color: Colors.white,
), ),
child: ListTile( child: ListTile(
title: Text(TranslationBase.of(context).none), title: Text(TranslationBase.of(context).none, style: TextStyle(
fontSize: 14.0
)),
leading: Radio( leading: Radio(
value: Ambulate.None, value: Ambulate.None,
groupValue: _ambulate, groupValue: _ambulate,
@ -326,21 +334,20 @@ class _BillAmountState extends State<BillAmount> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
padding: EdgeInsets.all(15), color: Theme.of(context).scaffoldBackgroundColor,
width: double.maxFinite, padding: EdgeInsets.all(12.0),
height: 90, child: DefaultButton(
child: SecondaryButton( TranslationBase.of(context).next,
color: Colors.grey[800], () {
textColor: Colors.white,
onTap: () {
setState(() { setState(() {
widget.patientER_RC.transportationDetails.ambulate = _ambulate.selectAmbulateNumber(); widget.patientER_RC.transportationDetails.ambulate = _ambulate.selectAmbulateNumber();
widget.patientER_RC.transportationDetails.ambulateTitle = _ambulate.getAmbulateTitle(context);
widget.patientER_RC.transportationDetails.notes = note; widget.patientER_RC.transportationDetails.notes = note;
// widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber(); // widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber();
widget.changeCurrentTab(3); widget.changeCurrentTab(3);
}); });
}, },
label: TranslationBase.of(context).next, // label: TranslationBase.of(context).next,
), ),
), ),
); );

@ -11,7 +11,7 @@ import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart'; import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart'; import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart';
@ -264,7 +264,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)), Texts(getHospitalName(TranslationBase.of(context).selectHospital)),
Icon( Icon(
Icons.arrow_drop_down, Icons.arrow_drop_down,
size: 24, size: 24,
@ -368,13 +368,13 @@ class _PickupLocationState extends State<PickupLocation> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
padding: EdgeInsets.all(15), color: Theme.of(context).scaffoldBackgroundColor,
width: double.maxFinite, padding: EdgeInsets.all(12.0),
height: 90, child: DefaultButton(
child: SecondaryButton( // color: Colors.grey[800],
color: Colors.grey[800], // textColor: Colors.white,
textColor: Colors.white, TranslationBase.of(context).next,
onTap: () { () {
if (_result == null || _selectedHospital == null) if (_result == null || _selectedHospital == null)
AppToast.showErrorToast(message: TranslationBase.of(context).selectAll); AppToast.showErrorToast(message: TranslationBase.of(context).selectAll);
else else
@ -432,7 +432,7 @@ class _PickupLocationState extends State<PickupLocation> {
widget.changeCurrentTab(2); widget.changeCurrentTab(2);
}); });
}, },
label: TranslationBase.of(context).next, // label: TranslationBase.of(context).next,
), ),
), ),
); );

@ -5,7 +5,7 @@ import 'package:diplomaticquarterapp/core/model/er/get_all_transportation_method
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
@ -53,7 +53,6 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
} else { } else {
if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1]; if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1];
} }
} }
@override @override
@ -280,13 +279,11 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
padding: EdgeInsets.all(15), color: Theme.of(context).scaffoldBackgroundColor,
width: double.maxFinite, padding: EdgeInsets.all(12.0),
height: 90, child: DefaultButton(
child: SecondaryButton( TranslationBase.of(context).next,
color: Colors.grey[800], () {
textColor: Colors.white,
onTap: () {
setState(() { setState(() {
// widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1); // widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0; // widget.patientER.direction = _direction == Direction.ToHospital ? 1 : 0;
@ -314,10 +311,8 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
// widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0; // widget.patientER.vAT = _erTransportationMethod.priceVAT ?? 0;
// widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble(); // widget.patientER.totalPrice = _erTransportationMethod.priceTotal.toDouble();
widget.changeCurrentTab(1); widget.changeCurrentTab(1);
}); });
}, },
label: TranslationBase.of(context).next,
), ),
), ),
); );

@ -1,12 +1,14 @@
import 'package:diplomaticquarterapp/core/model/er/PatientER.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER.dart';
import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart'; import 'package:diplomaticquarterapp/core/model/er/PatientER_RC.dart';
import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/er/am_request_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart'; import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class Summary extends StatefulWidget { class Summary extends StatefulWidget {
final Function changeCurrentTab; final Function changeCurrentTab;
@ -23,6 +25,7 @@ class Summary extends StatefulWidget {
class _SummaryState extends State<Summary> { class _SummaryState extends State<Summary> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold( return AppScaffold(
isShowDecPage: false, isShowDecPage: false,
isShowAppBar: false, isShowAppBar: false,
@ -33,7 +36,9 @@ class _SummaryState extends State<Summary> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Texts(TranslationBase.of(context).RRTSummary), Texts(TranslationBase.of(context).RRTSummary),
SizedBox(height: 5,), SizedBox(
height: 5,
),
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
@ -48,10 +53,15 @@ class _SummaryState extends State<Summary> {
TranslationBase.of(context).transportMethod, TranslationBase.of(context).transportMethod,
color: Colors.grey, color: Colors.grey,
), ),
Texts( projectViewModel.isArabic
'${widget.patientER_RC.patientERTransportationMethod.text}', ? Texts(
bold: true, '${widget.patientER_RC.patientERTransportationMethod.textN}',
), bold: true,
)
: Texts(
'${widget.patientER_RC.patientERTransportationMethod.text}',
bold: true,
),
SizedBox( SizedBox(
height: 8, height: 8,
), ),
@ -93,7 +103,7 @@ class _SummaryState extends State<Summary> {
color: Colors.grey, color: Colors.grey,
), ),
Texts( Texts(
'${widget.patientER_RC.transportationDetails.ambulate}', '${widget.patientER_RC.transportationDetails.ambulateTitle}',
bold: true, bold: true,
), ),
SizedBox( SizedBox(
@ -113,16 +123,20 @@ class _SummaryState extends State<Summary> {
], ],
), ),
), ),
SizedBox(height: 20,), SizedBox(
Texts(TranslationBase.of(context).billAmount,textAlign: TextAlign.start,), height: 20,
SizedBox(height: 5,), ),
Texts(
TranslationBase.of(context).billAmount,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Container( Container(
height: 55, height: 55,
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [Texts(TranslationBase.of(context).patientShareTotal + ':'), Texts(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}')], children: [Texts(TranslationBase.of(context).patientShareTotal + ':'), Texts(TranslationBase.of(context).sar + ' ${widget.patientER_RC.patientERTransportationMethod.priceTotal}')],
@ -134,16 +148,11 @@ class _SummaryState extends State<Summary> {
), ),
), ),
bottomSheet: Container( bottomSheet: Container(
padding: EdgeInsets.all(15), color: Theme.of(context).scaffoldBackgroundColor,
width: double.maxFinite, padding: EdgeInsets.all(12.0),
height: 90, child: DefaultButton(TranslationBase.of(context).send, () async {
child:SecondaryButton( await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
color: Colors.grey[800], }),
textColor: Colors.white,
label: TranslationBase.of(context).send,
onTap: () async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
}),
), ),
); );
} }

@ -1,33 +1,30 @@
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart'; import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart'; import 'package:diplomaticquarterapp/pages/MyAppointments/widgets/indicator.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/medical_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart'; import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart'; import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart'; import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
class SchedulePage extends StatefulWidget { class SchedulePage extends StatefulWidget {
DoctorList doctorList; DoctorList doctorList;
AppoitmentAllHistoryResultList appo; AppoitmentAllHistoryResultList appo;
SchedulePage({ SchedulePage({
this.appo, this.appo,
this.doctorList, this.doctorList,
}); });
@override @override
_SchedulePageState createState() => _SchedulePageState(); _SchedulePageState createState() => _SchedulePageState();
} }
@ -45,6 +42,7 @@ class _SchedulePageState extends State<SchedulePage> {
bool isPageChange = false; bool isPageChange = false;
AppSharedPreferences sharedPref = AppSharedPreferences(); AppSharedPreferences sharedPref = AppSharedPreferences();
@override @override
void initState() { void initState() {
this.doctorList = widget.doctorList; this.doctorList = widget.doctorList;
@ -158,23 +156,20 @@ class _SchedulePageState extends State<SchedulePage> {
Row( Row(
children: [ children: [
Expanded( Expanded(
child: Texts( child: Text(
weeks[index][index2]['WorkingHours'], weeks[index][index2]['WorkingHours'],
fontWeight: FontWeight.w500, style: TextStyle(
fontWeight: FontWeight.w600,
),
), ),
), ),
Icon(projectViewModel.isArabic Icon(Icons.arrow_forward, size: 16.0),
? Icons
.arrow_back_ios_outlined
: Icons
.arrow_forward_outlined, size: 16.0),
], ],
) )
]))), ]))),
), ),
], ],
) ))));
)));
}, },
)), )),
PageViewIndicator( PageViewIndicator(

@ -81,7 +81,7 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins', fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
color: Color(0xff2B353E), color: Color(0xff2B353E),
letterSpacing: -0.48)), letterSpacing: -0.48)),
Text(model.cOCItemList[index].date.split(" ")[1], Text(model.cOCItemList[index].date.split(" ")[1].substring(0, 4),
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,

@ -47,18 +47,15 @@ class _InsuranceCardState extends State<InsuranceCard> {
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGreyColor, backgroundColor: CustomColors.appBackgroudGreyColor,
floatingActionButton: FloatingActionButton( floatingActionButton: FloatingActionButton.extended(
onPressed: () { onPressed: () {
Navigator.push(context, FadePage(page: InsuranceUpdate())); Navigator.push(context, FadePage(page: InsuranceUpdate()));
}, },
backgroundColor: CustomColors.accentColor, backgroundColor: CustomColors.accentColor,
child: Padding( label: Text(TranslationBase.of(context).update, style: TextStyle(
padding: const EdgeInsets.all(12.0), fontSize: 12.0,
child: Image.asset( fontWeight: FontWeight.bold
'assets/images/medical/insurance_update_icon_.png', )),
color: Colors.white,
),
),
), ),
body: Container( body: Container(
child: ListView.separated( child: ListView.separated(

@ -281,120 +281,103 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
// //
// //_firebase Background message handler // //_firebase Background message handler
_firebaseMessaging.configure( _firebaseMessaging.configure(
onMessage: (Map<String, dynamic> message) async { onMessage: (Map<String, dynamic> message) async {
// showDialog("onMessage: $message"); // showDialog("onMessage: $message");
print("onMessage: $message"); print("onMessage: $message");
print(message); print(message);
print(message['name']); print(message['name']);
print(message['appointmentdate']); print(message['appointmentdate']);
if (Platform.isIOS) { if (Platform.isIOS) {
if (message['is_call'] == "true") { if (message['is_call'] == "true") {
var route = ModalRoute.of(context); var route = ModalRoute.of(context);
if (route != null) { if (route != null) {
print(route.settings.name); print(route.settings.name);
} }
Map<String, dynamic> myMap = new Map<String, dynamic>.from(message); Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
print(myMap); print(myMap);
LandingPage.isOpenCallPage = true; LandingPage.isOpenCallPage = true;
LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
if (!isPageNavigated) { if (!isPageNavigated) {
isPageNavigated = true; isPageNavigated = true;
Navigator.push( Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) {
context, isPageNavigated = false;
MaterialPageRoute( });
builder: (context) => IncomingCall(
incomingCallData: LandingPage.incomingCallData)))
.then((value) {
isPageNavigated = false;
});
}
} else {
print("Is Call Not Found iOS");
}
} else {
print("Is Call Not Found iOS");
} }
} else {
print("Is Call Not Found iOS");
}
} else {
print("Is Call Not Found iOS");
}
if (Platform.isAndroid) { if (Platform.isAndroid) {
if (message['data'].containsKey("is_call")) { if (message['data'].containsKey("is_call")) {
var route = ModalRoute.of(context); var route = ModalRoute.of(context);
if (route != null) { if (route != null) {
print(route.settings.name); print(route.settings.name);
} }
Map<String, dynamic> myMap = Map<String, dynamic> myMap = new Map<String, dynamic>.from(message['data']);
new Map<String, dynamic>.from(message['data']); print(myMap);
print(myMap); LandingPage.isOpenCallPage = true;
LandingPage.isOpenCallPage = true; LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); if (!isPageNavigated) {
if (!isPageNavigated) { isPageNavigated = true;
isPageNavigated = true; Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) {
Navigator.push( isPageNavigated = false;
context, });
MaterialPageRoute( }
builder: (context) => IncomingCall( } else {
incomingCallData: LandingPage.incomingCallData))) print("Is Call Not Found Android");
.then((value) { LocalNotification.getInstance().showNow(title: message['notification']['title'], subtitle: message['notification']['body']);
isPageNavigated = false; }
}); } else {
} print("Is Call Not Found Android");
} else { }
print("Is Call Not Found Android"); },
LocalNotification.getInstance().showNow(title: message['notification']['title'], subtitle: message['notification']['body']); onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
} onLaunch: (Map<String, dynamic> message) async {
} else { print("onLaunch: $message");
print("Is Call Not Found Android"); // showDialog("onLaunch: $message");
},
onResume: (Map<String, dynamic> message) async {
print("onResume: $message");
print(message);
print(message['name']);
print(message['appointmentdate']);
// showDialog("onResume: $message");
if (Platform.isIOS) {
if (message['is_call'] == "true") {
var route = ModalRoute.of(context);
if (route != null) {
print(route.settings.name);
} }
},
onBackgroundMessage: Platform.isIOS ? null : myBackgroundMessageHandler,
onLaunch: (Map<String, dynamic> message) async {
print("onLaunch: $message");
// showDialog("onLaunch: $message");
},
onResume: (Map<String, dynamic> message) async {
print("onResume: $message");
print(message);
print(message['name']);
print(message['appointmentdate']);
// showDialog("onResume: $message");
if (Platform.isIOS) {
if (message['is_call'] == "true") {
var route = ModalRoute.of(context);
if (route != null) {
print(route.settings.name);
}
Map<String, dynamic> myMap = Map<String, dynamic> myMap = new Map<String, dynamic>.from(message);
new Map<String, dynamic>.from(message); print(myMap);
print(myMap); LandingPage.isOpenCallPage = true;
LandingPage.isOpenCallPage = true; LandingPage.incomingCallData = IncomingCallData.fromJson(myMap);
LandingPage.incomingCallData = IncomingCallData.fromJson(myMap); if (!isPageNavigated) {
if (!isPageNavigated) { isPageNavigated = true;
isPageNavigated = true; Navigator.push(context, MaterialPageRoute(builder: (context) => IncomingCall(incomingCallData: LandingPage.incomingCallData))).then((value) {
Navigator.push( isPageNavigated = false;
context, });
MaterialPageRoute(
builder: (context) => IncomingCall(
incomingCallData: LandingPage.incomingCallData)))
.then((value) {
isPageNavigated = false;
});
}
} else {
print("Is Call Not Found iOS");
}
} else {
print("Is Call Not Found iOS");
} }
}, } else {
); print("Is Call Not Found iOS");
}
} else {
print("Is Call Not Found iOS");
}
},
);
} }
showDialogs(String message) { showDialogs(String message) {
@ -558,7 +541,7 @@ class _LandingPageState extends State<LandingPage> with WidgetsBindingObserver {
pageController.jumpToPage(0); pageController.jumpToPage(0);
}, },
), ),
projectViewModel.isLogin && model.notificationsCount != null projectViewModel.isLogin && model.notificationsCount != null && !projectViewModel.isLoginChild
? new Positioned( ? new Positioned(
right: projectViewModel.isArabic ? 35 : 0, right: projectViewModel.isArabic ? 35 : 0,
top: 5, top: 5,

@ -77,7 +77,7 @@ class PrescriptionOrderOverview extends StatelessWidget {
child: Padding( child: Padding(
padding: const EdgeInsets.all(8.0), padding: const EdgeInsets.all(8.0),
child: Center( child: Center(
child: Texts(prescriptionReportList[index].itemDescription.isNotEmpty child: Text(prescriptionReportList[index].itemDescription.isNotEmpty
? prescriptionReportList[index].itemDescription ? prescriptionReportList[index].itemDescription
: prescriptionReportList[index].itemDescriptionN)), : prescriptionReportList[index].itemDescriptionN)),
)), )),
@ -130,7 +130,7 @@ class PrescriptionOrderOverview extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts(prescriptionReportEnhList[index].itemDescription), Text(prescriptionReportEnhList[index].itemDescription),
], ],
), ),
), ),

@ -212,22 +212,43 @@ class Utils {
hasBadge: true, hasBadge: true,
isEnable: projectViewModel.havePrivilege(5)), isEnable: projectViewModel.havePrivilege(5)),
), ),
Positioned( projectViewModel.isArabic
right: 8, ? !projectViewModel.user.isFamily
top: 4, ? Positioned(
child: Badge( left: 8,
toAnimate: false, top: 4,
elevation: 0, child: Badge(
position: BadgePosition.topEnd(), toAnimate: false,
shape: BadgeShape.circle, elevation: 0,
badgeColor: secondaryColor.withOpacity(1.0), position: BadgePosition.topEnd(),
borderRadius: BorderRadius.circular(8), shape: BadgeShape.circle,
badgeContent: Container( badgeColor: secondaryColor.withOpacity(1.0),
padding: EdgeInsets.all(2.0), borderRadius: BorderRadius.circular(8),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontSize: 16.0)), badgeContent: Container(
), padding: EdgeInsets.all(2.0),
), child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
), ),
),
)
: Container()
: !projectViewModel.user.isFamily
? Positioned(
right: 8,
top: 4,
child: Badge(
toAnimate: false,
elevation: 0,
position: BadgePosition.topEnd(),
shape: BadgeShape.circle,
badgeColor: secondaryColor.withOpacity(1.0),
borderRadius: BorderRadius.circular(8),
badgeContent: Container(
padding: EdgeInsets.all(2.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
]) ])
: MedicalProfileItem( : MedicalProfileItem(
title: TranslationBase.of(context).myAppointments, title: TranslationBase.of(context).myAppointments,
@ -509,38 +530,42 @@ class Utils {
hasBadge: true, hasBadge: true,
isEnable: projectViewModel.havePrivilege(5)), isEnable: projectViewModel.havePrivilege(5)),
projectViewModel.isArabic projectViewModel.isArabic
? Positioned( ? !projectViewModel.isLoginChild
left: 8, ? Positioned(
top: 4, left: 8,
child: Badge( top: 4,
toAnimate: false, child: Badge(
elevation: 0, toAnimate: false,
position: BadgePosition.topEnd(), elevation: 0,
shape: BadgeShape.circle, position: BadgePosition.topEnd(),
badgeColor: secondaryColor.withOpacity(1.0), shape: BadgeShape.circle,
borderRadius: BorderRadius.circular(8), badgeColor: secondaryColor.withOpacity(1.0),
badgeContent: Container( borderRadius: BorderRadius.circular(8),
padding: EdgeInsets.all(2.0), badgeContent: Container(
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), padding: EdgeInsets.all(2.0),
), child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
), ),
) ),
: Positioned( )
right: 8, : Container()
top: 4, : !projectViewModel.isLoginChild
child: Badge( ? Positioned(
toAnimate: false, right: 8,
elevation: 0, top: 4,
position: BadgePosition.topEnd(), child: Badge(
shape: BadgeShape.circle, toAnimate: false,
badgeColor: secondaryColor.withOpacity(1.0), elevation: 0,
borderRadius: BorderRadius.circular(8), position: BadgePosition.topEnd(),
badgeContent: Container( shape: BadgeShape.circle,
padding: EdgeInsets.all(2.0), badgeColor: secondaryColor.withOpacity(1.0),
child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)), borderRadius: BorderRadius.circular(8),
), badgeContent: Container(
), padding: EdgeInsets.all(2.0),
), child: Text(count.toString(), style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold, fontSize: 12.0)),
),
),
)
: Container(),
]) ])
: MedicalProfileItem( : MedicalProfileItem(
title: TranslationBase.of(context).myAppointments, title: TranslationBase.of(context).myAppointments,

@ -1,5 +1,6 @@
import 'package:badges/badges.dart'; import 'package:badges/badges.dart';
import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart'; import 'package:diplomaticquarterapp/core/service/AuthenticatedUserObject.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/locator.dart'; import 'package:diplomaticquarterapp/locator.dart';
import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart'; import 'package:diplomaticquarterapp/models/Appointments/toDoCountProviderModel.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -25,6 +26,7 @@ class BottomNavigationItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var model = Provider.of<ToDoCountProviderModel>(context); var model = Provider.of<ToDoCountProviderModel>(context);
ProjectViewModel projectViewModel = Provider.of(context);
return Expanded( return Expanded(
child: SizedBox( child: SizedBox(
// height: 72.0, // height: 72.0,
@ -61,7 +63,7 @@ class BottomNavigationItem extends StatelessWidget {
), ),
], ],
) )
: (authenticatedUserObject.isLogin && model.isShowBadge) : (authenticatedUserObject.isLogin && model.isShowBadge && !projectViewModel.isLoginChild)
? Stack( ? Stack(
alignment: AlignmentDirectional.center, alignment: AlignmentDirectional.center,
children: [ children: [

@ -329,7 +329,7 @@ class _AppDrawerState extends State<AppDrawer> {
letterSpacing: -0.84, letterSpacing: -0.84,
fontSize: 14, fontSize: 14,
projectProvider: projectProvider, projectProvider: projectProvider,
count: toDoProvider.notificationsCount != 0 count: toDoProvider.notificationsCount != "0" && !projectProvider.isLoginChild
? new Container( ? new Container(
padding: EdgeInsets.all(4), padding: EdgeInsets.all(4),
margin: EdgeInsets.all(2), margin: EdgeInsets.all(2),
@ -358,7 +358,8 @@ class _AppDrawerState extends State<AppDrawer> {
onTap: () { onTap: () {
//NotificationsPage //NotificationsPage
// Navigator.of(context).pop(); // Navigator.of(context).pop();
Navigator.push(context, FadePage(page: NotificationsPage())); if(!projectProvider.user.isFamily)
Navigator.push(context, FadePage(page: NotificationsPage()));
}, },
), ),
if (projectProvider.havePrivilege(3)) if (projectProvider.havePrivilege(3))

Loading…
Cancel
Save