-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* task/JM-8185 (#789) * Add business rule error if trying to defer into the existing pool * Add error when adding to pool from deferral maintenance * Update yarn-audit-known-issues * feature/JM-8203: Confirm attendance for jurors that have dropped off the record attendance list (#797) * Unconfirmed jurors screen and confirming attendance * Update yarn-audit-known-issues * Update yarn-audit-known-issues * Update court create juror success banner (#800) * Add BVR for deferral with no DOB and general refactoring (#801) * JM-8054 -Bureau third party reason descriptions (#802) * Add defer DOB bvr to digital summons (#804) * JM-8216 - Node vulnerability updates (#805) --------- Co-authored-by: Christopher Powell (CGI) <[email protected]>
- Loading branch information
1 parent
23a029b
commit f6b6d88
Showing
20 changed files
with
871 additions
and
966 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
127 changes: 127 additions & 0 deletions
127
client/templates/juror-management/attendance/unconfirmed-attendances.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
{% extends "layouts/default.njk" %} | ||
|
||
{% from "govuk/components/table/macro.njk" import govukTable %} | ||
{% from "../_partials/attendance-sub-nav.njk" import attendanceSubNav %} | ||
|
||
{% block page_title %}{{ serviceName }} - Juror management - Attendance - Unconfirmed attendances{% endblock %} | ||
{% block page_identifier %}Juror management - Attendance - Unconfirmed attendances{% endblock %} | ||
|
||
{% set currentApp = "Jurors" %} | ||
|
||
{% block beforeContent %} | ||
{% include "includes/back-link.njk" %} | ||
{% endblock %} | ||
|
||
{% block content %} | ||
|
||
{% if bannerMessage %} | ||
{{ mojBanner({ | ||
type: "success", | ||
html: bannerMessage, | ||
iconFallbackText: "Success" | ||
}) }} | ||
{% endif %} | ||
|
||
{% set unconfirmedRows = [] %} | ||
{% for juror in unconfirmedJurors %} | ||
{% set row = [ | ||
{ | ||
html: "<a href='" + url('juror-record.overview.get', { jurorNumber: juror.jurorNumber }) + "' class='govuk-link'>" + juror.jurorNumber + "</a>", | ||
attributes: { | ||
"data-sort-value": juror.jurorNumber | ||
} | ||
}, | ||
{ | ||
text: juror.firstName, | ||
attributes: { | ||
"data-sort-value": juror.firstName | ||
} | ||
}, | ||
{ | ||
text: juror.lastName, | ||
attributes: { | ||
"data-sort-value": juror.lastName } | ||
}, | ||
{ | ||
text: juror.status | toSentenceCase, | ||
attributes: { | ||
"data-sort-value": juror.status | toSentenceCase | ||
} | ||
}, | ||
{ | ||
text: (juror.checkInTime | timeArrayToString | convert24to12) if juror.checkInTime else "-", | ||
attributes: { | ||
"data-sort-value": (juror.checkInTime | timeArrayToString | convertAmPmToLong) if juror.checkInTime else 0 | ||
} | ||
}, | ||
{ | ||
text: (juror.checkOutTime | timeArrayToString | convert24to12) if juror.checkOutTime else "-", | ||
attributes: { | ||
"data-sort-value": (juror.checkOutTime | timeArrayToString | convertAmPmToLong) if juror.checkOutTime else 0 | ||
} | ||
}, | ||
{ | ||
html: "<a href='" + url('juror-management.attendance.unconfirmed-attendances.update.get', { jurorNumber: juror.jurorNumber }) + "?date=" + date + "' class='govuk-link'>Change</a>" | ||
} | ||
] %} | ||
{% set unconfirmedRows = (unconfirmedRows.push(row), unconfirmedRows) %} | ||
{% endfor %} | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-one-half"> | ||
<span class="govuk-caption-l">Unconfirmed attendances</span> | ||
<h1 class="govuk-heading-l" id="attendanceDate">{{ selectedDate }}</h1> | ||
</div> | ||
</div> | ||
|
||
{% if unconfirmedRows | length %} | ||
{{ govukTable({ | ||
attributes: { | ||
'data-module': 'moj-sortable-table' | ||
}, | ||
head: [ | ||
{ | ||
text: "Juror number", | ||
attributes: { | ||
"aria-sort": "none" | ||
} | ||
}, | ||
{ | ||
text: "First name", | ||
attributes: { | ||
"aria-sort": "none" | ||
} | ||
}, | ||
{ | ||
text: "Last name", | ||
attributes: { | ||
"aria-sort": "ascending" | ||
} | ||
}, | ||
{ | ||
text: "Status", | ||
attributes: { | ||
"aria-sort": "none" | ||
} | ||
}, | ||
{ | ||
text: "Checked in", | ||
attributes: { | ||
"aria-sort": "none" | ||
} | ||
}, | ||
{ | ||
text: "Checked out", | ||
attributes: { | ||
"aria-sort": "none" | ||
} | ||
}, | ||
{} | ||
], | ||
rows: unconfirmedRows | ||
}) }} | ||
{% else %} | ||
<p class="govuk-body govuk-!-font-weight-bold">No unconfirmed attendances for this date</p> | ||
{% endif %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
server/routes/juror-management/attendance/unconfirmed-attendances/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(function() { | ||
'use strict'; | ||
|
||
const controller = require('./unconfirmed-attendances.controller'); | ||
const changeTimesController = require('../change-times/change-times.controller'); | ||
const auth = require('../../../../components/auth'); | ||
|
||
module.exports = function(app) { | ||
app.get('/juror-management/attendance/unconfirmed-attendances', | ||
'juror-management.attendance.unconfirmed-attendances.get', | ||
auth.verify, | ||
controller.getUnconfirmedAttendances(app) | ||
); | ||
|
||
app.get('/juror-management/attendance/unconfirmed-attendances/:jurorNumber/update', | ||
'juror-management.attendance.unconfirmed-attendances.update.get', | ||
auth.verify, | ||
changeTimesController.getChangeTimes(app), | ||
); | ||
|
||
app.post('/juror-management/attendance/unconfirmed-attendances/:jurorNumber/update', | ||
'juror-management.attendance.unconfirmed-attendances.update.post', | ||
auth.verify, | ||
controller.postUpdateAttendance(app), | ||
); | ||
}; | ||
|
||
})(); | ||
|
Oops, something went wrong.