Skip to content

Commit

Permalink
Merge branch 'release/FY24Q4.6.1' into hotfix/APPEALS-37269-3
Browse files Browse the repository at this point in the history
  • Loading branch information
ronwabVa authored Oct 1, 2024
2 parents e3fdc45 + 23231f6 commit d9373be
Show file tree
Hide file tree
Showing 10 changed files with 146 additions and 38 deletions.
13 changes: 8 additions & 5 deletions client/app/components/Alert.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ export default class Alert extends React.Component {

const typeClass = `usa-alert-${type}`;

const className = classnames('usa-alert', typeClass, {
'usa-alert-slim': !title,
fixed,
'cf-margin-bottom-2rem': lowerMargin,
});
const className = classnames('usa-alert',
typeClass,
{
'usa-alert-slim': !title,
fixed,
'cf-margin-bottom-2rem': lowerMargin,
},
);

return (
<div role="alert" className={className} {...styling}>
Expand Down
28 changes: 28 additions & 0 deletions client/app/components/AppFrame.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,38 @@
import React from 'react';
import PropTypes from 'prop-types';
import { Route } from 'react-router-dom';
import getAppWidthStyling from
'@department-of-veterans-affairs/caseflow-frontend-toolkit/components/util/getAppWidthStyling';
import classnames from 'classnames';

import Alert from './Alert';

// eslint-disable-next-line no-process-env
const env = process.env.DEPLOY_ENV;

const className = classnames(
{
'no-env-alert': env !== 'prodtest' && env !== 'preprod' && env !== 'uat' && env !== 'demo',
'preprod-env-alert': env !== 'prod' && env === 'preprod',
'prodtest-env-alert': env !== 'prod' && env === 'prodtest',
'uat-env-alert': env !== 'prod' && env === 'uat',
'demo-env-alert': env !== 'prod' && env === 'demo',
},
);

const AppFrame = ({ children, wideApp }) =>
<main {...getAppWidthStyling(wideApp)} role="main" id="Main">
<Route
exact
path="/"
title="Caseflow | Home"
component={() =>
// eslint-disable-next-line no-undefined
(env !== 'prod' && env !== 'production' && env !== undefined) &&
(<div className={className}>
<Alert type="warning">This is the {env} environment!</Alert>
</div>)
} />
{children}
</main>;

Expand Down
6 changes: 6 additions & 0 deletions client/app/styles/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ body {
}

// Used for Caseflow app header rendered in React
nav {
&.cf-push-left p a {
color: $color-gray-dark;
}
}

.cf-wide-app {
.usa-grid {
padding-left: 0;
Expand Down
92 changes: 92 additions & 0 deletions client/app/styles/react/_alerts.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,94 @@
.no-env-color {
display: none;
}

.prodtest-env-color {
color: $color-black-light;
}

.preprod-env-color {
color: $color-secondary;
}

.uat-env-color {
color: $color-primary-alt;
}

.demo-env-color {
color: $color-green-light;
}

.no-env-alert {
.usa-alert {
display: none;
}
}

.prodtest-env-alert {

.usa-alert {
background-color: $color-gold-lightest;
border-left: 5px solid $color-gold-lighter;
background-image: url('/images/warning-429d7a1540c2e7d036805bb73a0ba690.png');

.usa-alert-text {
padding-left: 1.5rem;
}

&::before {
background-color: $color-gold-lightest;
}
}
}

.preprod-env-alert {

.usa-alert {
background-color: $color-secondary-lightest;
border-left: 5px solid $color-secondary-light;
background-image: url('/images/warning-429d7a1540c2e7d036805bb73a0ba690.png');

.usa-alert-text {
padding-left: 1.5rem;
}

&::before {
background-color: $color-secondary-lightest;
}
}
}

.uat-env-alert {
.usa-alert {
background-color: $color-primary-alt-lightest;
border-left: 5px solid $color-primary-alt-light;
background-image: url('/images/warning-429d7a1540c2e7d036805bb73a0ba690.png');

.usa-alert-text {
padding-left: 1.5rem;
}

&::before {
background-color: $color-primary-alt-lightest;
}
}
}

.demo-env-alert {
.usa-alert {
background-color: $color-green-lightest;
border-left: 5px solid $color-green-lighter;
background-image: url('/images/warning-429d7a1540c2e7d036805bb73a0ba690.png');

.usa-alert-text {
padding-left: 1.5rem;
}

&::before {
background-color: $color-green-lightest;
}
}
}

.usa-alert {

Expand All @@ -14,6 +105,7 @@
&.usa-alert-slim {
background-size: 4rem;


.usa-alert-body {
padding-left: 3.5rem;
}
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"@babel/preset-react": "^7.12.7",
"@babel/register": "^7.12.1",
"@babel/runtime-corejs2": "^7.12.5",
"@department-of-veterans-affairs/caseflow-frontend-toolkit": "https://github.com/department-of-veterans-affairs/caseflow-frontend-toolkit#a98b291",
"@department-of-veterans-affairs/caseflow-frontend-toolkit": "https://github.com/department-of-veterans-affairs/caseflow-frontend-toolkit#fa44cf3e",
"@fortawesome/fontawesome-free": "^5.3.1",
"@hookform/resolvers": "^2.0.0-beta.5",
"@reduxjs/toolkit": "^1.9.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ exports[`CaseWorkerIndex renders correctly 1`] = `
<div>
<div>
<header
data-css-uo1yys=""
style="background: rgb(255, 255, 255); line-height: 4em;"
>
<div>
<div
data-css-pw7rlt=""
>
<nav
class="cf-push-left"
data-css-1vh8afw=""
style="display: flex; align-items: center; line-height: 4em;"
>
<a
href="/dispatch/establish-claim/"
>
<p
data-css-14vgq4z=""
style="margin: 0px; display: inline-block; font-size: 1.7rem; font-weight: 900; line-height: 4em;"
>
<a
href="/dispatch/establish-claim/"
Expand Down Expand Up @@ -59,6 +59,7 @@ exports[`CaseWorkerIndex renders correctly 1`] = `
class="cf-application-title"
data-css-1mdtwij=""
id="page-title"
style="padding-left: .3em;"
tabindex="-1"
>
Dispatch
Expand Down Expand Up @@ -93,7 +94,7 @@ exports[`CaseWorkerIndex renders correctly 1`] = `
</div>
</div>
<div
data-css-1tukvsd=""
style="border-bottom: 1px solid #d6d7d9; clear: both;"
>
</div>
Expand Down
4 changes: 2 additions & 2 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2529,9 +2529,9 @@
exec-sh "^0.3.2"
minimist "^1.2.0"

"@department-of-veterans-affairs/caseflow-frontend-toolkit@https://github.com/department-of-veterans-affairs/caseflow-frontend-toolkit#a98b291":
"@department-of-veterans-affairs/caseflow-frontend-toolkit@https://github.com/department-of-veterans-affairs/caseflow-frontend-toolkit#fa44cf3e":
version "2.6.1"
resolved "https://github.com/department-of-veterans-affairs/caseflow-frontend-toolkit#a98b29188aaf2d85f7af749eda95cc02ed1282d2"
resolved "https://github.com/department-of-veterans-affairs/caseflow-frontend-toolkit#fa44cf3e009280d39275f16150990f8749b4818a"
dependencies:
classnames "^2.2.5"
glamor "^2.20.40"
Expand Down
10 changes: 4 additions & 6 deletions db/seeds/hearings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,12 @@ def created_by_user
# rubocop:disable Metrics/MethodLength
def create_hearing_subtree(appeal, hearing)
root_task = create(:root_task, appeal: appeal)
distribution_task = create(
:distribution_task,
appeal: appeal,
parent: root_task
)

distribution_task = create(:distribution_task, appeal: appeal, parent: root_task) if appeal.is_a?(Appeal)

parent_hearing_task = create(
:hearing_task,
parent: distribution_task,
parent: appeal.is_a?(Appeal) ? distribution_task : root_task,
appeal: appeal
)

Expand Down
5 changes: 0 additions & 5 deletions package.json

This file was deleted.

15 changes: 0 additions & 15 deletions yarn.lock

This file was deleted.

0 comments on commit d9373be

Please sign in to comment.