Skip to content

Commit

Permalink
Merge pull request #96 from InseeFr/feature/addContactOutcomeInReview…
Browse files Browse the repository at this point in the history
…Table

add contactOutcome column
  • Loading branch information
RenauxLeaInsee authored Jan 24, 2024
2 parents ce16e39 + 62f31e7 commit db7fd0e
Show file tree
Hide file tree
Showing 8 changed files with 374 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sonor",
"version": "0.5.27",
"version": "0.5.28",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^4.2.4",
Expand Down
3 changes: 3 additions & 0 deletions src/components/Review/Review.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
#Review .ColInterviewer{
width: 35%;
}
#Review .ColContactOutcome{
width: 15%;
}
#Review .ColAction{
width: 1%;
}
25 changes: 15 additions & 10 deletions src/components/Review/ReviewTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ class ReviewTable extends React.Component {
<SortIcon val="id" sort={sort} />
{D.identifier}
</th>
<th className="ColContactOutcome">{D.contact}</th>
<th
onClick={handleSortFunct("interviewer")}
data-testid="TableHeader_interviewer_name_review"
Expand All @@ -218,16 +219,20 @@ class ReviewTable extends React.Component {
)
)
.map((line) => {
const element = checkboxArray.filter((element) => element.id === line.id)[0]
return <SurveyUnitLine
key={line.id}
lineData={line}
dataRetreiver={dataRetreiver}
isChecked={element?.isChecked ?? false}
view={() => view(line)}
updateFunc={() => toggleCheckBox(line.id)}
handleShow={() => handleShowComment(line)}
/>
const element = checkboxArray.filter(
(element) => element.id === line.id
)[0];
return (
<SurveyUnitLine
key={line.id}
lineData={line}
dataRetreiver={dataRetreiver}
isChecked={element?.isChecked ?? false}
view={() => view(line)}
updateFunc={() => toggleCheckBox(line.id)}
handleShow={() => handleShowComment(line)}
/>
);
})}
<Modal show={showComment} onHide={() => handleCloseComment()}>
<Modal.Header closeButton>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Review/SurveyUnitLine.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function SurveyUnitLine({
view,
dataRetreiver,
}) {
const { campaignLabel, interviewer, id, viewed } = lineData;
const { campaignLabel, interviewer, id, viewed, contactOutcome } = lineData;
const queenUrl = `${window.localStorage.getItem("QUEEN_URL_FRONT_END")}`;
return (
<tr className={viewed ? "" : "notViewed"}>
Expand All @@ -27,6 +27,9 @@ function SurveyUnitLine({
</td>
<td className="ColCampaign">{campaignLabel}</td>
<td className="ColId">{id}</td>
<td className="ColContactOutcome">
{contactOutcome && D[contactOutcome]}
</td>
<td className="ColInterviewer">{interviewer}</td>
<td className="ColAction">
<OverlayTrigger
Expand Down
Loading

0 comments on commit db7fd0e

Please sign in to comment.