Skip to content

Commit

Permalink
fix(dashboard): edit medical file
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud AMBROSELLI committed Sep 29, 2023
1 parent f4ce657 commit 2e31eaa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dashboard/src/scenes/person/components/EditModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
import { outOfBoundariesDate } from '../../../services/date';
import SelectTeamMultiple from '../../../components/SelectTeamMultiple';
import { currentTeamState, userState } from '../../../recoil/auth';
import { useRecoilState, useRecoilValue } from 'recoil';
import { useRecoilState, useRecoilValue, useSetRecoilState } from 'recoil';
import CustomFieldInput from '../../../components/CustomFieldInput';
import { useMemo, useState } from 'react';
import ButtonCustom from '../../../components/ButtonCustom';
Expand All @@ -31,8 +31,8 @@ export default function EditModal({ person, selectedPanel, onClose, isMedicalFil
const team = useRecoilValue(currentTeamState);
const [persons, setPersons] = useRecoilState(personsState);
const customFieldsMedicalFile = useRecoilValue(customFieldsMedicalFileSelector);
const [allMedicalFiles, setAllMedicalFiles] = useRecoilState(medicalFileState);
const medicalFile = useMemo(() => (allMedicalFiles || []).find((m) => m.person === person._id), [allMedicalFiles, person._id]);
const setAllMedicalFiles = useSetRecoilState(medicalFileState);
const medicalFile = person.medicalFile;

const customFieldsMedicalFileWithLegacyFields = useMemo(() => {
const c = [...customFieldsMedicalFile];
Expand Down

0 comments on commit 2e31eaa

Please sign in to comment.