@@ -346,8 +348,8 @@ function DocumentRow({ document, level, parentIsOpen, position, parentId, color,
}
function Informations({ item }: { item: Item | FolderForTree | RootForTree }) {
- if (item.type === 'folder' && ['Dossier Racine', '👪 Documents familiaux'].includes(item.name)) {
- return null;
+ if (item.type === 'folder') {
+ if (['root', 'treatment', 'consultation'].includes(item._id)) return null;
}
return (
diff --git a/dashboard/src/scenes/person/components/PersonDocumentsMedical.tsx b/dashboard/src/scenes/person/components/PersonDocumentsMedical.tsx
index e43a46fb1..2966aa58d 100644
--- a/dashboard/src/scenes/person/components/PersonDocumentsMedical.tsx
+++ b/dashboard/src/scenes/person/components/PersonDocumentsMedical.tsx
@@ -49,7 +49,7 @@ const PersonDocumentsMedical = ({ person }: PersonDocumentsProps) => {
{
_id: 'treatment',
name: 'Traitements',
- position: 0,
+ position: 1,
parentId: 'root',
type: 'folder',
linkedItem: {
@@ -80,7 +80,7 @@ const PersonDocumentsMedical = ({ person }: PersonDocumentsProps) => {
{
_id: 'consultation',
name: 'Consultations',
- position: 1,
+ position: 0,
parentId: 'root',
type: 'folder',
linkedItem: {
@@ -316,6 +316,7 @@ const PersonDocumentsMedical = ({ person }: PersonDocumentsProps) => {
}}
onSaveNewOrder={async (nextDocuments) => {
try {
+ await new Promise((resolve) => setTimeout(resolve, 100)); // if not, the UX is jumpy and shit
const groupedById: any = {
treatment: {},
consultation: {},