Updates & fixes

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

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

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

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

@ -1,7 +1,4 @@
import 'dart:ui';
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/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
@ -49,40 +46,7 @@ class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderSt
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: CustomColors.appBackgroudGrey2Color,
body: Column(
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()
],
),
)
],
),
body: HospitalsLiveChatPage(),
);
}
}
}

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

@ -2,12 +2,13 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.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/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/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'AmbulanceRequestIndexPages/AmbulanceRequestIndex.dart';
import 'OrderLogPage.dart';
@ -17,8 +18,7 @@ class AmbulanceReq extends StatefulWidget {
_AmbulanceReqState createState() => _AmbulanceReqState();
}
class _AmbulanceReqState extends State<AmbulanceReq>
with SingleTickerProviderStateMixin {
class _AmbulanceReqState extends State<AmbulanceReq> with SingleTickerProviderStateMixin {
TabController _tabController;
List<ImagesInfo> imagesInfo = List();
@ -36,101 +36,61 @@ class _AmbulanceReqState extends State<AmbulanceReq>
@override
Widget build(BuildContext context) {
imagesInfo.add(ImagesInfo(
imageEn:
'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
ProjectViewModel projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/Ambulance/ar/0.png'));
return BaseView<AmRequestViewModel>(
onModelReady: (model) => model.getAmRequestOrders(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
showNewAppBarTitle: true,
showNewAppBar: true,
appBarTitle: TranslationBase.of(context).transportationService,
description: TranslationBase.of(context).infoAmbulance,
imagesInfo: imagesInfo,
baseViewModel: model,
body: Scaffold(
extendBodyBehindAppBar: true,
appBar: PreferredSize(
preferredSize: Size.fromHeight(65.0),
child: Stack(
children: <Widget>[
Positioned(
bottom: 1,
left: 0,
right: 0,
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
child: Container(
color: Theme.of(context)
.scaffoldBackgroundColor
.withOpacity(0.8),
height: 70.0,
),
),
),
Center(
child: Container(
height: 60.0,
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.90,
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),
),
),
],
),
),
),
),
body: Column(
children: [
TabBar(
isScrollable: false,
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: 15,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
unselectedLabelStyle: TextStyle(
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'Poppins',
fontSize: 15,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
),
tabs: [
Text(TranslationBase.of(context).transportationService),
Text(TranslationBase.of(context).ordersLog),
],
),
),
body: Column(
children: <Widget>[
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
AmbulanceRequestIndexPage(
amRequestViewModel: model,
),
OrderLogPage(
amRequestViewModel: model,
)
],
),
)
],
),
Expanded(
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[
AmbulanceRequestIndexPage(
amRequestViewModel: model,
),
OrderLogPage(
amRequestViewModel: model,
)
],
),
)
],
),
),
);

