Skip to content

Commit

Permalink
Business Line | Update Copy For Completed Tab (#15116)
Browse files Browse the repository at this point in the history
* copy text updated

* copy text showing

* added spacing to copy

* circleci fixes

* lint fixes

* lint fix

* spec test and updated copy text

* fixed spec spacing

* more spec spacing changes

* requested changes

* delete dump file
  • Loading branch information
wdrougas-tista authored Sep 4, 2020
1 parent 909a27c commit 962a860
Show file tree
Hide file tree
Showing 7 changed files with 115 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/COPY.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"USER_QUEUE_PAGE_TABLE_TITLE": "Your cases",
"USER_QUEUE_PAGE_ASSIGNED_TASKS_DESCRIPTION": "Cases assigned to you:",
"USER_QUEUE_PAGE_ON_HOLD_TASKS_DESCRIPTION": "Cases on hold (will return to \"Assigned\" tab when hold is completed):",
"QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION": "Cases completed (last two weeks):",
"QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION": "Cases completed (last 7 days):",

"ORGANIZATIONAL_QUEUE_PAGE_UNASSIGNED_TAB_TITLE": "Unassigned (%d)",
"ORGANIZATIONAL_QUEUE_PAGE_UNASSIGNED_TASKS_DESCRIPTION": "Cases owned by the %s team that are unassigned to a person.",
Expand Down
19 changes: 18 additions & 1 deletion client/app/nonComp/components/NonCompTabs.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from 'react';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';

import SearchBar from '../../components/SearchBar';
import TabWindow from '../../components/TabWindow';
import { TaskTableUnconnected } from '../../queue/components/TaskTable';
import { claimantColumn, veteranParticipantIdColumn, decisionReviewTypeColumn } from './TaskTableColumns';
import COPY from '../../../COPY';

class NonCompTabsUnconnected extends React.PureComponent {
render = () => {
Expand All @@ -19,6 +21,7 @@ class NonCompTabsUnconnected extends React.PureComponent {
label: 'Completed tasks',
page: <TaskTableTab
key="completed"
description={COPY.QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION}
predefinedColumns={{ includeCompletedDate: true,
defaultSortIdx: 3 }}
tasks={this.props.completedTasks} />
Expand All @@ -32,6 +35,13 @@ class NonCompTabsUnconnected extends React.PureComponent {
}
}

NonCompTabsUnconnected.propTypes = {
completedTasks: PropTypes.array,
currentTab: PropTypes.node,
dispatch: PropTypes.func,
inProgressTasks: PropTypes.array,
};

class TaskTableTab extends React.PureComponent {
constructor(props) {
super(props);
Expand All @@ -40,7 +50,7 @@ class TaskTableTab extends React.PureComponent {
allTasks: this.props.tasks,
predefinedColumns: this.props.predefinedColumns,
shownTasks: this.props.tasks,
searchText: ''
searchText: '',
};
}

Expand All @@ -63,6 +73,7 @@ class TaskTableTab extends React.PureComponent {

render = () => {
return <React.Fragment>
{this.props.description && <div className="cf-noncomp-queue-completed-task">{this.props.description}</div>}
<div className="cf-search-ahead-parent cf-push-right cf-noncomp-search">
<SearchBar
id="searchBar"
Expand All @@ -88,6 +99,12 @@ class TaskTableTab extends React.PureComponent {
}
}

TaskTableTab.propTypes = {
description: PropTypes.node,
predefinedColumns: PropTypes.object,
tasks: PropTypes.array,
};

const NonCompTabs = connect(
(state) => ({
inProgressTasks: state.inProgressTasks,
Expand Down
4 changes: 4 additions & 0 deletions client/app/styles/_noncomp.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
margin-bottom: 20px;
}

.cf-noncomp-queue-completed-task {
margin-bottom: 20px;
}

.cf-decisions {
.cf-decision {
.cf-decision-details {
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
],
"dependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/core": "^7.11.4",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-decorators": "^7.8.3",
"@babel/plugin-proposal-do-expressions": "^7.8.3",
Expand Down
2 changes: 1 addition & 1 deletion client/test/karma/queue/ColocatedTaskListView-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ describe.only('ColocatedTaskListView', () => {
name: 'readerLinkColumn'
}
],
description: 'Cases completed (last two weeks):',
description: 'Cases completed (last 7 days):',
label: 'Completed',
name: 'completed_person',
task_page_count: 0,
Expand Down
80 changes: 80 additions & 0 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,28 @@
semver "^5.4.1"
source-map "^0.5.0"

"@babel/core@^7.11.4":
version "7.11.4"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.11.4.tgz#4301dfdfafa01eeb97f1896c5501a3f0655d4229"
integrity sha512-5deljj5HlqRXN+5oJTY7Zs37iH3z3b++KjiKtIsJy1NrjOOVSEaJHEetLBhyu0aQOSNNZ/0IuEAan9GzRuDXHg==
dependencies:
"@babel/code-frame" "^7.10.4"
"@babel/generator" "^7.11.4"
"@babel/helper-module-transforms" "^7.11.0"
"@babel/helpers" "^7.10.4"
"@babel/parser" "^7.11.4"
"@babel/template" "^7.10.4"
"@babel/traverse" "^7.11.0"
"@babel/types" "^7.11.0"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.1"
json5 "^2.1.2"
lodash "^4.17.19"
resolve "^1.3.2"
semver "^5.4.1"
source-map "^0.5.0"

"@babel/core@^7.9.0":
version "7.9.0"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.9.0.tgz#ac977b538b77e132ff706f3b8a4dbad09c03c56e"
Expand Down Expand Up @@ -125,6 +147,15 @@
jsesc "^2.5.1"
source-map "^0.5.0"

"@babel/generator@^7.11.0", "@babel/generator@^7.11.4":
version "7.11.4"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.11.4.tgz#1ec7eec00defba5d6f83e50e3ee72ae2fee482be"
integrity sha512-Rn26vueFx0eOoz7iifCN2UHT6rGtnkSGWSoDRIy8jZN3B91PzeSULbswfLoOWuTuAcNwpG/mxy+uCTDnZ9Mp1g==
dependencies:
"@babel/types" "^7.11.0"
jsesc "^2.5.1"
source-map "^0.5.0"

"@babel/generator@^7.9.0":
version "7.9.4"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.9.4.tgz#12441e90c3b3c4159cdecf312075bf1a8ce2dbce"
Expand Down Expand Up @@ -377,6 +408,19 @@
"@babel/types" "^7.10.5"
lodash "^4.17.19"

"@babel/helper-module-transforms@^7.11.0":
version "7.11.0"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.11.0.tgz#b16f250229e47211abdd84b34b64737c2ab2d359"
integrity sha512-02EVu8COMuTRO1TAzdMtpBPbe6aQ1w/8fePD2YgQmxZU4gpNWaL9gK3Jp7dxlkUlUCJOTaSeA+Hrm1BRQwqIhg==
dependencies:
"@babel/helper-module-imports" "^7.10.4"
"@babel/helper-replace-supers" "^7.10.4"
"@babel/helper-simple-access" "^7.10.4"
"@babel/helper-split-export-declaration" "^7.11.0"
"@babel/template" "^7.10.4"
"@babel/types" "^7.11.0"
lodash "^4.17.19"

"@babel/helper-module-transforms@^7.9.0":
version "7.9.0"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz#43b34dfe15961918707d247327431388e9fe96e5"
Expand Down Expand Up @@ -486,6 +530,13 @@
dependencies:
"@babel/types" "^7.10.4"

"@babel/helper-split-export-declaration@^7.11.0":
version "7.11.0"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz#f8a491244acf6a676158ac42072911ba83ad099f"
integrity sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==
dependencies:
"@babel/types" "^7.11.0"

"@babel/helper-split-export-declaration@^7.8.3":
version "7.8.3"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz#31a9f30070f91368a7182cf05f831781065fc7a9"
Expand Down Expand Up @@ -555,6 +606,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.10.5.tgz#e7c6bf5a7deff957cec9f04b551e2762909d826b"
integrity sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==

"@babel/parser@^7.11.0", "@babel/parser@^7.11.4":
version "7.11.4"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.11.4.tgz#6fa1a118b8b0d80d0267b719213dc947e88cc0ca"
integrity sha512-MggwidiH+E9j5Sh8pbrX5sJvMcsqS5o+7iB42M9/k0CD63MjYbdP4nhSh7uB5wnv2/RVzTZFTxzF/kIa5mrCqA==

"@babel/parser@^7.7.0":
version "7.7.5"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.7.5.tgz#cbf45321619ac12d83363fcf9c94bb67fa646d71"
Expand Down Expand Up @@ -1923,6 +1979,21 @@
globals "^11.1.0"
lodash "^4.17.19"

"@babel/traverse@^7.11.0":
version "7.11.0"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.11.0.tgz#9b996ce1b98f53f7c3e4175115605d56ed07dd24"
integrity sha512-ZB2V+LskoWKNpMq6E5UUCrjtDUh5IOTAyIl0dTjIEoXum/iKWkoIEKIRDnUucO6f+2FzNkE0oD4RLKoPIufDtg==
dependencies:
"@babel/code-frame" "^7.10.4"
"@babel/generator" "^7.11.0"
"@babel/helper-function-name" "^7.10.4"
"@babel/helper-split-export-declaration" "^7.11.0"
"@babel/parser" "^7.11.0"
"@babel/types" "^7.11.0"
debug "^4.1.0"
globals "^11.1.0"
lodash "^4.17.19"

"@babel/traverse@^7.7.0", "@babel/traverse@^7.8.3", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0":
version "7.9.0"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.9.0.tgz#d3882c2830e513f4fe4cec9fe76ea1cc78747892"
Expand Down Expand Up @@ -1956,6 +2027,15 @@
lodash "^4.17.19"
to-fast-properties "^2.0.0"

"@babel/types@^7.11.0":
version "7.11.0"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.11.0.tgz#2ae6bf1ba9ae8c3c43824e5861269871b206e90d"
integrity sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==
dependencies:
"@babel/helper-validator-identifier" "^7.10.4"
lodash "^4.17.19"
to-fast-properties "^2.0.0"

"@babel/types@^7.7.0":
version "7.7.2"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.2.tgz#550b82e5571dcd174af576e23f0adba7ffc683f7"
Expand Down
10 changes: 10 additions & 0 deletions spec/models/queue_tabs/organization_completed_tasks_tab_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
end
end

describe ".description" do
subject { tab.description }

context "when we want to show the amount of cases completed in the last 7 days" do
it "has the correct description for each tab" do
expect(subject).to eq(COPY::QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION)
end
end
end

describe ".tasks" do
subject { tab.tasks }

Expand Down

0 comments on commit 962a860

Please sign in to comment.