From 64fcfff3736a70f95e273dae464af2c7abbf3dfd Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Thu, 23 Mar 2023 20:46:24 +0000 Subject: [PATCH] better saving/loading in contracts and med feeds, handlers for adding med feed --- src/views/contracts/ContractEdit.vue | 18 ++++++++---------- src/views/medfeeds/MedFeedsEdit.vue | 14 ++++++++++++-- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/views/contracts/ContractEdit.vue b/src/views/contracts/ContractEdit.vue index bd1860e..8da051d 100644 --- a/src/views/contracts/ContractEdit.vue +++ b/src/views/contracts/ContractEdit.vue @@ -69,9 +69,11 @@ Save Add { console.log("Saved Contract : " + JSON.stringify(resp.data)) this.saving = false - if (resp.data == true) { - let stat = resp.data - if (stat.status == true ) { - if (this.contract.isNew) { - this.$emit('contractupdate', resp.data) - } else { - this.$emit('contractupdate', resp.data) - } + let stat = resp.data + if (stat.status == true ) { + if (this.contract.isNew) { + this.$emit('contractupdate', resp.data) } else { - this.errors.push("Error Saving... ") + this.$emit('contractupdate', resp.data) } - } else { + } else { this.errors.push("Contract not saved.") console.log("Not Saved") } diff --git a/src/views/medfeeds/MedFeedsEdit.vue b/src/views/medfeeds/MedFeedsEdit.vue index 86efda1..e7e26fb 100644 --- a/src/views/medfeeds/MedFeedsEdit.vue +++ b/src/views/medfeeds/MedFeedsEdit.vue @@ -51,13 +51,15 @@ - + Save Add { console.log(err) }) + .finally(()=>{ + this.saving = false + }) }, showCustomerSearch(){ this.search[0] = true