From 46cebefcbbeb3622ed2012ec5dd31f72c0984a2b Mon Sep 17 00:00:00 2001 From: SamuelQuetin Date: Fri, 12 Jul 2024 10:09:33 +0200 Subject: [PATCH 01/12] Changement du titre + favicon --- package.json | 2 +- public/favicon.ico | Bin 15406 -> 1150 bytes src/App.vue | 6 +++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b6b6674..32dd27e 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "vuetify-project", + "name": "Item", "version": "0.0.0", "scripts": { "dev": "vite", diff --git a/public/favicon.ico b/public/favicon.ico index 8fb9f91b3aab4eec0c76ffc5342528033c61e247..9832fe775d68e1e080ab3febfa46aaf3b014d667 100644 GIT binary patch literal 1150 zcmb8v+e!ja6b9fe1zmI_1YVY%bUfrC=^XVY6;V_a5=C?%LL_>LAj~w=%uLfvGY?t4 zMsM=BR<ioJ%lH?wE{Z}!Dzlrqs}HY*yfYQ0k_i&DyHf(uq*z^ozV`KwcLN4=j0L;p zkFhuAfR4c*=aPNwk2|4bw9|m><8ZtWV33eEK#CHcsdKT88BB(kZZUHXqP3B!8bt zgAG1Md=_-;A)5gkROM!bV2djII literal 15406 zcmeHO3v5%@8NNVarCoU?zSqezmT6npu}xxXJJhY(x=s~hQ>SSYYSncU&|(|9Y?QVX z@}TB1G8mASM;tRKYgJkrAW)&g7${B%c>oE7;)O>NNO_bu4G-IdNB({PbTkJL{ZGDJe2DLL+vq#sL?l$jZPe_*I2y@|4sBRjso zUy`aUlJo$60})6B%aMKN&yMG1Qvjth%4dDy{HM^34) z&_TyGJg3UC{J|n2-wr)LDYwhNWBH4VL-JgYz;erTEKiMF20`|$Cf~GysBU40j@&)u zboK>@(yL25%R|RmS~6@99bG>PviV`j>&k~M@~J%cn{`uCzUOyY^23rlWt6DH=aut3 zlZo^g63xIXwP(4)hgT<|I>hSGqh7YbLP$jL+%p0>vM2Su?wmOV;-uyLFww=KN5Ox{j<% zmi}mZc22bZyxbmI!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uy)7U=EIpPM-5 zPv}(pkwc!Zx3$@4;Y){)0d2tO5v#db4**wJ~;d2`ShTX zw|GaKwMoD4ydIzqSN(;l&j_8}$q^eYga7tU+}ZvgxyO*m1UDkuojePFZ zG`-$PpE1`DpyrLMO}R7wCfu3t6Y|B7d%f_n+{8^32;HSdS9&hVGwt*sUYr-!%%`a~|XP)!GJa zaPfvq9vz7{ms4}`U~qpQ+@r?~G$CeSuOWUWWPj8xrxoKsi%ALkMoN~Re@yeI<`b#& zQakqh?^Bfdlv*~90r${a#kP)=j;z5r;Qua|_8~6ciamnnhpFd84r{fjgNVx%{UgRa z5XnEKlf}cZ&elidYgP}Qi}Z0^o$C^y%G~k#_Qp8=1^BDy6=xQN&GlMeiCUK;x&F$^ zjA44c!M?-)Y1kOO--Oix|DE7=F!d?WE|oc-P;ICUYO&YsIA3qS68`^+SoxzLDfxQ- z)V%&7_{XQaWqV^?8s0=b5Yxwfs(L2+kBDu`F4FIF*gxGfML8AK#-01US-npCiqalZ z?M~DOWA<^ZR|~P;79^A!*A-C1sshAC6<~Z9P|a%vs7IcNOJh792S@Vc$sCItcXG)K z1Fn?E#hswKujQD~WT#qpf3`ix0(EL{#By^?PeQ2& diff --git a/src/views/Suppression/SuppTable.vue b/src/views/Suppression/SuppTable.vue new file mode 100644 index 0000000..9f8876b --- /dev/null +++ b/src/views/Suppression/SuppTable.vue @@ -0,0 +1,8 @@ + + + + + From 7aec294a43f7f85685a8a10f86011b6ea07d105d Mon Sep 17 00:00:00 2001 From: SamuelQuetin Date: Mon, 15 Jul 2024 14:12:07 +0200 Subject: [PATCH 04/12] Ajout select Type File --- src/components/Supp/TypeFile.vue | 36 +++++++++++++++++++++++++++++ src/store/authStore.js | 1 + src/views/Suppression/SuppSteps.vue | 13 ++++++----- 3 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 src/components/Supp/TypeFile.vue diff --git a/src/components/Supp/TypeFile.vue b/src/components/Supp/TypeFile.vue new file mode 100644 index 0000000..064acee --- /dev/null +++ b/src/components/Supp/TypeFile.vue @@ -0,0 +1,36 @@ + + diff --git a/src/store/authStore.js b/src/store/authStore.js index 196ed00..0e685fa 100644 --- a/src/store/authStore.js +++ b/src/store/authStore.js @@ -6,6 +6,7 @@ export const useAuthStore = defineStore('auth', { token: sessionStorage.getItem('token'), authenticated: !!sessionStorage.getItem('token'), }), + getters: { getUser: (state) => state.user, isAuthenticated: (state) => state.authenticated, diff --git a/src/views/Suppression/SuppSteps.vue b/src/views/Suppression/SuppSteps.vue index 1b36e92..151eb6e 100644 --- a/src/views/Suppression/SuppSteps.vue +++ b/src/views/Suppression/SuppSteps.vue @@ -7,7 +7,7 @@ --> - + < @@ -73,6 +73,7 @@ From 2952c4ef8c1d47d5c89ea3b042a6e8fb1bb913d3 Mon Sep 17 00:00:00 2001 From: SamuelQuetin Date: Tue, 16 Jul 2024 11:46:42 +0200 Subject: [PATCH 07/12] Ajout message erreur pour upload file --- src/views/Suppression/SuppSteps.vue | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/views/Suppression/SuppSteps.vue b/src/views/Suppression/SuppSteps.vue index 8ce8896..3530ff5 100644 --- a/src/views/Suppression/SuppSteps.vue +++ b/src/views/Suppression/SuppSteps.vue @@ -58,8 +58,17 @@ Selection du fichier {{typeFileSelected}} + + + - + + précédent + + précédent From 4edb01f331da8c1c8ee9b6888704def418cc1684 Mon Sep 17 00:00:00 2001 From: SamuelQuetin Date: Tue, 16 Jul 2024 11:50:57 +0200 Subject: [PATCH 08/12] Ajout RCR --- src/views/Suppression/SuppSteps.vue | 57 ++++++++++++++++++++--------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/src/views/Suppression/SuppSteps.vue b/src/views/Suppression/SuppSteps.vue index 3530ff5..6723db8 100644 --- a/src/views/Suppression/SuppSteps.vue +++ b/src/views/Suppression/SuppSteps.vue @@ -44,16 +44,16 @@ - - - - - - - - - - + + + + + Valider + + @@ -107,19 +107,42 @@ const demande = ref(); const emits = defineEmits(['backendError']); const props = defineProps({id: {type: String}}); +const rcrSelected = ref(); const typeFileSelected = ref(); const fileSelected = ref(); const isLoading = ref(false); const alertMessage = ref(''); const alertType = ref('success'); -onMounted(() => { - demandesService.creerDemande('341725201', 'SUPP') - .then(response => { - demande.value = response.data; - next(); - }) -}) + +function createDemande() { + if (demande.value && (rcrSelected.value === demande.value.rcr)) { + next(); + } else if (demande.value) { + isLoading.value = true; + demandesService.modifierRcrDemande(demande.value.id, rcrSelected.value, 'SUPP') + .then(response => { + demande.value = response.data; + next(); + }).catch(err => { + emits('backendError', err); + }).finally(() => { + isLoading.value = false; + }); + } else { + isLoading.value = true; + demandesService.creerDemande(rcrSelected.value, 'SUPP') + .then(response => { + demande.value = response.data; + next(); + }).catch(err => { + emits('backendError', err); + }).finally(() => { + isLoading.value = false; + }); + } +} + function uploadFile() { alertMessage.value = ''; alertType.value = 'success'; From 6d7e261726d84c802420f7498bda1f72a7255968 Mon Sep 17 00:00:00 2001 From: SamuelQuetin Date: Wed, 17 Jul 2024 08:46:20 +0200 Subject: [PATCH 09/12] update --- src/views/Suppression/SuppSteps.vue | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/src/views/Suppression/SuppSteps.vue b/src/views/Suppression/SuppSteps.vue index 6723db8..6f1ea32 100644 --- a/src/views/Suppression/SuppSteps.vue +++ b/src/views/Suppression/SuppSteps.vue @@ -57,7 +57,8 @@ - Selection du fichier {{typeFileSelected}} + Selection du fichier {{typeFileSelected}} + Envoyer + + Suivant + @@ -97,6 +103,8 @@ import { onMounted, ref } from 'vue'; import TypeFile from '@/components/Supp/TypeFile.vue'; import SelectFile from '@/components/SelectFile.vue'; import demandesService from '@/service/DemandesService'; +import {tr} from "vuetify/locale"; +import DownloadFile from "@/components/Modif/DownloadFile.vue"; @@ -110,6 +118,9 @@ const props = defineProps({id: {type: String}}); const rcrSelected = ref(); const typeFileSelected = ref(); const fileSelected = ref(); +const fileLink = ref(''); +const fileName = ref(''); +const isLoaded = ref(false) const isLoading = ref(false); const alertMessage = ref(''); const alertType = ref('success'); @@ -147,9 +158,16 @@ function uploadFile() { alertMessage.value = ''; alertType.value = 'success'; isLoading.value = true; - demandesService.uploadDemande(1, fileSelected.value, 'SUPP') + demandesService.uploadDemande(demande.value.id, fileSelected.value, 'SUPP') .then(() => { alertMessage.value = "Fichier envoyé"; + isLoaded.value = true; + demandesService.getFile(demande.value.id, 'SUPP','fichier_prepare', '.csv') + .then(response => { + let blob = new Blob([response.data], {type: 'application/csv'}); + fileLink.value = window.URL.createObjectURL(blob); + fileName.value = `fichier_demande_${demande.value.id}.csv`; + }) }) .catch(err => { alertMessage.value = err.response.data.message; @@ -177,5 +195,6 @@ function raz(){ isLoading.value = false; alertMessage.value = ''; alertType.value = 'success'; + isLoaded.value = false; } From d1b63fc6fc8725699a998f122320070ab1142fd5 Mon Sep 17 00:00:00 2001 From: SamuelQuetin Date: Wed, 17 Jul 2024 14:04:25 +0200 Subject: [PATCH 10/12] =?UTF-8?q?Ajout=20variable=20dans=20composant=20pou?= =?UTF-8?q?r=20DL=20le=20fichier=20pr=C3=A9par=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Suppression/SuppSteps.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Suppression/SuppSteps.vue b/src/views/Suppression/SuppSteps.vue index 6f1ea32..7f1ca28 100644 --- a/src/views/Suppression/SuppSteps.vue +++ b/src/views/Suppression/SuppSteps.vue @@ -58,7 +58,7 @@ Selection du fichier {{typeFileSelected}} - + Date: Wed, 17 Jul 2024 14:13:20 +0200 Subject: [PATCH 11/12] ajout bouton next --- src/views/Suppression/SuppSteps.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/views/Suppression/SuppSteps.vue b/src/views/Suppression/SuppSteps.vue index 7f1ca28..d728b00 100644 --- a/src/views/Suppression/SuppSteps.vue +++ b/src/views/Suppression/SuppSteps.vue @@ -58,7 +58,7 @@ Selection du fichier {{typeFileSelected}} - + Téléchargement du fichier PPN/RCR/EPN - + + précédent + + précédent @@ -81,6 +84,8 @@ Suivant @@ -120,7 +125,8 @@ const typeFileSelected = ref(); const fileSelected = ref(); const fileLink = ref(''); const fileName = ref(''); -const isLoaded = ref(false) +const isLoaded = ref(false); +const isDownloaded = ref(false); const isLoading = ref(false); const alertMessage = ref(''); const alertType = ref('success'); @@ -181,6 +187,9 @@ function prevSelectTypeFile(){ typeFileSelected.value = null; raz(); } +function prevSelectFile(){ + raz(); +} function next() { currentStep.value++; raz(); @@ -196,5 +205,6 @@ function raz(){ alertMessage.value = ''; alertType.value = 'success'; isLoaded.value = false; + isDownloaded.value = false; } From 40b2ffcf77d6a992c703326a0507d88fc0c4b56e Mon Sep 17 00:00:00 2001 From: SamuelQuetin Date: Thu, 18 Jul 2024 10:36:26 +0200 Subject: [PATCH 12/12] Reformat Accueil Comme ItemV2 Ajout Btn page supp et tableau supp --- src/components/Home/BtnAccueil.vue | 40 +++++++++++------------ src/router/index.js | 7 ++++ src/views/Accueil.vue | 51 ++++++++++++++++++------------ 3 files changed, 57 insertions(+), 41 deletions(-) diff --git a/src/components/Home/BtnAccueil.vue b/src/components/Home/BtnAccueil.vue index c11fe99..1ab9873 100644 --- a/src/components/Home/BtnAccueil.vue +++ b/src/components/Home/BtnAccueil.vue @@ -1,14 +1,24 @@ - diff --git a/src/router/index.js b/src/router/index.js index 2c8a5f6..f9457e2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -11,6 +11,7 @@ import Accueil from '@/views/Accueil.vue'; import ModificationEmail from '@/views/Utilisateur/ModificationEmail.vue'; import demandesService from '@/service/DemandesService' import {useAuthStore} from '@/store/authStore' +import SuppTable from "@/views/Suppression/SuppTable.vue"; const routes = [ { @@ -66,6 +67,12 @@ const routes = [ component: RecouvTable, meta: {requiresAuth: true} }, + { + path: '/suppression-tableau', + name: 'suppression-tableau', + component: SuppTable, + meta: {requiresAuth: true} + }, { path: '/modification', name: 'modification', diff --git a/src/views/Accueil.vue b/src/views/Accueil.vue index cd15e3f..8bafeb1 100644 --- a/src/views/Accueil.vue +++ b/src/views/Accueil.vue @@ -1,37 +1,46 @@