Bläddra i källkod

Merge branch 'master' of http://git.hghweb.ir/ali.s/palizvani-front-vite

ali 2 år sedan
förälder
incheckning
aa751dc734

+ 17 - 9
src/components/Widgets/Classroom/AdminClassroomShow/components/AnnounceResultList.vue

@@ -30,12 +30,6 @@
                :loading="updateTranscriptSheetLoading">
           <q-menu>
             <q-list style="min-width: 100px">
-              <q-item v-if="inputData.props.row.certification"
-                      v-close-popup
-                      clickable
-                      @click="showTranscriptSheetsCertification(inputData.props.row)">
-                <q-item-section>مشاهده مدرک</q-item-section>
-              </q-item>
               <q-item v-close-popup
                       clickable
                       @click="updateTranscriptSheetsFinalScore(inputData.props.row)">
@@ -62,6 +56,16 @@
           </q-menu>
         </q-btn>
       </template>
+      <template v-else-if="inputData.col.name === 'certification'">
+        <a v-if="inputData.col.value"
+           :href="inputData.col.value"
+           target="_blank">
+          <q-img :src="inputData.col.value" />
+        </a>
+        <q-icon v-else
+                name="close"
+                color="red" />
+      </template>
       <template v-else>
         {{ inputData.col.value }}
       </template>
@@ -177,6 +181,13 @@ export default {
             align: 'left',
             field: row => row.is_sent_by_post ? 'ارسال شده' : 'ارسال نشده'
           },
+          {
+            name: 'certification',
+            required: true,
+            label: 'مدرک',
+            align: 'left',
+            field: row => row.certification
+          },
           {
             name: 'actions',
             required: true,
@@ -321,9 +332,6 @@ export default {
         // console.log('I am triggered on both OK and Cancel')
       })
     },
-    showTranscriptSheetsCertification (transcriptSheet) {
-      window.open(transcriptSheet.certification, '_blank')
-    },
     getExcel () {
       this.exportReportLoading = true
       APIGateway.transcriptSheet.exportReport({