diff --git a/app/filters.js b/app/filters.js index e43882a8..ad44354f 100644 --- a/app/filters.js +++ b/app/filters.js @@ -1,2 +1,33 @@ const govukPrototypeKit = require('govuk-prototype-kit') const addFilter = govukPrototypeKit.views.addFilter + +addFilter('commaFormat', function (inputString) { + inputString = inputString.toString(); + var decimalPart = ""; + if (inputString.indexOf('.') != -1) { + //alert("decimal number"); + inputString = inputString.split("."); + decimalPart = "." + inputString[1]; + inputString = inputString[0]; + //alert(inputString); + //alert(decimalPart); + + } + var outputString = ""; + var count = 0; + for (var i = inputString.length - 1; i >= 0 && inputString.charAt(i) != '-'; i--) { + //alert("inside for" + inputString.charAt(i) + "and count=" + count + " and outputString=" + outputString); + if (count == 3) { + outputString += ","; + count = 0; + } + outputString += inputString.charAt(i); + count++; + } + if (inputString.charAt(0) == '-') { + outputString += "-"; + } + //alert(outputString); + //alert(outputString.split("").reverse().join("")); + return outputString.split("").reverse().join("") + decimalPart; +}) diff --git a/app/views/index.html b/app/views/index.html index 649a3f39..b8a344a5 100644 --- a/app/views/index.html +++ b/app/views/index.html @@ -38,6 +38,9 @@

{{ pageTitle }}

## [Figma prototypes](https://www.figma.com/files/project/34163725/GOV.UK-Forms?fuid=822552076153840665) Sketches, prototypes and other design assets - you'll need access to the GDS Figma account to view these. + ## [Performance data page](product-pages/performance) + Mockup of performance data page to be added to the product site. + --- [Source code available on GitHub](https://github.com/alphagov/forms-prototypes) diff --git a/app/views/product-pages/performance.html b/app/views/product-pages/performance.html new file mode 100644 index 00000000..df22b4d9 --- /dev/null +++ b/app/views/product-pages/performance.html @@ -0,0 +1,327 @@ +{% extends "layout.html" %} + +{% set pageTitle = 'Performance data' %} + +{% block pageTitle %} +{{ pageTitle }} - GOV.UK Forms +{% endblock %} + +{% set orgs = [ + { + Organisation: "Government Digital Service", + LiveForms: 0 + }, + { + Organisation: "Ofqual", + LiveForms: 1 + }, + { + Organisation: "UK Space Agency", + LiveForms: 1 + }, + { + Organisation: "Driver and Vehicle Standards Agency", + LiveForms: 5 + }, + { + Organisation: "Department for Environment, Food & Rural Affairs", + LiveForms: 3 + }, + { + Organisation: "Department for Transport", + LiveForms: 0 + }, + { + Organisation: "Government Commercial Function", + LiveForms: 4 + }, + { + Organisation: "Valuation Office Agency", + LiveForms: 0 + }, + { + Organisation: "Attorney General's Office", + LiveForms: 1 + }, + { + Organisation: "Defence Science and Technology Laboratory", + LiveForms: 1 + }, + { + Organisation: "Home Office", + LiveForms: 0 + }, + { + Organisation: "Ministry of Defence", + LiveForms: 1 + }, + { + Organisation: "Companies House", + LiveForms: 2 + }, + { + Organisation: "Environment Agency", + LiveForms: 0 + }, + { + Organisation: "HM Land Registry", + LiveForms: 9 + }, + { + Organisation: "Defence Safety Authority", + LiveForms: 0 + }, + { + Organisation: "Defence Business Services", + LiveForms: 0 + }, + { + Organisation: "Marine Management Organisation", + LiveForms: 2 + }, + { + Organisation: "Medicines and Healthcare products Regulatory Agency", + LiveForms: 1 + }, + { + Organisation: "Maritime and Coastguard Agency", + LiveForms: 1 + }, + { + Organisation: "The Scottish Government", + LiveForms: 1 + }, + { + Organisation: "Department for Business and Trade", + LiveForms: 0 + }, + { + Organisation: "Food Standards Agency", + LiveForms: 2 + }, + { + Organisation: "Department for Science, Innovation and Technology", + LiveForms: 1 + }, + { + Organisation: "Foreign, Commonwealth & Development Office", + LiveForms: 2 + }, + { + Organisation: "The Insolvency Service", + LiveForms: 4 + }, + { + Organisation: "Central Digital and Data Office", + LiveForms: 0 + }, + { + Organisation: "Department for Education", + LiveForms: 1 + }, + { + Organisation: "Competition and Markets Authority", + LiveForms: 0 + }, + { + Organisation: "Cabinet Office", + LiveForms: 2 + }, + { + Organisation: "Department of Health and Social Care", + LiveForms: 2 + }, + { + Organisation: "Office for Health Improvement and Disparities", + LiveForms: 1 + }, + { + Organisation: "Commission for Countering Extremism", + LiveForms: 1 + } +] %} +{% set submissions = 101993 %} + + +{% block stylesheets %} +{% include "govuk-prototype-kit/includes/stylesheets.html" %} + +{% endblock %} + +{% block header %} + +{% endblock header %} + +{% block beforeContent %} +{{ govukBreadcrumbs({ + items: [ + { + text: "GOV.UK services", + href: "https://www.gov.uk/service-toolkit#gov-uk-services" + }, + { + text: "GOV.UK Forms", + href: "signup" + }, + { + text: "Performance data", + href: "#" + } + ] +}) }} +{% endblock %} + +{% block content %} +
+
+

{{ pageTitle }}

+ +

Since April 2024

+ +
+
+
{{ submissions|commaFormat }}
+
submissions
+
+ +
+
{{ ((submissions|int * 2) / 1440)|int }}
+
+ processing days saved +
based on an average of 2 minutes per form +
+
+
+
+
+ +
+
+
Last updated: 21 May 2024
+
+
+
+ +
+
+

Organisations using GOV.UK Forms

+ +
+
+
{{ orgs.length }}
+
organisations
+
+
+
+ {% set totalLive = 0 %} + {% for org in orgs -%} + {% if org.LiveForms %}{% set totalLive = totalLive + org.LiveForms|int %}{% endif %} + {%- endfor %} + {{ totalLive|int }} +
+
live forms
+
+
+
+ +
+ + + + + + + + + + {% for org in orgs | sort(attribute="Organisation") %} + + + + + {% endfor %} + +
+ Live services per organisation +
OrganisationsNumber of live forms
+ {{ org.Organisation }} + + {{ org.LiveForms }} +
+
+ +
+{% endblock %}