浏览代码

برای تعریف پیش نیاز برای هر دوره ای خودمون بتونیم کدملی وارد کنیم. (در درس)

hgh 1 年之前
父节点
当前提交
455845c06f

+ 2 - 0
src/api/APIGateway.js

@@ -45,6 +45,7 @@ import QuestionChoiceApi from 'src/api/models/QuestionChoice.js'
 import TicketCategoryAPI from 'src/api/models/TicketCategory.js'
 import SessionTemplateAPI from 'src/api/models/SessionTemplate.js'
 import TranscriptSheetAPI from 'src/api/models/TranscriptSheet.js'
+import TranscriptSheetHistoryAPI from 'src/api/models/TranscriptSheetHistory.js'
 import ContentCategoryAPI from 'src/api/models/ContentCategory.js'
 import InstalmentOfferAPI from 'src/api/models/InstalmentOffer.js'
 import ClassroomGraderAPI from 'src/api/models/ClassroomGraders.js'
@@ -105,6 +106,7 @@ export const APIGateway = {
   ticketCategory: new TicketCategoryAPI(),
   questionChoice: new QuestionChoiceApi(),
   transcriptSheet: new TranscriptSheetAPI(),
+  transcriptSheetHistory: new TranscriptSheetHistoryAPI(),
   sessionTemplate: new SessionTemplateAPI(),
   contentCategory: new ContentCategoryAPI(),
   instalmentOffer: new InstalmentOfferAPI(),

+ 84 - 0
src/api/models/TranscriptSheetHistory.js

@@ -0,0 +1,84 @@
+import { appApi } from 'src/boot/axios.js'
+import APIRepository from '../classes/APIRepository.js'
+import { TranscriptSheetHistory, TranscriptSheetHistoryList } from 'src/models/TranscriptSheetHistory.js'
+
+export default class TranscriptSheetHistoryAPI extends APIRepository {
+  constructor() {
+    super('TranscriptSheetHistory', appApi, '/lma/categories', TranscriptSheetHistory)
+    this.APIAdresses = {
+      base: '/lma/transcript_sheet_histories',
+      byId: (id) => '/lma/transcript_sheet_histories/' + id,
+      appendQuestion: (id) => '/lma/transcript_sheet_histories/' + id + '/append_question'
+    }
+    this.CacheList = {
+      base: this.name + this.APIAdresses.base,
+      byId: (id) => this.name + this.APIAdresses.byId(id)
+    }
+  }
+
+  index(data) {
+    return this.sendRequest({
+      apiMethod: 'get',
+      api: this.api,
+      request: this.APIAdresses.base,
+      data: this.getNormalizedSendData({
+        unit: null, // Number
+        category: null, // Number
+        per_page: 10, // Number
+        page: 1 // Number
+      }, data),
+      resolveCallback: (response) => {
+        const paginate = response.data
+        const results = response.data.results
+        delete paginate.results
+        return {
+          list: new TranscriptSheetHistoryList(results),
+          paginate
+          // {
+          //   "count": 1,
+          //   "num_pages": 1,
+          //   "per_page": 10,
+          //   "current": 1,
+          //   "next": null,
+          //   "previous": null,
+          // }
+        }
+      },
+      rejectCallback: (error) => {
+        return error
+      }
+    })
+  }
+
+  get (id) {
+    return this.sendRequest({
+      apiMethod: 'get',
+      api: this.api,
+      request: this.APIAdresses.byId(id),
+      resolveCallback: (response) => {
+        return new TranscriptSheetHistory(response.data)
+      },
+      rejectCallback: (error) => {
+        return error
+      }
+    })
+  }
+
+  create (data) {
+    return this.sendRequest({
+      apiMethod: 'post',
+      api: this.api,
+      request: this.APIAdresses.base,
+      data: this.getNormalizedSendData({
+        title: null, // String
+        unit: null // Number
+      }, data),
+      resolveCallback: (response) => {
+        return new TranscriptSheetHistory(response.data)
+      },
+      rejectCallback: (error) => {
+        return error
+      }
+    })
+  }
+}

+ 102 - 0
src/components/Widgets/TranscriptSheetHistory/AdminTranscriptSheetHistoryCreate/AdminTranscriptSheetHistoryCreate.vue

@@ -0,0 +1,102 @@
+<template>
+  <div class="AdminTestCreate"
+       :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'
+
+const BtnControlComp = shallowRef(BtnControl)
+
+export default {
+  name: 'AdminTranscriptSheetHistoryCreate',
+  components: { EntityCreate },
+  mixins: [mixinWidget],
+  data () {
+    const unitId = this.$route.params.unit_id
+    return {
+      mounted: false,
+      entityLoading: false,
+      api: APIGateway.transcriptSheetHistory.APIAdresses.base,
+      entityIdKey: 'id',
+      entityParamKey: 'id',
+      showRouteName: 'Admin.Unit.TranscriptSheetHistory.Show',
+      inputs: [
+        { type: 'input', name: 'national_code', responseKey: 'national_code', label: 'کد ملی', placeholder: ' ', col: 'col-md-6 col-12' },
+        { type: 'input', name: 'score', responseKey: 'score', label: 'نمره', placeholder: ' ', col: 'col-md-6 col-12' },
+        { type: 'hidden', name: 'unit', responseKey: 'unit', value: unitId },
+        { 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)
+    },
+    create() {
+      this.entityLoading = true
+      this.$refs.entityCreate.createEntity()
+        .then((response) => {
+          this.$router.push({ name: 'Admin.Unit.TranscriptSheetHistory.Show', params: { unit_id: this.$route.params.unit_id, id: response.data.id } })
+          this.entityLoading = false
+        })
+        .catch(() => {
+          this.entityLoading = false
+        })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.AdminTestCreate {
+  .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/TranscriptSheetHistory/AdminTranscriptSheetHistoryCreate/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>

+ 135 - 0
src/components/Widgets/TranscriptSheetHistory/AdminTranscriptSheetHistoryIndex/AdminTranscriptSheetHistoryIndex.vue

@@ -0,0 +1,135 @@
+<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="transcriptSheetHistoryList"
+                  v-model:value="transcriptSheetHistoryListInputs"
+                  :title="'لیست تاریخچه نمرات'"
+                  :api="transcriptSheetHistoryListApi"
+                  :table="transcriptSheetHistoryListTable"
+                  :table-keys="transcriptSheetHistoryListTableKeys"
+                  :show-search-button="false"
+                  :show-reload-button="false"
+                  :show-expand-button="false">
+      <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.Classroom.TranscriptSheetHistory.Test.Create', params: {classroom_id: $route.params.classroom_id, test_set_id:inputData.props.row.id}, query: $route.query}"
+                   :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 { TranscriptSheetHistory } from 'src/models/TranscriptSheetHistory.js'
+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: 'TranscriptSheetHistoryShow',
+  components: {
+    EntityIndex
+  },
+  mixins: [mixinAuthData],
+  data () {
+    return {
+      mounted: false,
+      createInvoiceLoading: false,
+      classroom: new Classroom(),
+
+      dropClassroomByAdminLoading: false,
+      exportReportLoading: false,
+      transcriptSheetHistoryListInputs: [
+        { type: 'hidden', name: 'unit', value: this.$route.params.unit_id },
+      ],
+      transcriptSheetHistoryListApi: APIGateway.transcriptSheetHistory.APIAdresses.base,
+      transcriptSheetHistoryListTable: {
+        columns: [
+          {
+            name: 'id',
+            required: true,
+            label: 'شناسه',
+            align: 'left',
+            field: row => row.id
+          },
+          {
+            name: 'national_code',
+            required: true,
+            label: 'کد ملی',
+            align: 'left',
+            field: row => row.national_code
+          },
+          {
+            name: 'score',
+            required: true,
+            label: 'نمره',
+            align: 'left',
+            field: row => row.score
+          },
+          {
+            name: 'creation_time',
+            required: true,
+            label: 'تاریخ ایجاد',
+            align: 'left',
+            field: row => ShamsiDate.getDateTime(row.creation_time)
+          },
+          {
+            name: 'last_modification_time',
+            required: true,
+            label: 'تاریخ آخرین تغییر',
+            align: 'left',
+            field: row => ShamsiDate.getDateTime(row.last_modification_time)
+          },
+          {
+            name: 'actions',
+            required: true,
+            label: 'عملیات',
+            align: 'left',
+            field: ''
+          }
+        ]
+      },
+      transcriptSheetHistoryListTableKeys: {
+        data: 'results',
+        total: 'count',
+        currentPage: 'current',
+        perPage: 'per_page',
+        pageKey: 'page'
+      }
+    }
+  },
+  mounted () {
+    this.$refs.transcriptSheetHistoryList.search()
+    this.mounted = true
+  },
+  methods: {
+  }
+}
+</script>

+ 21 - 0
src/components/Widgets/TranscriptSheetHistory/AdminTranscriptSheetHistoryIndex/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>

+ 176 - 0
src/components/Widgets/TranscriptSheetHistory/AdminTranscriptSheetHistoryShow/AdminTranscriptSheetHistoryShow.vue

@@ -0,0 +1,176 @@
+<template>
+  <div class="AdminTestShow"
+       :style="localOptions.style">
+    <q-skeleton v-if="!unit.id || !transcriptSheetHistory.id"
+                type="text"
+                width="200px" />
+    <breadcrumbs v-else
+                 style="margin-top: 29px; margin-bottom: 19px;" />
+    <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 { Unit } from 'src/models/Unit.js'
+import { TranscriptSheetHistory } from 'src/models/TranscriptSheetHistory.js'
+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 Breadcrumbs from 'src/components/Widgets/Breadcrumbs/Breadcrumbs.vue'
+
+const BtnControlComp = shallowRef(BtnControl)
+
+export default {
+  name: 'AdminTestShow',
+  components: { EntityEdit, Breadcrumbs },
+  mixins: [mixinWidget],
+  data () {
+    const unitId = this.$route.params.unit_id
+    const transcriptSheetHistoryId = this.$route.params.id
+    return {
+      mounted: false,
+      unit: new Unit(),
+      TranscriptSheetHistory: new TranscriptSheetHistory(),
+      entityLoading: false,
+      api: APIGateway.transcriptSheetHistory.APIAdresses.byId(transcriptSheetHistoryId),
+      entityIdKey: 'id',
+      entityParamKey: 'id',
+      inputs: [
+        { type: 'input', name: 'national_code', responseKey: 'national_code', label: 'کد ملی', placeholder: ' ', col: 'col-md-6 col-12' },
+        { type: 'input', name: 'score', responseKey: 'score', label: 'نمره', placeholder: ' ', col: 'col-md-6 col-12' },
+        { type: 'hidden', name: 'unit', responseKey: 'unit', value: unitId },
+        { type: 'hidden', name: 'id', responseKey: 'id' },
+        { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'تایید نهایی', placeholder: ' ', atClick: () => {}, col: 'col-12 flex justify-end' }
+      ]
+    }
+  },
+  mounted() {
+    this.setActionBtn()
+    this.mounted = true
+    Promise.all([
+      this.getUnit(),
+      this.getTranscriptSheetHistory()
+    ])
+      .then(() => {
+        this.updateBreadcrumbs()
+      })
+      .catch(() => {
+      })
+  },
+  methods: {
+    setActionBtn () {
+      FormBuilderAssist.setAttributeByName(this.inputs, 'btn', 'atClick', this.edit)
+    },
+    edit() {
+      this.entityLoading = true
+      this.$refs.entityEdit.editEntity()
+        .then(() => {
+          this.$refs.entityEdit.getData()
+          this.entityLoading = false
+        })
+        .catch(() => {
+          this.entityLoading = false
+        })
+    },
+    getUnit () {
+      return new Promise((resolve, reject) => {
+        this.unit.loading = true
+        APIGateway.unit.get(this.$route.params.unit_id)
+          .then((unit) => {
+            this.unit = new Unit(unit)
+            this.unit.loading = false
+            resolve()
+          })
+          .catch(() => {
+            this.unit.loading = false
+            reject()
+          })
+      })
+    },
+    getTranscriptSheetHistory () {
+      return new Promise((resolve, reject) => {
+        this.transcriptSheetHistory.loading = true
+        APIGateway.transcriptSheetHistory.get(this.$route.params.id)
+          .then((transcriptSheetHistory) => {
+            this.transcriptSheetHistory = new TranscriptSheetHistory(transcriptSheetHistory)
+            this.transcriptSheetHistory.loading = false
+            resolve()
+          })
+          .catch(() => {
+            this.transcriptSheetHistory.loading = false
+            reject()
+          })
+      })
+    },
+    updateBreadcrumbs () {
+      this.$store.commit('AppLayout/updateBreadcrumbs', {
+        visible: true,
+        loading: false,
+        path: [
+          {
+            label: 'درس ها و چارت آموزشی',
+            to: { name: 'Admin.Category.Index' }
+          },
+          {
+            label: this.unit.category_info.title,
+            to: { name: 'Admin.Category.Show', params: { id: this.unit.category_info.id } }
+          },
+          {
+            label: this.unit.title,
+            to: { name: 'Admin.Unit.Show', params: { id: this.unit.id } }
+          },
+          {
+            // label: this.testSet.title
+            label: 'تاریخچه نمره'
+          }
+        ]
+      })
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.AdminTestShow {
+  .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/TranscriptSheetHistory/AdminTranscriptSheetHistoryShow/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>

+ 26 - 0
src/models/TranscriptSheetHistory.js

@@ -0,0 +1,26 @@
+import { Unit } from 'src/models/Unit.js'
+import { Model, Collection } from 'js-abstract-model'
+
+class TranscriptSheetHistory extends Model {
+  constructor (data) {
+    super(data, [
+      { key: 'id' },
+      { key: 'unit' },
+      {
+        key: 'unit_info',
+        relatedModel: Unit
+      },
+      { key: 'national_code' },
+      { key: 'score' },
+      { key: 'creation_time' },
+      { key: 'last_modification_time' }
+    ])
+  }
+}
+
+class TranscriptSheetHistoryList extends Collection {
+  model () {
+    return TranscriptSheetHistory
+  }
+}
+export { TranscriptSheetHistory, TranscriptSheetHistoryList }

+ 23 - 0
src/pages/Admin/TranscriptSheetHistory/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.Unit.TranscriptSheetHistory.Create',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminTranscriptSheetHistoryCreate' }] }] }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 23 - 0
src/pages/Admin/TranscriptSheetHistory/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.Unit.TranscriptSheetHistory.Show',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminTranscriptSheetHistoryIndex' }] }] }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 23 - 0
src/pages/Admin/TranscriptSheetHistory/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.Unit.TranscriptSheetHistory.Show',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminTranscriptSheetHistoryShow' }] }] }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 101 - 0
src/pages/Admin/Unit/show.vue

