@ministryofjustice/hmpps-digital-prison-reporting-frontend 3.26.3 → 3.26.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dpr/assets/js/all.mjs +1 -0
- package/dpr/components/reports-list/utils.js +1 -1
- package/dpr/components/reports-list/utils.ts +1 -1
- package/dpr/data/metricsClient.js +1 -1
- package/dpr/data/metricsClient.ts +1 -1
- package/dpr/utils/reportsListHelper.js +1 -1
- package/dpr/utils/reportsListHelper.ts +2 -1
- package/dpr/views/dashboard.njk +0 -5
- package/package.json +1 -1
- package/package.zip +0 -0
package/dpr/assets/js/all.mjs
CHANGED
|
@@ -39,7 +39,7 @@ class MetricsClient {
|
|
|
39
39
|
logger_1.default.info(`Metrics client: Get metricId:${metricId} data`);
|
|
40
40
|
return this.restClient
|
|
41
41
|
.get({
|
|
42
|
-
path:
|
|
42
|
+
path: `/reports/${dpdId}/metrics/${metricId}`,
|
|
43
43
|
token,
|
|
44
44
|
})
|
|
45
45
|
.then((response) => response);
|
|
@@ -26,7 +26,7 @@ exports.getMeta = getMeta;
|
|
|
26
26
|
const createShowMoreHtml = (text, length) => {
|
|
27
27
|
const sanitizedString = text ? text.replace(/"/g, "'") : '';
|
|
28
28
|
const stringLength = length || 200;
|
|
29
|
-
const displayString = sanitizedString.length
|
|
29
|
+
const displayString = sanitizedString.length <= stringLength ? sanitizedString : '';
|
|
30
30
|
return `<div class="dpr-show-more" data-content="${sanitizedString}" data-dpr-module="show-more" data-length="${stringLength}">
|
|
31
31
|
<p class="govuk-body-s govuk-!-margin-bottom-0"><span class='dpr-show-more-content'>${displayString}</span><a class="dpr-show-hide-button" href="#">show more</a></p>
|
|
32
32
|
</div>`;
|
|
@@ -27,7 +27,8 @@ export const getMeta = (cardData: CardData[]) => {
|
|
|
27
27
|
export const createShowMoreHtml = (text: string, length?: number) => {
|
|
28
28
|
const sanitizedString = text ? text.replace(/"/g, "'") : ''
|
|
29
29
|
const stringLength = length || 200
|
|
30
|
-
const displayString = sanitizedString.length
|
|
30
|
+
const displayString = sanitizedString.length <= stringLength ? sanitizedString : ''
|
|
31
|
+
|
|
31
32
|
return `<div class="dpr-show-more" data-content="${sanitizedString}" data-dpr-module="show-more" data-length="${stringLength}">
|
|
32
33
|
<p class="govuk-body-s govuk-!-margin-bottom-0"><span class='dpr-show-more-content'>${displayString}</span><a class="dpr-show-hide-button" href="#">show more</a></p>
|
|
33
34
|
</div>`
|
package/dpr/views/dashboard.njk
CHANGED
|
@@ -3,11 +3,6 @@
|
|
|
3
3
|
{% extends layoutPath %}
|
|
4
4
|
{% set mainClasses = "app-container govuk-body" %}
|
|
5
5
|
{% block content %}
|
|
6
|
-
{# TODO: 👇🏽 These scripts need to go into the main UI and tools 👇🏽 #}
|
|
7
|
-
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.4/dist/chart.umd.min.js"></script>
|
|
8
|
-
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.0.0"></script>
|
|
9
|
-
{# TODO: 👆 These scripts need to go into the main UI and tools 👆 #}
|
|
10
|
-
|
|
11
6
|
<h1>{{ title }}</h1>
|
|
12
7
|
<p class="govuk-body">{{ description }}</p>
|
|
13
8
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ministryofjustice/hmpps-digital-prison-reporting-frontend",
|
|
3
3
|
"description": "The Digital Prison Reporting Frontend contains templates and code to help display data effectively in UI applications.",
|
|
4
|
-
"version": "3.26.
|
|
4
|
+
"version": "3.26.4",
|
|
5
5
|
"main": "dpr/assets/js/all.mjs",
|
|
6
6
|
"sass": "dpr/all.scss",
|
|
7
7
|
"engines": {
|
package/package.zip
CHANGED
|
Binary file
|