From 65b6fca186f98a618ca91529db43cdd619eae65e Mon Sep 17 00:00:00 2001 From: Lea Renaux Date: Tue, 26 Dec 2023 13:37:38 +0100 Subject: [PATCH 1/4] add collection dates table in CampaignPortal --- .../CampaignPortal/CampaignPortal.css | 4 + .../CampaignPortal/CampaignPortal.jsx | 7 + src/components/CampaignPortal/Dates.jsx | 34 + src/components/CampaignPortal/Dates.test.jsx | 41 + .../CampaignPortal.test.jsx.snap | 912 +++++++++++++++++- .../View/__snapshots__/View.test.jsx.snap | 130 +++ src/i18n/labels/labels_campaignPortal.js | 10 + 7 files changed, 1109 insertions(+), 29 deletions(-) create mode 100644 src/components/CampaignPortal/Dates.jsx create mode 100644 src/components/CampaignPortal/Dates.test.jsx diff --git a/src/components/CampaignPortal/CampaignPortal.css b/src/components/CampaignPortal/CampaignPortal.css index 7ed6c25..0453488 100644 --- a/src/components/CampaignPortal/CampaignPortal.css +++ b/src/components/CampaignPortal/CampaignPortal.css @@ -2,6 +2,10 @@ width: 30%; } +.DatesLeftHeader{ + width: 30%; +} + /* Column sizes */ #CampaignPortal .ColInterviewerName{ diff --git a/src/components/CampaignPortal/CampaignPortal.jsx b/src/components/CampaignPortal/CampaignPortal.jsx index dc56942..b83cf43 100644 --- a/src/components/CampaignPortal/CampaignPortal.jsx +++ b/src/components/CampaignPortal/CampaignPortal.jsx @@ -7,6 +7,7 @@ import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; import Utils from '../../utils/Utils'; import TimeLine from './TimeLine'; +import { DatesTable } from './Dates' import Contacts from './Contacts'; import SurveyUnits from './SurveyUnits'; import SurveySelector from '../SurveySelector/SurveySelector'; @@ -106,6 +107,12 @@ function CampaignPortal({ + { + return ( + + {D.dates} + + + + + + + + + + + + + + + + + + + +
{D.identificationPhaseStartDate}{identificationPhaseStartDate && Utils.convertToDateString(identificationPhaseStartDate)}
{D.collectionStartDate}{collectionstartDate && Utils.convertToDateString(collectionstartDate)}
{D.collectionEndDate}{collectionEndDate && Utils.convertToDateString(collectionEndDate)}
{D.endDate}{endDate && Utils.convertToDateString(endDate)}
+
+ + ) +} \ No newline at end of file diff --git a/src/components/CampaignPortal/Dates.test.jsx b/src/components/CampaignPortal/Dates.test.jsx new file mode 100644 index 0000000..f73a382 --- /dev/null +++ b/src/components/CampaignPortal/Dates.test.jsx @@ -0,0 +1,41 @@ +import React from 'react'; +import { DatesTable } from "./Dates"; +import { render, screen } from '@testing-library/react'; + +describe("dates component", () => { + it("should display all labels", () => { + render( + + + ); + + expect(screen.getByText("Dates")).toBeInTheDocument(); + expect(screen.getByText("Start of identification phase")).toBeInTheDocument(); + expect(screen.getByText("Collection start date")).toBeInTheDocument(); + expect(screen.getByText("Collection end date")).toBeInTheDocument(); + expect(screen.getByText("Processing end date")).toBeInTheDocument(); + + }) + + it("should display all formated dates", () => { + render( + + + ); + + expect(screen.getByText("13/01/2020")).toBeInTheDocument(); + expect(screen.getByText("01/01/2021")).toBeInTheDocument(); + expect(screen.getByText("31/10/2023")).toBeInTheDocument(); + expect(screen.getByText("31/01/2024")).toBeInTheDocument(); + }) +}) \ No newline at end of file diff --git a/src/components/CampaignPortal/__snapshots__/CampaignPortal.test.jsx.snap b/src/components/CampaignPortal/__snapshots__/CampaignPortal.test.jsx.snap index cce4aba..6ae1639 100644 --- a/src/components/CampaignPortal/__snapshots__/CampaignPortal.test.jsx.snap +++ b/src/components/CampaignPortal/__snapshots__/CampaignPortal.test.jsx.snap @@ -241,6 +241,67 @@ Object { +
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 7/7/2020 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 7/7/2020 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 7/7/2020 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 7/7/2020 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 7/7/2020 +
+ Processing end date + +
+
+
- -
- - Interviewers - - + Dates
-
- - - Display - -
-
+ + -
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 7/7/2020 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 7/7/2020 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 7/7/2020 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 7/7/2020 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 1/13/2022 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 1/13/2022 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 5/26/2021 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + +
+ Start of identification phase + +
+ Collection start date + +
+ Collection end date + + 5/26/2021 +
+ Processing end date + +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + + + +
+ Start of identification phase + + 12/25/2019 +
+ Collection start date + +
+ Collection end date + + 1/1/2022 +
+ Processing end date + + 1/7/2022 +
+
+
+
+
+ Dates +
+
+ + + + + + + + + + + + + + + + + + +
+ Start of identification phase + + 12/25/2019 +
+ Collection start date + +
+ Collection end date + + 1/1/2022 +
+ Processing end date + + 1/7/2022 +
+
+
Date: Tue, 26 Dec 2023 15:21:57 +0100 Subject: [PATCH 2/4] rework test --- src/components/CampaignPortal/Dates.test.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/CampaignPortal/Dates.test.jsx b/src/components/CampaignPortal/Dates.test.jsx index f73a382..e829f4e 100644 --- a/src/components/CampaignPortal/Dates.test.jsx +++ b/src/components/CampaignPortal/Dates.test.jsx @@ -1,6 +1,7 @@ import React from 'react'; import { DatesTable } from "./Dates"; import { render, screen } from '@testing-library/react'; +import Utils from '../../utils/Utils'; describe("dates component", () => { it("should display all labels", () => { @@ -33,9 +34,9 @@ describe("dates component", () => { ); - expect(screen.getByText("13/01/2020")).toBeInTheDocument(); - expect(screen.getByText("01/01/2021")).toBeInTheDocument(); - expect(screen.getByText("31/10/2023")).toBeInTheDocument(); - expect(screen.getByText("31/01/2024")).toBeInTheDocument(); + expect(screen.getByText(Utils.convertToDateString(1578907245000))).toBeInTheDocument(); + expect(screen.getByText(Utils.convertToDateString(1609492845000))).toBeInTheDocument(); + expect(screen.getByText(Utils.convertToDateString(1698706800000))).toBeInTheDocument(); + expect(screen.getByText(Utils.convertToDateString(1706655600000))).toBeInTheDocument(); }) }) \ No newline at end of file From 1e30c75485f812b84057994b8ba5b75525d94aad Mon Sep 17 00:00:00 2001 From: Nicolas Turban <37210319+nicolasTurban@users.noreply.github.com> Date: Tue, 26 Dec 2023 15:36:06 +0100 Subject: [PATCH 3/4] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3562606..e7192c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sonor", - "version": "0.5.22", + "version": "0.5.23", "private": true, "dependencies": { "@testing-library/jest-dom": "^4.2.4", From 6300273ce186576813711a478f5d9191f1b1244e Mon Sep 17 00:00:00 2001 From: Lea Renaux Date: Wed, 27 Dec 2023 09:32:51 +0100 Subject: [PATCH 4/4] fix collectionStartDate and add email --- .../CampaignPortal/CampaignPortal.jsx | 4 +- src/components/CampaignPortal/Contacts.jsx | 6 +- src/components/CampaignPortal/Dates.jsx | 4 +- src/components/CampaignPortal/Dates.test.jsx | 4 +- .../CampaignPortal.test.jsx.snap | 56 ++++++++++++++----- .../__snapshots__/MainScreen.test.jsx.snap | 10 ++-- .../View/__snapshots__/View.test.jsx.snap | 8 ++- src/tests/mocks/formattedSurveys.js | 8 +++ src/tests/mocks/mainScreenData.js | 8 +++ src/tests/mocks/surveyInfo.js | 1 + src/tests/mocks/surveyInfoPhaseIni.js | 1 + src/tests/mocks/surveyInfoPhaseOngoing.js | 1 + 12 files changed, 81 insertions(+), 30 deletions(-) diff --git a/src/components/CampaignPortal/CampaignPortal.jsx b/src/components/CampaignPortal/CampaignPortal.jsx index b83cf43..fde6d41 100644 --- a/src/components/CampaignPortal/CampaignPortal.jsx +++ b/src/components/CampaignPortal/CampaignPortal.jsx @@ -106,10 +106,10 @@ function CampaignPortal({ - + diff --git a/src/components/CampaignPortal/Contacts.jsx b/src/components/CampaignPortal/Contacts.jsx index d877452..56c9c3a 100644 --- a/src/components/CampaignPortal/Contacts.jsx +++ b/src/components/CampaignPortal/Contacts.jsx @@ -5,7 +5,7 @@ import OverlayTrigger from 'react-bootstrap/OverlayTrigger'; import Popover from 'react-bootstrap/Popover'; import D from '../../i18n'; -function Contacts() { +function Contacts({email}) { const renderTooltip = ( @@ -24,10 +24,10 @@ function Contacts() { { window.location.assign('mailto:survey@mail.com'); }} + onClick={() => { window.location.assign(`mailto:${email}`); }} > {D.functionalBox} - survey@mail.com + {email} diff --git a/src/components/CampaignPortal/Dates.jsx b/src/components/CampaignPortal/Dates.jsx index f31fcdd..b1e8ef2 100644 --- a/src/components/CampaignPortal/Dates.jsx +++ b/src/components/CampaignPortal/Dates.jsx @@ -4,7 +4,7 @@ import D from '../../i18n'; import Utils from '../../utils/Utils'; import Table from 'react-bootstrap/Table'; -export const DatesTable = ({identificationPhaseStartDate, collectionstartDate, collectionEndDate, endDate }) => { +export const DatesTable = ({identificationPhaseStartDate, collectionStartDate, collectionEndDate, endDate }) => { return ( {D.dates} @@ -16,7 +16,7 @@ export const DatesTable = ({identificationPhaseStartDate, collectionstartDate, c {D.collectionStartDate} - {collectionstartDate && Utils.convertToDateString(collectionstartDate)} + {collectionStartDate && Utils.convertToDateString(collectionStartDate)} {D.collectionEndDate} diff --git a/src/components/CampaignPortal/Dates.test.jsx b/src/components/CampaignPortal/Dates.test.jsx index e829f4e..54ca770 100644 --- a/src/components/CampaignPortal/Dates.test.jsx +++ b/src/components/CampaignPortal/Dates.test.jsx @@ -8,7 +8,7 @@ describe("dates component", () => { render( @@ -27,7 +27,7 @@ describe("dates component", () => { render( diff --git a/src/components/CampaignPortal/__snapshots__/CampaignPortal.test.jsx.snap b/src/components/CampaignPortal/__snapshots__/CampaignPortal.test.jsx.snap index 6ae1639..b43adcd 100644 --- a/src/components/CampaignPortal/__snapshots__/CampaignPortal.test.jsx.snap +++ b/src/components/CampaignPortal/__snapshots__/CampaignPortal.test.jsx.snap @@ -274,7 +274,9 @@ Object { + > + 5/26/2020 + + > + 5/26/2020 + + > + 5/26/2020 + + > + 5/26/2020 + + > + 5/26/2020 + + > + 5/26/2020 + + > + 5/26/2020 + + > + 5/26/2020 + + > + 5/26/2020 + + > + 5/26/2020 + + > + 5/14/2021 + + > + 5/14/2021 + + > + 5/26/2020 + + > + 5/26/2020 + - {"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","collectionStartDate":1577837800000,"endDate":1641514600000,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","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","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","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","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","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","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,"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","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","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","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","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","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","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,"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","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","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","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","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","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","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,"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`] = `
- {"id":"vqs2021x00","label":"Everyday life and health survey 2021","collectionStartDate":1577837800000,"endDate":1641514600000,"allSurveys":[{"id":"vqs202fgd1x00","label":"Everyday life and health survey 2018","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","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","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","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","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","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,"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}]}
`; @@ -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","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","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","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","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","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","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","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,"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/View/__snapshots__/View.test.jsx.snap b/src/components/View/__snapshots__/View.test.jsx.snap index 2c078ae..28c9eb5 100644 --- a/src/components/View/__snapshots__/View.test.jsx.snap +++ b/src/components/View/__snapshots__/View.test.jsx.snap @@ -8314,7 +8314,9 @@ Object { + > + 1/1/2020 + + > + 1/1/2020 +