feat: Add project type and status fields to project forms and views, including database migrations

This commit is contained in:
Chop
2025-06-04 22:53:33 +02:00
parent e136c9f0e8
commit 49d49b42f1
6 changed files with 138 additions and 6 deletions

View File

@@ -17,6 +17,8 @@ export default function ProjectForm({ initialData = null }) {
wp: "",
contact: "",
notes: "",
project_type: initialData?.project_type || "design",
// project_status is not included in the form for creation or editing
...initialData,
});
@@ -74,6 +76,24 @@ export default function ProjectForm({ initialData = null }) {
</select>
</div>
{/* Project Type Dropdown */}
<div>
<label className="block font-medium">Typ projektu</label>
<select
name="project_type"
value={form.project_type}
onChange={handleChange}
className="border p-2 w-full"
required
>
<option value="design">Projektowanie</option>
<option value="construction">Realizacja</option>
<option value="design+construction">
Projektowanie + Realizacja
</option>
</select>
</div>
{/* Other fields */}
{[
["project_name", "Nazwa projektu"],