Initial commit
This commit is contained in:
@@ -0,0 +1,83 @@
|
||||
<x-app-layout :active="'pumps.index'" title="SoftSPM 2 - Nowa pompa">
|
||||
@php $factors = [0, 0.25, 0.55, 0.7, 1.0, 1.22, 1.35, 1.42]; @endphp
|
||||
|
||||
<div class="max-w-3xl space-y-stack-gap">
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('pumps.index') }}" class="font-body-sm text-body-sm text-on-surface-variant hover:text-primary">← Wróć</a>
|
||||
<h1 class="font-headline-lg text-headline-lg text-on-surface">Nowa pompa</h1>
|
||||
</div>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="status-chip-alert px-3 py-2 rounded-lg font-body-sm text-body-sm">{{ $errors->first() }}</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('pumps.store') }}"
|
||||
class="bg-surface-container-lowest border border-outline-variant/40 rounded-lg shadow-card p-card-inner-padding space-y-6">
|
||||
@csrf
|
||||
|
||||
{{-- Dane podstawowe --}}
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<x-well-field name="name" label="Typ pompy" :value="old('name')" required class="sm:col-span-2" />
|
||||
<x-well-select name="manufacturer_id" label="Producent" :options="$manufacturers" :selected="old('manufacturer_id')" required placeholder="- wybierz -" class="sm:col-span-2" />
|
||||
<x-well-field name="q_n" label="Qₙ [m³/h]" :value="old('q_n')" required />
|
||||
<x-well-field name="length" label="Długość [mm]" :value="old('length')" />
|
||||
<x-well-field name="diameter" label="Średnica [mm]" :value="old('diameter')" />
|
||||
<x-well-field name="weight" label="Masa [kg]" :value="old('weight')" />
|
||||
</div>
|
||||
|
||||
{{-- 8 punktów krzywych - Q liczone z Qₙ, użytkownik podaje H i η --}}
|
||||
<div>
|
||||
<h2 class="font-title-sm text-title-sm text-tertiary mb-1">Parametry energetyczne (8 punktów)</h2>
|
||||
<p class="font-body-sm text-body-sm text-on-surface-variant mb-2">
|
||||
Wartości Q wyliczane automatycznie z Qₙ. Podaj H i η dla każdego punktu.
|
||||
</p>
|
||||
<table class="w-full text-left border border-outline-variant/40 rounded-lg overflow-hidden">
|
||||
<thead class="bg-secondary/10">
|
||||
<tr class="font-data-label text-data-label text-on-surface-variant tracking-wide">
|
||||
<th class="px-3 py-2 w-10">Lp.</th>
|
||||
<th class="px-3 py-2 text-right">Q [m³/h]</th>
|
||||
<th class="px-3 py-2">H [m]</th>
|
||||
<th class="px-3 py-2">η [-]</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-outline-variant/30">
|
||||
@foreach ($factors as $i => $f)
|
||||
<tr>
|
||||
<td class="px-3 py-1.5 font-data-label text-on-surface-variant">{{ $i + 1 }}.</td>
|
||||
<td class="px-3 py-1.5 text-right font-data-label" data-qcell>0,000</td>
|
||||
<td class="px-3 py-1.5">
|
||||
<input type="text" name="h[{{ $i }}]" value="{{ old('h.'.$i) }}" required
|
||||
class="w-28 bg-surface-container-low border border-outline-variant px-2 py-1 rounded font-data-label text-on-surface">
|
||||
</td>
|
||||
<td class="px-3 py-1.5">
|
||||
<input type="text" name="eta[{{ $i }}]" value="{{ old('eta.'.$i) }}" required
|
||||
class="w-28 bg-surface-container-low border border-outline-variant px-2 py-1 rounded font-data-label text-on-surface">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<button type="submit" class="bg-primary text-on-primary px-6 py-2.5 rounded-full font-title-sm text-title-sm hover:bg-primary-container transition-all active:scale-95 shadow-card">Zapisz</button>
|
||||
<a href="{{ route('pumps.index') }}" class="px-5 py-2.5 rounded-full font-title-sm text-title-sm text-on-surface-variant hover:bg-surface-container transition-all">Anuluj</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
const factors = @json($factors);
|
||||
const qn = document.getElementById('q_n');
|
||||
const cells = document.querySelectorAll('[data-qcell]');
|
||||
function recalc() {
|
||||
const v = parseFloat((qn.value || '').replace(',', '.')) || 0;
|
||||
cells.forEach((el, i) => { el.textContent = (factors[i] * v).toFixed(3).replace('.', ','); });
|
||||
}
|
||||
qn.addEventListener('input', recalc);
|
||||
recalc();
|
||||
})();
|
||||
</script>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,88 @@
|
||||
<x-app-layout :active="'pumps.index'" title="SoftSPM 2 - Edycja pompy">
|
||||
<div class="max-w-4xl space-y-stack-gap">
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('pumps.show', $pump) }}" class="font-body-sm text-body-sm text-on-surface-variant hover:text-primary">← Wróć</a>
|
||||
<h1 class="font-headline-lg text-headline-lg text-on-surface">Edycja pompy: {{ $pump->PUP_NAME }}</h1>
|
||||
</div>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="status-chip-alert px-3 py-2 rounded-lg font-body-sm text-body-sm">{{ $errors->first() }}</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{ route('pumps.update', $pump) }}"
|
||||
class="bg-surface-container-lowest border border-outline-variant/40 rounded-lg shadow-card p-card-inner-padding space-y-6">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
{{-- Dane podstawowe --}}
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
|
||||
<x-well-field name="name" label="Typ pompy" :value="$pump->PUP_NAME" required class="sm:col-span-2" />
|
||||
<x-well-select name="manufacturer_id" label="Producent" :options="$manufacturers" :selected="$pump->PUP_MCF_ID" required class="sm:col-span-2" />
|
||||
<x-well-field name="_qn" label="Qₙ [m³/h]" :value="$qn" readonly />
|
||||
<x-well-field name="length" label="Długość [mm]" :value="$pump->PUP_PUMP_LENGTH" />
|
||||
<x-well-field name="diameter" label="Średnica [mm]" :value="$pump->PUP_DIAMETER" />
|
||||
<x-well-field name="weight" label="Masa [kg]" :value="$pump->PUP_WEIGHT" />
|
||||
</div>
|
||||
|
||||
{{-- Krzywe --}}
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
||||
{{-- Q-H --}}
|
||||
<div>
|
||||
<h2 class="font-title-sm text-title-sm text-tertiary mb-2">Wysokość podnoszenia</h2>
|
||||
<table class="w-full text-left border border-outline-variant/40 rounded-lg overflow-hidden">
|
||||
<thead class="bg-secondary/10">
|
||||
<tr class="font-data-label text-data-label text-on-surface-variant tracking-wide">
|
||||
<th class="px-3 py-2 text-right">Q [m³/h]</th>
|
||||
<th class="px-3 py-2">H [m]</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-outline-variant/30">
|
||||
@foreach ($h as $pt)
|
||||
<tr>
|
||||
<td class="px-3 py-1.5 text-right font-data-label text-on-surface-variant">{{ $pt->x }}</td>
|
||||
<td class="px-3 py-1.5">
|
||||
<input type="text" name="h[{{ $pt->id }}]" value="{{ $pt->y }}"
|
||||
class="w-28 bg-surface-container-low border border-outline-variant px-2 py-1 rounded font-data-label text-on-surface">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{-- Q-ETA --}}
|
||||
<div>
|
||||
<h2 class="font-title-sm text-title-sm text-tertiary mb-2">Sprawność</h2>
|
||||
<table class="w-full text-left border border-outline-variant/40 rounded-lg overflow-hidden">
|
||||
<thead class="bg-secondary/10">
|
||||
<tr class="font-data-label text-data-label text-on-surface-variant tracking-wide">
|
||||
<th class="px-3 py-2 text-right">Q [m³/h]</th>
|
||||
<th class="px-3 py-2">η [-]</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-outline-variant/30">
|
||||
@foreach ($eta as $pt)
|
||||
<tr>
|
||||
<td class="px-3 py-1.5 text-right font-data-label text-on-surface-variant">{{ $pt->x }}</td>
|
||||
<td class="px-3 py-1.5">
|
||||
<input type="text" name="eta[{{ $pt->id }}]" value="{{ $pt->y }}"
|
||||
class="w-28 bg-surface-container-low border border-outline-variant px-2 py-1 rounded font-data-label text-on-surface">
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2">
|
||||
<button type="submit"
|
||||
class="bg-primary text-on-primary px-6 py-2.5 rounded-full font-title-sm text-title-sm hover:bg-primary-container transition-all active:scale-95 shadow-card">
|
||||
Zapisz zmiany
|
||||
</button>
|
||||
<a href="{{ route('pumps.show', $pump) }}" class="px-5 py-2.5 rounded-full font-title-sm text-title-sm text-on-surface-variant hover:bg-surface-container transition-all">Anuluj</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,95 @@
|
||||
<x-app-layout :active="'pumps.index'" title="SoftSPM 2 - Katalog pomp">
|
||||
<div class="space-y-stack-gap">
|
||||
|
||||
@if (session('status'))
|
||||
<div class="status-chip-ok px-3 py-2 rounded-lg font-body-sm text-body-sm">{{ session('status') }}</div>
|
||||
@endif
|
||||
|
||||
<div class="flex items-end justify-between">
|
||||
<div>
|
||||
<h1 class="font-headline-lg text-headline-lg text-on-surface">Katalog pomp</h1>
|
||||
<p class="font-body-sm text-body-sm text-on-surface-variant mt-1">
|
||||
Wyników: <span class="font-data-label">{{ $pumps->total() }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<a href="{{ route('pumps.create') }}"
|
||||
class="bg-primary text-on-primary px-5 py-2.5 rounded-full font-title-sm text-title-sm hover:bg-primary-container transition-all active:scale-95 shadow-card">
|
||||
Dodaj pompę
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{{-- Wyszukiwarka --}}
|
||||
<form method="GET" action="{{ route('pumps.index') }}"
|
||||
class="bg-surface-container-lowest border border-outline-variant/40 rounded-lg shadow-card p-card-inner-padding">
|
||||
<div class="flex flex-wrap items-end gap-4">
|
||||
<div class="space-y-1">
|
||||
<label for="by" class="font-data-label text-data-label text-on-surface-variant tracking-wide">Kryterium</label>
|
||||
<select id="by" name="by" class="bg-surface-container-low border border-outline-variant px-3 py-2 rounded font-data-label text-on-surface">
|
||||
<option value="name" {{ $by === 'name' ? 'selected' : '' }}>Typ pompy</option>
|
||||
<option value="flow" {{ $by === 'flow' ? 'selected' : '' }}>Wydajność Q</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<label for="q" class="font-data-label text-data-label text-on-surface-variant tracking-wide">Szukaj</label>
|
||||
<input id="q" name="q" type="text" value="{{ $q }}" placeholder="typ lub wartość Q"
|
||||
class="bg-surface-container-low border border-outline-variant px-3 py-2 rounded font-data-label text-on-surface">
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<label for="mcf" class="font-data-label text-data-label text-on-surface-variant tracking-wide">Producent</label>
|
||||
<select id="mcf" name="mcf" class="bg-surface-container-low border border-outline-variant px-3 py-2 rounded font-data-label text-on-surface">
|
||||
<option value="{{ $mcfAll }}" {{ (int) $mcf === $mcfAll ? 'selected' : '' }}>Wszyscy</option>
|
||||
@foreach ($manufacturers as $id => $name)
|
||||
<option value="{{ $id }}" {{ (int) $mcf === (int) $id ? 'selected' : '' }}>{{ $name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</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>
|
||||
|
||||
{{-- Tabela --}}
|
||||
<div class="bg-surface-container-lowest border border-outline-variant/40 rounded-lg shadow-card overflow-hidden">
|
||||
<table class="w-full text-left">
|
||||
<thead class="bg-secondary/10 border-b 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>
|
||||
<x-sortable-th column="name">Typ pompy</x-sortable-th>
|
||||
<x-sortable-th column="flow" align="right">Q<sub>n</sub> [m³/h]</x-sortable-th>
|
||||
<x-sortable-th column="hp" align="right">H<sub>p</sub> [m]</x-sortable-th>
|
||||
<x-sortable-th column="mcf">Producent</x-sortable-th>
|
||||
<th class="px-4 py-3 text-right">Akcje</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-outline-variant/30 font-body-md text-body-md">
|
||||
@forelse ($pumps as $pump)
|
||||
<tr class="hover:bg-surface-container transition-colors">
|
||||
<td class="px-4 py-3 font-data-label text-on-surface-variant">{{ $pumps->firstItem() + $loop->index }}.</td>
|
||||
<td class="px-4 py-3 font-semibold text-on-surface">
|
||||
<a href="{{ route('pumps.show', $pump) }}" class="hover:text-primary">{{ $pump->PUP_NAME }}</a>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right font-data-label">{{ number_format(round((float) $pump->PUP_Q_N, 3), 3, ',', ' ') }}</td>
|
||||
<td class="px-4 py-3 text-right font-data-label">{{ $pump->PUP_H_P }}</td>
|
||||
<td class="px-4 py-3">{{ $pump->manufacturer?->MCF_NAME }}</td>
|
||||
<td class="px-4 py-3 text-right whitespace-nowrap">
|
||||
<a href="{{ route('pumps.show', $pump) }}" class="font-body-sm text-body-sm text-secondary hover:underline">Szczegóły</a>
|
||||
<span class="text-outline-variant mx-1">·</span>
|
||||
<a href="{{ route('pumps.edit', $pump) }}" class="font-body-sm text-body-sm text-secondary hover:underline">Edytuj</a>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="px-4 py-8 text-center font-body-md text-body-md text-on-surface-variant">
|
||||
Brak pomp dla wybranych kryteriów.
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div>{{ $pumps->links() }}</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
@@ -0,0 +1,152 @@
|
||||
<x-app-layout :active="'pumps.index'" title="SoftSPM 2 - {{ $pump->PUP_NAME }}">
|
||||
@php
|
||||
$fmt = fn ($v, $d = 3) => $v === null ? '-' : number_format(round((float) $v, $d), $d, ',', ' ');
|
||||
@endphp
|
||||
|
||||
<div class="space-y-stack-gap">
|
||||
|
||||
@if (session('status'))
|
||||
<div class="status-chip-ok px-3 py-2 rounded-lg font-body-sm text-body-sm">{{ session('status') }}</div>
|
||||
@endif
|
||||
|
||||
{{-- Nagłówek + akcje --}}
|
||||
<div class="flex flex-wrap items-center justify-between gap-3">
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('pumps.index') }}" class="font-body-sm text-body-sm text-on-surface-variant hover:text-primary">← Katalog pomp</a>
|
||||
<h1 class="font-headline-lg text-headline-lg text-on-surface">{{ $pump->PUP_NAME }}</h1>
|
||||
</div>
|
||||
<div class="flex items-center gap-2">
|
||||
<a href="{{ route('pumps.edit', $pump) }}"
|
||||
class="bg-secondary text-on-secondary px-4 py-2 rounded-full font-title-sm text-title-sm hover:opacity-90 transition-all active:scale-95">Edytuj</a>
|
||||
<x-confirm-delete :action="route('pumps.destroy', $pump)"
|
||||
message="Czy na pewno usunąć pompę „{{ $pump->PUP_NAME }}”? Tej operacji nie można cofnąć." />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-stack-gap">
|
||||
|
||||
{{-- LEWA: dane techniczne --}}
|
||||
<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-3">Dane techniczne pompy</h2>
|
||||
<dl class="grid grid-cols-2 gap-x-4 gap-y-2 font-body-md text-body-md">
|
||||
<dt class="text-on-surface-variant">Typ pompy</dt><dd class="font-semibold">{{ $pump->PUP_NAME }}</dd>
|
||||
<dt class="text-on-surface-variant">Producent</dt><dd>{{ $pump->manufacturer?->MCF_NAME ?? '-' }}</dd>
|
||||
<dt class="col-span-2 border-t border-outline-variant/30 mt-1 pt-1"></dt>
|
||||
<dt class="text-on-surface-variant">Q<sub>n</sub> [m³/h]</dt><dd class="font-data-label">{{ $fmt($pump->PUP_Q_N) }}</dd>
|
||||
<dt class="text-on-surface-variant">Q<sub>min</sub> [m³/h]</dt><dd class="font-data-label">{{ $fmt($pump->PUP_Q_MIN) }}</dd>
|
||||
<dt class="text-on-surface-variant">Q<sub>max</sub> [m³/h]</dt><dd class="font-data-label">{{ $fmt($pump->PUP_Q_MAX) }}</dd>
|
||||
<dt class="text-on-surface-variant">H<sub>p</sub> [m]</dt><dd class="font-data-label">{{ $fmt($pump->PUP_H_P, 2) }}</dd>
|
||||
<dt class="text-on-surface-variant">H<sub>min</sub> [m]</dt><dd class="font-data-label">{{ $fmt($pump->PUP_H_MIN, 2) }}</dd>
|
||||
<dt class="text-on-surface-variant">H<sub>max</sub> [m]</dt><dd class="font-data-label">{{ $fmt($pump->PUP_H_MAX, 2) }}</dd>
|
||||
<dt class="text-on-surface-variant">η<sub>max</sub> [-]</dt><dd class="font-data-label">{{ $fmt($pump->PUP_ETA_MAX, 2) }}</dd>
|
||||
<dt class="col-span-2 border-t border-outline-variant/30 mt-1 pt-1"></dt>
|
||||
<dt class="text-on-surface-variant">Długość [mm]</dt><dd class="font-data-label">{{ $fmt($pump->PUP_PUMP_LENGTH, 2) }}</dd>
|
||||
<dt class="text-on-surface-variant">Średnica [mm]</dt><dd class="font-data-label">{{ $fmt($pump->PUP_DIAMETER, 2) }}</dd>
|
||||
<dt class="text-on-surface-variant">Masa [kg]</dt><dd class="font-data-label">{{ $fmt($pump->PUP_WEIGHT, 2) }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
{{-- PRAWA: wykresy --}}
|
||||
<div class="space-y-stack-gap">
|
||||
<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 <span class="font-body-sm text-on-surface-variant">H = f(Q)</span></h2>
|
||||
@if ($hDrawable)
|
||||
<x-pump-curve :plot="$hPlot" id="hchart" :interactive="true" :initial-q="$q"
|
||||
:eta-coeffs="data_get($etaPlot, 'coeffs', [])"
|
||||
q-input="#q" h-output="#rv-h" eta-output="#rv-eta"
|
||||
x-label="Q [m³/h]" y-label="H [m]" />
|
||||
@else
|
||||
<p class="font-body-sm text-body-sm text-on-surface-variant py-6 text-center">Brak parametrów energetycznych dla pompy.</p>
|
||||
@endif
|
||||
</div>
|
||||
<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">Sprawność <span class="font-body-sm text-on-surface-variant">η = f(Q)</span></h2>
|
||||
@if ($etaDrawable)
|
||||
<x-pump-curve :plot="$etaPlot" x-label="Q [m³/h]" y-label="η [-]" />
|
||||
@else
|
||||
<p class="font-body-sm text-body-sm text-on-surface-variant py-6 text-center">Brak parametrów energetycznych dla pompy.</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 lg:grid-cols-2 gap-stack-gap">
|
||||
{{-- Parametry energetyczne (punkty krzywych) --}}
|
||||
<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 mb-2">Parametry energetyczne</h2>
|
||||
</div>
|
||||
<table class="w-full text-left">
|
||||
<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-2 w-10">Lp.</th>
|
||||
<th class="px-4 py-2 text-right">Q [m³/h]</th>
|
||||
<th class="px-4 py-2 text-right">H [m]</th>
|
||||
<th class="px-4 py-2 text-right">η [-]</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-outline-variant/30 font-data-label">
|
||||
@foreach ($h as $i => $pt)
|
||||
<tr>
|
||||
<td class="px-4 py-1.5 text-on-surface-variant">{{ $i + 1 }}.</td>
|
||||
<td class="px-4 py-1.5 text-right">{{ $pt->x }}</td>
|
||||
<td class="px-4 py-1.5 text-right">{{ $pt->y }}</td>
|
||||
<td class="px-4 py-1.5 text-right">{{ $eta[$i]->y ?? '-' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{{-- Przelicz dla zadanego Q + lista silników --}}
|
||||
<div class="space-y-stack-gap">
|
||||
<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-3">Parametry energetyczne na zadane Q</h2>
|
||||
<form method="GET" action="{{ route('pumps.show', $pump) }}" 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">Dla Q [m³/h]</label>
|
||||
<input id="q" name="q" type="text" value="{{ number_format($q, 3, ',', '') }}"
|
||||
class="w-32 bg-surface-container-low border border-outline-variant px-3 py-2 rounded font-data-label text-on-surface">
|
||||
</div>
|
||||
<button type="submit" class="bg-secondary text-on-secondary px-4 py-2 rounded-full font-title-sm text-title-sm hover:opacity-90 active:scale-95">Przelicz</button>
|
||||
@if ($outOfRange)
|
||||
<span class="font-body-sm text-body-sm text-error">poza zakresem</span>
|
||||
@endif
|
||||
</form>
|
||||
<dl class="grid grid-cols-2 gap-2 mt-3 font-body-md text-body-md">
|
||||
<dt class="text-on-surface-variant">Wartość H [m]</dt><dd id="rv-h" class="font-data-label font-semibold">{{ $hAtQ === null ? '-' : number_format(round($hAtQ, 2), 2, ',', ' ') }}</dd>
|
||||
<dt class="text-on-surface-variant">Wartość η [-]</dt><dd id="rv-eta" class="font-data-label font-semibold">{{ $etaAtQ === null ? '-' : number_format(round($etaAtQ, 2), 2, ',', ' ') }}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<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 mb-2">Lista silników dla pompy</h2>
|
||||
</div>
|
||||
<table class="w-full text-left">
|
||||
<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-2">Typ silnika</th>
|
||||
<th class="px-4 py-2 text-right">Napięcie [V]</th>
|
||||
<th class="px-4 py-2 text-right">Moc [kW]</th>
|
||||
<th class="px-4 py-2">Producent</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-outline-variant/30 font-body-md text-body-md">
|
||||
@forelse ($relatedEngines as $e)
|
||||
<tr>
|
||||
<td class="px-4 py-1.5">{{ $e->ENG_NAME }}</td>
|
||||
<td class="px-4 py-1.5 text-right font-data-label">{{ $e->ENG_VOLTAGE }}</td>
|
||||
<td class="px-4 py-1.5 text-right font-data-label">{{ $e->ENG_POWER }}</td>
|
||||
<td class="px-4 py-1.5">{{ $e->MCF_NAME }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr><td colspan="4" class="px-4 py-4 text-center font-body-sm text-on-surface-variant">Brak powiązanych silników.</td></tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</x-app-layout>
|
||||
Reference in New Issue
Block a user