{{-- Breadcrumb / Back --}}
Back to Unit Details

Edit Room: {{ $room->room_no }}

{{-- Action 改为 update,且必须有 @method('PUT') --}} @csrf @method('PUT')
{{-- Room Details --}}

Room Details

{{-- Unit 字段 (只读展示) --}}
@if(isset($unit)) {{-- 显示已选定的 Unit 信息 --}}
Unit {{ $unit->unit_no }} ({{ $unit->property->name ?? 'N/A' }})
{{-- 重要:必须通过 hidden input 把 unit_id 传给 store 方法 --}} {{-- 如果你的房间需要地址,可以从 Unit 自动带入 --}} @else {{-- 容错处理:如果没有带 unit_id 过来 --}}
Error: No unit selected. Go back
@endif
{{-- Room Number --}}
{{-- Room Type --}}
{{-- Status --}}
{{-- Address --}}
{{-- 1. 视觉展示框:让用户看到 Property 的地址 --}}
{{ $unit->property->address . ', ' . $unit->property->city . ', ' . $unit->property->postcode . ' ' . $unit->property->state ?? 'No address set for this property' }}
{{-- 2. 隐藏域:确保表单提交时,这个地址会被存入 Room 的数据里 --}}
* This room will be registered under the primary property address.

{{-- Asset Selection (Library) - 完全保持原样 --}}

Update Assets

@forelse($assetLibrary as $lib) @php $existingQty = $currentAssets[$lib->id] ?? 0; @endphp
{{ $lib->name }}
index.qty", $existingQty) }}" readonly class="qty-input w-10 text-center text-[12px] bg-transparent border-none focus:ring-0 p-0">
@empty
No assets available
@endforelse
{{-- Actions --}}
Cancel Update Room
{{-- 脚本保持不变 --}}