Remove the link to edit contact from the invoice table
We agreed with Oriol that this link would only serve to confuse people. I initially added the link because i thought it was a shame to have to navigate to the contact section to look or change the info of a customer that you have an invoice for in front of you. However, it makes little sense to be able to edit the contact from both sections, and we do not have a “view page” for contacts to link to, thus the removal.
This commit is contained in:
parent
47c23fc4cc
commit
2417b4ebd2
|
@ -26,7 +26,6 @@ type InvoiceEntry struct {
|
||||||
Number string
|
Number string
|
||||||
Total string
|
Total string
|
||||||
CustomerName string
|
CustomerName string
|
||||||
CustomerSlug string
|
|
||||||
Tags []string
|
Tags []string
|
||||||
Status string
|
Status string
|
||||||
StatusLabel string
|
StatusLabel string
|
||||||
|
@ -54,7 +53,6 @@ func mustCollectInvoiceEntries(ctx context.Context, conn *Conn, company *Company
|
||||||
, invoice_date
|
, invoice_date
|
||||||
, invoice_number
|
, invoice_number
|
||||||
, contact.business_name
|
, contact.business_name
|
||||||
, contact.slug
|
|
||||||
, array_agg(coalesce(tag.name::text, ''))
|
, array_agg(coalesce(tag.name::text, ''))
|
||||||
, invoice.invoice_status
|
, invoice.invoice_status
|
||||||
, isi18n.name
|
, isi18n.name
|
||||||
|
@ -71,7 +69,6 @@ func mustCollectInvoiceEntries(ctx context.Context, conn *Conn, company *Company
|
||||||
, invoice_date
|
, invoice_date
|
||||||
, invoice_number
|
, invoice_number
|
||||||
, contact.business_name
|
, contact.business_name
|
||||||
, contact.slug
|
|
||||||
, invoice.invoice_status
|
, invoice.invoice_status
|
||||||
, isi18n.name
|
, isi18n.name
|
||||||
, total
|
, total
|
||||||
|
@ -84,7 +81,7 @@ func mustCollectInvoiceEntries(ctx context.Context, conn *Conn, company *Company
|
||||||
var entries []*InvoiceEntry
|
var entries []*InvoiceEntry
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
entry := &InvoiceEntry{}
|
entry := &InvoiceEntry{}
|
||||||
if err := rows.Scan(&entry.Slug, &entry.Date, &entry.Number, &entry.CustomerName, &entry.CustomerSlug, &entry.Tags, &entry.Status, &entry.StatusLabel, &entry.Total); err != nil {
|
if err := rows.Scan(&entry.Slug, &entry.Date, &entry.Number, &entry.CustomerName, &entry.Tags, &entry.Status, &entry.StatusLabel, &entry.Total); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
entries = append(entries, entry)
|
entries = append(entries, entry)
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
title="{{ $title }}"/></td>
|
title="{{ $title }}"/></td>
|
||||||
<td>{{ .Date|formatDate }}</td>
|
<td>{{ .Date|formatDate }}</td>
|
||||||
<td><a href="{{ companyURI "/invoices/"}}{{ .Slug }}">{{ .Number }}</a></td>
|
<td><a href="{{ companyURI "/invoices/"}}{{ .Slug }}">{{ .Number }}</a></td>
|
||||||
<td><a href="{{ companyURI "/contacts/"}}{{ .CustomerSlug }}">{{ .CustomerName }}</a></td>
|
<td>{{ .CustomerName }}</td>
|
||||||
<td>
|
<td>
|
||||||
<details class="invoice-status menu">
|
<details class="invoice-status menu">
|
||||||
<summary class="invoice-status-{{ .Status }}">{{ .StatusLabel }}</summary>
|
<summary class="invoice-status-{{ .Status }}">{{ .StatusLabel }}</summary>
|
||||||
|
|
Loading…
Reference in New Issue