From f38f53587beda52fc899f31997a4935008020efb Mon Sep 17 00:00:00 2001 From: Mohammad Aljammal Date: Wed, 16 Dec 2020 01:08:24 +0200 Subject: [PATCH] fix issues --- assets/images/comments.png | Bin 0 -> 11678 bytes lib/config/localized_values.dart | 17 ++- .../feedback/feedback_view_model.dart | 53 -------- lib/pages/feedback/send_feedback_page.dart | 122 ++++++++++++------ lib/pages/feedback/status_feedback_page.dart | 118 ++++++++++------- lib/pages/landing/home_page.dart | 16 +-- lib/pages/medical/labs/labs_home_page.dart | 9 +- .../prescriptions_history_details_page.dart | 18 ++- .../prescriptions_history_page.dart | 8 +- .../radiology/radiology_details_page.dart | 2 +- .../radiology/radiology_home_page.dart | 9 +- .../rate_appointment_clinic.dart | 2 +- .../rate_appointment_doctor.dart | 2 +- lib/uitl/date_uitl.dart | 12 ++ lib/uitl/translations_delegate_base.dart | 4 + lib/widgets/bottom_options/BottomSheet.dart | 13 +- .../data_display/medical/doctor_card.dart | 10 +- lib/widgets/others/not_auh_page.dart | 5 +- 18 files changed, 242 insertions(+), 178 deletions(-) create mode 100644 assets/images/comments.png diff --git a/assets/images/comments.png b/assets/images/comments.png new file mode 100644 index 0000000000000000000000000000000000000000..353edf4ef5274f7a1f8d20b7f31ac1adc8390bc9 GIT binary patch literal 11678 zcmeHtXIE2S@NOC)ARr)JdI0Gt66qaDs1^{AB8rIgt|%=LQBY|?igYz9Nben@QUnAf z(xgU;NDBd}0m(hV-xs*+-n-U)@n^}xv-j+0W}ca|&n^>t(ZZO8iJu7s0Z7cV0Y72KZp8r4jDASFKoE#Imi7xi-_=tL0*Qc7hI&>Z zS*w%xn}n^y$?N^icDA2{VpdMvHPpRy;-ti-s>>&hitlixb-$5+dpU3E%GM?OElk6! z;Rek*-RjrYo6$4$PxDV0(&@dTgMC)8KPJiuPn^?^%$j%*haxrq$=u6%sg}F5ycHfx znaOdz9kHOH?A8ZHVd4J={~p{twtJ0ag2bM@0}DBB+oH}5W=8L08qs@r`9f;z6u(&T zBRG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ucJS}Rk|DG{H0Y#st)-3Od(+FQW@CYeQNs5A)cy4=5zRb9eeGg%8>OFQQ`?_g)-qX y`NihLDBOEk8k7h8EYKQQk^b+LB}*<+p&7TZYoF-4<$(fg5X#8HuteYa;r{~jtz8@d literal 0 HcmV?d00001 diff --git a/lib/config/localized_values.dart b/lib/config/localized_values.dart index 6c94019e..960b97a3 100644 --- a/lib/config/localized_values.dart +++ b/lib/config/localized_values.dart @@ -912,7 +912,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": { @@ -1178,4 +1178,19 @@ const Map localizedValues = { "en": "No data available", "ar": " لا يوجد بيانات متاحة " }, + "noSearchResult": { + "en": "No Search Result", + "ar": "لا توجد نتيجة بحث" + }, + "selectFileSouse": { + "en": "Select file souse", + "ar": "حدد الملف" + }, + "gallery": { + "en": "Gallery", + "ar": "معرض الصور" + }, "camera": { + "en": "Camera", + "ar": "كاميرا" + }, }; diff --git a/lib/core/viewModels/feedback/feedback_view_model.dart b/lib/core/viewModels/feedback/feedback_view_model.dart index 4956024d..6793c786 100644 --- a/lib/core/viewModels/feedback/feedback_view_model.dart +++ b/lib/core/viewModels/feedback/feedback_view_model.dart @@ -21,59 +21,8 @@ class FeedbackViewModel extends BaseViewModel { FeedbackService _feedbackService = locator(); List 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 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; } } diff --git a/lib/pages/feedback/send_feedback_page.dart b/lib/pages/feedback/send_feedback_page.dart index 14463825..6f1d7871 100644 --- a/lib/pages/feedback/send_feedback_page.dart +++ b/lib/pages/feedback/send_feedback_page.dart @@ -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 { bool isShowListAppointHistory = true; String message; final formKey = GlobalKey(); + 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 { child: Texts( TranslationBase.of(context).likeToHear, textAlign: TextAlign.center, - variant: 'body2Link', ), ), InkWell( @@ -75,9 +110,8 @@ class _SendFeedbackPageState extends State { mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ 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 { ), ), ), - if (appointHistory != null && model.messageType == + if (appointHistory != null && messageType == MessageType.ComplaintOnAnAppointment) InkWell( onTap: () { @@ -167,12 +201,10 @@ class _SendFeedbackPageState extends State { ), ), ), - 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 { 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 { 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 { ), )), SizedBox( - height: 30, + height: 45, ), ], ), @@ -396,14 +428,14 @@ class _SendFeedbackPageState extends State { 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 { 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 { ); } - 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 { 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 { 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 { + + + MessageType messageTypeDialog = MessageType.NON; + + setMessageDialogType(MessageType messageType) { + setState(() { + messageTypeDialog = messageType; + }); + } + @override + void initState() { + messageTypeDialog = widget.messageTypeDialog; + super.initState(); + } + Widget build(BuildContext context) { return BaseView( builder: (_, model, widge) => SimpleDialog( @@ -507,16 +558,16 @@ class FeedbackTypeDialogState extends State { 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 { 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 { 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 { 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 { 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 { flex: 1, child: InkWell( onTap: () { - widget.onValueSelected(model.messageTypeDialog); + widget.onValueSelected(messageTypeDialog); Navigator.pop(context); }, child: Padding( diff --git a/lib/pages/feedback/status_feedback_page.dart b/lib/pages/feedback/status_feedback_page.dart index 457ded60..ada758e9 100644 --- a/lib/pages/feedback/status_feedback_page.dart +++ b/lib/pages/feedback/status_feedback_page.dart @@ -14,7 +14,6 @@ class StatusFeedbackPage extends StatefulWidget { } class _StatusFeedbackPageState extends State { - @override Widget build(BuildContext context) { return BaseView( @@ -23,64 +22,85 @@ class _StatusFeedbackPageState extends State { 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: [ - SizedBox(height: 8,), - Row( - mainAxisAlignment: - MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Column( - crossAxisAlignment: - CrossAxisAlignment.start, - children: [ - 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: [ - Texts('${model.cOCItemList[index].status}'), - Texts( - '${model.cOCItemList[index].date}', - variant: 'overline', + SizedBox( + height: 8, ), + Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + Texts( + '${model.cOCItemList[index].cOCTitle}'), + Texts( + TranslationBase.of(context).number + + ' : ${model.cOCItemList[index].itemID}', + variant: 'overline', + ), + ], + ), + ), + Expanded( + child: Column( + crossAxisAlignment: + CrossAxisAlignment.start, + children: [ + 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), ], ), ), - )), - ), + ), ), ); } diff --git a/lib/pages/landing/home_page.dart b/lib/pages/landing/home_page.dart index 1e79d07c..4157ee78 100644 --- a/lib/pages/landing/home_page.dart +++ b/lib/pages/landing/home_page.dart @@ -82,8 +82,7 @@ class _HomePageState extends State { 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 { ), ), - 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 { ) : 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 { ), 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 { ], ), ), - 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 { ], ), ), - 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 { ), ), SizedBox( - height: 120, + height: 130, ) ], ), diff --git a/lib/pages/medical/labs/labs_home_page.dart b/lib/pages/medical/labs/labs_home_page.dart index 4b412f5b..96356a0f 100644 --- a/lib/pages/medical/labs/labs_home_page.dart +++ b/lib/pages/medical/labs/labs_home_page.dart @@ -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( 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(), ), diff --git a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart index 5061a8ba..0eac55df 100644 --- a/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_history_details_page.dart @@ -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}'), ), ), ]) diff --git a/lib/pages/medical/prescriptions/prescriptions_history_page.dart b/lib/pages/medical/prescriptions/prescriptions_history_page.dart index 9d63bf7d..84691773 100644 --- a/lib/pages/medical/prescriptions/prescriptions_history_page.dart +++ b/lib/pages/medical/prescriptions/prescriptions_history_page.dart @@ -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: [ Texts( - DateUtil.getDayMonthYearHourMinuteDateFormatted( - prescriptionsViewModel - .prescriptionsHistory[index].createdOn), + DateUtil.getDayMonthYearHourMinuteDateFormatted(prescriptionsViewModel.prescriptionsHistory[index].createdOn), fontWeight: FontWeight.w300, ), SizedBox( diff --git a/lib/pages/medical/radiology/radiology_details_page.dart b/lib/pages/medical/radiology/radiology_details_page.dart index a7566c43..75279eee 100644 --- a/lib/pages/medical/radiology/radiology_details_page.dart +++ b/lib/pages/medical/radiology/radiology_details_page.dart @@ -33,7 +33,7 @@ class RadiologyDetailsPage extends StatelessWidget { mainAxisSize: MainAxisSize.max, crossAxisAlignment: CrossAxisAlignment.center, children: [ - Text( + Texts( '${finalRadiology.reportData}', textAlign: TextAlign.center, ), diff --git a/lib/pages/medical/radiology/radiology_home_page.dart b/lib/pages/medical/radiology/radiology_home_page.dart index ebc3527d..80479a36 100644 --- a/lib/pages/medical/radiology/radiology_home_page.dart +++ b/lib/pages/medical/radiology/radiology_home_page.dart @@ -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 = 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( @@ -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(), diff --git a/lib/pages/rateAppointment/rate_appointment_clinic.dart b/lib/pages/rateAppointment/rate_appointment_clinic.dart index 5ce1316f..f5ec34c3 100644 --- a/lib/pages/rateAppointment/rate_appointment_clinic.dart +++ b/lib/pages/rateAppointment/rate_appointment_clinic.dart @@ -146,7 +146,7 @@ class _RateAppointmentClinicState extends State { child: Container( key: ValueKey(rating), child: IconButton( - iconSize: 55.0, + iconSize: 45.0, onPressed: () { setState(() { rating = index + 1; diff --git a/lib/pages/rateAppointment/rate_appointment_doctor.dart b/lib/pages/rateAppointment/rate_appointment_doctor.dart index 4a1026f6..c83b178e 100644 --- a/lib/pages/rateAppointment/rate_appointment_doctor.dart +++ b/lib/pages/rateAppointment/rate_appointment_doctor.dart @@ -138,7 +138,7 @@ class _RateAppointmentDoctorState extends State { child: Container( key: ValueKey(rating), child: IconButton( - iconSize: 55.0, + iconSize: 45.0, onPressed: () { setState(() { rating = index + 1; diff --git a/lib/uitl/date_uitl.dart b/lib/uitl/date_uitl.dart index 637b0795..b64cf7d6 100644 --- a/lib/uitl/date_uitl.dart +++ b/lib/uitl/date_uitl.dart @@ -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 diff --git a/lib/uitl/translations_delegate_base.dart b/lib/uitl/translations_delegate_base.dart index 3775ed4f..8c942d8b 100644 --- a/lib/uitl/translations_delegate_base.dart +++ b/lib/uitl/translations_delegate_base.dart @@ -1024,6 +1024,10 @@ class TranslationBase { String get sendConfEmail => localizedValues['send-email'][locale.languageCode]; String get updateEmail => localizedValues['update-email'][locale.languageCode]; String get noDataAvailable => localizedValues['noDataAvailable'][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 { diff --git a/lib/widgets/bottom_options/BottomSheet.dart b/lib/widgets/bottom_options/BottomSheet.dart index 66ee36c4..494ddff3 100644 --- a/lib/widgets/bottom_options/BottomSheet.dart +++ b/lib/widgets/bottom_options/BottomSheet.dart @@ -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: [ _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: (){ + + }, ) ], ); diff --git a/lib/widgets/data_display/medical/doctor_card.dart b/lib/widgets/data_display/medical/doctor_card.dart index bc8de0a5..c6cbe23b 100644 --- a/lib/widgets/data_display/medical/doctor_card.dart +++ b/lib/widgets/data_display/medical/doctor_card.dart @@ -54,7 +54,7 @@ class DoctorCard extends StatelessWidget { children: [ 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: [ Texts( - 'Bill No: ', - variant: 'caption3', + '${TranslationBase.of(context).billNo}: ', + ), Texts( billNo, - variant: 'caption3', + ) ], ), diff --git a/lib/widgets/others/not_auh_page.dart b/lib/widgets/others/not_auh_page.dart index 3fcb9025..56df1c21 100644 --- a/lib/widgets/others/not_auh_page.dart +++ b/lib/widgets/others/not_auh_page.dart @@ -70,10 +70,9 @@ class _NotAutPageState extends State { 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(