ali преди 2 години
родител
ревизия
8adfd2f61c
променени са 25 файла, в които са добавени 1225 реда и са изтрити 124 реда
  1. 155 84
      src/components/FormBuilderCustumComponents/QuestionsSelector/QuestionsSelector.vue
  2. 6 0
      src/components/Template/SideBard/AdminPanelSideBar.vue
  3. 1 0
      src/components/Widgets/Classroom/AdminClassroomShow/AdminClassroomShow.vue
  4. 20 5
      src/components/Widgets/Classroom/AdminClassroomShow/components/TestList.vue
  5. 118 0
      src/components/Widgets/SessionTemplate/AdminEventQuestionCreate/AdminEventQuestionCreate.vue
  6. 21 0
      src/components/Widgets/SessionTemplate/AdminEventQuestionCreate/OptionPanel.vue
  7. 160 0
      src/components/Widgets/SessionTemplate/AdminEventQuestionList/AdminEventQuestionList.vue
  8. 21 0
      src/components/Widgets/SessionTemplate/AdminEventQuestionList/OptionPanel.vue
  9. 117 0
      src/components/Widgets/SessionTemplate/AdminEventQuestionShow/AdminEventQuestionShow.vue
  10. 21 0
      src/components/Widgets/SessionTemplate/AdminEventQuestionShow/OptionPanel.vue
  11. 1 1
      src/components/Widgets/SessionTemplate/AdminSessionTemplateQuestionCreate/AdminSessionTemplateQuestionCreate.vue
  12. 1 1
      src/components/Widgets/SessionTemplate/AdminSessionTemplateQuestionShow/AdminSessionTemplateQuestionShow.vue
  13. 109 0
      src/components/Widgets/TestSet/AdminEventTestSetCreate/AdminEventTestSetCreate.vue
  14. 21 0
      src/components/Widgets/TestSet/AdminEventTestSetCreate/OptionPanel.vue
  15. 155 0
      src/components/Widgets/TestSet/AdminEventTestSetIndex/AdminEventTestSetIndex.vue
  16. 21 0
      src/components/Widgets/TestSet/AdminEventTestSetIndex/OptionPanel.vue
  17. 110 0
      src/components/Widgets/TestSet/AdminEventTestSetShow/AdminEventTestSetShow.vue
  18. 21 0
      src/components/Widgets/TestSet/AdminEventTestSetShow/OptionPanel.vue
  19. 23 0
      src/pages/Admin/Event/Question/Create.vue
  20. 23 0
      src/pages/Admin/Event/Question/Index.vue
  21. 23 0
      src/pages/Admin/Event/Question/Show.vue
  22. 23 0
      src/pages/Admin/Event/Test/Create.vue
  23. 23 0
      src/pages/Admin/Event/Test/Index.vue
  24. 23 0
      src/pages/Admin/Event/Test/Show.vue
  25. 8 33
      src/router/routes.js

+ 155 - 84
src/components/FormBuilderCustumComponents/QuestionsSelector/QuestionsSelector.vue

@@ -3,7 +3,7 @@
     <q-banner>
       انتخاب سوال
     </q-banner>
-    <div v-if="!readonly">
+    <div v-if="!readonly && unitId !== false">
       <div class="row q-col-gutter-md q-mt-xs">
         <div class="col-md-4">
           <div>
@@ -59,7 +59,7 @@
             <div class="action-column-entity-index">
               <q-btn color="primary"
                      outline
-                     :to="{ name: 'Admin.Unit.Questions.Show', params: { unit_id: $route.params.unit_id, session_template_id: selectedSessionId, id: inputData.props.row.id } }">
+                     :to="getShowQuestionRoute (inputData.props.row.id, $route.params.unit_id, selectedSessionId)">
                 مشاهده پاسخ
                 <q-icon name="visibility"
                         class="q-ml-md" />
@@ -73,25 +73,35 @@
       </entity-index>
     </div>
     <div class="content-list q-mt-lg">
-      <div class="row">
-        <div class="col-md-4 col-12">
-          تعداد سوالات اجباری انتخاب شده:
-          {{ countOfForceQuestions }}
-        </div>
-        <div class="col-md-4 col-12">
-          مجموع بارم‌ها:
-          {{ sumOfTotalMarks }}
-        </div>
-        <div class="col-12" />
-        <div class="col-md-4 col-12">
-          تعداد سوالات اختیاری انتخاب شده:
-          {{ countOfExtraQuestions }}
+      <template v-if="questionType === 'QUESTION_BANK'">
+        <div class="row">
+          <div class="col-md-4 col-12">
+            تعداد سوالات اجباری انتخاب شده:
+            {{ countOfForceQuestions }}
+          </div>
+          <div class="col-md-4 col-12">
+            مجموع بارم‌ها:
+            {{ sumOfTotalMarks }}
+          </div>
+          <div class="col-12" />
+          <div class="col-md-4 col-12">
+            تعداد سوالات اختیاری انتخاب شده:
+            {{ countOfExtraQuestions }}
+          </div>
+          <div class="col-md-4 col-12">
+            مجموع بارم سوالات اختیاری:
+            {{ sumOfExtraMarks }}
+          </div>
         </div>
-        <div class="col-md-4 col-12">
-          مجموع بارم سوالات اختیاری:
-          {{ sumOfExtraMarks }}
+      </template>
+      <template v-else-if="questionType === 'EVENT'">
+        <div class="row">
+          <div class="col-md-4 col-12">
+            تعداد سوالات انتخاب شده:
+            {{ selectedQuestions.length }}
+          </div>
         </div>
-      </div>
+      </template>
     </div>
   </div>
 </template>
@@ -126,14 +136,19 @@ export default {
       default: false,
       type: Boolean
     },
+    questionType: {
+      default: 'QUESTION_BANK',
+      type: String
+    },
     unitId: {
       default: null,
-      type: [Number, String]
+      type: [Number, String, Boolean]
     }
   },
   emits: ['update:value'],
   data () {
     return {
+      mounted: false,
       selectedSession: null,
       sessions: new SessionTemplateList(),
       sessionQuestions: new QuestionList(),
@@ -148,68 +163,11 @@ export default {
         pageKey: 'page'
       },
       inputs: [
-        { type: 'hidden', name: 'type', value: 'QUESTION_BANK' },
+        { type: 'hidden', name: 'type', value: this.questionType },
         { type: 'hidden', name: 'session_template_questions__session_template__unit', value: null }
       ],
       table: {
-        columns: [
-          {
-            name: 'choice',
-            required: true,
-            label: 'انتخاب',
-            align: 'left',
-            field: () => ''
-          },
-          {
-            name: 'number',
-            required: true,
-            label: 'شماره',
-            align: 'left',
-            field: () => ''
-          },
-          {
-            name: 'id',
-            required: true,
-            label: 'شناسه',
-            align: 'left',
-            field: row => row.id
-          },
-          {
-            name: 'text',
-            required: true,
-            label: 'عنوان سوال',
-            align: 'left',
-            field: row => row.text
-          },
-          {
-            name: 'mark',
-            required: true,
-            label: 'بارم',
-            align: 'left',
-            field: row => row.mark
-          },
-          {
-            name: 'level',
-            required: true,
-            label: 'سطح سوال',
-            align: 'left',
-            field: row => new Question(row).level_info.label
-          },
-          {
-            name: 'is_extra_mark',
-            required: true,
-            label: 'سوال امتیازی',
-            align: 'left',
-            field: row => ''
-          },
-          {
-            name: 'action',
-            required: true,
-            label: 'عملیات',
-            align: 'left',
-            field: row => ''
-          }
-        ]
+        columns: []
       }
     }
   },
