aboutsummaryrefslogtreecommitdiff
path: root/src/components/invoice_header_editor.vue
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2024-02-11 12:43:13 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2024-02-11 12:43:13 +0530
commita26ab9f60314420aad1c7d2a328d299f503532fa (patch)
treec71eac7944bde25a0a4ec383ac3fd5030e7ac61a /src/components/invoice_header_editor.vue
parentbc639c89eb5530e7ffeae864ec7fa170e5faccc2 (diff)
removed annoying notifications on HTTP 204
Diffstat (limited to 'src/components/invoice_header_editor.vue')
-rw-r--r--src/components/invoice_header_editor.vue5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/components/invoice_header_editor.vue b/src/components/invoice_header_editor.vue
index ffc5fb0..83c5281 100644
--- a/src/components/invoice_header_editor.vue
+++ b/src/components/invoice_header_editor.vue
@@ -27,8 +27,6 @@ const getAllCustomers = async () => {
const r = await axios.get('/customer')
if (r.status === 200) {
allCustomers.value = r.data.data
- } else if (r.status === 204) {
- toast.warning('No customers found')
}
} catch (err) {
toast.error('An unhandled exception occoured. Please check logs')
@@ -129,7 +127,8 @@ onMounted(() => {
aria-label="Select Brand"
id="item-brand-input"
>
- <option selected disabled value="null">Select Customer</option>
+ <option v-if="allCustomers.length === 0" selected disabled value="null">No customers added in OpenBills!</option>
+ <option v-else selected disabled value="null">Select Customer</option>
<option v-for="customer in allCustomers" :value="customer" :key="customer['id']">
{{ customer["Name"] }}
</option>