Task 21: Vinkelhus calculation support Changes: - Added 'Vinkelhus' checkbox to enable L-shaped building mode - Added fields for second wing dimensions (wing2Width, wing2Length) - Visual UI section for second wing with green highlighting - Real-time total area calculation showing both wings combined - Backend calculates area for both wings separately and combines: * Flat roof: wing1_area + wing2_area * Pitched roof: calculates each wing surface area independently - Database migration adds is_corner_house, wing2_width, wing2_length columns - Form labels update dynamically (Vinge 1/Vinge 2) when corner house mode active - Proper data persistence and loading for corner house configurations
8 lines
487 B
SQL
8 lines
487 B
SQL
-- Add corner house (vinkelhus) fields to roof_geometry table
|
|
-- Task 21: Vinkelhus calculation support
|
|
|
|
ALTER TABLE roof_geometry
|
|
ADD COLUMN IF NOT EXISTS is_corner_house BOOLEAN DEFAULT FALSE COMMENT 'Whether this is an L-shaped corner house (vinkelhus)',
|
|
ADD COLUMN IF NOT EXISTS wing2_width DECIMAL(10, 2) NULL COMMENT 'Second wing width in meters for corner house',
|
|
ADD COLUMN IF NOT EXISTS wing2_length DECIMAL(10, 2) NULL COMMENT 'Second wing length in meters for corner house';
|