Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit fad3c70
Merge: 79cab99 3090d99
Author: Ryan Ahearn <ryan.ahearn@gsa.gov>
Date:   Thu Mar 11 10:50:12 2021 -0500

    Merge pull request #225 from adhocteam/prod-domain-terraform

    Production domain terraform

commit 3090d99
Merge: 7cac1b4 79cab99
Author: Ryan Ahearn <ryan.ahearn@gsa.gov>
Date:   Thu Mar 11 10:41:25 2021 -0500

    Merge branch 'main' into prod-domain-terraform

commit 79cab99
Merge: 49f75a5 f9914ca
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Thu Mar 11 09:39:47 2021 -0600

    Merge pull request #216 from adhocteam/js-287-persist-goals-objectives

    Objectives/Goals are persisted

commit f9914ca
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Thu Mar 11 09:29:34 2021 -0600

    Return from migrations, remove granteeId from index

    Renamed migrations to ensure they are ran

commit 7cac1b4
Merge: 01dafc4 49f75a5
Author: Ryan Ahearn <ryan.ahearn@gsa.gov>
Date:   Thu Mar 11 10:22:42 2021 -0500

    Merge branch 'main' into prod-domain-terraform

commit e96c77d
Merge: 2f612d9 49f75a5
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Thu Mar 11 09:13:48 2021 -0600

    Merge branch 'main' into js-287-persist-goals-objectives

commit 49f75a5
Merge: bd830f9 72ea701
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Thu Mar 11 09:10:30 2021 -0600

    Merge pull request #221 from adhocteam/js-152-browser-controls

    Browser nav fix and various IE 11 fixes

commit 01dafc4
Author: Ryan Ahearn <ryan.ahearn@gsa.gov>
Date:   Wed Mar 10 12:02:51 2021 -0500

    Add route mapping for prod url

commit a7822a9
Author: Ryan Ahearn <ryan.ahearn@gsa.gov>
Date:   Wed Mar 10 11:50:57 2021 -0500

    Recursively delete non-prod infrastructure

commit 72ea701
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Wed Mar 10 16:20:57 2021 -0600

    Goal picker fix for IE 11

    IE 11 doesn't place flex items properly when a `min-height` is used. Add
    a flag to the multiselect component allowing flagging it as a "single
    row" input to allow the goal picker to show up properly

commit a270329
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Wed Mar 10 15:31:47 2021 -0600

    Attempt to force IE to not cache GET requests

commit 2f612d9
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Wed Mar 10 12:12:41 2021 -0600

    Update activityReports query

commit 81d795b
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Wed Mar 10 11:43:00 2021 -0600

    Lint fix

commit 3d6b908
Merge: 2b0ed3d bd830f9
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Wed Mar 10 11:40:02 2021 -0600

    Merge branch 'main' into js-287-persist-goals-objectives

commit bd6ce10
Merge: d3fcd83 bd830f9
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Wed Mar 10 11:33:49 2021 -0600

    Merge branch 'main' into js-152-browser-controls

commit d3fcd83
Merge: f0c8908 87790f3
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Wed Mar 10 11:32:35 2021 -0600

    Merge branch 'js-152-browser-controls' of github.com:adhocteam/Head-Start-TTADP into js-152-browser-controls

commit f0c8908
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Wed Mar 10 11:32:16 2021 -0600

    Use ie11 version of react-hook-form

commit 87790f3
Merge: 91933c6 5e867d8
Author: Ryan Ahearn <ryan.ahearn@gsa.gov>
Date:   Tue Mar 9 19:13:05 2021 -0500

    Merge branch 'main' into js-152-browser-controls

commit 91933c6
Merge: b9a17b4 58723e1
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Tue Mar 9 16:15:18 2021 -0600

    Merge branch 'js-152-browser-controls' of github.com:adhocteam/Head-Start-TTADP into js-152-browser-controls

    Conflicts:
    	.circleci/config.yml

commit b9a17b4
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Tue Mar 9 16:13:37 2021 -0600

    Update sandbox branch

commit 58723e1
Merge: d671ba4 bcca11c
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Tue Mar 9 15:40:45 2021 -0600

    Merge branch 'main' into js-152-browser-controls

