Skip to content

Commit

Permalink
Merge pull request #3798 from betagouv/spinner-message
Browse files Browse the repository at this point in the history
Ajout du spinner lorsqu'on récupère les actions à télédéclarer
  • Loading branch information
alemangui authored Apr 8, 2024
2 parents 56eb869 + 488faac commit 7ac5ed9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<template>
<div>
<div v-if="loading" class="pa-10 text-center">
<div v-if="loading" class="pa-10 align-center d-flex flex-column">
<p>
Merci de patienter, nous compilons les actions concernant vos cantines. Ceci peut prendre quelques secondes.
</p>
<v-progress-circular indeterminate></v-progress-circular>
</div>
<div v-else>
Expand Down Expand Up @@ -527,6 +530,7 @@ export default {
})
},
fetchDiagnosticsToTeledeclare() {
this.loading = true
return fetch(`/api/v1/diagnosticsToTeledeclare/${this.year}`)
.then((response) => {
if (response.status < 200 || response.status >= 400) throw new Error(`Error encountered : ${response}`)
Expand All @@ -541,6 +545,7 @@ export default {
this.toTeledeclare = []
this.$store.dispatch("notifyServerError", e)
})
.finally(() => (this.loading = false))
},
suggestTeledeclare() {
if (
Expand Down

0 comments on commit 7ac5ed9

Please sign in to comment.