aboutsummaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2024-07-06 03:24:43 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2024-07-06 03:24:43 +0530
commitf192b92ad382d9e8b89ac836bde96f8973ea2844 (patch)
tree5c364a787c166196f946778773138addab3916a6 /src/views
parentc3206679f476e7fd001756190024e03f05340ea2 (diff)
bug fix: when last item is deleted, list doesn't refresh in EditInvoice
Diffstat (limited to 'src/views')
-rw-r--r--src/views/EditInvoice.vue2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/views/EditInvoice.vue b/src/views/EditInvoice.vue
index 1ea9664..fe749ea 100644
--- a/src/views/EditInvoice.vue
+++ b/src/views/EditInvoice.vue
@@ -51,6 +51,8 @@ const refreshItems = async () => {
const res = await axios.get(`/invoice/${invoiceId}/item`)
if (res.status === 200) {
items.value = calculateArr(res.data.data)
+ } else if (res.status == 204) {
+ items.value = []
}
} catch (err) {
toast.error('An unhandled exception occoured. Please check logs')