Skip to content

Repository files navigation

gambling-variations-frontend

This is the new gambling-variations-frontend repository

Git Hooks

This project includes a pre-push hook that checks code formatting with scalafmt before pushing.

To activate it, run once after cloning:

If the check fails, format your code with sbt scalafmtAll and try again.

Running the service

Service Manager: sm2 --start DASS_GAMBLING_ALL

To run all tests and coverage: ./run_all_tests.sh

To start the server locally: sbt run

To check coverage: sbt clean coverage test it/test coverageReport

To enable test-only routes when running locally, start the server with: sbt 'run -Dplay.http.router=testOnlyDoNotUseInAppConf.Routes 10401'

Adding New Pages

Folder Structure

The project uses domain-based organisation. Each new page should be placed in the appropriate domain folder:

app/
├── controllers/[domain]/          # e.g., monthlyreturns/
├── models/[domain]/               # e.g., monthlyreturns/
├── views/[domain]/                # e.g., monthlyreturns/
├── forms/[domain]/                # e.g., monthlyreturns/
├── pages/[domain]/                # e.g., monthlyreturns/
└── viewmodels/checkAnswers/[domain]/
test/
├── controllers/[domain]/
├── models/[domain]/
├── forms/[domain]/
└── views/[domain]/

Example: routes and messages

GET        /there-is-a-problem-with-the-service                       controllers.SystemErrorController.onPageLoad()

Message key (messages.en):

Internationalization (i18n)

systemError.title = Sorry, there is a problem with the service

Before adding new translation keys, please check the top of the following files messages.en | messages.cy and review existing entries to avoid duplicates. Refer to the DASS Welsh Translation Repository in confluence.

License

This code is open source software licensed under the Apache 2.0 License.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages