From 10e2b5813837a8ff465622b90852d2e75556b1ad Mon Sep 17 00:00:00 2001 From: Raphael LACOTE Date: Sun, 19 Mar 2023 16:14:03 +0100 Subject: [PATCH] =?UTF-8?q?R=C3=A9paration=20du=20bug=20de=20la=20q8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/team-add.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/view/team-add.js b/src/view/team-add.js index bd18a09..2718ca7 100644 --- a/src/view/team-add.js +++ b/src/view/team-add.js @@ -18,6 +18,12 @@ export default { addTeam: function () { try { + if (this.teamAEdit != null) { + this.id = this.teamAEdit.id + this.name = this.teamAEdit.name + this.description = this.teamAEdit.description + } + this.errorMessage = ''; if (!this.id) { throw new RequiredFieldError("ID"); @@ -38,12 +44,13 @@ export default { throw new StringSize("Name", NAME_MINIMAL_SIZE) } - const team = { id: this.id, name: this.name, description: this.description}; - console.log('form.addTeam', team); + const team = { id: this.id, name: this.name, description: this.description }; + if (this.teamAEdit != null) { this.$emit('teamModifie', team); } else { + this.$emit('teamAjoute', team); } @@ -67,15 +74,18 @@ export default {
{{ errorMessage }}

- +

+


- +

+


- +