From 784ab71557251b76f71d1ba17bd1c14bd9fb9172 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Mon, 30 Jan 2023 15:15:29 +0000 Subject: [PATCH] working on add contract --- src/views/contracts/ContractEdit.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/contracts/ContractEdit.vue b/src/views/contracts/ContractEdit.vue index 6ccf555..0c6d3b3 100644 --- a/src/views/contracts/ContractEdit.vue +++ b/src/views/contracts/ContractEdit.vue @@ -154,7 +154,15 @@ export default { }).then(resp => { console.log("Saved Contract : " + JSON.stringify(resp.data)) this.saving = false - this.$emit('contractupdate', resp.data) + if (this.contract.isNew) { + if (resp.data == true) { + this.$emit('contractupdate', resp.data) + } else { + console.log("Not Saved") + } + } else { + this.$emit('contractupdate', resp.data) + } }).catch(err => { console.log(err) this.saving = false