Skip to content

feat(VSN-2285): migrate circuit fiche form components from MUI to shadcn/Tailwind

yahya.elmokhtari a demandé de fusionner feature/VSN-2285 vers develop

Summary

  • Migrate all circuit fiche form sub-tab components (chauffeur, trajet, avenant, document, horaires, usager) from MUI to shadcn/Tailwind CSS
  • Add new shadcn circuit list view with grid-based table, animated rows, hover glow and neo-morphic design system
  • Redesign usager tab with grid table, user selector dropdown and schedule amendments view
  • Simplify circuit store by removing bulk import logic and driver reassignment candidates
  • Clean up type definitions, API endpoints and Zustand stores

Changes

New: shadcn Circuit Views (src/shared/sections/circuit/shadcn/)

  • circuit-list-view — New shadcn-based circuit list page with TableControlBar, TabsCustom and TabContentContainer
  • circuit-new-view — New shadcn circuit form view (713 lines)
  • circuit-table — New grid-based circuit table with checkbox selection, scroll sync, skeleton loading and animated rows
  • circuit-table-row — New row component with IntersectionObserver animation, hover glow, status menu and action column
  • duration-warning-dialog — New shadcn dialog for circuit duration warnings
  • early-termination-dialog — New shadcn dialog for early circuit termination with reason/observation fields

Migrated: Chauffeur Components (src/shared/sections/circuit/components/circuit-form/chauffeur/)

  • circuit-assignment-row — Refactored from MUI Box/IconButton to Tailwind grid layout, simplified driver assignment rendering
  • DriverNameCell — Rewritten from MUI Typography/Box to Tailwind utility classes with lucide-react icons
  • PassengerNamesCell — Rewritten from MUI Chip/Stack to Tailwind pill badges
  • JoursAttribuesGrid — Migrated day grid from MUI Box/Typography to Tailwind flex layout
  • chauffeur-cell-renderer — Updated cell rendering with Tailwind classes
  • chauffeur-row — Updated row component styling to Tailwind
  • chauffeur-stepper-form — Updated import path
  • driver-details — Updated import path

Migrated: Trajet Components (src/shared/sections/circuit/components/circuit-form/trajet/)

  • trajet-details — Rewritten from MUI Box/Stack/Typography to Tailwind layout with lucide-react icons
  • trajet-table-row — Migrated from MUI TableCell/styled to Tailwind grid row with status badges
  • usager-details-dialog — Rewritten dialog from MUI Dialog/Box to Tailwind modal with glassmorphism
  • circuit-schedules-table — Updated from MUI table to Tailwind grid layout
  • editable-passenger-schedule — Simplified from MUI form controls to Tailwind inputs
  • customized-trips-list — Updated list styling to Tailwind
  • duplication-dates-calendar — Updated calendar styling to Tailwind
  • trajets-list — Updated list container styling
  • trajet-new-view — Updated import path

Migrated: Avenant Components (src/shared/sections/circuit/components/circuit-form/avenant/)

  • avenants-list — Rewritten with grid-based table layout, animated rows and pagination
  • circuit-ammendment-new-view — Updated import paths
  • avenant-details — Updated import path
  • form-fields-avenant — Updated avenant form field definitions and labels

Migrated: Document Component (src/shared/sections/circuit/components/circuit-form/document/)

  • circuit-depot-document — Rewritten file upload and document table UI from MUI to Tailwind with drag-and-drop zone and grid table

Migrated: Horaires Component (src/shared/sections/circuit/components/circuit-form/horaires/)

  • schedule-history-view — Updated import path

Redesigned: Usager Components (src/shared/sections/circuit/components/circuit-form/usager/)

  • circuit-usager — Full redesign with grid-based table matching circuit-list design, animated rows, skeleton loading, hover glow, action columns (view amendment, open external, delete) and client-side pagination
  • userSelector — Rewritten dropdown from MUI TextField/ScrollBox to Tailwind search input with multi-select list, selected count badge and btn-primary-glow apply button
  • schedule-amendments — Rewritten amendment list with grid table, color-coded status badges, scroll sync between header and body, skeleton loading and empty state with search icon
  • use-amendment-passenger-circuit-table — Updated hook to use local state for amendments

Updated: Shared Components

  • confirm-dialog — Added confirmDisabled prop to shadcn ConfirmDialog for async operation support
  • form-field — Simplified driver selection rendering, removed DriverReassignmentCandidate type and reassignment-specific autocomplete renderOption

Updated: Types & API Endpoints

  • circuit.ts — Added comment for circuitTitled field, removed hasTimeConflictInPeriod from DriverScore and DriverSearchRequestDTO, removed schedules from DriverSearchRequestDTO
  • ammendment-circuit.ts — Removed unused passengerName, passengerFirstName, passengerLastName, agencyName, client fields from AmendmentCircuit
  • circuit endpoints — Removed unused import endpoints (importTemplate, importUpload, importStatus)
  • planningDriver endpoints — Removed reassignment candidates endpoint, simplified endpoint prefix naming
  • circuit-preparation-endpoints — Removed prepared amendment passenger endpoints
  • trip-preparation-endpoints — Removed getPreparedCircuitSchedules and getTripById endpoints

Updated: Zustand Stores

  • circuitStore — Removed bulk import logic (downloadTemplate, uploadCircuits, checkImportStatus, retryWithBackoff), removed import state fields
  • amendmentCiruitStore — Simplified amendment mapping, removed logger dependency and defensive validation
  • amendmentPassengerStore — Removed totalElements from FetchActiveOrFutureAmendmentsResult
  • planningDriverStore — Removed fetchReassignmentCandidates action and WeekTypeSchedule import
  • amendment-circuit-preparation — Removed fetchPreparedActiveOrFutureAmendmentsAndReturn and getPreparedAmendmentById actions
  • circuit-preparation-store — Simplified addPreparedCircuit response handling
  • prepared-trip-circuit-store — Fixed endpoint reference for trip details

Updated: Other Modules

  • chauffeur/planingChauffeur — Removed reassignment types, simplified driver-schedule, draggable-time-slot, driver-details-popover and DriverRowMemo components
  • chauffeur/suiviTrajet — Updated suivi-trajet list and detail views
  • avenant views — Updated avenant-list-view, avenant-new-view, removed unused table row code
  • Preparation/circuit — Updated circuit duplication list view, establishment and passenger selectors
  • circuit routing — Switched circuit page route to shadcn view, updated usager page route

Updated: Mock Data

  • _avenants.ts — Updated avenant mock field definitions
  • _circuit.ts — Updated circuit mock table head
  • _trajets.ts — Removed unused import

Rapports de requête de fusion