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.

950 B
Raw Blame
<%# Progress meter, targetable by id so the quick-add stream can refresh it on each add. Always
    renders the wrapper (even at 0 children) so turbo_stream.replace has a target. Local: ticket. %>
<% progress = ticket.children_progress %>
<span id="subtasks-progress-<%= ticket.id %>" class="flex items-center gap-2">
  <% if progress %>
    <%# Neutral fill (cream-700), NOT lime: lime = action, "done" is a status (Warm-Editorial rule).
        Width is pre-computed in the model (children_progress[:percent]). %>
    <span class="block h-1.5 w-24 overflow-hidden rounded-full bg-cream-200" aria-hidden="true">
      <span class="block h-full rounded-full bg-cream-700" style="width: <%= progress[:percent] %>%"></span>
    </span>
    <span class="font-mono text-xs tabular-nums text-cream-600">
      <%= t('views.organisations.tickets.shared.subtasks.progress', done: progress[:done], total: progress[:total]) %>
    </span>
  <% end %>
</span>