Merge branch 'new_design_sikander' into development_new_design_2.0

merge-update-with-lab-changes
Sikander Saleem 5 years ago
commit 120e6c166d

@ -4,6 +4,7 @@ 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/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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';
@ -37,182 +38,89 @@ class _HospitalsLiveChatPageState extends State<HospitalsLiveChatPage> {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowDecPage: false, isShowDecPage: false,
body: SingleChildScrollView( body: Column(
child: Container( children: [
child: Column( Expanded(
crossAxisAlignment: CrossAxisAlignment.start, child: SingleChildScrollView(
children: [ physics: BouncingScrollPhysics(),
Stack( padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [ children: [
Column( Text(
crossAxisAlignment: CrossAxisAlignment.start, TranslationBase.of(context).instructions,
children: [ textAlign: TextAlign.center,
SizedBox( style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
height: 70, ),
), SizedBox(height: 20),
Container( Text(
width: double.infinity, TranslationBase.of(context).selectHospitalDec + " :",
height: 230, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
SizedBox(height: 20),
ListView.separated(
shrinkWrap: true,
physics: NeverScrollableScrollPhysics(),
separatorBuilder: (context, index) => SizedBox(height: 14),
itemCount: model.LiveChatModelList.length,
itemBuilder: (context, index) => InkWell(
onTap: () {
setState(() {
tappedIndex = index;
chat =
"http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.currentLanguage}&WorkGroup=${model.LiveChatModelList[index].value}";
});
},
child: Container(
padding: EdgeInsets.only(right: 12, left: 18, top: 16, bottom: 16),
decoration: BoxDecoration( decoration: BoxDecoration(
image: DecorationImage( borderRadius: BorderRadius.all(
image: ExactAssetImage( Radius.circular(10.0),
'assets/images/dashboard_top_bg.png'), ),
fit: BoxFit.cover), boxShadow: [
), BoxShadow(
child: Padding( color: Color(0xff000000).withOpacity(.05),
padding: const EdgeInsets.all(8.0), blurRadius: 27,
child: Column( offset: Offset(0, -3),
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: projectViewModel.isArabic? 10:20,
),
Texts(
TranslationBase.of(context).instructions,
color: Colors.white,
textAlign: TextAlign.start,
),
SizedBox(
height:projectViewModel.isArabic? 8:25,
),
Texts(
TranslationBase.of(context)
.selectHospitalDec +
" :",
color: Colors.white,
fontWeight: FontWeight.w700,
textAlign: TextAlign.start,
), ),
], ],
), color: tappedIndex == index ? Color(0xff28323A).withOpacity(.7) : Colors.white),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Expanded(
child: Text(
model.LiveChatModelList[index]?.projectName ?? "",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: tappedIndex == index ? Colors.white : Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
),
Icon(
Icons.arrow_forward_ios,
color: tappedIndex == index ? Colors.white : Colors.black,
),
],
), ),
), ),
SizedBox(
height: MediaQuery.of(context).size.height * 0.85,
),
SizedBox(
height: 100,
),
],
),
Positioned(
left: 13,
right: 13,
top: 200,
child: Container(
width: double.maxFinite,
child: Column(
children: [
...List.generate(
model.LiveChatModelList.length,
(index) => Container(
margin: EdgeInsets.only(
left: 0, right: 0, bottom: 20),
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(
color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(
Radius.circular(5)),
color: tappedIndex == index
? Theme.of(context).primaryColor
: Colors.white,
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
InkWell(
onTap: () {
setState(() {
tappedIndex = index;
chat = "http://chat.dshmg.com:7788/hmgchatapp/hmgchattest/Index.aspx?Name=${model.user.firstName}&PatientID=${model.user.patientID}&MobileNo=${model.user.mobileNumber}&Language=${projectViewModel.currentLanguage}&WorkGroup=${model.LiveChatModelList[index].value}";
});
},
child: Row(
mainAxisAlignment:
MainAxisAlignment
.spaceAround,
crossAxisAlignment:
CrossAxisAlignment.center,
children: <Widget>[
SizedBox(
width: 20,
),
Expanded(
child: Container(
margin:
EdgeInsets.only(
left: 5,
right: 5),
child: Texts(
'${model.LiveChatModelList[index].projectName}',
color:
tappedIndex ==
index
? Colors
.white
: Colors
.black,
textAlign: TextAlign
.center,
))),
//model.cOCItemList[index].cOCTitl
IconButton(
icon: Icon(
Icons.arrow_forward_ios,
color:
tappedIndex == index
? Colors.white
: Colors.black,
),
tooltip: '',
onPressed: () {
setState(() {});
},
),
],
),
)
],
),
),
)),
],
),
), ),
), ),
], ],
), ),
Container( ),
height: MediaQuery.of(context).size.height * 0.20,
width: double.maxFinite,
)
],
), ),
), Container(
), color: Colors.white,
bottomSheet: Container( padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
height: MediaQuery.of(context).size.height * 0.10, child: DefaultButton(
width: double.infinity, TranslationBase.of(context).start,
padding: EdgeInsets.all(8.0), chat.isEmpty ? null : () => {launch(chat)},
child: Center( color: Color(0xffD02127),
child: Container( textColor: chat.isEmpty ? Color(0xff000000) : Colors.white,
height: MediaQuery.of(context).size.height * 0.07, disabledColor: Color(0xffEAEAEA),
width: MediaQuery.of(context).size.width * 0.8,
child: SecondaryButton(
label: TranslationBase.of(context).start,
loading: model.state == ViewState.BusyLocal,
textColor: Colors.white,
disabled: chat.isEmpty,
onTap: () {
launch(chat);
},
), ),
), ),
), ],
), ),
), ),
); );

@ -2,6 +2,7 @@ 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/pages/ContactUs/LiveChat/pharmaciesLivechat_page.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/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';
@ -15,17 +16,19 @@ class LiveChatPage extends StatefulWidget {
_LiveChatPageState createState() => _LiveChatPageState(); _LiveChatPageState createState() => _LiveChatPageState();
} }
class _LiveChatPageState extends State<LiveChatPage> class _LiveChatPageState extends State<LiveChatPage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
List<ImagesInfo> imagesInfo = List(); List<ImagesInfo> imagesInfo = List();
@override @override
void initState() { void initState() {
super.initState(); super.initState();
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/0.png')); imagesInfo
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/1.png')); .add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/2.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/2.png')); imagesInfo
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/1.png'));
imagesInfo
.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/en/2.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/live-chat/ar/2.png'));
_tabController = TabController(length: 2, vsync: this); _tabController = TabController(length: 2, vsync: this);
} }
@ -44,84 +47,42 @@ class _LiveChatPageState extends State<LiveChatPage>
title: TranslationBase.of(context).liveChat, title: TranslationBase.of(context).liveChat,
description: TranslationBase.of(context).infoChat, description: TranslationBase.of(context).infoChat,
appBarTitle: TranslationBase.of(context).service, appBarTitle: TranslationBase.of(context).service,
body: Scaffold( showNewAppBar: true,
extendBodyBehindAppBar: true, showNewAppBarTitle: true,
appBar: PreferredSize( backgroundColor: CustomColors.appBackgroudGrey2Color,
preferredSize: Size.fromHeight(65.0), body: Column(
child: Stack( children: <Widget>[
children: <Widget>[ TabBar(
Positioned( controller: _tabController,
bottom: 1, indicatorWeight: 3.0,
left: 0, indicatorSize: TabBarIndicatorSize.tab,
right: 0, labelColor: Color(0xff2B353E),
child: BackdropFilter( unselectedLabelColor: Color(0xff575757),
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
child: Container( labelStyle: TextStyle(
color: Theme.of(context) fontSize: 16,
.scaffoldBackgroundColor fontWeight: FontWeight.w600,
.withOpacity(0.8), letterSpacing: -0.48,
height: 70.0, ),
), unselectedLabelStyle: TextStyle(
), fontSize: 16,
), fontWeight: FontWeight.w600,
Center( letterSpacing: -0.48,
child: Container( ),
height: 60.0, tabs: [Text(TranslationBase.of(context).hospitals), Text(TranslationBase.of(context).pharmacies)],
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.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: Texts(TranslationBase.of(context).hospitals),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(TranslationBase.of(context).pharmacies),
),
),
],
),
),
),
),
],
), ),
), Expanded(
body: Column( child: TabBarView(
children: <Widget>[ physics: BouncingScrollPhysics(),
Expanded( controller: _tabController,
child: TabBarView( children: <Widget>[
physics: BouncingScrollPhysics(), HospitalsLiveChatPage(), //SendFeedbackPage(),
controller: _tabController, PharmaciesLiveChatPage()
children: <Widget>[ //StatusFeedbackPage()
HospitalsLiveChatPage(), //SendFeedbackPage(), ],
PhamaciesLiveChatPage() ),
//StatusFeedbackPage() )
], ],
),
)
],
),
), ),
); );
} }

