Merge branch 'hot_fix' into 'diplomatic-quarter-live'

Hot fix

See merge request Cloud_Solution/diplomatic-quarter!191
dq_and_master
Mohammad Aljammal 4 years ago
commit 530c9e89fc

@ -323,7 +323,7 @@ const Map localizedValues = {
"reject-view": {"en": "Reject", "ar": "رفض"},
"delete-view": {"en": "Delete", "ar": "حذف"},
// "my-family": {"en": "MY FAMILY", "ar": "عائلتي"},
"approvals": {"en": "Approvals", "ar": "موفقات التأمين"},
"approvals": {"en": "Approvals", "ar": "موافقات التأمين"},
"approvalNo": {"en": "Approval No.: ", "ar": "رقم الموافقة: "},
"companyName": {"en": "Company Name ", "ar": "اسم الشركة: "},
"receiptOn": {"en": "Receipt on: ", "ar": "تاريخ الفاتورة: "},
@ -924,7 +924,7 @@ const Map localizedValues = {
"message-type": {"en": "Message Type", "ar": "نوع الرسالة"},
"compliment": {"en": "compliment", "ar": "ثناء"},
"suggestion": {"en": "Suggestion", "ar": "إقتراح"},
"your-feedback": {"en": "Your feedback was sent", "ar": "إقتراح"},
"your-feedback": {"en": "Your feedback was sent", "ar": "لقد تم ارسال اقراحك شكرا لك"},
"select-part": {
"en": "Please select the part that complain about",
"ar": "يرجى تحديد الجزء الذي تشكو منه"
@ -1187,4 +1187,24 @@ const Map localizedValues = {
"selectFileSouse": {"en": "Select file souse", "ar": "حدد الملف"},
"gallery": {"en": "Gallery", "ar": "معرض الصور"},
"camera": {"en": "Camera", "ar": "كاميرا"},
"med-report": {
"en": "Medical Reports",
"ar": "التقارير الطبية"
},
"new-med-report": {
"en": "Requests",
"ar": "الطلبات"
},
"requestReport":{
"en":"Request a report",
"ar":" طلب تقرير"
},
"confirm-msg-report": {
"en": "Request for medical report?",
"ar": "طلب تقرير طبي؟"
},
"successSendReport": {
"en": "The request has been submitted successfully",
"ar": "تم تنفيذ طلبك بنجاح"
},
};

@ -11,13 +11,14 @@ class AuthenticatedUserObject {
getUser();
}
getUser() async {
if (user == null) {
getUser({bool getUser = false}) async {
if (getUser) {
var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData);
} else if (user == null) {
var userData = await sharedPref.getObject(USER_PROFILE);
if (userData != null) user = AuthenticatedUser.fromJson(userData);
}
// var isLogin = await sharedPref.getString(LOGIN_TOKEN_ID);
this.isLogin = user != null;
}

@ -60,8 +60,8 @@ class PharmacyService extends BaseService {
projectID: 15,
);
double _latitude;
double _longitude;
double _latitude=0;
double _longitude=0;
_getCurrentLocation() async {
await Geolocator.getLastKnownPosition().then((value) {
@ -75,13 +75,13 @@ class PharmacyService extends BaseService {
Future getMedicineList({String drugName}) async {
hasError = false;
// await _getCurrentLocation();
await _getCurrentLocation();
Map<String,dynamic> body = Map();
body['PHR_itemName'] = drugName;
body['isLoginForDoctorApp'] = true;
body['isDentalAllowedBackend'] = true;
// body['Latitude'] = _latitude;
// body['Longitude'] = _longitude;
body['Latitude'] = _latitude;
body['Longitude'] = _longitude;
await baseAppClient.post(GET_PHARMCY_ITEMS,
onSuccess: (dynamic response, int statusCode) {

@ -33,7 +33,7 @@ class BaseViewModel extends ChangeNotifier {
//authenticatedUserObject.getUser();
user = authenticatedUserObject.user;
this.isLogin = authenticatedUserObject.isLogin;
_getUser();
}
_getUser() async {

@ -140,6 +140,15 @@ class LabsViewModel extends BaseViewModel {
error = _labsService.error;
setState(ViewState.Error);
} else {
bool isShouldClear = false;
if(_labsService.labOrdersResultsList.length==1)
{
labOrdersResultsList.forEach((element) {
if(element.resultValue.contains('/') ||element.resultValue.contains('*' )|| element.resultValue.isEmpty )
isShouldClear = true;
});}
if(isShouldClear)
_labsService.labOrdersResultsList.clear();
setState(ViewState.Idle);
}
}

@ -69,7 +69,7 @@ class ReportsViewModel extends BaseViewModel {
}
insertRequestForMedicalReport(AppointmentHistory appointmentHistory)async{
insertRequestForMedicalReport(AppointmentHistory appointmentHistory,String mes)async{
setState(ViewState.Busy);
await _reportsService.insertRequestForMedicalReport(appointmentHistory);
if (_reportsService.hasError) {
@ -77,7 +77,7 @@ class ReportsViewModel extends BaseViewModel {
AppToast.showErrorToast(message: error);
setState(ViewState.ErrorLocal);
} else {
AppToast.showSuccessToast(message: 'The order was send ');
AppToast.showSuccessToast(message: mes);
setState(ViewState.Idle);
}
}

@ -82,7 +82,7 @@ class _FindUsPageState extends State<FindUsPage>
//indicatorSize: TabBarIndicatorSize.label,
indicatorSize: TabBarIndicatorSize.tab,
indicatorColor: Colors.red[800],
indicatorColor: Theme.of(context).primaryColor,
labelColor: Theme.of(context).primaryColor,
labelPadding:
EdgeInsets.only(top: 4.0, left: 35.0, right: 35.0),

@ -116,9 +116,9 @@ class _HospitalsPageState extends State<HospitalsPage> {
CrossAxisAlignment.center,
children: [
IconButton(
// icon: Icon(Icons.location_on,color: Colors.red,),
icon: new Image.asset(
'assets/images/new-design/navigate.png'),
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(() {
@ -139,9 +139,9 @@ class _HospitalsPageState extends State<HospitalsPage> {
},
),
IconButton(
// icon: Icon(Icons.phone,color: Colors.red,),
icon: new Image.asset(
'assets/images/new-design/call.png'),
icon: Icon(Icons.phone,color: Theme.of(context).primaryColor,size: 35,),
// icon: new Image.asset(
// 'assets/images/new-design/call.png'),
tooltip: '',
onPressed: () {
setState(() {

@ -140,13 +140,7 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
child: Row(
children: [
IconButton(
// icon: Icon(
// Icons
// .location_on,
// color: Colors.red,
// ),
icon: new Image.asset(
'assets/images/new-design/navigate.png'),
icon: Icon(Icons.location_on,color: Theme.of(context).primaryColor,size: 35,),
tooltip: '',
onPressed: () {
setState(() {
@ -163,21 +157,15 @@ class _PharmaciesPageState extends State<PharmaciesPage> {
.findusPharmaciesModelList[
index]
.locationName);
// _volume += 10;
});
},
),
IconButton(
// icon: Icon(
// Icons.phone,
// color: Colors.red,
// ),
icon: new Image.asset(
'assets/images/new-design/call.png'),
icon: Icon(Icons.phone,color: Theme.of(context).primaryColor,size: 35,),
tooltip: 'I',
onPressed: () {
setState(() {
// _volume += 10;
launch("tel://" +
widget
.findusPharmaciesModelList[

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/LiveChat/livechat_page.dart';
import 'package:diplomaticquarterapp/pages/ContactUs/findus/findus_page.dart';
import 'package:diplomaticquarterapp/pages/feedback/feedback_home_page.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
@ -34,19 +35,16 @@ class CardCommonContact extends StatelessWidget {
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(10.0, 10.0, 10.0, 0.0),
child: Text(this.text,
overflow: TextOverflow.clip,
style: TextStyle(
color: new Color(0xFFc5272d),
letterSpacing: 1.0,
fontSize: 20.0)),
child: Texts(this.text,
// overflow: TextOverflow.clip,
color:Theme.of(context).primaryColor,
fontWeight: FontWeight.w700,
fontSize: 20.0),
),
Container(
margin: EdgeInsets.fromLTRB(10.0, 0.0, 10.0, 0.0),
child: Text(this.subText,
overflow: TextOverflow.clip,
style: TextStyle(
color: Colors.black, letterSpacing: 1.0, fontSize: 15.0)),
child: Texts(this.subText,
color: Colors.black, fontSize: 15.0),
),
Align(
alignment: projectViewModel.isArabic? Alignment.bottomLeft:Alignment.bottomRight,

@ -63,27 +63,24 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: <Widget>[
Text(
Texts(
TranslationBase.of(context).totalApproval,
style: TextStyle(
color: Color(0xff60688B),
fontSize: 19.0,
fontWeight: FontWeight.w600,
),
),
if (model.insuranceApproval.length > 0)
Container(
width: 60,
height: 35,
height: 40,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(19.0)),
child: Center(
child: Text(
child: Texts(
model.insuranceApproval[0].unUsedCount
.toString(),
style: TextStyle(
color: Colors.white, fontSize: 19.0),
color: Colors.white, fontSize: 17.0,
),
))
],
@ -138,22 +135,18 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
Padding(
padding: EdgeInsets.symmetric(
vertical: 10.0),
child: Text(
child: Texts(
model.insuranceApproval[index]
.clinicName,
style: TextStyle(
fontSize: 20.0,
color: Color(0xff60686B),
fontWeight: FontWeight.w600,
),
fontSize: 20.0,
color: Color(0xff60686B),
fontWeight: FontWeight.w600,
),
),
Text(
Texts(
model.insuranceApproval[index]
.doctorName,
style: TextStyle(
fontSize: 17.0,
fontStyle: FontStyle.italic),
fontSize: 17.0,
),
],
),
@ -166,45 +159,53 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Text(
TranslationBase.of(context)
.approvalNo +
model.insuranceApproval[index]
.approvalNo
.toString(),
style: TextStyle(
fontSize: 18.0,
fontWeight: FontWeight.w600,
),
Row(
children: [
Texts(
TranslationBase.of(context).approvalNo,
fontSize: 18.0,
),
Texts(model.insuranceApproval[index].approvalNo.toString(),
fontSize: 18.0,
fontWeight: FontWeight.w600,),
],
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
Text(
TranslationBase.of(context)
.procedureStatus +
model.insuranceApproval[index]
.approvalStatusDescption,
style: TextStyle(
Row(
children: [
Texts(
TranslationBase.of(context).procedureStatus ,
fontSize: 17.5,
),
SizedBox(width: 12,),
Texts(
model.insuranceApproval[index].approvalStatusDescption,
fontWeight: FontWeight.w600,
fontSize: 17.5),
fontSize: 17.5,
),
],
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
Text(
TranslationBase.of(context)
.unusedCount +
model.insuranceApproval[index]
.unUsedCount
.toString(),
style: TextStyle(
Row(
children: [
Texts(
TranslationBase.of(context).unusedCount,
fontSize: 17.5,
),
Texts(
model.insuranceApproval[index].unUsedCount.toString(),
fontSize: 17.5,
fontWeight: FontWeight.w600),
fontWeight: FontWeight.w600,
),
],
),
Divider(
color: Colors.black,
@ -223,13 +224,10 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
// fontSize: 17.5,
// fontWeight: FontWeight.w600),
// ),
Text(
TranslationBase.of(context)
.companyName,
style: TextStyle(
Texts(
TranslationBase.of(context).companyName,
fontWeight: FontWeight.w600,
fontSize: 17.5,
),
),
Divider(
@ -237,32 +235,42 @@ class _InsuranceApprovalState extends State<InsuranceApproval> {
height: 25.0,
thickness: 1.0,
),
Text(
TranslationBase.of(context)
.receiptOn +
convertDateFormat(model
.insuranceApproval[index]
.rceiptOn),
style: TextStyle(
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
Row(
children: [
Texts(
TranslationBase.of(context).receiptOn ,
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
Texts(
convertDateFormat(model.insuranceApproval[index].rceiptOn),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
),
Divider(
color: Colors.black,
height: 25.0,
thickness: 1.0,
),
Text(
TranslationBase.of(context)
.expiryDate +
convertDateFormat(model
.insuranceApproval[index]
.expiryDate),
style: TextStyle(
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
Row(
children: [
Texts(
TranslationBase.of(context).expiryDate,
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
Texts(
convertDateFormat(model.insuranceApproval[index].expiryDate),
fontSize: 17.5,
fontWeight: FontWeight.w600,
),
],
),
Divider(
color: Colors.black,

@ -101,6 +101,7 @@ class _InsuranceCardState extends State<InsuranceCard> {
TranslationBase.of(context).companyName +
model.insurance[index].companyName,
fontSize: 20.0,
fontWeight: FontWeight.w700,
),
Divider(
color: Colors.black,
@ -111,52 +112,58 @@ class _InsuranceCardState extends State<InsuranceCard> {
crossAxisAlignment:
CrossAxisAlignment.stretch,
children: <Widget>[
Text(
TranslationBase.of(context).category +
Texts(
TranslationBase.of(context).category +": "+
model.insurance[index]
.subCategoryDesc,
style: TextStyle(fontSize: 18.5),
fontSize: 18.5,
),
Text(
TranslationBase.of(context)
.expirationDate +
convertDateFormat(model
.insurance[index].cardValidTo),
style: TextStyle(fontSize: 18.5),
Row(
children: [
Texts(
TranslationBase.of(context)
.expirationDate +": "+
convertDateFormat(model
.insurance[index].cardValidTo),
fontSize: 18.5,
),
Expanded(
child: Column(
children: <Widget>[
model.insurance[index].isActive == true
? Texts(
TranslationBase.of(context)
.activeInsurence,
color: Colors.green,
fontWeight: FontWeight.w900,
fontSize: 17.9)
: Texts(
TranslationBase.of(context)
.notActive,
color: Colors.red,
fontWeight: FontWeight.w900,
fontSize: 17.9)
],
),
),
],
),
Text(
Texts(
TranslationBase.of(context)
.patientCard +
.patientCard +": "+
model
.insurance[index].patientCardID,
style: TextStyle(fontSize: 18.5),
fontSize: 18.5,
),
Text(
Texts(
TranslationBase.of(context)
.policyNumber +
.policyNumber +" "+
model.insurance[index]
.insurancePolicyNumber,
style: TextStyle(fontSize: 18.5),
fontSize: 18.5,
),
],
),
Column(
children: <Widget>[
model.insurance[index].isActive == true
? Texts(
TranslationBase.of(context)
.activeInsurence,
color: Colors.green,
fontWeight: FontWeight.w900,
fontSize: 17.9)
: Texts(
TranslationBase.of(context)
.notActive,
color: Colors.red,
fontWeight: FontWeight.w900,
fontSize: 17.9)
],
),
SizedBox(
height: 14.5,
),

@ -102,19 +102,12 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
controller: _tabController,
children: <Widget>[
Container(
child: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList !=
null
child: model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList.isNotEmpty
? ListView.builder(
itemCount: model.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList.length,
itemBuilder: (BuildContext context, int index) {
return model
.getAllSharedRecordsByStatusResponse
.getAllSharedRecordsByStatusList[
index]
.status ==
3
return model.getAllSharedRecordsByStatusResponse.getAllSharedRecordsByStatusList[index].status == 3
? Container(
margin: EdgeInsets.all(10.0),
child: Card(
@ -213,7 +206,90 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
)
: Container();
})
: Container(),
: Container(
height: 80,
margin: EdgeInsets.all(10.0),
child: Column(
children: [
SizedBox(height: 65,),
Container(
color: Colors.white,
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.all(10.0),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
mainAxisSize: MainAxisSize.max,
children: <Widget>[
Expanded(
flex: 3,
child: Container(
margin: EdgeInsets.only(
top: 2.0,
left: 10.0,
right: 20.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment
.start,
children: <Widget>[
Texts(
model.user.firstName+" "+model.user.lastName,
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
),
SizedBox(
height: 8,
),
Texts(
TranslationBase.of(
context)
.fileno +
": " +
model.user.patientID.toString(),
fontSize: 14,
color: Colors.black,
fontWeight:
FontWeight.w500,
)
],
),
),
),
if (false)
Expanded(
flex: 2,
child: Container(
margin:
EdgeInsets.only(top: 2.0),
child: Column(
children: <Widget>[
Container(
child: SecondaryButton(
label: TranslationBase
.of(context)
.fetchData,
small: true,
textColor:
Colors.white,
onTap: () {
getDetails(
model);
},
),
),
],
),
),
)
],
),
),
],
),
),
),
Container(
child: ListView.builder(

@ -240,20 +240,20 @@ class _Login extends State<Login> {
request['PatientID'] = int.parse(nationalIDorFile.text);
}
// request.isRegister = false;
this.authService.checkActivationCode(request, code).then((result) => {
sharedPref.remove(FAMILY_FILE),
result = CheckActivationCode.fromJson(result),
result.list.isFamily = false,
this.authService.checkActivationCode(request, code).then((result) async{
sharedPref.remove(FAMILY_FILE);
result = CheckActivationCode.fromJson(result);
result.list.isFamily = false;
// this.sharedPref.setString(BLOOD_TYPE, result['PatientBloodType']),
this.sharedPref.setObject(USER_PROFILE, result.list),
this.sharedPref.setObject(MAIN_USER, result.list),
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID),
this.sharedPref.setString(TOKEN, result.authenticationTokenID),
authenticatedUserObject.getUser(),
// authenticatedUserObject.user = AuthenticatedUser.fromJson(result.list),
authenticatedUserObject.isLogin = true,
appointmentRateViewModel.isLogin = true,
projectViewModel.isLogin = true,
this.sharedPref.setObject(USER_PROFILE, result.list);
this.sharedPref.setObject(MAIN_USER, result.list);
this.sharedPref.setObject(LOGIN_TOKEN_ID, result.logInTokenID);
this.sharedPref.setString(TOKEN, result.authenticationTokenID);
await authenticatedUserObject.getUser(getUser: true);
authenticatedUserObject.isLogin = true;
appointmentRateViewModel.isLogin = true;
projectViewModel.isLogin = true;
projectViewModel.user = authenticatedUserObject.user;
appointmentRateViewModel
.getIsLastAppointmentRatedList()
.then((value) => {
@ -281,8 +281,8 @@ class _Login extends State<Login> {
.catchError((err) {
print(err);
GifLoaderDialogUtils.hideDialog(context);
}),
// SMSOTP.showLoadingDialog(context, false),
});
});
}

@ -56,7 +56,7 @@ class _HomeReportPageState extends State<HomeReportPage>
onModelReady: (model) => model.getReports(), //model.getPrescriptions(),
builder: (_, model, widget) => AppScaffold(
isShowAppBar: true,
appBarTitle: TranslationBase.of(context).monthReport,
appBarTitle: TranslationBase.of(context).newMedReport,
description: TranslationBase.of(context).infoMonthReport,
baseViewModel: model,
imagesInfo: imagesInfo,
@ -103,30 +103,29 @@ class _HomeReportPageState extends State<HomeReportPage>
unselectedLabelColor: Colors.grey[800],
tabs: [
Container(
width: MediaQuery.of(context).size.width * 0.22,
width: MediaQuery.of(context).size.width * 0.15,
child: Center(
child:
Texts(TranslationBase.of(context).requested),
child: Texts(TranslationBase.of(context).requested,fontSize: 12,),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.22,
width: MediaQuery.of(context).size.width * 0.15,
child: Center(
child: Texts(TranslationBase.of(context).ready),
child: Texts(TranslationBase.of(context).ready,fontSize: 12,),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.22,
width: MediaQuery.of(context).size.width * 0.15,
child: Center(
child:
Texts(TranslationBase.of(context).completed),
Texts(TranslationBase.of(context).completed,fontSize: 11,),
),
),
Container(
width: MediaQuery.of(context).size.width * 0.22,
width: MediaQuery.of(context).size.width * 0.15,
child: Center(
child:
Texts(TranslationBase.of(context).cancelled),
Texts(TranslationBase.of(context).cancelled,fontSize: 12,),
),
),
],

@ -1,34 +1,36 @@
import 'package:diplomaticquarterapp/core/viewModels/medical/reports_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
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/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';
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),
onOkSelected: (model) => reportsViewModel.insertRequestForMedicalReport(model,TranslationBase.of(context).successSendReport),
),
);
}
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<ReportsViewModel>(
onModelReady: (model) => model.getPatentAppointmentHistory(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
isShowAppBar: true,
appBarTitle: 'Medical Reports',
appBarTitle: TranslationBase.of(context).medReport,
body: ListView.builder(
itemCount: model.appointHistoryList.length,
itemBuilder: (context, index) => Padding(
@ -69,8 +71,7 @@ class MedicalReports extends StatelessWidget {
),
Texts(model.appointHistoryList[index].projectName),
Texts(model.appointHistoryList[index].clinicName),
Texts(DateUtil.getMonthDayYearDateFormatted(
model.appointHistoryList[index].appointmentDate)),
Texts(projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.appointHistoryList[index].appointmentDate):DateUtil.getMonthDayYearDateFormatted(model.appointHistoryList[index].appointmentDate)),
StarRating(
totalAverage: model
.appointHistoryList[index].actualDoctorRate
@ -89,7 +90,7 @@ class MedicalReports extends StatelessWidget {
onTap: () =>
confirmBox(model.appointHistoryList[index], model),
child: Container(
width: 80,
width: 85,
height: 50,
decoration: BoxDecoration(
color: Colors.black54,
@ -102,7 +103,7 @@ class MedicalReports extends StatelessWidget {
),
child: Center(
child: Texts(
'Request',
TranslationBase.of(context).requestReport,
fontSize: 12,
color: Colors.white,
),
@ -137,13 +138,13 @@ class _ConfirmDialogState extends State<ConfirmDialog> {
@override
Widget build(BuildContext context) {
return SimpleDialog(
title: Text('Confirm'),
title: Texts(TranslationBase.of(context).confirm),
children: <Widget>[
Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Texts('Request a medical report'),
Texts(TranslationBase.of(context).confirmMsgReport),
SizedBox(
height: 5.0,
),
@ -166,7 +167,7 @@ class _ConfirmDialogState extends State<ConfirmDialog> {
child: Container(
child: Center(
child: Texts(
'cancel',
TranslationBase.of(context).cancel,
color: Colors.red,
),
),
@ -190,7 +191,7 @@ class _ConfirmDialogState extends State<ConfirmDialog> {
padding: const EdgeInsets.all(8.0),
child: Center(
child: Texts(
'ok',
TranslationBase.of(context).ok,
fontWeight: FontWeight.w400,
),
),

@ -10,10 +10,12 @@ class LineChartCurved extends StatelessWidget {
LineChartCurved({this.title, this.timeSeries, this.indexes});
List<int> xAxixs = List();
List<double> yAxixs = List();
@override
Widget build(BuildContext context) {
getXaxix();
getYaxix();
return AspectRatio(
aspectRatio: 1.1,
child: Container(
@ -66,6 +68,15 @@ class LineChartCurved extends StatelessWidget {
}
}
}
getYaxix() {
int indexess= (timeSeries.length*0.30).toInt();
for (int index = 0; index < timeSeries.length; index++) {
int mIndex = indexess * index;
if (mIndex < timeSeries.length) {
yAxixs.add(timeSeries[mIndex].sales);
}
}
}
LineChartData sampleData1(context) {
return LineChartData(
@ -86,22 +97,22 @@ class LineChartCurved extends StatelessWidget {
color: Colors.black,
fontSize: 10,
),
rotateAngle:-65,
//rotateAngle:-65,
//rotateAngle:-65,
margin: 14,
margin: 22,
getTitles: (value) {
if (timeSeries.length < 8) {
if (timeSeries.length < 15) {
if (timeSeries.length > value.toInt()) {
return '${timeSeries[value.toInt()].time.day}/ ${timeSeries[value.toInt()].time.year}';
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
} else
return '';
} else {
if (value.toInt() == 0)
return '${timeSeries[value.toInt()].time.day}/ ${timeSeries[value.toInt()].time.year}';
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (value.toInt() == timeSeries.length - 1)
return '${timeSeries[value.toInt()].time.day}/ ${timeSeries[value.toInt()].time.year}';
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
if (xAxixs.contains(value.toInt())) {
return '${timeSeries[value.toInt()].time.day}/ ${timeSeries[value.toInt()].time.year}';
return '${timeSeries[value.toInt()].time.month}/ ${timeSeries[value.toInt()].time.year}';
}
}
return '';
@ -112,9 +123,21 @@ class LineChartCurved extends StatelessWidget {
getTextStyles: (value) => const TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
fontSize: 11,
fontSize: 10,
),
getTitles: (value) {
// if (timeSeries.length < 10) {
// return '${value.toInt()}';
// } else {
// if (value == getMinY())
// return '${value.toInt()}';
// if (value == getMaxY())
// return '${value.toInt()}';
// if (yAxixs.contains(value)) {
// return '${value.toInt()}';
// }
// return '';
// }
return '${value.toInt()}';
},
margin: 12,
@ -140,7 +163,7 @@ class LineChartCurved extends StatelessWidget {
),
minX: 0,
maxX: (timeSeries.length - 1).toDouble(),
maxY: getMaxY(),
maxY: getMaxY()+0.3,
minY: getMinY(),
lineBarsData: getData(context),
);
@ -153,7 +176,7 @@ class LineChartCurved extends StatelessWidget {
if (resultValueDouble > max) max = resultValueDouble;
});
return max.roundToDouble() + 10;
return max.roundToDouble() ;
}
double getMinY() {

@ -32,7 +32,7 @@ class VitalSingChartAndDetials extends StatelessWidget {
children: <Widget>[
AppExpandableNotifier(
isExpand: true,
headerWidget: LineChartCurved(title: name,timeSeries:timeSeriesData,indexes: timeSeriesData.length~/3.5,),
headerWidget: LineChartCurved(title: name,timeSeries:timeSeriesData,indexes: timeSeriesData.length~/5.5,),
bodyWidget: VitalSignDetailsWidget(
vitalList: vitalList,
title1: title1,

@ -64,7 +64,7 @@ class AppToast {
FlutterFlexibleToast.showToast(
message: message,
toastLength: toastLength,
timeInSeconds: timeInSeconds,
timeInSeconds: timeInSeconds=2,
fontSize: fontSize,
toastGravity: toastGravity,
backgroundColor: Colors.green,
@ -87,7 +87,7 @@ class AppToast {
static void showErrorToast({
@required String message,
Toast toastLength = Toast.LENGTH_LONG,
int timeInSeconds,
int timeInSeconds=2,
double fontSize = 16,
ToastGravity toastGravity = ToastGravity.TOP,
Color textColor = Colors.white,

@ -1047,6 +1047,11 @@ class TranslationBase {
localizedValues['appo-reminder-select-option-120'][locale.languageCode];
String get gallery => localizedValues['gallery'][locale.languageCode];
String get camera => localizedValues['camera'][locale.languageCode];
String get medReport => localizedValues['med-report'][locale.languageCode];
String get newMedReport => localizedValues['new-med-report'][locale.languageCode];
String get requestReport => localizedValues['requestReport'][locale.languageCode];
String get confirmMsgReport => localizedValues['confirm-msg-report'][locale.languageCode];
String get successSendReport => localizedValues['successSendReport'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,7 +1,9 @@
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/services/permission/permission_service.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:provider/provider.dart';
/// Button widget
/// [label] button label
@ -80,6 +82,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return (GestureDetector(
onTapDown: (TapDownDetails tap) {
_animationController.reverse(from: 1.0);
@ -144,7 +147,7 @@ class _ButtonState extends State<Button> with TickerProviderStateMixin {
color: Colors.white,
fontSize: 17.0,
fontWeight: FontWeight.w700,
fontFamily: "WorkSans")),
fontFamily: projectViewModel.isArabic ? 'Cairo' : 'WorkSans')),
)
],
),

@ -144,7 +144,7 @@ class LabResultWidget extends StatelessWidget {
color: Colors.white,
child: Center(
child: Texts(
lab.resultValue,
lab.resultValue+" "+lab.uOM,
textAlign: TextAlign.center,
),
),

@ -20,7 +20,6 @@ class LabResultChartAndDetails extends StatelessWidget {
final List<LabOrderResult> labResult;
final String name;
List<TimeSeriesSales> _timeSeriesData = [];
@override
Widget build(BuildContext context) {
@ -40,36 +39,4 @@ class LabResultChartAndDetails extends StatelessWidget {
);
}
generateData() {
if (labResult.length > 0) {
int x =0;
labResult.forEach(
(element) {
try {
var resultValueDouble =double.parse(element.resultValue);
var resultValueInt = resultValueDouble.toInt();
_timeSeriesData.add(
TimeSeriesSales(
DateUtil.convertStringToDate(element.verifiedOnDateTime),
resultValueInt,
),
);
} catch (e) {
print(e);
}
},
);
}
return [
new charts.Series<TimeSeriesSales, DateTime>(
id: 'Sales',
colorFn: (_, __) => charts.MaterialPalette.red.shadeDefault,
domainFn: (TimeSeriesSales sales, _) => sales.time,
measureFn: (TimeSeriesSales sales, _) => sales.sales,
data: _timeSeriesData,
)
];
}
}

@ -57,7 +57,6 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Container(
margin: EdgeInsets.all(8),
child: Row(
@ -84,7 +83,7 @@ class _LaboratoryResultWidgetState extends State<LaboratoryResultWidget> {
),
InkWell(
onTap: (){
showConfirmMessage(context,widget.onTap,projectViewModel.user.emailAddress);
showConfirmMessage(context,widget.onTap,model.user.emailAddress);
},
child: Container(
margin: EdgeInsets.only(left: 5, right: 5),

@ -52,14 +52,9 @@ class _MedicineItemWidgetState extends State<MedicineItemWidget> {
SizedBox(width: 10,),
Expanded(
child: Center(
child: Padding(
padding: EdgeInsets.all(2.5),
child: Align(
alignment: Alignment.centerLeft,
child: Texts(
widget.label,
),
),
child: Texts(
widget.label,
fontSize: 13,
),
),
)

Loading…
Cancel
Save