Skip to content

Commit

Permalink
fix: noident identification text
Browse files Browse the repository at this point in the history
  • Loading branch information
Grafikart committed Feb 20, 2024
1 parent 39e0e1b commit 7fed3b4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/pages/SurveyUnitPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { PersonsCard } from '../ui/SurveyUnit/PersonsCard';
import { ContactsCard } from '../ui/SurveyUnit/ContactsCard';
import { CommunicationsCard } from '../ui/SurveyUnit/CommunicationsCard';
import { CommentCard } from '../ui/SurveyUnit/CommentCard';
import { QuestionnaireCard } from '../ui/Questionnaire/QuestionnaireCard';
import Stack from '@mui/material/Stack';
import CircularProgress from '@mui/material/CircularProgress';
import NotInterestedIcon from '@mui/icons-material/NotInterested';
Expand Down
7 changes: 6 additions & 1 deletion src/ui/SurveyUnit/IdentificationCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import React, { useState } from 'react';
import { RadioLine } from '../RadioLine';
import RadioGroup from '@mui/material/RadioGroup';
import { surveyUnitIDBService } from '../../utils/indexeddb/services/surveyUnit-idb-service';
import { identificationConfigurationEnum } from '../../utils/enum/IdentificationConfigurationEnum';
import Box from '@mui/material/Box';

/**
* @param {SurveyUnit} surveyUnit
Expand Down Expand Up @@ -48,7 +50,10 @@ export function IdentificationCard({ surveyUnit }) {
onClick={() => setQuestion(question)}
/>
))}
<MoveQuestion surveyUnit={surveyUnit} />
{surveyUnit.identificationConfiguration === identificationConfigurationEnum.NOIDENT ? <Box typography="s" color="textTertiary">
Pas de repérage pour cette enquête
</Box> :
<MoveQuestion surveyUnit={surveyUnit} />}
</Stack>
</Stack>
</CardContent>
Expand Down
8 changes: 8 additions & 0 deletions src/utils/functions/seeder.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,14 @@ export async function seedData() {
lastName: 'Telephone',
identificationConfiguration: identificationConfigurationEnum.TEL,
});
surverUnits.push({
...surverUnits[0],
id: 'sunoident',
identification: {},
firstName: 'John',
lastName: 'Absent',
identificationConfiguration: identificationConfigurationEnum.NOIDENT,
});
await userIdbService.insert({
id: 1,
title: 'MISTER',
Expand Down

0 comments on commit 7fed3b4

Please sign in to comment.