Skip to content

Commit

Permalink
Merge pull request #3228 from bcgov/NDT-275-change-closed-status-to-n…
Browse files Browse the repository at this point in the history
…ot-selected

refactor: change closed to not selected
  • Loading branch information
AntBush authored May 2, 2024
2 parents b917b3a + 6389405 commit 053f130
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/components/Analyst/StatusInformationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const StatusInformationModal: React.FC<Props> = ({
<tr>
<td>
<Chip
label="Closed"
label="Not selected"
sx={{
bgcolor: '#E8E8E8',
color: '#414141',
Expand Down
2 changes: 1 addition & 1 deletion app/data/statusStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const statusStylesBase = {
primary: '#414141',
backgroundColor: '#E8E8E8',
pillWidth: '100px',
description: 'Closed',
description: 'Not selected',
},
complete: {
primary: '#003366',
Expand Down
4 changes: 2 additions & 2 deletions app/tests/components/Analyst/ChangeStatus.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ describe('The application header component', () => {
expect(screen.getByText('Approved')).toBeInTheDocument();
expect(screen.getByText('Assessment')).toBeInTheDocument();
expect(screen.getByText('Cancelled')).toBeInTheDocument();
expect(screen.getByText('Closed')).toBeInTheDocument();
expect(screen.getByText('Not selected')).toBeInTheDocument();
expect(screen.getByText('Reporting complete')).toBeInTheDocument();
expect(screen.getByText('Conditionally approved')).toBeInTheDocument();
expect(screen.getByText('On hold')).toBeInTheDocument();
Expand Down Expand Up @@ -250,7 +250,7 @@ describe('The application header component', () => {

expect(screen.getByText('Approved')).toBeInTheDocument();
expect(screen.getByText('Cancelled')).toBeInTheDocument();
expect(screen.getByText('Closed')).toBeInTheDocument();
expect(screen.getByText('Not selected')).toBeInTheDocument();
expect(screen.getByText('Reporting complete')).toBeInTheDocument();
expect(screen.getByText('Conditionally approved')).toBeInTheDocument();
expect(screen.getByText('On hold')).toBeInTheDocument();
Expand Down
2 changes: 1 addition & 1 deletion app/tests/pages/analyst/dashboard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ describe('The index page', () => {
pageTestingHelper.renderPage();

const internalStatus = screen.getByText('Received');
const externalStatus = screen.getAllByText('Closed')[0];
const externalStatus = screen.getAllByText('Not selected')[0];

expect(internalStatus).toBeInTheDocument();
expect(externalStatus).toBeInTheDocument();
Expand Down
2 changes: 1 addition & 1 deletion app/tests/utils/mockStatusTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const allApplicationStatusTypes = {
},
{
name: 'closed',
description: 'Closed',
description: 'Not selected',
id: 'WyJhcHBsaWNhdGlvbl9zdGF0dXNfdHlwZXMiLCJjbG9zZWQiXQ==',
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- deploy ccbc:tables/application_status_type_010_closed_to_not_selected to pg

begin;

update ccbc_public.application_status_type set description = 'Not selected' where name = 'closed';

commit;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-- revert ccbc:tables/application_status_type_010_closed_to_not_selected from pg
BEGIN;
UPDATE
ccbc_public.application_status_type
SET
description = 'Closed'
WHERE
name = 'closed';
COMMIT;
1 change: 1 addition & 0 deletions db/sqitch.plan
Original file line number Diff line number Diff line change
Expand Up @@ -556,3 +556,4 @@ tables/notification 2024-04-18T19:54:33Z ,,, <ryohani89@NH504670> # add email no
mutations/create_email_notifications 2024-04-21T02:42:44Z ,,, <ryohani89@NH504670> # add create email notifications mutation
clean_application_status 2024-04-24T23:07:28Z Rafael Solorzano <[email protected]> # cleans application status table by setting archived_at to ones that are missing it
@1.158.0 2024-05-02T15:58:28Z CCBC Service Account <[email protected]> # release v1.158.0
tables/application_status_type_010_closed_to_not_selected 2024-05-01T15:54:58Z Anthony Bushara <[email protected]> # Change the description of closed to not selected

0 comments on commit 053f130

Please sign in to comment.