Merge branch 'diplomatic-quarter-live' of https://gitlab.com/Cloud_Solution/diplomatic-quarter into sultan

dq_and_master
Sultan Khan 4 years ago
commit 3aa592e2b0

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

@ -913,7 +913,7 @@ const Map localizedValues = {
"en": "Please enter the subject",
"ar": "يرجى ادخال الموضوع"
},
"empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الموضوع"},
"empty-message": {"en": "Please enter message", "ar": "يرجى ادخال الرسالة"},
"select-attachment": {"en": "Select Attachment", "ar": "إختر المرفق"},
"complain-appo": {"en": "Complaint for appointment", "ar": "شكوى على موعد"},
"complain-without-appo": {
@ -1161,5 +1161,9 @@ const Map localizedValues = {
"en": "No data available",
"ar": " لا يوجد بيانات متاحة "
},
"thename": {"en": "The Name", "ar": "الاسم"}
"thename": {"en": "The Name", "ar": "الاسم"},
"noSearchResult": {"en": "No Search Result", "ar": "لا توجد نتيجة بحث"},
"selectFileSouse": {"en": "Select file souse", "ar": "حدد الملف"},
"gallery": {"en": "Gallery", "ar": "معرض الصور"},
"camera": {"en": "Camera", "ar": "كاميرا"},
};

@ -21,59 +21,8 @@ class FeedbackViewModel extends BaseViewModel {
FeedbackService _feedbackService = locator<FeedbackService>();
List<COCItem> get cOCItemList => _feedbackService.cOCItemList;
MessageType messageType = MessageType.NON;
MessageType messageTypeDialog = MessageType.NON;
String getSelected(BuildContext context) {
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
return TranslationBase.of(context).complainAppo;
break;
case MessageType.ComplaintWithoutAppointment:
return TranslationBase.of(context).complainWithoutAppo;
break;
case MessageType.Question:
return TranslationBase.of(context).question;
break;
case MessageType.Compliment:
return TranslationBase.of(context).compliment;
break;
case MessageType.Suggestion:
return TranslationBase.of(context).suggestion;
break;
case MessageType.NON:
return TranslationBase.of(context).notClassified;
break;
}
return TranslationBase.of(context).notClassified;
}
setMessageDialogType(MessageType messageType) {
messageTypeDialog = messageType;
notifyListeners();
}
setMessageType(MessageType messageType) {
this.messageType = messageType;
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
break;
case MessageType.ComplaintWithoutAppointment:
break;
case MessageType.Question:
break;
case MessageType.Compliment:
break;
case MessageType.Suggestion:
break;
case MessageType.NON:
break;
}
notifyListeners();
}
List<AppointmentHistory> get appointHistoryList =>
_feedbackService.appointHistoryList;
@ -93,11 +42,9 @@ class FeedbackViewModel extends BaseViewModel {
if (_feedbackService.hasError) {
error = _feedbackService.error;
setState(ViewState.ErrorLocal);
setMessageType(MessageType.NON);
return false;
} else {
setState(ViewState.Idle);
setMessageType(MessageType.NON);
return true;
}
}

