diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-12-07 16:17:28 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.com> | 2023-12-07 16:17:28 +0530 |
commit | 3ebd619d89aa20b57542888ac1dac47451c4b1a9 (patch) | |
tree | 56e7376bc70bb11365e8842d5b8717aaed7ea29d /src/components | |
parent | 06a157b8cd0bcd0bba0f6a7f81693c3cfa27d74d (diff) |
making print preview slightly better0.3.2
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/invoice_items_table.vue | 8 | ||||
-rw-r--r-- | src/components/invoice_summary.vue | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/components/invoice_items_table.vue b/src/components/invoice_items_table.vue index 865ade2..285f990 100644 --- a/src/components/invoice_items_table.vue +++ b/src/components/invoice_items_table.vue @@ -2,7 +2,7 @@ import axios from 'axios' import { useToast } from 'vue-toast-notification' -const props = defineProps(["items", "isLoading"]) +const props = defineProps(["items", "isLoading", "preview"]) const emit = defineEmits(["refresh"]) const toast = useToast({ @@ -27,7 +27,7 @@ const handleDelete = async (id) => { </div> </div> - <table v-else class="table table-striped table-hover"> + <table v-else :class="`invoice-items-table table table-striped table-hover ${props.preview ? 'table-light' : ''}`"> <thead> <tr> <th scope="col">#</th> @@ -40,7 +40,7 @@ const handleDelete = async (id) => { <th scope="col">Quantity <span class="sup text-muted">Unit</span></th> <th scope="col">Amount</th> - <th scope="col" class="table-action-column"> + <th v-if="!props.preview" scope="col" class="table-action-column"> <div class="wrapper"> <button class="btn btn-dark" v-on:click="emit('refresh')"> <i class="bi bi-arrow-clockwise"></i> @@ -64,7 +64,7 @@ const handleDelete = async (id) => { <td>{{ item.Quantity }} <span class="sup text-muted">{{ item.UnitOfMeasure }}</span></td> <td>{{ item.TotalAmount }} <span class="sup text-muted">{{ item.AmountWithoutGST }} + {{ item.TotalGSTValue }}</span> </td> - <td class="table-action-column"> + <td v-if="!props.preview" class="table-action-column"> <div class="wrapper"> <button class="btn" data-bs-toggle="dropdown" aria-expanded="false"> <i class="bi bi-caret-down-fill"></i> diff --git a/src/components/invoice_summary.vue b/src/components/invoice_summary.vue index 6ca7907..31fb7a5 100644 --- a/src/components/invoice_summary.vue +++ b/src/components/invoice_summary.vue @@ -5,5 +5,7 @@ const props = defineProps(["items", "isLoading"]) </script> <template> - Total: {{ props.items.reduce((t, c) => t.add(c.TotalAmount), currency(0)) }} + <div class="invoice-summary"> + Total: {{ props.items.reduce((t, c) => t.add(c.TotalAmount), currency(0)) }} + </div> </template> |