ali преди 3 години
родител
ревизия
3b5f62fa21

+ 9 - 2
src/components/Template/SideBard/AdminPanelSideBar.vue

@@ -78,8 +78,8 @@ export default {
         },
         {
           title: 'درخواست های آموزش',
-          routeName: 'Admin.Ticket.List',
-          icon: 'confirmation_number',
+          routeName: 'Admin.Ticket.List.Educational',
+          icon: 'local_activity',
           show: true,
           active: false
         },
@@ -160,6 +160,13 @@ export default {
               active: false
             }
           ]
+        },
+        {
+          title: 'تمام درخواست ها',
+          routeName: 'Admin.Ticket.List',
+          icon: 'confirmation_number',
+          show: true,
+          active: false
         }
       ]
     }

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

@@ -212,10 +212,13 @@ export default {
   },
   methods: {
     checkSource () {
-      if (this.localOptions.defaultSourceType) {
-        // FormBuilderAssist.setAttributeByName(this.inputs, 'source_type', 'value', this.localOptions.defaultSourceType)
-        FormBuilderAssist.setAttributeByName(this.inputs, 'category__type', 'value', this.getCategoryTypeFromSourceType())
-      } else if (this.localOptions.defaultCategoryType) {
+      // if (this.localOptions.defaultSourceType) {
+      //   // FormBuilderAssist.setAttributeByName(this.inputs, 'source_type', 'value', this.localOptions.defaultSourceType)
+      //   FormBuilderAssist.setAttributeByName(this.inputs, 'category__type', 'value', this.getCategoryTypeFromSourceType())
+      // }
+
+      if (this.localOptions.defaultCategoryType) {
+        FormBuilderAssist.setAttributeByName(this.inputs, 'category__type', 'readonly', true)
         FormBuilderAssist.setAttributeByName(this.inputs, 'category__type', 'value', this.localOptions.defaultCategoryType)
       } else {
         FormBuilderAssist.setAttributeByName(this.inputs, 'category__type', 'type', 'select')

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

@@ -8,13 +8,13 @@
                 :options="categoryTypeOptions"
                 emit-value
                 map-options />
-      <div>
-        defaultSourceType
-      </div>
-      <q-select v-model="localOptions.defaultSourceType"
-                :options="options"
-                emit-value
-                map-options />
+      <!--      <div>-->
+      <!--        defaultSourceType-->
+      <!--      </div>-->
+      <!--      <q-select v-model="localOptions.defaultSourceType"-->
+      <!--                :options="options"-->
+      <!--                emit-value-->
+      <!--                map-options />-->
     </template>
   </option-panel-tabs>
 </template>

+ 1 - 1
src/pages/Admin/Content/Ticket.vue

@@ -13,7 +13,7 @@ export default {
   mixins: [mixinPageOptions],
   data: () => {
     return {
-      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminTicketList', options: { 0: { label: 'مالی', value: 'INVOICE' }, 1: { label: 'آموزش', value: 'TRAINING_CLASSROOM' }, 2: { label: 'حلقه های مباحثاتی', value: 'DISCUSSION_CIRCLE_CLASSROOM' }, 3: { label: 'محتوا', value: 'CONTENT' }, 4: { label: 'SESSION', value: 'SESSION' }, style: {}, defaultSourceType: 'CONTENT' } }], options: { style: { paddingTop: '' } } }], options: { className: '', height: 'auto', boxed: true, boxedWidth: 1200, gutterXSize: 'md', gutterYSize: 'md', absolute: 'none', paddingOfBoxedInFullWidth: '30px', style: { maxWidth: '1200px', width: '1200px' } } }] }, options: { fullHeight: false, backgrounds: { xs: { size: null, color: null, image: null, repeat: null, position: null, attachment: null }, sm: { size: null, color: null, image: null, repeat: null, position: null, attachment: null }, md: { size: null, color: null, image: null, repeat: null, position: null, attachment: null }, lg: { size: null, color: null, image: null, repeat: null, position: null, attachment: null }, xl: { size: null, color: null, image: null, repeat: null, position: null, attachment: null } }, verticalAlign: null, style: { minHeight: 'auto' } } }]
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminTicketList', options: { 0: { label: 'قابل انتخاب', value: null }, 1: { label: 'مالی', value: 'INVOICE' }, 2: { label: 'آموزش', value: 'TRAINING_CLASSROOM' }, 3: { label: 'حلقه های مباحثاتی', value: 'DISCUSSION_CIRCLE_CLASSROOM' }, 4: { label: 'محتوا', value: 'CONTENT' }, 5: { label: 'SESSION', value: 'SESSION' }, style: {}, defaultCategoryType: 'CONTENT' } }], options: { style: { paddingTop: '' } } }], options: { className: '', height: 'auto', boxed: true, boxedWidth: 1200, gutterXSize: 'md', gutterYSize: 'md', absolute: 'none', paddingOfBoxedInFullWidth: '30px', style: { maxWidth: '1200px', width: '1200px' } } }] }, options: { fullHeight: false, backgrounds: { xs: { size: null, color: null, image: null, repeat: null, position: null, attachment: null }, sm: { size: null, color: null, image: null, repeat: null, position: null, attachment: null }, md: { size: null, color: null, image: null, repeat: null, position: null, attachment: null }, lg: { size: null, color: null, image: null, repeat: null, position: null, attachment: null }, xl: { size: null, color: null, image: null, repeat: null, position: null, attachment: null } }, verticalAlign: null, style: { minHeight: 'auto' } } }]
     }
   },
   created() {

+ 1 - 1
src/pages/Admin/Invoice/Ticket/List.vue

@@ -13,7 +13,7 @@ export default {
   mixins: [mixinPageOptions],
   data: () => {
     return {
-      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminTicketList', options: { 0: { label: 'مالی', value: 'INVOICE' }, 1: { label: 'آموزش', value: 'TRAINING_CLASSROOM' }, 2: { label: 'حلقه های مباحثاتی', value: 'DISCUSSION_CIRCLE_CLASSROOM' }, 3: { label: 'SESSION', value: 'SESSION' }, style: {}, defaultSourceType: 'INVOICE' } }], options: { style: { paddingTop: '' } } }], options: { className: '', height: 'auto', boxed: true, boxedWidth: 1200, gutterXSize: 'md', gutterYSize: 'md', absolute: 'none', paddingOfBoxedInFullWidth: '30px', style: { maxWidth: '1200px', width: '1200px' } } }] } }]
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminTicketList', options: { 0: { label: 'قابل انتخاب', value: null }, 1: { label: 'مالی', value: 'INVOICE' }, 2: { label: 'آموزش', value: 'TRAINING_CLASSROOM' }, 3: { label: 'حلقه های مباحثاتی', value: 'DISCUSSION_CIRCLE_CLASSROOM' }, 4: { label: 'محتوا', value: 'CONTENT' }, 5: { label: 'SESSION', value: 'SESSION' }, style: {}, defaultCategoryType: 'FINANCIAL' } }], options: { style: { paddingTop: '' } } }], options: { className: '', height: 'auto', boxed: true, boxedWidth: 1200, gutterXSize: 'md', gutterYSize: 'md', absolute: 'none', paddingOfBoxedInFullWidth: '30px', style: { maxWidth: '1200px', width: '1200px' } } }] } }]
     }
   },
   created() {

+ 23 - 0
src/pages/Admin/Ticket/EducationalList.vue

@@ -0,0 +1,23 @@
+<template>
+  <q-page-builder v-model:sections="currenSections"
+                  v-model:options="pageConfig"
+                  :editable="pageBuilderEditable"
+                  :loading="pageBuilderLoading" />
+</template>
+
+<script>
+import { mixinPageOptions } from 'src/mixin/Mixins.js'
+
+export default {
+  name: 'AdminPanel.Package.List',
+  mixins: [mixinPageOptions],
+  data: () => {
+    return {
+      sections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AdminTicketList', options: { 0: { label: 'قابل انتخاب', value: null }, 1: { label: 'مالی', value: 'INVOICE' }, 2: { label: 'آموزش', value: 'TRAINING_CLASSROOM' }, 3: { label: 'حلقه های مباحثاتی', value: 'DISCUSSION_CIRCLE_CLASSROOM' }, 4: { label: 'محتوا', value: 'CONTENT' }, 5: { label: 'SESSION', value: 'SESSION' }, style: {}, defaultCategoryType: 'EDUCATIONAL' } }], options: { style: { paddingTop: '', marginBottom: '124px' } } }], options: { className: '', height: 'auto', boxed: true, boxedWidth: 1200, gutterXSize: 'md', gutterYSize: 'md', absolute: 'none', paddingOfBoxedInFullWidth: '30px', style: { maxWidth: '1200px', width: '1200px' } } }] } }]
+    }
+  },
+  created() {
+    this.currenSections = this.sections
+  }
+}
+</script>

+ 5 - 0
src/router/routes.js

@@ -525,6 +525,11 @@ const routes = [
                 name: 'Admin.Ticket.List',
                 component: () => import('src/pages/Admin/Ticket/List.vue')
               },
+              {
+                path: 'educational',
+                name: 'Admin.Ticket.List.Educational',
+                component: () => import('src/pages/Admin/Ticket/EducationalList.vue')
+              },
               {
                 path: 'create',
                 name: 'Admin.Ticket.Create',