@ -5,6 +5,7 @@ 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/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/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';
@ -13,21 +14,8 @@ import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart'; import 'package:url_launcher/url_launcher.dart';
class PhamaciesLiveChatPage extends StatefulWidget { class PharmaciesLiveChatPage extends StatelessWidget {
@override PharmaciesLiveChatPage({Key key}) : super(key: key);
_PhamaciesLiveChatPageState createState() => _PhamaciesLiveChatPageState();
}
class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
int tappedIndex;
String chat;
@override
void initState() {
super.initState();
tappedIndex = -1;
chat = "";
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -36,53 +24,43 @@ class _PhamaciesLiveChatPageState extends State<PhamaciesLiveChatPage> {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowDecPage: false, isShowDecPage: false,
body: SingleChildScrollView( body: Column(
child: Container( children: [
margin: EdgeInsets.only(left: 15, right: 15), Expanded(
child: Column( child: SingleChildScrollView(
children: [ physics: BouncingScrollPhysics(),
SizedBox( padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
height: 20, child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: [
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),
),
],
), ),
Container( ),
width: double.infinity,
height: 200,
child: Texts(
TranslationBase.of(context).instructionsPharmacies,
color: Colors.black,
textAlign: TextAlign.center,
),
),
///////////
SizedBox(
height: 100,
),
],
), ),
), Container(
), color: Colors.white,
bottomSheet: Container( padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
height: MediaQuery.of(context).size.height * 0.11, child: DefaultButton(
width: double.infinity, TranslationBase.of(context).start,
padding: EdgeInsets.all(8.0), () {
child: Center( String chat;
child: Container(
height: MediaQuery.of(context).size.height * 0.7,
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: TranslationBase.of(context).start,
loading: model.state == ViewState.BusyLocal,
onTap: () {
print("chat=" + chat);
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}"; "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); launch(chat);
}, },
color: Color(0xffD02127),
textColor: Colors.white,
disabledColor: Color(0xffEAEAEA),
), ),
), ),
), ],
), ),
), ),
); );

@ -195,178 +195,5 @@ class _HospitalsPageState extends State<HospitalsPage> {
], ],
), ),
); );
AppScaffold(
isShowDecPage: false,
body: SingleChildScrollView(
child: Container(
// margin: EdgeInsets.only(left: 15,right: 15,top: 70),
margin: EdgeInsets.only(left: 15, right: 15, top: 70),
child: Column(
children: [
...List.generate(
widget.findusHospitalModelList.length,
(index) => Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () {
showDialog(
context: context,
builder: (_) => AssetGiffyDialog(
title: Text(
widget.findusHospitalModelList[index].locationName,
style: TextStyle(fontSize: 22.0, fontWeight: FontWeight.w600),
),
image: Image.network(
widget.findusHospitalModelList[index].projectImageURL.toString(),
fit: BoxFit.cover,
),
buttonCancelText: Text('cancel'),
buttonCancelColor: Colors.grey,
onlyCancelButton: true,
));
},
child: Container(width: 70, height: 70, child: Image.network(widget.findusHospitalModelList[index].projectImageURL.toString())),
),
Expanded(
flex: 4,
child: Container(
margin: EdgeInsets.only(left: 5, right: 5, top: 10, bottom: 1),
child: Texts(
'${widget.findusHospitalModelList[index].locationName}',
textAlign: TextAlign.start,
))), //model.cOCItemList[index].cOCTitl
Expanded(
flex: 2,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
IconButton(
icon: Icon(
Icons.location_on,
color: Theme.of(context).primaryColor,
size: 35,
),
// icon: new Image.asset(
// 'assets/images/new-design/navigate.png'),
tooltip: '',
onPressed: () {
setState(() {
MapsLauncher.launchCoordinates(double.parse(widget.findusHospitalModelList[index].latitude),
double.parse(widget.findusHospitalModelList[index].longitude), widget.findusHospitalModelList[index].locationName);
});
},
),
IconButton(
icon: Icon(
Icons.phone,
color: Theme.of(context).primaryColor,
size: 35,
),
// icon: new Image.asset(
// 'assets/images/new-design/call.png'),
tooltip: '',
onPressed: () {
setState(() {
// _volume += 10;
launch("tel://" + widget.findusHospitalModelList[index].phoneNumber);
});
},
),
],
),
),
],
),
),
],
),
// Texts('${model.FindusHospitalModelList[index].locationName}'),
Divider(
height: 4.5,
color: Colors.grey[500],
)
],
),
),
)),
SizedBox(
height: 8,
),
Container(
width: double.infinity,
height: 100,
color: Colors.white,
child: Row(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
IconButton(
icon: new Image.asset('assets/images/new-design/youtube.png'),
iconSize: 70,
tooltip: 'Youtube',
onPressed: () {
setState(() {
launch("https://www.youtube.com/c/DrsulaimanAlhabibHospitals");
});
},
),
IconButton(
icon: new Image.asset('assets/images/new-design/linkedin.png'),
tooltip: 'LinkedIn',
iconSize: 70,
onPressed: () {
setState(() {
launch("https://www.linkedin.com/company/drsulaiman-alhabib-medical-group");
});
},
),
IconButton(
icon: new Image.asset('assets/images/new-design/twitter.png'),
tooltip: 'Twitter',
iconSize: 70,
onPressed: () {
setState(() {
launch("https://twitter.com/HMG");
});
},
),
IconButton(
icon: new Image.asset('assets/images/new-design/facebook.png'),
tooltip: 'facebook',
iconSize: 70,
onPressed: () {
setState(() {
launch("https://www.facebook.com/DrSulaimanAlHabib?ref=tn_tnmn");
});
},
),
],
),
),
],
),
),
),
);
} }
} }

