Initial commit

This commit is contained in:
2026-09-03 12:21:17 +02:00
commit 6d40da0410
155 changed files with 21554 additions and 0 deletions
@@ -0,0 +1,90 @@
<x-app-layout :active="'aggregate-selection.index'" title="SoftSPM 2 - Wybór agregatu pompowego">
@php $fmt = fn ($v, $d = 2) => $v === null || $v === '' ? '-' : number_format(round((float) $v, $d), $d, ',', ' '); @endphp
<div class="space-y-stack-gap">
<div>
<h1 class="font-headline-lg text-headline-lg text-on-surface">Wybór agregatu pompowego</h1>
<p class="font-body-sm text-body-sm text-on-surface-variant mt-1">Wysokość podnoszenia dla posiadanych typów pomp</p>
</div>
{{-- Parametry doboru --}}
<form method="GET" action="{{ route('aggregate-selection.index') }}"
class="bg-surface-container-lowest border border-outline-variant/40 rounded-lg shadow-card p-card-inner-padding">
<p class="font-data-label text-data-label text-on-surface-variant tracking-wide mb-3">Wprowadź parametry poszukiwanej pompy</p>
<div class="flex flex-wrap items-end gap-4">
<div class="space-y-1">
<label for="q" class="font-data-label text-data-label text-on-surface-variant tracking-wide">Zadana wydajność Q<sub>sz</sub> [m³/h]</label>
<input id="q" name="q" type="text" inputmode="decimal" required value="{{ $q }}" placeholder="np. 120"
class="bg-surface-container-low border border-outline-variant px-3 py-2 rounded font-data-label text-on-surface focus:ring-1 focus:ring-primary focus:border-primary">
</div>
<div class="space-y-1">
<label for="h" class="font-data-label text-data-label text-on-surface-variant tracking-wide">Zadana wysokość podnoszenia H [m] <span class="normal-case text-on-surface-variant/60">(opcjonalnie)</span></label>
<input id="h" name="h" type="text" inputmode="decimal" value="{{ $h }}" placeholder="np. 80"
class="bg-surface-container-low border border-outline-variant px-3 py-2 rounded font-data-label text-on-surface focus:ring-1 focus:ring-primary focus:border-primary">
</div>
<button type="submit"
class="bg-secondary text-on-secondary px-5 py-2.5 rounded-full font-title-sm text-title-sm hover:opacity-90 transition-all active:scale-95">
Szukaj
</button>
</div>
</form>
@if ($searched)
{{-- Wykres nałożonych krzywych H --}}
@if ($chart)
<div class="bg-surface-container-lowest border border-outline-variant/40 rounded-lg shadow-card p-card-inner-padding">
<h2 class="font-title-sm text-title-sm text-tertiary mb-2">Wysokość podnoszenia dla posiadanych typów pomp</h2>
<x-selection-chart :chart="$chart" :q="$qVal" />
</div>
@endif
{{-- Lista pomp dla zadanego Q (ranking po sprawności) --}}
<div class="bg-surface-container-lowest border border-outline-variant/40 rounded-lg shadow-card overflow-hidden">
<div class="px-card-inner-padding pt-card-inner-padding">
<h2 class="font-title-sm text-title-sm text-tertiary">
Lista pomp dla zadanego Q
<span class="font-body-sm text-body-sm text-on-surface-variant">(malejąco wg sprawności)</span>
</h2>
</div>
<table class="w-full text-left mt-2">
<thead class="bg-secondary/10 border-y border-outline-variant/40">
<tr class="font-data-label text-data-label text-on-surface-variant tracking-wide">
<th class="px-4 py-3 w-12">Lp.</th>
<th class="px-4 py-3">Typ pompy</th>
<th class="px-4 py-3">Typ silnika</th>
<th class="px-4 py-3 text-right">Q<sub>n</sub> [m³/h]</th>
<th class="px-4 py-3 text-right">Q<sub>sz</sub> [m³/h]</th>
<th class="px-4 py-3 text-right">H(Q<sub>sz</sub>) [m]</th>
<th class="px-4 py-3 text-right">&eta;(Q<sub>sz</sub>) [-]</th>
<th class="px-4 py-3 text-right">P<sub>s</sub> [kW]</th>
<th class="px-4 py-3 text-right">Napięcie [V]</th>
</tr>
</thead>
<tbody class="divide-y divide-outline-variant/30 font-body-md text-body-md">
@forelse ($rows as $row)
<tr class="hover:bg-surface-container transition-colors cursor-pointer"
onclick="location.href='{{ route('aggregates.show', ['pump' => $row->pump_id] + ($row->engine_id ? ['engine' => $row->engine_id] : [])) }}'">
<td class="px-4 py-3 font-data-label text-on-surface-variant">{{ $row->lp }}.</td>
<td class="px-4 py-3 font-semibold text-on-surface">{{ $row->pump_name }}</td>
<td class="px-4 py-3">{{ $row->engine_name ?? '-' }}</td>
<td class="px-4 py-3 text-right font-data-label">{{ $fmt($row->q_n, 3) }}</td>
<td class="px-4 py-3 text-right font-data-label">{{ $fmt($qVal, 3) }}</td>
<td class="px-4 py-3 text-right font-data-label">{{ $fmt($row->h_val, 2) }}</td>
<td class="px-4 py-3 text-right font-data-label">{{ $fmt($row->eta_val, 2) }}</td>
<td class="px-4 py-3 text-right font-data-label">{{ $fmt($row->power, 2) }}</td>
<td class="px-4 py-3 text-right font-data-label">{{ $row->voltage ?? '-' }}</td>
</tr>
@empty
<tr>
<td colspan="9" class="px-4 py-8 text-center font-body-md text-body-md text-on-surface-variant">
Brak pomp spełniających wprowadzone parametry.
</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@endif
</div>
</x-app-layout>