diff --git a/.gitignore b/.gitignore index 0f7df0f..9663051 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /storage/*.key /vendor .env +.env.prod .env.backup .phpunit.result.cache Homestead.json diff --git a/public/css/app.css b/public/css/app.css index 3ac0347..b985580 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -68,6 +68,10 @@ body { .flex-center { display: flex; justify-content: center; +} + +.flex-middle { + display: flex; align-items: center; } @@ -496,7 +500,7 @@ input { background-color: #eeeeee; font-size: 1.6rem; font-family: "Open Sans", sans-serif; - padding: 0.5rem; + padding: 0.5rem 1rem; border-radius: 0.5rem; } @@ -714,3 +718,7 @@ nav .nav-item:hover svg { opacity: 0.6; } +.memo-edit .memo-text-area textarea { + height: 50vh; +} + diff --git a/public/js/app.js b/public/js/app.js index bb9c745..bcae9ac 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -2368,6 +2368,11 @@ __webpack_require__.r(__webpack_exports__); // // // +// +// +// +// +// /* harmony default export */ __webpack_exports__["default"] = ({ @@ -2765,32 +2770,28 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope mounted: function mounted() { var _this = this; - if (authUser.data.attributes.is_admin) { - axios.get('/api/users').then(function (response) { - _this.users = response.data.data; - _this.loading = false; - })["catch"](function (error) { - _this.loading = false; - alert('Unable to fetch users.'); - }); - } + axios.get('/api/users').then(function (response) { + _this.users = response.data.data; + _this.loading = false; + })["catch"](function (error) { + _this.loading = false; + alert('Unable to fetch users.'); + }); }, methods: { addMember: function addMember() { var _this2 = this; - if (authUser.data.attributes.is_admin && this.form.name.length >= 4 && this.form.email.length >= 12) { + if (this.form.name.length >= 4 && this.form.email.length >= 12) { axios.post('/api/users', { name: this.form.name, email: this.form.email }).then(function (res) { - console.log(res); _this2.form.name = ''; _this2.form.email = ''; _this2.alertType = 'success'; _this2.alertMessage = "".concat(res.data.data.attributes.name, " a bien \xE9t\xE9 cr\xE9\xE9"); })["catch"](function (errors) { - console.log(errors); _this2.alertType = 'error'; _this2.alertMessage = 'L\'utilisateur n\'a pas été créé'; }); @@ -29508,28 +29509,7 @@ var render = function() { }) ] ), - _vm._v("\n Activitées\n ") - ]), - _vm._v(" "), - _c("router-link", { staticClass: "nav-item", attrs: { to: "/memos" } }, [ - _c( - "svg", - { - staticClass: "fill-current site-logo", - attrs: { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" } - }, - [ - _c("title", [_vm._v("Paramètres")]), - _vm._v(" "), - _c("path", { - attrs: { - d: - "M22.9 10.1c-.1-.1-.2-.2-.3-.2L20 9.5c-.1-.5-.3-.9-.6-1.4.2-.2.4-.6.8-1 .3-.4.6-.8.7-1 .1 0 .1-.2.1-.3 0-.1 0-.2-.1-.3-.3-.5-1.1-1.3-2.4-2.4-.1-.1-.2-.1-.4-.1-.1 0-.3 0-.3.1l-2 1.5c-.4-.2-.8-.4-1.3-.5l-.4-2.6c0-.1-.1-.2-.2-.3-.1-.2-.2-.2-.3-.2h-3.2c-.3 0-.4.1-.5.4-.1.5-.3 1.4-.4 2.7-.5.1-.9.3-1.3.5l-2-1.5c-.1-.1-.3-.2-.4-.2-.2 0-.7.3-1.4 1-.6.7-1.1 1.3-1.4 1.6-.1.1-.1.2-.1.3 0 .1 0 .2.1.3.6.8 1.2 1.4 1.5 2-.2.5-.3.9-.5 1.4l-2.6.4c-.1 0-.2.1-.3.2-.1.1-.1.2-.1.3v3.2c0 .1 0 .2.1.3.1.1.2.2.3.2l2.6.4c.1.5.3.9.6 1.4-.2.2-.4.6-.8 1-.3.4-.6.8-.7 1-.1.1-.1.2-.1.3 0 .1 0 .2.1.3.4.5 1.2 1.3 2.4 2.4.1.1.2.2.4.2.1 0 .3 0 .4-.1l2-1.5c.3.1.7.3 1.2.5l.4 2.6c0 .1.1.2.2.3.1.1.2.1.4.1h3.2c.3 0 .4-.1.5-.4.1-.5.3-1.4.4-2.7.4-.1.9-.3 1.3-.5l2 1.5c.1.1.3.1.4.1.2 0 .7-.3 1.3-1 .7-.7 1.2-1.2 1.4-1.5.1-.1.1-.2.1-.3 0-.1 0-.2-.1-.4-.7-.8-1.2-1.5-1.5-2 .2-.4.4-.8.6-1.3l2.7-.4c.1 0 .2-.1.3-.2.1-.1.1-.2.1-.3v-3.2c-.2-.1-.2-.2-.3-.3zm-8.3 4.5c-.7.7-1.6 1.1-2.6 1.1s-1.9-.4-2.6-1.1c-.7-.7-1.1-1.6-1.1-2.6s.4-1.9 1.1-2.6c.7-.7 1.6-1.1 2.6-1.1s1.9.4 2.6 1.1c.7.7 1.1 1.6 1.1 2.6s-.4 1.9-1.1 2.6z" - } - }) - ] - ), - _vm._v("\n Memos\n ") + _vm._v("\n Memos\n ") ]) ], 1 @@ -29557,12 +29537,12 @@ var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _c("div", { staticClass: "relative pb-2" }, [ - _c( - "label", - { staticClass: "form-label absolute pt-1", attrs: { for: _vm.name } }, - [_vm._v(_vm._s(_vm.label))] - ), + return _c("div", { staticClass: "relative" }, [ + _vm.label + ? _c("label", { staticClass: "pb-1", attrs: { for: _vm.name } }, [ + _vm._v(_vm._s(_vm.label)) + ]) + : _vm._e(), _vm._v(" "), _c( "textarea", @@ -29575,7 +29555,7 @@ var render = function() { expression: "value" } ], - staticClass: "form-textarea pt-4 pb-1", + staticClass: "p-1", class: _vm.errorClassObject(), attrs: { id: _vm.name, type: "text" }, domProps: { value: _vm.value }, @@ -29978,7 +29958,23 @@ var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _c("div", { staticClass: "p-2" }, [ + return _c("div", { staticClass: "memo-edit p-2" }, [ + _c("div", { staticClass: "flex-between mb-1" }, [ + _c( + "a", + { + staticClass: "link", + attrs: { href: "#" }, + on: { + click: function($event) { + return _vm.$router.back() + } + } + }, + [_vm._v("\n < Back\n ")] + ) + ]), + _vm._v(" "), _c( "form", { @@ -29993,7 +29989,7 @@ var render = function() { _c("InputField", { attrs: { name: "name", - label: "Memo Title", + label: "Title", placeholder: "Your Title", errors: _vm.errors }, @@ -30005,12 +30001,8 @@ var render = function() { }), _vm._v(" "), _c("TextAreaField", { - attrs: { - name: "memo", - label: "Memo", - placeholder: "Your Memo", - errors: _vm.errors - }, + staticClass: "memo-text-area", + attrs: { name: "memo", placeholder: "Your Memo", errors: _vm.errors }, on: { "update:field": function($event) { _vm.form.memo = $event @@ -30022,7 +30014,7 @@ var render = function() { _c( "button", { - staticClass: "btn-alert mr-3", + staticClass: "btn-alert mr-1", on: { click: function($event) { return _vm.$router.back() @@ -30061,8 +30053,8 @@ var render = function() { var _vm = this var _h = _vm.$createElement var _c = _vm._self._c || _h - return _c("div", { staticClass: "p-2" }, [ - _c("div", { staticClass: "flex-between" }, [ + return _c("div", { staticClass: "memo-edit p-2" }, [ + _c("div", { staticClass: "flex-between mb-1" }, [ _c( "a", { @@ -30093,7 +30085,7 @@ var render = function() { attrs: { name: "name", data: _vm.form.name, - label: "Memo Title", + label: "Title", placeholder: "Your Title", errors: _vm.errors }, @@ -30105,10 +30097,10 @@ var render = function() { }), _vm._v(" "), _c("TextAreaField", { + staticClass: "memo-text-area", attrs: { name: "memo", data: _vm.form.memo, - label: "Memo", placeholder: "Your Memo", errors: _vm.errors }, @@ -30131,7 +30123,7 @@ var staticRenderFns = [ var _h = _vm.$createElement var _c = _vm._self._c || _h return _c("div", { staticClass: "flex-end" }, [ - _c("button", { staticClass: "btn-alert mr-3" }, [_vm._v("Cancel")]), + _c("button", { staticClass: "btn-alert mr-1" }, [_vm._v("Cancel")]), _vm._v(" "), _c("button", { staticClass: "btn-primary" }, [_vm._v("Save")]) ]) @@ -30439,6 +30431,7 @@ var render = function() { _c( "form", { + staticClass: "mb-2", on: { submit: function($event) { $event.preventDefault() @@ -30477,12 +30470,14 @@ var render = function() { } }), _vm._v(" "), - _c("button", [_vm._v("Ajouter")]) + _c("button", { staticClass: "btn-primary" }, [ + _vm._v("Ajouter") + ]) ], 1 ), _vm._v(" "), - _c("div", [ + _c("div", { staticClass: "mb-2" }, [ _c("h2", [_vm._v("Liste des utilisateurs")]), _vm._v(" "), _c( @@ -47390,7 +47385,7 @@ var actions = { }; var mutations = { setTitle: function setTitle(state, title) { - state.title = title + ' | Facebook'; + state.title = title + ' | Portal'; } }; /* harmony default export */ __webpack_exports__["default"] = ({ diff --git a/resources/js/components/Nav.vue b/resources/js/components/Nav.vue index 9e31b0a..665d0ad 100644 --- a/resources/js/components/Nav.vue +++ b/resources/js/components/Nav.vue @@ -7,13 +7,13 @@
- - - Activitées - + + + + + + +
- -

Error Here

diff --git a/resources/js/store/modules/title.js b/resources/js/store/modules/title.js index daba523..9b7dc96 100644 --- a/resources/js/store/modules/title.js +++ b/resources/js/store/modules/title.js @@ -18,7 +18,7 @@ const actions = { const mutations = { setTitle(state, title) { - state.title = title + ' | Facebook' + state.title = title + ' | Portal' } } diff --git a/resources/js/views/Memo/MemoCreate.vue b/resources/js/views/Memo/MemoCreate.vue index f880f61..ed9f821 100755 --- a/resources/js/views/Memo/MemoCreate.vue +++ b/resources/js/views/Memo/MemoCreate.vue @@ -1,11 +1,16 @@