From 3ebd619d89aa20b57542888ac1dac47451c4b1a9 Mon Sep 17 00:00:00 2001
From: Vidhu Kant Sharma <vidhukant@vidhukant.com>
Date: Thu, 7 Dec 2023 16:17:28 +0530
Subject: making print preview slightly better

---
 src/components/invoice_items_table.vue | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/components/invoice_items_table.vue')

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>
-- 
cgit v1.2.3

