Bladeren bron

fixed #107

ali 3 jaren geleden
bovenliggende
commit
2f8dd4b396
2 gewijzigde bestanden met toevoegingen van 8 en 4 verwijderingen
  1. 4 2
      src/pages/Admin/Category/index.vue
  2. 4 2
      src/pages/Admin/DiscussionCirclesCategory/index.vue

+ 4 - 2
src/pages/Admin/Category/index.vue

@@ -42,6 +42,7 @@ import { shallowRef } from 'vue'
 import { EntityIndex } from 'quasar-crud'
 import ShamsiDate from 'src/assets/ShamsiDate.js'
 import { APIGateway } from 'src/api/APIGateway.js'
+import { FormBuilderAssist } from 'quasar-form-builder'
 import BtnControl from 'src/components/Control/btn.vue'
 import DeleteBtn from 'src/components/Control/DeleteBtn.vue'
 
@@ -58,7 +59,7 @@ export default {
       mounted: false,
       inputs: [
         { type: 'input', name: 'title', value: null, label: 'نام', col: 'col-md-2' },
-        { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'جستجو', props: { atClick: this.search }, col: 'col-md-2' }
+        { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'جستجو', atClick: () => {}, col: 'col-md-2' }
       ],
       api: APIGateway.unitCategory.APIAdresses.base,
       table: {
@@ -89,7 +90,7 @@ export default {
             required: true,
             label: 'تعداد درس های دسته',
             align: 'left',
-            field: () => '...'
+            field: (row) => row.units_count
           },
           {
             name: 'creation_time',
@@ -125,6 +126,7 @@ export default {
     }
   },
   mounted() {
+    FormBuilderAssist.setAttributeByName(this.inputs, 'btn', 'atClick', this.search)
     this.mounted = true
   },
   methods: {

+ 4 - 2
src/pages/Admin/DiscussionCirclesCategory/index.vue

@@ -42,6 +42,7 @@ import { shallowRef } from 'vue'
 import { EntityIndex } from 'quasar-crud'
 import ShamsiDate from 'src/assets/ShamsiDate.js'
 import { APIGateway } from 'src/api/APIGateway.js'
+import { FormBuilderAssist } from 'quasar-form-builder'
 import BtnControl from 'src/components/Control/btn.vue'
 import DeleteBtn from 'src/components/Control/DeleteBtn.vue'
 
@@ -59,7 +60,7 @@ export default {
       inputs: [
         { type: 'input', name: 'title', value: null, label: 'نام', col: 'col-md-2' },
         { type: 'hidden', name: 'type', value: 'DISCUSSION_CIRCLE' },
-        { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'جستجو', props: { atClick: this.search }, col: 'col-md-2' }
+        { type: BtnControlComp, name: 'btn', responseKey: 'btn', label: 'جستجو', atClick: () => {}, col: 'col-md-2' }
       ],
       api: APIGateway.unitCategory.APIAdresses.base,
       table: {
@@ -90,7 +91,7 @@ export default {
             required: true,
             label: 'تعداد درس های دسته',
             align: 'left',
-            field: () => '...'
+            field: (row) => row.units_count
           },
           {
             name: 'creation_time',
@@ -126,6 +127,7 @@ export default {
     }
   },
   mounted() {
+    FormBuilderAssist.setAttributeByName(this.inputs, 'btn', 'atClick', this.search)
     this.mounted = true
   },
   methods: {