@ -3,6 +3,7 @@ import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_mode
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
@ -31,6 +32,41 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
bool isShowListAppointHistory = true;
String message;
final formKey = GlobalKey<FormState>();
MessageType messageType = MessageType.NON;
String getSelected(BuildContext context) {
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
return TranslationBase.of(context).complainAppo;
break;
case MessageType.ComplaintWithoutAppointment:
return TranslationBase.of(context).complainWithoutAppo;
break;
case MessageType.Question:
return TranslationBase.of(context).question;
break;
case MessageType.Compliment:
return TranslationBase.of(context).compliment;
break;
case MessageType.Suggestion:
return TranslationBase.of(context).suggestion;
break;
case MessageType.NON:
return TranslationBase.of(context).notClassified;
break;
}
return TranslationBase.of(context).notClassified;
}
setMessageType(MessageType messageType) {
setState(() {
this.messageType = messageType;
});
}
@override
Widget build(BuildContext context) {
@ -55,7 +91,6 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
child: Texts(
TranslationBase.of(context).likeToHear,
textAlign: TextAlign.center,
variant: 'body2Link',
),
),
InkWell(
@ -75,9 +110,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
Container(
child: Texts(
model.getSelected(context),
getSelected(context),
variant: 'bodyText',
),
margin: EdgeInsets.only(left: 10,right: 10),
@ -91,7 +125,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
),
),
),
if (appointHistory != null && model.messageType ==
if (appointHistory != null && messageType ==
MessageType.ComplaintOnAnAppointment)
InkWell(
onTap: () {
@ -167,12 +201,10 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
),
),
),
if (model.messageType ==
MessageType.ComplaintOnAnAppointment &&
model.appointHistoryList.length != 0 &&
if (messageType == MessageType.ComplaintOnAnAppointment && model.appointHistoryList.length != 0 &&
isShowListAppointHistory)
Container(
height: MediaQuery.of(context).size.height * 0.4,
height: model.appointHistoryList.length>2?MediaQuery.of(context).size.height * 0.25:MediaQuery.of(context).size.height * 0.15,
child: ListView.builder(
itemCount: model.appointHistoryList.length,
itemBuilder: (context, index) => InkWell(
@ -285,7 +317,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
hintColor: Colors.black,
fontWeight: FontWeight.w600,
validator: (value) {
if (value == null)
if (value.isEmpty)
return TranslationBase.of(context).emptySubject;
else
return null;
@ -303,7 +335,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
minLines: 13,
controller: messageController,
validator: (value) {
if (value == null)
if (value.isEmpty)
return TranslationBase.of(context).emptyMessage;
else
return null;
@ -376,7 +408,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
),
)),
SizedBox(
height: 30,
height: 45,
),
],
),
@ -396,14 +428,14 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
loading: model.state == ViewState.BusyLocal,
onTap: () {
final form = formKey.currentState;
if (form.validate()) if (model.messageType != MessageType.NON)
if (form.validate()) if (messageType != MessageType.NON)
model
.sendCOCItem(
title: titleController.text,
attachment: images.length > 0 ? images[0] : "",
details: messageController.text,
cOCTypeName: getCOCName(model),
appointHistory: model.messageType ==
cOCTypeName: getCOCName(),
appointHistory:messageType ==
MessageType.ComplaintOnAnAppointment
? appointHistory
: null)
@ -414,7 +446,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
messageController.text = "";
images = [];
});
model.setMessageType(MessageType.NON);
setMessageType(MessageType.NON);
AppToast.showSuccessToast(
message: TranslationBase.of(context).yourFeedback);
} else {
@ -433,8 +465,8 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
);
}
String getCOCName(FeedbackViewModel model) {
switch (model.messageType) {
String getCOCName() {
switch (messageType) {
case MessageType.ComplaintOnAnAppointment:
return "1";
break;
@ -462,15 +494,18 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
showDialog(
context: context,
child: FeedbackTypeDialog(
messageTypeDialog: messageType,
onValueSelected: (MessageType value) {
if (value == MessageType.ComplaintOnAnAppointment) {
GifLoaderDialogUtils.showMyDialog(context);
model.getPatentAppointmentHistory().then((value) {
GifLoaderDialogUtils.hideDialog(context);
setState(() {
appointHistory = null;
});
});
}
model.setMessageType(value);
setMessageType(value);
},
));
}
@ -478,14 +513,30 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
class FeedbackTypeDialog extends StatefulWidget {
final Function(MessageType) onValueSelected;
final MessageType messageTypeDialog;
const FeedbackTypeDialog({Key key, this.onValueSelected}) : super(key: key);
const FeedbackTypeDialog({Key key, this.onValueSelected, this.messageTypeDialog=MessageType.NON}) : super(key: key);
@override
State createState() => new FeedbackTypeDialogState();
}
class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
MessageType messageTypeDialog = MessageType.NON;
setMessageDialogType(MessageType messageType) {
setState(() {
messageTypeDialog = messageType;
});
}
@override
void initState() {
messageTypeDialog = widget.messageTypeDialog;
super.initState();
}
Widget build(BuildContext context) {
return BaseView<FeedbackViewModel>(
builder: (_, model, widge) => SimpleDialog(
@ -507,16 +558,16 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded(
flex: 1,
child: InkWell(
onTap: () => model.setMessageDialogType(
onTap: () => setMessageDialogType(
MessageType.ComplaintOnAnAppointment),
child: ListTile(
title: Texts(TranslationBase.of(context).complainAppo),
leading: Radio(
value: MessageType.ComplaintOnAnAppointment,
groupValue: model.messageTypeDialog,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
model.setMessageDialogType(value),
setMessageDialogType(value),
),
),
),
@ -531,16 +582,16 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
Expanded(
flex: 1,
child: InkWell(
onTap: () => model.setMessageDialogType(
onTap: () => setMessageDialogType(
MessageType.ComplaintWithoutAppointment),
child: ListTile(
title: Texts(TranslationBase.of(context).complainWithoutAppo),
leading: Radio(
value: MessageType.ComplaintWithoutAppointment,
groupValue: model.messageTypeDialog,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
model.setMessageDialogType(value),
setMessageDialogType(value),
),
),
),
@ -556,15 +607,15 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
flex: 1,
child: InkWell(
onTap: () =>
model.setMessageDialogType(MessageType.Question),
setMessageDialogType(MessageType.Question),
child: ListTile(
title: Texts(TranslationBase.of(context).question),
leading: Radio(
value: MessageType.Question,
groupValue: model.messageTypeDialog,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
model.setMessageDialogType(value),
setMessageDialogType(value),
),
),
),
@ -580,15 +631,15 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
flex: 1,
child: InkWell(
onTap: () =>
model.setMessageDialogType(MessageType.Compliment),
setMessageDialogType(MessageType.Compliment),
child: ListTile(
title: Texts(TranslationBase.of(context).compliment),
leading: Radio(
value: MessageType.Compliment,
groupValue: model.messageTypeDialog,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
model.setMessageDialogType(value),
setMessageDialogType(value),
),
),
),
@ -604,15 +655,14 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
flex: 1,
child: InkWell(
onTap: () =>
model.setMessageDialogType(MessageType.Suggestion),
setMessageDialogType(MessageType.Suggestion),
child: ListTile(
title: Texts(TranslationBase.of(context).suggestion),
leading: Radio(
value: MessageType.Suggestion,
groupValue: model.messageTypeDialog,
groupValue: messageTypeDialog,
activeColor: Theme.of(context).primaryColor,
onChanged: (MessageType value) =>
model.setMessageDialogType(value),
onChanged: (MessageType value) => setMessageDialogType(value),
),
),
),
@ -660,7 +710,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
flex: 1,
child: InkWell(
onTap: () {
widget.onValueSelected(model.messageTypeDialog);
widget.onValueSelected(messageTypeDialog);
Navigator.pop(context);
},
child: Padding(

@ -14,7 +14,6 @@ class StatusFeedbackPage extends StatefulWidget {
}
class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
@override
Widget build(BuildContext context) {
return BaseView<FeedbackViewModel>(
@ -23,64 +22,85 @@ class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
isShowDecPage: false,
body: Container(
margin: EdgeInsets.only(top: 8.0,left: 8.0,right: 8.0 ),
padding: EdgeInsets.all(15.0),
child: ListView.builder(
itemCount: model.cOCItemList.length,
itemBuilder: (context, 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,
),
margin: EdgeInsets.all(4),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(height: 8,),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].cOCTitle}'),
Texts(
TranslationBase.of(context).number + ' : ${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],
),
body: model.cOCItemList.isNotEmpty
? Container(
margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0),
padding: EdgeInsets.all(15.0),
child: ListView.builder(
itemCount: model.cOCItemList.length,
itemBuilder: (context, 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,
),
Expanded(
margin: EdgeInsets.all(4),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].status}'),
Texts(
'${model.cOCItemList[index].date}',
variant: 'overline',
SizedBox(
height: 8,
),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
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,color: Colors.grey[500],)
)),
)
: 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,),
Texts(TranslationBase.of(context).noSearchResult),
],
),
),
)),
),
),
),
);
}

