Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

1.2 KB
Raw Blame
<%# Billing pipeline in hours: three stages left-to-right (unbilled -> in billing -> billed). The
    loose-unbilled figure is accented (the actionable backlog), the billed end is muted. All-zero
    shows the calm empty line. %>
<div>
  <%= render WidgetHeaderComponent.new(title: t('overview.widgets.billing_overview')) %>
  <% if any_hours? %>
    <div class="grid <%= grid_cols_class %> gap-3">
      <% stages.each do |stage| %>
        <%= link_to stage[:href], class: "block p-4 bg-cream-50 border border-cream-300 rounded-lg transition-colors hover:border-cobalt-400 hover:bg-cobalt-50",
                    aria: { label: t('overview.drilldown.view_aria', label: stage[:label]) } do %>
          <div class="font-mono text-xs uppercase tracking-wider text-cream-600 mb-2"><%= stage[:label] %></div>
          <div class="flex items-baseline gap-1">
            <span class="font-mono text-2xl font-bold tracking-tight tabular-nums <%= stage[:accent] %>"><%= stage[:hours] %></span>
            <span class="font-mono text-xs text-cream-600"><%= t('overview.billing.hours_unit') %></span>
          </div>
        <% end %>
      <% end %>
    </div>
  <% else %>
    <%= render WidgetEmptyComponent.new(message: t('overview.billing.empty')) %>
  <% end %>
</div>