Skip to content

Commit

Permalink
Merge branch 'main' into feat/SILVA-514
Browse files Browse the repository at this point in the history
  • Loading branch information
paulushcgcj authored Oct 30, 2024
2 parents 2e18902 + aa56a9d commit 209529f
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 48 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@

# Matched against directories (e.g. workflows)
# /.github/workflows/ @jazzgrewal @paulushcgcj @DerekRoberts @gpascucci
/frontend @carolinemwood @jazzgrewal @paulushcgcj @DerekRoberts @gpascucci
/backend @carolinemwood @jazzgrewal @paulushcgcj @DerekRoberts @gpascucci

# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
2 changes: 1 addition & 1 deletion frontend/openshift.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ objects:
- name: LOG_LEVEL
value: "${LOG_LEVEL}"
- name: VITE_BACKEND_URL
value: "https://${NAME}-${ZONE}-backend.${DOMAIN}:443"
value: "https://${NAME}-${ZONE}-backend.${DOMAIN}"
- name: VITE_USER_POOLS_WEB_CLIENT_ID
value: "${VITE_USER_POOLS_WEB_CLIENT_ID}"
- name: VITE_ZONE
Expand Down
19 changes: 10 additions & 9 deletions frontend/src/components/FavouriteCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import React from 'react';
import { useNavigate } from 'react-router-dom';
import { Tile } from '@carbon/react';
import { ClickableTile } from '@carbon/react';
import * as Icons from '@carbon/icons-react';
import './styles.scss';

Expand All @@ -9,7 +7,8 @@ interface FavouriteCardProps {
title: string,
link: string,
icon: string,
description:String
description:string
disabled?: boolean
}

/**
Expand All @@ -28,16 +27,18 @@ function FavouriteCard ({
title,
link,
icon,
description
description,
disabled = false
}: FavouriteCardProps): JSX.Element {
const Icon = Icons[String(icon)];
const navigate = useNavigate();

return (
<Tile
<ClickableTile
id={`fav-card-${index}`}
className={'fav-card-main' }
tabIndex={index}
onClick={() => navigate(link)}
href={link}
disabled={disabled}
>
<div className="fav-card-header">
<Icon className="fav-card-icon" />
Expand All @@ -49,7 +50,7 @@ function FavouriteCard ({
<p className="fav-card-title-large">{title}</p>
<p className="fav-card-content-description">{description}</p>
</div>
</Tile>
</ClickableTile>
);
};

Expand Down
6 changes: 6 additions & 0 deletions frontend/src/components/FavouriteCard/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ p.fav-card-title-small {
display: none;
}

.bx--tile--clickable.bx--link--disabled, .bx--tile--clickable:hover.bx--link--disabled {
display: flex;
margin: 0.5rem;
padding: 1.25rem 1rem;
}

@media only screen and (max-width: 671px) {
.fav-card-main,
.fav-card-main-highlighted {
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/screens/DashboardRedirect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@ import { useSelector } from "react-redux";

const DashboardRedirect: React.FC = () => {
const userDetails = useSelector((state: RootState) => state.userDetails);
const selectedClientRoles = useSelector((state:any)=>state.selectedClientRoles)
const { user } = userDetails;

const navigate = useNavigate();

// Redirect logic based on selectedClientRoles existence
useEffect(() => {
if (user && selectedClientRoles) {
if (user) {
navigate("/opening");
}
}, [user, selectedClientRoles]);
}, [user]);

return (
<>
{user && selectedClientRoles ? (
{user ? (
<SideLayout pageContent={<Opening />} />
) : (
<LoginOrgSelection />
Expand Down
31 changes: 0 additions & 31 deletions frontend/src/screens/Landing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,37 +39,6 @@ const Landing: React.FC = () => {
<BCGovLogo />
</div>

<div className="">
<InlineNotification
icondescription="describes the close button"
subtitle="See the release notes to find out what's new"
title="New Release!"
kind="info"
lowContrast
className = "inline-notification"
/>
</div>
<div className="">
<InlineNotification
icondescription="describes the close button"
subtitle="SILVA will be offline for up to 4 hours time starting on June 30, 2023 at 9:00pm"
title="Upcoming maintenance"
kind="warning"
lowContrast
className = "inline-notification"
/>
</div>
<div className="">
<InlineNotification
icondescription="describes the close button"
subtitle="SILVA is expected to come back online on July 1, 2023 at 11:11am"
title="SILVA is down"
kind="error"
lowContrast
className = "inline-notification"
/>
</div>

{/* Welcome - Title and Subtitle */}
<div className="mt-5">
<h1 data-testid="landing-title" className="landing-title">Welcome to SILVA</h1>
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/screens/Opening/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,29 +53,32 @@ const Opening: React.FC = () => {
</div>
<div className="col-sm-6 col-md-6 col-lg-6 col-xl-6 col-xxl-3">
<FavouriteCard
index={1}
index={2}
title={'Create an opening'}
link="#"
icon={'MapBoundary'}
description={'Create different opening types to track silviculture activities, treatments and generate their identifier (ID)'}
disabled
/>
</div>
<div className="col-sm-6 col-md-6 col-lg-6 col-xl-6 col-xxl-3">
<FavouriteCard
index={1}
index={3}
title={'Reports'}
link="#"
icon={'ReportData'}
description={'Consult and manage opening reports'}
disabled
/>
</div>
<div className="col-sm-6 col-md-6 col-lg-6 col-xl-6 col-xxl-3">
<FavouriteCard
index={1}
index={4}
title={'Upcoming activities'}
link="#"
icon={'Activity'}
description={'Track opening activities and milestones'}
disabled
/>
</div>
</div>
Expand Down

0 comments on commit 209529f

Please sign in to comment.