Parcourir la source

در رویدادها اگر کاربر فایل ضمیمه کرد، نیازی به پر کردن قسمت پاسخ نداشته باشد.

hgh il y a 1 an
Parent
commit
b2123b0dc6

+ 3 - 2
src/components/Widgets/Other/Shop/ShopCompleteInfo/components/AllQuestions.vue

@@ -185,10 +185,11 @@ export default {
         const answerSheetItem = this.answerBook.answer_sheet_info.list[answerSheetIndex]
         const hasChoise = Array.isArray(answerSheetItem.test_question_info.question_info.choices) && answerSheetItem.test_question_info.question_info.choices.length > 0
         const answerText = FormBuilderAssist.getInputsByName(this.questionInputs[answerSheetIndex], 'answer_text').value
-        if (!skipValidation && !answerText && !hasChoise) {
+        const answerAttachment = FormBuilderAssist.getInputsByName(this.questionInputs[answerSheetIndex], 'answer_attachment').value
+        if (!skipValidation && !answerAttachment && !answerText && !hasChoise) {
           this.$q.notify({
             type: 'negative',
-            message: 'لطفا متن پاسخ را کامل کنید.'
+            message: 'لطفا متن پاسخ یا پیوست را کامل کنید.'
           })
           reject()
           return