Skip to content

Commit

Permalink
Merge pull request #7 from trade-tariff/FPO-345-desc-page
Browse files Browse the repository at this point in the history
FPO-345
  • Loading branch information
Lee365 authored Aug 8, 2024
2 parents bfcd7c8 + 751f148 commit 5129efa
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/controllers/identifyController.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { type Request, type Response } from 'express'

export const identifyPage = (req: Request, res: Response): void => {
res.render('identifyPage')
}
3 changes: 3 additions & 0 deletions src/routes/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import express, { type Request, type Response, type NextFunction } from 'express'

import { HealthchecksController } from '../controllers/healthchecksController'
import { identifyPage } from '../controllers/identifyController'

const router = express.Router()
const healthchecksController = new HealthchecksController()
Expand All @@ -12,3 +13,5 @@ router.get('/confirmation', (req, res) => { res.render('confirmation') })
export default router.get('/', (_req: Request, res: Response, _next: NextFunction) => {
res.render('index')
})

router.get('/identifyPage', identifyPage)
60 changes: 60 additions & 0 deletions views/identifyPage.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{% extends "layout.njk" %}
{% from "govuk/components/button/macro.njk" import govukButton %}
{% from "govuk/components/radios/macro.njk" import govukRadios %}
{% from "govuk/components/inset-text/macro.njk" import govukInsetText %}
{% block title %}Identify Page{% endblock %}
{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h1 class="govuk-heading-xl">Commodi-tea ☕</h1>
<p class="govuk-heading-l">Can you identify</p>
<h1 class="govuk-heading-l">"Bland and tasteless microwave meals"</h1>
<p class="govuk-body">The tool identifies it as a commodity code: 21069098</p>
{{ govukInsetText({
text: "MISCELLANEOUS EDIBLE PREPARATIONS
- Food preparations not elsewhere specified or included
- Other"
}) }}
<p class="govuk-body">
Look it up on the <a href="https://www.gov.uk/trade-tariff" class="govuk-link">Online Trade Tariff</a>
</p>
{{ govukRadios({
name: "correctCNCode",
fieldset: {
legend: {
text: "Is this the correct 8 digit CN Code?",
isPageHeading: true,
classes: "govuk-fieldset__legend--l"
}
},
items: [
{
value: "yes",
text: "Yes - it's defintely correct",
hint: {
text: "There is enough information in the description that I'm confident it's the right code"
}
},
{
value: "maybe",
text: "Maybe",
hint: {
text: "It might be the right code, but there's not really enough information to be sure"
}
},
{
value: "no",
text: "No",
hint: {
text: "It's got it completely wrong!"
}
}
]
}) }}
{{ govukButton({
text: "Continue",
href: "/confirmation"
}) }}
</div>
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion views/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}) }}
{{ govukButton({
text: "☕ Let's get cracking",
href: "/",
href: "/identifyPage",
isStartButton: true
}) }}

Expand Down

0 comments on commit 5129efa

Please sign in to comment.