feat: Add project type and status fields to project forms and views, including database migrations
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user