Skip to content

Commit

Permalink
Merge pull request #1321 from mherman22/grid
Browse files Browse the repository at this point in the history
Fix admin management pages to use the fullwidth grid
  • Loading branch information
mozzy11 authored Jan 17, 2025
2 parents 1ca3111 + 9b5d2eb commit 808384b
Show file tree
Hide file tree
Showing 18 changed files with 154 additions and 57 deletions.
9 changes: 9 additions & 0 deletions frontend/src/components/admin/Admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,54 +285,63 @@ function Admin() {
<PathRoute path="#NonConformityConfigurationMenu">
<ConfigMenuDisplay
menuType="NonConformityConfigurationMenu"
label="Non Conformity Configuration Menu"
id="sidenav.label.admin.formEntry.nonconformityconfig"
/>
</PathRoute>
<PathRoute path="#MenuStatementConfigMenu">
<ConfigMenuDisplay
menuType="MenuStatementConfigMenu"
label="Menu Statement Configuration Menu"
id="sidenav.label.admin.formEntry.menustatementconfig"
/>
</PathRoute>
<PathRoute path="#ValidationConfigurationMenu">
<ConfigMenuDisplay
menuType="ValidationConfigurationMenu"
label="Validation Configuration Menu"
id="sidenav.label.admin.formEntry.validationconfig"
/>
</PathRoute>
<PathRoute path="#SampleEntryConfigurationMenu">
<ConfigMenuDisplay
menuType="SampleEntryConfigMenu"
label="Sample Entry Configuration Menu"
id="sidenav.label.admin.formEntry.sampleEntryconfig"
/>
</PathRoute>
<PathRoute path="#WorkPlanConfigurationMenu">
<ConfigMenuDisplay
menuType="WorkplanConfigurationMenu"
label="WorkPlan Configuration Menu"
id="sidenav.label.admin.formEntry.Workplanconfig"
/>
</PathRoute>
<PathRoute path="#SiteInformationMenu">
<ConfigMenuDisplay
menuType="SiteInformationMenu"
label="Site Information Menu"
id="sidenav.label.admin.formEntry.siteInfoconfig"
/>
</PathRoute>
<PathRoute path="#ResultConfigurationMenu">
<ConfigMenuDisplay
menuType="ResultConfigurationMenu"
label="Result Configuration Menu"
id="sidenav.label.admin.formEntry.resultConfig"
/>
</PathRoute>
<PathRoute path="#PatientConfigurationMenu">
<ConfigMenuDisplay
menuType="PatientConfigurationMenu"
label="Patient Configuration Menu"
id="sidenav.label.admin.formEntry.patientconfig"
/>
</PathRoute>
<PathRoute path="#PrintedReportsConfigurationMenu">
<ConfigMenuDisplay
menuType="PrintedReportsConfigurationMenu"
label="PrintedReports Configuration Menu"
id="sidenav.label.admin.formEntry.PrintedReportsconfig"
/>
</PathRoute>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ function BatchTestReassignmentAndCancelation() {
{notificationVisible === true ? <AlertDialog /> : ""}
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16} md={8} sm={4}>
<Section>
<Section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ import BarcodeConfigurationFormValues from "../../formModel/innitialValues/Barco
let breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "sidenav.label.admin.barcodeconfiguration",
link: "/MasterListsPage#barcodeConfiguration",
},
];
function BarcodeConfiguration() {
const { notificationVisible, setNotificationVisible, addNotification } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,14 @@ import {
} from "../../common/CustomNotification";
import PageBreadCrumb from "../../common/PageBreadCrumb";

const breadcrumbs = [{ label: "home.label", link: "/" }];
const breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "sidenav.label.admin.testmgt.calculated",
link: "/MasterListsPage#calculatedValue",
},
];
interface CalculatedValueProps {}

type TestListField = "TEST_RESULT" | "FINAL_RESULT";
Expand Down Expand Up @@ -623,7 +630,7 @@ const CalculatedValue: React.FC<CalculatedValueProps> = () => {
return (
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16}>
<Section>
<Heading>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import { FormattedMessage, useIntl } from "react-intl";
import PageBreadCrumb from "../../../common/PageBreadCrumb.js";
import GenericConfigEdit from "../../generalConfig/common/GenericConfigEdit.js";

let breadcrumbs = [{ label: "home.label", link: "/" }];
function ConfigMenuDisplay(props) {
const { notificationVisible, setNotificationVisible, addNotification } =
useContext(NotificationContext);
Expand All @@ -54,6 +53,12 @@ function ConfigMenuDisplay(props) {

const [ConfigEdit, setConfigEdit] = useState(false);

let breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{ label: `${props.label}`, link: `/MasterListsPage#${props.menuType}` },
];

function handleModify(event) {
event.preventDefault();
setConfigEdit(true);
Expand Down Expand Up @@ -185,7 +190,7 @@ function ConfigMenuDisplay(props) {
{notificationVisible === true ? <AlertDialog /> : ""}
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16} md={8} sm={4}>
<Section>
<Heading>
Expand Down
13 changes: 10 additions & 3 deletions frontend/src/components/admin/labNumber/LabNumberManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@ import { FormattedMessage, useIntl } from "react-intl";
import { ConfigurationContext } from "../../layout/Layout";
import PageBreadCrumb from "../../common/PageBreadCrumb.js";

let breadcrumbs = [{ label: "home.label", link: "/" }];
let breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "sidenav.label.admin.labNumber",
link: "/MasterListsPage#labNumber",
},
];
function LabNumberManagement() {
const intl = useIntl();

Expand Down Expand Up @@ -159,7 +166,7 @@ function LabNumberManagement() {
{loading && <Loading />}
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16}>
<Section>
<Heading>
Expand All @@ -169,7 +176,7 @@ function LabNumberManagement() {
</Column>
</Grid>
<Form onSubmit={handleSubmit}>
<Grid>
<Grid fullWidth={true}>
<Column lg={8}>
<Select
id="lab_number_type"
Expand Down
12 changes: 10 additions & 2 deletions frontend/src/components/admin/menu/BillingMenuManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ import {
import { FormattedMessage, useIntl } from "react-intl";
import PageBreadCrumb from "../../common/PageBreadCrumb.js";

let breadcrumbs = [{ label: "home.label", link: "/" }];
let breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "Billing Menu Management",
link: "/MasterListsPage#billingMenuManagement",
},
];
function BillingMenuManagement() {
const { notificationVisible, setNotificationVisible, addNotification } =
useContext(NotificationContext);
Expand Down Expand Up @@ -87,13 +94,14 @@ function BillingMenuManagement() {
{loading && <Loading />}
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16} md={8} sm={4}>
<Section>
<Heading>
<FormattedMessage id="menu.billing.title" />
</Heading>
</Section>
<br />
<Section>
<Form onSubmit={handleSubmit}>
<div className="formInlineDiv">
Expand Down
11 changes: 10 additions & 1 deletion frontend/src/components/admin/menu/CommonProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ export const CommonProperties = () => {
<>
<div className="adminPageContent">
{notificationVisible === true ? <AlertDialog /> : ""}
<PageBreadCrumb breadcrumbs={[{ label: "home.label", link: "/" }]} />
<PageBreadCrumb
breadcrumbs={[
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "common properties",
link: "/MasterListsPage#commonproperties",
},
]}
/>
<Grid fullWidth={true}>
<Column lg={16} md={8} sm={4}>
<Section>
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/admin/menu/DictionaryManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@ function DictionaryManagement() {
<PageBreadCrumb
breadcrumbs={[
{ label: "home.label", link: "/" },
{ label: "dictionary.label.modify", link: "/DictionaryManagement" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "dictionary.label.modify",
link: "/MasterListsPage#DictionaryManagement",
},
]}
/>
<Grid fullWidth={true}>
Expand Down
11 changes: 9 additions & 2 deletions frontend/src/components/admin/menu/GlobalMenuManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ import {
import { FormattedMessage, useIntl } from "react-intl";
import PageBreadCrumb from "../../common/PageBreadCrumb.js";

let breadcrumbs = [{ label: "home.label", link: "/" }];
let breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "Global Menu Management",
link: "/MasterListsPage#globalMenuManagement",
},
];
function GlobalMenuManagement() {
const { notificationVisible, setNotificationVisible, addNotification } =
useContext(NotificationContext);
Expand Down Expand Up @@ -103,7 +110,7 @@ function GlobalMenuManagement() {
{loading && <Loading />}
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16}>
<Section>
<Heading>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ import {
import { FormattedMessage, useIntl } from "react-intl";
import PageBreadCrumb from "../../common/PageBreadCrumb.js";

let breadcrumbs = [{ label: "home.label", link: "/" }];
let breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "Non Conformity Menu Management",
link: "/MasterListsPage#nonConformityMenuManagement",
},
];
function NonConformityMenuManagement() {
const { notificationVisible, setNotificationVisible, addNotification } =
useContext(NotificationContext);
Expand Down Expand Up @@ -86,7 +93,7 @@ function NonConformityMenuManagement() {
{loading && <Loading />}
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16}>
<Section>
<Heading>
Expand Down
11 changes: 9 additions & 2 deletions frontend/src/components/admin/menu/PatientMenuManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ import {
import { FormattedMessage, useIntl } from "react-intl";
import PageBreadCrumb from "../../common/PageBreadCrumb.js";

let breadcrumbs = [{ label: "home.label", link: "/" }];
let breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "sidenav.label.admin.menu.patient",
link: "/MasterListsPage#patientMenuManagement",
},
];
function PatientMenuManagement() {
const { notificationVisible, setNotificationVisible, addNotification } =
useContext(NotificationContext);
Expand Down Expand Up @@ -85,7 +92,7 @@ function PatientMenuManagement() {
{notificationVisible === true ? <AlertDialog /> : ""}
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16}>
<Section>
<Heading>
Expand Down
11 changes: 9 additions & 2 deletions frontend/src/components/admin/menu/StudyMenuManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ import {
import { FormattedMessage, useIntl } from "react-intl";
import PageBreadCrumb from "../../common/PageBreadCrumb.js";

let breadcrumbs = [{ label: "home.label", link: "/" }];
let breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "sidenav.label.admin.menu.study",
link: "/MasterListsPage#studyMenuManagement",
},
];

function StudyMenuManagement() {
const { notificationVisible, setNotificationVisible, addNotification } =
Expand Down Expand Up @@ -196,7 +203,7 @@ function StudyMenuManagement() {
{loading && <Loading />}
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16}>
<Section>
<Heading>
Expand Down
13 changes: 10 additions & 3 deletions frontend/src/components/admin/program/ProgramManagement.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ import {
import { FormattedMessage, useIntl } from "react-intl";
import PageBreadCrumb from "../../common/PageBreadCrumb.js";

let breadcrumbs = [{ label: "home.label", link: "/" }];
let breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "sidenav.label.admin.program",
link: "/MasterListsPage#program",
},
];
function ProgramManagement() {
const { notificationVisible, setNotificationVisible, addNotification } =
useContext(NotificationContext);
Expand Down Expand Up @@ -172,7 +179,7 @@ function ProgramManagement() {
{notificationVisible === true ? <AlertDialog /> : ""}
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16}>
<Section>
<Heading>
Expand All @@ -182,7 +189,7 @@ function ProgramManagement() {
</Column>
</Grid>
<Form onSubmit={handleSubmit}>
<Grid>
<Grid fullWidth={true}>
<Column lg={8}>
<Select
id="additionalQuestionsSelect"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ import { Grid, Column, Section, Heading } from "@carbon/react";
import { FormattedMessage } from "react-intl";
import PageBreadCrumb from "../../common/PageBreadCrumb";

const breadcrumbs = [{ label: "home.label", link: "/" }];
const breadcrumbs = [
{ label: "home.label", link: "/" },
{ label: "breadcrums.admin.managment", link: "/MasterListsPage" },
{
label: "sidenav.label.admin.testmgt.reflex",
link: "/MasterListsPage#reflex",
},
];

function ReflexTestManagement() {
return (
<>
<div className="adminPageContent">
<PageBreadCrumb breadcrumbs={breadcrumbs} />
<Grid>
<Grid fullWidth={true}>
<Column lg={16}>
<Section>
<Heading>
Expand Down
Loading

0 comments on commit 808384b

Please sign in to comment.