aboutsummaryrefslogtreecommitdiff
path: root/src/components/PrintPreviewHeader.vue
blob: 9e89c846cfe8e5732c168f8b1d1b15741161e708 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<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 class="firm-details">
        {{ props.invoice.IssuerFirmDetails }}
      </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%;
}
.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, .firm-details {
  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>