Commit graph

492 commits

Author SHA1 Message Date
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
37c1016b57 feat(interventions): distinguer les interventions 'à traiter' déjà assignées en rose (#d81b60)
- Ajout de la couleur 'to_be_processed_assigned' (#d81b60) dans STATUS_COLORS (Python & JS).
- Ajout de la propriété is_assigned sur le modèle Intervention.
- Prise en compte de la couleur dans les vues calendrier (membres, timeline, backlog, équipes) et sur la carte MapLibre du modal calendrier.
- Enrichissement des popups carte et des badges du backlog avec l'équipe/membre assigné.
- Ajout de tests unitaires validant la couleur et la sérialisation is_assigned.
2026-09-28 14:45:17 +02:00
0bbe267498 feat(contracts): auto-sync team schedule daily and on mobile access
- Register sync_teams_schedule in init_scheduled_tasks (daily at 04:00 local)
- Trigger sync_member_current_teams on mobile intervention list load
- Trigger sync_member_current_teams on user login signal
2026-09-28 14:17:44 +02:00
f4460a5323 feat: add edit note functionality and UI action buttons 2026-09-25 23:36:04 +02:00
205a05cb5b feat(interventions): aligner les permissions des notes par statut et historiser le mobile
- Autoriser les modifications/suppressions de notes jusqu'au statut 'traité' pour les externes
- Autoriser les modifications/suppressions de notes jusqu'au statut 'validé' pour les internes
- Supprimer la contrainte horaire de 1h sur la modification des notes
- Brancher l'historisation de la chronologie sur la création et modification de notes mobile
- Tracer l'upload des photos de formulaires mobiles dans la chronologie
- Ajouter les tests unitaires et d'intégration correspondants
2026-09-25 23:20:09 +02:00
7911369740 feat: restrict intervention timeline history and filter controls to internal users 2026-09-25 22:53:32 +02:00
2df4621e5b feat(interventions): afficher les statuts de la chronologie sous forme de cercles numérotés
- Reprend le code visuel du stepper supérieur pour les transitions de statut dans l'historique
- Affiche une boule colorée avec le numéro canonique (1 à 15) et le libellé sous chaque statut
- Aligne la flèche de transition au centre des cercles
- Ajuste les contrastes de texte (noir/blanc) selon la luminosité du statut
2026-09-25 22:35:29 +02:00
fd794737a8 style(interventions): standardize timeline status badge widths and use distinct purple for status event
- Assign fixed 115px width to all status badges for vertical alignment of transitions
- Unify left event badge width to 85px for a clean tabular layout
- Use purple (#6f42c1) for the 'Statut' badge and node icon to avoid visual collision with status colors
- Update timeline unit tests accordingly
2026-09-25 22:24:05 +02:00
f510a086bd feat(interventions): trace notes, documents and element links in full timeline
- Add 'note', 'document', and 'link' event types to InterventionTimeLine
- Record timeline events for note additions/edits/deletions (standalone and batch)
- Record document uploads and deletions (desktop and mobile APIs)
- Record asset linking/unlinking with friendly names and linked interventions
- Display detailed items exclusively in the toggleable "Historique complet" view
- Maintain shortname display for all event authors
- Update and compile FR, EN and NL translation catalogs
- Add comprehensive test coverage for all new timeline event records
2026-09-25 22:05:22 +02:00
79af86fb7f feat(interventions): amélioration de la chronologie et traçabilité complète de l'historique
- Ajout des types d'événements 'assignment' et 'modification' sur InterventionTimeLine
- Enregistrement des attributs modifiés (field_changes JSON) et des descriptions d'événements
- Création du service InterventionChangeTracker pour historiser les changements de champs et d'assignations
- Refonte visuelle de card_chronologie avec vue par défaut (statuts + assignations) et bascule vers l'historique complet
- Préservation des shortnames pour tous les auteurs des modifications
- Ajout des traductions i18n et de tests unitaires dédiés
2026-09-25 21:29:42 +02:00
71cb8369a0 feat(interventions): improve non-applicable button symbology in operations 2026-09-25 16:14:13 +02:00
ce924d7af4 fix(interventions): import Contract and ContractPost in admin to fix OperationTemplate change view 2026-09-25 14:40:38 +02:00
c8349a3171 feat: add continuous GPS tracking, pulsing location marker, and distance calculation to inspection maps 2026-09-25 14:23:51 +02:00
97ecd8d9fb fix(inspections): prevent modal event bubbling and add bottom add-ouvrage button in GIEP 2026-09-25 11:47:57 +02:00
ca8d8187c1 feat: hide standard inspection sections for GIEP-specific inspections 2026-09-25 11:34:04 +02:00