monthly report request & sick leaves ui redesigned.

merge-update-with-lab-changes
Sikander Saleem 5 years ago
parent cd85ad4f8a
commit c84707ba3f

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

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

Loading…
Cancel
Save