@ -38,7 +38,12 @@ class CardCommonContact extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[ children: <Widget>[
Image.asset(this.image, width: 42.0, height: 42.0), Image.asset(
this.image,
width: 42.0,
height: 42.0,
color: Color(0xff2E303A),
),
Text( Text(
text + "${subText.isEmpty ? "" : "\n$subText"}", text + "${subText.isEmpty ? "" : "\n$subText"}",
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16), style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 20 / 16),

@ -3,6 +3,7 @@ import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart'; import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart'; import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart'; import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.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/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';
@ -14,14 +15,13 @@ import 'status_feedback_page.dart';
class FeedbackHomePage extends StatefulWidget { class FeedbackHomePage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment; final AppoitmentAllHistoryResultList appointment;
final MessageType messageType; final MessageType messageType;
const FeedbackHomePage({Key key, this.appointment, this.messageType= MessageType.NON}) : super(key: key); const FeedbackHomePage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
@override @override
_FeedbackHomePageState createState() => _FeedbackHomePageState(); _FeedbackHomePageState createState() => _FeedbackHomePageState();
} }
class _FeedbackHomePageState extends State<FeedbackHomePage> class _FeedbackHomePageState extends State<FeedbackHomePage> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
TabController _tabController; TabController _tabController;
@override @override
@ -43,79 +43,44 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
isBottomBar: false, isBottomBar: false,
isShowDecPage: false, isShowDecPage: false,
appBarTitle: TranslationBase.of(context).feedbackTitle, appBarTitle: TranslationBase.of(context).feedbackTitle,
body: Scaffold( showNewAppBar: true,
extendBodyBehindAppBar: true, showNewAppBarTitle: true,
appBar: PreferredSize( backgroundColor: CustomColors.appBackgroudGrey2Color,
preferredSize: Size.fromHeight(65.0), body: Column(
child: Stack( children: <Widget>[
children: <Widget>[ TabBar(
Positioned( controller: _tabController,
bottom: 1, indicatorWeight: 3.0,
left: 0, indicatorSize: TabBarIndicatorSize.tab,
right: 0, labelColor: Color(0xff2B353E),
child: BackdropFilter( unselectedLabelColor: Color(0xff575757),
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), labelPadding: EdgeInsets.only(top: 15, bottom: 13, left: 20, right: 20),
child: Container( labelStyle: TextStyle(
color: Theme.of(context) fontSize: 16,
.scaffoldBackgroundColor fontWeight: FontWeight.w600,
.withOpacity(0.8), letterSpacing: -0.48,
height: 70.0, ),
), unselectedLabelStyle: TextStyle(
), fontSize: 16,
), fontWeight: FontWeight.w600,
Center( letterSpacing: -0.48,
child: Container( ),
height: 60.0, tabs: [Text(TranslationBase.of(context).send), Text(TranslationBase.of(context).status)],
margin: EdgeInsets.only(top: 10.0),
width: MediaQuery.of(context).size.width * 0.9,
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.tab,
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.30,
child: Center(
child: Texts(TranslationBase.of(context).send),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.30,
child: Center(
child: Texts(TranslationBase.of(context).status),
),
),
],
),
),
),
),
],
), ),
), Expanded(
body: Column( child: TabBarView(
children: <Widget>[ physics: BouncingScrollPhysics(),
Expanded( controller: _tabController,
child: TabBarView( children: <Widget>[
physics: BouncingScrollPhysics(), SendFeedbackPage(
controller: _tabController, appointment: widget.appointment,
children: <Widget>[SendFeedbackPage(appointment: widget.appointment,messageType: widget.messageType,), StatusFeedbackPage()], messageType: widget.messageType,
), ),
) StatusFeedbackPage()
], ],
), ),
)
],
), ),
); );
} }

