@extends('layouts.app') @section('title', '交接項目範本管理') @section('content')

交接項目範本管理

返回
@if(session('success'))
{{ session('success') }}
@endif
{{-- Add form --}}
新增交接項目
@csrf @if(auth()->user()->role === 'admin')
@error('department')
{{ $message }}
@enderror
@else
@endif
@error('title')
{{ $message }}
@enderror
勾選後,每個進行中專案會各自填寫此項目
{{-- Template list --}}
@foreach($deptOptions as $dept => $deptLabel) @php $deptItems = $templates->where('department', $dept); @endphp
{{ $deptLabel }}
@if($deptItems->isEmpty())
尚無交接項目
@else
@foreach($deptItems->sortBy('sort_order') as $t) @endforeach
排序項目名稱說明題型套用專案建立人
{{ $t->sort_order }} {{ $t->title }} {{ Str::limit($t->description, 50) ?: '—' }} @if($t->item_type === 'yesno') 是否題 @else 問答題 @endif @if($t->apply_per_project) @else @endif {{ $t->creator?->name ?? '—' }} @if(auth()->user()->role === 'admin' || $t->created_by === auth()->id())
@csrf @method('DELETE')
@endif
@endif
@endforeach
{{-- Edit Modal --}} @push('scripts') @endpush @endsection