@@ -21,6 +21,8 @@
              label="لیست جلسات" />
       <q-tab name="quiz"
              label="آزمون" />
+      <q-tab name="transcriptSheetHistory"
+             label="تاریخچه کارنامه" />
     </q-tabs>
     <q-separator />
     <q-tab-panels v-if="mounted"
@@ -134,6 +136,45 @@
           </template>
         </entity-index>
       </q-tab-panel>
+      <q-tab-panel name="transcriptSheetHistory"
+                   class="q-pa-none">
+        <entity-index v-if="mounted"
+                      ref="transcriptSheetHistoryEntityIndex"
+                      v-model:value="transcriptSheetHistoryFilterInputs"
+                      title="لیست نمرات"
+                      :api="transcriptSheetHistoryApi"
+                      :table="transcriptSheetHistoryTable"
+                      :table-keys="transcriptSheetHistoryTableKeys"
+                      :show-reload-button="false"
+                      :show-search-button="false"
+                      :show-expand-button="false">
+          <template #toolbar>
+            <div class="flex justify-end">
+              <q-btn color="primary"
+                     outline
+                     label="افزودن نمره"
+                     :loading="newTranscriptSheetHistoryLoading"
+                     :to="{name: 'Admin.Unit.TranscriptSheetHistory.Create', params: {unit_id: $route.params.id}}" />
+            </div>
+          </template>
+          <template #entity-index-table-cell="{inputData, showConfirmRemoveDialog}">
+            <template v-if="inputData.col.name === 'actions'">
+              <div class="q-gutter-md">
+                <div class="action-column-entity-index">
+                  <q-btn size="md"
+                         color="primary"
+                         label="تعیین جزییات"
+                         :to="{name: 'Admin.Unit.TranscriptSheetHistory.Show', params: {id: inputData.props.row.id}}" />
+                  <delete-btn @click="showConfirmRemoveDialog(inputData.props.row, 'id', getRemoveMessage(inputData.props.row))" />
+                </div>
+              </div>
+            </template>
+            <template v-else>
+              {{ inputData.col.value }}
+            </template>
+          </template>
+        </entity-index>
+      </q-tab-panel>
     </q-tab-panels>
   </q-card>
 </template>
