Skip to content

Commit

Permalink
Merge pull request #2176 from HHS/mb/TTAHUB-2912/quality-assurance-da…
Browse files Browse the repository at this point in the history
…shboard-scaffold

[TTAHUB-2912] QA Dashboard initial setup
  • Loading branch information
thewatermethod authored Jun 4, 2024
2 parents 7de1e06 + 8f90e5d commit c7a2faa
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/logical_data_model.encoded

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/logical_data_model.puml
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,7 @@ class Users{
enum enum_Users_flags {
anv_statistics
closed_goal_merge_override
quality_assurance_dashboard
regional_goal_dashboard
training_reports_dashboard
}
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import Group from './pages/AccountManagement/Group';
import SessionForm from './pages/SessionForm';
import ViewTrainingReport from './pages/ViewTrainingReport';
import useGaUserData from './hooks/useGaUserData';
import QADashboard from './pages/QADashboard';

const WHATSNEW_NOTIFICATIONS_KEY = 'whatsnew-read-notifications';

Expand Down Expand Up @@ -307,6 +308,24 @@ function App() {
</AppWrapper>
)}
/>
<Route
exact
path="/dashboards/qa-dashboard"
render={() => (
<FeatureFlag
renderNotFound
flag="quality_assurance_dashboard"
>
<AppWrapper
authenticated
logout={logout}
hasAlerts={!!(alert)}
>
<QADashboard />
</AppWrapper>
</FeatureFlag>
)}
/>
<Route
exact
path="/dashboards/regional-dashboard/activity-reports"
Expand Down
9 changes: 9 additions & 0 deletions frontend/src/components/SiteNav.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ const SiteNav = ({
Resource Dashboard
</NavLink>
</li>
<FeatureFlag flag="quality_assurance_dashboard">
<li>
<NavLink
to="/dashboards/qa-dashboard"
>
Quality Assurance Dashboard
</NavLink>
</li>
</FeatureFlag>
<li>
<NavLink
to="/recipient-tta-records"
Expand Down
17 changes: 17 additions & 0 deletions frontend/src/pages/QADashboard/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import { Helmet } from 'react-helmet';

export default function QADashboard() {
return (
<>
<Helmet>
<title>Quality Assurance Dashboard</title>
</Helmet>
<div className="ttahub-dashboard">
<h1 className="landing margin-top-0 margin-bottom-3">
Quality assurance dashboard
</h1>
</div>
</>
);
}
1 change: 1 addition & 0 deletions src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ const FEATURE_FLAGS = [
'regional_goal_dashboard',
'closed_goal_merge_override',
'training_reports_dashboard',
'quality_assurance_dashboard',
];

const MAINTENANCE_CATEGORY = {
Expand Down
26 changes: 26 additions & 0 deletions src/migrations/20240530143904-add-qa-dashboard-feature-flag.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const { prepMigration } = require('../lib/migration');

const FEATURE_FLAGS = [
'anv_statistics',
'regional_goal_dashboard',
'closed_goal_merge_override',
'training_reports_dashboard',
'quality_assurance_dashboard',
];

/** @type {import('sequelize-cli').Migration} */
module.exports = {
async up(queryInterface) {
await queryInterface.sequelize.transaction(async (transaction) => {
const sessionSig = __filename;
await prepMigration(queryInterface, transaction, sessionSig);
return Promise.all(Object.values(FEATURE_FLAGS).map((action) => queryInterface.sequelize.query(`
ALTER TYPE "enum_Users_flags" ADD VALUE IF NOT EXISTS '${action}';
`)));
});
},

async down() {
// no rollbacks
},
};

0 comments on commit c7a2faa

Please sign in to comment.