diff --git a/client/app/App.scss b/client/app/App.scss index e8c273095..fe46ec3b4 100644 --- a/client/app/App.scss +++ b/client/app/App.scss @@ -1,6 +1,7 @@ @tailwind base; @tailwind components; @tailwind utilities; + :root { --bs-card-cap-padding-y: 0; --haztrak-info: #33cccc; @@ -104,7 +105,8 @@ $info: #009999; } } -body { +html, body { + height: 100%; margin: 0; font-family: var(--bs-body-font-family); font-size: var(--bs-body-font-size); diff --git a/client/app/App.tsx b/client/app/App.tsx index 0e3bf50c8..257fba3bd 100644 --- a/client/app/App.tsx +++ b/client/app/App.tsx @@ -1,5 +1,5 @@ -import { HtSpinner } from 'app/components/legacyUi'; -import React, { ReactElement, Suspense } from 'react'; +import { HtSpinner } from '~/components/legacyUi'; +import { ReactElement, Suspense } from 'react'; import { Container } from 'react-bootstrap'; import { RouterProvider } from 'react-router-dom'; import { ToastContainer } from 'react-toastify'; diff --git a/client/app/components/Auth/LoginForm.tsx b/client/app/components/Auth/LoginForm.tsx index e95d8f169..af96d87b6 100644 --- a/client/app/components/Auth/LoginForm.tsx +++ b/client/app/components/Auth/LoginForm.tsx @@ -1,6 +1,6 @@ import { zodResolver } from '@hookform/resolvers/zod'; -import { HtForm, HtSpinner } from 'app/components/legacyUi'; -import React from 'react'; +import { HtForm, HtSpinner } from '~/components/legacyUi'; + import { FloatingLabel, Form } from 'react-bootstrap'; import { useForm } from 'react-hook-form'; import { z } from 'zod'; diff --git a/client/app/components/Charts/ManifestCountBarChart/ManifestCountBarChart.tsx b/client/app/components/Charts/ManifestCountBarChart/ManifestCountBarChart.tsx index af075de38..d941ea4c9 100644 --- a/client/app/components/Charts/ManifestCountBarChart/ManifestCountBarChart.tsx +++ b/client/app/components/Charts/ManifestCountBarChart/ManifestCountBarChart.tsx @@ -73,17 +73,13 @@ const data = [ }, ]; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const monthTickFormatter = (tick: any) => { const date = new Date(tick); return date.getMonth() + 1; }; -const renderQuarterTick = ( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - tickProps: any -): ReactElement => { +const renderQuarterTick = (tickProps: any): ReactElement => { const { x, y, payload } = tickProps; const { value, offset } = payload; const date = new Date(value); diff --git a/client/app/components/Charts/ManifestStatusPieChart/ManifestStatusPieChart.tsx b/client/app/components/Charts/ManifestStatusPieChart/ManifestStatusPieChart.tsx index 8b4953466..903acffac 100644 --- a/client/app/components/Charts/ManifestStatusPieChart/ManifestStatusPieChart.tsx +++ b/client/app/components/Charts/ManifestStatusPieChart/ManifestStatusPieChart.tsx @@ -17,7 +17,7 @@ const data: Entry[] = [ { name: 'Pending', value: 40, searchParam: 'pending' }, { name: 'Scheduled', value: 39, searchParam: 'scheduled' }, { name: 'In Transit', value: 33, searchParam: 'intransit' }, - { name: 'Ready for TSDF Signature', value: 21, searchParam: 'readyforsignature' }, + { name: 'Ready Signature', value: 21, searchParam: 'readyforsignature' }, ]; const inactiveAlpha = '1'; @@ -54,7 +54,6 @@ const calculateCoordinates = ( }; }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const renderCustomLabel = (props: any): ReactElement | null => { const { cx, cy, midAngle, outerRadius, value, hover, activeIndex, index } = props; const { sin, cos } = calculateTrig(midAngle); @@ -84,7 +83,6 @@ const renderCustomLabel = (props: any): ReactElement | null => { return activeIndex !== index ? labelElement : null; }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const renderOuterRing = (props: any): ReactElement => { const { cx, cy, midAngle, outerRadius, startAngle, endAngle, fill, payload, percent } = props; const { sin, cos } = calculateTrig(midAngle); @@ -147,7 +145,7 @@ const renderOuterRing = (props: any): ReactElement => { }; /** Render the currently focused pie slice*/ -// eslint-disable-next-line @typescript-eslint/no-explicit-any + const renderActiveShape = (props: any): ReactElement => { const { cx, cy, midAngle, innerRadius, outerRadius, startAngle, endAngle, fill, onClick } = props; const { sin, cos } = calculateTrig(midAngle); @@ -173,62 +171,38 @@ const renderActiveShape = (props: any): ReactElement => { ); }; -// eslint-disable-next-line @typescript-eslint/no-explicit-any const renderLegend = (props: any): ReactElement => { const { payload, handleMouseEnter, handleMouseLeave, handleClick } = props; return ( -
-
    - {/* eslint-disable-next-line @typescript-eslint/no-explicit-any*/} - {payload.map((entry: any, index: number) => { - const dataEntry = data.find((d) => d.name === entry.value); - const activeAlphaColor = entry.color.slice( - entry.color.lastIndexOf(' ') + 1, - entry.color.length - 1 - ); - const activeLegend = activeAlphaColor === activeAlpha; - const baseStyle = { color: entry.color, paddingBottom: '2px' }; - const spanStyle = activeLegend ? { ...baseStyle, borderBottom: `2px solid` } : baseStyle; +
    + {payload.map((entry: any, index: number) => { + const dataEntry = data.find((d) => d.name === entry.value); + const activeAlphaColor = entry.color.slice( + entry.color.lastIndexOf(' ') + 1, + entry.color.length - 1 + ); + const activeLegend = activeAlphaColor === activeAlpha; + const baseStyle = { color: entry.color, paddingBottom: '2px' }; + const spanStyle = activeLegend ? { ...baseStyle, borderBottom: `2px solid` } : baseStyle; - return ( - - ); - })} -
+ return ( + + ); + })}
); }; @@ -239,7 +213,6 @@ export function ManifestStatusPieChart() { const navigate = useNavigate(); const handleMouseEnter = useCallback( - // eslint-disable-next-line @typescript-eslint/no-explicit-any (_: any, index: number) => { setAnimationIsActive(false); // stop animation if impatient user setActiveIndex(index); @@ -252,7 +225,6 @@ export function ManifestStatusPieChart() { setActiveIndex(-1); }, [setActiveIndex]); - // eslint-disable-next-line @typescript-eslint/no-explicit-any const renderLabel = (props: any) => { return renderCustomLabel({ ...props, hover: false, activeIndex: activeIndex }); }; @@ -268,7 +240,6 @@ export function ManifestStatusPieChart() { renderLegend({ ...props, handleMouseEnter, handleMouseLeave, handleClick }) } diff --git a/client/app/components/Error/Error404.tsx b/client/app/components/Error/Error404.tsx index 1da2682cc..ec63b8521 100644 --- a/client/app/components/Error/Error404.tsx +++ b/client/app/components/Error/Error404.tsx @@ -1,5 +1,4 @@ import robotRedX from '/assets/img/robot/robot-bad-sign.jpg'; -import React from 'react'; export function Error404() { return ( diff --git a/client/app/components/Help/HaztrakLicense.tsx b/client/app/components/Help/HaztrakLicense.tsx index 292222b85..33a0926b3 100644 --- a/client/app/components/Help/HaztrakLicense.tsx +++ b/client/app/components/Help/HaztrakLicense.tsx @@ -1,35 +1,31 @@ -import { HtCard } from 'app/components/legacyUi'; -import React from 'react'; +import { Card, CardContent } from '~/components/ui'; export function HaztrakLicense() { return ( - - -
-

MIT License

-

Copyright (c) 2022 U.S. Environmental Protection Agency

-

- Permission is hereby granted, free of charge, to any person obtaining a copy of this - software and associated documentation files (the "Software"), to deal in the Software - without restriction, including without limitation the rights to use, copy, modify, - merge, publish, distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to the following - conditions: -

-

- The above copyright notice and this permission notice shall be included in all copies or - substantial portions of the Software. -

-

- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT - OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - OTHER DEALINGS IN THE SOFTWARE. -

-
-
-
+ + +

MIT License

+

Copyright (c) 2022 U.S. Environmental Protection Agency

+

+ Permission is hereby granted, free of charge, to any person obtaining a copy of this + software and associated documentation files (the "Software"), to deal in the Software + without restriction, including without limitation the rights to use, copy, modify, merge, + publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons + to whom the Software is furnished to do so, subject to the following conditions: +

+

+ The above copyright notice and this permission notice shall be included in all copies or + substantial portions of the Software. +

+

+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE + FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. +

+
+
); } diff --git a/client/app/components/Help/SectionTitle.tsx b/client/app/components/Help/SectionTitle.tsx index f863f2b8c..2f9125669 100644 --- a/client/app/components/Help/SectionTitle.tsx +++ b/client/app/components/Help/SectionTitle.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - /** A section title for the textual content such as About and help content*/ export function SectionTitle({ title, @@ -9,8 +7,8 @@ export function SectionTitle({ variant?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; }) { return ( -
-

+
+

- + }> diff --git a/client/app/components/Layout/Sidebar/Sidebar.spec.tsx b/client/app/components/Layout/Sidebar/Sidebar.spec.tsx index d56dd1e30..3d9551a12 100644 --- a/client/app/components/Layout/Sidebar/Sidebar.spec.tsx +++ b/client/app/components/Layout/Sidebar/Sidebar.spec.tsx @@ -1,6 +1,6 @@ import { Sidebar } from '~/components/Layout/Sidebar/Sidebar'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { afterEach, describe, expect, test } from 'vitest'; afterEach(() => { diff --git a/client/app/components/Layout/Sidebar/Sidebar.tsx b/client/app/components/Layout/Sidebar/Sidebar.tsx index 91452194d..7cb9e6fb1 100644 --- a/client/app/components/Layout/Sidebar/Sidebar.tsx +++ b/client/app/components/Layout/Sidebar/Sidebar.tsx @@ -1,11 +1,11 @@ import logo from '/assets/img/haztrak-logos/haztrak-logo-zip-file/png/logo-black-crop.png'; -import { NavSection } from '~/components/Layout/Nav/NavSection'; -import { NavItem } from '~/components/Layout/Nav/NavItem'; -import { NavContext, NavContextProps } from '~/components/Layout/Root'; import React, { ReactElement, useContext } from 'react'; import { Link } from 'react-router-dom'; -import { routes } from './SidebarRoutes'; +import { NavItem } from '~/components/Layout/Nav/NavItem'; +import { NavSection } from '~/components/Layout/Nav/NavSection'; +import { NavContext, NavContextProps } from '~/components/Layout/Root'; import { Sheet, SheetContent, SheetHeader, SheetTitle } from '~/components/ui'; +import { routes } from './SidebarRoutes'; /** Vertical sidebar for navigation that disappears when the viewport is small*/ export function Sidebar(): ReactElement | null { diff --git a/client/app/components/Layout/TopNav/TopNav.spec.tsx b/client/app/components/Layout/TopNav/TopNav.spec.tsx index fad0ab918..23751eeb1 100644 --- a/client/app/components/Layout/TopNav/TopNav.spec.tsx +++ b/client/app/components/Layout/TopNav/TopNav.spec.tsx @@ -1,5 +1,5 @@ -import { cleanup, renderWithProviders, screen } from 'app/mocks'; -import React from 'react'; +import { cleanup, renderWithProviders, screen } from '~/mocks'; + import { afterEach, describe, expect, test } from 'vitest'; import { TopNav } from '~/components/Layout/TopNav/TopNav'; diff --git a/client/app/components/Layout/TopNav/TopNav.tsx b/client/app/components/Layout/TopNav/TopNav.tsx index 5922061c9..d177415b0 100644 --- a/client/app/components/Layout/TopNav/TopNav.tsx +++ b/client/app/components/Layout/TopNav/TopNav.tsx @@ -30,57 +30,64 @@ export function TopNav() { }; return ( -
+
+ +
+
+ + + + + + + + + Profile + + + + + + Log out + + + +
+ + ); } diff --git a/client/app/components/Manifest/Actions/ManifestCancelBtn.tsx b/client/app/components/Manifest/Actions/ManifestCancelBtn.tsx index a70b42e07..28c80a578 100644 --- a/client/app/components/Manifest/Actions/ManifestCancelBtn.tsx +++ b/client/app/components/Manifest/Actions/ManifestCancelBtn.tsx @@ -1,9 +1,8 @@ -import { faTrash } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { HtButton } from 'app/components/legacyUi'; import React, { useContext } from 'react'; import { useFormContext } from 'react-hook-form'; +import { FaTrash } from 'react-icons/fa'; import { useNavigate } from 'react-router-dom'; +import { HtButton } from '~/components/legacyUi'; import { ManifestContext } from '~/components/Manifest/ManifestForm'; import { Manifest } from '~/components/Manifest/manifestSchema'; import { useReadOnly } from '~/hooks/manifest'; @@ -29,7 +28,7 @@ export function ManifestCancelBtn() { }} > Cancel - + ); } diff --git a/client/app/components/Manifest/Actions/ManifestEditBtn.tsx b/client/app/components/Manifest/Actions/ManifestEditBtn.tsx index 0d58d9182..e5abf1e4b 100644 --- a/client/app/components/Manifest/Actions/ManifestEditBtn.tsx +++ b/client/app/components/Manifest/Actions/ManifestEditBtn.tsx @@ -1,9 +1,8 @@ -import { faPenToSquare } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { HtButton } from 'app/components/legacyUi'; import React, { useContext } from 'react'; import { ButtonProps } from 'react-bootstrap'; +import { FaPenToSquare } from 'react-icons/fa6'; import { useNavigate } from 'react-router-dom'; +import { HtButton } from '~/components/legacyUi'; import { ManifestContext } from '~/components/Manifest/ManifestForm'; import { useReadOnly } from '~/hooks/manifest'; @@ -23,7 +22,7 @@ export function ManifestEditBtn({ children: _unused, ...props }: ManifestEditBtn return ( Edit - + ); } diff --git a/client/app/components/Manifest/Actions/ManifestFABs.spec.tsx b/client/app/components/Manifest/Actions/ManifestFABs.spec.tsx index 7b940ed57..f8ea28c3d 100644 --- a/client/app/components/Manifest/Actions/ManifestFABs.spec.tsx +++ b/client/app/components/Manifest/Actions/ManifestFABs.spec.tsx @@ -2,8 +2,8 @@ import { ManifestFABs } from '~/components/Manifest/Actions/ManifestFABs'; import { ManifestContext } from '~/components/Manifest/ManifestForm'; import { ManifestStatus } from '~/components/Manifest/manifestSchema'; import { useReadOnly } from '~/hooks/manifest'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { afterEach, describe, expect, test } from 'vitest'; const TestComponent = ({ diff --git a/client/app/components/Manifest/Actions/ManifestFABs.tsx b/client/app/components/Manifest/Actions/ManifestFABs.tsx index 66639272e..0e8ca342a 100644 --- a/client/app/components/Manifest/Actions/ManifestFABs.tsx +++ b/client/app/components/Manifest/Actions/ManifestFABs.tsx @@ -1,4 +1,4 @@ -import { FloatingActionBtn } from 'app/components/legacyUi'; +import { FloatingActionBtn } from '~/components/legacyUi'; import React, { ReactElement, useContext } from 'react'; import { ManifestEditBtn } from '~/components/Manifest/Actions/ManifestEditBtn'; import { ManifestSaveBtn } from '~/components/Manifest/Actions/ManifestSaveBtn'; diff --git a/client/app/components/Manifest/Actions/ManifestSaveBtn.tsx b/client/app/components/Manifest/Actions/ManifestSaveBtn.tsx index 0a04cad2b..ee79b8d70 100644 --- a/client/app/components/Manifest/Actions/ManifestSaveBtn.tsx +++ b/client/app/components/Manifest/Actions/ManifestSaveBtn.tsx @@ -1,8 +1,6 @@ -import { faFloppyDisk } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { HtButton } from 'app/components/legacyUi'; -import React from 'react'; import { ButtonProps } from 'react-bootstrap'; +import { FaFloppyDisk } from 'react-icons/fa6'; +import { HtButton } from '~/components/legacyUi'; import { useReadOnly } from '~/hooks/manifest'; interface ManifestSaveBtnProps extends ButtonProps {} @@ -13,7 +11,7 @@ export function ManifestSaveBtn({ children: _unused, ...props }: ManifestSaveBtn return ( Save - + ); } diff --git a/client/app/components/Manifest/AdditionalInfo/AdditionalInfoForm.tsx b/client/app/components/Manifest/AdditionalInfo/AdditionalInfoForm.tsx index 1be4913de..8cbaa17d9 100644 --- a/client/app/components/Manifest/AdditionalInfo/AdditionalInfoForm.tsx +++ b/client/app/components/Manifest/AdditionalInfo/AdditionalInfoForm.tsx @@ -1,9 +1,7 @@ -import { faTimesCircle } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { HtForm } from 'app/components/legacyUi'; -import React from 'react'; import { Button, Col, Form, Row } from 'react-bootstrap'; import { useFieldArray, useFormContext } from 'react-hook-form'; +import { FaTimesCircle } from 'react-icons/fa'; +import { HtForm } from '~/components/legacyUi'; import { Manifest } from '~/components/Manifest'; import { WasteLine } from '~/components/Manifest/WasteLine'; import { useReadOnly } from '~/hooks/manifest'; @@ -104,7 +102,7 @@ export function AdditionalInfoForm() { remove(index); }} > - + diff --git a/client/app/components/Manifest/AdditionalInfo/AdditionalinfoForm.spec.tsx b/client/app/components/Manifest/AdditionalInfo/AdditionalinfoForm.spec.tsx index 6ced7a232..150e1c90a 100644 --- a/client/app/components/Manifest/AdditionalInfo/AdditionalinfoForm.spec.tsx +++ b/client/app/components/Manifest/AdditionalInfo/AdditionalinfoForm.spec.tsx @@ -1,7 +1,7 @@ import { fireEvent } from '@testing-library/react'; import { AdditionalInfoForm } from '~/components/Manifest/AdditionalInfo'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { afterEach, describe, expect, test } from 'vitest'; afterEach(() => { diff --git a/client/app/components/Manifest/Address/AddressForm.spec.tsx b/client/app/components/Manifest/Address/AddressForm.spec.tsx index de62d97eb..38fb4e5b8 100644 --- a/client/app/components/Manifest/Address/AddressForm.spec.tsx +++ b/client/app/components/Manifest/Address/AddressForm.spec.tsx @@ -1,5 +1,4 @@ -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { AddressForm } from './AddressForm'; import { afterEach, describe, test, expect } from 'vitest'; diff --git a/client/app/components/Manifest/Address/AddressForm.tsx b/client/app/components/Manifest/Address/AddressForm.tsx index f143ebf5f..390c83652 100644 --- a/client/app/components/Manifest/Address/AddressForm.tsx +++ b/client/app/components/Manifest/Address/AddressForm.tsx @@ -1,5 +1,4 @@ import { GeneratorAddress } from '~/components/Manifest/Address/GeneratorAddress'; -import React from 'react'; interface Props { addressType: 'siteAddress' | 'mailingAddress'; diff --git a/client/app/components/Manifest/Address/GeneratorAddress.tsx b/client/app/components/Manifest/Address/GeneratorAddress.tsx index 9e3892964..7e1d5894c 100644 --- a/client/app/components/Manifest/Address/GeneratorAddress.tsx +++ b/client/app/components/Manifest/Address/GeneratorAddress.tsx @@ -1,5 +1,5 @@ import { ErrorMessage } from '@hookform/error-message'; -import { HtForm } from 'app/components/legacyUi'; +import { HtForm } from '~/components/legacyUi'; import React, { useContext } from 'react'; import { Col, Form, Row } from 'react-bootstrap'; import { Controller, FieldError, FieldErrorsImpl, Merge, useFormContext } from 'react-hook-form'; diff --git a/client/app/components/Manifest/Contact/ContactForm.spec.tsx b/client/app/components/Manifest/Contact/ContactForm.spec.tsx index f8c591a9f..5863f8990 100644 --- a/client/app/components/Manifest/Contact/ContactForm.spec.tsx +++ b/client/app/components/Manifest/Contact/ContactForm.spec.tsx @@ -1,5 +1,4 @@ -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { ContactForm } from './ContactForm'; import { afterEach, describe, test, expect } from 'vitest'; diff --git a/client/app/components/Manifest/Contact/ContactForm.tsx b/client/app/components/Manifest/Contact/ContactForm.tsx index 67ed29178..00c2c4207 100644 --- a/client/app/components/Manifest/Contact/ContactForm.tsx +++ b/client/app/components/Manifest/Contact/ContactForm.tsx @@ -1,5 +1,5 @@ -import { HtForm } from 'app/components/legacyUi'; -import React from 'react'; +import { HtForm } from '~/components/legacyUi'; + import { Col, Form, Row } from 'react-bootstrap'; import { useFormContext } from 'react-hook-form'; import { Manifest } from '~/components/Manifest'; diff --git a/client/app/components/Manifest/Contact/PhoneForm.spec.tsx b/client/app/components/Manifest/Contact/PhoneForm.spec.tsx index 3788c78d5..4c889b2d1 100644 --- a/client/app/components/Manifest/Contact/PhoneForm.spec.tsx +++ b/client/app/components/Manifest/Contact/PhoneForm.spec.tsx @@ -1,6 +1,6 @@ import { PhoneForm } from '~/components/Manifest/Contact'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { afterEach, describe, expect, test } from 'vitest'; afterEach(() => { diff --git a/client/app/components/Manifest/Contact/PhoneForm.tsx b/client/app/components/Manifest/Contact/PhoneForm.tsx index 23b1f238e..7c6ec2cea 100644 --- a/client/app/components/Manifest/Contact/PhoneForm.tsx +++ b/client/app/components/Manifest/Contact/PhoneForm.tsx @@ -1,4 +1,4 @@ -import { HtForm } from 'app/components/legacyUi'; +import { HtForm } from '~/components/legacyUi'; import React, { useState } from 'react'; import { Col, Form, Row } from 'react-bootstrap'; import { useFormContext } from 'react-hook-form'; diff --git a/client/app/components/Manifest/GeneralInfo/GeneralInfoForm.spec.tsx b/client/app/components/Manifest/GeneralInfo/GeneralInfoForm.spec.tsx index df833a5e6..4a0bb192e 100644 --- a/client/app/components/Manifest/GeneralInfo/GeneralInfoForm.spec.tsx +++ b/client/app/components/Manifest/GeneralInfo/GeneralInfoForm.spec.tsx @@ -1,5 +1,4 @@ -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { afterEach, describe, expect, test } from 'vitest'; import { GeneralInfoForm } from './GeneralInfoForm'; diff --git a/client/app/components/Manifest/GeneralInfo/GeneralInfoForm.tsx b/client/app/components/Manifest/GeneralInfo/GeneralInfoForm.tsx index d630979e8..119708cf9 100644 --- a/client/app/components/Manifest/GeneralInfo/GeneralInfoForm.tsx +++ b/client/app/components/Manifest/GeneralInfo/GeneralInfoForm.tsx @@ -1,5 +1,5 @@ -import { HtForm, InfoIconTooltip } from 'app/components/legacyUi'; -import React from 'react'; +import { HtForm, InfoIconTooltip } from '~/components/legacyUi'; + import { Col, Form, Row } from 'react-bootstrap'; import { useFormContext } from 'react-hook-form'; import { ManifestStatusSelect } from '~/components/Manifest/GeneralInfo/ManifestStatusSelect'; diff --git a/client/app/components/Manifest/GeneralInfo/ManifestStatusSelect.spec.tsx b/client/app/components/Manifest/GeneralInfo/ManifestStatusSelect.spec.tsx index 194507149..163e0100e 100644 --- a/client/app/components/Manifest/GeneralInfo/ManifestStatusSelect.spec.tsx +++ b/client/app/components/Manifest/GeneralInfo/ManifestStatusSelect.spec.tsx @@ -2,11 +2,11 @@ import userEvent from '@testing-library/user-event'; import { ManifestStatusSelect } from '~/components/Manifest/GeneralInfo/ManifestStatusSelect'; import { http, HttpResponse } from 'msw'; import { setupServer } from 'msw/node'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { createMockHandler, createMockSite } from '~/mocks/fixtures'; import { createMockProfileResponse } from '~/mocks/fixtures/mockUser'; -import { mockUserEndpoints } from 'app/mocks/handlers'; +import { mockUserEndpoints } from '~/mocks/handlers'; import { API_BASE_URL } from '~/mocks/handlers/mockSiteEndpoints'; import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest'; diff --git a/client/app/components/Manifest/GeneralInfo/ManifestStatusSelect.tsx b/client/app/components/Manifest/GeneralInfo/ManifestStatusSelect.tsx index 694941d82..076f71cea 100644 --- a/client/app/components/Manifest/GeneralInfo/ManifestStatusSelect.tsx +++ b/client/app/components/Manifest/GeneralInfo/ManifestStatusSelect.tsx @@ -1,5 +1,5 @@ -import { HtForm, InfoIconTooltip } from 'app/components/legacyUi'; -import React from 'react'; +import { HtForm, InfoIconTooltip } from '~/components/legacyUi'; + import { Controller, useFormContext } from 'react-hook-form'; import Select, { SingleValue } from 'react-select'; import { Manifest, ManifestStatus } from '~/components/Manifest/manifestSchema'; diff --git a/client/app/components/Manifest/GeneralInfo/ManifestTypeField.spec.tsx b/client/app/components/Manifest/GeneralInfo/ManifestTypeField.spec.tsx index 82dc46d54..531a506f8 100644 --- a/client/app/components/Manifest/GeneralInfo/ManifestTypeField.spec.tsx +++ b/client/app/components/Manifest/GeneralInfo/ManifestTypeField.spec.tsx @@ -1,10 +1,10 @@ import userEvent from '@testing-library/user-event'; import { ManifestTypeSelect } from '~/components/Manifest/GeneralInfo/ManifestTypeSelect'; import { setupServer } from 'msw/node'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { createMockHandler } from '~/mocks/fixtures'; -import { mockUserEndpoints } from 'app/mocks/handlers'; +import { mockUserEndpoints } from '~/mocks/handlers'; import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest'; const server = setupServer(...mockUserEndpoints); diff --git a/client/app/components/Manifest/GeneralInfo/ManifestTypeSelect.tsx b/client/app/components/Manifest/GeneralInfo/ManifestTypeSelect.tsx index 3ed28c52f..4d7b7f989 100644 --- a/client/app/components/Manifest/GeneralInfo/ManifestTypeSelect.tsx +++ b/client/app/components/Manifest/GeneralInfo/ManifestTypeSelect.tsx @@ -1,4 +1,4 @@ -import { HtForm } from 'app/components/legacyUi'; +import { HtForm } from '~/components/legacyUi'; import React, { useState } from 'react'; import { Controller, useFormContext } from 'react-hook-form'; import Select, { SingleValue } from 'react-select'; diff --git a/client/app/components/Manifest/Generator/GeneratorForm.spec.tsx b/client/app/components/Manifest/Generator/GeneratorForm.spec.tsx index a915e7357..4d3b887fa 100644 --- a/client/app/components/Manifest/Generator/GeneratorForm.spec.tsx +++ b/client/app/components/Manifest/Generator/GeneratorForm.spec.tsx @@ -1,7 +1,7 @@ import { fireEvent } from '@testing-library/react'; import { siteType } from '~/components/Manifest/manifestSchema'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { afterEach, describe, expect, test } from 'vitest'; import { GeneratorForm } from './GeneratorForm'; diff --git a/client/app/components/Manifest/Generator/GeneratorForm.tsx b/client/app/components/Manifest/Generator/GeneratorForm.tsx index a9512d2ae..6be95fef3 100644 --- a/client/app/components/Manifest/Generator/GeneratorForm.tsx +++ b/client/app/components/Manifest/Generator/GeneratorForm.tsx @@ -1,4 +1,4 @@ -import { HtForm } from 'app/components/legacyUi'; +import { HtForm } from '~/components/legacyUi'; import { ReactElement, useEffect, useState } from 'react'; import { Col, Form, Row } from 'react-bootstrap'; import { useFormContext } from 'react-hook-form'; diff --git a/client/app/components/Manifest/Generator/GeneratorSection.spec.tsx b/client/app/components/Manifest/Generator/GeneratorSection.spec.tsx index 744f8373a..510c6496c 100644 --- a/client/app/components/Manifest/Generator/GeneratorSection.spec.tsx +++ b/client/app/components/Manifest/Generator/GeneratorSection.spec.tsx @@ -1,4 +1,4 @@ -import { cleanup, renderWithProviders, screen } from 'app/mocks'; +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { createMockHandler } from '~/mocks/fixtures'; import { afterEach, describe, expect, test } from 'vitest'; import { GeneratorSection } from './GeneratorSection'; diff --git a/client/app/components/Manifest/Generator/GeneratorSection.tsx b/client/app/components/Manifest/Generator/GeneratorSection.tsx index 4d4342900..0f0a00bcf 100644 --- a/client/app/components/Manifest/Generator/GeneratorSection.tsx +++ b/client/app/components/Manifest/Generator/GeneratorSection.tsx @@ -1,5 +1,5 @@ import { ErrorMessage } from '@hookform/error-message'; -import { HtButton, HtSpinner } from 'app/components/legacyUi'; +import { HtButton, HtSpinner } from '~/components/legacyUi'; import React, { useEffect, useState } from 'react'; import { Alert, Button, Col, Stack } from 'react-bootstrap'; import { useFormContext } from 'react-hook-form'; @@ -7,7 +7,7 @@ import { useSearchParams } from 'react-router-dom'; import { ContactForm, PhoneForm } from '~/components/Manifest/Contact'; import { Handler, Manifest } from '~/components/Manifest/manifestSchema'; import { QuickSignBtn } from '~/components/Manifest/QuickerSign'; -import { RcraSiteDetails } from '~/components/RcraSite'; +import { RcraSiteDetails } from '~/components/RcraSite/RcraSiteDetails'; import { useReadOnly } from '~/hooks/manifest'; import { useHandlerSearchConfig } from '~/hooks/manifest/useOpenHandlerSearch/useHandlerSearchConfig'; import { useGetRcrainfoSiteQuery } from '~/store'; diff --git a/client/app/components/Manifest/Handler/Search/HandlerSearchForm.spec.tsx b/client/app/components/Manifest/Handler/Search/HandlerSearchForm.spec.tsx index 1f8922a6f..05c4044d6 100644 --- a/client/app/components/Manifest/Handler/Search/HandlerSearchForm.spec.tsx +++ b/client/app/components/Manifest/Handler/Search/HandlerSearchForm.spec.tsx @@ -1,9 +1,8 @@ import userEvent from '@testing-library/user-event'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; -import { mockUserEndpoints } from 'app/mocks/handlers'; +import { cleanup, renderWithProviders, screen } from '~/mocks'; +import { mockUserEndpoints } from '~/mocks/handlers'; import { http, HttpResponse } from 'msw'; import { setupServer } from 'msw/node'; -import React from 'react'; import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest'; import { createMockRcrainfoSite } from '~/mocks/fixtures'; diff --git a/client/app/components/Manifest/Handler/Search/HandlerSearchForm.tsx b/client/app/components/Manifest/Handler/Search/HandlerSearchForm.tsx index 357e43a28..03b0ee345 100644 --- a/client/app/components/Manifest/Handler/Search/HandlerSearchForm.tsx +++ b/client/app/components/Manifest/Handler/Search/HandlerSearchForm.tsx @@ -1,4 +1,4 @@ -import { HtForm } from 'app/components/legacyUi'; +import { HtForm } from '~/components/legacyUi'; import React, { useContext, useEffect, useState } from 'react'; import { Button, Col, Row } from 'react-bootstrap'; import { diff --git a/client/app/components/Manifest/Handler/Search/HandlerSearchModal.tsx b/client/app/components/Manifest/Handler/Search/HandlerSearchModal.tsx index fdb436c9c..737bf3792 100644 --- a/client/app/components/Manifest/Handler/Search/HandlerSearchModal.tsx +++ b/client/app/components/Manifest/Handler/Search/HandlerSearchModal.tsx @@ -1,5 +1,5 @@ -import { HtModal } from 'app/components/legacyUi'; -import React from 'react'; +import { HtModal } from '~/components/legacyUi'; + import { Col, Row } from 'react-bootstrap'; import { useFieldArray, useFormContext } from 'react-hook-form'; import { HandlerSearchForm } from '~/components/Manifest/Handler'; diff --git a/client/app/components/Manifest/Handler/Search/RcrainfoSiteSearchBadge.tsx b/client/app/components/Manifest/Handler/Search/RcrainfoSiteSearchBadge.tsx index 36ce9f26e..7cbad8082 100644 --- a/client/app/components/Manifest/Handler/Search/RcrainfoSiteSearchBadge.tsx +++ b/client/app/components/Manifest/Handler/Search/RcrainfoSiteSearchBadge.tsx @@ -1,8 +1,7 @@ -import { faCheck, faXmark } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { HtSpinner } from 'app/components/legacyUi'; -import React from 'react'; import { Badge } from 'react-bootstrap'; +import { FaCheck } from 'react-icons/fa'; +import { FaXmark } from 'react-icons/fa6'; +import { HtSpinner } from '~/components/legacyUi'; interface RcrainfoInfoStatusProps { data: any; @@ -41,15 +40,7 @@ export function RcrainfoSiteSearchBadge({
{message} - {isFetching ? ( - - ) : error ? ( - - ) : data ? ( - - ) : ( - <> - )} + {isFetching ? : error ? : data ? : <>}
); diff --git a/client/app/components/Manifest/ManifestForm.spec.tsx b/client/app/components/Manifest/ManifestForm.spec.tsx index e09724f27..d2be27cf2 100644 --- a/client/app/components/Manifest/ManifestForm.spec.tsx +++ b/client/app/components/Manifest/ManifestForm.spec.tsx @@ -1,9 +1,9 @@ import { fireEvent, screen } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; -import { cleanup, renderWithProviders } from 'app/mocks'; -import { mockSiteEndpoints, mockUserEndpoints, mockWasteEndpoints } from 'app/mocks/handlers'; +import { cleanup, renderWithProviders } from '~/mocks'; +import { mockSiteEndpoints, mockUserEndpoints, mockWasteEndpoints } from '~/mocks/handlers'; import { setupServer } from 'msw/node'; -import React from 'react'; + import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest'; import { ManifestForm } from '~/components/Manifest'; diff --git a/client/app/components/Manifest/ManifestForm.tsx b/client/app/components/Manifest/ManifestForm.tsx index cabef3619..fd95c46a4 100644 --- a/client/app/components/Manifest/ManifestForm.tsx +++ b/client/app/components/Manifest/ManifestForm.tsx @@ -1,5 +1,5 @@ import { zodResolver } from '@hookform/resolvers/zod'; -import { HtCard, HtForm } from 'app/components/legacyUi'; +import { HtCard, HtForm } from '~/components/legacyUi'; import React, { createContext, useEffect, useState } from 'react'; import { Container, Stack } from 'react-bootstrap'; import { FormProvider, SubmitHandler, useFieldArray, useForm } from 'react-hook-form'; diff --git a/client/app/components/Manifest/NewManifestBtn.tsx b/client/app/components/Manifest/NewManifestBtn.tsx index a77fda852..f635cc69a 100644 --- a/client/app/components/Manifest/NewManifestBtn.tsx +++ b/client/app/components/Manifest/NewManifestBtn.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Button } from 'react-bootstrap'; import { useNavigate } from 'react-router-dom'; diff --git a/client/app/components/Manifest/QuickerSign/QuickerSignForm.spec.tsx b/client/app/components/Manifest/QuickerSign/QuickerSignForm.spec.tsx index a9e0c2010..2b6099899 100644 --- a/client/app/components/Manifest/QuickerSign/QuickerSignForm.spec.tsx +++ b/client/app/components/Manifest/QuickerSign/QuickerSignForm.spec.tsx @@ -1,6 +1,6 @@ import { QuickerSignForm } from '~/components/Manifest/QuickerSign'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { createMockMTNHandler } from '~/mocks/fixtures'; import { afterEach, describe, expect, test } from 'vitest'; diff --git a/client/app/components/Manifest/QuickerSign/QuickerSignForm.tsx b/client/app/components/Manifest/QuickerSign/QuickerSignForm.tsx index eab205e67..7534b59b3 100644 --- a/client/app/components/Manifest/QuickerSign/QuickerSignForm.tsx +++ b/client/app/components/Manifest/QuickerSign/QuickerSignForm.tsx @@ -1,11 +1,10 @@ -import { faFileSignature, faPen } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { HtForm } from 'app/components/legacyUi'; import React, { useEffect, useState } from 'react'; import { Button, Col, Container, Form, ListGroup, Row, Stack } from 'react-bootstrap'; import { SubmitHandler, useForm } from 'react-hook-form'; +import { FaFileSignature, FaPen } from 'react-icons/fa'; import { useNavigate } from 'react-router-dom'; import { z } from 'zod'; +import { HtForm } from '~/components/legacyUi'; import { Handler, RcraSiteType } from '~/components/Manifest/manifestSchema'; import { Transporter } from '~/components/Manifest/Transporter'; import { useProgressTracker } from '~/hooks'; @@ -160,7 +159,7 @@ export function QuickerSignForm({ mtn, mtnHandler, handleClose, siteType }: Quic {mtn.map((value) => { return ( - + {` ${value}`} ); @@ -173,7 +172,7 @@ export function QuickerSignForm({ mtn, mtnHandler, handleClose, siteType }: Quic diff --git a/client/app/components/Manifest/QuickerSign/QuickerSignModal.tsx b/client/app/components/Manifest/QuickerSign/QuickerSignModal.tsx index e4b07f083..a125c6941 100644 --- a/client/app/components/Manifest/QuickerSign/QuickerSignModal.tsx +++ b/client/app/components/Manifest/QuickerSign/QuickerSignModal.tsx @@ -1,5 +1,5 @@ -import { HtModal } from 'app/components/legacyUi'; -import React from 'react'; +import { HtModal } from '~/components/legacyUi'; + import { Handler, RcraSiteType } from '~/components/Manifest/manifestSchema'; import { QuickerSignForm } from './QuickerSignForm'; diff --git a/client/app/components/Manifest/QuickerSign/SignBtn/QuickSignBtn.spec.tsx b/client/app/components/Manifest/QuickerSign/SignBtn/QuickSignBtn.spec.tsx index 2e2065b59..1e89d78e7 100644 --- a/client/app/components/Manifest/QuickerSign/SignBtn/QuickSignBtn.spec.tsx +++ b/client/app/components/Manifest/QuickerSign/SignBtn/QuickSignBtn.spec.tsx @@ -2,10 +2,10 @@ import { ManifestContext } from '~/components/Manifest/ManifestForm'; import { Handler, RcraSiteType } from '~/components/Manifest/manifestSchema'; import { QuickSignBtn } from '~/components/Manifest/QuickerSign/index'; import { setupServer } from 'msw/node'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { createMockMTNHandler } from '~/mocks/fixtures'; -import { mockUserEndpoints } from 'app/mocks/handlers'; +import { mockUserEndpoints } from '~/mocks/handlers'; import { afterAll, afterEach, beforeAll, describe, expect, test, vi } from 'vitest'; import { undefined } from 'zod'; diff --git a/client/app/components/Manifest/QuickerSign/SignBtn/QuickSignBtn.tsx b/client/app/components/Manifest/QuickerSign/SignBtn/QuickSignBtn.tsx index c49414bd1..2f3f8a57b 100644 --- a/client/app/components/Manifest/QuickerSign/SignBtn/QuickSignBtn.tsx +++ b/client/app/components/Manifest/QuickerSign/SignBtn/QuickSignBtn.tsx @@ -1,11 +1,10 @@ -import { faFeather } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { createSelector } from '@reduxjs/toolkit'; +import React, { useContext, useMemo } from 'react'; +import { ButtonProps } from 'react-bootstrap'; +import { FaFeather } from 'react-icons/fa'; import { ManifestContext } from '~/components/Manifest/ManifestForm'; import { Handler } from '~/components/Manifest/manifestSchema'; import { RcraApiUserBtn } from '~/components/Rcrainfo'; -import React, { useContext, useMemo } from 'react'; -import { ButtonProps } from 'react-bootstrap'; import { ProfileSlice, useGetProfileQuery } from '~/store'; interface QuickSignBtnProps extends ButtonProps { @@ -46,7 +45,7 @@ export function QuickSignBtn({ mtnHandler, iconOnly = false, ...props }: QuickSi return ( {iconOnly ? '' : 'Sign '} - + ); } diff --git a/client/app/components/Manifest/SiteSelect/SiteSelect.spec.tsx b/client/app/components/Manifest/SiteSelect/SiteSelect.spec.tsx index ecb20f61e..07c756a64 100644 --- a/client/app/components/Manifest/SiteSelect/SiteSelect.spec.tsx +++ b/client/app/components/Manifest/SiteSelect/SiteSelect.spec.tsx @@ -2,7 +2,7 @@ import { screen } from '@testing-library/react'; import { SiteSelect } from '~/components/Manifest/SiteSelect/SiteSelect'; import React, { useState } from 'react'; import { useForm } from 'react-hook-form'; -import { renderWithProviders } from 'app/mocks'; +import { renderWithProviders } from '~/mocks'; import { describe, expect, test } from 'vitest'; function TestComponent() { diff --git a/client/app/components/Manifest/SiteSelect/SiteSelect.tsx b/client/app/components/Manifest/SiteSelect/SiteSelect.tsx index 92ca1bb1e..83fc65c1a 100644 --- a/client/app/components/Manifest/SiteSelect/SiteSelect.tsx +++ b/client/app/components/Manifest/SiteSelect/SiteSelect.tsx @@ -1,9 +1,9 @@ import { createSelector } from '@reduxjs/toolkit'; -import { HtForm } from 'app/components/legacyUi'; +import { HtForm } from '~/components/legacyUi'; import React, { useMemo } from 'react'; import { Control, Controller } from 'react-hook-form'; import Select from 'react-select'; -import { HaztrakSite } from 'app/components/Site'; +import { HaztrakSite } from '~/components/Site'; import { RcraSite } from '~/components/RcraSite'; import { useGetUserHaztrakSitesQuery } from '~/store'; diff --git a/client/app/components/Manifest/SiteSelect/SiteTypeSelect.spec.tsx b/client/app/components/Manifest/SiteSelect/SiteTypeSelect.spec.tsx index c2688523f..38cf5aaa3 100644 --- a/client/app/components/Manifest/SiteSelect/SiteTypeSelect.spec.tsx +++ b/client/app/components/Manifest/SiteSelect/SiteTypeSelect.spec.tsx @@ -3,12 +3,12 @@ import { RcraSiteType } from '~/components/Manifest/manifestSchema'; import { SiteTypeSelect } from '~/components/Manifest/SiteSelect/SiteTypeSelect'; import React, { useState } from 'react'; import { useForm } from 'react-hook-form'; -import { renderWithProviders } from 'app/mocks'; +import { renderWithProviders } from '~/mocks'; import { describe, expect, test } from 'vitest'; function TestComponent({ siteType }: { siteType?: RcraSiteType }) { const [mockSiteType, setMockSiteType] = useState(); - // eslint-disable-next-line @typescript-eslint/no-explicit-any + const handleChange = (siteType: any) => setMockSiteType(siteType); const { control } = useForm(); return ( diff --git a/client/app/components/Manifest/SiteSelect/SiteTypeSelect.tsx b/client/app/components/Manifest/SiteSelect/SiteTypeSelect.tsx index 4e592fcc5..9340f757b 100644 --- a/client/app/components/Manifest/SiteSelect/SiteTypeSelect.tsx +++ b/client/app/components/Manifest/SiteSelect/SiteTypeSelect.tsx @@ -1,5 +1,5 @@ -import { HtForm } from 'app/components/legacyUi'; -import React from 'react'; +import { HtForm } from '~/components/legacyUi'; + import { Form } from 'react-bootstrap'; import { Control, Controller } from 'react-hook-form'; import { RcraSiteType } from '~/components/Manifest/manifestSchema'; diff --git a/client/app/components/Manifest/Transporter/TransporterRowActions.tsx b/client/app/components/Manifest/Transporter/TransporterRowActions.tsx index e89a01c48..aa26e3642 100644 --- a/client/app/components/Manifest/Transporter/TransporterRowActions.tsx +++ b/client/app/components/Manifest/Transporter/TransporterRowActions.tsx @@ -1,15 +1,8 @@ -import { - faArrowDown, - faArrowUp, - faEllipsisVertical, - faEye, - faEyeSlash, - faTrash, -} from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import React, { MouseEventHandler, ReactElement, useState } from 'react'; import { Col, Dropdown, Row, useAccordionButton } from 'react-bootstrap'; import { UseFieldArrayRemove, UseFieldArraySwap } from 'react-hook-form'; +import { FaArrowDown, FaArrowUp, FaEye, FaEyeSlash, FaTrash } from 'react-icons/fa'; +import { FaEllipsisVertical } from 'react-icons/fa6'; interface TranRowActionProps { index: number; @@ -47,9 +40,7 @@ export function TransporterRowActions({ const actions: RowDropdownItems[] = [ { text: 'Move up', - icon: ( - - ), + icon: , onClick: () => { swapTransporter(index, index - 1); }, @@ -58,12 +49,7 @@ export function TransporterRowActions({ }, { text: 'Move Down', - icon: ( - - ), + icon: , onClick: () => { swapTransporter(index, index + 1); }, @@ -72,7 +58,7 @@ export function TransporterRowActions({ }, { text: 'Remove', - icon: , + icon: , onClick: () => { removeTransporter(index); }, @@ -81,7 +67,7 @@ export function TransporterRowActions({ }, { text: open ? 'Close' : 'Details', - icon: , + icon: open ? : , onClick: (event) => { decoratedOnClick(event); }, @@ -97,7 +83,7 @@ export function TransporterRowActions({ title={`transporter ${index + 1} actions`} className="bg-transparent border-0 text-dark no-caret justify-content-end" > - + {actions.map((action, i) => { diff --git a/client/app/components/Manifest/Transporter/TransporterSection.tsx b/client/app/components/Manifest/Transporter/TransporterSection.tsx index 674f7726d..083409e62 100644 --- a/client/app/components/Manifest/Transporter/TransporterSection.tsx +++ b/client/app/components/Manifest/Transporter/TransporterSection.tsx @@ -1,5 +1,5 @@ import { ErrorMessage } from '@hookform/error-message'; -import { HtButton } from 'app/components/legacyUi'; +import { HtButton } from '~/components/legacyUi'; import { Alert } from 'react-bootstrap'; import { useFieldArray, useFormContext } from 'react-hook-form'; import { v4 as uuidv4 } from 'uuid'; diff --git a/client/app/components/Manifest/Transporter/TransporterTable.spec.tsx b/client/app/components/Manifest/Transporter/TransporterTable.spec.tsx index 28b5cbe2d..be42dd93a 100644 --- a/client/app/components/Manifest/Transporter/TransporterTable.spec.tsx +++ b/client/app/components/Manifest/Transporter/TransporterTable.spec.tsx @@ -1,10 +1,10 @@ import userEvent from '@testing-library/user-event'; import { Transporter } from '~/components/Manifest'; import { setupServer } from 'msw/node'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { createMockTransporter } from '~/mocks/fixtures'; -import { mockUserEndpoints } from 'app/mocks/handlers'; +import { mockUserEndpoints } from '~/mocks/handlers'; import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest'; import { TransporterTable } from './index'; diff --git a/client/app/components/Manifest/Transporter/TransporterTable.tsx b/client/app/components/Manifest/Transporter/TransporterTable.tsx index a4a5b1dfe..af97f8d3e 100644 --- a/client/app/components/Manifest/Transporter/TransporterTable.tsx +++ b/client/app/components/Manifest/Transporter/TransporterTable.tsx @@ -1,14 +1,13 @@ import { useAutoAnimate } from '@formkit/auto-animate/react'; -import { faAngleRight, faCheck, faSignature } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Transporter } from '~/components/Manifest'; -import { Manifest } from '~/components/Manifest/manifestSchema'; -import { QuickSignBtn } from '~/components/Manifest/QuickerSign'; -import { useReadOnly } from '~/hooks/manifest'; import React, { useState } from 'react'; import { Accordion, Button, Card, Col, Row, Table, useAccordionButton } from 'react-bootstrap'; import { UseFieldArrayReturn } from 'react-hook-form'; +import { FaAngleRight, FaCheck, FaSignature } from 'react-icons/fa'; import { v4 as uuidv4 } from 'uuid'; +import { Transporter } from '~/components/Manifest'; +import { Manifest } from '~/components/Manifest/manifestSchema'; +import { QuickSignBtn } from '~/components/Manifest/QuickerSign'; +import { useReadOnly } from '~/hooks/manifest'; import { TransporterRowActions } from './TransporterRowActions'; interface TransporterTableProps { @@ -17,7 +16,6 @@ interface TransporterTableProps { setupSign: () => void; } -// eslint-disable-next-line @typescript-eslint/no-explicit-any function CustomToggle({ eventKey }: any) { const [open, setOpen] = useState(false); const decoratedOnClick = useAccordionButton(eventKey, () => setOpen(!open)); @@ -28,10 +26,7 @@ function CustomToggle({ eventKey }: any) { className="bg-transparent border-0 text-dark" title="more info" > - + ); } @@ -71,7 +66,7 @@ function TransporterTable({ transporters, arrayFieldMethods, setupSign }: Transp disabled={transporter.signed} /> ) : transporter.signed ? ( - + ) : ( <> )} @@ -105,7 +100,7 @@ function TransporterTable({ transporters, arrayFieldMethods, setupSign }: Transp {transporter.epaSiteId} {transporter.contact.phone?.number} - {transporter ? : 'no'} + {transporter ? : 'no'} diff --git a/client/app/components/Manifest/Tsdf/TsdfSection.spec.tsx b/client/app/components/Manifest/Tsdf/TsdfSection.spec.tsx index 41db1783a..b69afe2ca 100644 --- a/client/app/components/Manifest/Tsdf/TsdfSection.spec.tsx +++ b/client/app/components/Manifest/Tsdf/TsdfSection.spec.tsx @@ -1,4 +1,4 @@ -import { cleanup, renderWithProviders, screen } from 'app/mocks'; +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { createMockHandler } from '~/mocks/fixtures'; import { afterEach, describe, expect, test } from 'vitest'; import { TsdfSection } from './TsdfSection'; diff --git a/client/app/components/Manifest/Tsdf/TsdfSection.tsx b/client/app/components/Manifest/Tsdf/TsdfSection.tsx index 41a33eb00..16647f0e4 100644 --- a/client/app/components/Manifest/Tsdf/TsdfSection.tsx +++ b/client/app/components/Manifest/Tsdf/TsdfSection.tsx @@ -1,12 +1,12 @@ import { ErrorMessage } from '@hookform/error-message'; -import { HtButton, HtSpinner } from 'app/components/legacyUi'; +import { HtButton, HtSpinner } from '~/components/legacyUi'; import React, { useEffect } from 'react'; import { Alert, Col } from 'react-bootstrap'; import { useFormContext } from 'react-hook-form'; import { useSearchParams } from 'react-router-dom'; import { Handler, Manifest } from '~/components/Manifest/manifestSchema'; import { QuickSignBtn } from '~/components/Manifest/QuickerSign'; -import { RcraSiteDetails } from '~/components/RcraSite'; +import { RcraSiteDetails } from '~/components/RcraSite/RcraSiteDetails'; import { useReadOnly } from '~/hooks/manifest'; import { useHandlerSearchConfig } from '~/hooks/manifest/useOpenHandlerSearch/useHandlerSearchConfig'; import { useGetRcrainfoSiteQuery } from '~/store'; diff --git a/client/app/components/Manifest/UpdateRcra/UpdateRcra.tsx b/client/app/components/Manifest/UpdateRcra/UpdateRcra.tsx index 39f698e3d..80ebdc524 100644 --- a/client/app/components/Manifest/UpdateRcra/UpdateRcra.tsx +++ b/client/app/components/Manifest/UpdateRcra/UpdateRcra.tsx @@ -1,4 +1,4 @@ -import { HtSpinner } from 'app/components/legacyUi'; +import { HtSpinner } from '~/components/legacyUi'; import React, { useEffect } from 'react'; import { Navigate } from 'react-router-dom'; import { addAlert, useAppDispatch, useGetTaskStatusQuery } from '~/store'; diff --git a/client/app/components/Manifest/WasteLine/EditWasteModal.tsx b/client/app/components/Manifest/WasteLine/EditWasteModal.tsx index 7769bc3fe..1d8c94d05 100644 --- a/client/app/components/Manifest/WasteLine/EditWasteModal.tsx +++ b/client/app/components/Manifest/WasteLine/EditWasteModal.tsx @@ -1,4 +1,4 @@ -import { HtModal } from 'app/components/legacyUi'; +import { HtModal } from '~/components/legacyUi'; import React, { useContext } from 'react'; import { Col, Row } from 'react-bootstrap'; import { UseFieldArrayReturn } from 'react-hook-form'; diff --git a/client/app/components/Manifest/WasteLine/HazardousWasteForm/HazardousWasteForm.tsx b/client/app/components/Manifest/WasteLine/HazardousWasteForm/HazardousWasteForm.tsx index af634753e..4a7868808 100644 --- a/client/app/components/Manifest/WasteLine/HazardousWasteForm/HazardousWasteForm.tsx +++ b/client/app/components/Manifest/WasteLine/HazardousWasteForm/HazardousWasteForm.tsx @@ -1,5 +1,5 @@ import { ErrorMessage } from '@hookform/error-message'; -import { HtForm } from 'app/components/legacyUi'; +import { HtForm } from '~/components/legacyUi'; import React, { useContext } from 'react'; import { Col, Row } from 'react-bootstrap'; import { Controller, useFormContext } from 'react-hook-form'; diff --git a/client/app/components/Manifest/WasteLine/HazardousWasteForm/StateWasteCodeSelect.tsx b/client/app/components/Manifest/WasteLine/HazardousWasteForm/StateWasteCodeSelect.tsx index b29a9d825..b1bf1b62b 100644 --- a/client/app/components/Manifest/WasteLine/HazardousWasteForm/StateWasteCodeSelect.tsx +++ b/client/app/components/Manifest/WasteLine/HazardousWasteForm/StateWasteCodeSelect.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { Controller, useFormContext } from 'react-hook-form'; import Select, { components } from 'react-select'; import { useGetStateWasteCodesQuery } from '~/store'; @@ -43,7 +42,7 @@ export function StateWasteCodeSelect({ stateId, fieldName }: StateWasteCodeSelec * see SO question here * https://stackoverflow.com/questions/52482985/react-select-show-different-text-label-for-drop-down-and-control */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any + const MultiValue = (props: any) => ( {props.data.code} ); diff --git a/client/app/components/Manifest/WasteLine/QuantityForm.spec.tsx b/client/app/components/Manifest/WasteLine/QuantityForm.spec.tsx index 941ac6dc4..70a22e4ea 100644 --- a/client/app/components/Manifest/WasteLine/QuantityForm.spec.tsx +++ b/client/app/components/Manifest/WasteLine/QuantityForm.spec.tsx @@ -1,6 +1,6 @@ import { QuantityForm } from '~/components/Manifest/WasteLine/QuantityForm'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; import { afterEach, describe, expect, test } from 'vitest'; afterEach(() => cleanup()); diff --git a/client/app/components/Manifest/WasteLine/QuantityForm.tsx b/client/app/components/Manifest/WasteLine/QuantityForm.tsx index 65a404f85..0cbe00f0e 100644 --- a/client/app/components/Manifest/WasteLine/QuantityForm.tsx +++ b/client/app/components/Manifest/WasteLine/QuantityForm.tsx @@ -1,6 +1,6 @@ import { ErrorMessage } from '@hookform/error-message'; -import { HtForm } from 'app/components/legacyUi'; -import React from 'react'; +import { HtForm } from '~/components/legacyUi'; + import { Col, Form, Row } from 'react-bootstrap'; import { Controller, useFormContext } from 'react-hook-form'; import Select from 'react-select'; diff --git a/client/app/components/Manifest/WasteLine/WasteLineForm.spec.tsx b/client/app/components/Manifest/WasteLine/WasteLineForm.spec.tsx index 0244527bd..979ac30af 100644 --- a/client/app/components/Manifest/WasteLine/WasteLineForm.spec.tsx +++ b/client/app/components/Manifest/WasteLine/WasteLineForm.spec.tsx @@ -1,8 +1,8 @@ import userEvent from '@testing-library/user-event'; import { setupServer } from 'msw/node'; -import React from 'react'; -import { cleanup, renderWithProviders, screen } from 'app/mocks'; -import { mockUserEndpoints, mockWasteEndpoints } from 'app/mocks/handlers'; + +import { cleanup, renderWithProviders, screen } from '~/mocks'; +import { mockUserEndpoints, mockWasteEndpoints } from '~/mocks/handlers'; import { afterAll, afterEach, beforeAll, describe, expect, test } from 'vitest'; import { WasteLineForm } from './WasteLineForm'; diff --git a/client/app/components/Manifest/WasteLine/WasteLineForm.tsx b/client/app/components/Manifest/WasteLine/WasteLineForm.tsx index 64f4989ec..6c7bde24d 100644 --- a/client/app/components/Manifest/WasteLine/WasteLineForm.tsx +++ b/client/app/components/Manifest/WasteLine/WasteLineForm.tsx @@ -1,5 +1,5 @@ import { zodResolver } from '@hookform/resolvers/zod'; -import { HtCard, HtForm } from 'app/components/legacyUi'; +import { HtCard, HtForm } from '~/components/legacyUi'; import React, { useContext, useState } from 'react'; import { Button, Col, Container, Form, Row, Stack } from 'react-bootstrap'; import { Controller, FormProvider, UseFieldArrayReturn, useForm } from 'react-hook-form'; diff --git a/client/app/components/Manifest/WasteLine/WasteLineSection.tsx b/client/app/components/Manifest/WasteLine/WasteLineSection.tsx index 9d9383d49..2edf49220 100644 --- a/client/app/components/Manifest/WasteLine/WasteLineSection.tsx +++ b/client/app/components/Manifest/WasteLine/WasteLineSection.tsx @@ -1,6 +1,6 @@ import { ErrorMessage } from '@hookform/error-message'; -import { HtButton } from 'app/components/legacyUi'; -import React from 'react'; +import { HtButton } from '~/components/legacyUi'; + import { Alert } from 'react-bootstrap'; import { useFieldArray, useFormContext } from 'react-hook-form'; import { Manifest } from '~/components/Manifest/manifestSchema'; diff --git a/client/app/components/Manifest/WasteLine/WasteLineTable/WasteLineTable.spec.tsx b/client/app/components/Manifest/WasteLine/WasteLineTable/WasteLineTable.spec.tsx index 597983459..c2d36b619 100644 --- a/client/app/components/Manifest/WasteLine/WasteLineTable/WasteLineTable.spec.tsx +++ b/client/app/components/Manifest/WasteLine/WasteLineTable/WasteLineTable.spec.tsx @@ -1,9 +1,9 @@ -import { fireEvent, render, screen } from '@testing-library/react'; -import { WasteLineTable } from '~/components/Manifest/WasteLine/WasteLineTable/WasteLineTable'; -import { ManifestContext, ManifestContextType } from '~/components/Manifest/ManifestForm'; -import { useReadOnly } from '~/hooks/manifest'; +import { render, screen } from '@testing-library/react'; import { beforeEach, describe, expect, it, vi } from 'vitest'; +import { ManifestContext, ManifestContextType } from '~/components/Manifest/ManifestForm'; import { WasteLine } from '~/components/Manifest/WasteLine'; +import { WasteLineTable } from '~/components/Manifest/WasteLine/WasteLineTable/WasteLineTable'; +import { useReadOnly } from '~/hooks/manifest'; import { createMockWaste } from '~/mocks/fixtures/mockWaste'; vi.mock('~/hooks/manifest', () => ({ @@ -80,16 +80,4 @@ describe('WasteLineTable', () => { ); expect(screen.getByTitle('more info')).toBeInTheDocument(); }); - - it('toggles accordion on CustomToggle click', () => { - vi.mocked(useReadOnly).mockReturnValue([true, (_newReadOnly) => {}]); - render( - - - - ); - const toggleButton = screen.getByTitle('more info'); - fireEvent.click(toggleButton); - expect(toggleButton.querySelector('.rotate-90')).toBeInTheDocument(); - }); }); diff --git a/client/app/components/Manifest/WasteLine/WasteLineTable/WasteLineTable.tsx b/client/app/components/Manifest/WasteLine/WasteLineTable/WasteLineTable.tsx index 823316aef..7a531c874 100644 --- a/client/app/components/Manifest/WasteLine/WasteLineTable/WasteLineTable.tsx +++ b/client/app/components/Manifest/WasteLine/WasteLineTable/WasteLineTable.tsx @@ -1,14 +1,14 @@ import { useAutoAnimate } from '@formkit/auto-animate/react'; -import { faAngleRight, faCheckCircle, faCircleXmark } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import React, { useContext, useState } from 'react'; +import { Accordion, Button, Card, Col, Row, useAccordionButton } from 'react-bootstrap'; +import { UseFieldArrayReturn } from 'react-hook-form'; +import { FaAngleRight, FaCheckCircle } from 'react-icons/fa'; +import { FaCircleXmark } from 'react-icons/fa6'; import { Manifest } from '~/components/Manifest'; import { ManifestContext, ManifestContextType } from '~/components/Manifest/ManifestForm'; import { WasteLine } from '~/components/Manifest/WasteLine/wasteLineSchema'; import { WasteRowActions } from '~/components/Manifest/WasteLine/WasteLineTable/WasteRowActions'; import { useReadOnly } from '~/hooks/manifest'; -import React, { useContext, useState } from 'react'; -import { Accordion, Button, Card, Col, Row, useAccordionButton } from 'react-bootstrap'; -import { UseFieldArrayReturn } from 'react-hook-form'; interface WasteLineTableProps { wastes: WasteLine[]; @@ -44,9 +44,10 @@ const CustomToggle = ({ eventKey }: any) => { className="bg-transparent border-0 text-dark me-2" title="more info" > - ); @@ -76,7 +77,7 @@ export function WasteLineTable({ wastes, toggleWLModal, wasteForm }: WasteLineTa {readOnly ? ( - + ) : ( Federal Waste

{waste.epaWaste ? ( - + ) : ( - + )}

@@ -111,9 +112,9 @@ export function WasteLineTable({ wastes, toggleWLModal, wasteForm }: WasteLineTa DOT Haz Material

{waste.dotHazardous ? ( - + ) : ( - + )}

@@ -121,9 +122,9 @@ export function WasteLineTable({ wastes, toggleWLModal, wasteForm }: WasteLineTa PCB Waste

{waste.pcb ? ( - + ) : ( - + )}

diff --git a/client/app/components/Manifest/WasteLine/WasteLineTable/WasteRowActions.tsx b/client/app/components/Manifest/WasteLine/WasteLineTable/WasteRowActions.tsx index cd404a97e..3a50b88ff 100644 --- a/client/app/components/Manifest/WasteLine/WasteLineTable/WasteRowActions.tsx +++ b/client/app/components/Manifest/WasteLine/WasteLineTable/WasteRowActions.tsx @@ -1,15 +1,8 @@ -import { - faEllipsisVertical, - faEye, - faEyeSlash, - faPen, - faTrash, -} from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { Manifest } from '~/components/Manifest'; import React, { MouseEventHandler, ReactElement, useState } from 'react'; import { Col, Dropdown, Row, useAccordionButton } from 'react-bootstrap'; import { UseFieldArrayReturn } from 'react-hook-form'; +import { FaEllipsisV, FaEye, FaEyeSlash, FaPen, FaTrash } from 'react-icons/fa'; +import { Manifest } from '~/components/Manifest'; interface WasteRowActionProps { index: number; @@ -44,7 +37,7 @@ function WasteRowActions({ const actions: RowDropdownItems[] = [ { text: 'Remove', - icon: , + icon: , onClick: () => { wasteForm.remove(index); }, @@ -53,7 +46,7 @@ function WasteRowActions({ }, { text: 'Edit', - icon: , + icon: , onClick: () => { setEditWasteLine(index); toggleWLModal(); @@ -63,7 +56,7 @@ function WasteRowActions({ }, { text: open ? 'Close' : 'Details', - icon: , + icon: open ? : , onClick: (event) => { decoratedOnClick(event); }, @@ -79,7 +72,7 @@ function WasteRowActions({ title={`transporter ${index + 1} actions`} className="bg-transparent border-0 text-dark no-caret justify-content-end" > - + {actions.map((action, i) => { diff --git a/client/app/components/Mtn/MtnRowActions.tsx b/client/app/components/Mtn/MtnRowActions.tsx index 84b017c4b..40782b791 100644 --- a/client/app/components/Mtn/MtnRowActions.tsx +++ b/client/app/components/Mtn/MtnRowActions.tsx @@ -1,7 +1,6 @@ -import { faEllipsisVertical, faEye, faPen } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import React, { MouseEventHandler, ReactElement } from 'react'; import { Col, Dropdown, Row } from 'react-bootstrap'; +import { FaEllipsisV, FaEye, FaPen } from 'react-icons/fa'; import { useNavigate } from 'react-router-dom'; interface MtnRowActionsProps { @@ -22,7 +21,7 @@ export function MtnRowActions({ mtn }: MtnRowActionsProps) { const actions: RowDropdownItems[] = [ { text: 'View ', - icon: , + icon: , onClick: () => { navigate(`./${mtn}/view`); }, @@ -31,7 +30,7 @@ export function MtnRowActions({ mtn }: MtnRowActionsProps) { }, { text: 'Edit', - icon: , + icon: , onClick: () => { navigate(`./${mtn}/edit`); }, @@ -47,7 +46,7 @@ export function MtnRowActions({ mtn }: MtnRowActionsProps) { title={`${mtn} actions`} className="bg-transparent border-0 text-dark no-caret justify-content-end" > - + {actions.map((action, i) => { diff --git a/client/app/components/Mtn/MtnTable.spec.tsx b/client/app/components/Mtn/MtnTable.spec.tsx index 46fb570b9..fe6a596e2 100644 --- a/client/app/components/Mtn/MtnTable.spec.tsx +++ b/client/app/components/Mtn/MtnTable.spec.tsx @@ -1,7 +1,7 @@ import { fireEvent } from '@testing-library/react'; import { MtnDetails, MtnTable } from '~/components/Mtn'; -import React from 'react'; -import { renderWithProviders, screen } from 'app/mocks'; + +import { renderWithProviders, screen } from '~/mocks'; import { describe, expect, test } from 'vitest'; const DEFAULT_MTN_DETAILS: MtnDetails = { diff --git a/client/app/components/Mtn/MtnTable.tsx b/client/app/components/Mtn/MtnTable.tsx index 93a76e5d5..01df64256 100644 --- a/client/app/components/Mtn/MtnTable.tsx +++ b/client/app/components/Mtn/MtnTable.tsx @@ -1,5 +1,3 @@ -import { faSort, faSortDown, faSortUp } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { rankItem } from '@tanstack/match-sorter-utils'; import { CellContext, @@ -16,11 +14,12 @@ import { getSortedRowModel, useReactTable, } from '@tanstack/react-table'; -import { HtPageBtns, HtPageControls } from 'app/components/legacyUi'; import React, { ChangeEvent, useState } from 'react'; import { Button, Col, Table } from 'react-bootstrap'; +import { FaSort, FaSortDown, FaSortUp } from 'react-icons/fa'; import { Link, useSearchParams } from 'react-router-dom'; import { z } from 'zod'; +import { HtPageBtns, HtPageControls } from '~/components/legacyUi'; import { MtnRowActions } from '~/components/Mtn/MtnRowActions'; import { MtnSearchField } from '~/components/Mtn/MtnSearchField/MtnSearchField'; import { MtnStatusField, StatusOption } from '~/components/Mtn/MtnStatusField/MtnStatusField'; @@ -182,21 +181,21 @@ export function MtnTable({ manifests }: MtnTableProps) { asc: ( <> {' '} - + ), // Column sort icon when descending order desc: ( <> {' '} - + ), }[header.column.getIsSorted() as string] ?? ( <> {' '} {/* Default column sort icon when not sorting by this column*/} - + )} diff --git a/client/app/components/Org/OrgSelect.tsx b/client/app/components/Org/OrgSelect.tsx index 3ab4edc84..ed221a8e8 100644 --- a/client/app/components/Org/OrgSelect.tsx +++ b/client/app/components/Org/OrgSelect.tsx @@ -32,14 +32,15 @@ export const OrgSelect = () => { }; return ( -
+