@ -82,8 +82,7 @@ class _HomePageState extends State<HomePage> {
left: 5,
right: 5,
child: Container(
width:
MediaQuery.of(context).size.width * 0.8,
width: MediaQuery.of(context).size.width * 0.8,
child: Container(),
),
)
@ -91,7 +90,7 @@ class _HomePageState extends State<HomePage> {
),
),
Container(width: double.infinity, height:projectViewModel.isArabic ? 120:110),
Container(width: double.infinity, height:projectViewModel.isArabic ? MediaQuery.of(context).size.width * 0.3 :110),
],
),
Positioned(
@ -187,7 +186,7 @@ class _HomePageState extends State<HomePage> {
)
: Container(
width: double.infinity,
height: projectViewModel.isArabic ? 180 : 160,
// height: projectViewModel.isArabic ? 180 : 160,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
shape: BoxShape.rectangle,
@ -267,8 +266,7 @@ class _HomePageState extends State<HomePage> {
),
child: Center(
child: Texts(
TranslationBase.of(context)
.viewMore,
TranslationBase.of(context).myMedicalFile,
color: Theme.of(context)
.primaryColor,
fontSize: 12,
@ -694,7 +692,7 @@ class _HomePageState extends State<HomePage> {
],
),
),
height: 106,
height: 112,
imageName: 'ask_doctor_bg.png',
//color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
@ -735,7 +733,7 @@ class _HomePageState extends State<HomePage> {
],
),
),
height: 106,
height: 112,
imageName: 'rectangle.png',
color: Colors.grey[700],
width: MediaQuery.of(context).size.width * 0.45,
@ -744,7 +742,7 @@ class _HomePageState extends State<HomePage> {
),
),
SizedBox(
height: 120,
height: 130,
)
],
),

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/labs_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -10,6 +11,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'laboratory_result_page.dart';
@ -18,6 +20,7 @@ class LabsHomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-lab/ar/0.png'));
return BaseView<LabsViewModel>(
onModelReady: (model) => model.getLabs(),
@ -91,10 +94,10 @@ class LabsHomePage extends StatelessWidget {
),
),isInOutPatient: labOrder.isInOutPatient,
name: labOrder.doctorName,
billNo: ' ${labOrder.invoiceNo}',
profileUrl: labOrder.doctorImageURL,
subName: TranslationBase.of(context).billNo+' ${labOrder.invoiceNo}',
date: DateUtil.getMonthDayYearDateFormatted(
labOrder.orderDate),
subName: labOrder.projectName,
date: projectViewModel.isArabic?DateUtil.getMonthDayYearDateFormattedAr(labOrder.orderDate):DateUtil.getMonthDayYearDateFormatted(labOrder.orderDate),
);
}).toList(),
),