@ -12,6 +12,7 @@ import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart'; import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart'; import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/input/text_field.dart'; import 'package:diplomaticquarterapp/widgets/input/text_field.dart';
@ -102,447 +103,447 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowDecPage: false, isShowDecPage: false,
body: Container( body: Column(
height: MediaQuery.of(context).size.height * 0.8, children: [
child: SingleChildScrollView( Expanded(
child: Form( child: SingleChildScrollView(
key: formKey, physics: BouncingScrollPhysics(),
child: Column( padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
crossAxisAlignment: CrossAxisAlignment.start, child: Form(
children: <Widget>[ key: formKey,
SizedBox( child: Column(
height: 65, crossAxisAlignment: CrossAxisAlignment.start,
), children: <Widget>[
Container( Text(
margin: EdgeInsets.only(left: 20, right: 20, top: 8), TranslationBase.of(context).likeToHear,
child: Texts( textAlign: TextAlign.center,
TranslationBase.of(context).likeToHear, style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
textAlign: TextAlign.center,
),
),
InkWell(
onTap: () {
confirmBox(model);
},
child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
height: 50,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(7),
color: Colors.white,
shape: BoxShape.rectangle,
), ),
child: Row( SizedBox(height: 21),
mainAxisAlignment: MainAxisAlignment.spaceBetween, InkWell(
children: <Widget>[ onTap: () {
Container( confirmBox(model);
child: Texts( },
getSelected(context), child: Container(
variant: 'bodyText', padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15),
color: Colors.white,
border: Border.all(
color: Color(0xffefefef),
width: 1,
), ),
margin: EdgeInsets.only(left: 10, right: 10),
), ),
Icon( child: Row(
Icons.arrow_drop_down, mainAxisAlignment: MainAxisAlignment.spaceBetween,
size: 22, children: <Widget>[
color: Colors.grey, Text(
) getSelected(context),
], style: TextStyle(
), fontSize: 16,
), fontWeight: FontWeight.w600,
), letterSpacing: -0.48,
if (appointHistory != null && color: Color(0xff2B353E),
messageType == MessageType.ComplaintOnAnAppointment)
InkWell(
onTap: () {
setState(() {
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( Icon(
quarterTurns: 3, Icons.keyboard_arrow_down,
child: Center( size: 22,
child: Text( color: Colors.grey,
appointHistory.isLiveCareAppointment )
? TranslationBase.of(context).liveCare.toUpperCase() ],
: !appointHistory.isInOutPatient ),
? TranslationBase.of(context) ),
.inPatient ),
.toUpperCase() SizedBox(height: 12),
: TranslationBase.of(context) if (appointHistory != null && messageType == MessageType.ComplaintOnAnAppointment)
.outpatient InkWell(
.toUpperCase(), onTap: () {
style: TextStyle(color: Colors.white,fontSize: 12), setState(() {
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(
Expanded( quarterTurns: 3,
flex: 4, child: Center(
child: Column( child: Text(
crossAxisAlignment: CrossAxisAlignment.start, appointHistory.isLiveCareAppointment
children: <Widget>[ ? TranslationBase.of(context).liveCare.toUpperCase()
Padding( : !appointHistory.isInOutPatient
padding: const EdgeInsets.all(10.0), ? TranslationBase.of(context).inPatient.toUpperCase()
child: Row( : TranslationBase.of(context).outpatient.toUpperCase(),
children: <Widget>[ style: TextStyle(color: Colors.white, fontSize: 12),
Expanded(
flex: 1,
child: LargeAvatar(
name: appointHistory.doctorNameObj,
url: appointHistory.doctorImageURL,
),
), ),
Expanded( )),
flex: 4, ),
child: Container( Expanded(
margin: EdgeInsets.all(10), flex: 4,
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment: CrossAxisAlignment.start,
CrossAxisAlignment.start, children: <Widget>[
children: <Widget>[ Padding(
Texts( padding: const EdgeInsets.all(10.0),
appointHistory.doctorNameObj, child: Row(
bold: true, children: <Widget>[
), Expanded(
Texts( flex: 1,
DateUtil child: LargeAvatar(
.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)), name: appointHistory.doctorNameObj,
variant: 'caption3', 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),
],
), ),
StarRating( ),
totalAverage: appointHistory
.doctorRate
.toDouble(),
forceStars: true),
],
), ),
), ],
), ),
], ),
],
),
),
Expanded(
flex: 1,
child: Center(
child: Icon(
Icons.arrow_forward_ios,
size: 15,
), ),
), ),
], )
), ],
), ),
Expanded( ),
flex: 1,
child: Center(
child: Icon(
Icons.arrow_forward_ios,
size: 15,
),
),
)
],
), ),
), if (messageType == MessageType.ComplaintOnAnAppointment && model.appointHistoryList.length != 0 && isShowListAppointHistory)
), Container(
if (messageType == MessageType.ComplaintOnAnAppointment && height: model.appointHistoryList.length > 2 ? MediaQuery.of(context).size.height * 0.25 : MediaQuery.of(context).size.height * 0.15,
model.appointHistoryList.length != 0 && child: ListView.builder(
isShowListAppointHistory) itemCount: model.appointHistoryList.length,
Container( itemBuilder: (context, index) => InkWell(
height: model.appointHistoryList.length > 2 onTap: () {
? MediaQuery.of(context).size.height * 0.25 setState(() {
: MediaQuery.of(context).size.height * 0.15, appointHistory = model.appointHistoryList[index];
child: ListView.builder( isShowListAppointHistory = false;
itemCount: model.appointHistoryList.length, });
itemBuilder: (context, index) => InkWell( },
onTap: () { child: Container(
setState(() { margin: EdgeInsets.only(left: 8, right: 8),
appointHistory = model.appointHistoryList[index]; color: Colors.white,
isShowListAppointHistory = false; child: Column(
});
},
child: Container(
margin: EdgeInsets.only(left: 8, right: 8),
color: Colors.white,
child: Column(
children: <Widget>[
Row(
children: <Widget>[ children: <Widget>[
Expanded( Row(
flex: 4, children: <Widget>[
child: Column( Expanded(
crossAxisAlignment: flex: 4,
CrossAxisAlignment.start, child: Column(
children: <Widget>[ crossAxisAlignment: CrossAxisAlignment.start,
Padding( children: <Widget>[
padding: const EdgeInsets.all(10.0), Padding(
child: Row( padding: const EdgeInsets.all(10.0),
children: <Widget>[ child: Row(
Expanded( children: <Widget>[
flex: 1, Expanded(
child: LargeAvatar( flex: 1,
name: model child: LargeAvatar(
.appointHistoryList[ name: model.appointHistoryList[index].doctorNameObj,
index] url: model.appointHistoryList[index].doctorImageURL,
.doctorNameObj, ),
url: model ),
.appointHistoryList[ Expanded(
index] flex: 4,
.doctorImageURL, child: Container(
), margin: EdgeInsets.all(10),
), child: Column(
Expanded( crossAxisAlignment: CrossAxisAlignment.start,
flex: 4, children: <Widget>[
child: Container( Texts(
margin: EdgeInsets.all(10), model.appointHistoryList[index].doctorNameObj,
child: Column( bold: true,
crossAxisAlignment: ),
CrossAxisAlignment Texts(
.start, DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
children: <Widget>[ variant: 'caption3',
Texts( ),
model StarRating(totalAverage: model.appointHistoryList[index].doctorRate.toDouble(), forceStars: true),
.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_ios,
size: 15,
), ),
), ),
], )
), ],
), ),
Expanded( SizedBox(
flex: 1, height: 5,
child: Center( ),
child: Icon( Divider(
Icons.arrow_forward_ios, height: 0.5,
size: 15, color: Colors.grey[400],
),
),
) )
], ],
), ),
SizedBox( ),
height: 5,
),
Divider(
height: 0.5,
color: Colors.grey[400],
)
],
), ),
), ),
), ),
), inputWidget(TranslationBase.of(context).subject, "xxxxxxxx", titleController),
), SizedBox(height: 12),
Container( inputWidget(TranslationBase.of(context).message, "xxxxxxxx", messageController, lines: 11, suffixTap: () {
margin: EdgeInsets.only(left: 10, right: 10, top: 15), openSpeechReco();
child: TextFields( }),
hintText: TranslationBase.of(context).subject, SizedBox(height: 12),
controller: titleController, InkWell(
fontSize: 13.5, onTap: () {
hintColor: Colors.black, ImageOptions.showImageOptions(context, (String image, File file) {
fontWeight: FontWeight.w600, setState(() {
onChanged: (v) { images.add(image);
setState(() {}); });
}, });
validator: (value) {
if (value.isEmpty)
return TranslationBase.of(context).emptySubject;
else
return null;
},
),
),
Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
child: TextFields(
hintText: TranslationBase.of(context).message,
fontSize: 13.5,
hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 25,
minLines: 13,
controller: messageController,
suffixIcon: Icons.mic,
onSuffixTap: () {
openSpeechReco();
},
onChanged: (v) {
setState(() {});
}, },
validator: (value) { child: Container(
if (value.isEmpty) padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
return TranslationBase.of(context).emptyMessage; alignment: Alignment.center,
else decoration: BoxDecoration(
return null; borderRadius: BorderRadius.circular(15),
}), color: Colors.white,
), border: Border.all(
InkWell( color: Color(0xffefefef),
onTap: () { width: 1,
ImageOptions.showImageOptions(context,
(String image, File file) {
setState(() {
images.add(image);
});
});
},
child: Container(
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
height: 50,
decoration: BoxDecoration(
border: Border.all(color: Colors.grey),
borderRadius: BorderRadius.circular(7),
color: Colors.white,
shape: BoxShape.rectangle,
),
child: Center(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(Icons.attach_file),
Texts(
TranslationBase.of(context).selectAttachment,
variant: 'bodyText',
textAlign: TextAlign.center,
), ),
], ),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Icon(
Icons.attach_file,
color: Color(0xff2B353E),
),
Text(
TranslationBase.of(context).selectAttachment,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.64, height: 23 / 16),
),
],
),
), ),
), ),
), ...List.generate(
), images.length,
...List.generate( (index) => Container(
images.length, margin: EdgeInsets.all(10),
(index) => Container( padding: EdgeInsets.all(8.0),
margin: EdgeInsets.all(10), child: Row(
padding: EdgeInsets.all(8.0), mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Icon(FontAwesomeIcons.paperclip), Row(
SizedBox( crossAxisAlignment: CrossAxisAlignment.start,
width: 8, children: <Widget>[
), Icon(FontAwesomeIcons.paperclip),
Texts( SizedBox(
'image ${index + 1}.png', width: 8,
),
Texts(
'image ${index + 1}.png',
),
],
), ),
InkWell(
onTap: () {
setState(() {
images.remove(images[index]);
});
},
child: Icon(
FontAwesomeIcons.trashAlt,
color: Colors.red[300],
))
], ],
), ),
InkWell( )),
onTap: () { ],
setState(() {
images.remove(images[index]);
});
},
child: Icon(
FontAwesomeIcons.trashAlt,
color: Colors.red[300],
))
],
),
)),
SizedBox(
height: 100,
), ),
], ),
), ),
), ),
), Container(
color: Colors.white,
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
child: DefaultButton(
TranslationBase.of(context).send,
(titleController.text.toString().isEmpty || messageController.text.toString().isEmpty)
? null
: () {
final form = formKey.currentState;
if (form.validate()) {
GifLoaderDialogUtils.showMyDialog(context);
model
.sendCOCItem(
title: titleController.text,
attachment: images.length > 0 ? images[0] : "",
details: messageController.text,
cOCTypeName: getCOCName(),
appointHistory: messageType == MessageType.ComplaintOnAnAppointment ? appointHistory : null)
.then((value) {
if (value) {
setState(() {
titleController.text = "";
messageController.text = "";
images = [];
});
setMessageType(MessageType.NON);
GifLoaderDialogUtils.hideDialog(context);
AppToast.showSuccessToast(message: TranslationBase.of(context).yourFeedback);
} else {
AppToast.showErrorToast(message: model.error);
GifLoaderDialogUtils.hideDialog(context);
}
});
}
},
color: Color(0xffD02127),
textColor: (titleController.text.toString().isEmpty || messageController.text.toString().isEmpty) ? Color(0xff000000) : Colors.white,
disabledColor: Color(0xffEAEAEA),
),
),
],
), ),
bottomSheet: Container( ),
height: 80, );
width: double.infinity, }
padding: EdgeInsets.all(15.0),
child: Center( Widget inputWidget(String _labelText, String _hintText, TextEditingController _controller, {VoidCallback suffixTap, bool isEnable = true, bool hasSelection = false, int lines}) {
child: Container( return Container(
height: MediaQuery.of(context).size.height * 0.1, padding: EdgeInsets.only(left: 16, right: 16, bottom: 15, top: 15),
child: SecondaryButton( alignment: Alignment.center,
label: TranslationBase.of(context).send, decoration: BoxDecoration(
textColor: Colors.white, borderRadius: BorderRadius.circular(15),
disabled: (titleController.text.toString().isEmpty || color: Colors.white,
messageController.text.toString().isEmpty), border: Border.all(
onTap: () { color: Color(0xffefefef),
final form = formKey.currentState; width: 1,
if (form.validate()) { ),
GifLoaderDialogUtils.showMyDialog(context); ),
model child: InkWell(
.sendCOCItem( onTap: hasSelection ? () {} : null,
title: titleController.text, child: Row(
attachment: images.length > 0 ? images[0] : "", children: [
details: messageController.text, Expanded(
cOCTypeName: getCOCName(), child: Column(
appointHistory: messageType == mainAxisSize: MainAxisSize.min,
MessageType.ComplaintOnAnAppointment crossAxisAlignment: CrossAxisAlignment.start,
? appointHistory children: [
: null) Text(
.then((value) { _labelText,
if (value) { style: TextStyle(
setState(() { fontSize: 11,
titleController.text = ""; fontWeight: FontWeight.w600,
messageController.text = ""; color: Color(0xff2B353E),
images = []; letterSpacing: -0.44,
}); ),
setMessageType(MessageType.NON); ),
GifLoaderDialogUtils.hideDialog(context); TextField(
AppToast.showSuccessToast( enabled: isEnable,
message: TranslationBase.of(context).yourFeedback); scrollPadding: EdgeInsets.zero,
} else { keyboardType: TextInputType.number,
AppToast.showErrorToast(message: model.error); controller: _controller,
GifLoaderDialogUtils.hideDialog(context); maxLines: lines,
} onChanged: (value) => {setState(() {})},
}); style: TextStyle(
} fontSize: 14,
}, height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff2B353E),
letterSpacing: -0.44,
),
decoration: InputDecoration(
isDense: true,
hintText: _hintText,
hintStyle: TextStyle(
fontSize: 14,
height: 21 / 14,
fontWeight: FontWeight.w400,
color: Color(0xff575757),
letterSpacing: -0.56,
),
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,
enabledBorder: InputBorder.none,
),
),
],
), ),
), ),
), if (hasSelection) Icon(Icons.keyboard_arrow_down_outlined),
],
), ),
), ),
); );
@ -595,10 +596,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
openSpeechReco() async { openSpeechReco() async {
new RoboSearch(context: context).showAlertDialog(context); new RoboSearch(context: context).showAlertDialog(context);
_currentLocaleId = _currentLocaleId = TranslationBase.of(AppGlobal.context).locale.languageCode;
TranslationBase.of(AppGlobal.context).locale.languageCode; bool available = await speech.initialize(onStatus: statusListener, onError: errorListener);
bool available = await speech.initialize(
onStatus: statusListener, onError: errorListener);
if (available) { if (available) {
speech.listen( speech.listen(
onResult: resultListener, onResult: resultListener,
@ -641,8 +640,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
} }
Future<void> initSpeechState() async { Future<void> initSpeechState() async {
bool hasSpeech = await speech.initialize( bool hasSpeech = await speech.initialize(onError: errorListener, onStatus: statusListener);
onError: errorListener, onStatus: statusListener);
print(hasSpeech); print(hasSpeech);
if (!mounted) return; if (!mounted) return;
} }
@ -652,9 +650,7 @@ class FeedbackTypeDialog extends StatefulWidget {
final Function(MessageType) onValueSelected; final Function(MessageType) onValueSelected;
final MessageType messageTypeDialog; final MessageType messageTypeDialog;
const FeedbackTypeDialog( const FeedbackTypeDialog({Key key, this.onValueSelected, this.messageTypeDialog = MessageType.NON}) : super(key: key);
{Key key, this.onValueSelected, this.messageTypeDialog = MessageType.NON})
: super(key: key);
@override @override
State createState() => new FeedbackTypeDialogState(); State createState() => new FeedbackTypeDialogState();
@ -699,14 +695,12 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
child: InkWell( child: InkWell(
onTap: () => setMessageDialogType(MessageType.NON), onTap: () => setMessageDialogType(MessageType.NON),
child: ListTile( child: ListTile(
title: title: Texts(TranslationBase.of(context).notClassified),
Texts(TranslationBase.of(context).notClassified),
leading: Radio( leading: Radio(
value: MessageType.NON, value: MessageType.NON,
groupValue: messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor, activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) => setMessageDialogType(value),
setMessageDialogType(value),
), ),
), ),
), ),
@ -721,17 +715,14 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => setMessageDialogType( onTap: () => setMessageDialogType(MessageType.ComplaintOnAnAppointment),
MessageType.ComplaintOnAnAppointment),
child: ListTile( child: ListTile(
title: title: Texts(TranslationBase.of(context).complainAppo),
Texts(TranslationBase.of(context).complainAppo),
leading: Radio( leading: Radio(
value: MessageType.ComplaintOnAnAppointment, value: MessageType.ComplaintOnAnAppointment,
groupValue: messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor, activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) => setMessageDialogType(value),
setMessageDialogType(value),
), ),
), ),
), ),
@ -746,17 +737,14 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => setMessageDialogType( onTap: () => setMessageDialogType(MessageType.ComplaintWithoutAppointment),
MessageType.ComplaintWithoutAppointment),
child: ListTile( child: ListTile(
title: Texts( title: Texts(TranslationBase.of(context).complainWithoutAppo),
TranslationBase.of(context).complainWithoutAppo),
leading: Radio( leading: Radio(
value: MessageType.ComplaintWithoutAppointment, value: MessageType.ComplaintWithoutAppointment,
groupValue: messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor, activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) => setMessageDialogType(value),
setMessageDialogType(value),
), ),
), ),
), ),
@ -778,8 +766,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
value: MessageType.Question, value: MessageType.Question,
groupValue: messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor, activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) => setMessageDialogType(value),
setMessageDialogType(value),
), ),
), ),
), ),
@ -794,16 +781,14 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => onTap: () => setMessageDialogType(MessageType.Compliment),
setMessageDialogType(MessageType.Compliment),
child: ListTile( child: ListTile(
title: Texts(TranslationBase.of(context).compliment), title: Texts(TranslationBase.of(context).compliment),
leading: Radio( leading: Radio(
value: MessageType.Compliment, value: MessageType.Compliment,
groupValue: messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor, activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) => setMessageDialogType(value),
setMessageDialogType(value),
), ),
), ),
), ),
@ -818,16 +803,14 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded( Expanded(
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () => onTap: () => setMessageDialogType(MessageType.Suggestion),
setMessageDialogType(MessageType.Suggestion),
child: ListTile( child: ListTile(
title: Texts(TranslationBase.of(context).suggestion), title: Texts(TranslationBase.of(context).suggestion),
leading: Radio( leading: Radio(
value: MessageType.Suggestion, value: MessageType.Suggestion,
groupValue: messageTypeDialog, groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor, activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) => onChanged: (MessageType value) => setMessageDialogType(value),
setMessageDialogType(value),
), ),
), ),
), ),

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart'; import 'package:diplomaticquarterapp/pages/feedback/feedback-detail.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart'; import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.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';
@ -24,120 +25,116 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
builder: (_, model, widget) => AppScaffold( builder: (_, model, widget) => AppScaffold(
baseViewModel: model, baseViewModel: model,
isShowDecPage: false, isShowDecPage: false,
body: model.cOCItemList.isNotEmpty body: Column(
? Container( children: [
margin: EdgeInsets.only( Expanded(
top: 8.0, left: 8.0, right: 8.0, bottom: 80), child: model.cOCItemList.isNotEmpty
padding: EdgeInsets.all(15.0), ? Container(
child: ListView.builder( margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0, bottom: 80),
itemCount: model.cOCItemList.length, padding: EdgeInsets.all(15.0),
itemBuilder: (context, index) => InkWell( child: ListView.builder(
onTap: () { itemCount: model.cOCItemList.length,
gotodetails(model.cOCItemList[index]); itemBuilder: (context, index) => InkWell(
}, onTap: () {
child: Container( gotodetails(model.cOCItemList[index]);
decoration: BoxDecoration( },
shape: BoxShape.rectangle, child: Container(
border: Border.all(color: Colors.white, width: 0.5), decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5)), shape: BoxShape.rectangle,
color: Colors.white, border: Border.all(color: Colors.white, width: 0.5),
), borderRadius: BorderRadius.all(Radius.circular(5)),
margin: EdgeInsets.all(4), color: Colors.white,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 8,
), ),
Row( margin: EdgeInsets.all(4),
mainAxisAlignment: child: Padding(
MainAxisAlignment.spaceBetween, padding: const EdgeInsets.all(8.0),
children: <Widget>[ child: Column(
Expanded( crossAxisAlignment: CrossAxisAlignment.start,
child: Column( children: <Widget>[
crossAxisAlignment: SizedBox(
CrossAxisAlignment.start, height: 8,
children: <Widget>[
Texts(
'${model.cOCItemList[index].cOCTitle}'),
Texts(
TranslationBase.of(context).number +
' : ${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],
), ),
), Row(
Expanded( mainAxisAlignment: MainAxisAlignment.spaceBetween,
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[ children: <Widget>[
Texts( Expanded(
'${model.cOCItemList[index].status}'), child: Column(
Texts( crossAxisAlignment: CrossAxisAlignment.start,
'${model.cOCItemList[index].date}', children: <Widget>[
variant: 'overline', 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],
)
],
),
), ),
Texts('${model.cOCItemList[index].formType}'), ))),
Divider( )
height: 4.5, : Center(
color: Colors.grey[500], child: Column(
) children: [
], SizedBox(
height: MediaQuery.of(context).size.height * 0.4,
),
Image.asset(
'assets/images/comments.png',
width: 80,
height: 80,
),
SizedBox(
height: 15,
),
Text(
TranslationBase.of(context).noSearchResult,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w600,
letterSpacing: -0.48,
color: Color(0xff2B353E),
), ),
), ),
))), ],
)
: Container(
child: Center(
child: Column(
children: [
SizedBox(
height: MediaQuery.of(context).size.height * 0.4,
),
Image.asset(
'assets/images/comments.png',
width: 80,
height: 80,
), ),
SizedBox( ),
height: 15, ),
), Container(
Texts(TranslationBase.of(context).noSearchResult), color: Colors.white,
], padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
), child: DefaultButton(
), TranslationBase.of(context).search,
), () => {},
bottomSheet: Container(
height: 80,
width: double.infinity,
padding: EdgeInsets.all(15.0),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.1,
child: SecondaryButton(
label: TranslationBase.of(context).search,
textColor: Colors.white,
disabled: true,
onTap: () {},
), ),
), ),
), ],
), ),
), ),
); );
} }
gotodetails(item) { gotodetails(item) {
Navigator.pushReplacement( Navigator.pushReplacement(context, FadePage(page: FeedbackDetails(items: item)));
context, FadePage(page: FeedbackDetails(items: item)));
} }
} }

