|
|
|
|
@ -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/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/bottom_options/BottomSheet.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
|
|
|
|
@ -52,8 +53,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 20, right: 20, top: 8),
|
|
|
|
|
child: Texts(
|
|
|
|
|
'We\'d love to hear your feedback about the health care services and online services. Please fill in the required fields',
|
|
|
|
|
//يسعدنا سماع ملاحظاتك حول خدمات الرعاية الصحية والخدمات الإلكترونية. يرجى تعبئة الحقول المطلوبة
|
|
|
|
|
TranslationBase.of(context).likeToHear,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
variant: 'body2Link',
|
|
|
|
|
),
|
|
|
|
|
@ -75,11 +75,12 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
|
|
|
|
|
child: Texts(
|
|
|
|
|
model.selected,
|
|
|
|
|
model.getSelected(context),
|
|
|
|
|
variant: 'bodyText',
|
|
|
|
|
),
|
|
|
|
|
margin: EdgeInsets.only(left: 10),
|
|
|
|
|
margin: EdgeInsets.only(left: 10,right: 10),
|
|
|
|
|
),
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.arrow_drop_down,
|
|
|
|
|
@ -278,14 +279,14 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: 'Title',
|
|
|
|
|
hintText: TranslationBase.of(context).subject,
|
|
|
|
|
controller: titleController,
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
hintColor: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
validator: (value) {
|
|
|
|
|
if (value == null)
|
|
|
|
|
return "please Enter title";
|
|
|
|
|
return TranslationBase.of(context).emptySubject;
|
|
|
|
|
else
|
|
|
|
|
return null;
|
|
|
|
|
},
|
|
|
|
|
@ -294,7 +295,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(left: 10, right: 10, top: 15),
|
|
|
|
|
child: TextFields(
|
|
|
|
|
hintText: 'message',
|
|
|
|
|
hintText: TranslationBase.of(context).message,
|
|
|
|
|
fontSize: 13.5,
|
|
|
|
|
hintColor: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
|
@ -303,7 +304,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
controller: messageController,
|
|
|
|
|
validator: (value) {
|
|
|
|
|
if (value == null)
|
|
|
|
|
return "please Enter message";
|
|
|
|
|
return TranslationBase.of(context).emptyMessage;
|
|
|
|
|
else
|
|
|
|
|
return null;
|
|
|
|
|
}),
|
|
|
|
|
@ -332,7 +333,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Icon(Icons.attach_file),
|
|
|
|
|
Texts(
|
|
|
|
|
'selected attachment',
|
|
|
|
|
TranslationBase.of(context).selectAttachment,
|
|
|
|
|
variant: 'bodyText',
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
@ -391,7 +392,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.1,
|
|
|
|
|
width: MediaQuery.of(context).size.width * 0.8,
|
|
|
|
|
child: Button(
|
|
|
|
|
label: 'Send',
|
|
|
|
|
label: TranslationBase.of(context).send,
|
|
|
|
|
loading: model.state == ViewState.BusyLocal,
|
|
|
|
|
onTap: () {
|
|
|
|
|
final form = formKey.currentState;
|
|
|
|
|
@ -415,13 +416,13 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
|
|
|
|
|
});
|
|
|
|
|
model.setMessageType(MessageType.NON);
|
|
|
|
|
AppToast.showSuccessToast(
|
|
|
|
|
message: "Your feedback was send");
|
|
|
|
|
message: TranslationBase.of(context).yourFeedback);
|
|
|
|
|
} else {
|
|
|
|
|
AppToast.showErrorToast(message: model.error);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
else {
|
|
|
|
|
AppToast.showErrorToast(message: "Please select COC");
|
|
|
|
|
AppToast.showErrorToast(message: TranslationBase.of(context).selectPart);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
@ -489,7 +490,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
|
|
|
|
|
return BaseView<FeedbackViewModel>(
|
|
|
|
|
builder: (_, model, widge) => SimpleDialog(
|
|
|
|
|
title: Text(
|
|
|
|
|
"Message Type",
|
|
|
|
|
TranslationBase.of(context).messageType,
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
@ -509,7 +510,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
|
|
|
|
|
onTap: () => model.setMessageDialogType(
|
|
|
|
|
MessageType.ComplaintOnAnAppointment),
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: const Text('Complaint on an appointment'),
|
|
|
|
|
title: Texts(TranslationBase.of(context).complainAppo),
|
|
|
|
|
leading: Radio(
|
|
|
|
|
value: MessageType.ComplaintOnAnAppointment,
|
|
|
|
|
groupValue: model.messageTypeDialog,
|
|
|
|
|
@ -533,7 +534,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
|
|
|
|
|
onTap: () => model.setMessageDialogType(
|
|
|
|
|
MessageType.ComplaintWithoutAppointment),
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: const Text('Complaint without appointment'),
|
|
|
|
|
title: Texts(TranslationBase.of(context).complainWithoutAppo),
|
|
|
|
|
leading: Radio(
|
|
|
|
|
value: MessageType.ComplaintWithoutAppointment,
|
|
|
|
|
groupValue: model.messageTypeDialog,
|
|
|
|
|
@ -557,7 +558,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
|
|
|
|
|
onTap: () =>
|
|
|
|
|
model.setMessageDialogType(MessageType.Question),
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: const Text('Question'),
|
|
|
|
|
title: Texts(TranslationBase.of(context).question),
|
|
|
|
|
leading: Radio(
|
|
|
|
|
value: MessageType.Question,
|
|
|
|
|
groupValue: model.messageTypeDialog,
|
|
|
|
|
@ -581,7 +582,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
|
|
|
|
|
onTap: () =>
|
|
|
|
|
model.setMessageDialogType(MessageType.Compliment),
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: const Text('compliment'),
|
|
|
|
|
title: Texts(TranslationBase.of(context).compliment),
|
|
|
|
|
leading: Radio(
|
|
|
|
|
value: MessageType.Compliment,
|
|
|
|
|
groupValue: model.messageTypeDialog,
|
|
|
|
|
@ -605,7 +606,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
|
|
|
|
|
onTap: () =>
|
|
|
|
|
model.setMessageDialogType(MessageType.Suggestion),
|
|
|
|
|
child: ListTile(
|
|
|
|
|
title: const Text('Suggestion'),
|
|
|
|
|
title: Texts(TranslationBase.of(context).suggestion),
|
|
|
|
|
leading: Radio(
|
|
|
|
|
value: MessageType.Suggestion,
|
|
|
|
|
groupValue: model.messageTypeDialog,
|
|
|
|
|
@ -638,11 +639,11 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
|
|
|
|
|
Navigator.pop(context);
|
|
|
|
|
},
|
|
|
|
|
child: Padding(
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
padding: EdgeInsets.all(8.0),
|
|
|
|
|
child: Container(
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Texts(
|
|
|
|
|
'cancel',
|
|
|
|
|
TranslationBase.of(context).cancel,
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
@ -666,7 +667,7 @@ class FeedbackTypeDialogState extends State<FeedbackTypeDialog> {
|
|
|
|
|
padding: const EdgeInsets.all(8.0),
|
|
|
|
|
child: Center(
|
|
|
|
|
child: Texts(
|
|
|
|
|
'ok',
|
|
|
|
|
TranslationBase.of(context).ok,
|
|
|
|
|
fontWeight: FontWeight.w400,
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
|