@@ -162,6 +203,7 @@ export default {
     return {
       tab: 'UnitInfo',
       mounted: false,
+      newTranscriptSheetHistoryLoading: false,
       newSessionLoading: false,
       newSessionName: '-',
       newSessionSessionCount: null,
@@ -293,6 +335,65 @@ export default {
         currentPage: 'current',
         perPage: 'per_page',
         pageKey: 'page'
+      },
+
+      transcriptSheetHistoryApi: APIGateway.transcriptSheetHistory.APIAdresses.base,
+      transcriptSheetHistoryTable: {
+        columns: [
+          {
+            name: 'id',
+            required: true,
+            label: 'شناسه',
+            align: 'left',
+            field: row => row.id
+          },
+          {
+            name: 'national_code',
+            required: true,
+            label: 'کد ملی',
+            align: 'left',
+            field: row => row.national_code
+          },
+          {
+            name: 'score',
+            required: true,
+            label: 'نمره',
+            align: 'left',
+            field: row => row.score
+          },
+          {
+            name: 'creation_time',
+            required: true,
+            label: 'تاریخ ایجاد',
+            align: 'left',
+            field: row => ShamsiDate.getDateTime(row.creation_time)
+          },
+          {
+            name: 'last_modification_time',
+            required: true,
+            label: 'تاریخ آخرین تغییر',
+            align: 'left',
+            field: row => ShamsiDate.getDateTime(row.last_modification_time)
+          },
+          {
+            name: 'actions',
+            required: true,
+            label: 'عملیات',
+            align: 'left',
+            field: ''
+          }
+        ],
+        data: []
+      },
+      transcriptSheetHistoryFilterInputs: [
+        { type: 'hidden', name: 'unit', value: this.$route.params.id }
+      ],
+      transcriptSheetHistoryTableKeys: {
+        data: 'results',
+        total: 'count',
+        currentPage: 'current',
+        perPage: 'per_page',
+        pageKey: 'page'
       }
     }
   },

+ 9 - 0
src/router/routes/Admin.js

@@ -85,6 +85,15 @@ export default {
             { name: 'Admin.Unit.TestSet.Show', path: ':id', component: () => import('src/pages/Admin/TestSet/Show.vue') },
             { name: 'Admin.Unit.TestSet.Create', path: 'create', component: () => import('src/pages/Admin/TestSet/Create.vue') }
           ]
+        },
+        {
+          name: 'Admin.Unit.TranscriptSheetHistory',
+          path: ':unit_id/transcript_sheet_history',
+          component: () => import('src/layouts/bareLayout.vue'),
+          children: [
+            { name: 'Admin.Unit.TranscriptSheetHistory.Show', path: ':id', component: () => import('src/pages/Admin/TranscriptSheetHistory/Show.vue') },
+            { name: 'Admin.Unit.TranscriptSheetHistory.Create', path: 'create', component: () => import('src/pages/Admin/TranscriptSheetHistory/Create.vue') }
+          ]
         }
       ]
     },