generated from companieshouse/node-review-web-starter-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from companieshouse/feature/add-confirm-compan…
…y-screen Add static content for confirm company screen
- Loading branch information
Showing
15 changed files
with
184 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"confirm_company_main_title": "Cadarnhau mai hwn yw’r cwmni cywir", | ||
"confirm_company_company_name": "Enw’r cwmni", | ||
"confirm_company_company_number": "Rhif y cwmni", | ||
"confirm_company_company_status": "Statws", | ||
"confirm_company_incorporation_date": "Dyddiad corffori", | ||
"confirm_company_company_type": "Math o gwmni", | ||
"confirm_company_registered_office_address": "Cyfeiriad swyddfa gofrestredig", | ||
"confirm_company_choose_different_company": "Dewis cwmni gwahanol" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"global_banner_new_service": "Mae hwn yn wasanaeth newydd - bydd eich ", | ||
"global_banner_feedback_link": "adborth", | ||
"global_banner_help_improve": " yn ein helpu i'w wella.", | ||
"global_confirm_continue_button": "Cadarnhau a pharhau" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"confirm_company_main_title": "Confirm this is the correct company", | ||
"confirm_company_company_name": "Company name", | ||
"confirm_company_company_number": "Company number", | ||
"confirm_company_company_status": "Status", | ||
"confirm_company_incorporation_date": "Incorporation date", | ||
"confirm_company_company_type": "Company type", | ||
"confirm_company_registered_office_address": "Registered office address", | ||
"confirm_company_choose_different_company": "Choose a different company" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"global_banner_new_service": "This is a new service - your ", | ||
"global_banner_feedback_link": "feedback", | ||
"global_banner_help_improve": " will help us to improve it.", | ||
"global_confirm_continue_button": "Confirm and continue" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import StartRouter from "./../startRouter"; | ||
import SkeletonOneRouter from "./../skeleton.one.router"; | ||
import ConfirmCompanyRouter from "./../confirmCompanyRouter"; | ||
import SkeletonTwoRouter from "./../skeleton.two.router"; | ||
import SkeletonThreeRouter from "./../skeleton.three.router"; | ||
import SkeletonFourRouter from "./../skeleton.four.router"; | ||
import SkeletonFiveRouter from "./../skeleton.five.router"; | ||
import SkeletonSixRouter from "./../skeleton.six.router"; | ||
export { StartRouter, SkeletonOneRouter, SkeletonTwoRouter, SkeletonThreeRouter, SkeletonFourRouter, SkeletonFiveRouter, SkeletonSixRouter }; | ||
export { StartRouter, ConfirmCompanyRouter, SkeletonTwoRouter, SkeletonThreeRouter, SkeletonFourRouter, SkeletonFiveRouter, SkeletonSixRouter }; |
7 changes: 3 additions & 4 deletions
7
src/routers/skeleton.one.router.ts → src/routers/confirmCompanyRouter.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { Request, Response } from "express"; | ||
import { | ||
BaseViewData, | ||
GenericHandler, | ||
ViewModel | ||
} from "../generic"; | ||
import logger from "../../../lib/Logger"; | ||
import { PrefixedUrls } from "../../../constants"; | ||
import { selectLang, getLocalesService, getLocaleInfo } from "../../../utils/localise"; | ||
|
||
interface ConfirmCompanyViewData extends BaseViewData { | ||
} | ||
|
||
export class ConfirmCompanyHandler extends GenericHandler<ConfirmCompanyViewData> { | ||
|
||
private static templatePath = "router_views/confirmCompany/confirmCompany"; | ||
|
||
public getViewData (req: Request): ConfirmCompanyViewData { | ||
|
||
const baseViewData = super.getViewData(req); | ||
const lang = selectLang(req.query.lang); | ||
const locales = getLocalesService(); | ||
|
||
return { | ||
...baseViewData, | ||
...getLocaleInfo(locales, lang), | ||
title: "Confirm Company", | ||
currentUrl: PrefixedUrls.CONFIRM_COMPANY, | ||
backURL: PrefixedUrls.START | ||
}; | ||
} | ||
|
||
public executeGet (req: Request, _response: Response): ViewModel<ConfirmCompanyViewData> { | ||
logger.info(`ConfirmCompanyHandler execute called`); | ||
const viewData = this.getViewData(req); | ||
|
||
return { | ||
templatePath: ConfirmCompanyHandler.templatePath, | ||
viewData | ||
}; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
{% extends "layouts/default.njk" %} | ||
|
||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
{% from "govuk/components/summary-list/macro.njk" import govukSummaryList %} | ||
|
||
{% set title = i18n.confirm_company_main_title %} | ||
|
||
{% block pageTitle %} | ||
{% include "includes/page-title.html" %} | ||
{% endblock %} | ||
{% block backLink %} | ||
{% include "includes/back-link.html" %} | ||
{% endblock %} | ||
|
||
{% block main_content %} | ||
<div class="govuk-grid-row"> | ||
<h1 class="govuk-heading-l">{{ i18n.confirm_company_main_title }}</h1> | ||
<form action="" method="post"> | ||
|
||
{{ govukSummaryList({ | ||
rows: [ | ||
{ | ||
key: { | ||
id: "confirm-company-name", | ||
text: i18n.confirm_company_company_name | ||
}, | ||
value: { | ||
text: company.companyName | ||
} | ||
}, | ||
{ | ||
key: { | ||
id: "confirm-company-number", | ||
classes: "govuk-!-width-full", | ||
text: i18n.confirm_company_company_number | ||
}, | ||
value: { | ||
text: company.companyNumber | ||
} | ||
}, | ||
{ | ||
key: { | ||
id: "confirm-company-status", | ||
text: i18n.confirm_company_company_status | ||
}, | ||
value: { | ||
text: company.companyStatus | ||
} | ||
}, | ||
{ | ||
key: { | ||
id: "confirm-company-incorporation-date", | ||
text: i18n.confirm_company_incorporation_date | ||
}, | ||
value: { | ||
text: company.dateOfCreation | ||
} | ||
}, | ||
{ | ||
key: { | ||
id: "confirm-company-type", | ||
text: i18n.confirm_company_company_type | ||
}, | ||
value: { | ||
text: company.type | ||
} | ||
}, | ||
{ | ||
key: { | ||
id: "confirm-company-registered-office-address", | ||
text: i18n.confirm_company_registered_office_address | ||
}, | ||
value: { | ||
html: address | ||
|
||
} | ||
} | ||
] | ||
}) }} | ||
|
||
<input type="hidden" name="lang" value="{{lang}}"> | ||
{{ govukButton({ | ||
attributes: { | ||
id: "submit", | ||
"data-event-id": "confirm-and-continue-button" | ||
}, | ||
text: i18n.global_confirm_continue_button | ||
}) }} | ||
</form> | ||
<p class="govuk-body"> | ||
<a title="{{i18n.confirm_company_choose_different_company }}" class="govuk-link" href="/appoint-update-remove-company-officer/company-number?lang={{lang}}" data-event-id="choose-a-different-company-link">{{ i18n.confirm_company_choose_different_company }}</a> | ||
</p> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters