feat: Add Leaflet map integration and project coordinates handling
- Updated package.json to include dependencies for Leaflet and Playwright testing. - Added new images for Leaflet markers and layers. - Created scripts for generating test data with project coordinates. - Enhanced ProjectViewPage to display project coordinates and integrated ProjectMap component. - Modified ProjectForm to include coordinates input field. - Implemented CustomWMTSMap and EnhancedLeafletMap components for improved map functionality. - Created ProjectMap component to dynamically render project location on the map. - Added mapLayers configuration for various base layers including Polish Geoportal. - Implemented WMTS capabilities handling for dynamic layer loading. - Updated database initialization to include coordinates column in projects table. - Modified project creation and update functions to handle coordinates. - Added utility functions for formatting project status and deadlines.
This commit is contained in:
21
scripts/create-additional-test-data.js
Normal file
21
scripts/create-additional-test-data.js
Normal file
@@ -0,0 +1,21 @@
|
||||
import db from '../src/lib/db.js';
|
||||
|
||||
// Create another test project with coordinates in a different location
|
||||
const project = db.prepare(`
|
||||
INSERT INTO projects (
|
||||
contract_id, project_name, project_number, address, city, coordinates,
|
||||
project_type, project_status
|
||||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
|
||||
`).run(
|
||||
3, // Using the existing contract
|
||||
'Test Project in Warsaw',
|
||||
'2/TEST/2025',
|
||||
'Warsaw Center, Poland',
|
||||
'Warsaw',
|
||||
'52.2297,21.0122', // Warsaw coordinates
|
||||
'construction',
|
||||
'in_progress_construction'
|
||||
);
|
||||
|
||||
console.log('Additional test project created!');
|
||||
console.log('Project ID:', project.lastInsertRowid);
|
||||
Reference in New Issue
Block a user