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

[Prod] Create backend for QA dashboard, add tests for goal services, historical cleanup, new grant filter #2409

Merged
merged 174 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
174 commits
Select commit Hold shift + click to select a range
fa643de
Update ssdi.ts
GarrettEHill Sep 4, 2024
c59d2ae
start moving to new model
GarrettEHill Sep 4, 2024
474b58d
start migration of header and new filter support
GarrettEHill Sep 4, 2024
b2e381b
cleaned up, and more complete solution
GarrettEHill Sep 5, 2024
15c673a
refactored
GarrettEHill Sep 5, 2024
c6581ea
add hasFeatureFlag
GarrettEHill Sep 5, 2024
24f58f4
add some better security handling
GarrettEHill Sep 5, 2024
f3d54d4
relocate ssdi queries to new structure
GarrettEHill Sep 5, 2024
2a3ec20
add wildcard routes
GarrettEHill Sep 6, 2024
8262b65
add support for wildcard routes
GarrettEHill Sep 6, 2024
69789dd
more cleanup
GarrettEHill Sep 6, 2024
f01d0c3
stub out qa/dashboard files
GarrettEHill Sep 6, 2024
4938aa7
ad this will now need to be used for general use api access i need to…
GarrettEHill Sep 6, 2024
1fd3f4e
add a generic string check for feature flag to generic policies
GarrettEHill Sep 6, 2024
c2248ed
update paths for new location
GarrettEHill Sep 6, 2024
73d0304
more cleanup
GarrettEHill Sep 6, 2024
0b6ed18
more cleanup
GarrettEHill Sep 6, 2024
9d816ee
create templates for goals to link to
Sep 6, 2024
36a824a
only create necessary templates, update result query
Sep 6, 2024
b904d4c
add other entity handling, finish comment
Sep 6, 2024
beb2d31
Merge branch 'main' into ttahub-2808/link_historical_objectives_to_te…
Sep 6, 2024
5149a5c
exclude objectives where region is indeterminate
Sep 6, 2024
318655b
Add zod for validation
GarrettEHill Sep 10, 2024
5c192bf
add some needed indexes for performance
GarrettEHill Sep 10, 2024
ccf35cc
refactored version with some optimization
GarrettEHill Sep 10, 2024
80194f2
adding zod validation and type generation
GarrettEHill Sep 10, 2024
286995a
Update dashboard.sql
GarrettEHill Sep 10, 2024
7d71c46
Attempt I
GarrettEHill Sep 12, 2024
e2549ad
clean up white space and more optimizations
GarrettEHill Sep 12, 2024
a01661d
more indexes
GarrettEHill Sep 13, 2024
ce10b50
datasets broken up by applicable filters
GarrettEHill Sep 13, 2024
602cc00
Update ssdi.test.js
GarrettEHill Sep 13, 2024
f8dbcfd
Update dashboard.sql
GarrettEHill Sep 13, 2024
44106f7
start recovering lots changes
GarrettEHill Sep 13, 2024
4a20817
route updates
GarrettEHill Sep 13, 2024
641532c
lint fix
GarrettEHill Sep 13, 2024
9a8dc22
Merge branch 'main' into TTAHUB-3361/ssdi-refactor
GarrettEHill Sep 13, 2024
79f3fa0
review fixes, add goals
Sep 16, 2024
50838e6
Merge branch 'main' into ttahub-2808/link_historical_objectives_to_te…
Sep 16, 2024
1df452e
Add support for getting a snapshot with the ZALDDL table included. De…
GarrettEHill Sep 19, 2024
2415bb2
Add support for requiring a read-only transaction programmatically, a…
GarrettEHill Sep 19, 2024
8708fce
Switch to using the new readOnlyTransactionWrapper
GarrettEHill Sep 19, 2024
4e4282b
Make the generic policy implementation more robust
GarrettEHill Sep 19, 2024
5b7899b
correct issue with validateScriptPath, add support for requesting the…
GarrettEHill Sep 19, 2024
e4936be
update the queries to new format
GarrettEHill Sep 19, 2024
ff762ad
fixes and cleanup
GarrettEHill Sep 19, 2024
f0f95dd
Merge branch 'main' into TTAHUB-3361/ssdi-refactor
GarrettEHill Sep 19, 2024
c6e3529
Bump dompurify from 2.4.4 to 2.5.6 in /frontend
dependabot[bot] Sep 20, 2024
2b428f2
updates to queries
GarrettEHill Sep 20, 2024
a4a9a49
lint
GarrettEHill Sep 20, 2024
df93da4
lint
GarrettEHill Sep 20, 2024
9a89d6c
lint
GarrettEHill Sep 20, 2024
76606d9
Update ssdi.test.js
GarrettEHill Sep 21, 2024
c63d18c
update generic policy tests
GarrettEHill Sep 23, 2024
ec69772
fix more generic tests
GarrettEHill Sep 23, 2024
efa84d7
more correct implmentation
GarrettEHill Sep 23, 2024
5742c29
more tests to increase coverage
GarrettEHill Sep 23, 2024
953aeeb
lint fixes
GarrettEHill Sep 23, 2024
8b6d6b8
fix more test
GarrettEHill Sep 24, 2024
2dfe2ea
Update yarn-audit-known-issues
GarrettEHill Sep 24, 2024
be0929d
Merge branch 'main' into TTAHUB-3361/ssdi-refactor
GarrettEHill Sep 24, 2024
eb21b8e
more test for better coverage
GarrettEHill Sep 24, 2024
8f08f60
Update handlers.test.js
GarrettEHill Sep 24, 2024
bb97fea
more fixes
GarrettEHill Sep 24, 2024
fe1cf6a
test fixes
GarrettEHill Sep 24, 2024
36ab799
Update handlers.test.js
GarrettEHill Sep 24, 2024
efa68d0
Update handlers.test.js
GarrettEHill Sep 24, 2024
e4670ed
Update handlers.test.js
GarrettEHill Sep 24, 2024
20b851b
Update ssdi.test.js
GarrettEHill Sep 24, 2024
1a7dd44
Update ssdi.test.js
GarrettEHill Sep 24, 2024
8c521db
Update ssdi.test.js
GarrettEHill Sep 24, 2024
a7f79bc
test fixes
GarrettEHill Sep 24, 2024
09a6b69
Merge branch 'main' into TTAHUB-3361/ssdi-refactor
GarrettEHill Sep 25, 2024
d366044
fix tests
GarrettEHill Sep 26, 2024
f45e649
add template merge
Sep 26, 2024
cc37a35
Merge branch 'main' into ttahub-2808/link_historical_objectives_to_te…
Sep 26, 2024
2774f1b
lint
GarrettEHill Sep 26, 2024
c1e14cc
typo fix
Sep 26, 2024
255330c
more test fixes
GarrettEHill Sep 26, 2024
92e3a70
more fixes
GarrettEHill Sep 26, 2024
df80fd4
more test fixes
GarrettEHill Sep 26, 2024
139293d
fix lint errors
GarrettEHill Sep 26, 2024
c3fbe41
Merge branch 'main' into TTAHUB-3361/ssdi-refactor
GarrettEHill Sep 26, 2024
972dc08
Update yarn-audit-known-issues
GarrettEHill Sep 26, 2024
b57667a
Update ssdi.test.js
GarrettEHill Sep 27, 2024
074febf
fix more test
GarrettEHill Sep 27, 2024
7b9d960
fix queries
GarrettEHill Sep 27, 2024
f178985
script updates to new header format
GarrettEHill Sep 29, 2024
b6ab14b
Fixes
GarrettEHill Sep 30, 2024
c22727f
lint
GarrettEHill Sep 30, 2024
bcd4d31
Update ssdi.ts
GarrettEHill Sep 30, 2024
a51bc61
Update handlers.test.js
GarrettEHill Sep 30, 2024
f73c6e9
Update handlers.test.js
GarrettEHill Sep 30, 2024
2921a1a
more test fixes
GarrettEHill Sep 30, 2024
771bea6
lint
GarrettEHill Sep 30, 2024
5b93beb
Add tests for the goalServices
kryswisnaskas Oct 1, 2024
29351ab
Format file
kryswisnaskas Oct 1, 2024
9bcb4f0
changed to support random date formats
GarrettEHill Oct 1, 2024
5a0d516
fix more tests
GarrettEHill Oct 1, 2024
651a066
Format file
kryswisnaskas Oct 1, 2024
f27f8a9
Merge pull request #2354 from HHS/ttahub-2808/link_historical_objecti…
hardwarehuman Oct 1, 2024
d80d01e
Merge branch 'main' into dependabot/npm_and_yarn/frontend/dompurify-2…
kryswisnaskas Oct 1, 2024
9890780
Format file
kryswisnaskas Oct 1, 2024
9b95ef9
Merge pull request #2378 from HHS/dependabot/npm_and_yarn/frontend/do…
kryswisnaskas Oct 1, 2024
d9e7029
Merge branch 'main' into kw-test-coverage-goals
kryswisnaskas Oct 1, 2024
c4d7a79
Merge pull request #2393 from HHS/kw-test-coverage-goals
kryswisnaskas Oct 1, 2024
7acfd7a
more tests
GarrettEHill Oct 1, 2024
a65caa6
lint
GarrettEHill Oct 1, 2024
9baa21a
lint
GarrettEHill Oct 1, 2024
8174a6f
fix more tests
GarrettEHill Oct 2, 2024
766c83e
lint
GarrettEHill Oct 2, 2024
a30edb3
Update programmaticTransaction.test.js
GarrettEHill Oct 2, 2024
2320d0e
Update programmaticTransaction.test.js
GarrettEHill Oct 2, 2024
039f361
fix more tests
GarrettEHill Oct 2, 2024
73d03ee
cdi grant filter WIP still need to add associated grant
AdamAdHocTeam Oct 2, 2024
d63c637
Create 20241002000000-clean-training-report-data.js
GarrettEHill Oct 2, 2024
a4620bb
tests done
GarrettEHill Oct 2, 2024
9b7b369
more coverage
GarrettEHill Oct 2, 2024
112f88e
Update handlers.ts
GarrettEHill Oct 2, 2024
d0c05d8
lint
GarrettEHill Oct 2, 2024
210bc0f
Update transactionWrapper.test.js
GarrettEHill Oct 2, 2024
d6dbb45
added ui filter
AdamAdHocTeam Oct 2, 2024
27054bf
fix tests
GarrettEHill Oct 2, 2024
cb1345a
Update transactionWrapper.test.js
GarrettEHill Oct 2, 2024
e9a1304
Merge branch 'main' into TTAHUB-3361/ssdi-refactor
GarrettEHill Oct 2, 2024
d8236a2
add grants filter on BE
AdamAdHocTeam Oct 3, 2024
960fbcf
hook up to RTR
AdamAdHocTeam Oct 3, 2024
b36de4f
requested comments
GarrettEHill Oct 3, 2024
a566775
Switch from Generic to User
GarrettEHill Oct 3, 2024
a2eb2eb
lint
GarrettEHill Oct 3, 2024
320003f
Adding caching
GarrettEHill Oct 3, 2024
bd5ba82
descriptors are allowed
GarrettEHill Oct 3, 2024
274ccd0
removed zod requirement
GarrettEHill Oct 3, 2024
ed03013
functionality has been migrated to policies/user
GarrettEHill Oct 3, 2024
7d5dd57
lint
GarrettEHill Oct 3, 2024
d51072d
lint
GarrettEHill Oct 3, 2024
9abc8d7
Update user.test.js
GarrettEHill Oct 3, 2024
16030d8
fix cdi filter to be grant status filter
AdamAdHocTeam Oct 4, 2024
66ad14c
more cleanup
GarrettEHill Oct 4, 2024
d48a5a8
Update yarn-audit-known-issues
GarrettEHill Oct 4, 2024
9e3bf26
Update yarn-audit-known-issues
GarrettEHill Oct 4, 2024
dbc175d
update `yarn-audit-known-issues`
nvms Oct 6, 2024
36b7163
remove unnecessary .eslintrc
nvms Oct 7, 2024
4132fef
rm frontend/src/.eslintrc
nvms Oct 7, 2024
ec57b6e
update frontend `yarn-audit-known-issues`
nvms Oct 7, 2024
cfcedae
somehow this got deleted
nvms Oct 7, 2024
002acf1
be ignore
AdamAdHocTeam Oct 7, 2024
1af054a
ignore FE
AdamAdHocTeam Oct 7, 2024
9f3de80
add cookie to resolutions
nvms Oct 7, 2024
8162601
update yarn.lock
nvms Oct 7, 2024
9f72edd
run for BE
AdamAdHocTeam Oct 7, 2024
679f502
Merge pull request #2399 from HHS/yarn-audit-ignore-cookie
nvms Oct 7, 2024
f626b94
Merge branch 'main' into jp/rm-eslintrc
nvms Oct 7, 2024
a80b58f
Merge pull request #2400 from HHS/jp/rm-eslintrc
nvms Oct 7, 2024
5b70b24
Update src/migrations/20241002000000-clean-training-report-data.js
GarrettEHill Oct 8, 2024
c6a25b3
Update src/services/ssdi.ts
GarrettEHill Oct 8, 2024
3589902
Update src/services/ssdi.ts
GarrettEHill Oct 8, 2024
23f1572
lint
GarrettEHill Oct 8, 2024
5c03c9a
Merge branch 'main' into TTAHUB-3361/ssdi-refactor
GarrettEHill Oct 8, 2024
50eca46
Merge branch 'TTAHUB-3361/ssdi-refactor' of https://github.com/HHS/He…
GarrettEHill Oct 8, 2024
5cc7687
fix
GarrettEHill Oct 8, 2024
1348bee
switch from old name
AdamAdHocTeam Oct 8, 2024
f280818
Merge branch 'main' into al-ttahub-2977-cdi-filter
AdamAdHocTeam Oct 8, 2024
f009308
Merge pull request #2395 from HHS/al-ttahub-2977-cdi-filter
AdamAdHocTeam Oct 8, 2024
ebc1d0e
change filters to match UI naming convention
GarrettEHill Oct 9, 2024
e14498f
missed one
GarrettEHill Oct 9, 2024
813cae9
Update ssdi.ts
GarrettEHill Oct 9, 2024
263b85c
Merge pull request #2352 from HHS/TTAHUB-3361/ssdi-refactor
GarrettEHill Oct 9, 2024
caf578d
Update handlers.ts
GarrettEHill Oct 10, 2024
d62f2c7
update tests to match change to region.in
GarrettEHill Oct 10, 2024
149f389
Merge pull request #2406 from HHS/NO-JIRA]-SSDI-QA-dashboard-intigration
GarrettEHill Oct 10, 2024
0fc7aed
Merge pull request #2396 from HHS/TTAHUB-2826/clean-training-report-data
GarrettEHill Oct 14, 2024
6aa28fb
Remove cookie from known issues
thewatermethod Oct 15, 2024
6b59754
Merge pull request #2410 from HHS/mb/remove-cookie-from-known-issues
thewatermethod Oct 15, 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
Empty file removed frontend/src/.eslintrc
Empty file.
54 changes: 54 additions & 0 deletions frontend/src/components/filter/GrantStatus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Dropdown } from '@trussworks/react-uswds';

