monthly report request & sick leaves ui redesigned.

merge-requests/390/head
Sikander Saleem 4 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(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(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

@ -26,9 +26,9 @@ import 'dart:math' as math;
class HomePageFragment2 extends StatefulWidget {
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
_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(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(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(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));
@ -130,7 +130,7 @@ class _HomePageFragment2State extends State<HomePageFragment2> {
FlatButton(
onPressed: () {
widget.onMedicalFileClick();
// navigateTo(context, MedicalProfilePageNew());
// navigateTo(context, MedicalProfilePageNew());
},
child: Text(
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(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(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 {
@ -93,7 +93,8 @@ class _HomePageFragmentState extends State<LoggedHomePageFragment> {
child: LoggedSliderView(
widget.projectViewModel,
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

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

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

@ -30,15 +30,9 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
@override
void initState() {
imagesInfo.add(ImagesInfo(
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'));
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'));
imagesInfo.add(ImagesInfo(
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'));
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'));
super.initState();
}
@ -57,6 +51,9 @@ class _MonthlyReportsPageState extends State<MonthlyReportsPage> {
return AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).monthlyReports,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
imagesInfo: imagesInfo,
description: TranslationBase.of(context).infoMonthReport,
body: SingleChildScrollView(

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

@ -5,26 +5,28 @@ import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.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/others/StarRating.dart';
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:rating_bar/rating_bar.dart';
class MedicalReports extends StatelessWidget {
@override
Widget build(BuildContext context) {
void confirmBox(
AppointmentHistory model, ReportsViewModel reportsViewModel) {
void confirmBox(AppointmentHistory model, ReportsViewModel reportsViewModel) {
showDialog(
context: context,
child: ConfirmDialog(
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);
return BaseView<ReportsViewModel>(
onModelReady: (model) => model.getPatentAppointmentHistory(),
@ -32,88 +34,175 @@ class MedicalReports extends StatelessWidget {
baseViewModel: model,
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).medReport,
body: ListView.builder(
itemCount: model.appointHistoryList.length,
itemBuilder: (context, index) => Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
width: double.infinity,
margin: EdgeInsets.only(left: 8, right: 8, top: 3),
decoration: BoxDecoration(
color: Colors.white,
border: Border.all(color: Colors.white, width: 2),
shape: BoxShape.rectangle,
borderRadius: BorderRadius.all(
Radius.circular(8.0),
)),
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 5, right: 5),
child: LargeAvatar(
width: 50,
height: 50,
name: model.appointHistoryList[index].doctorNameObj,
url: model.appointHistoryList[index].doctorImageURL,
showNewAppBar: true,
showNewAppBarTitle: true,
backgroundColor: Color(0xffF7F7F7),
body: ListView.separated(
physics: BouncingScrollPhysics(),
itemCount: model.appointHistoryList.length,
padding: EdgeInsets.all(21),
separatorBuilder: (context, index) => SizedBox(height: 14),
itemBuilder: (context, index) {
AppointmentHistory _appointmenHistory = model.appointHistoryList[index];
return InkWell(
onTap: () => confirmBox(model.appointHistoryList[index], model),
child: Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
//spreadRadius: 5,
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white),
child: 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(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 12,
),
Texts(model.appointHistoryList[index].projectName),
Texts(model.appointHistoryList[index].clinicName),
Texts(projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.appointHistoryList[index].appointmentDate):DateUtil.getMonthDayYearDateFormatted(model.appointHistoryList[index].appointmentDate)),
StarRating(
totalAverage: model
.appointHistoryList[index].actualDoctorRate
.toDouble(),
forceStars: true),
SizedBox(
height: 12,
),
],
),
);
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(10.0),
),
boxShadow: [
BoxShadow(
color: Color(0xff000000).withOpacity(.05),
blurRadius: 27,
offset: Offset(0, -3),
),
],
color: Colors.white),
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.only(left: 5, right: 5),
child: LargeAvatar(
width: 50,
height: 50,
name: model.appointHistoryList[index].doctorNameObj,
url: model.appointHistoryList[index].doctorImageURL,
),
),
),
InkWell(
onTap: () =>
confirmBox(model.appointHistoryList[index], model),
child: Container(
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),
Expanded(
flex: 4,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(
height: 12,
),
Texts(model.appointHistoryList[index].projectName),
Texts(model.appointHistoryList[index].clinicName),
Texts(projectViewModel.isArabic
? 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(
TranslationBase.of(context).requestReport,
fontSize: 12,
color: Colors.white,
),
InkWell(
onTap: () => confirmBox(model.appointHistoryList[index], model),
child: Container(
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(
width: 12,
),
],
),
),
),
),
SizedBox(
width: 12,
),
],
),
);
}),
),
);
}

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

Loading…
Cancel
Save