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.7 KB
Raw Blame
<%# This-period hours summary. Compact section header carries the period subtitle (KW/Monat/Quartal/
    Datumsspanne); the period tabs switch the figure in place; the card holds the tracked/unbilled
    figures and links into "Zeiten" for the same period + only my sessions. The frame target is
    _top, so the card link navigates the whole page; the tabs override back to the frame. %>
<%= turbo_frame_tag frame_id, target: '_top' do %>
  <div>
    <%= render Overview::PeriodHeaderComponent.new(
          organisation: organisation, widget_key: widget_key, period: period,
          title_key: data[:title_key], subtitle: data[:subtitle], frame_id: frame_id) %>

    <%= link_to drilldown_path,
                title: t('dashboard.briefing.period.drilldown_title'),
                class: "group block p-5 bg-cream-50 border border-cream-300 rounded-lg hover:border-ink transition-colors" do %>
      <div class="flex items-baseline gap-2 mb-3">
        <span class="font-mono text-4xl font-bold tracking-tight text-cream-900 tabular-nums"><%= data[:tracked] %></span>
        <span class="font-mono text-sm text-cream-600"><%= t('dashboard.briefing.week.tracked_label') %></span>
      </div>
      <div class="flex items-baseline gap-2 pt-3 border-t border-cream-200">
        <span class="font-mono text-2xl font-bold tracking-tight text-cobalt-600 tabular-nums"><%= data[:unbilled] %></span>
        <span class="font-mono text-xs uppercase tracking-wider text-cream-600"><%= t('dashboard.briefing.week.unbilled_label') %></span>
        <% if unbilled_percent %>
          <span class="font-mono text-xs text-cream-500 ml-auto tabular-nums"><%= unbilled_percent %>%</span>
        <% end %>
      </div>
    <% end %>
  </div>
<% end %>