export function displayGrantsStatus(q) {
if (q === 'active') {
return 'Active';
}

if (q === 'inactive') {
return 'Inactive';
}

if (q === 'interim-management-cdi') {
return 'Interim management (CDI)';
}

return '';
}

export default function GrantStatus({ onApply, query, inputId }) {
const onApplyTTAType = (e) => {
const { target: { value } } = e;
onApply(value);
};

return (
<>
{ /* eslint-disable-next-line jsx-a11y/label-has-associated-control */ }
<label className="sr-only" htmlFor={inputId}>Select grant status to filter by</label>
<Dropdown name={inputId} id={inputId} value={query} onChange={onApplyTTAType}>
<option value="active">
Active
</option>
<option value="inactive">
Inactive
</option>
<option value="interim-management-cdi">
Interim management (CDI)
</option>
</Dropdown>
</>
);
}

GrantStatus.propTypes = {
onApply: PropTypes.func.isRequired,
query: PropTypes.string.isRequired,
inputId: PropTypes.string,
};

GrantStatus.defaultProps = {
inputId: 'grantStatus',
};
47 changes: 47 additions & 0 deletions frontend/src/components/filter/__tests__/GrantStatus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import '@testing-library/jest-dom';
import React from 'react';
import {
render,
screen,
} from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import GrantStatus, { displayGrantsStatus } from '../GrantStatus';

