Skip to content

Commit

Permalink
Rename 'visits' to 'visitsByDate'
Browse files Browse the repository at this point in the history
  • Loading branch information
tpmcgowan committed Jan 10, 2025
1 parent 4791ec8 commit 29128be
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import reviewRoutes from './routes/review'
import searchRoutes from './routes/search'
import timetableRoutes from './routes/timetable'
import visitRoutes from './routes/visit'
import visitsRoutes from './routes/visits'
import visitsByDateRoutes from './routes/visitsByDate'
import type { Services } from './services'
import config from './config'
import logger from '../logger'
Expand Down Expand Up @@ -69,7 +69,7 @@ export default function createApp(services: Services): express.Application {
app.use('/timetable', timetableRoutes(services))
app.use('/review', reviewRoutes(services))
app.use('/visit', visitRoutes(services))
app.use('/visits', visitsRoutes(services))
app.use('/visits', visitsByDateRoutes(services))

app.use((req, res, next) => next(createError(404, 'Not found')))
app.use(errorHandler(process.env.NODE_ENV === 'production'))
Expand Down
2 changes: 1 addition & 1 deletion server/routes/testutils/appSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import reviewRoutes from '../review'
import searchRoutes from '../search'
import timetableRoutes from '../timetable'
import visitRoutes from '../visit'
import visitsRoutes from '../visits'
import visitsRoutes from '../visitsByDate'

import nunjucksSetup from '../../utils/nunjucksSetup'
import errorHandler from '../../errorHandler'
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion server/routes/visits.ts → server/routes/visitsByDate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default function routes({
operationId: res.locals.appInsightsOperationId,
})

return res.render('pages/visits/summary', {
return res.render('pages/visits/visitsByDate', {
errors: req.flash('errors'),
formValues: getFlashFormValues(req),
dateTabs: getDateTabs(selectedDateString, firstTabDateString, 3),
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import TestData from '../../../routes/testutils/testData'
import { VisitsPageSideNav } from '../../../@types/bapv'
import { VisitPreview } from '../../../data/orchestrationApiTypes'

const template = fs.readFileSync('server/views/pages/visits/summary.njk')
const template = fs.readFileSync('server/views/pages/visits/visitsByDate.njk')

describe('Views - Visits summary', () => {
describe('Views - Visits by date', () => {
let compiledTemplate: Template
let viewContext: Record<string, unknown>

Expand Down

0 comments on commit 29128be

Please sign in to comment.