Browse Source

دوره‌های من، جدول آموزشی، جزئیات جلسه، زمانی که تکلیفی تعریف نشده، بخش مربوط به تکلیف جلسه نمایش داده نشود.

hgh 1 year ago
parent
commit
1946dc9a89
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/pages/User/Profile/sessionInfo.vue

+ 7 - 1
src/pages/User/Profile/sessionInfo.vue

@@ -24,7 +24,8 @@
                    :show-edit-button="false"
                    :show-index-button="false"
                    :show-reload-button="false"
-                   :before-load-input-data="beforeLoadInputData">
+                   :before-load-input-data="beforeLoadInputData"
+                   :after-load-input-data="afterLoadInputData">
         <template #before-form-builder>
           <div class="session-title-and-time-row">
             <div class="item">
@@ -376,6 +377,11 @@ export default {
       this.getClassInfo(this.session.classroom)
       this.entityLoading = false
     },
+    afterLoadInputData (data) {
+      if (data.assignment_description === '') {
+        FormBuilderAssist.setAttributeByName(this.sessionInfoInputs, 'assignment_description', 'type', 'hidden')
+      }
+    },
     getClassInfo (classroomId) {
       this.classroom.loading = true
       APIGateway.classroom.get(classroomId)