Skip to content

Commit 943eada

Browse files
committed
feat(invoice): add addresses to overview tab
1 parent fda1c13 commit 943eada

4 files changed

Lines changed: 73 additions & 2 deletions

File tree

packages/modules/invoice/src/lib/models/invoice-detail.mapper.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ type AddressTypes =
1818
export function mapInvoiceDetail(
1919
payload: IoRestorecommerceInvoiceInvoice
2020
): InvoiceDetail {
21-
console.log('***payload.references', payload.references);
22-
2321
return {
2422
id: payload.id ?? '',
2523
invoiceNumber: payload.invoiceNumber ?? 'Untitled invoice',

packages/modules/invoice/src/lib/ui/components/invoice-detail-basic/invoice-detail-basic.component.html

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,76 @@
8181
}
8282
</div>
8383
</div>
84+
85+
<hr />
86+
87+
<div class="row grid-gutter-1 mt-3">
88+
<!-- Sender -->
89+
@if (invoice.sender; as sender) {
90+
<div class="flex-4">
91+
<div class="secondary-text-color scale85p">Sender</div>
92+
93+
<div class="fw-medium">
94+
{{ sender.name || '—' }}
95+
</div>
96+
97+
@if (sender.subtitle) {
98+
<div>
99+
{{ sender.subtitle }}
100+
</div>
101+
}
102+
103+
@for (line of sender.addressLines; track $index) {
104+
<div>
105+
{{ line }}
106+
</div>
107+
}
108+
</div>
109+
}
110+
111+
<!-- Recipient -->
112+
@if (invoice.recipient; as recipient) {
113+
<div class="flex-4">
114+
<div class="secondary-text-color scale85p">Recipient</div>
115+
116+
<div class="fw-medium">
117+
{{ recipient.name || '—' }}
118+
</div>
119+
120+
@if (recipient.subtitle) {
121+
<div>
122+
{{ recipient.subtitle }}
123+
</div>
124+
}
125+
126+
@for (line of recipient.addressLines; track $index) {
127+
<div>
128+
{{ line }}
129+
</div>
130+
}
131+
</div>
132+
}
133+
134+
<!-- Billing -->
135+
@if (invoice.billing; as billing) {
136+
<div class="flex-4">
137+
<div class="secondary-text-color scale85p">Billing Address</div>
138+
139+
<div class="fw-medium">
140+
{{ billing.name || '—' }}
141+
</div>
142+
143+
@if (billing.subtitle) {
144+
<div>
145+
{{ billing.subtitle }}
146+
</div>
147+
}
148+
149+
@for (line of billing.addressLines; track $index) {
150+
<div>
151+
{{ line }}
152+
</div>
153+
}
154+
</div>
155+
}
156+
</div>

packages/modules/invoice/src/lib/ui/components/invoice-detail/invoice-detail-header.component.ts

Whitespace-only changes.

packages/modules/invoice/src/lib/ui/components/invoice-detail/invoice-detail-overview.component.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)