diff --git a/bc_obps/common/fixtures/dashboard/administration/external.json b/bc_obps/common/fixtures/dashboard/administration/external.json index 9ce91f6fae..542867c6f1 100644 --- a/bc_obps/common/fixtures/dashboard/administration/external.json +++ b/bc_obps/common/fixtures/dashboard/administration/external.json @@ -75,6 +75,20 @@ } ] }, + { + "title": "Report transfer of operation or facility", + "icon": "Layers", + "content": "Report a transfer in control, ownership or direction of your operation or facility(s).", + "href": "/administration/transfers", + "conditions": [ + { + "api": "registration/user-operators/current/operator", + "field": "error", + "operator": "notExists", + "value": true + } + ] + }, { "title": "Contacts", "icon": "Users", diff --git a/bc_obps/common/fixtures/dashboard/bciers/external.json b/bc_obps/common/fixtures/dashboard/bciers/external.json index d5ea838a5c..8b33ea2013 100644 --- a/bc_obps/common/fixtures/dashboard/bciers/external.json +++ b/bc_obps/common/fixtures/dashboard/bciers/external.json @@ -73,6 +73,18 @@ } ] }, + { + "title": "Report transfer of operation or facility", + "href": "/administration/transfers", + "conditions": [ + { + "api": "registration/user-operators/current/operator", + "field": "error", + "operator": "notExists", + "value": true + } + ] + }, { "title": "Contacts", "href": "/administration/contacts", diff --git a/bciers/apps/administration/app/bceidbusiness/industry_user/transfers/page.tsx b/bciers/apps/administration/app/bceidbusiness/industry_user/transfers/page.tsx new file mode 100644 index 0000000000..1ebd558d6e --- /dev/null +++ b/bciers/apps/administration/app/bceidbusiness/industry_user/transfers/page.tsx @@ -0,0 +1,13 @@ +// 🚩 flagging that for shared routes between roles, "Page" code is a component for code maintainability + +import { Suspense } from "react"; +import Loading from "@bciers/components/loading/SkeletonForm"; +import ExternalTransferPage from "@/administration/app/components/transfers/ExternalTransferPage"; + +export default async function Page() { + return ( + }> + + + ); +} diff --git a/bciers/apps/administration/app/bceidbusiness/industry_user_admin/transfers/page.tsx b/bciers/apps/administration/app/bceidbusiness/industry_user_admin/transfers/page.tsx new file mode 100644 index 0000000000..e38579aef4 --- /dev/null +++ b/bciers/apps/administration/app/bceidbusiness/industry_user_admin/transfers/page.tsx @@ -0,0 +1,7 @@ +// 🚩 flagging that for shared routes between roles, "Page" code is a component for code maintainability + +import IndustryUserTransferPage from "../../industry_user/transfers/page"; + +export default async function Page() { + return ; +} diff --git a/bciers/apps/administration/app/components/transfers/ExternalTransferPage.tsx b/bciers/apps/administration/app/components/transfers/ExternalTransferPage.tsx new file mode 100644 index 0000000000..6114e7b8cf --- /dev/null +++ b/bciers/apps/administration/app/components/transfers/ExternalTransferPage.tsx @@ -0,0 +1,35 @@ +import Link from "next/link"; + +// 🧩 Main component +export default async function ExternalTransferPage() { + return ( +
+

Report Transfers and Closures

+ The Greenhouse Gas Emission Reporting Regulation requires an operator to + report the following events: + + To report any of these events, please click report an event below. + + Report an Event + + Staff will review the information provided and administer changes in + BCIERS as needed. +

+ For questions reach out to{" "} + + GHGRegulator@gov.bc.ca + +

+
+ ); +} diff --git a/bciers/apps/administration/tests/components/transfers/ExternalTransferPage.test.tsx b/bciers/apps/administration/tests/components/transfers/ExternalTransferPage.test.tsx new file mode 100644 index 0000000000..146f418835 --- /dev/null +++ b/bciers/apps/administration/tests/components/transfers/ExternalTransferPage.test.tsx @@ -0,0 +1,26 @@ +import { render, screen } from "@testing-library/react"; +import ExternalTransferPage from "@/administration/app/components/transfers/ExternalTransferPage"; + +describe("ExternalTransferPage component", () => { + beforeEach(async () => { + vi.resetAllMocks(); + }); + + it("renders the external transfers apge", async () => { + render(await ExternalTransferPage()); + expect( + screen.getByRole("heading", { name: /Report Transfers and Closures/i }), + ).toBeVisible(); + // Note component + expect( + screen.getByRole("link", { name: "Report an Event" }), + ).toHaveAttribute( + "href", + "https://submit.digital.gov.bc.ca/app/form/submit?f=d26fb011-2846-44ed-9f5c-26e2756a758f", + ); + + expect( + screen.getByRole("link", { name: "GHGRegulator@gov.bc.ca" }), + ).toHaveAttribute("href", "mailto:GHGRegulator@gov.bc.ca"); + }); +});