From e3726632a3246197b988d6b87f06886c20159cc8 Mon Sep 17 00:00:00 2001 From: Guillaume FAUVET Date: Mon, 5 Mar 2018 19:39:02 +0100 Subject: [PATCH 1/3] Ajout de la page Administration --- public_html/page/settings.php | 48 ++++++++++++++++++++++++ webpack.config.js | 58 +++++++++++++++++++++++------ webpack/component/settings/view.vue | 23 ++++++++++++ webpack/data/settings.js | 0 webpack/page/settings.js | 35 +++++++++++++++++ webpack/routes/settings.js | 11 ++++++ 6 files changed, 164 insertions(+), 11 deletions(-) create mode 100644 public_html/page/settings.php create mode 100644 webpack/component/settings/view.vue create mode 100644 webpack/data/settings.js create mode 100644 webpack/page/settings.js create mode 100644 webpack/routes/settings.js diff --git a/public_html/page/settings.php b/public_html/page/settings.php new file mode 100644 index 0000000..dfea50c --- /dev/null +++ b/public_html/page/settings.php @@ -0,0 +1,48 @@ + + + + + + + + + + Gestion des enseignants + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js index 5029084..2a75ec5 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,5 +1,5 @@ -var path = require('path') -var webpack = require('webpack') +var path = require('path'); +var webpack = require('webpack'); const ExtractTextPlugin = require("extract-text-webpack-plugin"); @@ -50,15 +50,51 @@ module.exports = [ { }, { - name: "teacher", - entry: './webpack/page/teacher.js', - output: { - path: path.resolve(__dirname, './public_html/js/bundle'), - publicPath: '/js/bundle/', - filename: 'teacher@0.js' - }, - module: mod_common, - devtool: (process.env.NODE_ENV==='development') ? '#eval-source-map' : false + name: "teacher", + entry: './webpack/page/teacher.js', + output: { + path: path.resolve(__dirname, './public_html/js/bundle'), + publicPath: '/js/bundle/', + filename: 'teacher@0.js' + }, + module: mod_common, + devtool: (process.env.NODE_ENV==='development') ? '#eval-source-map' : false + +}, { + + name: "ue", + entry: './webpack/page/ue.js', + output: { + path: path.resolve(__dirname, './public_html/js/bundle'), + publicPath: '/js/bundle/', + filename: 'ue@0.js' + }, + module: mod_common, + devtool: (process.env.NODE_ENV==='development') ? '#eval-source-map' : false + +}, { + + name: "fiche", + entry: './webpack/page/fiche.js', + output: { + path: path.resolve(__dirname, './public_html/js/bundle'), + publicPath: '/js/bundle/', + filename: 'fiche@0.js' + }, + module: mod_common, + devtool: (process.env.NODE_ENV==='development') ? '#eval-source-map' : false + +}, { + + name: "settings", + entry: './webpack/page/settings.js', + output: { + path: path.resolve(__dirname, './public_html/js/bundle'), + publicPath: '/js/bundle/', + filename: 'settings@0.js' + }, + module: mod_common, + devtool: (process.env.NODE_ENV==='development') ? '#eval-source-map' : false }, { diff --git a/webpack/component/settings/view.vue b/webpack/component/settings/view.vue new file mode 100644 index 0000000..39c13cc --- /dev/null +++ b/webpack/component/settings/view.vue @@ -0,0 +1,23 @@ + + + + + + \ No newline at end of file diff --git a/webpack/data/settings.js b/webpack/data/settings.js new file mode 100644 index 0000000..e69de29 diff --git a/webpack/page/settings.js b/webpack/page/settings.js new file mode 100644 index 0000000..856afe2 --- /dev/null +++ b/webpack/page/settings.js @@ -0,0 +1,35 @@ +/* (1) Imports +---------------------------------------------------------*/ +/* (1) NPM libs */ +import Vue from 'vue' +import VueRouter from 'vue-router' +import routes from '../routes/settings' + +/* (2) Vues */ +import wrapper_vue from '../vue/wrapper.vue' + +/* (3) Data */ +require('../data/common'); +require('../data/settings'); + + + + +/* (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/settings.js b/webpack/routes/settings.js new file mode 100644 index 0000000..767a198 --- /dev/null +++ b/webpack/routes/settings.js @@ -0,0 +1,11 @@ +export default{ 0: [ + + { + path: '/settings/view/', + component: require('../component/settings/view.vue').default + }, { + path: '*', + redirect: '/settings/view/' + } + +]} \ No newline at end of file From 3578b73417a0cce1e05b340821aa2f79202f1aad Mon Sep 17 00:00:00 2001 From: Guillaume FAUVET Date: Mon, 5 Mar 2018 19:39:39 +0100 Subject: [PATCH 2/3] Ajout de la page Fiches --- public_html/page/fiche.php | 48 ++++++++++++++++++++++++++++++++ webpack/component/fiche/view.vue | 23 +++++++++++++++ webpack/data/fiche.js | 0 webpack/page/fiche.js | 35 +++++++++++++++++++++++ webpack/routes/fiche.js | 11 ++++++++ 5 files changed, 117 insertions(+) create mode 100644 public_html/page/fiche.php create mode 100644 webpack/component/fiche/view.vue create mode 100644 webpack/data/fiche.js create mode 100644 webpack/page/fiche.js create mode 100644 webpack/routes/fiche.js diff --git a/public_html/page/fiche.php b/public_html/page/fiche.php new file mode 100644 index 0000000..13d3b0d --- /dev/null +++ b/public_html/page/fiche.php @@ -0,0 +1,48 @@ + + + + + + + + + + Gestion des enseignants + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/webpack/component/fiche/view.vue b/webpack/component/fiche/view.vue new file mode 100644 index 0000000..966eef4 --- /dev/null +++ b/webpack/component/fiche/view.vue @@ -0,0 +1,23 @@ + + + + + + \ No newline at end of file diff --git a/webpack/data/fiche.js b/webpack/data/fiche.js new file mode 100644 index 0000000..e69de29 diff --git a/webpack/page/fiche.js b/webpack/page/fiche.js new file mode 100644 index 0000000..c7035a3 --- /dev/null +++ b/webpack/page/fiche.js @@ -0,0 +1,35 @@ +/* (1) Imports +---------------------------------------------------------*/ +/* (1) NPM libs */ +import Vue from 'vue' +import VueRouter from 'vue-router' +import routes from '../routes/fiche' + +/* (2) Vues */ +import wrapper_vue from '../vue/wrapper.vue' + +/* (3) Data */ +require('../data/common'); +require('../data/fiche'); + + + + +/* (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/fiche.js b/webpack/routes/fiche.js new file mode 100644 index 0000000..475cac6 --- /dev/null +++ b/webpack/routes/fiche.js @@ -0,0 +1,11 @@ +export default{ 0: [ + + { + path: '/fiche/view/', + component: require('../component/fiche/view.vue').default + }, { + path: '*', + redirect: '/fiche/view/' + } + +]} \ No newline at end of file From 5ad2f24ff9f4564a4bfae7bb2307944815cf9433 Mon Sep 17 00:00:00 2001 From: Guillaume FAUVET Date: Mon, 5 Mar 2018 19:39:56 +0100 Subject: [PATCH 3/3] 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