const { findByRole } = screen;

describe('displayCdiGrantStatus', () => {
it('returns the correct string for active', () => {
expect(displayGrantsStatus('active')).toEqual('Active');
});

it('returns the correct string for inactive', () => {
expect(displayGrantsStatus('inactive')).toEqual('Inactive');
});

it('returns the correct string for interim-management-cdi', () => {
expect(displayGrantsStatus('interim-management-cdi')).toEqual('Interim management (CDI)');
});

it('returns an empty string for an empty string', () => {
expect(displayGrantsStatus('')).toEqual('');
});
});

describe('CdiGrantFilter', () => {
const renderCdiGrantSelect = (appliedType, onApply) => (
render(
<GrantStatus
onApply={onApply}
inputId="cdiGrantFilter"
appliedTTAType={appliedType}
/>,
));

it('calls the on apply handler', async () => {
const onApply = jest.fn();
renderCdiGrantSelect('inactive', onApply);
const select = await findByRole('combobox', { name: /Select grant status to filter by/i });
userEvent.selectOptions(select, 'active');
expect(onApply).toHaveBeenCalled();
});
});
19 changes: 19 additions & 0 deletions frontend/src/components/filter/activityReportFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import FilterStateSelect from './FilterStateSelect';
import FilterOtherEntitiesSelect from './FilterOtherEntitiesSelect';
import FilterParticipantsSelect from './FilterParticipantsSelect';
import FilterTTAType, { displayTtaTypeQuery } from './FilterTTAType';
import GrantStatus, { displayGrantsStatus } from './GrantStatus';
import MyReportsSelect from './MyReportsSelect';
import FilterGroups from './FilterGroups';
import FilterDeliveryMethod from './FilterDeliveryMethod';
Expand Down Expand Up @@ -347,6 +348,24 @@ export const ttaTypeFilter = {
),
};

