diff options
Diffstat (limited to 'src/components/invoice_header_editor.vue')
-rw-r--r-- | src/components/invoice_header_editor.vue | 5 |
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> |