@ -36,7 +36,7 @@ class _HomePageFragmentState extends State<HomePageFragment> {
hmgServices.add(new HmgServices(2, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(2, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Refferal.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Refferal.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/RRT.svg", isLogin)); hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergency, TranslationBase.of(context).services, "assets/images/new/RRT.svg", isLogin));
} }
@override @override

@ -26,9 +26,9 @@ import 'dart:math' as math;
class HomePageFragment2 extends StatefulWidget { class HomePageFragment2 extends StatefulWidget {
DashboardViewModel model; DashboardViewModel model;
Function onPharmacyClick, onLoginClick,onMedicalFileClick; Function onPharmacyClick, onLoginClick, onMedicalFileClick;
HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick,this.onMedicalFileClick}); HomePageFragment2(this.model, {this.onLoginClick, this.onPharmacyClick, this.onMedicalFileClick});
@override @override
_HomePageFragment2State createState() => _HomePageFragment2State(); _HomePageFragment2State createState() => _HomePageFragment2State();
@ -55,7 +55,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/visa.png", isLogin)); hmgServices.add(new HmgServices(2, TranslationBase.of(context).online, TranslationBase.of(context).payment, "assets/images/new/visa.png", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/emergency.svg", isLogin)); hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergency, TranslationBase.of(context).services2, "assets/images/new/emergency.svg", isLogin));
hmgServices.add(new HmgServices(6, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Referral.svg", isLogin)); hmgServices.add(new HmgServices(6, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Referral.svg", isLogin));
hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin)); hmgServices.add(new HmgServices(7, "H\u2082O", TranslationBase.of(context).dailyWater, "assets/images/new/h2o.svg", isLogin));
hmgServices.add(new HmgServices(8, TranslationBase.of(context).reachUs, TranslationBase.of(context).findUs, "assets/images/new/reach_us.svg", isLogin)); hmgServices.add(new HmgServices(8, TranslationBase.of(context).reachUs, TranslationBase.of(context).findUs, "assets/images/new/reach_us.svg", isLogin));
@ -130,7 +130,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
FlatButton( FlatButton(
onPressed: () { onPressed: () {
widget.onMedicalFileClick(); widget.onMedicalFileClick();
// navigateTo(context, MedicalProfilePageNew()); // navigateTo(context, MedicalProfilePageNew());
}, },
child: Text( child: Text(
TranslationBase.of(context).viewMedicalFile, TranslationBase.of(context).viewMedicalFile,

@ -61,7 +61,7 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
hmgServices.add(new HmgServices(2, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin)); hmgServices.add(new HmgServices(2, TranslationBase.of(context).checkup, TranslationBase.of(context).comprehensive, "assets/images/new/comprehensive_checkup.svg", isLogin));
hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin)); hmgServices.add(new HmgServices(3, TranslationBase.of(context).hhcHome, TranslationBase.of(context).healthCare, "assets/images/new/HHC.svg", isLogin));
hmgServices.add(new HmgServices(4, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Refferal.svg", isLogin)); hmgServices.add(new HmgServices(4, TranslationBase.of(context).refferal, TranslationBase.of(context).services2, "assets/images/new/E_Refferal.svg", isLogin));
hmgServices.add(new HmgServices(5, "RRT", TranslationBase.of(context).emergency, "assets/images/new/RRT.svg", isLogin)); hmgServices.add(new HmgServices(5, TranslationBase.of(context).emergency, TranslationBase.of(context).services, "assets/images/new/RRT.svg", isLogin));
} }
Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() async { Future<GetAllSharedRecordsByStatusResponse> getFamilyFiles() async {
@ -93,7 +93,8 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
child: LoggedSliderView( child: LoggedSliderView(
widget.projectViewModel, widget.projectViewModel,
new SliderData(TranslationBase.of(context).fileno + ": " + widget.projectViewModel.user.patientID.toString(), new SliderData(TranslationBase.of(context).fileno + ": " + widget.projectViewModel.user.patientID.toString(),
widget.projectViewModel.user.firstName + ' ' + widget.projectViewModel.user.lastName, "", bannerColor[0].darkColor, bannerColor[0].lightColor),null), widget.projectViewModel.user.firstName + ' ' + widget.projectViewModel.user.lastName, "", bannerColor[0].darkColor, bannerColor[0].lightColor),
null),
), ),
), ),
appoCountProvider.count == 0 appoCountProvider.count == 0

