施工計画書 セットアップ画面 再構築
resources/views/projects_plan/setup.blade.php を中心に、セットアップ画面の右パネルを大幅改修・・・手直しではなく作り直しに
1.変更ファイル一覧
1-1.マイグレーション(新規)
database/migrations/2026_06_13_000001_add_margin_to_project_plans_table.php
project_plans テーブルに余白カラムを追加margin_top(上余白 mm、デフォルト25)margin_bottom(下余白 mm、デフォルト25)margin_left(左余白 mm、デフォルト25)margin_right(右余白 mm、デフォルト20)
1-2.ルート追加(routes/web.php)
| メソッド | URL | 名前 | 用途 |
|---|---|---|---|
| PATCH | {plan}/settings| | project_plans.update_settings | 全体一括保存 |
| POST | {plan}/change-work-type | project_plans.change_work_type | 工事種別変更 |
| POST | {plan}/sections | project_plans.sections.store | セクション追加 |
1-3.コントローラー(app/Http/Controllers/ProjectPlanController.php)
- 建築系セクション定義を24項目に更新(総合施工計画〜給排水衛生工事)
- updateSettings() 追加:ヘッダー/フッター・余白・セクション並び順/名前を一括保存
- changeWorkType() 追加:工事種別変更(既存セクション全削除 → 新規種別で再作成、JSONで新セクション一覧を返す)
- addSection() 追加:カスタムセクション追加



