Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tylerb/appeals 56610: Updates to 56610 #23344

Merged
merged 28 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4904fe6
Initial commit that alters the business line logic to accept a date f…
TylerBroyles Oct 7, 2024
bb81840
Added new tests for the tasksClosedAt filter to the business line spe…
TylerBroyles Oct 8, 2024
e1c84ce
Rewrote a bit more of the business line spec to speed it up via one t…
TylerBroyles Oct 8, 2024
54b9fe8
Updated the vha business line spec file. Fixed a code climate warning.
TylerBroyles Oct 8, 2024
c6e92e3
Removed some commented out code and changed the database cleaner to T…
TylerBroyles Oct 8, 2024
417c4db
Merged in feature branch changes.
TylerBroyles Oct 9, 2024
3155ebc
Merge branch 'feature/APPEALS-53424' into TYLERB/APPEALS-56610
TylerBroyles Oct 9, 2024
a091395
Removed QueueTable code that was unrelated to the DatePicker that was…
TylerBroyles Oct 10, 2024
f4b22cc
Updated the wording in the filter summary for the closedAt filter to …
TylerBroyles Oct 10, 2024
a81a22c
Fixed a bug where the filter preservation was not working with the wa…
TylerBroyles Oct 10, 2024
fce21a7
Updated the formatting of the date in the completed tasks tab descrip…
TylerBroyles Oct 11, 2024
2d21542
Merge in feature branch changes.
TylerBroyles Oct 22, 2024
8a862dd
Updated the expected values from the DatePicker to match what was in …
TylerBroyles Oct 22, 2024
528221b
Updated the aria label in the new column.
TylerBroyles Oct 22, 2024
f7cc3c6
Fixed failing tests related to the completed date column, completed t…
TylerBroyles Oct 22, 2024
ed56d30
Changed single quotes to double quotes in ruby.
TylerBroyles Oct 22, 2024
0b59585
Fixed a few more test failures.
TylerBroyles Oct 22, 2024
5dda70a
Merge branch 'feature/APPEALS-53424' into TYLERB/APPEALS-56610
brandondorner Oct 23, 2024
c2c1ce8
Altered the date picker validation code to disable the button if no d…
TylerBroyles Oct 23, 2024
a3281eb
Merge branch 'TYLERB/APPEALS-56610' of https://github.com/department-…
TylerBroyles Oct 23, 2024
5c48b00
Updated the completed tasks tab description filtered by completed tex…
TylerBroyles Oct 23, 2024
8f9f74d
Merge branch 'feature/APPEALS-53424' into TYLERB/APPEALS-56610
TylerBroyles Oct 24, 2024
77465a5
Updated the Completed Cases text to contain no colon for the vha deci…
TylerBroyles Oct 24, 2024
3a944ae
Merge branch 'feature/APPEALS-53424' into TYLERB/APPEALS-56610
TylerBroyles Oct 24, 2024
5e2ac1a
Fixed a few jest tests.
TylerBroyles Oct 24, 2024
c1fe72d
Fixed a bug that could occur if you are trying to filter by a column …
TylerBroyles Oct 24, 2024
69655fc
Updated feature test with the new vha all completed cases description…
TylerBroyles Oct 25, 2024
e6f04e1
Fixed a text issue when swapping between business lines with the same…
TylerBroyles Oct 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/COPY.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
"ORGANIZATIONAL_QUEUE_PAGE_ASSIGNED_TAB_TITLE": "Assigned (%d)",
"ORGANIZATIONAL_QUEUE_PAGE_IN_PROGRESS_TAB_TITLE": "In Progress (%d)",
"ORGANIZATIONAL_QUEUE_ON_HOLD_TAB_TITLE": "On Hold (%d)",
"VHA_QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION": "Cases completed:",
"VHA_QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION": "Cases completed",
"VHA_QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION_WITH_FILTER": "Cases completed (%s)",
"EDUCATION_RPO_QUEUE_PAGE_COMPLETED_TASKS_DESCRIPTION": "Cases completed in the last 7 days:",
"VHA_ORGANIZATIONAL_QUEUE_PAGE_READY_FOR_REVIEW_TAB_TITLE": "Ready for Review",
Expand Down
22 changes: 17 additions & 5 deletions client/app/components/DatePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ class DatePicker extends React.PureComponent {
apply() {
const { onChange } = this.props;

if (this.state.mode === 'all') {
this.clearFilter();
this.hideDropdown();

return true;
}

if (onChange) {
onChange(`${this.state.mode },${ this.state.startDate },${ this.state.endDate}`);
}
Expand Down Expand Up @@ -225,6 +232,8 @@ class DatePicker extends React.PureComponent {
}
} else if (this.state.mode !== '') {
disabled = this.state.startDate === '';
} else if (this.state.mode === 'all') {
disabled = false;
}

return disabled;
Expand All @@ -243,19 +252,22 @@ class DatePicker extends React.PureComponent {
}

updateMode = (mode) => {
const format = 'YYYY-MM-DD';

this.setState({ mode });
if (mode !== 'between') {
this.setState({ endDate: '' });
}

if (mode === 'last7') {
this.setState({ startDate: moment().subtract(7, 'days') });
this.setState({ startDate: moment().subtract(7, 'days').
format(format) });
} else if (mode === 'last30') {
this.setState({ startDate: moment().subtract(30, 'days') });
this.setState({ startDate: moment().subtract(30, 'days').
format(format) });
} else if (mode === 'last365') {
this.setState({ startDate: moment().subtract(365, 'days') });
} else if (mode === 'all') {
this.setState({ startDate: moment().subtract(300, 'years') });
this.setState({ startDate: moment().subtract(365, 'days').
format(format) });
}
}

Expand Down
8 changes: 4 additions & 4 deletions client/app/nonComp/components/NonCompTabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ const NonCompTabsUnconnected = (props) => {
const buildCompletedTabDescriptionFromFilter = (filters) => {
const completedDateFilter = filters.find((value) => value.includes('col=completedDateColumn'));

if (completedDateFilter) {
if (!isVhaBusinessLine) {
return COPY.QUEUE_PAGE_COMPLETE_LAST_SEVEN_DAYS_TASKS_DESCRIPTION;
} else if (completedDateFilter) {
const match = completedDateFilter.match(/val=([^&]*)/);

if (match) {
Expand All @@ -78,11 +80,9 @@ const NonCompTabsUnconnected = (props) => {
completedDateFilterModeHandlers[mode]);
}

} else if (!isVhaBusinessLine) {
return COPY.QUEUE_PAGE_COMPLETE_LAST_SEVEN_DAYS_TASKS_DESCRIPTION;
}

return COPY.QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION;
return COPY.VHA_QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION;

};

Expand Down
2 changes: 1 addition & 1 deletion client/app/queue/QueueTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ export default class QueueTable extends React.PureComponent {
});
}

return filters;
return _.omit(filters, 'undefined');
};

