Преглед изворни кода

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

ali пре 2 година
родитељ
комит
154cd150d3

+ 1 - 1
src/components/Widgets/Classroom/AdminClassroomInfoOfUser/components/ShowClassroomInfo.vue

@@ -342,7 +342,7 @@ export default {
     onDropping () {
       this.$q.dialog({
         title: 'توجه',
-        message: 'آیا از حذف نام این دوره اطمینان دارید؟',
+        message: 'آیا از حذف این دوره اطمینان دارید؟',
         cancel: true,
         persistent: true
       }).onOk(() => {

+ 1 - 1
src/components/Widgets/Classroom/ClassroomAnswerBookList/ClassroomAnswerBookList.vue

@@ -213,7 +213,7 @@ export default {
   },
   mounted () {
     this.setActionBtn()
-    this.setClassroomTypeOfInputs()
+    // this.setClassroomTypeOfInputs() // for what?
     this.mounted = true
   },
   methods: {

+ 1 - 1
src/components/Widgets/Classroom/ClassroomList/ClassroomList.vue

@@ -172,7 +172,7 @@ export default {
             required: true,
             label: 'تعداد جلسات',
             align: 'left',
-            field: row => row.classroom_info?.sessions_info?.length
+            field: row => row.classroom_info?.sessions_count
           },
           {
             name: 'status',

+ 12 - 3
src/components/Widgets/Classroom/ClassroomShow/ClassroomShow.vue

@@ -18,7 +18,7 @@
             narrow-indicator>
       <q-tab v-if="canShowTabPageForClassroomType('classroomInfo')"
              name="classroomInfo"
-             label="اطلاعات دوره آموزشی" />
+             :label="` اطلاعات ${classroomTypeTitle}`" />
       <q-tab v-if="canShowOtherTabsOfClassroom && canShowTabPageForClassroomType('educations')"
              name="educations"
              :label="educationsTabTitle" />
@@ -493,6 +493,15 @@ export default {
     }
   },
   computed: {
+    classroomTypeTitle () {
+      if (this.localOptions.classroomType === 'TRAINING') {
+        return 'دوره'
+      }
+      if (this.localOptions.classroomType === 'EVENT') {
+        return 'رویداد'
+      }
+      return 'دوره'
+    },
     listTitle () {
       if (this.localOptions.classroomType === 'TRAINING') {
         return 'لیست دوره های آموزشی'
@@ -612,8 +621,8 @@ export default {
         loading: false,
         path: [
           {
-            label: 'دوره های من',
-            to: { name: 'UserPanel.Profile.AllClassrooms' }
+            label: this.classroomTypeTitle + 'های من',
+            to: { name: this.localOptions.classroomType === 'TRAINING' ? 'UserPanel.Profile.AllClassrooms' : 'UserPanel.Profile.AllEvents' }
           },
           {
             label: this.classroom.title,

+ 1 - 1
src/components/Widgets/Event/ShowEventInfo/ShowEventInfo.vue

@@ -350,7 +350,7 @@ export default {
     onDropping () {
       this.$q.dialog({
         title: 'توجه',
-        message: 'آیا از حذف نام این رویداد اطمینان دارید؟',
+        message: 'آیا از حذف این رویداد اطمینان دارید؟',
         cancel: true,
         persistent: true
       }).onOk(() => {

+ 3 - 10
src/components/Widgets/Invoice/InvoiceList/InvoiceList.vue

@@ -86,8 +86,8 @@ export default {
           outsideLabel: 'تا تاریخ',
           col: 'col-md-3 col-12'
         },
-        { type: 'select', name: 'category', options: [], label: 'وضعیت تراکنش', placeholder: ' ', col: 'col-md-2 col-12' },
-        { type: 'input', name: 'category', label: 'نوع صورتحساب', placeholder: ' ', col: 'col-md-2 col-12' },
+        { type: 'select', name: 'status', options: (new Invoice()).statusEnums, label: 'وضعیت تراکنش', placeholder: ' ', col: 'col-md-2 col-12' },
+        { type: 'select', name: 'type', options: (new Invoice()).typeEnums, label: 'نوع صورتحساب', placeholder: ' ', col: 'col-md-2 col-12' },
         { type: 'hidden', name: 'owner', value: null },
         { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'جستجو', placeholder: ' ', atClick: () => {}, col: 'col-md-2 col-12' }
       ],
@@ -131,14 +131,7 @@ export default {
           {
             name: 'creation_time',
             required: true,
-            label: 'زمان ثبت',
-            align: 'left',
-            field: row => Assist.miladiToShamsi(row.creation_time)
-          },
-          {
-            name: 'creation_time',
-            required: true,
-            label: 'زمان آخرین بروز رسانی',
+            label: 'زمان',
             align: 'left',
             field: row => Assist.miladiToShamsi(row.creation_time)
           },

+ 1 - 1
src/components/Widgets/Other/Shop/ShopCompleteInfo/ShopCompleteInfo.vue

@@ -174,7 +174,7 @@ export default {
       { type: 'separator', name: 'space', label: 'اطلاعات ضروری', col: 'col-12' },
       { type: 'input', name: 'email', label: 'ایمیل', responseKey: 'email', placeholder: ' ', disable: true, col: ' col-md-3 col-12' },
       { type: 'input', name: 'mobile_number', label: 'تلفن همراه', responseKey: 'mobile_number', placeholder: ' ', disable: true, col: ' col-md-3 col-12' },
-      { type: 'optionGroupRadio', name: 'is_valid_national_code', label: 'اتباع خارجی', options: [{ label: 'نیستم', value: true }, { label: 'هستم', value: false }], value: true, className: 'require', col: 'col-md-3 col-12' },
+      { type: 'optionGroupRadio', name: 'is_valid_national_code', label: 'اتباع خارجی', responseKey: 'is_valid_national_code', options: [{ label: 'نیستم', value: true }, { label: 'هستم', value: false }], value: true, className: 'require', col: 'col-md-3 col-12' },
       { type: 'input', name: 'national_code', label: 'کدملی/کد اتباع غیر ایرانی', responseKey: 'national_code', placeholder: ' ', className: 'require', col: ' col-md-3 col-12' },
       { type: 'separator', name: 'space', label: 'اطلاعات پروفایل', col: 'col-12' },
       { type: 'file', name: 'picture', label: 'عکس پروفایل', responseKey: 'picture', placeholder: ' ', col: ' col-md-3 col-12' },

+ 4 - 1
src/components/Widgets/Other/ShowClassroomInfo/ShowClassroomInfo.vue

@@ -365,7 +365,7 @@ export default {
     onDropping () {
       this.$q.dialog({
         title: 'توجه',
-        message: 'آیا از حذف نام این دوره اطمینان دارید؟',
+        message: 'آیا از حذف این ' + this.classroomTypeTitle + ' اطمینان دارید؟',
         cancel: true,
         persistent: true
       }).onOk(() => {
@@ -386,6 +386,9 @@ export default {
       this.rulesDialog = true
     },
     openCodeLink () {
+      window.open(this.classroom.codes)
+    },
+    openCodeLinkByFetching () {
       if (!this.classroom.codes) {
         return
       }

+ 1 - 1
src/components/Widgets/Ticket/AdminTicketShow/InstallmentOffers.vue

@@ -15,7 +15,7 @@
               {{ offer.count }}
             </div>
             <div class="col-md-3 col-12">
-              فاصله هر فسط(روز):
+              فاصله هر قسط(روز):
               {{ offer.due_date_interval }}
             </div>
             <div class="col-md-3 col-12">

+ 1 - 1
src/components/Widgets/Ticket/TicketShow/InstallmentOffers.vue

@@ -15,7 +15,7 @@
               {{ offer.count }}
             </div>
             <div class="col-md-3 col-12">
-              فاصله هر فسط(روز):
+              فاصله هر قسط(روز):
               {{ offer.due_date_interval }}
             </div>
             <div class="col-md-3 col-12">

+ 7 - 3
src/models/Invoice.js

@@ -82,12 +82,16 @@ class Invoice extends Model {
         enumListKey: 'typeEnums',
         enums: [
           {
-            label: 'بخش آموزش',
+            label: 'آموزش',
             value: 'CLASSROOM'
           },
           {
-            label: 'بخش فروشگاه',
-            value: 'STORE'
+            label: 'فروشگاه',
+            value: 'STORE_BASKET'
+          },
+          {
+            label: 'رویداد',
+            value: 'EVENT'
           }
         ]
       }

+ 16 - 1
src/pages/User/Profile/classroomInfo.vue

@@ -41,7 +41,8 @@
                   animated>
       <q-tab-panel name="classroomInfo">
         <div v-if="mounted && classroom.current_user_register_info.transcript_sheet_info.status"
-             class="bg-light-green-1 q-pa-md q-mb-md">
+             :class="getTranscriptSheetStatusClass()"
+             class="q-pa-md q-mb-md">
           <div class="row q-col-gutter-md">
             <div class="col-md-6 col-12">
               نمره حضور و غیاب: {{ classroom.current_user_register_info.transcript_sheet_info.attendance_score }}
@@ -892,7 +893,21 @@ export default {
     },
     getTranscriptSheetStatus (transcriptSheet) {
       return new TranscriptSheet(transcriptSheet).status_info.label
+    },
+    getTranscriptSheetStatusClass () {
+      let cls = ''
+      if (this.classroom.current_user_register_info?.transcript_sheet_info?.status === 'CLEAN_PASSED') {
+        cls = 'bg-green-2'
+      } else if (this.classroom.current_user_register_info?.transcript_sheet_info?.status === 'CONDITIONAL_PASSED') {
+        cls = 'bg-yellow-2'
+      } else if (this.classroom.current_user_register_info?.transcript_sheet_info?.status === 'FAILED') {
+        cls = 'bg-red-2'
+      } else if (this.classroom.current_user_register_info?.transcript_sheet_info?.status === 'FAILED_DUE_TO_PRE_CONDITIONAL') {
+        cls = 'bg-red-2'
+      }
+      return cls
     }
+
   }
 }
 </script>