+
+ Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/
app/
@@ -10,67 +12,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- Created with the PHP Coding Standard Generator. http://edorian.github.com/php-coding-standard-generator/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -78,13 +91,39 @@
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
*/database/migrations/*
+
diff --git a/resources/js/app.js b/resources/js/app.js
index 1597fa5..6cae220 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -1,4 +1,5 @@
require('./bootstrap');
+require('./session_watch');
//window.Vue = require('vue/dist/vue.min.js');
import Vue from 'vue'
import moment from 'moment'
diff --git a/resources/js/modules/session_pinger.js b/resources/js/modules/session_pinger.js
new file mode 100644
index 0000000..4a3d318
--- /dev/null
+++ b/resources/js/modules/session_pinger.js
@@ -0,0 +1,16 @@
+import axios from "axios"
+
+export default {
+ methods: {
+ async validateSession(callback) {
+ axios.get('/ping').then(response => {
+ if (response.status !== 200) {
+ callback()
+ }
+ }).catch(() => {
+ callback()
+ })
+ }
+ },
+}
+
diff --git a/resources/js/session_watch.js b/resources/js/session_watch.js
new file mode 100644
index 0000000..fbdc01b
--- /dev/null
+++ b/resources/js/session_watch.js
@@ -0,0 +1,29 @@
+document.addEventListener('DOMContentLoaded', () => {
+ let sessionValidates = document.querySelectorAll('[data-validate-session]'),
+ validateSession = require('./modules/session_pinger').default.methods.validateSession,
+ sessionInvalidAction = () => {
+ Swal.fire({
+ title: 'Session expirée',
+ text: 'Votre session à expiré vous devrez recharger la page pour soumettre des informations.',
+ icon: 'error'
+ })
+ clearTimeout(timeOut)
+ },
+ timer = 10000,
+ timeOut
+
+ let timerAction = () => {
+ validateSession(sessionInvalidAction)
+ timeOut = setTimeout(timerAction, timer)
+ }
+
+ if (window.__SESSION_WATCH) {
+ timerAction()
+ }
+
+ for (let element of sessionValidates) {
+ element.addEventListener('click', () => {
+ validateSession(sessionInvalidAction)
+ })
+ }
+})
diff --git a/resources/sass/_bootswatch.scss b/resources/sass/_bootswatch.scss
index cc80c56..2c223fb 100644
--- a/resources/sass/_bootswatch.scss
+++ b/resources/sass/_bootswatch.scss
@@ -327,9 +327,11 @@ a.list-group-item {
}
}
-.modal,
-.toast {
- .btn-close {
- background-image: url("data:image/svg+xml,");
+.modal{
+ color: #1e2125;
+ & .toast {
+ .btn-close {
+ background-image: url("data:image/svg+xml,");
+ }
}
-}
+}
\ No newline at end of file
diff --git a/resources/views/emails/new-ticket.blade.php b/resources/views/emails/new-ticket.blade.php
index 4a9c665..4fcd0a3 100644
--- a/resources/views/emails/new-ticket.blade.php
+++ b/resources/views/emails/new-ticket.blade.php
@@ -3,7 +3,7 @@
- Projet : {{ $ticket->site->name }}
- Type : {{ $ticket->type->label }}
- - Créé par : {{ $ticket->user->name }}
+ - Créé par : {{ $ticket->user()->withTrashed()->firstOrFail()->name }}
Description :
diff --git a/resources/views/emails/ticket-mention.blade.php b/resources/views/emails/ticket-mention.blade.php
index fa3c35c..5f68f59 100644
--- a/resources/views/emails/ticket-mention.blade.php
+++ b/resources/views/emails/ticket-mention.blade.php
@@ -3,7 +3,7 @@
- Projet : {{ $ticket->site->name }}
- Type : {{ $ticket->label }}
- - Créé par : {{ $ticket->user->name }}
+ - Créé par : {{ $ticket->user()->withTrashed()->firstOrFail()->name }}
{!! clean(nl2br($corpsMaj)) !!}
Lien vers le ticket : Ouvrir dans un nouvel onglet
diff --git a/resources/views/emails/ticket-update.blade.php b/resources/views/emails/ticket-update.blade.php
index de7d58d..7330aba 100644
--- a/resources/views/emails/ticket-update.blade.php
+++ b/resources/views/emails/ticket-update.blade.php
@@ -3,7 +3,7 @@
- Projet : {{ $ticket->site->name }}
- Type : {{ $ticket->type->label }}
- - Créé par : {{ $ticket->user->name }}
+ - Créé par : {{ $ticket->user()->withTrashed()->firstOrFail()->name }}
{!! clean(nl2br($corpsMaj)) !!}
-Lien vers le ticket : Ouvrir dans un nouvel onglet
\ No newline at end of file
+Lien vers le ticket : Ouvrir dans un nouvel onglet
diff --git a/resources/views/layout/app.blade.php b/resources/views/layout/app.blade.php
index dcf8de8..f096b05 100644
--- a/resources/views/layout/app.blade.php
+++ b/resources/views/layout/app.blade.php
@@ -48,5 +48,9 @@
@stack('scripts')
@crudPoliciesJS()
+ @auth
+ {{-- JS SESSION ALERT IF SESSION TIMEOUT --}}
+
+ @endauth