Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ workflows:
- CORE-635
- feat/review
- feat/system-admin
- pm-1365_1
- pm-1503_2

- deployQa:
context: org-global
Expand Down
6 changes: 6 additions & 0 deletions src/apps/review/src/lib/hooks/useFetchScorecard.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { toast } from 'react-toastify'
import useSWR, { SWRResponse } from 'swr'

import { EnvironmentConfig } from '~/config'
Expand All @@ -21,6 +22,11 @@ export function useFetchScorecard(id: string | undefined): ScorecardResponse {
// eslint-disable-next-line unicorn/no-null
id ? `${baseUrl}/scorecards/${id}` : null,
fetcher,
{
onError: err => {
toast.error(err.message)
},
},
)

return {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '@libs/ui/styles/includes';

.container {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -50,4 +52,10 @@
flex-direction: column;
}
}
}
}

@media (max-width: #{$lg-max}) {
.container {
flex-direction: column;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
.group {
.heading {
.groupInfo {
flex-direction: column;
flex-direction: row;
.name {
margin-bottom: 8px;
margin-bottom: 0px;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@
.section {
.heading {
.sectionInfo {
flex-direction: column;
flex-direction: row;
.name {
margin-bottom: 4px;
margin-bottom: 0px;
}
}
}
.questions {
.question {
flex-direction: column;
flex-direction: row;
.left {
.detailItemsWrapper {
.detailItem {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ const ViewScorecardPage: FC = () => {
const { profile }: ProfileContextData = useContext(profileContext)
const isAdmin = profile?.roles.includes(UserRole.administrator)
const breadCrumb = useMemo(
() => [{ index: 1, label: 'Scorecards', path: '/review/scorecard' }, { index: 2, label: 'Scorecards Details' }],
() => [{ index: 1, label: 'Scorecards', path: '/scorecard' }, { index: 2, label: 'Scorecards Details' }],
[],
)

const scorecardQuery = useFetchScorecard(scorecardId)

return (
<PageWrapper
pageTitle='Software General Review Scorecard'
pageTitle={(scorecardQuery.scorecard && scorecardQuery.scorecard.name) || ''}
breadCrumb={breadCrumb}
rightHeader={isAdmin && (
<LinkButton
Expand Down
15 changes: 8 additions & 7 deletions src/apps/review/src/review-app.routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ export const reviewRoutes: ReadonlyArray<PlatformRoute> = [
route: activeReviewAssigmentsRouteId,
},
{
authRequired: true,
children: [
{
authRequired: true,
Expand All @@ -110,21 +109,23 @@ export const reviewRoutes: ReadonlyArray<PlatformRoute> = [
route: '',
},
{
authRequired: false,
element: <ViewScorecardPage />,
id: 'view-scorecard-page',
route: ':scorecardId',
},
{
authRequired: true,
element: <EditScorecardPage />,
id: 'edit-scorecard-page',
route: ':scorecardId/edit',
},
{
authRequired: true,
element: <EditScorecardPage />,
id: 'new-scorecard-page',
route: 'new',
},
{
authRequired: false,
element: <ViewScorecardPage />,
id: 'view-scorecard-page',
route: ':scorecardId',
},

],
element: <ScorecardsContainer />,
Expand Down