diff --git a/frontend/src/components/ImporterSuccessDialog.vue b/frontend/src/components/ImporterSuccessDialog.vue new file mode 100644 index 000000000..69ff57f15 --- /dev/null +++ b/frontend/src/components/ImporterSuccessDialog.vue @@ -0,0 +1,52 @@ + + + diff --git a/frontend/src/views/DiagnosticsImporter/DiagnosticImportPage.vue b/frontend/src/views/DiagnosticsImporter/DiagnosticImportPage.vue index 4c31c08ac..e00280c7e 100644 --- a/frontend/src/views/DiagnosticsImporter/DiagnosticImportPage.vue +++ b/frontend/src/views/DiagnosticsImporter/DiagnosticImportPage.vue @@ -77,17 +77,24 @@ Traitement en cours...
-
- -

- {{ canteenCount }} cantines - et {{ diagnosticCount }} diagnostics  - et {{ teledeclarationCount }} télédéclarations  - ont été {{ diagnosticCount ? "traités" : "traitées" }}. -

-
- ← Retourner à mes cantines -
+ +

3. Adresser les erreurs suivants, et re-essayer

@@ -260,10 +267,11 @@ import HelpForm from "./HelpForm" import Constants from "@/constants" import DownloadLinkList from "@/components/DownloadLinkList.vue" import DsfrCallout from "@/components/DsfrCallout" +import ImporterSuccessDialog from "@/components/ImporterSuccessDialog.vue" export default { name: "DiagnosticImportPage", - components: { BreadcrumbsNav, FileDrop, HelpForm, DownloadLinkList, DsfrCallout }, + components: { BreadcrumbsNav, FileDrop, HelpForm, DownloadLinkList, DsfrCallout, ImporterSuccessDialog }, props: ["importUrlSlug"], data() { const user = this.$store.state.loggedUser @@ -872,7 +880,8 @@ export default { this.seconds = json.seconds this.encodingUsed = json.encoding let resultMessage = { - message: `${this.canteenCount} cantines traitées`, + message: + this.canteenCount > 1 ? `${this.canteenCount} cantines traitées` : `${this.canteenCount} cantine traitée`, status: "success", } if (this.errors.length) { diff --git a/frontend/src/views/PurchasesImporter.vue b/frontend/src/views/PurchasesImporter.vue index fd2a08431..fdef0b0be 100644 --- a/frontend/src/views/PurchasesImporter.vue +++ b/frontend/src/views/PurchasesImporter.vue @@ -41,12 +41,14 @@ Traitement en cours...

- - - {{ purchaseCount }} achats - ont été créés. - - +

Ce fichier a déjà été utilisé pour importer {{ duplicatePurchaseCount }} @@ -130,10 +132,11 @@ import FileDrop from "@/components/FileDrop" import PurchasesTable from "@/components/PurchasesTable" import SchemaTable from "@/components/SchemaTable" import validators from "@/validators" +import ImporterSuccessDialog from "@/components/ImporterSuccessDialog.vue" export default { name: "ImportPurchases", - components: { FileDrop, PurchasesTable, SchemaTable }, + components: { FileDrop, PurchasesTable, SchemaTable, ImporterSuccessDialog }, data() { const user = this.$store.state.loggedUser return { @@ -151,6 +154,7 @@ export default { validators, isStaff: user.isStaff, duplicateFile: false, + showSuccessDialog: false, } }, methods: { @@ -169,6 +173,7 @@ export default { this.duplicatePurchases = json.duplicatePurchases this.duplicatePurchaseCount = json.duplicatePurchaseCount this.seconds = json.seconds + this.showSuccessDialog = true this.$store.dispatch("notify", { message: `Fichier traité en ${Math.round(this.seconds)} secondes`, }) diff --git a/web/static/images/picto-dsfr/success.svg b/web/static/images/picto-dsfr/success.svg new file mode 100644 index 000000000..1d9a6fe0e --- /dev/null +++ b/web/static/images/picto-dsfr/success.svg @@ -0,0 +1,38 @@ + + + + + + + + +