@ -224,7 +224,6 @@ class _Login extends State<Login> {
} }
void validateForm() { void validateForm() {
print("mobileNo:${mobileNo}");
if (util.validateIDBox(nationalIDorFile.text, loginType) == true && util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) { if (util.validateIDBox(nationalIDorFile.text, loginType) == true && util.isSAUDIIDValid(nationalIDorFile.text, loginType) == true) {
setState(() { setState(() {
isButtonDisabled = false; isButtonDisabled = false;
@ -234,7 +233,6 @@ class _Login extends State<Login> {
isButtonDisabled = true; isButtonDisabled = true;
}); });
} }
print("isButtonDisabled:${isButtonDisabled}");
} }
checkUserAuthentication() { checkUserAuthentication() {

@ -37,24 +37,28 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
appBarTitle: TranslationBase.of(context).sickLeaves, appBarTitle: TranslationBase.of(context).sickLeaves,
description: TranslationBase.of(context).infoSickLeaves, description: TranslationBase.of(context).infoSickLeaves,
infoList: TranslationBase.of(context).infoSickLeavePoints, infoList: TranslationBase.of(context).infoSickLeavePoints,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
baseViewModel: model, baseViewModel: model,
body: Container( body: ListView.separated(
margin: EdgeInsets.all(12), physics: BouncingScrollPhysics(),
child: ListView.builder( itemCount: model.sickLeaveList.length,
itemCount: model.sickLeaveList.length, padding: EdgeInsets.all(21),
itemBuilder: (context, index) => DoctorCard( separatorBuilder: (context, index) => SizedBox(height: 14),
isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment, itemBuilder: (context, index) => DoctorCard(
name: model.sickLeaveList[index].doctorName, isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment,
date: model.sickLeaveList[index].appointmentDate, name: model.sickLeaveList[index].doctorName,
profileUrl: model.sickLeaveList[index].doctorImageURL, date: model.sickLeaveList[index].appointmentDate,
rating: model.sickLeaveList[index].actualDoctorRate.toDouble(), profileUrl: model.sickLeaveList[index].doctorImageURL,
subName: model.sickLeaveList[index].projectName, rating: model.sickLeaveList[index].actualDoctorRate.toDouble(),
isInOutPatient: model.sickLeaveList[index].isInOutPatient, subName: model.sickLeaveList[index].clinicName,
onEmailTap: () { isSortByClinic: false,
showConfirmMessage(model, index); isInOutPatient: model.sickLeaveList[index].isInOutPatient,
}, onEmailTap: () {
), showConfirmMessage(model, index);
},
), ),
), ),
), ),

@ -30,15 +30,9 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
@override @override
void initState() { void initState() {
imagesInfo.add(ImagesInfo( imagesInfo.add(ImagesInfo(
imageEn: imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/0.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/0.png'));
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/0.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/0.png'));
imagesInfo.add(ImagesInfo( imagesInfo.add(ImagesInfo(
imageEn: imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/1.png', imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/1.png'));
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/en/1.png',
imageAr:
'https://hmgwebservices.com/Images/MobileApp/imges-info/monthly-reports/ar/1.png'));
super.initState(); super.initState();
} }
@ -57,6 +51,9 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
return AppScaffold( return AppScaffold(
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).monthlyReports, appBarTitle: TranslationBase.of(context).monthlyReports,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
description: TranslationBase.of(context).infoMonthReport, description: TranslationBase.of(context).infoMonthReport,
body: SingleChildScrollView( body: SingleChildScrollView(

@ -56,6 +56,7 @@ class _HomeReportPageState extends State<HomeReportPage> with SingleTickerProvid
baseViewModel: model, baseViewModel: model,
showNewAppBar: true, showNewAppBar: true,
showNewAppBarTitle: true, showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo, imagesInfo: imagesInfo,
body: Column( body: Column(
children: [ children: [

@ -5,26 +5,28 @@ import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart'; import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.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'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/others/StarRating.dart'; import 'package:diplomaticquarterapp/widgets/others/StarRating.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 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
class MedicalReports extends StatelessWidget { class MedicalReports extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
void confirmBox( void confirmBox(AppointmentHistory model, ReportsViewModel reportsViewModel) {
AppointmentHistory model, ReportsViewModel reportsViewModel) {
showDialog( showDialog(
context: context, context: context,
child: ConfirmDialog( child: ConfirmDialog(
appointmentHistory: model, appointmentHistory: model,
onOkSelected: (model) => reportsViewModel.insertRequestForMedicalReport(model,TranslationBase.of(context).successSendReport), onOkSelected: (model) => reportsViewModel.insertRequestForMedicalReport(model, TranslationBase.of(context).successSendReport),
), ),
); );
} }
ProjectViewModel projectViewModel = Provider.of(context); ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ReportsViewModel>( return BaseView<ReportsViewModel>(
onModelReady: (model) => model.getPatentAppointmentHistory(), onModelReady: (model) => model.getPatentAppointmentHistory(),
@ -32,88 +34,175 @@ class MedicalReports extends StatelessWidget {
baseViewModel: model, baseViewModel: model,
isShowAppBar: true, isShowAppBar: true,
appBarTitle: TranslationBase.of(context).medReport, appBarTitle: TranslationBase.of(context).medReport,
body: ListView.builder( showNewAppBar: true,
itemCount: model.appointHistoryList.length, showNewAppBarTitle: true,
itemBuilder: (context, index) => Padding( backgroundColor: Color(0xffF7F7F7),
padding: const EdgeInsets.all(8.0), body: ListView.separated(
child: Container( physics: BouncingScrollPhysics(),
width: double.infinity, itemCount: model.appointHistoryList.length,
margin: EdgeInsets.only(left: 8, right: 8, top: 3), padding: EdgeInsets.all(21),
decoration: BoxDecoration( separatorBuilder: (context, index) => SizedBox(height: 14),
color: Colors.white, itemBuilder: (context, index) {
border: Border.all(color: Colors.white, width: 2), AppointmentHistory _appointmenHistory = model.appointHistoryList[index];
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all( return InkWell(
Radius.circular(8.0), onTap: () => confirmBox(model.appointHistoryList[index], model),
)), child: Container(
child: Row( decoration: BoxDecoration(
children: <Widget>[ borderRadius: BorderRadius.all(
Container( Radius.circular(10.0),
margin: EdgeInsets.only(left: 5, right: 5), ),
child: LargeAvatar( boxShadow: [
width: 50, BoxShadow(
height: 50, color: Color(0xff000000).withOpacity(.05),
name: model.appointHistoryList[index].doctorNameObj, //spreadRadius: 5,
url: model.appointHistoryList[index].doctorImageURL, blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white),
child: Padding(
padding: const EdgeInsets.only(left: 12, right: 12, top: 12, bottom: 12),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
if ((_appointmenHistory.doctorName ?? _appointmenHistory.doctorNameObj) != null)
Text(
(_appointmenHistory.doctorName ?? _appointmenHistory.doctorNameObj),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w600, color: Color(0xff2E303A), letterSpacing: -0.64, height: 25 / 16),
),
Text(
DateUtil.formatDateToDate(_appointmenHistory.appointmentDate),
style: TextStyle(fontSize: 14, fontWeight: FontWeight.w600, color: Color(0xff2B353E), letterSpacing: -0.48, height: 18 / 12),
),
],
),
if ((_appointmenHistory.doctorName ?? _appointmenHistory.doctorNameObj) != null) SizedBox(height: 6),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
LargeAvatar(
name: _appointmenHistory.doctorName,
url: _appointmenHistory.doctorImageURL,
width: 48,
height: 48,
),
SizedBox(width: 11),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: <Widget>[
if (_appointmenHistory.projectName != null) myRichText(TranslationBase.of(context).clinic + ":", _appointmenHistory.projectName),
if (_appointmenHistory.clinicName != null) myRichText(TranslationBase.of(context).hospital + ":", _appointmenHistory.clinicName),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
RatingBar.readOnly(
initialRating: _appointmenHistory.actualDoctorRate.toDouble(),
size: 16.0,
filledColor: Color(0XFFD02127),
emptyColor: Color(0XFFD02127),
isHalfAllowed: true,
halfFilledIcon: Icons.star_half,
filledIcon: Icons.star,
emptyIcon: Icons.star_border,
),
Icon(Icons.email, color: Color(0xff2B353E))
],
),
],
),
),
],
),
],
), ),
), ),
Expanded( ),
flex: 4, );
child: Padding( Container(
padding: const EdgeInsets.all(8.0), decoration: BoxDecoration(
child: Column( borderRadius: BorderRadius.all(
crossAxisAlignment: CrossAxisAlignment.start, Radius.circular(10.0),
children: <Widget>[ ),
SizedBox( boxShadow: [
height: 12, BoxShadow(
), color: Color(0xff000000).withOpacity(.05),
Texts(model.appointHistoryList[index].projectName), blurRadius: 27,
Texts(model.appointHistoryList[index].clinicName), offset: Offset(0, -3),
Texts(projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.appointHistoryList[index].appointmentDate):DateUtil.getMonthDayYearDateFormatted(model.appointHistoryList[index].appointmentDate)), ),
StarRating( ],
totalAverage: model color: Colors.white),
.appointHistoryList[index].actualDoctorRate child: Row(
.toDouble(), children: <Widget>[
forceStars: true), Container(
SizedBox( margin: EdgeInsets.only(left: 5, right: 5),
height: 12, child: LargeAvatar(
), width: 50,
], height: 50,
name: model.appointHistoryList[index].doctorNameObj,
url: model.appointHistoryList[index].doctorImageURL,
), ),
), ),
), Expanded(
InkWell( flex: 4,
onTap: () => child: Padding(
confirmBox(model.appointHistoryList[index], model), padding: const EdgeInsets.all(8.0),
child: Container( child: Column(
width: 120, crossAxisAlignment: CrossAxisAlignment.start,
height: 50, children: <Widget>[
decoration: BoxDecoration( SizedBox(
color: Colors.black54, height: 12,
border: ),
Border.all(color: Colors.transparent, width: 2), Texts(model.appointHistoryList[index].projectName),
shape: BoxShape.rectangle, Texts(model.appointHistoryList[index].clinicName),
borderRadius: BorderRadius.all( Texts(projectViewModel.isArabic
Radius.circular(8.0), ? DateUtil.getMonthDayYearDateFormattedAr(model.appointHistoryList[index].appointmentDate)
: DateUtil.getMonthDayYearDateFormatted(model.appointHistoryList[index].appointmentDate)),
StarRating(totalAverage: model.appointHistoryList[index].actualDoctorRate.toDouble(), forceStars: true),
SizedBox(
height: 12,
),
],
), ),
), ),
child: Center( ),
child: Texts( InkWell(
TranslationBase.of(context).requestReport, onTap: () => confirmBox(model.appointHistoryList[index], model),
fontSize: 12, child: Container(
color: Colors.white, width: 120,
height: 50,
decoration: BoxDecoration(
color: Colors.black54,
border: Border.all(color: Colors.transparent, width: 2),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(
Radius.circular(8.0),
),
),
child: Center(
child: Texts(
TranslationBase.of(context).requestReport,
fontSize: 12,
color: Colors.white,
),
), ),
), ),
), ),
), SizedBox(
SizedBox( width: 12,
width: 12, ),
), ],
], ),
), );
), }),
),
),
), ),
); );
} }