@ -56,7 +56,7 @@ class _AmbulanceRequestIndexPageState extends State<AmbulanceRequestIndexPage> {
child: Column(
children: [
SizedBox(
height: 80,
height: 10,
),
Container(
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/pages/Blood/new_text_Field.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/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -174,7 +174,7 @@ class _BillAmountState extends State<BillAmount> {
),
Texts(
TranslationBase.of(context).selectAmbulate,
bold: true,
bold: false,
),
SizedBox(
height: 5,
@ -196,7 +196,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text(TranslationBase.of(context).wheelchair),
title: Text(TranslationBase.of(context).wheelchair, style: TextStyle(
fontSize: 14.0
)),
leading: Radio(
value: Ambulate.Wheelchair,
groupValue: _ambulate,
@ -225,7 +227,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text(TranslationBase.of(context).walker),
title: Text(TranslationBase.of(context).walker, style: TextStyle(
fontSize: 14.0
)),
leading: Radio(
value: Ambulate.Walker,
groupValue: _ambulate,
@ -261,7 +265,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text(TranslationBase.of(context).stretcher),
title: Text(TranslationBase.of(context).stretcher, style: TextStyle(
fontSize: 14.0
)),
leading: Radio(
value: Ambulate.Stretcher,
groupValue: _ambulate,
@ -290,7 +296,9 @@ class _BillAmountState extends State<BillAmount> {
color: Colors.white,
),
child: ListTile(
title: Text(TranslationBase.of(context).none),
title: Text(TranslationBase.of(context).none, style: TextStyle(
fontSize: 14.0
)),
leading: Radio(
value: Ambulate.None,
groupValue: _ambulate,
@ -326,21 +334,20 @@ class _BillAmountState extends State<BillAmount> {
),
),
bottomSheet: Container(
padding: EdgeInsets.all(15),
width: double.maxFinite,
height: 90,
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0),
child: DefaultButton(
TranslationBase.of(context).next,
() {
setState(() {
widget.patientER_RC.transportationDetails.ambulate = _ambulate.selectAmbulateNumber();
widget.patientER_RC.transportationDetails.ambulateTitle = _ambulate.getAmbulateTitle(context);
widget.patientER_RC.transportationDetails.notes = note;
// widget.patientER.selectedAmbulate = _ambulate.selectAmbulateNumber();
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/gif_loader_dialog_utils.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/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/pickupLocation/PickupLocationFromMap.dart';
@ -264,7 +264,7 @@ class _PickupLocationState extends State<PickupLocation> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Texts(getHospitalName(TranslationBase.of(context).pickupLocation)),
Texts(getHospitalName(TranslationBase.of(context).selectHospital)),
Icon(
Icons.arrow_drop_down,
size: 24,
@ -368,13 +368,13 @@ class _PickupLocationState extends State<PickupLocation> {
),
),
bottomSheet: Container(
padding: EdgeInsets.all(15),
width: double.maxFinite,
height: 90,
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0),
child: DefaultButton(
// color: Colors.grey[800],
// textColor: Colors.white,
TranslationBase.of(context).next,
() {
if (_result == null || _selectedHospital == null)
AppToast.showErrorToast(message: TranslationBase.of(context).selectAll);
else
@ -432,7 +432,7 @@ class _PickupLocationState extends State<PickupLocation> {
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/project_view_model.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/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
@ -53,7 +53,6 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
} else {
if (widget.amRequestViewModel.amRequestModeList.length != 0) _erTransportationMethod = widget.amRequestViewModel.amRequestModeList[widget.amRequestViewModel.amRequestModeList.length - 1];
}
}
@override
@ -280,13 +279,11 @@ class _SelectTransportationMethodState extends State<SelectTransportationMethod>
),
),
bottomSheet: Container(
padding: EdgeInsets.all(15),
width: double.maxFinite,
height: 90,
child: SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
onTap: () {
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0),
child: DefaultButton(
TranslationBase.of(context).next,
() {
setState(() {
// widget.patientER.transportationMethodId = (widget.amRequestViewModel.amRequestModeList.indexOf(_erTransportationMethod) + 1);
// 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.totalPrice = _erTransportationMethod.priceTotal.toDouble();
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_RC.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/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
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:provider/provider.dart';
class Summary extends StatefulWidget {
final Function changeCurrentTab;
@ -23,6 +25,7 @@ class Summary extends StatefulWidget {
class _SummaryState extends State<Summary> {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
isShowDecPage: false,
isShowAppBar: false,
@ -33,7 +36,9 @@ class _SummaryState extends State<Summary> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Texts(TranslationBase.of(context).RRTSummary),
SizedBox(height: 5,),
SizedBox(
height: 5,
),
Container(
width: double.infinity,
padding: EdgeInsets.all(10),
@ -48,10 +53,15 @@ class _SummaryState extends State<Summary> {
TranslationBase.of(context).transportMethod,
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.patientERTransportationMethod.text}',
bold: true,
),
projectViewModel.isArabic
? Texts(
'${widget.patientER_RC.patientERTransportationMethod.textN}',
bold: true,
)
: Texts(
'${widget.patientER_RC.patientERTransportationMethod.text}',
bold: true,
),
SizedBox(
height: 8,
),
@ -93,7 +103,7 @@ class _SummaryState extends State<Summary> {
color: Colors.grey,
),
Texts(
'${widget.patientER_RC.transportationDetails.ambulate}',
'${widget.patientER_RC.transportationDetails.ambulateTitle}',
bold: true,
),
SizedBox(
@ -113,16 +123,20 @@ class _SummaryState extends State<Summary> {
],
),
),
SizedBox(height: 20,),
Texts(TranslationBase.of(context).billAmount,textAlign: TextAlign.start,),
SizedBox(height: 5,),
SizedBox(
height: 20,
),
Texts(
TranslationBase.of(context).billAmount,
textAlign: TextAlign.start,
),
SizedBox(
height: 5,
),
Container(
height: 55,
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
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(
padding: EdgeInsets.all(15),
width: double.maxFinite,
height: 90,
child:SecondaryButton(
color: Colors.grey[800],
textColor: Colors.white,
label: TranslationBase.of(context).send,
onTap: () async {
await widget.amRequestViewModel.insertERPressOrder(patientER: widget.patientER_RC);
}),
color: Theme.of(context).scaffoldBackgroundColor,
padding: EdgeInsets.all(12.0),
child: DefaultButton(TranslationBase.of(context).send, () 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/pages/MyAppointments/AppointmentDetails.dart';
import 'package:diplomaticquarterapp/pages/MyAppointments/models/DoctorScheduleResponse.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/services/appointment_services/GetDoctorsList.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/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:diplomaticquarterapp/core/enum/viewstate.dart';
class SchedulePage extends StatefulWidget {
DoctorList doctorList;
AppoitmentAllHistoryResultList appo;
SchedulePage({
this.appo,
this.doctorList,
});
@override
_SchedulePageState createState() => _SchedulePageState();
}
@ -45,6 +42,7 @@ class _SchedulePageState extends State<SchedulePage> {
bool isPageChange = false;
AppSharedPreferences sharedPref = AppSharedPreferences();
@override
void initState() {
this.doctorList = widget.doctorList;
@ -158,23 +156,20 @@ class _SchedulePageState extends State<SchedulePage> {
Row(
children: [
Expanded(
child: Texts(
child: Text(
weeks[index][index2]['WorkingHours'],
fontWeight: FontWeight.w500,
style: TextStyle(
fontWeight: FontWeight.w600,
),
),
),
Icon(projectViewModel.isArabic
? Icons
.arrow_back_ios_outlined
: Icons
.arrow_forward_outlined, size: 16.0),
Icon(Icons.arrow_forward, size: 16.0),
],
)
]))),
),
],
)
)));
))));
},
)),
PageViewIndicator(

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

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

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

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

@ -212,22 +212,43 @@ class Utils {
hasBadge: true,
isEnable: projectViewModel.havePrivilege(5)),
),
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, fontSize: 16.0)),
),
),
),
projectViewModel.isArabic
? !projectViewModel.user.isFamily
? Positioned(
left: 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()
: !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(
title: TranslationBase.of(context).myAppointments,
@ -509,38 +530,42 @@ class Utils {
hasBadge: true,
isEnable: projectViewModel.havePrivilege(5)),
projectViewModel.isArabic
? Positioned(
left: 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)),
),
),
)
: 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)),
),
),
),
? !projectViewModel.isLoginChild
? Positioned(
left: 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()
: !projectViewModel.isLoginChild
? 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(
title: TranslationBase.of(context).myAppointments,

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

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

Loading…
Cancel
Save