@extends('selfcheck.layouts.app') @section('title', 'Trainset') @section('page-title', 'Master Data — Trainset') @section('content') @php $emptyForm = ['project_id' => '', 'name' => '', 'description' => '']; @endphp
@forelse ($trainsets as $i => $trainset) @empty @endforelse
No Trainset Proyek Jumlah Car Aksi
{{ $trainsets->firstItem() + $i }}

{{ $trainset->name }}

@if ($trainset->description)

{{ $trainset->description }}

@endif
{{ $trainset->project->name ?? '—' }} {{ $trainset->cars_count }}
@csrf @method('DELETE')
Belum ada trainset.
@if ($trainsets->hasPages())
{{ $trainsets->links() }}
@endif
@include('selfcheck.master.partials.modal', [ 'title' => 'Trainset', 'storeRoute' => 'selfcheck.master.trainsets.store', 'updateUrlBase' => url('selfcheck/master/trainsets'), 'fields' => [ ['name' => 'project_id', 'label' => 'Proyek', 'type' => 'select', 'required' => true, 'options' => $projects->map(fn ($p) => ['value' => $p->id, 'label' => $p->name])->all()], ['name' => 'name', 'label' => 'Nama Trainset', 'type' => 'text', 'required' => true, 'placeholder' => 'Contoh: TS-01'], ['name' => 'description', 'label' => 'Deskripsi', 'type' => 'textarea'], ], ])
@endsection