@ -33,9 +33,17 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
SizedBox(
height: 5,
),
Texts(TranslationBase.of(context).orderStatus +' : ${prescriptionsOrder.descriptionN}'),
Container(
width: double.infinity,
decoration: BoxDecoration(
color: prescriptionsOrder.status==3 ?Colors.red:prescriptionsOrder.status==2? Colors.green: Colors.grey,
borderRadius: BorderRadius.circular(5)),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Texts(TranslationBase.of(context).orderStatus +' : ${prescriptionsOrder.descriptionN}',color: Colors.white,),
)),
SizedBox(
height: 5,
height: 15,
),
Table(
border: TableBorder.symmetric(
@ -60,17 +68,17 @@ class PrescriptionsHistoryDetailsPage extends StatelessWidget {
]),
TableRow(children: [
Container(
height: 50,
height: 70,
color: Colors.white,
child: Center(
child: Texts('${prescriptionsOrder.iD}'),
),
),
Container(
height: 50,
height: 70,
color: Colors.white,
child: Center(
child: Texts('${prescriptionsOrder.createdOn}'),
child: Texts('${prescriptionsOrder.createdOn.year}-${prescriptionsOrder.createdOn.day}-${prescriptionsOrder.createdOn.day} ${prescriptionsOrder.createdOn.hour}:${prescriptionsOrder.createdOn.minute}'),
),
),
])

@ -1,4 +1,5 @@
import 'package:diplomaticquarterapp/core/viewModels/medical/prescriptions_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/medical/prescriptions/prescriptions_history_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
@ -7,6 +8,7 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class PrescriptionsHistoryPage extends StatelessWidget {
final PrescriptionsViewModel prescriptionsViewModel;
@ -15,6 +17,8 @@ class PrescriptionsHistoryPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return AppScaffold(
baseViewModel: prescriptionsViewModel,
body: ListView.builder(
@ -41,9 +45,7 @@ class PrescriptionsHistoryPage extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Texts(
DateUtil.getDayMonthYearHourMinuteDateFormatted(
prescriptionsViewModel
.prescriptionsHistory[index].createdOn),
DateUtil.getDayMonthYearHourMinuteDateFormatted(prescriptionsViewModel.prescriptionsHistory[index].createdOn),
fontWeight: FontWeight.w300,
),
SizedBox(

@ -33,7 +33,7 @@ class RadiologyDetailsPage extends StatelessWidget {
mainAxisSize: MainAxisSize.max,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Text(
Texts(
'${finalRadiology.reportData}',
textAlign: TextAlign.center,
),

@ -1,6 +1,7 @@
import 'package:diplomaticquarterapp/core/enum/filter_type.dart';
import 'package:diplomaticquarterapp/core/model/ImagesInfo.dart';
import 'package:diplomaticquarterapp/core/viewModels/medical/radiology_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/pages/medical/radiology/radiology_details_page.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
@ -11,11 +12,13 @@ import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class RadiologyHomePage extends StatelessWidget {
List<ImagesInfo> imagesInfo = List();
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/en/0.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/ar/0.png'));
imagesInfo.add(ImagesInfo(imageEn: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/en/1.png',imageAr: 'https://hmgwebservices.com/Images/MobileApp/imges-info/my-radiology/ar/1.png'));
return BaseView<RadiologyViewModel>(
@ -93,9 +96,9 @@ class RadiologyHomePage extends StatelessWidget {
isInOutPatient: radiology.isInOutPatient,
name: radiology.doctorName,
profileUrl: radiology.doctorImageURL,
subName: '${radiology.projectName} \n${TranslationBase.of(context).billNo} ${radiology.invoiceNo}',
date: DateUtil.getMonthDayYearDateFormatted(
radiology.orderDate),
billNo: '${radiology.invoiceNo}',
subName: '${radiology.projectName}',
date: projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(radiology.orderDate):DateUtil.getMonthDayYearDateFormatted(radiology.orderDate),
),
);
}).toList(),

@ -146,7 +146,7 @@ class _RateAppointmentClinicState extends State<RateAppointmentClinic> {
child: Container(
key: ValueKey<int>(rating),
child: IconButton(
iconSize: 55.0,
iconSize: 45.0,
onPressed: () {
setState(() {
rating = index + 1;

@ -138,7 +138,7 @@ class _RateAppointmentDoctorState extends State<RateAppointmentDoctor> {
child: Container(
key: ValueKey<int>(rating),
child: IconButton(
iconSize: 55.0,
iconSize: 45.0,
onPressed: () {
setState(() {
rating = index + 1;

@ -253,6 +253,18 @@ class DateUtil {
else
return "";
}
/// get data formatted like Apr 26,2020
/// [dateTime] convert DateTime to data formatted Arabic
static String getMonthDayYearDateFormattedAr(DateTime dateTime) {
if (dateTime != null)
return getMonthArabic(dateTime.month) +
" " +
dateTime.day.toString() +
", " +
dateTime.year.toString();
else
return "";
}
/// get data formatted like Thursday, Apr 26,2020
/// [dateTime] convert DateTime to date formatted

@ -1030,6 +1030,12 @@ class TranslationBase {
String get noDataAvailable =>
localizedValues['noDataAvailable'][locale.languageCode];
String get theName => localizedValues['thename'][locale.languageCode];
String get noSearchResult =>
localizedValues['noSearchResult'][locale.languageCode];
String get selectFileSouse =>
localizedValues['selectFileSouse'][locale.languageCode];
String get gallery => localizedValues['gallery'][locale.languageCode];
String get camera => localizedValues['camera'][locale.languageCode];
}
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -1,6 +1,7 @@
import 'dart:convert';
import 'dart:io';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
import 'package:feather_icons_flutter/feather_icons_flutter.dart';
import 'package:flutter/material.dart';
@ -15,10 +16,10 @@ class ImageOptions {
return _BottomSheet(
children: <Widget>[
_BottomSheetItem(
title: "Select file souse",
title: TranslationBase.of(context).selectFileSouse,
),
_BottomSheetItem(
title: "Gallery",
title: TranslationBase.of(context).gallery,
icon: FeatherIcons.image,
onTap: () async {
File _image =
@ -32,7 +33,7 @@ class ImageOptions {
},
),
_BottomSheetItem(
title: "Camera",
title: TranslationBase.of(context).camera,
icon: FeatherIcons.camera,
onTap: () async {
File _image =
@ -46,8 +47,10 @@ class ImageOptions {
},
),
_BottomSheetItem(
title: "Cancel",
onTap: (){},
title: TranslationBase.of(context).cancel,
onTap: (){
},
)
],
);

@ -54,7 +54,7 @@ class DoctorCard extends StatelessWidget {
children: <Widget>[
Container(
width:projectViewModel.isArabic? 27:20,
height: date == null ? projectViewModel.isArabic? 170 :100 : 150,
height: date == null ? projectViewModel.isArabic? 185 :100 : 180,
decoration: BoxDecoration(
color: !isInOutPatient
? Colors.red[900]
@ -113,18 +113,18 @@ class DoctorCard extends StatelessWidget {
),
Texts(
subName,
variant: 'caption3',
),
if (billNo != null)
Row(
children: <Widget>[
Texts(
'Bill No: ',
variant: 'caption3',
'${TranslationBase.of(context).billNo}: ',
),
Texts(
billNo,
variant: 'caption3',
)
],
),

@ -70,10 +70,9 @@ class _NotAutPageState extends State<NotAutPage> {
Row(
children: [
Container(
width: 30,
height: 30,
width: 40,
height: 40,
decoration: BoxDecoration(
// shape: BoxShape.circle,
borderRadius: BorderRadius.circular(15),
color: Theme.of(context).primaryColor),
child: Center(

Loading…
Cancel
Save