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

LP-486 Choose principal place of business page #186

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

mattch1
Copy link
Contributor

@mattch1 mattch1 commented Feb 7, 2025

JIRA link

https://companieshouse.atlassian.net/browse/LP-486

Change description

  • Routing
  • Added page to controller page type check
  • Added template

Work checklist

  • Tests added where applicable
  • UI changes look good on mobile
  • UI changes meet accessibility criteria

Merge instructions

We are committed to keeping commit history clean, consistent and linear. To achieve this commit should be structured as follows:

<type>[optional scope]: <description>

and contain the following structural elements:

  • fix: a commit that patches a bug in your codebase (this correlates with PATCH in semantic versioning),
  • feat: a commit that introduces a new feature to the codebase (this correlates with MINOR in semantic versioning),
  • BREAKING CHANGE: a commit that has a footer BREAKING CHANGE: introduces a breaking API change (correlating with MAJOR in semantic versioning). A BREAKING CHANGE can be part of commits of any type,
  • types other than fix: and feat: are allowed, for example build:, chore:, ci:, docs:, style:, refactor:, perf:, test:, and others,
  • footers other than BREAKING CHANGE: <description> may be provided.

setLocalesEnabled(false);
appDevDependencies.addressLookUpGateway.setError(false);
appDevDependencies.cacheRepository.feedCache({
[`${config.APPLICATION_CACHE_KEY_PREFIX_REGISTRATION}registered_office_address`]:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update this, it is breaking tests atm

Copy link
Contributor Author

@mattch1 mattch1 Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked this is used by the controller for the address lookup it might need renaming to something more generic.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add an if statement into the address controller here https://github.com/companieshouse/limited-partnerships-web/blob/main/src/presentation/controller/addressLookUp/Controller.ts#L250, to say, if pagetype == your page, use a different cache key for the address?

@ch-code-analysis
Copy link

CI: No security warnings found

@mattch1 mattch1 marked this pull request as draft February 7, 2025 15:42
@ch-code-analysis
Copy link

CI: No security warnings found

@mattch1 mattch1 marked this pull request as ready for review February 10, 2025 09:27
@ch-code-analysis
Copy link

CI: No security warnings found


{% set pageTitle = i18n.choosePrincipalPlaceOfBusinessPage.title %}

{% set addressItems = [] %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be extracted into a common component used by the various choose pages
Look at postcode


{% include "includes/proposed-name.njk" %}

{{ govukRadios({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be extracted into a common component used by the various choose pages
Look at postcode

@chsonarqubeprchecks
Copy link

@ch-code-analysis
Copy link

CI: No security warnings found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants