diff --git a/deploy.toml b/deploy.toml index 7597268..6946502 100644 --- a/deploy.toml +++ b/deploy.toml @@ -16,7 +16,7 @@ [[production.servers]] host = "swppp.top" username = "devops" -privateKeyPath = "C:/Users/39P3QC2/.ssh/id_ed25519" +privateKeyPath = "C:/Users/bburnworth/.ssh/id_ed25519" sides = ["api","web"] packageManagerCommand = "yarn" monitorCommand = "pm2" diff --git a/web/src/components/SitesListCell/SitesListCell.mock.ts b/web/src/components/SitesListCell/SitesListCell.mock.ts index da5b955..5fa7b7e 100644 --- a/web/src/components/SitesListCell/SitesListCell.mock.ts +++ b/web/src/components/SitesListCell/SitesListCell.mock.ts @@ -1,7 +1,7 @@ // Define your own mock data here: export const standard = (/* vars, { ctx, req } */) => ({ sitesList: { - __typename: "sitesList" as const, + __typename: 'sitesList' as const, id: 42, }, -}); +}) diff --git a/web/src/components/SitesListCell/SitesListCell.stories.tsx b/web/src/components/SitesListCell/SitesListCell.stories.tsx index 0a85b8c..119388f 100644 --- a/web/src/components/SitesListCell/SitesListCell.stories.tsx +++ b/web/src/components/SitesListCell/SitesListCell.stories.tsx @@ -1,35 +1,35 @@ -import type { Meta, StoryObj } from "@storybook/react"; +import type { Meta, StoryObj } from '@storybook/react' -import { Loading, Empty, Failure, Success } from "./SitesListCell"; -import { standard } from "./SitesListCell.mock"; +import { Loading, Empty, Failure, Success } from './SitesListCell' +import { standard } from './SitesListCell.mock' const meta: Meta = { - title: "Cells/SitesListCell", - tags: ["autodocs"], -}; + title: 'Cells/SitesListCell', + tags: ['autodocs'], +} -export default meta; +export default meta export const loading: StoryObj = { render: () => { - return Loading ? : <>; + return Loading ? : <> }, -}; +} export const empty: StoryObj = { render: () => { - return Empty ? : <>; + return Empty ? : <> }, -}; +} export const failure: StoryObj = { render: (args) => { - return Failure ? : <>; + return Failure ? : <> }, -}; +} export const success: StoryObj = { render: (args) => { - return Success ? : <>; + return Success ? : <> }, -}; +} diff --git a/web/src/components/SitesListCell/SitesListCell.test.tsx b/web/src/components/SitesListCell/SitesListCell.test.tsx index 03ac04d..a55d158 100644 --- a/web/src/components/SitesListCell/SitesListCell.test.tsx +++ b/web/src/components/SitesListCell/SitesListCell.test.tsx @@ -1,7 +1,7 @@ -import { render } from "@redwoodjs/testing/web"; +import { render } from '@redwoodjs/testing/web' -import { Loading, Empty, Failure, Success } from "./SitesListCell"; -import { standard } from "./SitesListCell.mock"; +import { Loading, Empty, Failure, Success } from './SitesListCell' +import { standard } from './SitesListCell.mock' // Generated boilerplate tests do not account for all circumstances // and can fail without adjustments, e.g. Float and DateTime types. @@ -9,24 +9,24 @@ import { standard } from "./SitesListCell.mock"; // https://redwoodjs.com/docs/testing#testing-cells // https://redwoodjs.com/docs/testing#jest-expect-type-considerations -describe("SitesListCell", () => { - it("renders Loading successfully", () => { +describe('SitesListCell', () => { + it('renders Loading successfully', () => { expect(() => { - render(); - }).not.toThrow(); - }); + render() + }).not.toThrow() + }) - it("renders Empty successfully", async () => { + it('renders Empty successfully', async () => { expect(() => { - render(); - }).not.toThrow(); - }); + render() + }).not.toThrow() + }) - it("renders Failure successfully", async () => { + it('renders Failure successfully', async () => { expect(() => { - render(); - }).not.toThrow(); - }); + render() + }).not.toThrow() + }) // When you're ready to test the actual output of your component render // you could test that, for example, certain text is present: @@ -34,9 +34,9 @@ describe("SitesListCell", () => { // 1. import { screen } from '@redwoodjs/testing/web' // 2. Add test: expect(screen.getByText('Hello, world')).toBeInTheDocument() - it("renders Success successfully", async () => { + it('renders Success successfully', async () => { expect(() => { - render(); - }).not.toThrow(); - }); -}); + render() + }).not.toThrow() + }) +}) diff --git a/web/src/components/SitesListCell/SitesListCell.tsx b/web/src/components/SitesListCell/SitesListCell.tsx index 68f4ce9..7216dc6 100644 --- a/web/src/components/SitesListCell/SitesListCell.tsx +++ b/web/src/components/SitesListCell/SitesListCell.tsx @@ -3,6 +3,7 @@ import type { FindSitesListQueryVariables, } from 'types/graphql' +import { Link, routes } from '@redwoodjs/router' import type { CellSuccessProps, CellFailureProps, @@ -11,7 +12,6 @@ import type { import { columns } from 'src/components/SitesTable/columns' import DataTable from 'src/components/SitesTable/SitesTable' -import { Link, routes } from '@redwoodjs/router' export const QUERY: TypedDocumentNode< FindSitesListQuery, @@ -39,19 +39,15 @@ export const Failure = ({ export const Success = ({ sites, -}: CellSuccessProps< - FindSitesListQuery, - FindSitesListQueryVariables ->) => { +}: CellSuccessProps) => { return (
- - - Add Site - + + Add Site +
) diff --git a/web/src/components/SitesTable/columns.tsx b/web/src/components/SitesTable/columns.tsx index 7e38875..8274969 100644 --- a/web/src/components/SitesTable/columns.tsx +++ b/web/src/components/SitesTable/columns.tsx @@ -15,8 +15,6 @@ import { DropdownMenuTrigger, } from 'src/components/ui/DropdownMenu' -import ExportPDFButton from '../ExportPDFButton/ExportPDFButton' - export type Site = { id: number name: string diff --git a/web/src/pages/NewSitePage/NewSitePage.tsx b/web/src/pages/NewSitePage/NewSitePage.tsx index 505038b..6d63209 100644 --- a/web/src/pages/NewSitePage/NewSitePage.tsx +++ b/web/src/pages/NewSitePage/NewSitePage.tsx @@ -10,10 +10,6 @@ import { TextField, TextAreaField, Submit, - CheckboxField, - DateField, - TimeField, - DatetimeLocalField, } from '@redwoodjs/forms' import { navigate, routes } from '@redwoodjs/router' import { useMutation, useQuery } from '@redwoodjs/web' @@ -126,9 +122,7 @@ const NewSitePage = () => {
-

- Site Details -

+

Site Details

Please fill out the details for the new site.

@@ -145,8 +139,7 @@ const NewSitePage = () => { Site Name*
- { className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 required:border-red-500 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" required /> +
@@ -164,8 +158,7 @@ const NewSitePage = () => { Address Line 1*
- { Address Line 2
- { City
- { State / Province
- { Postal Code
- { Country
- { NPDES Tracking No
- { Site Type*
- +
@@ -315,8 +302,7 @@ const NewSitePage = () => { Site Inspector
- { Owner Name*
- { {siteTypeId !== 2 && (
-

- BMPs -

+

BMPs

Add any custom BMPs for the site. Standard BMPs will show on the inspection form automatically. @@ -413,12 +396,11 @@ const NewSitePage = () => {

- {
-