Skip to content

Commit 0d606c1

Browse files
authored
feat: make late fee optional + don't include logo placeholder and empty client in the PDF (#31)
* fix: don't include the placeholder logo in PDF * feat: make late fee optional * fix: don't include the empty Client text in PDF
1 parent 03eb7ad commit 0d606c1

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

src/components/clients/ClientSelector.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
ref="button"
66
:tabindex="tabindex"
77
@click="toggleOpen">
8-
<span v-if="!value">{{ $t('client') }}</span>
8+
<span v-if="!value" class="d-print-none">{{ $t('client') }}</span>
99
<span v-else>{{ value }}</span>
1010
</div>
1111
<div class="search-popover__overlay" v-if="isOpen" @click="toggleOpen"></div>

src/components/invoices/InvoiceHeader.vue

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@
3737
:inline="true"
3838
field="due_at"/>
3939
</BModal>
40-
<br>{{ $t('late_fee') }}
41-
<AppEditable :value="invoice.late_fee | currency"
42-
:errors="errors"
43-
suffix="%"
44-
field="late_fee"
45-
:placeholder="$t('add_late_fee')"
46-
@change="updateProp({ late_fee: $event })"/>
40+
<span :class="{'d-print-none': !invoice.late_fee}">
41+
<br>{{ $t('late_fee') }}
42+
<AppEditable :value="invoice.late_fee | currency"
43+
:errors="errors"
44+
suffix="%"
45+
field="late_fee"
46+
:placeholder="$t('add_late_fee')"
47+
@change="updateProp({ late_fee: $event })"/>
48+
</span>
4749
</div>
4850
</template>
4951
<script>

src/components/team/TeamLogo.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class="pointer"
55
@click="openModal"
66
:src="team.logo_url" style="width:100%; max-width:200px;">
7-
<button class="btn btn-sm" @click="openModal" v-else>
7+
<button class="btn btn-sm d-print-none" @click="openModal" v-else>
88
<i class="material-icons material-icons-round md-36">file_upload</i>
99
</button>
1010
<AppError :errors="errors" field="logo_url"/>

src/services/invoice.service.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class InvoiceService {
1919
async updateInvoice(invoice) {
2020
const requiredFields = {
2121
currency: 'Currency',
22-
late_fee: 'Late Fee',
2322
issued_at: 'Issued At',
2423
due_at: 'Due At',
2524
number: 'Number',
@@ -40,7 +39,6 @@ class InvoiceService {
4039
async bookInvoice(invoice) {
4140
const requiredFields = {
4241
currency: 'Currency',
43-
late_fee: 'Late fee',
4442
issued_at: 'Issued at',
4543
due_at: 'Due at',
4644
number: 'Number',

0 commit comments

Comments
 (0)