Reference UI fix (#132)
* feat: display invoice references as tags instead of plain text Replace the single-line text input for "Er referens" with a tag-style input that lets users add/remove individual references as chips. Updates the detail page, review modal, and PDF template to render comma-separated references as wrapped badge/tag elements instead of a single string. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Fixed our reference field --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
d9c95a7b59
commit
6d84828fcc
@@ -348,15 +348,27 @@ export function InvoicePDF({ invoice, customer, items, company, originalInvoiceN
|
||||
<Text style={styles.value}>{formatDate(invoice.due_date)}</Text>
|
||||
</View>
|
||||
{invoice.your_reference && (
|
||||
<View style={styles.row}>
|
||||
<View style={{ marginBottom: 4 }}>
|
||||
<Text style={styles.label}>Er referens:</Text>
|
||||
<Text style={styles.value}>{invoice.your_reference}</Text>
|
||||
<View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 4, marginTop: 2 }}>
|
||||
{invoice.your_reference.split(',').map((ref, i) => (
|
||||
<Text key={i} style={{ backgroundColor: '#f0f0f0', borderRadius: 3, paddingHorizontal: 6, paddingVertical: 2, fontSize: 9, fontWeight: 'bold' }}>
|
||||
{ref.trim()}
|
||||
</Text>
|
||||
))}
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
{invoice.our_reference && (
|
||||
<View style={styles.row}>
|
||||
<View style={{ marginBottom: 4 }}>
|
||||
<Text style={styles.label}>Vår referens:</Text>
|
||||
<Text style={styles.value}>{invoice.our_reference}</Text>
|
||||
<View style={{ flexDirection: 'row', flexWrap: 'wrap', gap: 4, marginTop: 2 }}>
|
||||
{invoice.our_reference.split(',').map((ref, i) => (
|
||||
<Text key={i} style={{ backgroundColor: '#f0f0f0', borderRadius: 3, paddingHorizontal: 6, paddingVertical: 2, fontSize: 9, fontWeight: 'bold' }}>
|
||||
{ref.trim()}
|
||||
</Text>
|
||||
))}
|
||||
</View>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
|
||||
Reference in New Issue
Block a user