summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/groups/index.js12
-rw-r--r--app/assets/javascripts/groups/stores/groups_store.js5
-rw-r--r--app/views/dashboard/groups/index.html.haml1
3 files changed, 16 insertions, 2 deletions
diff --git a/app/assets/javascripts/groups/index.js b/app/assets/javascripts/groups/index.js
index c0e083ef635..934e3b8e580 100644
--- a/app/assets/javascripts/groups/index.js
+++ b/app/assets/javascripts/groups/index.js
@@ -1,3 +1,11 @@
+import Vue from 'vue';
+import GroupsStore from './stores/groups_store';
+
$(() => {
- // Groups bundle
-}); \ No newline at end of file
+ const groupsStore = new GroupsStore();
+
+ const GroupsApp = new Vue({
+ el: document.querySelector('.js-groups-list-holder'),
+ data: groupsStore,
+ });
+});
diff --git a/app/assets/javascripts/groups/stores/groups_store.js b/app/assets/javascripts/groups/stores/groups_store.js
new file mode 100644
index 00000000000..f62f419ac1b
--- /dev/null
+++ b/app/assets/javascripts/groups/stores/groups_store.js
@@ -0,0 +1,5 @@
+export default class GroupsStore {
+ constructor() {
+ this.groups = [];
+ }
+}
diff --git a/app/views/dashboard/groups/index.html.haml b/app/views/dashboard/groups/index.html.haml
index bf1013c685b..af9f9b1b363 100644
--- a/app/views/dashboard/groups/index.html.haml
+++ b/app/views/dashboard/groups/index.html.haml
@@ -2,6 +2,7 @@
- header_title "Groups", dashboard_groups_path
= render 'dashboard/groups_head'
+= page_specific_javascript_bundle_tag('common_vue')
= page_specific_javascript_bundle_tag('groups')
- if @groups.empty?