mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2026-11-18 02:20:37 -05:00
The estimate lists (customer page, and redmine_qbo_vehicles' vehicle page) show the QuickBooks status badge (Pending, Accepted, Closed, Converted, Rejected) after the date. It's the status the estimate sync already caches, kept current by the webhook. The badge styles are shared with the estimate page's header (qbo_estimates/_status_styles). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
20 lines
1.0 KiB
ERB
20 lines
1.0 KiB
ERB
<% unless estimates.empty? %>
|
|
|
|
<%= render partial: 'qbo_estimates/status_styles' %>
|
|
<div class="qbo-estimate-list">
|
|
<% estimates.sort.reverse.each do |estimate| %>
|
|
<div class="row">
|
|
<%= check_box_tag "estimate_ids[]", estimate.id, false, onchange: "updateLink()", data: { text: "Estimate ##{estimate.doc_number}", new_issue_param: 'issue[estimate_id]' }, class: "estimate-checkbox appointment" %>
|
|
<b><%= link_to "##{estimate.doc_number}", estimate_path(estimate), target: :_blank %></b> <%= estimate.txn_date %>
|
|
<%# QuickBooks status, cached by the estimate sync (kept current by the webhook) %>
|
|
<% if estimate.txn_status.present? %>
|
|
<span class="qbo-estimate-status qbo-estimate-status-<%= estimate.txn_status.downcase %>"><%= estimate.txn_status %></span>
|
|
<% end %>
|
|
<%= render partial: 'qbo_estimates/estimate_actions', locals: { estimate: estimate } if RedmineQboBilling.writer? %>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
|
|
<% else %>
|
|
<p><%=t(:label_no_estimates)%>.</p>
|
|
<% end %> |