feat: Add start date and completion date fields to project model and forms
This commit is contained in:
@@ -22,6 +22,7 @@ const ProjectForm = forwardRef(function ProjectForm({ initialData = null }, ref)
|
||||
unit: "",
|
||||
city: "",
|
||||
investment_number: "",
|
||||
start_date: "",
|
||||
finish_date: "",
|
||||
completion_date: "",
|
||||
wp: "",
|
||||
@@ -63,6 +64,7 @@ const ProjectForm = forwardRef(function ProjectForm({ initialData = null }, ref)
|
||||
unit: "",
|
||||
city: "",
|
||||
investment_number: "",
|
||||
start_date: "",
|
||||
finish_date: "",
|
||||
completion_date: "",
|
||||
wp: "",
|
||||
@@ -78,6 +80,9 @@ const ProjectForm = forwardRef(function ProjectForm({ initialData = null }, ref)
|
||||
assigned_to: initialData.assigned_to || "",
|
||||
wartosc_zlecenia: initialData.wartosc_zlecenia || "",
|
||||
// Format dates for input if they exist
|
||||
start_date: initialData.start_date
|
||||
? formatDateForInput(initialData.start_date)
|
||||
: "",
|
||||
finish_date: initialData.finish_date
|
||||
? formatDateForInput(initialData.finish_date)
|
||||
: "",
|
||||
@@ -292,7 +297,19 @@ const ProjectForm = forwardRef(function ProjectForm({ initialData = null }, ref)
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
||||
{t('projects.finishDate')}
|
||||
Data wpływu
|
||||
</label>
|
||||
<Input
|
||||
type="date"
|
||||
name="start_date"
|
||||
value={formatDateForInput(form.start_date)}
|
||||
onChange={handleChange}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
||||
Termin zakończenia
|
||||
</label>
|
||||
<Input
|
||||
type="date"
|
||||
@@ -304,7 +321,7 @@ const ProjectForm = forwardRef(function ProjectForm({ initialData = null }, ref)
|
||||
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-gray-700 mb-2">
|
||||
Data zakończenia projektu
|
||||
Data odbioru
|
||||
</label>
|
||||
<Input
|
||||
type="date"
|
||||
|
||||
Reference in New Issue
Block a user