invoicing: admin and public views
Three admin templates: - index: invoice list with status badge and link to detail. - new: client + terms fields, dynamic line-item rows backed by admin-invoice-form.js (add/remove + re-index of items[N][...] names). - show: invoice detail, public URL to share, toggle-paid button. One public template, invoice_public.erb, shown at /i/:uuid: client name, number, total, status, and a single big download button to /i/:uuid/pdf. All admin pages are noindex; same for the public landing (it's a client-specific URL, not search-discoverable content).
This commit is contained in:
parent
77724e1ee2
commit
226ccb8192
5 changed files with 224 additions and 0 deletions
24
views/invoice_public.erb
Normal file
24
views/invoice_public.erb
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<div class="header">
|
||||
<h1>Invoice <%= @invoice.number %></h1>
|
||||
<p class="tagline">from IE Sergei Poljanski</p>
|
||||
</div>
|
||||
|
||||
<section class="section">
|
||||
<dl class="kv">
|
||||
<dt>Billed to</dt><dd><%= @invoice.client_name %></dd>
|
||||
<dt>Issued</dt><dd class="mono"><%= @invoice.issued_on.strftime('%Y-%m-%d') %></dd>
|
||||
<dt>Due</dt><dd class="mono"><%= @invoice.due_on.strftime('%Y-%m-%d') %></dd>
|
||||
<dt>Total</dt><dd class="mono"><%= @invoice.currency %> <%= '%.2f' % @invoice.total %></dd>
|
||||
<dt>Status</dt><dd><span class="badge badge-<%= @invoice.status %>"><%= @invoice.status %></span></dd>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<p style="text-align: center;">
|
||||
<a href="/i/<%= @invoice.uuid %>/pdf" class="download-button">Download PDF</a>
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section class="section legal">
|
||||
<p class="legal-intro">If anything looks wrong, reply to the invoice email or write to <a href="mailto:ie@asxp.io">ie@asxp.io</a>.</p>
|
||||
</section>
|
||||
Loading…
Add table
Add a link
Reference in a new issue