@@ -279,10 +237,121 @@ export default {
       this.updateloadedQuestionsByArray(newValue, true)
     }
   },
-  mounted() {
-    this.getSessions()
+  created () {
+    if (this.questionType === 'QUESTION_BANK') {
+      this.table.columns = [
+        {
+          name: 'choice',
+          required: true,
+          label: 'انتخاب',
+          align: 'left',
+          field: () => ''
+        },
+        {
+          name: 'number',
+          required: true,
+          label: 'شماره',
+          align: 'left',
+          field: () => ''
+        },
+        {
+          name: 'id',
+          required: true,
+          label: 'شناسه',
+          align: 'left',
+          field: row => row.id
+        },
+        {
+          name: 'text',
+          required: true,
+          label: 'عنوان سوال',
+          align: 'left',
+          field: row => row.text
+        },
+        {
+          name: 'mark',
+          required: true,
+          label: 'بارم',
+          align: 'left',
+          field: row => row.mark
+        },
+        {
+          name: 'level',
+          required: true,
+          label: 'سطح سوال',
+          align: 'left',
+          field: row => new Question(row).level_info.label
+        },
+        {
+          name: 'is_extra_mark',
+          required: true,
+          label: 'سوال امتیازی',
+          align: 'left',
+          field: row => ''
+        },
+        {
+          name: 'action',
+          required: true,
+          label: 'عملیات',
+          align: 'left',
+          field: row => ''
+        }
+      ]
+    } else if (this.questionType === 'EVENT') {
+      this.table.columns = [
+        {
+          name: 'choice',
+          required: true,
+          label: 'انتخاب',
+          align: 'left',
+          field: () => ''
+        },
+        {
+          name: 'number',
+          required: true,
+          label: 'شماره',
+          align: 'left',
+          field: () => ''
+        },
+        {
+          name: 'id',
+          required: true,
+          label: 'شناسه',
+          align: 'left',
+          field: row => row.id
+        },
+        {
+          name: 'text',
+          required: true,
+          label: 'عنوان سوال',
+          align: 'left',
+          field: row => row.text
+        },
+        {
+          name: 'action',
+          required: true,
+          label: 'عملیات',
+          align: 'left',
+          field: row => ''
+        }
+      ]
+    }
+  },
+  mounted () {
+    if (this.questionType === 'QUESTION_BANK') {
+      this.getSessions()
+    } else {
+      this.mounted = true
+    }
   },
   methods: {
+    getShowQuestionRoute (questionId, unitId, selectedSessionId) {
+      if (this.questionType === 'QUESTION_BANK') {
+        return { name: 'Admin.Unit.Questions.Show', params: { unit_id: unitId, session_template_id: selectedSessionId, id: questionId } }
+      } else if (this.questionType === 'EVENT') {
+        return { name: 'Admin.Event.TestSet.Questions.Show', params: { question_id: questionId } }
+      }
+    },
     emitValues () {
       this.localValue = this.selectedQuestions
     },
@@ -295,7 +364,7 @@ export default {
     },
     getSessions () {
       this.sessions.loading = true
-      APIGateway.sessionTemplate.index({ unit: this.unitId, per_page: 999999 })
+      APIGateway.sessionTemplate.index({ unit: this.unitId || null, per_page: 999999 })
         .then((data) => {
           this.sessions = new SessionTemplateList(data.list)
           if (this.sessions.list.length > 0) {
@@ -303,14 +372,16 @@ export default {
           }
           this.filterQuestionList()
           this.sessions.loading = false
+          this.mounted = true
         })
         .catch(() => {
           this.sessions.loading = false
+          this.mounted = true
         })
     },
     getSessionQuestions () {
       this.sessions.loading = true
-      APIGateway.sessionTemplate.index({ unit: this.unitId, per_page: 999999 })
+      APIGateway.sessionTemplate.index({ unit: this.unitId || null, per_page: 999999 })
         .then((data) => {
           this.sessions = new SessionTemplateList(data.list)
           if (this.sessionOptions.length > 0) {
@@ -330,7 +401,7 @@ export default {
         return
       }
       array.forEach(item => {
-        const questionId = item.id || item.question
+        const questionId = item.question || item.id
         const mark = item.mark || 0
         const isExtraMark = item.is_extra_mark || false
         const selected = allSelected

+ 6 - 0
src/components/Template/SideBard/AdminPanelSideBar.vue

@@ -74,6 +74,12 @@ export default {
               routeName: 'Admin.Event.Index',
               show: true,
               active: false
+            },
+            {
+              title: 'پرسش نامه ها',
+              routeName: 'Admin.Event.TestSet.Index',
+              show: true,
+              active: false
             }
           ]
         },

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

@@ -198,6 +198,7 @@ export default {
             'classroomInfo',
             'sessions',
             'members',
+            'exams',
             'live_streaming_url'
           ]
         }

+ 20 - 5
src/components/Widgets/Classroom/AdminClassroomShow/components/TestList.vue

@@ -160,28 +160,43 @@ export default {
       return 'Admin.Classroom.Session.AttendanceSheetList'
     }
   },
+  created() {
+    this.setInputs()
+  },
   mounted () {
     this.setClassroomTypeOfInputs()
     this.mounted = true
   },
   methods: {
+    setInputs () {
+      if (this.classroomType === 'TRAINING') {
+        this.testListInputs = [
+          { type: 'hidden', name: 'classroom', value: this.classroomId }
+        ]
+      }
+      if (this.classroomType === 'EVENT') {
+        this.testListInputs = [
+          { type: 'hidden', name: 'event', value: this.classroomId }
+        ]
+      }
+    },
     setClassroomTypeOfInputs () {
       if (this.classroomType === 'TRAINING') {
         this.listTitle = 'لیست آزمون ها'
         this.addBtnTitle = 'افزودن آزمون'
       }
       if (this.classroomType === 'EVENT') {
-        this.listTitle = 'لیست برنامه ها'
-        this.addBtnTitle = 'افزودن برنامه'
+        this.listTitle = 'لیست پرسشنامه ها'
+        this.addBtnTitle = 'افزودن پرسشنامه'
         this.testListTable.columns.forEach(col => {
           if (col.name === 'title') {
-            col.label = 'عنوان برنامه'
+            col.label = 'عنوان پرسشنامه'
           }
           if (col.name === 'beginning_time') {
-            col.label = 'زمان شروع برنامه'
+            col.label = 'زمان شروع پرسشنامه'
           }
           if (col.name === 'ending_time') {
-            col.label = 'زمان پایان برنامه'
+            col.label = 'زمان پایان پرسشنامه'
           }
         })
       }

+ 118 - 0
src/components/Widgets/SessionTemplate/AdminEventQuestionCreate/AdminEventQuestionCreate.vue

@@ -0,0 +1,118 @@
+<template>
+  <div class="AdminEventQuestionCreate"
+       :style="localOptions.style">
+    <div class="flex justify-end">
+      <q-btn flat
+             color="grey"
+             @click="$router.go(-1)">
+        بازگشت
+        >
+      </q-btn>
+    </div>
+    <entity-create v-if="mounted"
+                   ref="entityEdit"
+                   v-model:value="inputs"
+                   title="ایجاد سوال جدید"
+                   :api="api"
+                   :entity-id-key="entityIdKey"
+                   :entity-param-key="entityParamKey"
+                   :show-route-name="showRouteName"
+                   :show-close-button="false"
+                   :show-edit-button="false"
+                   :show-expand-button="false"
+                   :show-save-button="false"
+                   :show-reload-button="false"
+                   :redirect-after-edit="false"
+                   :after-load-input-data="afterLoadInputData" />
+  </div>
+</template>
+
+<script>
+import { shallowRef } from 'vue'
+import { EntityCreate } from 'quasar-crud'
+import { mixinWidget } from 'src/mixin/Mixins.js'
+import { Question } from 'src/models/Question.js'
+import { APIGateway } from 'src/api/APIGateway.js'
+import BtnControl from 'src/components/Control/btn.vue'
+import { FormBuilderAssist } from 'quasar-form-builder'
+
+const BtnControlComp = shallowRef(BtnControl)
+
+export default {
+  name: 'AdminEventQuestionCreate',
+  components: {
+    EntityCreate
+  },
+  mixins: [mixinWidget],
+  data () {
+    return {
+      mounted: false,
+      entityLoading: true,
+      api: APIGateway.question.APIAdresses.base,
+      entityIdKey: 'id',
+      entityParamKey: 'id',
+      showRouteName: 'Admin.Event.TestSet.Questions.Show',
+      loadedData: new Question(),
+      inputs: [
+        { type: 'input', name: 'text', responseKey: 'text', label: 'سوال', placeholder: ' ', col: 'col-12' },
+        { type: 'inputEditor', name: 'correct_answer', responseKey: 'correct_answer', label: 'پاسخ', placeholder: ' ', col: 'col-12' },
+        { type: BtnControlComp, name: 'btn', label: 'ذخیره سوال', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' },
+        { type: 'hidden', name: 'type', responseKey: 'type', value: 'EVENT' }
+      ]
+    }
+  },
+  mounted() {
+    this.setActionBtn()
+    this.mounted = true
+  },
+  methods: {
+    setActionBtn () {
+      FormBuilderAssist.setAttributeByName(this.inputs, 'btn', 'atClick', this.edit)
+    },
+    afterLoadInputData () {
+      this.entityLoading = false
+    },
+    edit() {
+      this.entityLoading = true
+      this.$refs.entityEdit.createEntity(false)
+        .then((response) => {
+          this.$router.push({ name: 'Admin.Event.TestSet.Questions.Show', params: { question_id: response.data.id } })
+          this.entityLoading = false
+        })
+        .catch(() => {
+          this.entityLoading = false
+        })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.AdminEventQuestionCreate {
+  .title {
+    font-style: normal;
+    font-weight: 700;
+    font-size: 24px;
+    line-height: 140%;
+    color: #424242;
+    margin-bottom: 27px;
+    display: flex;
+    flex-flow: row;
+    position: relative;
+    .static-title {
+
+    }
+    .dynamic-title {
+
+    }
+    .back-action {
+      position: absolute;
+      right: 0;
+      top: 0;
+    }
+  }
+  :deep(.form) {
+    padding: 24px;
+  }
+}
+</style>

+ 21 - 0
src/components/Widgets/SessionTemplate/AdminEventQuestionCreate/OptionPanel.vue

@@ -0,0 +1,21 @@
+<template>
+  <option-panel-tabs v-model:options="localOptions">
+    <template #main-tab>
+      ...
+    </template>
+  </option-panel-tabs>
+</template>
+
+<script>
+import { defineComponent } from 'vue'
+import { mixinOptionPanel } from 'quasar-ui-q-page-builder'
+import OptionPanelTabs from 'quasar-ui-q-page-builder/src/components/OptionPanelComponents/OptionPanelTabs.vue'
+
+export default defineComponent({
+  name: 'OptionPanel',
+  components: {
+    OptionPanelTabs
+  },
+  mixins: [mixinOptionPanel]
+})
+</script>

+ 160 - 0
src/components/Widgets/SessionTemplate/AdminEventQuestionList/AdminEventQuestionList.vue

@@ -0,0 +1,160 @@
+<template>
+  <div class="AdminEventQuestionList"
+       :style="localOptions.style">
+    <!--    <q-skeleton v-if="mounted"-->
+    <!--                type="text"-->
+    <!--                width="200px" />-->
+    <!--    <breadcrumbs v-else-->
+    <!--                 style="margin-top: 29px; margin-bottom: 19px;" />-->
+    <div class="flex justify-end q-mb-md">
+      <q-btn label="ایجاد سوال جدید"
+             color="primary"
+             class="q-mr-md"
+             :to="{ name: 'Admin.Unit.Questions.Create', pragma: { unit_id: $route.params.unit_id, session_template_id: $route.params.session_template_id } }" />
+      <q-btn flat
+             color="grey"
+             @click="$router.go(-1)">
+        بازگشت
+        >
+      </q-btn>
+    </div>
+    <entity-index v-if="mounted"
+                  v-model:value="inputs"
+                  title="لیست سوالات"
+                  :api="api"
+                  :table="table"
+                  :table-keys="tableKeys"
+                  :create-route-name="createRouteName"
+                  :show-search-button="false"
+                  :show-expand-button="false"
+                  :show-reload-button="false">
+      <template #entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'action'">
+          <div class="action-column-entity-index">
+            <q-btn color="primary"
+                   outline
+                   round
+                   icon="drive_file_rename_outline"
+                   :to="{ name: 'Admin.Unit.Questions.Show', params: { unit_id: this.$route.params.unit_id, session_template_id: this.$route.params.session_template_id, id: inputData.props.row.id } }"
+                   class="q-mr-md" />
+            <delete-btn @click="showConfirmRemoveDialog(inputData.props.row, 'id', getRemoveMessage(inputData.props.row))" />
+          </div>
+        </template>
+        <template v-else>
+          {{ inputData.col.value }}
+        </template>
+      </template>
+    </entity-index>
+  </div>
+</template>
+
+<script>
+import { EntityIndex } from 'quasar-crud'
+import { Question } from 'src/models/Question.js'
+import { mixinWidget } from 'src/mixin/Mixins.js'
+import { APIGateway } from 'src/api/APIGateway.js'
+import DeleteBtn from 'src/components/Control/DeleteBtn.vue'
+// import Breadcrumbs from 'src/components/Widgets/Breadcrumbs/Breadcrumbs.vue'
+
+export default {
+  name: 'AdminEventQuestionList',
+  components: {
+    EntityIndex,
+    // Breadcrumbs,
+    DeleteBtn
+  },
+  mixins: [mixinWidget],
+  data () {
+    return {
+      api: APIGateway.question.APIAdresses.base,
+      tableKeys: {
+        data: 'results',
+        total: 'count',
+        currentPage: 'current',
+        perPage: 'per_page',
+        pageKey: 'page'
+      },
+      inputs: [
+        { type: 'hidden', name: 'type', value: 'QUESTION_BANK' },
+        { type: 'hidden', name: 'session_template_questions__session_template', value: this.$route.params.session_template_id }
+      ],
+      table: {
+        columns: [
+          {
+            name: 'number',
+            required: true,
+            label: 'شماره',
+            align: 'left',
+            field: () => ''
+          },
+          {
+            name: 'id',
+            required: true,
+            label: 'شناسه',
+            align: 'left',
+            field: row => row.id
+          },
+          {
+            name: 'text',
+            required: true,
+            label: 'سوال',
+            align: 'left',
+            field: row => row.text
+          },
+          {
+            name: 'mark',
+            required: true,
+            label: 'بارم',
+            align: 'left',
+            field: row => row.mark
+          },
+          {
+            name: 'level',
+            required: true,
+            label: 'سطح سوال',
+            align: 'left',
+            field: row => new Question(row).level_info.label
+          },
+          {
+            name: 'action',
+            required: true,
+            label: 'عملیات',
+            align: 'left',
+            field: row => ''
+          }
+        ]
+      },
+      mounted: false,
+      createRouteName: ''
+    }
+  },
+  mounted() {
+    this.mounted = true
+    // this.updateBreadcrumbs()
+  },
+  methods: {
+    updateBreadcrumbs () {
+      this.$store.commit('AppLayout/updateBreadcrumbs', {
+        visible: true,
+        loading: false,
+        path: [
+          // {
+          //   label: 'لیست ',
+          //   to: { name: this.indexPageRouteName }
+          // },
+          // {
+          //   label: 'this.classroom.title',
+          //   to: { name: this.showPageRouteName, params: { id: 12 } }
+          // }
+        ]
+      })
+    },
+    getRemoveMessage (row) {
+      return 'آیا از حذف (' + row.text + ') اطمینان دارید؟'
+    }
+  }
+}
+</script>

+ 21 - 0
src/components/Widgets/SessionTemplate/AdminEventQuestionList/OptionPanel.vue

@@ -0,0 +1,21 @@
+<template>
+  <option-panel-tabs v-model:options="localOptions">
+    <template #main-tab>
+      ...
+    </template>
+  </option-panel-tabs>
+</template>
+
+<script>
+import { defineComponent } from 'vue'
+import { mixinOptionPanel } from 'quasar-ui-q-page-builder'
+import OptionPanelTabs from 'quasar-ui-q-page-builder/src/components/OptionPanelComponents/OptionPanelTabs.vue'
+
+export default defineComponent({
+  name: 'OptionPanel',
+  components: {
+    OptionPanelTabs
+  },
+  mixins: [mixinOptionPanel]
+})
+</script>

+ 117 - 0
src/components/Widgets/SessionTemplate/AdminEventQuestionShow/AdminEventQuestionShow.vue

@@ -0,0 +1,117 @@
+<template>
+  <div class="AdminEventQuestionShow"
+       :style="localOptions.style">
+    <div class="flex justify-end">
+      <q-btn flat
+             color="grey"
+             @click="$router.go(-1)">
+        بازگشت
+        >
+      </q-btn>
+    </div>
+    <entity-edit v-if="mounted"
+                 ref="entityEdit"
+                 v-model:value="inputs"
+                 title="ایجاد سوال جدید"
+                 :api="api"
+                 :entity-id-key="entityIdKey"
+                 :entity-param-key="entityParamKey"
+                 :show-route-name="showRouteName"
+                 :show-close-button="false"
+                 :show-edit-button="false"
+                 :show-expand-button="false"
+                 :show-save-button="false"
+                 :show-reload-button="false"
+                 :redirect-after-edit="false"
+                 :after-load-input-data="afterLoadInputData" />
+  </div>
+</template>
+
+<script>
+import { shallowRef } from 'vue'
+import { EntityEdit } from 'quasar-crud'
+import { mixinWidget } from 'src/mixin/Mixins.js'
+import { APIGateway } from 'src/api/APIGateway.js'
+import { FormBuilderAssist } from 'quasar-form-builder'
+import BtnControl from 'src/components/Control/btn.vue'
+
+const BtnControlComp = shallowRef(BtnControl)
+
+export default {
+  name: 'AdminEventQuestionShow',
+  components: {
+    EntityEdit
+  },
+  mixins: [mixinWidget],
+  data () {
+    return {
+      mounted: false,
+      entityLoading: true,
+      api: APIGateway.question.APIAdresses.byId(this.$route.params.question_id),
+      entityIdKey: 'id',
+      entityParamKey: 'id',
+      showRouteName: 'Admin.Event.TestSet.Questions.Show',
+      inputs: [
+        { type: 'input', name: 'text', responseKey: 'text', label: 'سوال', placeholder: ' ', col: 'col-12' },
+        { type: 'inputEditor', name: 'correct_answer', responseKey: 'correct_answer', label: 'پاسخ', placeholder: ' ', col: 'col-12' },
+        { type: BtnControlComp, name: 'btn', label: 'ویرایش سوال', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' },
+        { type: 'hidden', name: 'type', responseKey: 'type', value: 'EVENT' }
+      ]
+    }
+  },
+  mounted() {
+    this.setActionBtn()
+    this.mounted = true
+  },
+  methods: {
+    setActionBtn () {
+      FormBuilderAssist.setAttributeByName(this.inputs, 'btn', 'atClick', this.edit)
+    },
+    afterLoadInputData () {
+      this.entityLoading = false
+    },
+    edit() {
+      this.entityLoading = true
+      this.$refs.entityEdit.editEntity(false)
+        .then(() => {
+          this.$refs.entityEdit.getData()
+          this.entityLoading = false
+        })
+        .catch(() => {
+          this.$refs.entityEdit.getData()
+          this.entityLoading = false
+        })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.AdminEventQuestionShow {
+  .title {
+    font-style: normal;
+    font-weight: 700;
+    font-size: 24px;
+    line-height: 140%;
+    color: #424242;
+    margin-bottom: 27px;
+    display: flex;
+    flex-flow: row;
+    position: relative;
+    .static-title {
+
+    }
+    .dynamic-title {
+
+    }
+    .back-action {
+      position: absolute;
+      right: 0;
+      top: 0;
+    }
+  }
+  :deep(.form) {
+    padding: 24px;
+  }
+}
+</style>

+ 21 - 0
src/components/Widgets/SessionTemplate/AdminEventQuestionShow/OptionPanel.vue

@@ -0,0 +1,21 @@
+<template>
+  <option-panel-tabs v-model:options="localOptions">
+    <template #main-tab>
+      ...
+    </template>
+  </option-panel-tabs>
+</template>
+
+<script>
+import { defineComponent } from 'vue'
+import { mixinOptionPanel } from 'quasar-ui-q-page-builder'
+import OptionPanelTabs from 'quasar-ui-q-page-builder/src/components/OptionPanelComponents/OptionPanelTabs.vue'
+
+export default defineComponent({
+  name: 'OptionPanel',
+  components: {
+    OptionPanelTabs
+  },
+  mixins: [mixinOptionPanel]
+})
+</script>

+ 1 - 1
src/components/Widgets/SessionTemplate/AdminSessionTemplateQuestionCreate/AdminSessionTemplateQuestionCreate.vue

@@ -77,7 +77,7 @@ export default {
     },
     edit() {
       this.entityLoading = true
-      this.$refs.entityEdit.editEntity(true)
+      this.$refs.entityEdit.editEntity(false)
         .then((response) => {
           this.$router.push({ name: 'Admin.Unit.Questions.Show', params: { unit_id: this.$route.params.unit_id, session_template_id: this.$route.params.session_template_id, id: response.data.id } })
           this.entityLoading = false

+ 1 - 1
src/components/Widgets/SessionTemplate/AdminSessionTemplateQuestionShow/AdminSessionTemplateQuestionShow.vue

@@ -57,7 +57,7 @@ export default {
         { type: 'inputEditor', name: 'correct_answer', responseKey: 'correct_answer', label: 'پاسخ', placeholder: ' ', col: 'col-12' },
         { type: 'input', name: 'mark', responseKey: 'mark', label: 'بارم پیشنهادی سوال', placeholder: ' ', col: 'col-md-3 col-12' },
         { type: 'select', name: 'level', responseKey: 'level', label: 'سطح سوال', placeholder: ' ', options: (new Question()).levelEnums, col: 'col-md-3 col-12' },
-        { type: BtnControlComp, name: 'btn', label: 'ذخیره سوال', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' },
+        { type: BtnControlComp, name: 'btn', label: 'ویرایش سوال', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' },
         { type: 'hidden', name: 'type', responseKey: 'type', value: 'QUESTION_BANK' }
       ]
     }

+ 109 - 0
src/components/Widgets/TestSet/AdminEventTestSetCreate/AdminEventTestSetCreate.vue

@@ -0,0 +1,109 @@
+<template>
+  <div class="AdminEventTestSetCreate"
+       :style="localOptions.style">
+    <div class="flex justify-end">
+      <q-btn flat
+             color="grey"
+             @click="$router.go(-1)">
+        بازگشت
+        >
+      </q-btn>
+    </div>
+    <entity-create v-if="mounted"
+                   ref="entityCreate"
+                   v-model:value="inputs"
+                   title="مشخصات پرسشنامه"
+                   :api="api"
+                   :entity-id-key="entityIdKey"
+                   :entity-param-key="entityParamKey"
+                   :show-route-name="showRouteName"
+                   :show-close-button="false"
+                   :show-edit-button="false"
+                   :show-expand-button="false"
+                   :show-save-button="false"
+                   :show-reload-button="false" />
+  </div>
+</template>
+
+<script>
+import { shallowRef } from 'vue'
+import { EntityCreate } from 'quasar-crud'
+import { mixinWidget } from 'src/mixin/Mixins.js'
+import { APIGateway } from 'src/api/APIGateway.js'
+import { FormBuilderAssist } from 'quasar-form-builder'
+import BtnControl from 'src/components/Control/btn.vue'
+import QuestionsSelector from 'src/components/FormBuilderCustumComponents/QuestionsSelector/QuestionsSelector.vue'
+
+const BtnControlComp = shallowRef(BtnControl)
+const QuestionsSelectorComp = shallowRef(QuestionsSelector)
+
+export default {
+  name: 'AdminEventTestSetCreate',
+  components: { EntityCreate },
+  mixins: [mixinWidget],
+  data () {
+    return {
+      mounted: false,
+      entityLoading: false,
+      api: APIGateway.testSet.APIAdresses.base,
+      entityIdKey: 'id',
+      entityParamKey: 'id',
+      showRouteName: 'Admin.Unit.TestSet.Show',
+      inputs: [
+        { type: 'input', name: 'title', responseKey: 'title', label: 'عنوان پرسشنامه', placeholder: ' ', col: 'col-md-6 col-12' },
+        { type: 'inputEditor', name: 'description', responseKey: 'description', label: 'توضیحات پرسشنامه', col: 'col-md-12 col-12' },
+        { type: 'hidden', name: 'type', responseKey: 'type', value: 'QUESTIONNAIRE' },
+        { type: BtnControlComp, name: 'btnCreateQuestion', responseKey: 'btnCreateQuestion', label: 'تعریف سوال جدید', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' },
+        { type: QuestionsSelectorComp, name: 'test_set_questions', responseKey: 'test_set_questions', unitId: false, questionType: 'EVENT', col: 'col-md-12 col-12' },
+        { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'تایید نهایی', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' }
+      ]
+    }
+  },
+  mounted() {
+    this.setActionBtn()
+    this.mounted = true
+  },
+  methods: {
+    setActionBtn () {
+      FormBuilderAssist.setAttributeByName(this.inputs, 'btn', 'atClick', this.create)
+      FormBuilderAssist.setAttributeByName(this.inputs, 'btnCreateQuestion', 'atClick', this.goToCreateQuestionPage)
+    },
+    goToCreateQuestionPage () {
+      this.$router.push({ name: 'Admin.Event.TestSet.Questions.Create', params: { test_set_id: this.$route.params.test_set_id } })
+    },
+    create() {
+      this.entityLoading = true
+      this.$refs.entityCreate.createEntity(false)
+        .then((response) => {
+          this.$router.push({ name: 'Admin.Event.TestSet.Show', params: { test_set_id: response.data.id } })
+          this.entityLoading = false
+        })
+        .catch(() => {
+          this.entityLoading = false
+        })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.AdminEventTestSetCreate {
+  .title {
+    font-style: normal;
+    font-weight: 700;
+    font-size: 24px;
+    line-height: 140%;
+    color: #424242;
+    margin-bottom: 27px;
+    position: relative;
+    .back-action {
+      position: absolute;
+      right: 0;
+      top: 0;
+    }
+  }
+  :deep(.form) {
+    padding: 24px;
+  }
+}
+</style>

+ 21 - 0
src/components/Widgets/TestSet/AdminEventTestSetCreate/OptionPanel.vue

@@ -0,0 +1,21 @@
+<template>
+  <option-panel-tabs v-model:options="localOptions">
+    <template #main-tab>
+      ...
+    </template>
+  </option-panel-tabs>
+</template>
+
+<script>
+import { defineComponent } from 'vue'
+import { mixinOptionPanel } from 'quasar-ui-q-page-builder'
+import OptionPanelTabs from 'quasar-ui-q-page-builder/src/components/OptionPanelComponents/OptionPanelTabs.vue'
+
+export default defineComponent({
+  name: 'OptionPanel',
+  components: {
+    OptionPanelTabs
+  },
+  mixins: [mixinOptionPanel]
+})
+</script>

+ 155 - 0
src/components/Widgets/TestSet/AdminEventTestSetIndex/AdminEventTestSetIndex.vue

@@ -0,0 +1,155 @@
+<template>
+  <div>
+    <div class="flex justify-end">
+      <q-btn flat
+             color="grey"
+             @click="$router.go(-1)">
+        بازگشت
+        >
+      </q-btn>
+    </div>
+    <entity-index v-if="mounted"
+                  ref="testSetList"
+                  v-model:value="testSetListInputs"
+                  title="لیست پرسشنامه ها"
+                  :api="testSetListApi"
+                  :table="testSetListTable"
+                  :table-keys="testSetListTableKeys"
+                  :show-search-button="false"
+                  :show-reload-button="false"
+                  :show-expand-button="false">
+      <template #toolbar>
+        <q-btn color="primary"
+               outline
+               :to="{name: 'Admin.Event.TestSet.Create'}">
+          تعریف پرسشنامه جدید
+        </q-btn>
+      </template>
+      <template v-slot:entity-index-table-cell="{inputData}">
+        <template v-if="inputData.col.name === 'number'">
+          {{ inputData.rowNumber }}
+        </template>
+        <template v-else-if="inputData.col.name === 'actions'">
+          <div class="action-column-entity-index">
+            <q-btn size="md"
+                   color="primary"
+                   label="انتخاب"
+                   :to="{name: 'Admin.Event.TestSet.Show', params: {test_set_id:inputData.props.row.id}}"
+                   :loading="createInvoiceLoading"
+                   class="q-mr-md" />
+          </div>
+        </template>
+        <template v-else>
+          {{ inputData.col.value }}
+        </template>
+      </template>
+    </entity-index>
+    <q-skeleton v-else
+                type="rect"
+                height="200px" />
+  </div>
+</template>
+
+<script>
+import { EntityIndex } from 'quasar-crud'
+import ShamsiDate from 'src/assets/ShamsiDate.js'
+import { APIGateway } from 'src/api/APIGateway.js'
+import { Classroom } from 'src/models/Classroom.js'
+import { mixinAuthData } from 'src/mixin/Mixins.js'
+import { FormBuilderAssist } from 'quasar-form-builder'
+
+export default {
+  name: 'AdminEventTestSetIndex',
+  components: {
+    EntityIndex
+  },
+  mixins: [mixinAuthData],
+  data () {
+    return {
+      mounted: false,
+      createInvoiceLoading: false,
+      classroom: new Classroom(),
+
+      dropClassroomByAdminLoading: false,
+      exportReportLoading: false,
+      testSetListInputs: [
+        { type: 'hidden', name: 'type', value: 'QUESTIONNAIRE' }
+      ],
+      testSetListApi: APIGateway.testSet.APIAdresses.base,
+      testSetListTable: {
+        columns: [
+          {
+            name: 'number',
+            required: true,
+            label: 'شماره',
+            align: 'left',
+            field: () => ''
+          },
+          {
+            name: 'id',
+            required: true,
+            label: 'شناسه',
+            align: 'left',
+            field: row => row.id
+          },
+          {
+            name: 'title',
+            required: true,
+            label: 'عنوان پرسشنامه',
+            align: 'left',
+            field: row => row.title
+          },
+          {
+            name: 'test_set_questions.length',
+            required: true,
+            label: 'تعداد سوالات',
+            align: 'left',
+            field: row => row.test_set_questions.length
+          },
+          {
+            name: 'beginning_time',
+            required: true,
+            label: 'تاریخ ایجاد',
+            align: 'left',
+            field: row => row.creation_time ? ShamsiDate.getDateTime(row.creation_time) : '-'
+          },
+          {
+            name: 'creator_info',
+            required: true,
+            label: 'ایجاد کننده',
+            align: 'left',
+            field: row => row.creator_info.firstname + ' ' + row.creator_info.lastname
+          },
+          {
+            name: 'actions',
+            required: true,
+            label: 'انتخاب',
+            align: 'left',
+            field: ''
+          }
+        ]
+      },
+      testSetListTableKeys: {
+        data: 'results',
+        total: 'count',
+        currentPage: 'current',
+        perPage: 'per_page',
+        pageKey: 'page'
+      }
+    }
+  },
+  mounted () {
+    this.setMembersListActionBtn()
+    FormBuilderAssist.setAttributeByName(this.testSetListInputs, 'leader', 'value', this.user.id)
+    this.mounted = true
+  },
+  methods: {
+    setMembersListActionBtn () {
+      FormBuilderAssist.setAttributeByName(this.testSetListInputs, 'btn', 'atClick', this.searchMembersList)
+    },
+    searchMembersList () {
+      this.$refs.testSetList.search()
+    }
+  }
+}
+</script>

+ 21 - 0
src/components/Widgets/TestSet/AdminEventTestSetIndex/OptionPanel.vue

@@ -0,0 +1,21 @@
+<template>
+  <option-panel-tabs v-model:options="localOptions">
+    <template #main-tab>
+      ...
+    </template>
+  </option-panel-tabs>
+</template>
+
+<script>
+import { defineComponent } from 'vue'
+import { mixinOptionPanel } from 'quasar-ui-q-page-builder'
+import OptionPanelTabs from 'quasar-ui-q-page-builder/src/components/OptionPanelComponents/OptionPanelTabs.vue'
+
+export default defineComponent({
+  name: 'OptionPanel',
+  components: {
+    OptionPanelTabs
+  },
+  mixins: [mixinOptionPanel]
+})
+</script>

+ 110 - 0
src/components/Widgets/TestSet/AdminEventTestSetShow/AdminEventTestSetShow.vue

@@ -0,0 +1,110 @@
+<template>
+  <div class="AdminEventTestSetShow"
+       :style="localOptions.style">
+    <div class="flex justify-end">
+      <q-btn flat
+             color="grey"
+             @click="$router.go(-1)">
+        بازگشت
+        >
+      </q-btn>
+    </div>
+    <entity-edit v-if="mounted"
+                 ref="entityEdit"
+                 v-model:value="inputs"
+                 title="مشخصات آزمون"
+                 :api="api"
+                 :entity-id-key="entityIdKey"
+                 :entity-param-key="entityParamKey"
+                 :show-close-button="false"
+                 :show-edit-button="false"
+                 :show-expand-button="false"
+                 :show-save-button="false"
+                 :show-reload-button="false"
+                 :redirect-after-edit="false" />
+  </div>
+</template>
+
+<script>
+import { shallowRef } from 'vue'
+import { EntityEdit } from 'quasar-crud'
+import { mixinWidget } from 'src/mixin/Mixins.js'
+import { APIGateway } from 'src/api/APIGateway.js'
+import { FormBuilderAssist } from 'quasar-form-builder'
+import BtnControl from 'src/components/Control/btn.vue'
+import QuestionsSelector from 'src/components/FormBuilderCustumComponents/QuestionsSelector/QuestionsSelector.vue'
+
+const BtnControlComp = shallowRef(BtnControl)
+const QuestionsSelectorComp = shallowRef(QuestionsSelector)
+
+export default {
+  name: 'AdminEventTestSetShow',
+  components: { EntityEdit },
+  mixins: [mixinWidget],
+  data () {
+    const testSetId = this.$route.params.test_set_id
+    return {
+      mounted: false,
+      entityLoading: false,
+      api: APIGateway.testSet.APIAdresses.byId(testSetId),
+      entityIdKey: 'id',
+      entityParamKey: 'id',
+      inputs: [
+        { type: 'input', name: 'title', responseKey: 'title', label: 'عنوان آزمون', placeholder: ' ', col: 'col-md-12 col-12' },
+        { type: 'inputEditor', name: 'description', responseKey: 'description', label: 'توضیحات آزمون', col: 'col-md-12 col-12' },
+        { type: 'hidden', name: 'id', responseKey: 'id' },
+        { type: 'hidden', name: 'type', responseKey: 'type', value: 'QUESTIONNAIRE' },
+        { type: BtnControlComp, name: 'btnCreateQuestion', responseKey: 'btnCreateQuestion', label: 'تعریف سوال جدید', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' },
+        { type: QuestionsSelectorComp, name: 'test_set_questions', responseKey: 'test_set_questions', unitId: false, questionType: 'EVENT', col: 'col-md-12 col-12' },
+        { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'تایید نهایی', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' }
+      ]
+    }
+  },
+  mounted() {
+    this.setActionBtn()
+    this.mounted = true
+  },
+  methods: {
+    setActionBtn () {
+      FormBuilderAssist.setAttributeByName(this.inputs, 'btn', 'atClick', this.edit)
+      FormBuilderAssist.setAttributeByName(this.inputs, 'btnCreateQuestion', 'atClick', this.goToCreateQuestionPage)
+    },
+    goToCreateQuestionPage () {
+      this.$router.push({ name: 'Admin.Event.TestSet.Questions.Create', params: { test_set_id: this.$route.params.test_set_id } })
+    },
+    edit() {
+      this.entityLoading = true
+      this.$refs.entityEdit.editEntity()
+        .then(() => {
+          this.$refs.entityEdit.getData()
+          this.entityLoading = false
+        })
+        .catch(() => {
+          this.entityLoading = false
+        })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.AdminEventTestSetShow {
+  .title {
+    font-style: normal;
+    font-weight: 700;
+    font-size: 24px;
+    line-height: 140%;
+    color: #424242;
+    margin-bottom: 27px;
+    position: relative;
+    .back-action {
+      position: absolute;
+      right: 0;
+      top: 0;
+    }
+  }
+  :deep(.form) {
+    padding: 24px;
+  }
+}
+</style>

+ 21 - 0
src/components/Widgets/TestSet/AdminEventTestSetShow/OptionPanel.vue

@@ -0,0 +1,21 @@
+<template>
+  <option-panel-tabs v-model:options="localOptions">
+    <template #main-tab>
+      ...
+    </template>
+  </option-panel-tabs>
+</template>
+
+<script>
+import { defineComponent } from 'vue'
+import { mixinOptionPanel } from 'quasar-ui-q-page-builder'
+import OptionPanelTabs from 'quasar-ui-q-page-builder/src/components/OptionPanelComponents/OptionPanelTabs.vue'
+
+export default defineComponent({
+  name: 'OptionPanel',
+  components: {
+    OptionPanelTabs
+  },
+  mixins: [mixinOptionPanel]
+})
+</script>

+ 23 - 0
src/pages/Admin/Event/Question/Create.vue

@@ -0,0 +1,23 @@
+<template>
+  <q-page-builder v-model:sections="currenSections"
+                  v-model:options="pageConfig"
+                  :editable="pageBuilderEditable"
+                  :loading="pageBuilderLoading" />
+</template>
+
+<script>
+import { mixinPageOptions } from 'src/mixin/Mixins.js'
+
+export default {
+  name: 'Admin.Event.TestSet.Questions.Create',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminEventQuestionCreate' }] }] }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 23 - 0
src/pages/Admin/Event/Question/Index.vue

@@ -0,0 +1,23 @@
+<template>
+  <q-page-builder v-model:sections="currenSections"
+                  v-model:options="pageConfig"
+                  :editable="pageBuilderEditable"
+                  :loading="pageBuilderLoading" />
+</template>
+
+<script>
+import { mixinPageOptions } from 'src/mixin/Mixins.js'
+
+export default {
+  name: 'Admin.Event.TestSet.Questions.Index',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminEventQuestionList' }] }] }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 23 - 0
src/pages/Admin/Event/Question/Show.vue

@@ -0,0 +1,23 @@
+<template>
+  <q-page-builder v-model:sections="currenSections"
+                  v-model:options="pageConfig"
+                  :editable="pageBuilderEditable"
+                  :loading="pageBuilderLoading" />
+</template>
+
+<script>
+import { mixinPageOptions } from 'src/mixin/Mixins.js'
+
+export default {
+  name: 'Admin.Event.TestSet.Questions.Show',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminEventQuestionShow' }] }] }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 23 - 0
src/pages/Admin/Event/Test/Create.vue

@@ -0,0 +1,23 @@
+<template>
+  <q-page-builder v-model:sections="currenSections"
+                  v-model:options="pageConfig"
+                  :editable="pageBuilderEditable"
+                  :loading="pageBuilderLoading" />
+</template>
+
+<script>
+import { mixinPageOptions } from 'src/mixin/Mixins.js'
+
+export default {
+  name: 'Admin.Event.TestSet.Create',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminEventTestSetCreate' }] }] }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 23 - 0
src/pages/Admin/Event/Test/Index.vue

@@ -0,0 +1,23 @@
+<template>
+  <q-page-builder v-model:sections="currenSections"
+                  v-model:options="pageConfig"
+                  :editable="pageBuilderEditable"
+                  :loading="pageBuilderLoading" />
+</template>
+
+<script>
+import { mixinPageOptions } from 'src/mixin/Mixins.js'
+
+export default {
+  name: 'Admin.Event.TestSet.Index',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminEventTestSetIndex' }] }] }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 23 - 0
src/pages/Admin/Event/Test/Show.vue

@@ -0,0 +1,23 @@
+<template>
+  <q-page-builder v-model:sections="currenSections"
+                  v-model:options="pageConfig"
+                  :editable="pageBuilderEditable"
+                  :loading="pageBuilderLoading" />
+</template>
+
+<script>
+import { mixinPageOptions } from 'src/mixin/Mixins.js'
+
+export default {
+  name: 'Admin.Event.TestSet.Show',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminEventTestSetShow' }] }] }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 8 - 33
src/router/routes.js

@@ -693,41 +693,16 @@ const routes = [
               { name: 'Admin.Event.Project.Show', path: ':classroom_id/project/:project_id', component: () => import('src/pages/Admin/Event/project/show.vue') },
               { name: 'Admin.Event.Project.Members', path: ':classroom_id/project/:project_id/members', component: () => import('src/pages/Admin/Event/project/members.vue') },
               { name: 'Admin.Event.projectAttendanceSheets.Show', path: ':classroom_id/project/:project_id/projectAttendanceSheet/:project_attendance_sheets_id', component: () => import('src/pages/Admin/Event/ProjectAttendanceSheet/show.vue') },
-              { name: 'Admin.Event.Project', path: ':id', component: () => import('src/pages/Admin/Event/show.vue') },
-              { name: 'Admin.Event.Ticket', path: 'ticket', component: () => import('src/pages/Admin/Event/Ticket.vue'), breadcrumbs: { title: 'درخواست ها دوره های آموزشی' } }
+              // { name: 'Admin.Event.Project', path: ':id', component: () => import('src/pages/Admin/Event/show.vue') },
+              { name: 'Admin.Event.Ticket', path: 'ticket', component: () => import('src/pages/Admin/Event/Ticket.vue'), breadcrumbs: { title: 'درخواست ها دوره های آموزشی' } },
 
-              // {
-              //   name: 'Admin.Event.TestSet',
-              //   path: ':event_id/test_set',
-              //   component: () => import('src/layouts/bareLayout.vue'),
-              //   children: [
-              //     { name: 'Admin.Event.TestSet.Show', path: ':id', component: () => import('src/pages/Admin/TestSet/Show.vue') },
-              //     { name: 'Admin.Event.TestSet.Create', path: 'create', component: () => import('src/pages/Admin/TestSet/Create.vue') },
-              //     {
-              //       name: 'Admin.Event.TestSet.Questions',
-              //       path: ':test_set_id/questions',
-              //       component: () => import('src/layouts/bareLayout.vue'),
-              //       children: [
-              //         { name: 'Admin.Event.TestSet.Questions.Index', path: '', component: () => import('src/pages/Admin/Unit/QuestionsList.vue') },
-              //         { name: 'Admin.Event.TestSet.Questions.Create', path: 'create', component: () => import('src/pages/Admin/Unit/QuestionsCreate.vue') },
-              //         { name: 'Admin.Event.TestSet.Questions.Show', path: ':id', component: () => import('src/pages/Admin/Unit/QuestionsShow.vue') }
-              //       ]
-              //     }
-              //   ]
-              // }
-
-              // {
-              //   name: 'Admin.Event.Questions',
-              //   path: ':event_id/test_set/:test_set_id/questions',
-              //   component: () => import('src/layouts/bareLayout.vue'),
-              //   children: [
-              //     { name: 'Admin.Event.Questions.Index', path: '', component: () => import('src/pages/Admin/Unit/QuestionsList.vue') },
-              //     { name: 'Admin.Event.Questions.Create', path: 'create', component: () => import('src/pages/Admin/Unit/QuestionsCreate.vue') }
-              //     // { name: 'Admin.Unit.Questions.Show', path: ':id', component: () => import('src/pages/Admin/Unit/QuestionsShow.vue') }
-              //   ]
-              // },
-              // { name: 'Admin.Event.Questions.Show', path: ':event_id/questions/:id', component: () => import('src/pages/Admin/Unit/QuestionsShow.vue') }
+              { name: 'Admin.Event.TestSet.Index', path: 'test_set', component: () => import('src/pages/Admin/Event/Test/Index.vue') },
+              { name: 'Admin.Event.TestSet.Create', path: 'test_set/create', component: () => import('src/pages/Admin/Event/Test/Create.vue') },
+              { name: 'Admin.Event.TestSet.Show', path: 'test_set/:test_set_id', component: () => import('src/pages/Admin/Event/Test/Show.vue') },
 
+              { name: 'Admin.Event.TestSet.Questions.Index', path: 'test_set/:test_set_id/questions', component: () => import('src/pages/Admin/Event/Question/Index.vue') },
+              { name: 'Admin.Event.TestSet.Questions.Create', path: 'test_set/questions/create', component: () => import('src/pages/Admin/Event/Question/Create.vue') },
+              { name: 'Admin.Event.TestSet.Questions.Show', path: 'test_set/questions/:question_id', component: () => import('src/pages/Admin/Event/Question/Show.vue') }
             ]
           },
           {