# HG changeset patch # User Fadi Abbud # Date 1551691579 -3600 # Node ID 408e0f4d40084fd4d9a2f1eff94af2091900049e # Parent 204b0baac93c19533e2e1cdfa3c52fcae9a8cbe7 clinet:pdf-gen template:unifiy feedback messages for template * improve displaying a message after uploading a template * give a feedback message after deleting a template diff -r 204b0baac93c -r 408e0f4d4008 client/src/components/systemconfiguration/PDFTemplates.vue --- a/client/src/components/systemconfiguration/PDFTemplates.vue Mon Mar 04 08:18:06 2019 +0100 +++ b/client/src/components/systemconfiguration/PDFTemplates.vue Mon Mar 04 10:26:19 2019 +0100 @@ -30,10 +30,7 @@ @@ -42,13 +39,7 @@ - -
-

- {{ templateToUpload.name }} uploaded successfully -

-
@@ -91,16 +77,14 @@ * Markus Kottländer */ import { HTTP } from "@/lib/http"; -import { displayError } from "@/lib/errors.js"; +import { displayError, displayInfo } from "@/lib/errors.js"; export default { name: "pdftemplates", data() { return { templates: [], - uploading: false, - templateToUpload: "", - showSuccessUploadMsg: false + uploading: false }; }, methods: { @@ -135,8 +119,10 @@ ) .then(() => { this.loadTemplates(); - this.templateToUpload = template; - this.showSuccessUploadMsg = true; + displayInfo({ + message: + template.name + " " + this.$gettext("uploaded successfully") + }); }) .catch(e => { const { status, data } = e.response; @@ -204,6 +190,10 @@ ); if (removeIndex !== -1) { this.templates.splice(removeIndex, 1); + displayInfo({ + message: + template.name + " " + this.$gettext("deleted successfully") + }); } }); }