From 5ad2f24ff9f4564a4bfae7bb2307944815cf9433 Mon Sep 17 00:00:00 2001 From: Guillaume FAUVET Date: Mon, 5 Mar 2018 19:39:56 +0100 Subject: [PATCH] Ajout de la page Gestion UE --- public_html/page/ue.php | 48 +++++++++++++++++++++++++++++++ webpack/component/ue/view.vue | 53 +++++++++++++++++++++++++++++++++++ webpack/data/ue.js | 16 +++++++++++ webpack/page/ue.js | 35 +++++++++++++++++++++++ webpack/routes/ue.js | 11 ++++++++ 5 files changed, 163 insertions(+) create mode 100644 public_html/page/ue.php create mode 100644 webpack/component/ue/view.vue create mode 100644 webpack/data/ue.js create mode 100644 webpack/page/ue.js create mode 100644 webpack/routes/ue.js diff --git a/public_html/page/ue.php b/public_html/page/ue.php new file mode 100644 index 0000000..9241273 --- /dev/null +++ b/public_html/page/ue.php @@ -0,0 +1,48 @@ + + + + + + + + + + Gestion des enseignants + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/webpack/component/ue/view.vue b/webpack/component/ue/view.vue new file mode 100644 index 0000000..c549486 --- /dev/null +++ b/webpack/component/ue/view.vue @@ -0,0 +1,53 @@ + + + + + +s \ No newline at end of file diff --git a/webpack/data/ue.js b/webpack/data/ue.js new file mode 100644 index 0000000..00d6875 --- /dev/null +++ b/webpack/data/ue.js @@ -0,0 +1,16 @@ +/* (1) Load UEs +---------------------------------------------------------*/ +/* (1) Initialize list */ +gstore.add('ues', []); + +/* (2) Get UEs */ +api.call('GET ue', { vh: true }, function(rs) { + + // {1} If error -> abort // + if(rs.error !== 0) + return console.log('No UE found, error: ' + rs.error); + + // {2} Store UEs // + console.log(rs); + gstore.get.ues = rs.ues; +}); diff --git a/webpack/page/ue.js b/webpack/page/ue.js new file mode 100644 index 0000000..88019ac --- /dev/null +++ b/webpack/page/ue.js @@ -0,0 +1,35 @@ +/* (1) Imports +---------------------------------------------------------*/ +/* (1) NPM libs */ +import Vue from 'vue' +import VueRouter from 'vue-router' +import routes from '../routes/ue' + +/* (2) Vues */ +import wrapper_vue from '../vue/wrapper.vue' + +/* (3) Data */ +require('../data/common'); +require('../data/ue'); + + + + +/* (2) Initialisation +---------------------------------------------------------*/ +/* (1) Init Router */ +const router = new VueRouter({ + mode: 'history', + routes: routes[0] +}); + +/* (2) Store router in gstore */ +gstore.add('router', router); + +/* (3) Render view */ +Vue.use(VueRouter); +new Vue({ + el: '#main-vue', + router, + render: h => h(wrapper_vue) +}); \ No newline at end of file diff --git a/webpack/routes/ue.js b/webpack/routes/ue.js new file mode 100644 index 0000000..613f7d8 --- /dev/null +++ b/webpack/routes/ue.js @@ -0,0 +1,11 @@ +export default{ 0: [ + + { + path: '/ue/view/', + component: require('../component/ue/view.vue').default + }, { + path: '*', + redirect: '/ue/view/' + } + +]} \ No newline at end of file