Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2374 transfer instructions #2706

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions bc_obps/common/fixtures/dashboard/administration/external.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 12 additions & 0 deletions bc_obps/common/fixtures/dashboard/bciers/external.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -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 (
<Suspense fallback={<Loading />}>
<ExternalTransferPage />
</Suspense>
);
}
Original file line number Diff line number Diff line change
@@ -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 <IndustryUserTransferPage />;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import Link from "next/link";

// 🧩 Main component
export default async function ExternalTransferPage() {
return (
<div>
<h1 className="form-heading mt-4">Report Transfers and Closures</h1>
The Greenhouse Gas Emission Reporting Regulation requires an operator to
report the following events:
<ul>
<li>A closure or temporary shutdown;</li>
<li>An acquisition or divestment;</li>
<li>A change in the operator having control or direction; or</li>
<li>A transfer of control and direction to the operator</li>
</ul>
To report any of these events, please click report an event below.
<Link
className="link-button-blue my-8"
href={
"https://submit.digital.gov.bc.ca/app/form/submit?f=d26fb011-2846-44ed-9f5c-26e2756a758f"
}
>
Report an Event
</Link>
Staff will review the information provided and administer changes in
BCIERS as needed.
<p>
For questions reach out to{" "}
<Link href={"mailto:[email protected]"}>
[email protected]
</Link>
</p>
</div>
);
}
Original file line number Diff line number Diff line change
@@ -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: "[email protected]" }),
).toHaveAttribute("href", "mailto:[email protected]");
});
});
Loading