Skip to content

Commit

Permalink
feat: modify mock
Browse files Browse the repository at this point in the history
  • Loading branch information
RenauxLeaInsee committed Nov 5, 2024
1 parent 81b0f22 commit bb8efdc
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 38 deletions.
68 changes: 34 additions & 34 deletions src/pages/QuestioningPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,46 +22,44 @@ const TabNames = {

const questioningMock = {
id: 2590569,
label: "Interrogation 10",
campaign: "ARTI",
label: "TODO LABEL",
campaign: "TODO COLLECTE LABEL",
identificationCode: "SIRET/ID",
idSu: "000005808",
contacts: [
{ id: "1", firstName: "John", lastName: "Doe" },
{ id: "2", firstName: "Juliette", lastName: "Doe" },
],
status: "HC",
lastCommunication: "PND",
collectDate: "2024-07-19T07:23:20.156Z",
contacts: [],
status: "TODO",
lastCommunication: "TODO",
collectDate: undefined,
// collectDate: "2024-07-19T07:23:20.156Z",
questioningUrl: "/",
questioningComments: [
{
comment: "commentaire 1 interro",
author: "auteur",
commentDate: "2024-08-08T13:10:51.414+00:00",
},
{
comment: "commentaire 2 interro",
author: "auteur",
commentDate: "2024-08-09T05:25:25.756+00:00",
},
{
comment: "commentaire 3 interro",
author: "auteur",
commentDate: "2024-09-09T05:25:25.756+00:00",
},
// {
// comment: "commentaire 1 interro",
// author: "auteur",
// commentDate: "2024-08-08T13:10:51.414+00:00",
// },
// {
// comment: "commentaire 2 interro",
// author: "auteur",
// commentDate: "2024-08-09T05:25:25.756+00:00",
// },
// {
// comment: "commentaire 3 interro",
// author: "auteur",
// commentDate: "2024-09-09T05:25:25.756+00:00",
// },
],
surveyUnitComments: [
{
comment: "commentaire 1 UE",
author: "auteur",
commentDate: "2024-08-08T13:10:51.414+00:00",
},
{
comment: "commentaire 2 UE",
author: "auteur",
commentDate: "2024-07-09T05:25:25.756+00:00",
},
// {
// comment: "commentaire 1 UE",
// author: "auteur",
// commentDate: "2024-08-08T13:10:51.414+00:00",
// },
// {
// comment: "commentaire 2 UE",
// author: "auteur",
// commentDate: "2024-07-09T05:25:25.756+00:00",
// },
],
};

Expand Down Expand Up @@ -103,6 +101,8 @@ export const QuestioningPage = () => {
</Row>
<Button
variant="contained"
// remove disabled
disabled={true}
size="large"
component={Link}
to={questioningMock.questioningUrl}
Expand Down
11 changes: 8 additions & 3 deletions src/ui/Questioning/QuestioningInfos.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Card, Divider, List, ListItem, ListItemText, Stack, Typography } from "@mui/material";
import { Button, Card, Stack, Typography } from "@mui/material";
import { Row } from "../Row.tsx";
import { Link } from "../Link.tsx";
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
Expand All @@ -16,7 +16,8 @@ export const QuestioningInfos = ({ questioning }: Props) => {
<Stack gap={2}>
<Typography variant={"headlineSmall"}>Informations</Typography>

<List dense>
{/* TODO: use this List when get data */}
{/* <List dense>
<ListItem sx={{ px: 0 }}>
<ListItemText primary={<Typography variant="titleSmall">Répondants</Typography>} />
</ListItem>
Expand Down Expand Up @@ -46,12 +47,14 @@ export const QuestioningInfos = ({ questioning }: Props) => {
</ListItem>
</div>
))}
</List>
</List> */}
<Stack gap={1} sx={{ pr: 2 }}>
<Typography variant="titleSmall">Unité enquêtée</Typography>
<Row justifyContent={"space-between"}>
<Typography variant="bodyMedium">{questioning.identificationCode}</Typography>
<Button
// todo remove disabled
disabled={true}
component={Link}
to={`/survey-units/${questioning.idSu}`}
sx={{ typography: "titleSmall" }}
Expand All @@ -67,6 +70,8 @@ export const QuestioningInfos = ({ questioning }: Props) => {
<Row justifyContent={"space-between"}>
<Typography variant="bodyMedium">{questioning.campaign}</Typography>
<Button
// todo remove disabled
disabled={true}
component={Link}
to={`/campaigns/${questioning.campaign}`}
sx={{ typography: "titleSmall" }}
Expand Down
3 changes: 2 additions & 1 deletion src/ui/Questioning/StatesCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ export const StatesCard = ({ questioning }: Props) => {
variant="text"
sx={{ typography: "titleSmall" }}
onClick={() => toggleDialog("lastCommunicationHistory")}
disabled={!questioning.lastCommunication}
// disabled={!questioning.lastCommunication}
disabled={true}
>
Voir l'historique
</Button>
Expand Down

0 comments on commit bb8efdc

Please sign in to comment.