diff --git a/src/components/ListSU/SUTableHeader.jsx b/src/components/ListSU/SUTableHeader.jsx
new file mode 100644
index 0000000..993f6f7
--- /dev/null
+++ b/src/components/ListSU/SUTableHeader.jsx
@@ -0,0 +1,56 @@
+import React from "react";
+import SortIcon from "../SortIcon/SortIcon";
+import OverlayTrigger from "react-bootstrap/OverlayTrigger";
+import Tooltip from "react-bootstrap/Tooltip";
+
+const HeaderContent = ({
+ label,
+ className,
+ sortValue,
+ sort,
+ handleSortFunction,
+ dataTestId,
+ ...props
+}) => (
+
+ {label}
+ {sortValue && }
+ |
+);
+
+export const SUTableHeader = ({
+ label,
+ tooltipLabel,
+ className,
+ sortValue,
+ sort,
+ handleSortFunction,
+ dataTestId,
+}) => {
+ return tooltipLabel ? (
+
{tooltipLabel}}>
+
+
+ ) : (
+
+ );
+};
diff --git a/src/components/ListSU/SUTableHeaderParameters.js b/src/components/ListSU/SUTableHeaderParameters.js
new file mode 100644
index 0000000..48af4a4
--- /dev/null
+++ b/src/components/ListSU/SUTableHeaderParameters.js
@@ -0,0 +1,83 @@
+import D from "../../i18n";
+
+export const SUTableHeaderParameters =[
+ {
+ label: D.identifier,
+ className: "Clickable ColId",
+ sortValue: "id",
+ isAlwaysVisible: true,
+ },
+ {
+ label: D.interviewer,
+ className: "Clickable ColInterviewer",
+ sortValue: "interviewer",
+ dataTestId: "TableHeader_interviewer_name",
+ isAlwaysVisible: true,
+ },
+ {
+ label: D.ssech,
+ className: "Clickable ColSsech",
+ sortValue: "ssech",
+ isAlwaysVisible: true,
+ },
+ {
+ label: D.department,
+ className: "Clickable ColDepartement",
+ sortValue: "departement",
+ isAlwaysVisible: true,
+ },
+ {
+ label: D.town,
+ className: "Clickable ColCity",
+ sortValue: "city",
+ isAlwaysVisible: true,
+ },
+ {
+ label: D.totalRemindersLabel,
+ className: "ColTotalReminders",
+ tooltipLabel: D.totalReminders,
+ isAlwaysVisible: false,
+ },
+ {
+ label: D.latestReminderLabel,
+ className: "ColLatestReminder",
+ tooltipLabel: D.latestReminder,
+ isAlwaysVisible: false,
+ },
+ {
+ label: `${D.latestReminderLabel}-1`,
+ className: "ColLatestReminder",
+ tooltipLabel: D.secondLatestReminder,
+ isAlwaysVisible: false,
+ },
+ {
+ label: `${D.latestReminderLabel}-2`,
+ className: "ColLatestReminder",
+ tooltipLabel: D.thirdLatestReminder,
+ isAlwaysVisible: false,
+ },
+ {
+ label: `${D.latestReminderLabel}-3`,
+ className: "ColLatestReminder",
+ tooltipLabel: D.fourthLatestReminder,
+ isAlwaysVisible: false,
+ },
+ {
+ label: D.contactOutcomeLabel,
+ className: "ColContactOutcomeType",
+ isAlwaysVisible: false,
+ },
+ {
+ label: D.contactOutcomeDateLabel,
+ className: "Clickable ColContactOutcomeDate",
+ sortValue: "contactOutcomeDate",
+ tooltipLabel: D.contactOutcomeDate,
+ isAlwaysVisible: false,
+ },
+ {
+ label: D.state,
+ className: "Clickable ColState",
+ sortValue: "state",
+ isAlwaysVisible: true,
+ }
+];
\ No newline at end of file
diff --git a/src/components/ListSU/SurveyUnitLine.jsx b/src/components/ListSU/SurveyUnitLine.jsx
index 11f7bd6..9638563 100644
--- a/src/components/ListSU/SurveyUnitLine.jsx
+++ b/src/components/ListSU/SurveyUnitLine.jsx
@@ -1,9 +1,63 @@
import React from "react";
import D from "../../i18n";
+import Utils from "../../utils/Utils";
+
+function SurveyUnitLine({
+ lineData,
+ isChecked,
+ updateFunc,
+ communicationRequestConfiguration,
+}) {
+ const {
+ id,
+ ssech,
+ departement,
+ city,
+ interviewer,
+ state,
+ remindersByOrder = [],
+ contactOutcome,
+ } = lineData;
+
+ const getReminderDescription = (reminder) => {
+ switch (reminder.medium) {
+ case "EMAIL":
+ switch (reminder.reason) {
+ case "REFUSAL":
+ return `${D.reminderEmailMedium} ${D.reminderRefReason}`;
+ case "UNREACHABLE":
+ return `${D.reminderEmailMedium} ${D.reminderItjReason}`;
+ default:
+ return D.reminderEmailMedium;
+ }
+ case "MAIL":
+ switch (reminder.reason) {
+ case "REFUSAL":
+ return `${D.reminderMailMedium} ${D.reminderRefReason}`;
+ case "UNREACHABLE":
+ return `${D.reminderMailMedium} ${D.reminderItjReason}`;
+ default:
+ return D.reminderMailMedium;
+ }
+ default:
+ switch (reminder.reason) {
+ case "REFUSAL":
+ return D.reminderRefReason;
+ case "UNREACHABLE":
+ return D.reminderItjReason;
+ default:
+ return "";
+ }
+ }
+ };
+
+ const getReminderDate = (reminder) => {
+ const date = reminder.status.find(
+ (status) => status.status === "INITIATED"
+ ).date;
+ return date ? Utils.convertToDateString(new Date(date)) : "";
+ };
-function SurveyUnitLine({ lineData, isChecked, updateFunc }) {
- const { id, ssech, departement, city, interviewer, state, closingCause } =
- lineData;
return (
@@ -25,7 +79,43 @@ function SurveyUnitLine({ lineData, isChecked, updateFunc }) {
| {ssech} |
{departement?.substring(0, 2) ?? ""} |
{city} |
- {closingCause ? D[closingCause] : ""} |
+ {communicationRequestConfiguration && (
+ <>
+ {remindersByOrder.length} |
+
+ {remindersByOrder[0] &&
+ `${getReminderDescription(remindersByOrder[0])} ${getReminderDate(
+ remindersByOrder[0]
+ )}`}
+ |
+
+ {remindersByOrder[1] &&
+ `${getReminderDescription(remindersByOrder[1])} ${getReminderDate(
+ remindersByOrder[1]
+ )}`}
+ |
+
+ {remindersByOrder[2] &&
+ `${getReminderDescription(remindersByOrder[2])} ${getReminderDate(
+ remindersByOrder[2]
+ )}`}
+ |
+
+ {remindersByOrder[3] &&
+ `${getReminderDescription(remindersByOrder[3])} ${getReminderDate(
+ remindersByOrder[3]
+ )}`}
+ |
+
+ {contactOutcome?.type && D[contactOutcome.type]}
+ |
+
+ {contactOutcome?.date &&
+ Utils.convertToDateString(new Date(contactOutcome.date))}
+ |
+ >
+ )}
+ {state ? D[state] : ""} |
);
}
diff --git a/src/components/ListSU/__snapshots__/ListSU.test.jsx.snap b/src/components/ListSU/__snapshots__/ListSU.test.jsx.snap
index 96221e3..4b72d9c 100644
--- a/src/components/ListSU/__snapshots__/ListSU.test.jsx.snap
+++ b/src/components/ListSU/__snapshots__/ListSU.test.jsx.snap
@@ -4804,7 +4804,7 @@ exports[`Select another survey 1`] = `
- {"allSurveys":[{"id":"vqs2021x00","label":"Everyday life and health survey 2021","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}],"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}
+ {"allSurveys":[{"id":"vqs2021x00","label":"Everyday life and health survey 2021","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}],"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"communicationRequestConfiguration":false}
`;
diff --git a/src/components/MainScreen/SurveyListLine.jsx b/src/components/MainScreen/SurveyListLine.jsx
index d350a6b..f8660f3 100644
--- a/src/components/MainScreen/SurveyListLine.jsx
+++ b/src/components/MainScreen/SurveyListLine.jsx
@@ -9,6 +9,7 @@ function SurveyListLine({ lineData, allData }) {
label: data.label,
collectionStartDate: data.collectionStartDate,
endDate: data.endDate,
+ communicationRequestConfiguration: data.communicationRequestConfiguration ?? false,
allSurveys: allData,
};
diff --git a/src/components/MainScreen/__snapshots__/MainScreen.test.jsx.snap b/src/components/MainScreen/__snapshots__/MainScreen.test.jsx.snap
index 691b4bd..d30ccd0 100644
--- a/src/components/MainScreen/__snapshots__/MainScreen.test.jsx.snap
+++ b/src/components/MainScreen/__snapshots__/MainScreen.test.jsx.snap
@@ -5743,7 +5743,7 @@ exports[`Go to listSU 1`] = `
- {"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","collectionStartDate":1577837800000,"endDate":1641514600000,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2021x00","label":"Everyday life and health survey 2021","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2qfsdfsqe021x00","label":"Everyday life and health survey 2026","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsosfqns2020x00","label":"Survey on something 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsonqsdfsqes2020x00","label":"Survey on something else 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}]}
+ {"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","collectionStartDate":1577837800000,"endDate":1641514600000,"communicationRequestConfiguration":false,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2021x00","label":"Everyday life and health survey 2021","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2qfsdfsqe021x00","label":"Everyday life and health survey 2026","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsosfqns2020x00","label":"Survey on something 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsonqsdfsqes2020x00","label":"Survey on something else 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}]}
`;
@@ -5751,7 +5751,7 @@ exports[`Go to monitoring table 1`] = `
- {"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","collectionStartDate":1577837800000,"endDate":1641514600000,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2021x00","label":"Everyday life and health survey 2021","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2qfsdfsqe021x00","label":"Everyday life and health survey 2026","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsosfqns2020x00","label":"Survey on something 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsonqsdfsqes2020x00","label":"Survey on something else 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}]}
+ {"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","collectionStartDate":1577837800000,"endDate":1641514600000,"communicationRequestConfiguration":false,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2021x00","label":"Everyday life and health survey 2021","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2qfsdfsqe021x00","label":"Everyday life and health survey 2026","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsosfqns2020x00","label":"Survey on something 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsonqsdfsqes2020x00","label":"Survey on something else 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}]}
`;
@@ -5759,7 +5759,7 @@ exports[`Go to monitoring table by site 1`] = `
- {"id":"vqs2021x00","label":"Everyday life and health survey 2021","collectionStartDate":1577837800000,"endDate":1641514600000,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2021x00","label":"Everyday life and health survey 2021","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2qfsdfsqe021x00","label":"Everyday life and health survey 2026","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsosfqns2020x00","label":"Survey on something 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsonqsdfsqes2020x00","label":"Survey on something else 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}]}
+ {"id":"vqs2021x00","label":"Everyday life and health survey 2021","collectionStartDate":1577837800000,"endDate":1641514600000,"communicationRequestConfiguration":false,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2021x00","label":"Everyday life and health survey 2021","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2qfsdfsqe021x00","label":"Everyday life and health survey 2026","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsosfqns2020x00","label":"Survey on something 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsonqsdfsqes2020x00","label":"Survey on something else 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}]}
`;
@@ -5767,7 +5767,7 @@ exports[`Go to portal 1`] = `
- {"survey":{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","collectionStartDate":1577837800000,"endDate":1641514600000,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2021x00","label":"Everyday life and health survey 2021","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2qfsdfsqe021x00","label":"Everyday life and health survey 2026","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsosfqns2020x00","label":"Survey on something 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsonqsdfsqes2020x00","label":"Survey on something else 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}]},"surveyInfo":{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}}
+ {"survey":{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","collectionStartDate":1577837800000,"endDate":1641514600000,"communicationRequestConfiguration":false,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2021x00","label":"Everyday life and health survey 2021","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2qfsdfsqe021x00","label":"Everyday life and health survey 2026","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsosfqns2020x00","label":"Survey on something 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsonqsdfsqes2020x00","label":"Survey on something else 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}]},"surveyInfo":{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}}
`;
@@ -5775,7 +5775,7 @@ exports[`Go to portal 2`] = `
- {"survey":{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","collectionStartDate":1577837800000,"endDate":1641514600000,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2021x00","label":"Everyday life and health survey 2021","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2qfsdfsqe021x00","label":"Everyday life and health survey 2026","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsosfqns2020x00","label":"Survey on something 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsonqsdfsqes2020x00","label":"Survey on something else 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}]},"surveyInfo":{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}}
+ {"survey":{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","collectionStartDate":1577837800000,"endDate":1641514600000,"communicationRequestConfiguration":false,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2021x00","label":"Everyday life and health survey 2021","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"vqs2qfsdfsqe021x00","label":"Everyday life and health survey 2026","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsosfqns2020x00","label":"Survey on something 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsonqsdfsqes2020x00","label":"Survey on something else 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}]},"surveyInfo":{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","email":"survey@mail.com","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"allocated":4,"toProcessInterviewer":0,"toAffect":0,"toFollowUp":0,"toReview":0,"finalized":0,"preference":true}}
`;
diff --git a/src/components/MonitoringTable/__snapshots__/MonitoringTable.test.jsx.snap b/src/components/MonitoringTable/__snapshots__/MonitoringTable.test.jsx.snap
index a7429f3..3eaabb7 100644
--- a/src/components/MonitoringTable/__snapshots__/MonitoringTable.test.jsx.snap
+++ b/src/components/MonitoringTable/__snapshots__/MonitoringTable.test.jsx.snap
@@ -17695,7 +17695,7 @@ exports[`Select another survey (by interviewer) 1`] = `
- {"allSurveys":[{"id":"vqs2021x00","label":"Everyday life and health survey 2021","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}],"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}
+ {"allSurveys":[{"id":"vqs2021x00","label":"Everyday life and health survey 2021","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}],"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"communicationRequestConfiguration":false}
`;
@@ -17703,7 +17703,7 @@ exports[`Select another survey (by site) 1`] = `
- {"allSurveys":[{"id":"vqs2021x00","label":"Everyday life and health survey 2021","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}],"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}
+ {"allSurveys":[{"id":"vqs2021x00","label":"Everyday life and health survey 2021","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}],"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"communicationRequestConfiguration":false}
`;
diff --git a/src/components/Review/__snapshots__/Review.test.jsx.snap b/src/components/Review/__snapshots__/Review.test.jsx.snap
index 4f4a9a8..e55959d 100644
--- a/src/components/Review/__snapshots__/Review.test.jsx.snap
+++ b/src/components/Review/__snapshots__/Review.test.jsx.snap
@@ -4428,7 +4428,7 @@ exports[`Select another survey 1`] = `
- {"allSurveys":[{"id":"vqs2021x00","label":"Everyday life and health survey 2021","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}],"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}
+ {"allSurveys":[{"id":"vqs2021x00","label":"Everyday life and health survey 2021","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}],"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"communicationRequestConfiguration":false}
`;
diff --git a/src/components/SurveySelector/SurveySelector.jsx b/src/components/SurveySelector/SurveySelector.jsx
index 7e9d961..5a08a19 100644
--- a/src/components/SurveySelector/SurveySelector.jsx
+++ b/src/components/SurveySelector/SurveySelector.jsx
@@ -17,6 +17,7 @@ function switchCurrent(surveyObj, idToSwitch) {
switched.label = newSurvey.label;
switched.collectionStartDate = newSurvey.collectionStartDate;
switched.endDate = newSurvey.endDate;
+ switched.communicationRequestConfiguration = newSurvey.communicationRequestConfiguration ?? false;
return switched;
}
diff --git a/src/components/Terminated/__snapshots__/Terminated.test.jsx.snap b/src/components/Terminated/__snapshots__/Terminated.test.jsx.snap
index ba24386..36ead76 100644
--- a/src/components/Terminated/__snapshots__/Terminated.test.jsx.snap
+++ b/src/components/Terminated/__snapshots__/Terminated.test.jsx.snap
@@ -6596,7 +6596,7 @@ exports[`Select another survey 1`] = `
- {"allSurveys":[{"id":"vqs2021x00","label":"Everyday life and health survey 2021","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}],"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}
+ {"allSurveys":[{"id":"vqs2021x00","label":"Everyday life and health survey 2021","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000},{"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000}],"id":"simpsons2020x00","label":"Survey on the Simpsons tv show 2020","managementStartDate":1576801000000,"interviewerStartDate":1575937000000,"identificationPhaseStartDate":1577233000000,"collectionStartDate":1577837800000,"collectionEndDate":1640996200000,"endDate":1641514600000,"communicationRequestConfiguration":false}
`;
diff --git a/src/i18n/labels/labels_listSU.js b/src/i18n/labels/labels_listSU.js
index 569b21b..721a2b6 100644
--- a/src/i18n/labels/labels_listSU.js
+++ b/src/i18n/labels/labels_listSU.js
@@ -59,6 +59,82 @@ const listSU = {
fr: 'État du questionnaire',
en: 'Questionnaire state',
},
+ totalRemindersLabel: {
+ fr: 'T Rel',
+ en: 'T Rem',
+ },
+ totalReminders: {
+ fr: 'Total des relances',
+ en: 'Total reminders',
+ },
+ latestReminderLabel: {
+ fr: "Rel n",
+ en: "Rem n",
+ },
+ latestReminder: {
+ fr: "Relance la plus récente (relance enquêteur)",
+ en: "Latest reminder (interviewer reminder)",
+ },
+ secondLatestReminder: {
+ fr: "Avant dernière relance (relance enquêteur)",
+ en: "Second latest reminder (interviewer reminder)",
+ },
+ thirdLatestReminder: {
+ fr: "Avant avant dernière relance (relance enquêteur)",
+ en: "Third latest reminder (interviewer reminder)",
+ },
+ fourthLatestReminder: {
+ fr: "Avant avant avant dernière relance (relance enquêteur)",
+ en: "Fourth latest reminder (interviewer reminder)",
+ },
+ reminderEmailMedium: {
+ fr: "M",
+ en: "E"
+ },
+ reminderMailMedium: {
+ fr: "C",
+ en: "M"
+ },
+ reminderRefReason: {
+ fr: "Ref",
+ en: "Ref"
+ },
+ reminderItjReason: {
+ fr: "IAJ",
+ en: "ITJ"
+ },
+ contactOutcomeLabel: {
+ fr: "Bilan des contacts",
+ en: "Contact Outcome",
+ },
+ contactOutcomeDateLabel: {
+ fr: "Date T",
+ en: "T Date",
+ },
+ contactOutcomeDate: {
+ fr: "Date de la dernière transmission de l’unité",
+ en: "Latest transmission date",
+ },
+ reminderMediumExportLabel: {
+ fr: "Mode",
+ en: "Medium",
+ },
+ reminderReasonExportLabel: {
+ fr: "Type",
+ en: "Reason",
+ },
+ reminderDateExportLabel: {
+ fr: "Date",
+ en: "Date",
+ },
+ email: {
+ fr: "Mail",
+ en: "Email",
+ },
+ mail: {
+ fr: "Courrier",
+ en: "Mail",
+ },
};
export default listSU;
diff --git a/src/utils/Utils.js b/src/utils/Utils.js
index e3909cc..46314cc 100644
--- a/src/utils/Utils.js
+++ b/src/utils/Utils.js
@@ -213,6 +213,19 @@ class Utils {
return mainSort ? mainSortFunc(a, b) : 0;
};
}
+ if (sortOn === 'contactOutcomeDate') {
+ return (a, b) => {
+ const dateA = a.contactOutcome.date;
+ const dateB = b.contactOutcome.date;
+ if(!dateA || !dateB){
+ return dateA ? 1 * mult : -1 * mult;
+ }
+ if (dateA !== dateB) {
+ return (dateA < dateB ? -1 : 1) * mult;
+ }
+ return mainSort ? mainSortFunc(a, b) : 0;
+ };
+ }
if (sortOn === 'contact_outcome') {
return (a, b) => {
if (!a.contactOutcome && !!b.contactOutcome) {