feedback bug fix
This commit is contained in:
parent
58970a13d0
commit
7d251c8ac0
@ -1,24 +1,24 @@
|
|||||||
{
|
{
|
||||||
"feedback_title": "نموذج الملاحظات",
|
"feedback_title": "التعليقات",
|
||||||
"feedback_failed_msg": "لم يتم إرسال تعليقاتك. يرجى المحاولة مرة أخرى",
|
"feedback_failed_msg": "لم يتم إرسال تعليقاتك. يرجى المحاولة مرة أخرى.",
|
||||||
|
|
||||||
"guide_title": "نموذج الملاحظات",
|
"guide_title": "نموذج الملاحظات",
|
||||||
|
|
||||||
"register_title": "التسجيل",
|
"register_title": "التسجيل",
|
||||||
"register_details": "من فضلك ادخل بياناتك",
|
"register_details": "من فضلك ادخل بياناتك",
|
||||||
"register_name": "اسم المستخدم",
|
"register_name": "اسم المستخدم",
|
||||||
"email_id": "الاسم الكامل",
|
"email_id": "معرف البريد الإلكتروني",
|
||||||
"enter_name": "أدخل الاسم",
|
"enter_name": "أدخل الاسم",
|
||||||
"register_email": "أدخل بريدك الإلكتروني",
|
"enter_your_email": "أدخل بريدك الإلكتروني",
|
||||||
"register_password": "دخل كلمة المرور",
|
"enter_your_password": "أدخل كلمة المرور",
|
||||||
"register_Confirm_password": "أكيد كلمة المرو",
|
"register_Confirm_password": "تأكيد كلمة المرور",
|
||||||
"agree": " وافق على",
|
"agree": "أوافق على الشروط والأحكام وسياسة الخصوصية للمركز الإتحادي للتنافسية والإحصاء",
|
||||||
"t_and": "و ",
|
"t_and": "",
|
||||||
"conditions": " الخاصة بالمركز الاتحادي للتنافسية والإحصاء",
|
"conditions": "",
|
||||||
"terms_conditions": "الشروط والأحكام ",
|
"terms_conditions": "",
|
||||||
"privacy_policy":" وسياسة الخصوصية",
|
"privacy_policy":"",
|
||||||
"account_confirmation": "ل لديك حساب؟ سجل الدخول ",
|
"account_confirmation": "هل لديك حساب؟ سجل الدخول",
|
||||||
"login_title": "سجيل الدخول",
|
"login_title": "تسجيل الدخول",
|
||||||
|
|
||||||
"profile_title": "نموذج الملاحظات",
|
"profile_title": "نموذج الملاحظات",
|
||||||
"my_profile": "ملفي الشخصي",
|
"my_profile": "ملفي الشخصي",
|
||||||
@ -30,8 +30,8 @@
|
|||||||
"confirm": "تأكيد",
|
"confirm": "تأكيد",
|
||||||
"change_password": "تغيير كلمة المرور",
|
"change_password": "تغيير كلمة المرور",
|
||||||
"sure_save_page": " هل أنت متأكد أنك ترغب في حفظ هذه الصفحة؟",
|
"sure_save_page": " هل أنت متأكد أنك ترغب في حفظ هذه الصفحة؟",
|
||||||
"not_able_to_change": " بمجرد الحفظ، لن تتمكن من تعديل اسمك أو تاريخ ",
|
"not_able_to_change": "بمجرد الحفظ، لن تتمكن من تعديل اسمك أو تاريخ ميلادك.",
|
||||||
"save": "يحفظ",
|
"save": "حفظ",
|
||||||
"name": "اسم",
|
"name": "اسم",
|
||||||
|
|
||||||
|
|
||||||
@ -55,25 +55,25 @@
|
|||||||
"password_match": "كلمات المرور غير متطابقة",
|
"password_match": "كلمات المرور غير متطابقة",
|
||||||
"only8charac": "يجب أن تتكون كلمة المرور من 8 أحرف على الأقل",
|
"only8charac": "يجب أن تتكون كلمة المرور من 8 أحرف على الأقل",
|
||||||
|
|
||||||
"manage_user": "دارة المستخدمين",
|
"manage_user": "إدارة المستخدمين",
|
||||||
"user_name": "اسم المستخدم",
|
"user_name": "اسم المستخدم",
|
||||||
"reg_date": "تاريخ التسجيل",
|
"reg_date": "تاريخ التسجيل",
|
||||||
"status": "تمت الموافقة",
|
"status": "الحالة",
|
||||||
"denied": "مرفوض",
|
"denied": "مرفوض",
|
||||||
"pending": "يد الانتظار",
|
"pending": " قيد الانتظار",
|
||||||
"approve_msg": "هل أنت متأكد أنك ترغب في تغيير الحالة إلى \"{newStatus}\"؟",
|
"approve_msg": "هل أنت متأكد أنك ترغب في تغيير الحالة إلى \"{newStatus}\"؟",
|
||||||
"yes": "نعم",
|
"yes": "نعم",
|
||||||
"no": "لا",
|
"no": "لا",
|
||||||
"no_result_found": "لم يتم العثور على نتائج",
|
"no_result_found": "لم يتم العثور على نتائج",
|
||||||
"search": "يبحث",
|
"search": "يبحث",
|
||||||
"approved": "موافقة",
|
"approved": "تمت الموافقة",
|
||||||
|
|
||||||
"create_new_password": "إنشاء كلمة مرور جديدة",
|
"create_new_password": "إنشاء كلمة مرور جديدة",
|
||||||
"different_password": "يجب أن تكون كلمة المرور الجديدة مختلفة عن كلمة المرور المستخدمة سابقًا.",
|
"different_password":"يجب أن تكون كلمة المرور الجديدة مختلفة عن كلمة المرور المستخدمة سابقًا.",
|
||||||
"old_password": "كلمة المرور القديمة",
|
"old_password": "كلمة المرور القديمة",
|
||||||
"enter_new_password": "أدخل كلمة المرور الجديدة",
|
"enter_new_password": "أدخل كلمة المرور الجديدة",
|
||||||
"confirm_new_password": "تأكيد كلمة المرور الجديدة",
|
"confirm_new_password": "تأكيد كلمة المرور الجديدة",
|
||||||
"password_changed_successfully": "م تغيير كلمة المرور بنجاح",
|
"password_changed_successfully": "تم تغيير كلمة المرور بنجاح",
|
||||||
"enter_old_password": "أدخل كلمة المرور القديمة",
|
"enter_old_password": "أدخل كلمة المرور القديمة",
|
||||||
"your_old_password_incorrect": "كلمة المرور القديمة الخاصة بك غير صحيحة.",
|
"your_old_password_incorrect": "كلمة المرور القديمة الخاصة بك غير صحيحة.",
|
||||||
"failed_to_update_password": "",
|
"failed_to_update_password": "",
|
||||||
|
|||||||
@ -8,17 +8,17 @@
|
|||||||
"register_details": "Please enter your details",
|
"register_details": "Please enter your details",
|
||||||
"register_name": "Username",
|
"register_name": "Username",
|
||||||
"email_id": "Email ID",
|
"email_id": "Email ID",
|
||||||
"enter_name": "Enter your User Name",
|
"enter_name": "Enter your User Name",
|
||||||
"register_email": "Enter your email",
|
"enter_your_email": "Enter your email",
|
||||||
"register_password": "Enter your password",
|
"enter_your_password": "Enter your password",
|
||||||
"register_Confirm_password": "Confirm password",
|
"register_Confirm_password": "Confirm password",
|
||||||
"agree": "I agree to ",
|
"agree": "I agree to ",
|
||||||
"t_and": "and",
|
"t_and": "and",
|
||||||
"conditions": " of Fcsc",
|
"conditions": " of Fcsc",
|
||||||
"terms_conditions": "terms & conditions",
|
"terms_conditions": "terms & conditions",
|
||||||
"privacy_policy":"privacy policy",
|
"privacy_policy":"privacy policy",
|
||||||
"account_confirmation": "Already have an account? Login",
|
"account_confirmation": "Already have an account? Login",
|
||||||
"login_title": "Login",
|
"login_title": "Login",
|
||||||
|
|
||||||
"profile_title": "Edit Profile",
|
"profile_title": "Edit Profile",
|
||||||
"my_profile": "My Profile",
|
"my_profile": "My Profile",
|
||||||
|
|||||||
@ -475,7 +475,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
// hintText: 'Enter your email',
|
// hintText: 'Enter your email',
|
||||||
hintText: _showHints[1]
|
hintText: _showHints[1]
|
||||||
? AppLocalizations.of(context)!.register_email
|
? AppLocalizations.of(context)!.enter_your_email
|
||||||
: null,
|
: null,
|
||||||
// _showHints[1] ? 'Enter your email' : null,
|
// _showHints[1] ? 'Enter your email' : null,
|
||||||
prefixIcon: Icon(
|
prefixIcon: Icon(
|
||||||
@ -500,8 +500,7 @@ class _RegisterScreenState extends State<RegisterScreen> {
|
|||||||
obscureText: _obscurePassword,
|
obscureText: _obscurePassword,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: _showHints[2]
|
hintText: _showHints[2]
|
||||||
? AppLocalizations.of(context)!
|
? AppLocalizations.of(context)!.enter_your_password
|
||||||
.register_password
|
|
||||||
: null,
|
: null,
|
||||||
// _showHints[2] ? 'Enter your password' : null,
|
// _showHints[2] ? 'Enter your password' : null,
|
||||||
prefixIcon: Icon(
|
prefixIcon: Icon(
|
||||||
|
|||||||
@ -28,7 +28,7 @@ class FeedbackForm extends StatefulWidget {
|
|||||||
class _FeedbackFormState extends State<FeedbackForm>
|
class _FeedbackFormState extends State<FeedbackForm>
|
||||||
with WidgetsBindingObserver {
|
with WidgetsBindingObserver {
|
||||||
final _pb =
|
final _pb =
|
||||||
PocketBase('https://pb.venbait.in'); // Initialize PocketBase client
|
PocketBase('https://pb.venbait.in'); // Initialize PocketBase client
|
||||||
// final _pb =
|
// final _pb =
|
||||||
// PocketBase('http://127.0.0.1:8090'); // Initialize PocketBase client
|
// PocketBase('http://127.0.0.1:8090'); // Initialize PocketBase client
|
||||||
|
|
||||||
@ -46,32 +46,32 @@ class _FeedbackFormState extends State<FeedbackForm>
|
|||||||
dynamic userId;
|
dynamic userId;
|
||||||
|
|
||||||
List<Map<String, dynamic>> get _emojiOptions => [
|
List<Map<String, dynamic>> get _emojiOptions => [
|
||||||
{
|
{
|
||||||
"icon": Icons.sentiment_very_dissatisfied,
|
"icon": Icons.sentiment_very_dissatisfied,
|
||||||
"label": context.translate("Terrible", "رهيب"), // Translate here
|
"label": context.translate("Terrible", "سئ جدا"), // Translate here
|
||||||
"value": 1,
|
"value": 1,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon": Icons.sentiment_dissatisfied,
|
"icon": Icons.sentiment_dissatisfied,
|
||||||
"label": context.translate("Bad", "سيء"), // Translate here
|
"label": context.translate("Bad", "سيء"), // Translate here
|
||||||
"value": 2,
|
"value": 2,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon": Icons.sentiment_neutral,
|
"icon": Icons.sentiment_neutral,
|
||||||
"label": context.translate("Okay", "تمام"), // Translate here
|
"label": context.translate("Okay", "مقبول"), // Translate here
|
||||||
"value": 3,
|
"value": 3,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon": Icons.sentiment_satisfied,
|
"icon": Icons.sentiment_satisfied,
|
||||||
"label": context.translate("Good", "جيد"), // Translate here
|
"label": context.translate("Good", "جيد"), // Translate here
|
||||||
"value": 4,
|
"value": 4,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"icon": Icons.sentiment_very_satisfied,
|
"icon": Icons.sentiment_very_satisfied,
|
||||||
"label": context.translate("Amazing", "مدهش"), // Translate here
|
"label": context.translate("Amazing", "مذهل"), // Translate here
|
||||||
"value": 5,
|
"value": 5,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
static const int _characterLimit = 1200;
|
static const int _characterLimit = 1200;
|
||||||
final RegExp _allowedCharacters = RegExp(r'^[a-zA-Z0-9 .,!?-]*$');
|
final RegExp _allowedCharacters = RegExp(r'^[a-zA-Z0-9 .,!?-]*$');
|
||||||
@ -235,8 +235,8 @@ class _FeedbackFormState extends State<FeedbackForm>
|
|||||||
child: _isFeedbackSubmitted
|
child: _isFeedbackSubmitted
|
||||||
? _buildThankYouMessage()
|
? _buildThankYouMessage()
|
||||||
: _isFeedbackFailed
|
: _isFeedbackFailed
|
||||||
? _buildFailureMessage()
|
? _buildFailureMessage()
|
||||||
: _buildFeedbackForm(),
|
: _buildFeedbackForm(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@ -249,7 +249,7 @@ class _FeedbackFormState extends State<FeedbackForm>
|
|||||||
Text(
|
Text(
|
||||||
context.translate(
|
context.translate(
|
||||||
'Do you have a suggestion or had any problem? Let us know.',
|
'Do you have a suggestion or had any problem? Let us know.',
|
||||||
'هل لديك اقتراح أو واجهت أي مشكلة؟ اسمحوا لنا أن نعرف.',
|
'هل لديك اقتراح أو واجهت أي مشكلة؟ أخبرنا',
|
||||||
),
|
),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
@ -309,7 +309,7 @@ class _FeedbackFormState extends State<FeedbackForm>
|
|||||||
const SizedBox(height: 30),
|
const SizedBox(height: 30),
|
||||||
Text(
|
Text(
|
||||||
context.translate('How good did we do in these aspects?',
|
context.translate('How good did we do in these aspects?',
|
||||||
'ما مدى جودة ما قمنا به في هذه الجوانب؟'),
|
'ما مدى جودة أدائنا في هذه الجوانب؟'),
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
fontFamily: 'Roboto',
|
fontFamily: 'Roboto',
|
||||||
@ -321,34 +321,34 @@ class _FeedbackFormState extends State<FeedbackForm>
|
|||||||
_buildRatingRow(
|
_buildRatingRow(
|
||||||
context.translate('Ease of use', 'سهولة الاستخدام'),
|
context.translate('Ease of use', 'سهولة الاستخدام'),
|
||||||
_easeOfUseRating,
|
_easeOfUseRating,
|
||||||
(rating) {
|
(rating) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_easeOfUseRating = rating;
|
_easeOfUseRating = rating;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
_buildRatingRow(
|
_buildRatingRow(
|
||||||
context.translate('Quality', 'جودة'),
|
context.translate('Quality', 'الجودة'),
|
||||||
_qualityRating,
|
_qualityRating,
|
||||||
(rating) {
|
(rating) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_qualityRating = rating;
|
_qualityRating = rating;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
_buildRatingRow(
|
_buildRatingRow(
|
||||||
context.translate('Design', 'تصميم'),
|
context.translate('Design', 'التصميم'),
|
||||||
_designRating,
|
_designRating,
|
||||||
(rating) {
|
(rating) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_designRating = rating;
|
_designRating = rating;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
_buildRatingRow(
|
_buildRatingRow(
|
||||||
context.translate('Redundant', 'متكرر'),
|
context.translate('Redundant', 'مكرر'),
|
||||||
_redundancyRating,
|
_redundancyRating,
|
||||||
(rating) {
|
(rating) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_redundancyRating = rating;
|
_redundancyRating = rating;
|
||||||
});
|
});
|
||||||
@ -362,14 +362,14 @@ class _FeedbackFormState extends State<FeedbackForm>
|
|||||||
maxLength: _characterLimit,
|
maxLength: _characterLimit,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: context.translate(
|
hintText: context.translate(
|
||||||
'Tell us how we can improve', 'أخبرنا كيف يمكننا تحسين'),
|
'Tell us how we can improve', 'أخبرنا كيف يمكننا التحسين'),
|
||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderSide: BorderSide(
|
borderSide: BorderSide(
|
||||||
color: _hasError ? Colors.red : Color(0xFF7296BE),
|
color: _hasError ? Colors.red : Color(0xFF7296BE),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
errorText:
|
errorText:
|
||||||
_hasError ? _errorMessage : null, // Show error below field
|
_hasError ? _errorMessage : null, // Show error below field
|
||||||
),
|
),
|
||||||
onChanged: (text) {
|
onChanged: (text) {
|
||||||
// Trigger re-validation and character limit on each change
|
// Trigger re-validation and character limit on each change
|
||||||
@ -412,7 +412,7 @@ class _FeedbackFormState extends State<FeedbackForm>
|
|||||||
Text(
|
Text(
|
||||||
context.translate(
|
context.translate(
|
||||||
'Submit',
|
'Submit',
|
||||||
'يُقدِّم',
|
'إرسال',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
6.horizontalSpace,
|
6.horizontalSpace,
|
||||||
@ -514,10 +514,10 @@ class _FeedbackFormState extends State<FeedbackForm>
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildRatingRow(
|
Widget _buildRatingRow(
|
||||||
String label,
|
String label,
|
||||||
double rating,
|
double rating,
|
||||||
Function(double) onRatingUpdate,
|
Function(double) onRatingUpdate,
|
||||||
) {
|
) {
|
||||||
return Row(
|
return Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@ -573,7 +573,7 @@ class _FeedbackFormState extends State<FeedbackForm>
|
|||||||
"design": _designRating,
|
"design": _designRating,
|
||||||
"redundancy": _redundancyRating,
|
"redundancy": _redundancyRating,
|
||||||
"emoji_rating": _emojiOptions[_selectedEmojiIndex!]
|
"emoji_rating": _emojiOptions[_selectedEmojiIndex!]
|
||||||
["label"], // Emoji rating
|
["label"], // Emoji rating
|
||||||
"feedback": _feedbackController.text,
|
"feedback": _feedbackController.text,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -783,7 +783,7 @@ class LangToggle extends ConsumerWidget {
|
|||||||
|
|
||||||
ref.read(preferencesUseCaseProvider.notifier).updatePreferences(
|
ref.read(preferencesUseCaseProvider.notifier).updatePreferences(
|
||||||
(prefs) => prefs.copyWith(language: languageAfter),
|
(prefs) => prefs.copyWith(language: languageAfter),
|
||||||
);
|
);
|
||||||
|
|
||||||
await onLoadFeedback(); // Reload feedback text after toggling language
|
await onLoadFeedback(); // Reload feedback text after toggling language
|
||||||
},
|
},
|
||||||
|
|||||||
@ -326,7 +326,8 @@ class _BaseScaffoldState extends ConsumerState<BaseScaffold> {
|
|||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
leading: Icon(Icons.feedback),
|
leading: Icon(Icons.feedback),
|
||||||
title: const Text('Feedback'),
|
// title: const Text('Feedback'),
|
||||||
|
title: Text(AppLocalizations.of(context)!.feedback_title),
|
||||||
onTap: () => context.go('/feedback'),
|
onTap: () => context.go('/feedback'),
|
||||||
),
|
),
|
||||||
if (role == 'admin')
|
if (role == 'admin')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user