@extends('layouts.app') @section('title', $project->name . ' — 設定') @push('head') @endpush @section('content') @include('projects._nav')

設定 — {{ $project->name }}

@if($errors->any())
@endif
@csrf @method('PUT') {{-- 基本資訊 --}}
基本資訊
去除年份的通用名稱,用於跨年分群
@error('name')
{{ $message }}
@enderror
@error('client_id')
{{ $message }}
@enderror
* 分類
@foreach(['專案','產品'] as $cat) @endforeach
結束狀態
勾選後視為已結束;若未勾選但結束日已過,系統自動視為結束
{{-- 合約 --}} @php if (old('contracts') !== null) { $contractRows = old('contracts'); } else { $contractRows = $project->contracts->sortByDesc(fn($c) => $c->start_date?->format('Y-m-d') ?? '')->map(fn($c) => [ 'id' => $c->id, 'name' => $c->name, 'start_date' => $c->start_date?->format('Y-m-d') ?? '', 'end_date' => $c->end_date?->format('Y-m-d') ?? '', 'project_type' => $c->project_type ?? '', 'dev_tool' => $c->dev_tool ?? '', 'gitlab_project_id' => $c->gitlab_project_id ?? '', 'contract_amount' => $c->contract_amount ?? '', 'estimated_man_days' => $c->estimated_man_days ?? '', 'invoice_date' => $c->invoice_date?->format('Y-m-d') ?? '', 'notes' => $c->notes ?? '', 'send_maintenance_report' => $c->send_maintenance_report ? '1' : '0', 'maintenance_report_cycle' => $c->maintenance_report_cycle ?? '', 'maintenance_report_recipient' => $c->maintenance_report_recipient ?? '', ])->values()->all(); } @endphp
合約
@foreach($contractRows as $ci => $c)
報告於每周期月底前 1 天自動寄出
@endforeach
依開始日期最新合約的資訊將自動同步為專案屬性(類型、工具、GitLab、日期)
取消
@push('scripts') @php $_jsTypes = json_encode(['開發','保固','維護','其他'], JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_AMP|JSON_HEX_QUOT); $_jsTools = json_encode(\App\Models\ProjectDevTool::labels(), JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_AMP|JSON_HEX_QUOT); $_jsGitlab = json_encode($gitlabProjects->map(fn($g) => ['id' => $g->project_id, 'text' => $g->name_with_namespace])->values()->all(), JSON_HEX_TAG|JSON_HEX_APOS|JSON_HEX_AMP|JSON_HEX_QUOT); @endphp @endpush @endsection