From d18ec887753ccf002e335158d5acfddc4deac68a Mon Sep 17 00:00:00 2001 From: Kris Koskelin Date: Tue, 11 Dec 2018 15:02:37 -0600 Subject: [PATCH 1/6] Respondent Dashboard --- .../computeds/formattedCaseDetail.js | 2 + .../src/presenter/sequences/gotoDashboard.js | 10 +++- web-client/src/styles/overrides.scss | 3 ++ web-client/src/views/DashboardRespondent.jsx | 51 ++++++++++++++++++- 4 files changed, 63 insertions(+), 3 deletions(-) diff --git a/web-client/src/presenter/computeds/formattedCaseDetail.js b/web-client/src/presenter/computeds/formattedCaseDetail.js index c358ba1add9..3517b2a0a6a 100644 --- a/web-client/src/presenter/computeds/formattedCaseDetail.js +++ b/web-client/src/presenter/computeds/formattedCaseDetail.js @@ -12,6 +12,7 @@ const formatCase = (caseDetail, form) => { if (result.documents) result.documents.map(formatDocument); + result.createdAtFormatted = moment(result.createdAt).format('L'); result.irsDateFormatted = moment(result.irsDate).format('L LT'); result.payGovDateFormatted = moment(result.payGovDate).format('L'); @@ -19,6 +20,7 @@ const formatCase = (caseDetail, form) => { result.showIrsServedDate = !!result.irsSendDate; result.showPayGovIdInput = form.paymentType == 'payGov'; result.showPaymentOptions = !(caseDetail.payGovId && !form.paymentType); + result.showActionRequired = !caseDetail.payGovId; result.showPaymentRecord = result.payGovId && !form.paymentType; result.datePetitionSentToIrsMessage = `Respondent served ${ result.irsDateFormatted diff --git a/web-client/src/presenter/sequences/gotoDashboard.js b/web-client/src/presenter/sequences/gotoDashboard.js index 3401408e0f9..6d738a8f4e6 100644 --- a/web-client/src/presenter/sequences/gotoDashboard.js +++ b/web-client/src/presenter/sequences/gotoDashboard.js @@ -31,7 +31,15 @@ const goToDashboard = [ setCurrentPage('DashboardPetitionsClerk'), ], intakeclerk: [clearAlerts, setCurrentPage('DashboardIntakeClerk')], - respondent: [clearAlerts, setCurrentPage('DashboardRespondent')], + respondent: [ + clearAlerts, + getCasesByUser, + { + error: [setAlertError], + success: [setCases], + }, + setCurrentPage('DashboardRespondent'), + ], }, ]; diff --git a/web-client/src/styles/overrides.scss b/web-client/src/styles/overrides.scss index 1e1d6742717..1b86369a4df 100644 --- a/web-client/src/styles/overrides.scss +++ b/web-client/src/styles/overrides.scss @@ -1,6 +1,9 @@ input[type='file'] { height: auto; } +.usa-header .usa-nav-secondary .usa-search { + margin-top: -0.6rem; +} input[type='text'] { margin: 0 0 2rem; diff --git a/web-client/src/views/DashboardRespondent.jsx b/web-client/src/views/DashboardRespondent.jsx index 72cd3aa5438..674b76c16a7 100644 --- a/web-client/src/views/DashboardRespondent.jsx +++ b/web-client/src/views/DashboardRespondent.jsx @@ -1,17 +1,64 @@ import { connect } from '@cerebral/react'; import React from 'react'; +import { state } from 'cerebral'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import SuccessNotification from './SuccessNotification'; import ErrorNotification from './ErrorNotification'; export default connect( - {}, - function Dashboard() { + { caseList: state.formattedCases }, + function Dashboard({ caseList }) { return (

Respondent Dashboard

+

Cases

+ + + + + + + + + + + {!caseList.length && ( + + + + )} + {caseList.map(item => ( + + + + + + + ))} + +
Docket numberPetitioner nameDate filedNotifications
(none)
+ Docket number + + {item.docketNumber} + + + Petitioner name + {item.userId} + + Date filed + {item.createdAtFormatted} + + Notification + {item.showActionRequired && ( + + {' '} + Action Required + + )} +
); }, From 1c527dd957d487574c70cb14ce3893a1302cf322 Mon Sep 17 00:00:00 2001 From: Kris Koskelin Date: Tue, 11 Dec 2018 15:08:47 -0600 Subject: [PATCH 2/6] Addressing css linting --- web-client/src/styles/overrides.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/web-client/src/styles/overrides.scss b/web-client/src/styles/overrides.scss index 1b86369a4df..73bc1d27b04 100644 --- a/web-client/src/styles/overrides.scss +++ b/web-client/src/styles/overrides.scss @@ -1,6 +1,7 @@ input[type='file'] { height: auto; } + .usa-header .usa-nav-secondary .usa-search { margin-top: -0.6rem; } From 76f9a22938c2498933beb3f4f89b7cbc55b08b91 Mon Sep 17 00:00:00 2001 From: Kris Koskelin Date: Tue, 11 Dec 2018 15:49:49 -0600 Subject: [PATCH 3/6] Updating color via css preferences --- web-client/src/styles/custom.scss | 3 +++ web-client/src/views/CaseDetailPetitioner.jsx | 2 +- web-client/src/views/DashboardRespondent.jsx | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/web-client/src/styles/custom.scss b/web-client/src/styles/custom.scss index 13ab603c668..f993177f336 100644 --- a/web-client/src/styles/custom.scss +++ b/web-client/src/styles/custom.scss @@ -24,6 +24,9 @@ margin-right: 0.5rem; color: $color-blue; } +.action-flag { + color: $color-red; +} .label { margin-bottom: 0; diff --git a/web-client/src/views/CaseDetailPetitioner.jsx b/web-client/src/views/CaseDetailPetitioner.jsx index 99dac224972..2b551900c5f 100644 --- a/web-client/src/views/CaseDetailPetitioner.jsx +++ b/web-client/src/views/CaseDetailPetitioner.jsx @@ -88,7 +88,7 @@ export default connect( {' '} Pay $60.00 filing fee. diff --git a/web-client/src/views/DashboardRespondent.jsx b/web-client/src/views/DashboardRespondent.jsx index 674b76c16a7..4c9558ae80b 100644 --- a/web-client/src/views/DashboardRespondent.jsx +++ b/web-client/src/views/DashboardRespondent.jsx @@ -50,7 +50,7 @@ export default connect( Notification {item.showActionRequired && ( - {' '} + {' '} Action Required )} From 578cc342eea142c63d9d0f02e141e5f1c57f0308 Mon Sep 17 00:00:00 2001 From: Kris Koskelin Date: Tue, 11 Dec 2018 15:54:35 -0600 Subject: [PATCH 4/6] lint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit it’s in my pocket --- web-client/src/styles/custom.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/web-client/src/styles/custom.scss b/web-client/src/styles/custom.scss index f993177f336..cb45d49647c 100644 --- a/web-client/src/styles/custom.scss +++ b/web-client/src/styles/custom.scss @@ -24,6 +24,7 @@ margin-right: 0.5rem; color: $color-blue; } + .action-flag { color: $color-red; } From 700902014fc1b6516e949e17f101d8973a4a400c Mon Sep 17 00:00:00 2001 From: Kris Koskelin Date: Tue, 11 Dec 2018 16:40:03 -0600 Subject: [PATCH 5/6] Additional pa11y checks --- web-client/pa11y-ci.config.json | 11 ++++++++++- web-client/src/views/CaseDetailRespondent.jsx | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/web-client/pa11y-ci.config.json b/web-client/pa11y-ci.config.json index 44b3ef8cc6e..6c4f01ca0da 100644 --- a/web-client/pa11y-ci.config.json +++ b/web-client/pa11y-ci.config.json @@ -23,6 +23,15 @@ "http://localhost:1234/log-in?token=intakeclerk&path=/", "http://localhost:1234/log-in?token=intakeclerk&path=/case-detail/101-18", "http://localhost:1234/log-in?token=respondent&path=/", - "http://localhost:1234/log-in?token=respondent&path=/case-detail/101-18" + "http://localhost:1234/log-in?token=respondent&path=/case-detail/101-18", + { + "url": "http://localhost:1234/log-in?token=respondent&path=/case-detail/101-18", + "actions": [ + "wait for #button-file-document to be visible", + "click element #button-file-document", + "wait for #file-a-document to be visible" + ], + "timeout": 5000 + } ] } diff --git a/web-client/src/views/CaseDetailRespondent.jsx b/web-client/src/views/CaseDetailRespondent.jsx index c3bd4729006..d8b4031052d 100644 --- a/web-client/src/views/CaseDetailRespondent.jsx +++ b/web-client/src/views/CaseDetailRespondent.jsx @@ -74,6 +74,7 @@ export default connect( {currentTab == 'Docket Record' && (