defaultRowClassNames = () => '';
Expand Down
6 changes: 3 additions & 3 deletions client/test/app/components/DatePicker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ describe('DatePicker', () => {

clickSubmissionButton('Apply Filter');

expect(handleChange).toHaveBeenCalledWith('last7,Wed Jan 10 2024 02:00:00 GMT-0500,');
expect(handleChange).toHaveBeenCalledWith('last7,2024-01-10,');
});

it('quick select options can select last 30 days', async () => {
Expand All @@ -173,7 +173,7 @@ describe('DatePicker', () => {

clickSubmissionButton('Apply Filter');

expect(handleChange).toHaveBeenCalledWith('last30,Mon Dec 18 2023 02:00:00 GMT-0500,');
expect(handleChange).toHaveBeenCalledWith('last30,2023-12-18,');
});

it('quick select options can select last 365 days', async () => {
Expand All @@ -189,7 +189,7 @@ describe('DatePicker', () => {

clickSubmissionButton('Apply Filter');

expect(handleChange).toHaveBeenCalledWith('last365,Tue Jan 17 2023 02:00:00 GMT-0500,');
expect(handleChange).toHaveBeenCalledWith('last365,2023-01-17,');
});

it('disables Apply Filter button if between is selected and the start date is after the end date', () => {
Expand Down
2 changes: 1 addition & 1 deletion client/test/app/nonComp/NonCompTabs.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ describe('NonCompTabsVha', () => {

await waitFor(() => {
// expect(screen.getByText('Cases completed (last 7 days):')).toBeInTheDocument();
expect(screen.getByText('Cases completed:')).toBeInTheDocument();
expect(screen.getByText('Cases completed')).toBeInTheDocument();
});

// Check for the correct completed tasks header values
Expand Down
4 changes: 2 additions & 2 deletions spec/feature/non_comp/reviews_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@

# Verify the filter counts for the completed tab
click_on "Completed Tasks"
expect(page).to have_content(COPY::QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION)
expect(page).to have_content(COPY::VHA_QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION)
# Turn this back on after last 7 days prefilter is added
# expect(page).to have_content(COPY::QUEUE_PAGE_COMPLETE_LAST_SEVEN_DAYS_TASKS_DESCRIPTION)
find("[aria-label='Filter by issue type']").click
Expand Down Expand Up @@ -992,7 +992,7 @@
end

context "Completed Date filtering" do
it "is filterable by the completed date column" do

Check failure on line 995 in spec/feature/non_comp/reviews_spec.rb

View workflow job for this annotation

GitHub Actions / caseflow_rspec_job (12, 1)

NonComp Reviews Queue Completed Date filtering is filterable by the completed date column Failure/Error: expect(page).to have_content("Cases completed:") expected to find text "Cases completed:" in "CaseflowVeterans Health Administration\n | Switch product\nBVATWARNER (VACO)\nVeterans Health Administration\nReviews needing action\nReview each issue and select a disposition\n+ Intake new form\nDownload completed tasks\nIncomplete Tasks (2)Pending Tasks (1)In Progress Tasks (4)Completed Tasks\nCases completed\nViewing 1-3 of 3 total\nClaimant\nVeteran Participant Id\nIssues\nIssue Type\nDate Completed\nType\nBbb Smithbernier 601111772 1 Camp Lejune Family Member 10/25/24 Higher-Level Review\nCcc Smithbeatty 1002345 1 Apportionment 10/22/24 Higher-Level Review\nAaa Smithbogan 12345 2\nCaregiver | Other\nCHAMPVA\n10/18/24 Higher-Level Review\nViewing 1-3 of 3 total\nSend feedback"
visit BASE_URL
expect(page).to have_content("Veterans Health Administration")
click_on "Completed Tasks"
Expand All @@ -1003,7 +1003,7 @@
# expect(page).to have_content("Viewing 1-2 of 2 total")

# Remove these 3 once Last 7 days pre filter is added back
expect(page).to have_content("Cases completed:")
expect(page).to have_content(COPY::VHA_QUEUE_PAGE_COMPLETE_TASKS_DESCRIPTION)
expect(page).to_not have_content("Date Completed (1)")
expect(page).to have_content("Viewing 1-3 of 3 total")

Expand Down
Loading