feat: Add start date and completion date fields to project model and forms

This commit is contained in:
2026-01-22 20:22:27 +01:00
parent 3d2065d8fb
commit d49bea8f15
6 changed files with 69 additions and 10 deletions

View File

@@ -15,7 +15,9 @@ const sampleProjects = [
unit: 'Unit A',
city: 'Warszawa',
investment_number: 'INV-2025-001',
start_date: '2025-01-15',
finish_date: '2025-06-30',
completion_date: null,
wp: 'WP-001',
contact: 'Jan Kowalski, tel. 123-456-789',
notes: 'Modern residential building with 50 apartments',
@@ -32,7 +34,9 @@ const sampleProjects = [
unit: 'Unit B',
city: 'Warszawa',
investment_number: 'INV-2025-002',
start_date: '2025-02-01',
finish_date: '2025-09-15',
completion_date: null,
wp: 'WP-002',
contact: 'Anna Nowak, tel. 987-654-321',
notes: 'Commercial office space, 10 floors',
@@ -49,7 +53,9 @@ const sampleProjects = [
unit: 'Unit C',
city: 'Kraków',
investment_number: 'INV-2025-003',
start_date: '2025-01-10',
finish_date: '2025-12-20',
completion_date: null,
wp: 'WP-003',
contact: 'Piotr Wiśniewski, tel. 555-123-456',
notes: 'Large shopping center with parking',
@@ -66,7 +72,9 @@ const sampleProjects = [
unit: 'Unit D',
city: 'Łódź',
investment_number: 'INV-2025-004',
start_date: '2024-11-01',
finish_date: '2025-08-10',
completion_date: '2025-08-05',
wp: 'WP-004',
contact: 'Maria Lewandowska, tel. 444-789-012',
notes: 'Logistics warehouse facility',
@@ -83,7 +91,9 @@ const sampleProjects = [
unit: 'Unit E',
city: 'Gdańsk',
investment_number: 'INV-2025-005',
start_date: '2025-01-20',
finish_date: '2025-11-05',
completion_date: null,
wp: 'WP-005',
contact: 'Tomasz Malinowski, tel. 333-456-789',
notes: 'Luxury hotel with conference facilities',
@@ -100,7 +110,9 @@ const sampleProjects = [
unit: 'Unit F',
city: 'Poznań',
investment_number: 'INV-2025-006',
start_date: '2025-02-10',
finish_date: '2025-07-20',
completion_date: null,
wp: 'WP-006',
contact: 'Ewa Dombrowska, tel. 222-333-444',
notes: 'Modern educational facility with sports complex',
@@ -117,7 +129,9 @@ const sampleProjects = [
unit: 'Unit G',
city: 'Wrocław',
investment_number: 'INV-2025-007',
start_date: '2024-12-15',
finish_date: '2025-10-30',
completion_date: null,
wp: 'WP-007',
contact: 'Dr. Marek Szymankowski, tel. 111-222-333',
notes: 'Specialized medical center with emergency department',
@@ -134,7 +148,9 @@ const sampleProjects = [
unit: 'Unit H',
city: 'Szczecin',
investment_number: 'INV-2025-008',
start_date: '2024-09-01',
finish_date: '2025-05-15',
completion_date: '2025-05-12',
wp: 'WP-008',
contact: 'Katarzyna Wojcik, tel. 999-888-777',
notes: 'Multi-purpose sports stadium with seating for 20,000',
@@ -151,7 +167,9 @@ const sampleProjects = [
unit: 'Unit I',
city: 'Lublin',
investment_number: 'INV-2025-009',
start_date: '2025-01-05',
finish_date: '2025-08-25',
completion_date: null,
wp: 'WP-009',
contact: 'Prof. Andrzej Kowalewski, tel. 777-666-555',
notes: 'Modern library with digital archives and community spaces',
@@ -174,9 +192,9 @@ sampleProjects.forEach((projectData, index) => {
const result = db.prepare(`
INSERT INTO projects (
contract_id, project_name, project_number, address, plot, district, unit, city,
investment_number, finish_date, wp, contact, notes, coordinates,
investment_number, start_date, finish_date, completion_date, wp, contact, notes, coordinates,
project_type, project_status, created_at, updated_at
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)
`).run(
projectData.contract_id,
projectData.project_name,
@@ -187,7 +205,9 @@ sampleProjects.forEach((projectData, index) => {
projectData.unit,
projectData.city,
projectData.investment_number,
projectData.start_date,
projectData.finish_date,
projectData.completion_date,
projectData.wp,
projectData.contact,
projectData.notes,