Skip to content

Commit

Permalink
Merge branch 'develop' into bidirectional
Browse files Browse the repository at this point in the history
  • Loading branch information
rahul6603 authored Jun 17, 2024
2 parents e933dda + c87e283 commit 7178622
Show file tree
Hide file tree
Showing 27 changed files with 2,833 additions and 73 deletions.
1 change: 1 addition & 0 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import PrintBarcode from "./components/printBarcode/Index";
import NonConformIndex from "./components/nonconform/index";
import SampleBatchEntrySetup from "./components/batchOrderEntry/SampleBatchEntrySetup.js";
import AuditTrailReportIndex from "./components/reports/auditTrailReport/Index.js";
import OrganizationAddEdit from "./components/admin/OrganizationManagement/OrganizationAddModify.js";

export default function App() {
let i18nConfig = {
Expand Down
37 changes: 34 additions & 3 deletions frontend/src/components/admin/Admin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { useState, useEffect } from "react";
import config from "../../config.json";
import { FormattedMessage, useIntl, injectIntl } from "react-intl";
import "../Style.css";
Expand All @@ -23,6 +23,7 @@ import {
ListDropdown,
CicsSystemGroup,
QrCode,
ContainerSoftware,
} from "@carbon/icons-react";
import PathRoute from "../utils/PathRoute";
import CalculatedValue from "./calculatedValue/CalculatedValueForm";
Expand All @@ -35,15 +36,33 @@ import {
} from "@carbon/react";
import { CommonProperties } from "./menu/CommonProperties";
import ConfigMenuDisplay from "./formEntry/common/ConfigMenuDisplay";

import ProviderMenu from "./ProviderMenu/ProviderMenu";
import BarcodeConfiguration from "./barcodeConfiguration/BarcodeConfiguration";
import OrganizationManagament from "./OrganizationManagement/OrganizationManagement";
import OrganizationAddModify from "./OrganizationManagement/OrganizationAddModify.js";

function Admin() {
const intl = useIntl();
const [isSmallScreen, setIsSmallScreen] = useState(false);

useEffect(() => {
const mediaQuery = window.matchMedia("(max-width: 1024px)"); //applicable for medium screen and below for only small screen set max-width: 768px
const handleMediaQueryChange = () => setIsSmallScreen(mediaQuery.matches);

handleMediaQueryChange();
mediaQuery.addEventListener("change", handleMediaQueryChange);

return () =>
mediaQuery.removeEventListener("change", handleMediaQueryChange);
}, []);

return (
<>
<SideNav aria-label="Side navigation" expanded={true}>
<SideNav
aria-label="Side navigation"
defaultExpanded={true}
isRail={isSmallScreen}
>
<SideNavItems className="adminSideNav">
<SideNavMenu
renderIcon={Microscope}
Expand All @@ -68,6 +87,12 @@ function Admin() {
<SideNavLink renderIcon={QrCode} href="#barcodeConfiguration">
<FormattedMessage id="sidenav.label.admin.barcodeconfiguration" />
</SideNavLink>
<SideNavLink
renderIcon={ContainerSoftware}
href="#organizationManagement"
>
<FormattedMessage id="organization.main.title" />
</SideNavLink>
<SideNavMenu
title={intl.formatMessage({ id: "sidenav.label.admin.menu" })}
renderIcon={TableOfContents}
Expand Down Expand Up @@ -153,6 +178,12 @@ function Admin() {
<PathRoute path="#barcodeConfiguration">
<BarcodeConfiguration />
</PathRoute>
<PathRoute path="#organizationManagement">
<OrganizationManagament />
</PathRoute>
<PathRoute path="#organizationEdit">
<OrganizationAddModify />
</PathRoute>
<PathRoute path="#globalMenuManagement">
<GlobalMenuManagement />
</PathRoute>
Expand Down
Loading

0 comments on commit 7178622

Please sign in to comment.