From 63823d41addec00556a93eabffa455630d169ca6 Mon Sep 17 00:00:00 2001
From: Vidhu Kant Sharma <vidhukant@vidhukant.com>
Date: Sat, 6 Apr 2024 10:26:44 +0530
Subject: added basic (and incomplete) print preview template

---
 src/components/PrintPreviewHeader.vue | 99 +++++++++++++++++++++++++++++++++++
 1 file changed, 99 insertions(+)
 create mode 100644 src/components/PrintPreviewHeader.vue

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

diff --git a/src/components/PrintPreviewHeader.vue b/src/components/PrintPreviewHeader.vue
new file mode 100644
index 0000000..33f82f2
--- /dev/null
+++ b/src/components/PrintPreviewHeader.vue
@@ -0,0 +1,99 @@
+<script setup lang="ts">
+  const props = defineProps(["invoice"])
+</script>
+
+<template>
+  <div class="print-preview-header">
+    <div class="logo-container"> 
+      <img src="../assets/placeholderlogo.png"/>
+    </div>
+
+    <div> 
+      <div class="firm-name">
+        <p>{{ props.invoice.IssuerFirmName }}</p>
+      </div>
+      <div class="firm-address">
+        {{ props.invoice.IssuerFirmAddress }}
+      </div>
+    </div>
+
+    <div class="header-col3"> 
+      <div class="firm-contact">
+        <div class="label">
+          <span><strong>Phone:</strong></span>
+          <span>{{ props.invoice.IssuerFirmPhone }}</span>
+        </div>
+        <div class="label">
+          <span><strong>Email:</strong></span>
+          <span>{{ props.invoice.IssuerFirmEmail }}</span>
+        </div>
+        <div class="label">
+          <span><strong>Website:</strong></span>
+          <span>{{ props.invoice.IssuerFirmWebsite }}</span>
+        </div>
+        <div class="label">
+          <span><strong>GSTIN:</strong></span>
+          <span>{{ props.invoice.IssuerFirmGstin }}</span>
+        </div>
+      </div>
+      <div class="qr-container"> 
+        <img src="../assets/placeholderqr.png"/>
+      </div>
+    </div>
+  </div>
+</template>
+
+<style>
+.print-preview-header {
+  display: grid;
+  grid-template-columns: 1.7in 2.4in auto;
+  grid-column-gap: 1em;
+  width: 100%;
+  margin-bottom: 1em;
+}
+.logo-container {
+  display: flex;
+  justify-content: center;
+  align-items: flex-start;
+  max-width: 1.7in;
+}
+.logo-container img {
+  max-width: 100%;
+  max-height: 100%;
+}
+.firm-name {
+  height: 2em;
+}
+.firm-name p {
+  line-height: 0.8em;
+  font-size: 1.6em;
+  font-weight: bold;
+}
+.firm-address {
+  font-size: 0.9em;
+  line-height: 1.2em;
+  white-space: pre-wrap;
+}
+.header-col3 {
+  display: grid;
+  grid-template-columns: auto 0.8in;
+}
+.firm-contact {
+  display: flex;
+  flex-direction: column;
+  font-size: 0.9em;
+}
+.firm-contact .label {
+  display: grid;
+  grid-template-columns: 4.5em auto;
+}
+.qr-container {
+  display: flex;
+  justify-content: flex-end;
+  align-items: flex-start;
+  width: 100%;
+}
+.qr-container img {
+  max-width: 100%;
+}
+</style>
-- 
cgit v1.2.3