export const grantStatusFilter = {
id: 'grantStatus',
display: 'Grant status',
conditions: FILTER_CONDITIONS,
defaultValues: {
is: 'active',
'is not': 'active',
},
displayQuery: displayGrantsStatus,
renderInput: (id, condition, query, onApplyQuery) => (
<GrantStatus
inputId={`grantStatus-${condition.replace(/ /g, '-')}-${id}`}
onApply={onApplyQuery}
query={query}
/>
),
};

export const specialistRoleFilter = {
id: 'role',
display: 'Specialist roles',
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/components/filter/grantFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import FilterGroups from './FilterGroups';
import { useDisplayGroups, fixQueryWhetherStringOrArray } from './utils';
import { formatDateRange } from '../../utils';
import FilterDateRange from './FilterDateRange';
import GrantStatus, { displayGrantsStatus } from './GrantStatus';

export const groupsFilter = {
id: 'group',
Expand Down Expand Up @@ -74,3 +75,21 @@ export const recipientsWithoutTTA = {
/>
),
};

export const grantStatusFilter = {
id: 'grantStatus',
display: 'Grant status',
conditions: FILTER_CONDITIONS,
defaultValues: {
is: 'active',
'is not': 'active',
},
displayQuery: displayGrantsStatus,
renderInput: (id, condition, query, onApplyQuery) => (
<GrantStatus
inputId={`grantStatus-${condition.replace(/ /g, '-')}-${id}`}
onApply={onApplyQuery}
query={query}
/>
),
};
2 changes: 2 additions & 0 deletions frontend/src/pages/CourseDashboard/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
reportTextFilter,
ttaTypeFilter,
activityReportGoalResponseFilter,
grantStatusFilter,
} from '../../components/filter/activityReportFilters';
import { goalNameFilter } from '../../components/filter/goalFilters';

