ali 2 лет назад
Родитель
Сommit
0d08526034

+ 1 - 1
src/components/Widgets/Classroom/AdminClassroomShow/components/TestList.vue

@@ -13,7 +13,7 @@
       <q-btn color="primary"
              outline
              :loading="addNewSessionLoading"
-             :to="{name: 'Admin.Classroom.TestSet.Index', params: {classroom_id: classroomId, unit_id: classroom.unit}}">
+             :to="{name: 'Admin.Classroom.TestSet.Index', params: {classroom_id: classroomId, unit_id: classroom.unit}, query: { classroom_type: classroomType}}">
         {{ addBtnTitle }}
       </q-btn>
     </template>

+ 4 - 3
src/components/Widgets/TestSet/AdminTestSetIndex/AdminTestSetIndex.vue

@@ -11,7 +11,7 @@
     <entity-index v-if="mounted"
                   ref="testSetList"
                   v-model:value="testSetListInputs"
-                  title="لیست آزمون ها"
+                  :title="$route.query.classroom_type === 'EVENT' ? 'لیست پرسشنامه ها' : 'لیست آزمون ها'"
                   :api="testSetListApi"
                   :table="testSetListTable"
                   :table-keys="testSetListTableKeys"
@@ -67,7 +67,8 @@ export default {
       dropClassroomByAdminLoading: false,
       exportReportLoading: false,
       testSetListInputs: [
-        { type: 'hidden', name: 'unit', value: this.$route.params.unit_id },
+        { type: 'hidden', name: 'type', value: this.$route.query.classroom_type === 'EVENT' ? 'QUESTIONNAIRE' : 'EXAM' },
+        { type: 'hidden', name: 'unit', value: this.$route.query.classroom_type === 'EVENT' ? null : this.$route.params.unit_id },
         { type: 'hidden', name: 'classroom', value: this.$route.params.classroom_id }
       ],
       testSetListApi: APIGateway.testSet.APIAdresses.base,
@@ -90,7 +91,7 @@ export default {
           {
             name: 'title',
             required: true,
-            label: 'عنوان آزمون',
+            label: this.$route.query.classroom_type === 'EVENT' ? 'عنوان پرسشنامه' : 'عنوان آزمون',
             align: 'left',
             field: row => row.title
           },