Skip to content

Commit

Permalink
fix collectionStartDate and add email
Browse files Browse the repository at this point in the history
  • Loading branch information
RenauxLeaInsee committed Dec 27, 2023
1 parent 6a1da77 commit 155c6cf
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 30 deletions.
4 changes: 2 additions & 2 deletions src/components/CampaignPortal/CampaignPortal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ function CampaignPortal({
</Row>
<Row>
<Col>
<Contacts />
<Contacts email = {surveyInfo.email} />
<DatesTable
identificationPhaseStartDate={surveyInfo.identificationPhaseStartDate}
collectionstartDate={surveyInfo.collectionstartDate}
collectionStartDate={surveyInfo.collectionStartDate}
collectionEndDate={surveyInfo.collectionEndDate}
endDate={surveyInfo.endDate}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/components/CampaignPortal/Contacts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
<Popover id="popover-basic">
<Popover.Content>
Expand All @@ -24,10 +24,10 @@ function Contacts() {
<tr
className="Clickable"
data-testid="mail-button"
onClick={() => { window.location.assign('mailto:[email protected]'); }}
onClick={() => { window.location.assign(`mailto:${email}`); }}
>
<th className="ContactsLeftHeader">{D.functionalBox}</th>
<td className=" LightGreyLine MailLink">[email protected]</td>
<td className=" LightGreyLine MailLink">{email}</td>
</tr>
</OverlayTrigger>
<tr>
Expand Down
4 changes: 2 additions & 2 deletions src/components/CampaignPortal/Dates.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<Card className="ViewCard">
<Card.Title className="Title">{D.dates}</Card.Title>
Expand All @@ -16,7 +16,7 @@ export const DatesTable = ({identificationPhaseStartDate, collectionstartDate, c
</tr>
<tr>
<th className="DatesLeftHeader">{D.collectionStartDate}</th>
<td className="LightGreyLine VerticallyCentered">{collectionstartDate && Utils.convertToDateString(collectionstartDate)}</td>
<td className="LightGreyLine VerticallyCentered">{collectionStartDate && Utils.convertToDateString(collectionStartDate)}</td>
</tr>
<tr>
<th className="DatesLeftHeader">{D.collectionEndDate}</th>
Expand Down
4 changes: 2 additions & 2 deletions src/components/CampaignPortal/Dates.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe("dates component", () => {
render(
<DatesTable
identificationPhaseStartDate={1578907245000}
collectionstartDate={1609492845000}
collectionStartDate={1609492845000}
collectionEndDate={1698706800000}
endDate={1706655600000}
/>
Expand All @@ -27,7 +27,7 @@ describe("dates component", () => {
render(
<DatesTable
identificationPhaseStartDate={1578907245000}
collectionstartDate={1609492845000}
collectionStartDate={1609492845000}
collectionEndDate={1698706800000}
endDate={1706655600000}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -895,7 +897,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -1573,7 +1577,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -2194,7 +2200,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -2872,7 +2880,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -3493,7 +3503,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -4171,7 +4183,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -4796,7 +4810,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -5482,7 +5498,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -6103,7 +6121,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -6781,7 +6801,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/14/2021
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -7402,7 +7424,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/14/2021
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -8080,7 +8104,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down Expand Up @@ -8701,7 +8727,9 @@ Object {
</th>
<td
class="LightGreyLine VerticallyCentered"
/>
>
5/26/2020
</td>
</tr>
<tr>
<th
Expand Down
Loading

0 comments on commit 155c6cf

Please sign in to comment.