Commit graph

506 commits

Author SHA1 Message Date
b5b0338e09 feat(assets): add management zones CRUD interfaces and permissions
- Add can_edit_management_zones permission to UserThematics model and admin
- Implement ManagementZoneForm with interactive WGS84 polygon capture and SRID 3812 reprojection
- Add views and routes for listing, creating, editing, detailing, and deleting management zones
- Support document attachments (ManagementZoneDocument) and explicit asset linkages
- Add MapLibre polygon drawing tool in zone form and preview map in detail view
- Integrate management zones shortcuts in nature assets map overlay and index
- Add comprehensive unit tests for permissions, forms, and CRUD operations
2026-10-05 15:35:33 +02:00
d36649f3bf feat(assets): add generic ManagementZone model, admin, geojson API and map overlay 2026-10-05 15:12:16 +02:00
8807531eb3 feat(contracts): add contractual lot perimeters overlay on nature assets map 2026-10-05 14:35:31 +02:00
f81ca93590 feat: add geographic polygon and color fields to Contract model and admin 2026-10-05 14:19:07 +02:00
69f5e65495 feat(assets): add basemap and orthophoto switcher to nature location detail map
- Include LayerSwitcherControl on the nature location detail map.
- Support standard vector, aerial orthophotos, and regional basemaps from window.MAP_BACKGROUNDS.
- Ensure proper z-index layer ordering so nature polygons, trees, and equipments remain above raster basemaps.
- Update unit tests to verify layer switcher integration.
2026-10-05 14:04:02 +02:00
11e1674f73 feat: implement nature location detail view with asset summaries, KPIs, and unit tests 2026-10-05 13:44:18 +02:00
f324eb00bd feat(assets): color-code asset types by technical domain for enhanced visual scanning 2026-10-05 11:48:44 +02:00
10e9f1de50 feat(assets): display assets directly in building tree and add collapse/expand all controls 2026-10-05 11:25:55 +02:00
ab1cfb6ab2 fix(assets): remove duplicate closing div breaking page layout in publicbuilding_detail 2026-10-05 10:59:21 +02:00
6802d1e15f fix(assets): fix js coord syntax error and add interactive multi-floor plans viewer 2026-10-05 10:38:35 +02:00
512f6786e3 refactor: move team daily view helper functions and state variables to file scope 2026-10-05 09:56:25 +02:00
63c4a8e539 git add loko/assets/models/buildings.py \
loko/assets/forms.py \
        loko/assets/admin.py \
        loko/assets/templates/assets/buildings/ \
        loko/assets/tests.py \
        loko/assets/migrations/0028_buildingasset_contractor_name_and_more.py

git commit -m "feat(assets): extend building locations and technical equipment models

