Skip to content

VSN-2703 : Handling newly introduced attribute of tender document type in document mapper + importation logic.

yassine.elazami a demandé de fusionner VSN-27O3 vers develop

Merge Request Description

This document provides a semantic overview of the validations and corrections introduced across the commits, ordered from the oldest to the most recent.


Unifying UUID Extraction

The validation ensures that the retrieval of userUuid from local storage is handled safely within the client-side context. Instead of directly accessing localStorage at render time, the logic is moved into a controlled useEffect with proper guards. This prevents server-side rendering crashes and avoids passing "null" as a string to APIs when the UUID is absent.


Consolidating Folder Lookup Logic

The recursive function findFolderById was previously duplicated across multiple handlers. This validation centralizes the function into a single definition, reducing redundancy and ensuring consistency when folder structures evolve. The same approach is applied to updateFolderRecursively, avoiding repeated code and minimizing maintenance overhead.


Cleaning Up Polling Intervals

A validation was added to ensure that polling intervals created for document analysis are properly cleared when the component unmounts. This prevents React warnings about state updates on unmounted components and avoids potential memory leaks or erratic behavior caused by lingering intervals.


Removing Incomplete List View Implementation

The list view mode for documents and folders was partially implemented but lacked functional context menus and accessible UI toggles. This validation removes or hides the incomplete list view elements to prevent confusion and ensure that only fully functional features are exposed to users.


Correcting UUID Handling and Effect Removal

The handling of UUIDs was further refined by correcting the logic around filtered documents. Redundant useEffect blocks that conflicted with search and filter states were removed. This ensures that search queries and file type filters persist correctly when navigating folders, maintaining a consistent user experience.


Adding Tender Document Type Enumeration

A new enum attribute was introduced to specify the type of tender document (e.g., avis, bp, cc, rc, or custom types). This validation provides a structured way to categorize documents, improving clarity and enabling more precise handling of tender-related workflows.


Fixing Typographical Error in Enumeration

A minor correction was applied to the tender document type enumeration, changing bpu to bp. This ensures consistency in naming conventions and prevents potential mismatches or confusion in document type references.


Closes VSN-27

Rapports de requête de fusion