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,39 @@
<x-app-layout :active="'engines.index'" title="SoftSPM 2 - Edycja silnika">
<div class="max-w-2xl space-y-stack-gap">
<div class="flex items-center gap-2">
<a href="{{ route('engines.show', $engine) }}" 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 silnika: {{ $engine->ENG_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('engines.update', $engine) }}"
class="bg-surface-container-lowest border border-outline-variant/40 rounded-lg shadow-card p-card-inner-padding space-y-4">
@csrf
@method('PUT')
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<x-well-field name="name" label="Typ silnika" :value="$engine->ENG_NAME" required class="sm:col-span-2" />
<x-well-select name="manufacturer_id" label="Producent" :options="$manufacturers" :selected="$engine->ENG_MCF_ID" required class="sm:col-span-2" />
<x-well-field name="power" label="Moc [kW]" :value="$engine->ENG_POWER" required />
<x-well-field name="voltage" label="Napięcie [V]" :value="$engine->ENG_VOLTAGE" required />
<x-well-field name="current" label="Prąd [A]" :value="$engine->ENG_ELECTRICITY" />
<x-well-field name="eta" label="Sprawność η [-]" :value="$engine->ENG_ETA" />
<x-well-field name="cos_fi" label="Wsp. mocy cos(φ) [-]" :value="$engine->ENG_COS_FI" />
<x-well-field name="rpm" label="Obroty [1/min]" :value="$engine->ENG_RPM" />
<x-well-field name="length" label="Długość [mm]" :value="$engine->ENG_LENGTH" />
<x-well-field name="weight" label="Masa [kg]" :value="$engine->ENG_WEIGHT" />
<x-well-field name="diameter" label="Średnica [mm]" :value="$engine->ENG_DIAMETER" />
<x-well-field name="wires" label="Wprowadzenie przewodów" :value="$engine->ENG_WIRES" />
</div>
<div class="flex items-center gap-2 pt-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('engines.show', $engine) }}" 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>