commit d671ba4
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Tue Mar 9 11:34:08 2021 -0600

    Browser nav fix and various IE 11 fixes

     * Push nav state instead of replace on navigation. This means the
    back/forward browser buttons work
     * Goal picker sets height = min height for the controller, this makes
    the text inside the textbox center properly in ie11
     * react-uswds ^1.12.2 was causing the page to not load in ie11.
    Downgrade to 1.11.0
     * Hex colors with transparency weren't playing nice with ie11,
    converted to rgba
     * Padding-inline wasn't working in ie11, switch to padding-left
     * Duration validation updated to actually force durations rounded to
    the half hour
     * Goal multiselect only displays "x goals selected" if there is no user
    input
     * Objectives are only focused on mount instead of when the ref changes.
    Fixes a bug where focus switches back to the objective after switching
    off

commit 2b0ed3d
Merge: feb5da6 5956089
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Tue Mar 9 09:35:37 2021 -0600

    Merge branch 'main' into js-287-persist-goals-objectives

commit feb5da6
Merge: 718956c e7db658
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Mon Mar 8 11:57:19 2021 -0600

    Merge branch 'main' into js-287-persist-goals-objectives

commit 718956c
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Mon Mar 8 11:56:35 2021 -0600

    Handle report switching from grantee to non-grantee

commit cb1b865
Author: Josh Salisbury <josh@adhocteam.us>
Date:   Mon Mar 8 11:04:45 2021 -0600

    Objectives/Goals are persisted

     * When a report is saved the goals and objectives from the report are saved to
    the DB, udpated or created if needed
     * An ActivityReportObjective record is created for every objective
    associating the report to objective
     * Objectives that are no longer used in the report are removed from the
    DB, along with the ActivityReportObjective
     * If the goal hasn't been used on a previous report and is removed from
    the current report it is also removed
     * When a report is approved a GrantGoal record is created for every
    goal/grant pair
  • Loading branch information
dcmcand committed Mar 11, 2021
1 parent 3950b61 commit e6610ad
Show file tree
Hide file tree
Showing 53 changed files with 840 additions and 205 deletions.
27 changes: 24 additions & 3 deletions docs/logical_data_model.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Logical Data Model
==================