Expand All @@ -45,6 +46,7 @@ const COURSE_DASHBOARD_FILTER_CONFIG = [
targetPopulationsFilter,
topicsFilter,
ttaTypeFilter,
grantStatusFilter,
];

COURSE_DASHBOARD_FILTER_CONFIG.sort((a, b) => a.display.localeCompare(b.display));
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/Landing/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
reportTextFilter,
ttaTypeFilter,
activityReportGoalResponseFilter,
grantStatusFilter,
} from '../../components/filter/activityReportFilters';
import { goalNameFilter } from '../../components/filter/goalFilters';

Expand Down Expand Up @@ -48,6 +49,7 @@ export const LANDING_FILTER_CONFIG = (withRegions = false) => {
targetPopulationsFilter,
topicsFilter,
ttaTypeFilter,
grantStatusFilter,
];

if (withRegions) {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/pages/RecipientSearch/constants.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* eslint-disable import/prefer-default-export */
import { regionFilter } from '../../components/filter/activityReportFilters';
import { goalNameFilter } from '../../components/filter/goalFilters';
import { groupsFilter, recipientsWithoutTTA } from '../../components/filter/grantFilters';
import { groupsFilter, recipientsWithoutTTA, grantStatusFilter } from '../../components/filter/grantFilters';

const RECIPIENT_SEARCH_FILTER_CONFIG = [
goalNameFilter,
groupsFilter,
regionFilter,
recipientsWithoutTTA,
grantStatusFilter,
];

// sort by display prop
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/RegionalDashboard/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
reportTextFilter,
deliveryMethodFilter,
activityReportGoalResponseFilter,
grantStatusFilter,
} from '../../components/filter/activityReportFilters';
import { goalNameFilter } from '../../components/filter/goalFilters';
import { groupsFilter } from '../../components/filter/grantFilters';
Expand All @@ -45,6 +46,7 @@ const DASHBOARD_FILTER_CONFIG = [
targetPopulationsFilter,
topicsFilter,
ttaTypeFilter,
grantStatusFilter,
];

// sort by display prop
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/RegionalGoalDashboard/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
participantsFilter,
myReportsFilter,
ttaTypeFilter,
grantStatusFilter,
} from '../../components/filter/activityReportFilters';