- Add comprehensive building locations (stairwells, technical rooms, boiler rooms, offices, etc.)
- Add building physical & technical fields (room numbers, floor types, heated status, dimensions)
- Add complete building envelope & technical equipment types (roofs, facades, windows, doors, boilers, heat pumps, etc.)
- Enrich admin, forms, trees, and detail templates with icons, macro-lots, and maintenance tracking
- Add migration 0028 and unit test coverage"
2026-10-05 09:49:08 +02:00
93f3a49983 fix(calendar): fix canEditThisTeam and isPastDay ReferenceError in renderTeamsDailyGrid 2026-10-05 09:48:53 +02:00
6ee0aa470b feat(calendar): enable drag and drop for team members in daily view
- Render team members as individual draggable chips in daily teams calendar view
- Decouple click (modal inspection) from drag and drop (team/date reassignment)
- Add multi-team conflict confirmation modal on drop
- Maintain permission checks and past date protection
2026-10-05 09:42:10 +02:00
03fa3adaf6 feat: suggest product default locations when parsing purchase orders from PDF 2026-10-05 09:24:22 +02:00
1d212194ad feat: add external destination badges and indigo styling to stock and production order templates 2026-10-05 09:09:43 +02:00
9764b525bb refactor: remove local OCR references and escape translated messages in purchase order scripts 2026-10-01 16:07:32 +02:00
4bb53fb71c feat(mobile): add quote photo/pdf OCR import interface in mobile stock
- Add mobile-optimized purchase order from quote view and template
- Support taking multiple page photos directly from smartphone camera
- Display responsive article cards with catalog product matching
- Provide sticky summary with live totals and confirmation CTA
- Link from mobile purchases list and add unit tests
2026-10-01 15:43:52 +02:00
53d579009a feat(stock): support multi-page photo uploads for quote OCR processing
- Allow uploading multiple quote photos at once via multi-file input
- Process photos sequentially with deskewing and OCR line clustering
- Aggregate articles and metadata across all pages seamlessly
- Attach all uploaded photos to the generated purchase order
- Add unit tests for multi-image quotes and multiple document attachments
2026-10-01 15:28:08 +02:00
4010dfb138 fix(stock): prevent merged quote items via auto-deskew, fixed baseline clustering and item splitting
- Add auto-deskewing for tilted smartphone photos and document scans
- Anchor line clustering to initial baseline to avoid vertical centroid drift
- Normalize OCR numerical artifacts (semicolon decimals, glued VAT percentages)
- Purge catalog URLs from product names to improve catalog matching
- Implement fused item splitter to rescue embedded articles from descriptions
- Add regression tests for item splitting and OCR normalization
2026-10-01 15:12:56 +02:00
32cb154815 feat(stock): support photo/scan quotes via local OCR and propose supplier creation
- Enable image uploads (.png, .jpg, .jpeg, .webp, .tiff) alongside PDFs
- Process photos and scans with local RapidOCR and adaptive bounding box clustering
- Propose new supplier creation with pre-filled fields when quote supplier is not found
- Retain manual catalog product association safeguard
- Add automated unit and integration tests
2026-10-01 14:46:09 +02:00
358fb23d7e refactor(stock): restrict PDF purchase order to existing products and loosen matching similarity
- Replace auto-creation of new products with strict association to existing stock items
- Add dimension normalization and token-based similarity matching (rapidfuzz/difflib)
- Provide ranked candidate suggestions in product dropdown during quote review
- Enforce validation preventing purchase order creation with unassociated products
2026-10-01 14:23:01 +02:00
391966da07 refactor: make PDF parser dependencies optional and lazy-load parser 2026-10-01 13:57:12 +02:00
de6828221b feat: add product validation workflow, supervisor notifications, and PDF purchase order parser 2026-10-01 13:51:27 +02:00
65624c343a style: improve photo carousel modal layout and responsiveness 2026-10-01 10:50:09 +02:00
3920648000 fix(interventions): assign controller only when intervention status changes to finished 2026-10-01 09:53:06 +02:00
8df84704dc fix(interventions): resolve UnboundLocalError contracts_qs for external managers 2026-10-01 09:29:54 +02:00
927c049d02 git add loko/contracts/ loko/interventions/
git commit -m "feat(interventions): configure team maintain types for control auto-assignment and remove structures limitation"
2026-09-30 19:20:59 +02:00
41679d82e9 perf(contracts): optimize ContractAdmin queries on add and change views
- Avoid loading all database ContractPost instances when adding a new contract
- Use select_related('contract') on ContractPost to prevent N+1 queries in __str__
- Only include ContractOperationTemplatePostInline on saved contracts
- Add prefetch_related('teams') for CompanyMember in pause reason assignments
- Optimize ContractAdmin changelist queryset with select_related and prefetch_related
2026-09-30 19:04:39 +02:00
6782959253 feat(home): filter controller shortcuts link by assigned controller and remove sub-counters
- Remove 'to_be_corrected' and 'validated' sub-counters from controller shortcuts widget
- Include assigned_controller parameter in widget URL using the new role-person filter
- Update ControllerShortcutsWidgetTests to assert URL parameter and absence of sub-counters
2026-09-30 18:55:56 +02:00
3d9e7c3202 feat(interventions): add combined filter for manager, controller and inspector with shortnames and teams 2026-09-30 18:49:19 +02:00
b86d805cb5 feat(contracts,home): include finished status in controller shortcuts and display assigned controller in order interventions
- Add 'finished' status to controller shortcuts widget filter and links
- Add conditional 'Contrôleur assigné' column in order interventions table for contracts with auto_assign_control_team
- Optimize order interventions query with select_related for controllers
- Update and compile translations (fr, nl, en)
- Add unit tests for order detail controller display and widget status inclusion
2026-09-30 18:17:30 +02:00
aa75bcbfeb feat(projects): upgrade filter UI to modern modal with badge counter and contextual status styles 2026-09-30 17:59:01 +02:00
244b16b3d3 feat(trafficlights): add cable geometry copy, duplication modal and node editing hints in cross plan import
- Add explanatory guidelines for cable node operations (double-click segment to insert node, double-click node to delete, drag to reposition)
- Add floating reminder pill on map during cable editing mode
- Add "Copier tracé..." dropdown on cable cards to import trace from other cables
- Add "Appliquer aux autres câbles..." modal to duplicate active trace across multiple cables at once
- Add direct map jump button on cable rows in comparative table
- Include db_coords in compared_cables context to preserve pre-existing geometries
- Add tests and update translations (fr, nl, en)
2026-09-30 14:39:32 +02:00
1d99cdd09b feat(assets): ignore auxiliary 'com' wiring and allow archive or delete in cross plan import
- Ignore communication and power supply rows ('com', 'comm', 'alim', etc.) in detector sections
- Add user-selectable 'archive' and 'delete' actions for all assets in cross plan preview
- Handle ProtectedError gracefully when deleting referenced assets
- Add unit tests for wire filtering and archive/delete integration actions
- Update and compile translations (fr, nl, en)
2026-09-30 11:51:55 +02:00
71154a0fb4 feat: standardize preparation order numbering format and add recodification command 2026-09-30 11:07:10 +02:00
dc6638c4a5 feat: add daily intervention visibility restrictions and mobile filters for technicians with tests 2026-09-30 09:47:45 +02:00
79154085ee fix(teams): record automatic leave date on team reassignment and reconcile history 2026-09-30 09:24:09 +02:00
a08ef0f035 feat: add order filtering and default descending sort for preparation and production orders 2026-09-30 08:46:06 +02:00
63a9a080de feat(stock): tri chronologique des bons et réouverture/historique des bons de confection
- Trie les bons de préparation (date) et de confection (created_at) par ordre chronologique FIFO
- Ajoute la réouverture a posteriori des bons de confection terminés avec régularisation automatique des stocks
- Ajoute le modèle ProductionOrderHistory et trace l'historique complet des modifications (statuts, composants, documents)
- Intègre le bouton de réouverture et la section d'historique dans les vues desktop et mobile
2026-09-29 22:38:34 +02:00
c25c4a4415 feat: add image zoom, pan, and reset controls to document viewer 2026-09-29 22:17:20 +02:00
b78c9da50e feat(stock): inclure les statuts 'à traiter' et 'en cours' dans le widget de raccourcis 2026-09-29 22:17:06 +02:00
Karl Determe
e00f9cf784 feat: add stock management module including views, models, templates, and tests 2026-09-29 17:07:29 +02:00
Karl Determe
001bee8ca9 feat: add stock batch views, templates, and comprehensive test suite 2026-09-29 15:20:03 +02:00
Karl Determe
25a64b824a feat: add mobile views, stock management views, and preparation order templates 2026-09-29 13:55:26 +02:00
Karl Determe
f429838a39 feat: add stock management module, common models, and mobile views 2026-09-29 13:30:42 +02:00
Karl Determe
ca4d1b3c1b feat: add views and templates for stock batch creation on desktop and mobile 2026-09-29 12:42:27 +02:00
8b13236a26 fix(interventions,mobile): allow multi-thematic visibility for contractor teams and prevent persistent search query 2026-09-28 21:01:59 +02:00
de73de7328 feat(interventions,stock): sync preparation orders and material status on intervention cancellation
- Fix preparation status calculation by ignoring cancelled orders, preventing false green 'stock ready' icon
- Update item prepared state when preparation order is marked as processed
- Automatically cancel unprepared preparation orders when intervention is canceled
- Send alert notification to stock managers when canceled intervention has already prepared orders
- Add alert banner with direct restock/cancellation action on preparation order detail views
- Prevent editing material switches or creating orders for canceled interventions
- Add and compile translations for FR, EN and NL
- Add comprehensive automated unit tests
2026-09-28 20:01:39 +02:00
c00212f79e fix(interventions): translate modal status and apply assigned color on interventions list and map 2026-09-28 16:26:44 +02:00