Browse Source

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

ali 3 năm trước cách đây
mục cha
commit
9d14993190

+ 1 - 0
src/api/models/UnitCategory.js

@@ -21,6 +21,7 @@ export default class UnitCategoryAPI extends APIRepository {
       api: this.api,
       request: this.APIAdresses.base,
       data: this.getNormalizedSendData({
+        type: null, // String
         per_page: 10, // Number
         page: 1 // Number
       }, data),

+ 0 - 3
src/components/EntityIndexGridItem.vue

@@ -28,9 +28,6 @@ export default {
       }
     }
   },
-  mounted() {
-    console.log('inputData', this.inputData)
-  },
   methods: {}
 }
 </script>

+ 0 - 1
src/components/Widgets/ContentCategory/AdminContentCategoryShow/AdminContentCategoryShow.vue

@@ -119,7 +119,6 @@ export default {
     },
     edit() {
       this.entityLoading = true
-      console.log('inputs', this.inputs)
       this.$refs.entityEdit.editEntity(false)
         .then(() => {
           this.$refs.entityEdit.getData()

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

@@ -147,9 +147,6 @@ export default {
     this.mounted = true
   },
   methods: {
-    loggggg (data) {
-      console.log(data)
-    },
     setActionBtn () {
       this.inputs.forEach((item, index) => {
         if (item.name === 'btn') {

+ 7 - 1
src/components/Widgets/Ticket/AdminTicketList/AdminTicketList.vue

@@ -55,6 +55,7 @@ export default {
       inputs: [
         { type: 'select', name: 'category', responseKey: 'category', placeholder: ' ', options: [], label: 'دسته', col: 'col-md-4 col-12' },
         { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'جستجو', placeholder: ' ', atClick: () => {}, col: 'col-md-2 col-12' },
+        { type: 'hidden', name: 'category__type', value: null },
         { type: 'hidden', name: 'source_type', value: null }
       ],
       table: {
@@ -105,6 +106,7 @@ export default {
     checkSource () {
       if (this.localOptions.defaultSourceType) {
         FormBuilderAssist.setAttributeByName(this.inputs, 'source_type', 'value', this.localOptions.defaultSourceType)
+        FormBuilderAssist.setAttributeByName(this.inputs, 'category__type', 'value', this.getCategoryTypeFromSourceType())
       }
     },
     setActionBtn () {
@@ -137,7 +139,11 @@ export default {
         return null
       }
 
-      if (defaultSourceType === 'INVOICE') {
+      if (defaultSourceType === 'TRAINING_CLASSROOM') {
+        return 'EDUCATIONAL'
+      } else if (defaultSourceType === 'DISCUSSION_CIRCLE_CLASSROOM') {
+        return 'EDUCATIONAL'
+      } else if (defaultSourceType === 'INVOICE') {
         return 'FINANCIAL'
       } else if (defaultSourceType === 'CONTENT') {
         return 'CONTENT'

+ 1 - 1
src/pages/Admin/Classroom/create.vue

@@ -187,7 +187,7 @@ export default {
         .catch(() => {})
     },
     getCategories () {
-      return APIGateway.unitCategory.index({ per_page: 9999 })
+      return APIGateway.unitCategory.index({ per_page: 9999, type: 'DISCUSSION_CIRCLE' })
         .then((categories) => {
           this.setInputAttr('category', 'options', categories.list.list.map(item => {
             return {

+ 3 - 3
src/pages/Admin/DiscussionCirclesClassroom/create.vue

@@ -4,7 +4,7 @@
                    ref="classroomEntityCreate"
                    :key="classroomEntityCreateKey"
                    v-model:value="inputs"
-                   title="مشخصات دوره آموزشی"
+                   title="مشخصات حلقه آموزشی"
                    :api="api"
                    :entity-id-key="entityIdKey"
                    :entity-param-key="entityParamKey"
@@ -17,7 +17,7 @@
       <template #after-form-builder>
         <div class="flex justify-end">
           <q-btn color="primary"
-                 label="ایجاد دوره آموزشی جدید"
+                 label="ایجاد حلقه آموزشی جدید"
                  @click="createClassroom" />
         </div>
       </template>
@@ -187,7 +187,7 @@ export default {
         .catch(() => {})
     },
     getCategories () {
-      return APIGateway.unitCategory.index({ per_page: 9999 })
+      return APIGateway.unitCategory.index({ per_page: 9999, type: 'DISCUSSION_CIRCLE' })
         .then((categories) => {
           this.setInputAttr('category', 'options', categories.list.list.map(item => {
             return {