Skip to content

Commit

Permalink
Merge pull request #90 from DEFRA/DSFAAP-603
Browse files Browse the repository at this point in the history
DSFAAP-603: move exit page into origin
  • Loading branch information
hughfdjackson authored Dec 19, 2024
2 parents fe49482 + 7597479 commit 087d5b5
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
export const exitPageController = {
handler(_request, h) {
return h.view('exit-page/index', {
return h.view('origin/exit-page/index', {
pageTitle: 'This service is not available for your movement type',
heading: 'This service is not available for your movement type'
})
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { exitPageController } from '~/src/server/exit-page/controller.js'
import { ExitPage } from '../common/model/page/exit-page-model.js'
import { exitPageController } from './controller.js'
import { ExitPage } from '~/src/server/common/model/page/exit-page-model.js'

/**
* Sets up the routes used in the home page.
Expand Down
File renamed without changes.
9 changes: 8 additions & 1 deletion src/server/origin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { onOffFarm } from './on-off-farm/index.js'
import { cphNumber } from './cph-number/index.js'
import { address } from './address/index.js'
import { originSummary } from './summary/index.js'
import { exit } from './exit-page/index.js'

/**
* Sets up the routes used in the home page.
Expand All @@ -15,7 +16,13 @@ export const origin = {
plugin: {
name: 'origin',
async register(server) {
await server.register([onOffFarm, cphNumber, address, originSummary])
await server.register([
onOffFarm,
cphNumber,
address,
originSummary,
exit
])
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/origin/on-off-farm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { OnOffFarmAnswer } from '~/src/server/common/model/answer/on-off-farm/on-off-farm.js'
import { QuestionPage } from '../../common/model/page/question-page-model.js'
import { QuestionPageController } from '../../common/controller/question-page-controller/question-page-controller.js'
import { exitPage } from '~/src/server/exit-page/index.js'
import { exitPage } from '~/src/server/origin/exit-page/index.js'
import { cphNumberPage } from '~/src/server/origin/cph-number/index.js'

/** @import { AnswerErrors } from "~/src/server/common/model/answer/validation.js" */
Expand Down
2 changes: 1 addition & 1 deletion src/server/origin/on-off-farm/index.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { onOffFarm, onOffFarmPage, OnOffFarmPage } from './index.js'
import { OnOffFarmAnswer } from '../../common/model/answer/on-off-farm/on-off-farm.js'
import { cphNumberPage } from '../cph-number/index.js'
import { exitPage } from '../../exit-page/index.js'
import { exitPage } from '../exit-page/index.js'

const sectionKey = 'origin'
const question = 'Are you moving the cattle on or off your farm or premises?'
Expand Down
2 changes: 0 additions & 2 deletions src/server/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import inert from '@hapi/inert'
import { health } from '~/src/server/health/index.js'
import { home } from '~/src/server/home/index.js'
import { serveStaticFiles } from '~/src/server/common/helpers/serve-static-files.js'
import { exit } from './exit-page/index.js'
import { origin } from './origin/index.js'
import { taskList } from './task-list/index.js'
import { taskListIncomplete } from './task-list-incomplete/index.js'
Expand All @@ -28,7 +27,6 @@ export const router = {
await server.register([
home,
privacyPolicy,
exit,
origin,
destination,
licence,
Expand Down

0 comments on commit 087d5b5

Please sign in to comment.