Przeglądaj źródła

اگر کاربر لاگین نبود بخش رویدادهای من و دوره های من نمایش داده نمی شود تا کاربر مجبور به لاگین نشود

hgh 2 lat temu
rodzic
commit
25f8b483ce
2 zmienionych plików z 26 dodań i 6 usunięć
  1. 17 2
      src/pages/Public/Events.vue
  2. 9 4
      src/pages/Public/classrooms.vue

+ 17 - 2
src/pages/Public/Events.vue

@@ -6,9 +6,24 @@
 </template>
 
 <script>
-import { mixinSEO, mixinPageOptions, mixinPrefetchServerData } from 'src/mixin/Mixins.js'
+// import { mixinSEO, mixinPageOptions, mixinPrefetchServerData } from 'src/mixin/Mixins.js'
+import { mixinAuth } from 'src/mixin/Mixins.js'
 export default {
   name: 'Public.AllEvents',
-  mixins: [mixinPrefetchServerData, mixinPageOptions, mixinSEO]
+  mixins: [mixinAuth],
+  // mixins: [mixinPrefetchServerData, mixinPageOptions, mixinSEO]
+  data () {
+    return {
+      pageConfig: {},
+      pageBuilderEditable: false,
+      pageBuilderLoading: false,
+      currenSections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AllClassrooms', options: { style: {}, classroomType: 'EVENT' } }], options: {} }], options: { boxed: true } }] } }]
+    }
+  },
+  mounted() {
+    if (this.user && this.user.id !== null) {
+      this.currenSections = [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AllClassrooms', options: { style: {}, classroomType: 'EVENT' } }, { name: 'RegistrationList', options: { style: { marginBottom: '32px' }, classroomType: 'EVENT' } }], options: {} }], options: { boxed: true } }] } }]
+    }
+  }
 }
 </script>

+ 9 - 4
src/pages/Public/classrooms.vue

@@ -7,19 +7,24 @@
 
 <script>
 // import { mixinSEO, mixinPageOptions, mixinPrefetchServerData } from 'src/mixin/Mixins.js'
+import { mixinAuth } from 'src/mixin/Mixins.js'
+
 export default {
   name: 'Public.AllClassrooms',
   // mixins: [mixinPrefetchServerData, mixinPageOptions, mixinSEO],
+  mixins: [mixinAuth],
   data () {
     return {
       pageConfig: {},
       pageBuilderEditable: false,
       pageBuilderLoading: false,
-      currenSections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AllClassrooms', options: { imageSource: null, ratio: null, hasAction: false, useAEEEvent: false, AEEEventBody: { id: '-', name: '-', creative: null, position: null }, action: { name: null, route: null, scrollTo: null, eventName: null, eventArgs: null }, xs: { height: null, width: null, src: null }, sm: { height: null, width: null, src: null }, md: { height: null, width: null, src: null }, lg: { height: null, width: null, src: null }, xl: { height: null, width: null, src: null }, style: { marginBottom: '32px' } } }, { name: 'RegistrationList', options: { style: { marginBottom: '32px' } } }] }], options: { boxed: true } }] } }]
+      currenSections: [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AllClassrooms', options: { imageSource: null, ratio: null, hasAction: false, useAEEEvent: false, AEEEventBody: { id: '-', name: '-', creative: null, position: null }, action: { name: null, route: null, scrollTo: null, eventName: null, eventArgs: null }, xs: { height: null, width: null, src: null }, sm: { height: null, width: null, src: null }, md: { height: null, width: null, src: null }, lg: { height: null, width: null, src: null }, xl: { height: null, width: null, src: null }, style: { marginBottom: '32px' } } }] }], options: { boxed: true } }] } }]
+    }
+  },
+  mounted() {
+    if (this.user && this.user.id !== null) {
+      this.currenSections = [{ data: { rows: [{ cols: [{ widgets: [{ name: 'AllClassrooms', options: { imageSource: null, ratio: null, hasAction: false, useAEEEvent: false, AEEEventBody: { id: '-', name: '-', creative: null, position: null }, action: { name: null, route: null, scrollTo: null, eventName: null, eventArgs: null }, xs: { height: null, width: null, src: null }, sm: { height: null, width: null, src: null }, md: { height: null, width: null, src: null }, lg: { height: null, width: null, src: null }, xl: { height: null, width: null, src: null }, style: { marginBottom: '32px' } } }, { name: 'RegistrationList', options: { style: { marginBottom: '32px' } } }] }], options: { boxed: true } }] } }]
     }
   }
-  // mounted() {
-  //   this.currenSections = this.sections
-  // }
 }
 </script>