{{--
Edit Project — docs/wireframes-v12/edit-project.html (the tab strip at
~lines 95-103 and the card below it at ~104-419: five form sections and the
footer).
## Shape (CR-2b, spec §12)
The one-tab strip in a card of its own, then ONE `.card` holding a
`.form-section` per heading — each with its `.form-section-title` and the
wireframe's own icon — and a `.card-footer` at the bottom. Fields are laid
out by v12's `.form-row.form-row-2/-3` grids, not by Bootstrap columns,
which is why no field carries a `group-class` any more: the row owns the
columns and `.form-group` owns its own margin.
The page title is v12's own header wording, "Edit Project - {name}". That
is where the old `@section('subtitle')` line went — it said the project's
name, and the title says it now.
The four upload slots follow v12's own split, which spec §4 records: the
RERA certificate closes Compliance & Legal (~line 318), and the brochure,
logo and site plan open Marketing & Media (~lines 328-355) ahead of the two
links. They are one pipeline and two sections — the section a zone sits in
is a filing decision, and the slot it posts to is not.
## The twin rule (spec §2)
This file and projects/create.blade.php are twins. Every field is written
out in both, and neither includes a shared form partial — that is the
decision that replaced projects/partials/form.blade.php, deleted when this
screen stopped including it. **A field added, removed or renamed here must
be mirrored in create.blade.php in the same commit.** TwinViewParityTest
renders both screens and fails when their `name` sets or their
required-attribute sets differ. It does not compare labels, order or
validation rules, so those are on whoever edits one of the pair.
## What this screen has that its twin does not
* The one-tab "Project Details" strip above the card. v12 puts it on the
edit screen only.
* Every control is prefilled from $project, and each filled upload slot
shows the stored file: its original client filename (escaped — §5
stores it verbatim), a download link, and the replace copy.
* PUT rather than POST, and UpdateProjectRequest as the rule source —
which inherits StoreProjectRequest whole, exclusions included.
* A third breadcrumb crumb: the project's own show page sits between the
listing and this screen.
* "Save Changes" on the footer button where create says "Save Project",
which is v12's own wording on the two pages. The footer is otherwise
identical: Cancel (`.btn-outline`) then the primary action. v12's add
screen has a third button between them, "Save as Draft", which neither
twin renders (see the deliberate-differences list below).
* The Unit Inventory section carries three things the create twin's does
not, all of them about units that already exist: the count line, the
units themselves — since CR-1 (spec §11) — rendered inside
#unitInventoryRows as read-only DISPLAY rows above whatever an uploaded
file adds, and the replace warning that CR-5 §15.3.6 shows beside them
the moment a file parses. Those rows have no `name` attribute at
all, so they post nothing and TwinViewParityTest still sees identical
name sets across the pair; the warning is a hidden div for the same
reason it is not on create — the create twin has no saved units to
replace. This is the whole of the twin delta in that section: the
toolbar, the info line, the alerts, the summary and the re-rendered
file rows are mirrored in create.blade.php exactly.
## Deliberate differences from the wireframe
* `parking_slots` and `configurations` have no v12 field. The columns stay
(spec §3), the controls are gone.
* City is a free-text input, not the boilerplate's select2 (§4).
Project::CITY_OPTIONS still backs the index filter dropdown.
* Project Code is a readonly input with NO `name`, where v12 leaves it
named: the server owns the sequence, and a nameless control posts
nothing (a readonly one still would) — and on this screen the code is
immutable besides (it is absent from the rule set).
* The Unit Inventory section renders NO row of its own and no way to
make one by hand where v12 draws three static editable rows: rows come
from an uploaded file, every field in the section is read-only, and
there is no add-row button and no per-row delete. Client-directed
deviation, spec §11 (CR-1) — it supersedes the add-row/per-row-remove
deviation that spec §7 declared.
* Its Upload File picker accepts `.csv,.xls,.xlsx` where v12's accepts
`.csv,.xlsx`: CR-5 §15.3.5 put all three through SheetJS, and the
client's older sheets are saved in the format v12 left out.
--}}
@extends('layouts.app')
@section('title', __('projects.edit_title_for', ['name' => $project->name]))
@section('breadcrumbs')