Add Reports module with the hours by person report
Management's reports (spec 13) get their own module that reads the other modules through ports. The first report sums hours by person in a period, narrowed by service unit or customer, with breakdowns, a chart and CSV. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
{{--
|
||||
A bar chart of one series for a report, drawn by TallStackUI's server
|
||||
side SVG chart. The chart is one image named by its title and summary;
|
||||
the same figures are in the report's table, which the caption points to.
|
||||
No legend or tooltip: their controls would sit inside the image.
|
||||
--}}
|
||||
@props(['title', 'summary', 'labels' => [], 'values' => [], 'formatter' => null])
|
||||
|
||||
<figure {{ $attributes->class('space-y-2') }}>
|
||||
<figcaption class="text-base font-semibold">
|
||||
{{ $title }}
|
||||
<span class="block text-sm font-normal text-zinc-600 dark:text-zinc-300">{{ __('reports.chart_note') }}</span>
|
||||
</figcaption>
|
||||
|
||||
@if ($values === [] || max(array_map('abs', $values)) == 0)
|
||||
<p class="text-sm">{{ __('reports.chart_empty') }}</p>
|
||||
@else
|
||||
<div role="img" aria-label="{{ $title }}: {{ $summary }}" class="max-w-4xl">
|
||||
<x-chart
|
||||
bar
|
||||
grid
|
||||
fit="rotate"
|
||||
:labels="$labels"
|
||||
:series="$values"
|
||||
:formatter="$formatter"
|
||||
height="220"
|
||||
/>
|
||||
</div>
|
||||
@endif
|
||||
</figure>
|
||||
Reference in New Issue
Block a user