Customer page lists: short paid badge, aligned icons, appointment link

* The invoice list's paid badge is short so each invoice stays on one
  line: "Paid", or "Paid +3d" when it was paid in full 3 days after
  its date, with the day on hover. The invoice page keeps the date.
* The estimate and invoice lists are laid out in columns (checkbox,
  number, date, status, actions), so the edit/view icons line up.
* Ticked estimates (and redmine_qbo_vehicles' vehicles) fill in
  redmine_qbo_calendar's Add appointment link (estimate_id,
  vehicle_id) as well as New issue. Estimate checkboxes are only on
  the customer page, where they're used.
* application.js is gone: it only carried the old Google Calendar
  link code, which threw an error when a box was ticked on a vehicle
  page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-17 19:39:08 -05:00
1 parent 40eb6205c4
commit 92f9eb1bc7
11 files changed
+117 -72

No files matched your search

+14
View File
@@ -65,4 +65,18 @@ class BusinessReportTest < ActiveSupport::TestCase
assert_equal 105.0, r.chart[:current][:tax_invoiced].compact.sum
assert_equal 70.0, r.chart[:current][:tax_collected].compact.sum
end
def test_short_paid_badge
status = RedmineQboBilling::InvoiceStatus
nov18 = Date.new(2026, 11, 18)
assert_equal 'Paid', status.short_label(:paid, paid_on: nov18, invoice_date: nov18)
assert_equal 'Paid +1d', status.short_label(:paid, paid_on: nov18 + 1, invoice_date: nov18)
assert_equal 'Paid +34d', status.short_label(:paid, paid_on: nov18 + 34, invoice_date: nov18)
assert_equal 'Paid', status.short_label(:paid, paid_on: nil, invoice_date: nov18)
# A deposit taken before the invoice: paid in full on its date
assert_equal 'Paid', status.short_label(:paid, paid_on: nov18, invoice_date: nov18 + 2)
assert_equal 'Open', status.short_label(:open, paid_on: nov18 + 3, invoice_date: nov18)
assert_match(/\APaid in full \S+/, status.title(:paid, paid_on: nov18))
assert_nil status.title(:open, paid_on: nov18)
end
end