![logical data model diagram](http://www.plantuml.com/plantuml/png/nLTjRzis4FwkNy5lUm5Y31k60KLGDCtS8S2M1N7w0yxIHUP6yRZZAQsHvBzFD1FPjEI4jR3rIm8zz_xmZaU_ym8iRMCANu91zSFibv-BuXi5TwGhvPYM1XklFcbPAR2rmKgLJ9-ykaMKml-jhGE6HXbjKTOE5R6ig2XA0zwhZnvPtHTAVQywRs-Kje9r1vsUrcYHGR1w-tOZNddqGViYg7bXRUi4jz3WhYJWPsqNYhLez9q8c65z6XM2ptqBjoABbsspHDw5iG5jTW7HOl2DGjis8GurU8sr9dknKy2tF_tudRgUVvXVpo_FvmlbsgNHvImg-fckDhaRyF8xrTfsXg8Rz0ADsqXAnb3xcGmahQj698_FXCO8UPIc1FGk5YKvFCQ3KXNwahKJJRP79vLpXTnexxDBQZronZc4XkbFWOyyFHzuoZ3Ry1ciffxiFss7pPc9VGuRvCA79hjxGYthtSy6PKN9H74CyvwgTGfxHzRZ8VoSAkpnYOMI6Mk_brhsXfmkispICD4kgxEOJCvX1w_zMKjmVr6zPhF9Odg3_4PWyZXGoWj8wtUHuF2MzzIq_y3KB1fWyIj4kH6uCX0QQaba4EoaZEEnlPHstSaoI0yklXBfb_XP5e9kEv5f1L2AljEolaP7BA-dTPReFwTdIJ0PhW3Sh1sEJzp16iRxXi4APexS5B9Yf8Dn1flts8kvZWNbD4xK38Q3cOW8owyWk5Sescg8JYOcT776NNHCWIarkNR1wjWnd31HP6FMnxn1feLEXoydFAEdbilD4pHPer1LEknUC9Sac7HLRFG_Rw-0HPVQ1QQJMQZGw3lazH-3vLor_KQliDGDcAGRGt5zsoOGz9Lr0JLQ2PV7oDf7JgaSpeHZgXcQO3_sg1RW6kMAN6iscOxfC88dEo9m2IFxudYpZme4OZq3IKbMyBCa1K2D2udi_EN9Tb03jWCvFQcZtvC6l7oCZVP-_Hy_Hf_CfhVyjXcp-dwusDG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LzPrETg42hMw0jdyzkPohDjxe5PIgaJfXeoykqZQ1PAni5r21ONzuZ5pxG4ahHtR24jOa6sy_zgXcIJNm4cshkqp7T0YaGpCYi6b71k9mieyAMFfyHYGb6ePRJWgGDQmuTEUhGxE36cbs8AMJElezgQNZBu5e7xV_ysDqyhPzNdy5pusCPJlm90YfiM8DiQTlmh2MX3UgWYh11rHxyz-iSc_9yYeSNjZYY1lxi6Csc9Xux6NOBQBoP0AawP-ZrdAD91dfjVfrwA9vaptfUzwzLjh7xCEUjECIlchk-1WrmqFCS0BV_Ep4_Vq9tebmU0Na0KzExkzwN_f5zy4yWWUhCG7ggD-zwulkhtYuxo3V_IBiIrIBBwx2_tc21fUpcV3_Uox7eH0qUXiW8R2lF8PuB2N1qYbv9_jtCxJkMPKHV_5ZvSLOIItxHA6z0t4GXJ57rXJx-1xwdg-OYXDE3KJfpqGdkHN2VBnyNDnxZkxL-G2cQXlzBm00" alt="logical data model diagram">

UML Source
----------

```
@startuml
scale 0.75
scale 0.70
' avoid problems with angled crows feet
skinparam linetype ortho
Expand Down Expand Up @@ -170,6 +170,16 @@ class ActivityReport {
* updatedAt : timestamp
}
class Objective {
* id : integer <<generated>>
* goalId : integer(32) REFERENCES public.Goal.id
title : string,
ttaProvided : string,
status : string,
* createdAt : timestamp
* updatedAt : timestamp
}
class ActivityParticipant {
* id : integer <<generated>>
* activityReportId : integer(32) REFERENCES public.ActivityReport.id
Expand All @@ -191,6 +201,14 @@ class ActivityReportGoal {
* goalId : integer(32) REFERENCES public.Goal.id
}
class ActivityReportObjective {
* id : integer <<generated>>
* activityReportId : integer(32) REFERENCES public.ActivityReport.id
* objectiveId : integer(32) REFERENCES public.Objective.id
* createdAt : timestamp
* updatedAt : timestamp
}
User ||-o{ Region
User }o--|{ Permission
Scope }o--|{ Permission
Expand All @@ -211,6 +229,9 @@ ActivityReport .. NextSteps
ActivityReport .. ActivityReportGoal
Goal .. ActivityReportGoal
Goal }|--|{ ActivityReport
Goal ||-o{ Objective
ActivityReportObjective }o--|{ Objective
ActivityReportObjective }o--|{ ActivityReport
User ||-o{ ActivityReport
ActivityReport ||-o{ ActivityParticipant
Expand All @@ -222,7 +243,7 @@ NonGrantee ||-{ ActivityParticipant
Instructions
------------

1. [Edit this diagram with plantuml.com](http://www.plantuml.com/plantuml/uml/nLTjRzis4FwkNy5lUm5Y31k60KLGDCtS8S2M1N7w0yxIHUP6yRZZAQsHvBzFD1FPjEI4jR3rIm8zz_xmZaU_ym8iRMCANu91zSFibv-BuXi5TwGhvPYM1XklFcbPAR2rmKgLJ9-ykaMKml-jhGE6HXbjKTOE5R6ig2XA0zwhZnvPtHTAVQywRs-Kje9r1vsUrcYHGR1w-tOZNddqGViYg7bXRUi4jz3WhYJWPsqNYhLez9q8c65z6XM2ptqBjoABbsspHDw5iG5jTW7HOl2DGjis8GurU8sr9dknKy2tF_tudRgUVvXVpo_FvmlbsgNHvImg-fckDhaRyF8xrTfsXg8Rz0ADsqXAnb3xcGmahQj698_FXCO8UPIc1FGk5YKvFCQ3KXNwahKJJRP79vLpXTnexxDBQZronZc4XkbFWOyyFHzuoZ3Ry1ciffxiFss7pPc9VGuRvCA79hjxGYthtSy6PKN9H74CyvwgTGfxHzRZ8VoSAkpnYOMI6Mk_brhsXfmkispICD4kgxEOJCvX1w_zMKjmVr6zPhF9Odg3_4PWyZXGoWj8wtUHuF2MzzIq_y3KB1fWyIj4kH6uCX0QQaba4EoaZEEnlPHstSaoI0yklXBfb_XP5e9kEv5f1L2AljEolaP7BA-dTPReFwTdIJ0PhW3Sh1sEJzp16iRxXi4APexS5B9Yf8Dn1flts8kvZWNbD4xK38Q3cOW8owyWk5Sescg8JYOcT776NNHCWIarkNR1wjWnd31HP6FMnxn1feLEXoydFAEdbilD4pHPer1LEknUC9Sac7HLRFG_Rw-0HPVQ1QQJMQZGw3lazH-3vLor_KQliDGDcAGRGt5zsoOGz9Lr0JLQ2PV7oDf7JgaSpeHZgXcQO3_sg1RW6kMAN6iscOxfC88dE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8KxGz8OZE-4Hujybmw1GCDK8EhKndiLvPz711QQjoRNpLWUluVIDGXEoFl8DCY5qkdmvuGaSjbHsJz3a6fLLfLYXaNg130ch0j4_NoybiIgLzPrETg42hMw0jdyzkPohDjxe5PIgaJfXeoykqZQ1PAni5r21ONzuZ5pxG4ahHtR24jOa6sy_zgXcIJNm4cshkqp7T0YaGpCYi6b71k9mieyAMFfyHYGb6ePRJWgGDQmuTEUhGxE36cbs8AMJElezgQNZBu5e7xV_ysDqyhPzNdy5pusCPJlm90YfiM8DiQTlmh2MX3UgWYh11rHxyz-iSc_9yYeSNjZYY1lxi6Csc9Xux6NOBQBoP0AawP-ZrdAD91dfjVfrwA9vaptfUzwzLjh7xCEUjECIlchk-1WrmqFCS0BV_Ep4_Vq9tebmU0Na0KzExkzwN_f5zy4yWWUhCG7ggD-zwulkhtYuxo3V_IBiIrIBBwx2_tc21fUpcV3_Uox7eH0qUXiW8R2lF8PuB2N1qYbv9_jtCxJkMPKHV_5ZvSLOIItxHA6z0t4GXJ57rXJx-1xwdg-OYXDE3KJfpqGdkHN2VBnyNDnxZkxL-G2cQXlzBm00)
2. Copy and paste the final UML into the UML Source section
3. Update the img src and edit link target to the current values

Expand Down
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@fortawesome/free-solid-svg-icons": "^5.15.1",
"@fortawesome/react-fontawesome": "^0.1.11",
"@hookform/error-message": "^0.0.5",
"@trussworks/react-uswds": "^1.12.2",
"@trussworks/react-uswds": "1.11.0",
"@use-it/interval": "^1.0.0",
"http-proxy-middleware": "^1.0.5",
"lodash": "^4.17.20",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import React, { useState } from 'react';
import PropTypes from 'prop-types';
import { SingleDatePicker } from 'react-dates';
import { OPEN_UP, OPEN_DOWN } from 'react-dates/constants';
import { Controller } from 'react-hook-form';
import { Controller } from 'react-hook-form/dist/index.ie11';
import moment from 'moment';

import './DatePicker.css';
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/FormItem.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useFormContext } from 'react-hook-form';
import { useFormContext } from 'react-hook-form/dist/index.ie11';
import { ErrorMessage as ReactHookFormError } from '@hookform/error-message';
import {
Label, FormGroup, ErrorMessage, Fieldset,
Expand Down
80 changes: 42 additions & 38 deletions frontend/src/components/MultiSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import Select, { components } from 'react-select';
import { Controller } from 'react-hook-form';
import { Controller } from 'react-hook-form/dist/index.ie11';

import arrowBoth from '../images/arrow-both.svg';

Expand All @@ -34,43 +34,6 @@ const DropdownIndicator = (props) => (
</components.DropdownIndicator>
);

const styles = {
container: (provided, state) => {
// To match the focus indicator provided by uswds
const outline = state.isFocused ? '0.25rem solid #2491ff;' : '';
return {
...provided,
outline,
};
},
groupHeading: (provided) => ({
...provided,
fontWeight: 'bold',
fontFamily: 'SourceSansPro',
textTransform: 'capitalize',
fontSize: '14px',
color: '#21272d',
lineHeight: '22px',
}),
control: (provided, state) => ({
...provided,
borderColor: '#565c65',
backgroundColor: 'white',
borderRadius: '0',
'&:hover': {
borderColor: '#565c65',
},
// Match uswds disabled style
opacity: state.isDisabled ? '0.7' : '1',
}),
indicatorsContainer: (provided) => ({
...provided,
// The arrow dropdown icon is too far to the right, this pushes it back to the left
marginRight: '4px',
}),
indicatorSeparator: () => ({ display: 'none' }),
};

function MultiSelect({
name,
options,
Expand All @@ -83,8 +46,47 @@ function MultiSelect({
rules,
multiSelectOptions,
onItemSelected,
singleRowInput,
components: componentReplacements,
}) {
const styles = {
container: (provided, state) => {
// To match the focus indicator provided by uswds
const outline = state.isFocused ? '0.25rem solid #2491ff;' : '';
return {
...provided,
outline,
};
},
groupHeading: (provided) => ({
...provided,
fontWeight: 'bold',
fontFamily: 'SourceSansPro',
textTransform: 'capitalize',
fontSize: '14px',
color: '#21272d',
lineHeight: '22px',
}),
control: (provided, state) => ({
height: singleRowInput ? '38px' : '',
...provided,
borderColor: '#565c65',
backgroundColor: 'white',
borderRadius: '0',
'&:hover': {
borderColor: '#565c65',
},
// Match uswds disabled style
opacity: state.isDisabled ? '0.7' : '1',
}),
indicatorsContainer: (provided) => ({
...provided,
// The arrow dropdown icon is too far to the right, this pushes it back to the left
marginRight: '4px',
}),
indicatorSeparator: () => ({ display: 'none' }),
};

/*
* @param {Array<string> || Array<object>} - value array. Either an array of strings or array
* of objects
Expand Down Expand Up @@ -196,6 +198,7 @@ MultiSelect.propTypes = {
control: PropTypes.object.isRequired,
components: PropTypes.shape({}),
onItemSelected: PropTypes.func,
singleRowInput: PropTypes.bool,
multiSelectOptions: PropTypes.shape({
isClearable: PropTypes.bool,
closeMenuOnSelect: PropTypes.bool,
Expand All @@ -209,6 +212,7 @@ MultiSelect.propTypes = {

MultiSelect.defaultProps = {
disabled: false,
singleRowInput: false,
required: 'Please select at least one item',
simple: true,
labelProperty: 'label',
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Navigator/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
render, screen, waitFor, within,
} from '@testing-library/react';

import { useFormContext } from 'react-hook-form';
import { useFormContext } from 'react-hook-form/dist/index.ie11';
import Navigator from '../index';
import { NOT_STARTED } from '../constants';

Expand Down
32 changes: 16 additions & 16 deletions frontend/src/components/Navigator/components/SideNav.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.smart-hub--navigator-link-active {
background-color: #f8f8f8;
color: #0166ab;
background-color: rgb(248, 248, 248);
color: rgb(1, 102, 171);
font-weight: bold;
border-left: 2px solid #0166ab;
border-left: 2px solid rgb(1, 102, 171);
text-decoration-line: none;
}

Expand All @@ -13,45 +13,45 @@
width: 100%;
height: 100%;
font-size: 16px;
color: #12549d;
color: rgb(18, 84, 157);
line-height: 24px;
}

.smart-hub--navigator-list {
list-style-type: none;
padding-inline-start: 0;
padding-left: 0;
margin: 0;
}

.smart-hub--navigator-item {
width: 100%;
height: 40px;
color: #0166ab;
color: rgb(1, 102, 171);
}

.smart-hub--tag-not-started {
background-color: #eceef1;
color: #21272dc1;
color: rgba(33, 39, 45, 0.76);
}

.smart-hub--tag-in-progress {
background-color: #e2eff7;
color: #0166ab;
background-color: rgb(226, 239, 247);
color: rgb(1, 102, 171);
}

.smart-hub--tag-complete {
background-color: #e6faedb0;
color: #3a7e5a;
background-color: rgba(230, 250, 237, 0.69);
color: rgb(58, 126, 90);
}

.smart-hub--tag-submitted {
background-color: #0166ab;
color: #f8f8f8;
background-color: rgb(1, 102, 171);
color: rgb(248, 248, 248);
}

.smart-hub--tag-needs-action {
background-color: #f9e0e4;
color: #d42240;
background-color: rgb(249, 224, 228);
color: rgb(212, 34, 64);
}

.smart-hub--tag {
Expand All @@ -67,7 +67,7 @@
font-family: Source Sans Pro Web, Helvetica Neue, Helvetica, Roboto, Arial, sans-serif;
font-size: 1.06rem;
line-height: 1.5;
color: #005ea2;
color: rgb(0, 94, 162);
text-decoration: underline;
background: transparent;
left: 0;
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Navigator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
import React, { useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import { FormProvider, useForm } from 'react-hook-form';
import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11';
import {
Form,
Button,
Expand Down Expand Up @@ -46,14 +46,14 @@ function Navigator({
const [errorMessage, updateErrorMessage] = useState();
const [lastSaveTime, updateLastSaveTime] = useState(initialLastUpdated);
const [showValidationErrors, updateShowValidationErrors] = useState(false);
const { pageState } = formData;
const page = pages.find((p) => p.path === currentPage);

const hookForm = useForm({
mode: 'onChange',
defaultValues: formData,
shouldUnregister: false,
});
const pageState = hookForm.watch('pageState');

const {
formState,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
render, screen, fireEvent, waitFor,
} from '@testing-library/react';

import { useForm } from 'react-hook-form';
import { useForm } from 'react-hook-form/dist/index.ie11';
import DatePicker from '../DatePicker';

// react-dates when opening the calendar in these tests. For details see
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/__tests__/MutliSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import { render, screen } from '@testing-library/react';
import selectEvent from 'react-select-event';
import { act } from 'react-dom/test-utils';
import { useForm } from 'react-hook-form';
import { useForm } from 'react-hook-form/dist/index.ie11';
import userEvent from '@testing-library/user-event';
import { Label } from '@trussworks/react-uswds';

Expand Down
4 changes: 4 additions & 0 deletions frontend/src/fetchers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ export class HTTPError extends Error {
export const get = async (url) => {
const res = await fetch(url, {
credentials: 'same-origin',
headers: {
'Cache-Control': 'no-cache',
Pragma: 'no-cache',
},
});
if (!res.ok) {
throw new HTTPError(res.status, res.statusText);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useFormContext } from 'react-hook-form';
import { useFormContext } from 'react-hook-form/dist/index.ie11';
import _ from 'lodash';
import {
Dropdown, Form, Label, Fieldset, Textarea, Alert, Button,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import '@testing-library/jest-dom';
import { render, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
import { FormProvider, useForm } from 'react-hook-form';
import { FormProvider, useForm } from 'react-hook-form/dist/index.ie11';
import Approver from '../index';
import { REPORT_STATUSES } from '../../../../../../Constants';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import { useFormContext } from 'react-hook-form';
import { useFormContext } from 'react-hook-form/dist/index.ie11';

const ReviewItem = ({ label, name, path }) => {
const { watch } = useFormContext();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import { some } from 'lodash';
import { useFormContext } from 'react-hook-form';
import { useFormContext } from 'react-hook-form/dist/index.ie11';

import Section from './ReviewSection';
import ReviewItem from './ReviewItem';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useFormContext } from 'react-hook-form';
import { useFormContext } from 'react-hook-form/dist/index.ie11';
import {
Dropdown, Form, Fieldset, Textarea, Button,
} from '@trussworks/react-uswds';
Expand Down

0 comments on commit e6610ad

Please sign in to comment.