Initial commit
This commit is contained in:
@@ -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>
|
||||
Reference in New Issue
Block a user