const DASHBOARD_FILTER_CONFIG = [
Expand All @@ -39,6 +40,7 @@ const DASHBOARD_FILTER_CONFIG = [
targetPopulationsFilter,
topicsFilter,
ttaTypeFilter,
grantStatusFilter,
];

// sort by display prop
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/pages/ResourcesDashboard/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import {
reportTextFilter,
ttaTypeFilter,
activityReportGoalResponseFilter,
grantStatusFilter,
} from '../../components/filter/activityReportFilters';
import { goalNameFilter } from '../../components/filter/goalFilters';

Expand All @@ -45,6 +46,7 @@ const RESOURCES_DASHBOARD_FILTER_CONFIG = [
targetPopulationsFilter,
topicsFilter,
ttaTypeFilter,
grantStatusFilter,
];

RESOURCES_DASHBOARD_FILTER_CONFIG.sort((a, b) => a.display.localeCompare(b.display));
Expand Down
2 changes: 1 addition & 1 deletion frontend/yarn-audit-known-issues
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
{"type":"auditAdvisory","data":{"resolution":{"id":1097682,"path":"react-scripts>jest>jest-cli>@jest/core>jest-config>jest-environment-jsdom>jsdom>tough-cookie","dev":false,"optional":false,"bundled":false},"advisory":{"findings":[{"version":"4.0.0","paths":["react-scripts>jest>@jest/core>jest-config>jest-environment-jsdom>jsdom>tough-cookie","react-scripts>jest>jest-cli>@jest/core>jest-config>jest-environment-jsdom>jsdom>tough-cookie","react-scripts>jest>jest-cli>@jest/core>jest-config>jest-runner>jest-environment-jsdom>jsdom>tough-cookie"]}],"found_by":null,"deleted":null,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-26136\n- https://github.com/salesforce/tough-cookie/issues/282\n- https://github.com/salesforce/tough-cookie/commit/12d474791bb856004e858fdb1c47b7608d09cf6e\n- https://github.com/salesforce/tough-cookie/releases/tag/v4.1.3\n- https://security.snyk.io/vuln/SNYK-JS-TOUGHCOOKIE-5672873\n- https://lists.debian.org/debian-lts-announce/2023/07/msg00010.html\n- https://lists.fedoraproject.org/archives/list/[email protected]/message/3HUE6ZR5SL73KHL7XUPAOEL6SB7HUDT2\n- https://lists.fedoraproject.org/archives/list/[email protected]/message/6PVVPNSAGSDS63HQ74PJ7MZ3MU5IYNVZ\n- https://security.netapp.com/advisory/ntap-20240621-0006\n- https://github.com/advisories/GHSA-72xf-g2v4-qvf3","created":"2023-07-01T06:30:16.000Z","id":1097682,"npm_advisory_id":null,"overview":"Versions of the package tough-cookie before 4.1.3 are vulnerable to Prototype Pollution due to improper handling of Cookies when using CookieJar in `rejectPublicSuffixes=false` mode. This issue arises from the manner in which the objects are initialized.","reported_by":null,"title":"tough-cookie Prototype Pollution vulnerability","metadata":null,"cves":["CVE-2023-26136"],"access":"public","severity":"moderate","module_name":"tough-cookie","vulnerable_versions":"<4.1.3","github_advisory_id":"GHSA-72xf-g2v4-qvf3","recommendation":"Upgrade to version 4.1.3 or later","patched_versions":">=4.1.3","updated":"2024-06-21T21:33:53.000Z","cvss":{"score":6.5,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"},"cwe":["CWE-1321"],"url":"https://github.com/advisories/GHSA-72xf-g2v4-qvf3"}}}
{"type":"auditAdvisory","data":{"resolution":{"id":1097682,"path":"react-scripts>jest>jest-cli>@jest/core>jest-config>jest-runner>jest-environment-jsdom>jsdom>tough-cookie","dev":false,"optional":false,"bundled":false},"advisory":{"findings":[{"version":"4.0.0","paths":["react-scripts>jest>@jest/core>jest-config>jest-environment-jsdom>jsdom>tough-cookie","react-scripts>jest>jest-cli>@jest/core>jest-config>jest-environment-jsdom>jsdom>tough-cookie","react-scripts>jest>jest-cli>@jest/core>jest-config>jest-runner>jest-environment-jsdom>jsdom>tough-cookie"]}],"found_by":null,"deleted":null,"references":"- https://nvd.nist.gov/vuln/detail/CVE-2023-26136\n- https://github.com/salesforce/tough-cookie/issues/282\n- https://github.com/salesforce/tough-cookie/commit/12d474791bb856004e858fdb1c47b7608d09cf6e\n- https://github.com/salesforce/tough-cookie/releases/tag/v4.1.3\n- https://security.snyk.io/vuln/SNYK-JS-TOUGHCOOKIE-5672873\n- https://lists.debian.org/debian-lts-announce/2023/07/msg00010.html\n- https://lists.fedoraproject.org/archives/list/[email protected]/message/3HUE6ZR5SL73KHL7XUPAOEL6SB7HUDT2\n- https://lists.fedoraproject.org/archives/list/[email protected]/message/6PVVPNSAGSDS63HQ74PJ7MZ3MU5IYNVZ\n- https://security.netapp.com/advisory/ntap-20240621-0006\n- https://github.com/advisories/GHSA-72xf-g2v4-qvf3","created":"2023-07-01T06:30:16.000Z","id":1097682,"npm_advisory_id":null,"overview":"Versions of the package tough-cookie before 4.1.3 are vulnerable to Prototype Pollution due to improper handling of Cookies when using CookieJar in `rejectPublicSuffixes=false` mode. This issue arises from the manner in which the objects are initialized.","reported_by":null,"title":"tough-cookie Prototype Pollution vulnerability","metadata":null,"cves":["CVE-2023-26136"],"access":"public","severity":"moderate","module_name":"tough-cookie","vulnerable_versions":"<4.1.3","github_advisory_id":"GHSA-72xf-g2v4-qvf3","recommendation":"Upgrade to version 4.1.3 or later","patched_versions":">=4.1.3","updated":"2024-06-21T21:33:53.000Z","cvss":{"score":6.5,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"},"cwe":["CWE-1321"],"url":"https://github.com/advisories/GHSA-72xf-g2v4-qvf3"}}}
{"type":"auditAdvisory","data":{"resolution":{"id":1099525,"path":"react-scripts>webpack-dev-server>express>serve-static>send","dev":false,"optional":false,"bundled":false},"advisory":{"findings":[{"version":"0.18.0","paths":["react-scripts>webpack-dev-server>express>serve-static>send"]}],"found_by":null,"deleted":null,"references":"- https://github.com/pillarjs/send/security/advisories/GHSA-m6fv-jmcg-4jfg\n- https://nvd.nist.gov/vuln/detail/CVE-2024-43799\n- https://github.com/pillarjs/send/commit/ae4f2989491b392ae2ef3b0015a019770ae65d35\n- https://github.com/advisories/GHSA-m6fv-jmcg-4jfg","created":"2024-09-10T19:42:41.000Z","id":1099525,"npm_advisory_id":null,"overview":"### Impact\n\npassing untrusted user input - even after sanitizing it - to `SendStream.redirect()` may execute untrusted code\n\n### Patches\n\nthis issue is patched in send 0.19.0\n\n### Workarounds\n\nusers are encouraged to upgrade to the patched version of express, but otherwise can workaround this issue by making sure any untrusted inputs are safe, ideally by validating them against an explicit allowlist\n\n### Details\n\nsuccessful exploitation of this vector requires the following:\n\n1. The attacker MUST control the input to response.redirect()\n1. express MUST NOT redirect before the template appears\n1. the browser MUST NOT complete redirection before:\n1. the user MUST click on the link in the template\n","reported_by":null,"title":"send vulnerable to template injection that can lead to XSS","metadata":null,"cves":["CVE-2024-43799"],"access":"public","severity":"moderate","module_name":"send","vulnerable_versions":"<0.19.0","github_advisory_id":"GHSA-m6fv-jmcg-4jfg","recommendation":"Upgrade to version 0.19.0 or later","patched_versions":">=0.19.0","updated":"2024-09-10T19:42:42.000Z","cvss":{"score":5,"vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:L/A:L"},"cwe":["CWE-79"],"url":"https://github.com/advisories/GHSA-m6fv-jmcg-4jfg"}}}
{"type":"auditAdvisory","data":{"resolution":{"id":1099597,"path":"react-admin>ra-ui-materialui>dompurify","dev":false,"optional":false,"bundled":false},"advisory":{"findings":[{"version":"2.4.4","paths":["react-admin>ra-ui-materialui>dompurify"]}],"found_by":null,"deleted":null,"references":"- https://github.com/cure53/DOMPurify/security/advisories/GHSA-mmhx-hmjr-r674\n- https://github.com/cure53/DOMPurify/commit/1e520262bf4c66b5efda49e2316d6d1246ca7b21\n- https://github.com/cure53/DOMPurify/commit/26e1d69ca7f769f5c558619d644d90dd8bf26ebc\n- https://nvd.nist.gov/vuln/detail/CVE-2024-45801\n- https://github.com/advisories/GHSA-mmhx-hmjr-r674","created":"2024-09-16T20:34:26.000Z","id":1099597,"npm_advisory_id":null,"overview":"It has been discovered that malicious HTML using special nesting techniques can bypass the depth checking added to DOMPurify in recent releases. It was also possible to use Prototype Pollution to weaken the depth check.\n\nThis renders dompurify unable to avoid XSS attack.\n\nFixed by https://github.com/cure53/DOMPurify/commit/1e520262bf4c66b5efda49e2316d6d1246ca7b21 (3.x branch) and https://github.com/cure53/DOMPurify/commit/26e1d69ca7f769f5c558619d644d90dd8bf26ebc (2.x branch).","reported_by":null,"title":"DOMPurify allows tampering by prototype pollution","metadata":null,"cves":["CVE-2024-45801"],"access":"public","severity":"high","module_name":"dompurify","vulnerable_versions":"<2.5.4","github_advisory_id":"GHSA-mmhx-hmjr-r674","recommendation":"Upgrade to version 2.5.4 or later","patched_versions":">=2.5.4","updated":"2024-09-16T22:37:33.000Z","cvss":{"score":7,"vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:H/A:L"},"cwe":["CWE-1321","CWE-1333"],"url":"https://github.com/advisories/GHSA-mmhx-hmjr-r674"}}}
{"type":"auditAdvisory","data":{"resolution":{"id":1099846,"path":"react-scripts>webpack-dev-server>express>cookie","dev":false,"optional":false,"bundled":false},"advisory":{"findings":[{"version":"0.6.0","paths":["react-scripts>webpack-dev-server>express>cookie"]}],"found_by":null,"deleted":null,"references":"- https://github.com/jshttp/cookie/security/advisories/GHSA-pxg6-pf52-xh8x\n- https://github.com/jshttp/cookie/pull/167\n- https://github.com/jshttp/cookie/commit/e10042845354fea83bd8f34af72475eed1dadf5c\n- https://github.com/advisories/GHSA-pxg6-pf52-xh8x","created":"2024-10-04T20:31:00.000Z","id":1099846,"npm_advisory_id":null,"overview":"### Impact\n\nThe cookie name could be used to set other fields of the cookie, resulting in an unexpected cookie value. For example, `serialize(\"userName=<script>alert('XSS3')</script>; Max-Age=2592000; a\", value)` would result in `\"userName=<script>alert('XSS3')</script>; Max-Age=2592000; a=test\"`, setting `userName` cookie to `<script>` and ignoring `value`.\n\nA similar escape can be used for `path` and `domain`, which could be abused to alter other fields of the cookie.\n\n### Patches\n\nUpgrade to 0.7.0, which updates the validation for `name`, `path`, and `domain`.\n\n### Workarounds\n\nAvoid passing untrusted or arbitrary values for these fields, ensure they are set by the application instead of user input.\n\n### References\n\n* https://github.com/jshttp/cookie/pull/167","reported_by":null,"title":"cookie accepts cookie name, path, and domain with out of bounds characters","metadata":null,"cves":["CVE-2024-47764"],"access":"public","severity":"low","module_name":"cookie","vulnerable_versions":"<0.7.0","github_advisory_id":"GHSA-pxg6-pf52-xh8x","recommendation":"Upgrade to version 0.7.0 or later","patched_versions":">=0.7.0","updated":"2024-10-04T20:31:01.000Z","cvss":{"score":0,"vectorString":null},"cwe":["CWE-74"],"url":"https://github.com/advisories/GHSA-pxg6-pf52-xh8x"}}}
6 changes: 3 additions & 3 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5067,9 +5067,9 @@ domhandler@^4.0.0, domhandler@^4.2.0, domhandler@^4.3.1:
domelementtype "^2.2.0"

dompurify@^2.4.3:
version "2.4.4"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.4.tgz#c17803931dd524e1b68e0e940a84567f9498f4bd"
integrity sha512-1e2SpqHiRx4DPvmRuXU5J0di3iQACwJM+mFGE2HAkkK7Tbnfk9WcghcAmyWc9CRrjyRRUpmuhPUH6LphQQR3EQ==
version "2.5.6"
resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.5.6.tgz#8402b501611eaa7fb3786072297fcbe2787f8592"
integrity sha512-zUTaUBO8pY4+iJMPE1B9XlO2tXVYIcEA4SNGtvDELzTSCQO7RzH+j7S180BmhmJId78lqGU2z19vgVx2Sxs/PQ==

domutils@^1.7.0:
version "1.7.0"
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"json5": "^2.2.3",
"luxon": "^1.23.1",
"qs": "^6.9.7",
"cookie": "^0.7.0",
"cookiejar": "^2.1.4",
"http-cache-semantics": "^4.1.1",
"path-to-regexp": "^0.1.10",
Expand All @@ -148,6 +149,7 @@
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"project": "./src/tsconfig.json"
},
"plugins": [
Expand Down
5 changes: 0 additions & 5 deletions src/.eslintrc

This file was deleted.

10 changes: 5 additions & 5 deletions src/goalServices/goals.js
Original file line number Diff line number Diff line change
Expand Up @@ -1053,7 +1053,7 @@ export async function removeUnusedGoalsObjectivesFromReport(reportId, currentObj
await removeObjectives(objectiveIdsToRemove, reportId);
}

async function createObjectivesForGoal(goal, objectives) {
export async function createObjectivesForGoal(goal, objectives) {
/*
Note: Objective Status
We only want to set Objective status from here on initial Objective creation.
Expand All @@ -1066,10 +1066,10 @@ async function createObjectivesForGoal(goal, objectives) {

return Promise.all(objectives.filter((o) => o.title
|| o.ttaProvided
|| o.topics.length
|| o.resources.length
|| o.courses.length
|| o.files.length).map(async (objective, index) => {
|| o.topics?.length
|| o.resources?.length
|| o.courses?.length
|| o.files?.length).map(async (objective, index) => {
const {
id,
isNew,
Expand Down
Loading