diff --git a/canapGEST/API/app/Http/Controllers/CommentsController.php b/canapGEST/API/app/Http/Controllers/CommentsController.php index f47149e861b3b0bf2d10dc01d7d2335f5cec0cb7..ccb85e61f23c9295d0e6524e7ae8f5739f13f4b0 100644 --- a/canapGEST/API/app/Http/Controllers/CommentsController.php +++ b/canapGEST/API/app/Http/Controllers/CommentsController.php @@ -42,9 +42,9 @@ class CommentsController extends Controller public function create() { $this->validate($this->request, [ - 'content' => 'required', - 'is_private' => 'required', - 'applicant_id' => 'required' + 'content' => 'required|string', + 'is_private' => 'required|boolean', + 'applicant_id' => 'required|numeric' ], [lang::get('validation.required')]); $new_content = $this->request->input('content'); @@ -88,8 +88,8 @@ class CommentsController extends Controller public function update($id) { $this->validate($this->request, [ - 'content' => 'required', - 'is_private' => 'required' + 'content' => 'required|string', + 'is_private' => 'required|boolean' ], [lang::get('validation.required')]); $new_content = $this->request->input('content'); diff --git a/canapGEST/API/app/Http/Controllers/MarkersController.php b/canapGEST/API/app/Http/Controllers/MarkersController.php index 82b7f9564633249474fb60e75db0267f47b7f8dd..275620549775a960325f567196f0a8b0b23a5759 100644 --- a/canapGEST/API/app/Http/Controllers/MarkersController.php +++ b/canapGEST/API/app/Http/Controllers/MarkersController.php @@ -30,8 +30,8 @@ class MarkersController extends Controller public function create() { $this->validate($this->request, [ - 'value' => 'required', - 'applicant_id' => 'required', + 'value' => 'required|numeric', + 'applicant_id' => 'required|numeric', ], [lang::get('validation.required')]); $new_value = $this->request->input('value'); @@ -59,7 +59,7 @@ class MarkersController extends Controller public function update($id) { $this->validate($this->request, [ - 'value' => 'required' + 'value' => 'required|numeric' ], [lang::get('validation.required')]); $new_value = $this->request->input('value'); diff --git a/canapGEST/API/app/Http/Controllers/PositionsController.php b/canapGEST/API/app/Http/Controllers/PositionsController.php index 0ca0d8c72ed9029f80ca66e8029fdd34c3f0cb8c..3aa25c0c870c5aadee8267eec6ad48255fa8271a 100644 --- a/canapGEST/API/app/Http/Controllers/PositionsController.php +++ b/canapGEST/API/app/Http/Controllers/PositionsController.php @@ -41,10 +41,10 @@ class PositionsController extends Controller public function createPosition() { $this->validate($this->request, [ - 'position_access_group' => 'required', - 'position_spot_number' => 'required', - 'location_id' => 'required', - 'job_id' => 'required' + 'position_access_group' => 'required|string', + 'position_spot_number' => 'required|numeric', + 'location_id' => 'required|numeric', + 'job_id' => 'required|numeric' ], [lang::get('validation.required')]); $has_permitted_role = AccessLevelHelper::hasPermittedRole($this->user_role, 'responsable'); @@ -71,10 +71,10 @@ class PositionsController extends Controller public function updatePosition($id) { $this->validate($this->request, [ - 'position_access_group' => 'required', - 'position_spot_number' => 'required', - 'location_id' => 'required', - 'job_id' => 'required' + 'position_access_group' => 'required|string', + 'position_spot_number' => 'required|numeric', + 'location_id' => 'required|numeric', + 'job_id' => 'required|numeric' ], [lang::get('validation.required')]); $has_permitted_role = AccessLevelHelper::hasPermittedRole($this->user_role, 'responsable'); diff --git a/canapGEST/API/app/Http/Controllers/StatusController.php b/canapGEST/API/app/Http/Controllers/StatusController.php index cda9a936f4f6fb69524ec0c0b7dc846d9ed2e03e..aff065c32285f6568f83d64f745bb594d4b4f776 100644 --- a/canapGEST/API/app/Http/Controllers/StatusController.php +++ b/canapGEST/API/app/Http/Controllers/StatusController.php @@ -35,7 +35,7 @@ class StatusController extends Controller $has_permitted_role = AccessLevelHelper::hasPermittedRole($this->user_role, 'responsable'); if ($has_access && $has_permitted_role) { $this->validate($this->request, [ - 'status' => 'required' + 'status' => 'required|string' ], [lang::get('validation.required')]); $new_status = $this->request->input('status'); diff --git a/canapGEST/Documentation/CDC_16.04.2019.pdf b/canapGEST/Documentation/CDC_16.04.2019.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5967b94b43c47c63db55c34f4af8f15bb3c51599 Binary files /dev/null and b/canapGEST/Documentation/CDC_16.04.2019.pdf differ diff --git a/canapGEST/Documentation/Captures_autres/Gestion des erreurs - Interface.png b/canapGEST/Documentation/Captures_autres/Gestion des erreurs - Interface.png new file mode 100644 index 0000000000000000000000000000000000000000..9bab1cb9d399495f87998c313223b76db79724e9 Binary files /dev/null and b/canapGEST/Documentation/Captures_autres/Gestion des erreurs - Interface.png differ diff --git a/canapGEST/Documentation/Captures_autres/Gestions des erreurs - API.png b/canapGEST/Documentation/Captures_autres/Gestions des erreurs - API.png new file mode 100644 index 0000000000000000000000000000000000000000..7c06488f723df39185d4338c5a298eeacc71c4e3 Binary files /dev/null and b/canapGEST/Documentation/Captures_autres/Gestions des erreurs - API.png differ diff --git a/canapGEST/Documentation/Captures_autres/diagrammes/Gestion des erreurs - Interface.xml b/canapGEST/Documentation/Captures_autres/diagrammes/Gestion des erreurs - Interface.xml new file mode 100644 index 0000000000000000000000000000000000000000..a09f42eaf1ab18fb6c0b1a0710a44b5b40f79a21 --- /dev/null +++ b/canapGEST/Documentation/Captures_autres/diagrammes/Gestion des erreurs - Interface.xml @@ -0,0 +1 @@ +<mxfile modified="2019-05-09T20:49:40.014Z" host="www.draw.io" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36" etag="o7NBsE4lgwzfvpGo6HFo" version="10.6.7" type="device"><diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">7VzZcqM4FP0aVz/FhTaWx9jp9MxU9UxXMutTFzayzTQGN8aJ01/fAsQiCeONxXHihwQESHDvuecuEgzQeLn9FNqrxefAod4Aas52gO4GEAJkAfYvbnlJWwyopw3z0HX4SUXDo/uD8kaNt25ch66FE6Mg8CJ3JTZOA9+n00hos8MweBZPmwWeOOrKnlOl4XFqe2rrP64TLXgr0K3iwC/UnS/40CY00gMTe/ptHgYbn483gGiW/NLDSzvriz/oemE7wXOpCX0coHEYBFG6tdyOqRfLNhNbet39jqP5fYfUjw65AKYXPNnehj/6R/8pcGPVfdj4lP0P6ffNYIwGt7cR5fccvWRyYre/ijeX23kMhOHMC56nCzuMhhENl65vR0E4QKOZ63njwIu32VXoPvm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t0rdxZlv0wbzp8pXfVO/fJmm/qCPhv9GtTKFvkUcIzrsBzax8WsdTy+XUrQHppEKOeFZB/Laukgd8rFkddjwYO+LZUxxpQ665XrgHxbZ78ox7Na4DtFl/aTZ1G8Tlj9PEn</diagram></mxfile> \ No newline at end of file diff --git a/canapGEST/Documentation/Captures_autres/diagrammes/Gestions des erreurs - API.xml b/canapGEST/Documentation/Captures_autres/diagrammes/Gestions des erreurs - API.xml new file mode 100644 index 0000000000000000000000000000000000000000..e941da7b6a9ebaaae00ff8a699e5dd8c7203c798 --- /dev/null +++ b/canapGEST/Documentation/Captures_autres/diagrammes/Gestions des erreurs - API.xml @@ -0,0 +1 @@ +<mxfile modified="2019-05-09T19:58:19.005Z" host="www.draw.io" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36" etag="4ADpdtadasOvTcmPbfD9" version="10.6.7" type="device"><diagram id="6a731a19-8d31-9384-78a2-239565b7b9f0" name="Page-1">7V1bc5s4GP01nn2qR0I3eMylyc5022Y33UufdqhNbCbEZDFOnP76FUYySMIY28LYsf3QggABOue7C6WHrp7mt4n/PP4cD4Oo54DhvIeue44DkQf5f1nLW97CHJo3jJJwKE4qGu7Dn4FoBKJ1Fg6DqXJiGsdRGj6rjYN4MgkGqdLmJ0n8qp72EEfqXZ/9UWA03A/8yGz9OxymY9EKqVcc+DUIR2Nxa9dh+YEf/uBxlMSzibhfz0E3i19++MmXfYkXnY79YfxaakIfe+gqieM033qaXwVRNrZy2PLrblYcXT53EkzSJhc4+QUvfjQTr/5H7wr1LrxB8JyG8STD8JfZJOD/J8F/s8WxizQQD5++yQHj7/GcbT7NRxkj+g9R/DoY+0naT4PkKZz4aZz00OVDGEVXcZRtXxdDgy6naRI/BqUjYPFbHpEg8PG55DcYhvz15NmTmD9e0XwdJpwR2aNnh5LsssuHuDh90Tn0EBLt9+IlspuN06eIb0K+aQ6kGNuXIEmDealJDOx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4sMDI753FAofAqoqUM4sK0U2CCGqEQvdrlhzsbRFEPZjD1avq8WbwuFJrUm649oi+pqVmCwrAJ2trFWx8Owuau9dlmOlDKyfYeB2q++0zLmzpYNrdNRwypctnVOxRuP7/1RMXxSccBtjKoe9fixGzVjgBD+lRATpept2D43prVYsY5otfZPdJ9uGBm7nVRCV78u1xY0qlzSVSfC9LGlKrX6refSmufGU1ppZgl2ZZgRozeQ/hLf8Xm5Nt95hz5SiZmixNb8tFjiQS7UCB+66wNHYAc3NQlcsx7CuvoHlR5cbz2llSqZLS3UZ3doqsGv1CbKmPqGfr02rqijI157fTjRP7UZ7RJ1PAgA9xuTuAUoSIXWSdNzZXUZV4kOyE/H5bvH39fLTiz9iiD7+Dw==</diagram></mxfile> \ No newline at end of file diff --git a/canapGEST/Documentation/Documentation_administrateur.docx b/canapGEST/Documentation/Documentation_administrateur.docx index d1f8e4a7949627eb884786d4ae740da0c96cac54..be821edb7627d83834cd10b750a716d84476cf52 100644 Binary files a/canapGEST/Documentation/Documentation_administrateur.docx and b/canapGEST/Documentation/Documentation_administrateur.docx differ diff --git a/canapGEST/Documentation/Exports PDF/Rapport_Nicolas_Crausaz.pdf b/canapGEST/Documentation/Exports PDF/Rapport_Nicolas_Crausaz.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c8326c74adc6f4290859ad92630323a9ee00aba6 Binary files /dev/null and b/canapGEST/Documentation/Exports PDF/Rapport_Nicolas_Crausaz.pdf differ diff --git "a/canapGEST/Documentation/Exports PDF/planification_d\303\251roulement_NicolasCrausaz.pdf" "b/canapGEST/Documentation/Exports PDF/planification_d\303\251roulement_NicolasCrausaz.pdf" new file mode 100644 index 0000000000000000000000000000000000000000..abe9d128aeac3f4e2949118dc1f509543d8f2ddd Binary files /dev/null and "b/canapGEST/Documentation/Exports PDF/planification_d\303\251roulement_NicolasCrausaz.pdf" differ diff --git a/canapGEST/Documentation/Rapport.docx b/canapGEST/Documentation/Rapport.docx index e6cf9bfbe68ed103a4025154cf2560cb6b0337b3..32744b4ab9ab4066e837b16e4cb3fe33461b2b8e 100644 Binary files a/canapGEST/Documentation/Rapport.docx and b/canapGEST/Documentation/Rapport.docx differ diff --git "a/canapGEST/Documentation/R\303\251sum\303\251.docx" "b/canapGEST/Documentation/R\303\251sum\303\251.docx" new file mode 100644 index 0000000000000000000000000000000000000000..2611b9531078737ee78538282492a35e0ebea1f6 Binary files /dev/null and "b/canapGEST/Documentation/R\303\251sum\303\251.docx" differ diff --git a/canapGEST/Documentation/journal_travail.xlsx b/canapGEST/Documentation/journal_travail.xlsx index 0826fbf4a673b5c93810de046501849bcad098ab..bf5cb6ee4f0cbff841087b1f2c508372bd2322ed 100644 Binary files a/canapGEST/Documentation/journal_travail.xlsx and b/canapGEST/Documentation/journal_travail.xlsx differ diff --git a/canapGEST/Documentation/planification_etatActuel_NicolasCrausaz - Copy.xlsx b/canapGEST/Documentation/planification_etatActuel_NicolasCrausaz - Copy.xlsx index e9542293b80f1d5730f9be34fdee71de415a139c..0bd1aaeb1175453c68e8c398b14481e1adf14df9 100644 Binary files a/canapGEST/Documentation/planification_etatActuel_NicolasCrausaz - Copy.xlsx and b/canapGEST/Documentation/planification_etatActuel_NicolasCrausaz - Copy.xlsx differ diff --git a/canapGEST/Site/src/layouts/MainNavbar.vue b/canapGEST/Site/src/layouts/MainNavbar.vue index f8163d1507b15b13fee61516187daf2fae634473..54205c9c5076cf00dbf49b02b077cd033f0a644d 100644 --- a/canapGEST/Site/src/layouts/MainNavbar.vue +++ b/canapGEST/Site/src/layouts/MainNavbar.vue @@ -30,8 +30,4 @@ export default { logout() { this.$store.dispatch('moduleUser/logout', true) } } } -</script> - -<style scoped> - -</style> +</script> \ No newline at end of file diff --git a/canapGEST/Site/src/plugins/axios.js b/canapGEST/Site/src/plugins/axios.js index 0cab7215b2d3713507d52c24647633c4dda403c8..1f73227f932d628ff83dc11be08f84bc2fea2a8e 100644 --- a/canapGEST/Site/src/plugins/axios.js +++ b/canapGEST/Site/src/plugins/axios.js @@ -8,14 +8,14 @@ const instance = axios.create({ }) instance.interceptors.response.use(function (response) { - return response; + return response }, function (error) { if (!error.response) { store.commit('moduleSnackbar/toggle', { open: true, message: 'API non atteignable', type: 'warning' }, { root: true }) } else if (error.response.status == 400 || error.response.status == 401) { // Erreur de token store.commit('moduleSnackbar/toggle', { open: true, message: error.response.data.error, type: 'warning' }, { root: true }) - // store.dispatch('moduleUser/logout', false) + store.dispatch('moduleUser/logout', false) } else if (error.response.status == 403 || error.response.status == 404) { router.push({ name: 'error', params: { status: error.response.data.error, message: error.response.data.message, route: '' } }) } else {