@ -15,5 +15,6 @@ class CustomColors {
static const Color pharmacyGreyColor = Color(0xFFDBDBDB); static const Color pharmacyGreyColor = Color(0xFFDBDBDB);
static const Color backgroudGreyColor = Color(0xFFEFEFEF); static const Color backgroudGreyColor = Color(0xFFEFEFEF);
static const Color appBackgroudGreyColor = Color(0xFFF7F7F7); static const Color appBackgroudGreyColor = Color(0xFFF7F7F7);
static const Color appBackgroudGrey2Color = Color(0xFFF8F8F8);
static const Color green = Color(0xFF359846); static const Color green = Color(0xFF359846);
} }

@ -409,12 +409,12 @@ class Utils {
), ),
)); ));
medical.add(MedicalProfileItem( // medical.add(MedicalProfileItem(
title: TranslationBase.of(context).patientCall, // title: TranslationBase.of(context).patientCall,
imagePath: 'medical_history_icon.png', // imagePath: 'medical_history_icon.png',
subTitle: TranslationBase.of(context).patientCallSubtitle, // subTitle: TranslationBase.of(context).patientCallSubtitle,
isEnable: projectViewModel.havePrivilege(61), // isEnable: projectViewModel.havePrivilege(61),
)); // ));
medical.add(InkWell( medical.add(InkWell(
onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null, onTap: () => projectViewModel.havePrivilege(24) ? Navigator.push(context, FadePage(page: MyTrackers())) : null,

@ -83,7 +83,6 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
_labelText, _labelText,
style: TextStyle( style: TextStyle(
fontSize: 11, fontSize: 11,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
color: Color(0xff2B353E), color: Color(0xff2B353E),
letterSpacing: -0.44, letterSpacing: -0.44,
@ -96,7 +95,6 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
onChanged: (value) => widget.onNumberChange(value), onChanged: (value) => widget.onNumberChange(value),
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
height: 21 / 14, height: 21 / 14,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Color(0xff2B353E), color: Color(0xff2B353E),
@ -107,7 +105,6 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
hintText: _hintText, hintText: _hintText,
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 14, fontSize: 14,
height: 21 / 14, height: 21 / 14,
fontWeight: FontWeight.w400, fontWeight: FontWeight.w400,
color: Color(0xff575757), color: Color(0xff575757),
@ -120,7 +117,6 @@ class _PhoneNumberSelectorWidgetState extends State<PhoneNumberSelectorWidget> {
prefix, prefix,
style: TextStyle( style: TextStyle(
fontSize: 14, fontSize: 14,
height: 21 / 14, height: 21 / 14,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Color(0xff2E303A), color: Color(0xff2E303A),
@ -189,12 +185,12 @@ class _MobileNo extends State<MobileNo> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
projectProvider = Provider.of(context); projectProvider = Provider.of(context);
return Visibility( return Visibility(
child: Column(children: <Widget>[ child: Column(children: <Widget>[
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[ children: <Widget>[
Expanded( Expanded(
child: Container( child: Container(
margin: EdgeInsets.only(bottom: 10.0), margin: EdgeInsets.only(bottom: 10.0),
height: 60.0, height: 60.0,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -207,70 +203,75 @@ class _MobileNo extends State<MobileNo> {
), ),
width: MediaQuery.of(context).size.width * 0.89, width: MediaQuery.of(context).size.width * 0.89,
child: Padding( child: Padding(
padding: EdgeInsets.all(10), padding: EdgeInsets.all(10),
child: DropdownButtonHideUnderline( child: DropdownButtonHideUnderline(
child: DropdownButton( child: DropdownButton(
isExpanded: true, isExpanded: true,
value: _selectedType, value: _selectedType,
iconSize: 40, iconSize: 40,
elevation: 16, elevation: 16,
onChanged: (value) => { onChanged: (value) => {
widget.onCountryChange(value), widget.onCountryChange(value),
setState(() { setState(() {
countryCode = value; countryCode = value;
_selectedType = value; _selectedType = value;
}) })
}, },
items: counties.map<DropdownMenuItem<String>>((Countries value) { items: counties.map<DropdownMenuItem<String>>((Countries value) {
return DropdownMenuItem<String>( return DropdownMenuItem<String>(
value: value.code, value: value.code,
child: Text(projectProvider.isArabic == true ? value.nameAr : value.name), child: Text(projectProvider.isArabic == true ? value.nameAr : value.name),
); );
}).toList())))), }).toList()),
), ),
], ),
), ),
Container( ),
padding: EdgeInsets.all(5), ],
decoration: BoxDecoration(color: Colors.white, border: Border.all(color: Colors.grey), borderRadius: BorderRadius.circular(10)), ),
child: Row(children: <Widget>[ Container(
Expanded( padding: EdgeInsets.all(5),
decoration: BoxDecoration(color: Colors.white, border: Border.all(color: Colors.grey), borderRadius: BorderRadius.circular(10)),
child: Row(children: <Widget>[
Expanded(
flex: 1, flex: 1,
child: Icon( child: Icon(
Icons.phone, Icons.phone,
color: secondaryColor, color: secondaryColor,
)), ),
Expanded( ),
Expanded(
flex: 1, flex: 1,
child: Text( child: Text(
countryCode, countryCode,
overflow: TextOverflow.clip, overflow: TextOverflow.clip,
)),
Expanded(
flex: 4,
child: Container(
margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft),
child: TextField(
controller: widget.controller,
keyboardType: TextInputType.number,
maxLength: 10,
inputFormatters: <TextInputFormatter>
[
FilteringTextInputFormatter.allow(RegExp("[0-9]")),
],
// maxLengthEnforced: true,
// onChanged: (value) {
// widget.controller.text = countryCode;
// },
onChanged: (value) => widget.onNumberChange(value),
decoration: InputDecoration(counterText: "", border: InputBorder.none, hintText: '5xxxxxxxx'),
), ),
), ),
) Expanded(
]), flex: 4,
) child: Container(
])); margin: widget.margin != null ? EdgeInsets.all(widget.margin) : EdgeInsets.only(top: widget.marginTop, right: widget.marginRight, bottom: widget.marginBottom, left: widget.marginLeft),
child: TextField(
controller: widget.controller,
keyboardType: TextInputType.number,
maxLength: 10,
inputFormatters: <TextInputFormatter>[
FilteringTextInputFormatter.allow(RegExp("[0-9]")),
],
// maxLengthEnforced: true,
// onChanged: (value) {
// widget.controller.text = countryCode;
// },
onChanged: (value) => widget.onNumberChange(value),
decoration: InputDecoration(counterText: "", border: InputBorder.none, hintText: '5xxxxxxxx'),
),
),
)
]),
)
]),
);
} }
} }

Loading…
Cancel
Save