Skip to content

Commit

Permalink
MAN-150 add arrange appointment button (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-mills authored Jan 6, 2025
1 parent 31c1cb2 commit 4facf24
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions server/routes/appointments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ export default function scheduleRoutes(router: Router, { hmppsAuthClient }: Serv
})
})

post('/case/:crn/appointments', async (req, res, next) => {
const { crn } = req.params
res.redirect(`/case/${crn}/arrange-appointment/type`)
})

get('/case/:crn/appointments/appointment/:contactId', async (req, res, _next) => {
const { crn } = req.params
const { contactId } = req.params
Expand Down
7 changes: 4 additions & 3 deletions server/views/pages/appointments.njk
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@

{% block headerActions %}
<div class="moj-button-group moj-button-group--inline">
<a href="{{ deliusDeepLinkUrl('ContactList', offenderId) }}" target="_blank">
<button type="submit" class="govuk-button govuk-!-static-margin-bottom-0 govuk-!-static-margin-right-0" data-module="govuk-button">
<form method="POST" action="">
<button type="submit" class="govuk-button govuk-!-static-margin-bottom-0 govuk-!-static-margin-right-0" data-module="govuk-button" data-qa="arrange-appointment-btn">
Arrange an appointment
</button>
</a>
<input type="hidden" name="_csrf" value="{{ csrfToken }}">
</form>
</div>
{% endblock %}

Expand Down

0 comments on commit 4facf24

Please sign in to comment.