Skip to content

Commit cde8cea

Browse files
Merge branch 'main' into DTOSS-11864-snagging-updates
2 parents 649ca20 + 53b2ce8 commit cde8cea

45 files changed

Lines changed: 1869 additions & 743 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ updates:
4949
- 'eslint'
5050
- 'eslint-*'
5151
- 'prettier'
52-
- 'typescript'
52+
- 'typescript*'
53+
- '@types/*'
5354

5455
test:
5556
patterns:

.gitleaksignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ infrastructure/terraform/resource_group_init/storage.bicep:generic-api-key:59
2323
infrastructure/terraform/resource_group_init/keyVault.bicep:generic-api-key:10
2424
manage_breast_screening/config/settings_test.py:private-key:34
2525
manage_breast_screening/config/settings_test.py:public-key:61
26+
manage_breast_screening/config/.env.tpl:generic-api-key:36
27+
manage_breast_screening/config/.env.tpl:generic-api-key:42

.tool-versions

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1+
nodejs 24.11.0
12
pre-commit 3.6.0
23
python 3.14.0
3-
nodejs 24.11.0
4-
uv 0.9.7
5-
# TODO: can we switch all these docker scripts to github actions instead? Or at least something that
6-
# will be maintained by Dependabot?
7-
# docker/ghcr.io/gitleaks/gitleaks v8.18.0@sha256:fd2b5cab12b563d2cc538b14631764a1c25577780e3b7dba71657d58da45d9d9 # SEE: https://github.com/gitleaks/gitleaks/pkgs/container/gitleaks
8-
# docker/ghcr.io/anchore/grype v0.87.0@sha256:7638bec6a2a2b570588bb96e5e9632ef37f5556e92d126eb1a9542a76f71471c # SEE: https://github.com/anchore/grype/pkgs/container/grype
9-
# docker/ghcr.io/anchore/syft v0.92.0@sha256:63c60f0a21efb13e80aa1359ab243e49213b6cc2d7e0f8179da38e6913b997e0 # SEE: https://github.com/anchore/syft/pkgs/container/syft
104
terraform 1.7.0
5+
uv 0.9.7
6+
# docker/ghcr.io/gitleaks/gitleaks v8.30.0@sha256:691af3c7c5a48b16f187ce3446d5f194838f91238f27270ed36eef6359a574d9 # SEE: https://github.com/gitleaks/gitleaks/pkgs/container/gitleaks
7+
# docker/ghcr.io/anchore/grype v0.104.2@sha256:7416f2fada8bd8f99095d955a6fed700b714b51ceb8150f838920932954b04aa # SEE: https://github.com/anchore/grype/pkgs/container/grype
8+
# docker/ghcr.io/anchore/syft v1.38.2@sha256:63a159108794114992136692c92155c7694f259aca814a92c187a4e025754b00 # SEE: https://github.com/anchore/syft/pkgs/container/syft

infrastructure/environments/review/variables.tfvars

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ protect_keyvault = false
99
vnet_address_space = "10.142.0.0/16"
1010
deploy_database_as_container = true
1111
seed_demo_data = true
12-
nhs_notify_api_message_batch_url = "https://int.api.service.nhs.uk/comms/v1/message-batches"

infrastructure/modules/container-apps/variables.tf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,6 @@ variable "deploy_database_as_container" {
9494
type = bool
9595
}
9696

97-
variable "nhs_notify_api_message_batch_url" {
98-
description = "The API endpoint URL used to send message batches to NHS Notify"
99-
type = string
100-
default = null
101-
}
102-
10397
variable "postgres_backup_retention_days" {
10498
description = "The number of days to retain backups for the PostgreSQL Flexible Server."
10599
type = number

infrastructure/terraform/main.tf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ module "container-apps" {
7676
infra_key_vault_name = local.infra_key_vault_name
7777
infra_key_vault_rg = local.infra_key_vault_rg
7878
api_oauth_token_url = var.api_oauth_token_url
79-
nhs_notify_api_message_batch_url = var.nhs_notify_api_message_batch_url
8079
target_url = var.deploy_container_apps ? "${module.container-apps[0].external_url}healthcheck" : null
8180
resource_group_name_infra = local.resource_group_name
8281
enable_notifications_jobs_schedule = var.enable_notifications_jobs_schedule

infrastructure/terraform/variables.tf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,6 @@ variable "api_oauth_token_url" {
173173
type = string
174174
}
175175

176-
variable "nhs_notify_api_message_batch_url" {
177-
description = "NHS Notify API endpoint URL for making message batch requests"
178-
type = string
179-
}
180-
181176
variable "enable_notifications_jobs_schedule" {
182177
description = "Whether we apply the cron schedules for the notifications container app jobs"
183178
type = bool
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
/**
2+
This component renders a block of complex information using headings and subheadings.
3+
It looks the same as the summaryList component in the design system, but doesn't use a dl.
4+
5+
Use it to display data that:
6+
7+
- is differently shaped depending on the key
8+
- has up to 2 dimensions
9+
10+
Example with a 2 column grid:
11+
12+
*Key* *Subkey 1* *Subkey 2*
13+
Data item Data item
14+
15+
*Subkey 3*
16+
Data item
17+
---------------------------------
18+
19+
On a narrow screen / high zoom, this collapses to a vertical layout just like
20+
the summaryList component does.
21+
**/
22+
23+
@use "../vendor/nhsuk-frontend/base" as *;
24+
25+
.app-nested-info {
26+
margin: 0; // Reset default user agent styles
27+
28+
@include nhsuk-font($size: 19);
29+
@include nhsuk-responsive-margin(6, "bottom");
30+
31+
@include nhsuk-media-query($from: tablet) {
32+
display: table;
33+
width: 100%;
34+
table-layout: fixed; // Required to allow us to wrap words that overflow.
35+
border-collapse: collapse;
36+
}
37+
}
38+
39+
.app-nested-info__row {
40+
border-bottom: 1px solid $nhsuk-border-colour;
41+
42+
@include nhsuk-media-query($until: tablet) {
43+
margin-bottom: nhsuk-spacing(3);
44+
}
45+
@include nhsuk-media-query($from: tablet) {
46+
display: table-row;
47+
}
48+
}
49+
50+
.app-nested-info__key,
51+
.app-nested-info__value {
52+
box-sizing: border-box;
53+
margin: 0; // Reset default user agent styles
54+
vertical-align: top;
55+
56+
@include nhsuk-media-query($from: tablet) {
57+
display: table-cell;
58+
padding-top: nhsuk-spacing(2);
59+
padding-right: nhsuk-spacing(4);
60+
padding-bottom: nhsuk-spacing(2);
61+
}
62+
}
63+
64+
.app-nested-info__key,
65+
.app-nested-info__value {
66+
// Automatic wrapping for unbreakable text (e.g. URLs)
67+
@include nhsuk-text-break-word;
68+
}
69+
70+
.app-nested-info__key {
71+
margin-bottom: nhsuk-spacing(1);
72+
73+
@include nhsuk-typography-weight-bold;
74+
75+
@include nhsuk-media-query($from: tablet) {
76+
width: 30%;
77+
}
78+
79+
h1,
80+
h2,
81+
h3,
82+
h4,
83+
h5,
84+
h6 {
85+
margin-bottom: 0;
86+
}
87+
}
88+
89+
.app-nested-info__value {
90+
@include nhsuk-media-query($until: tablet) {
91+
margin-bottom: nhsuk-spacing(3);
92+
}
93+
}
94+
95+
.app-nested-info__value > :last-child {
96+
margin-bottom: 0;
97+
}
98+
99+
// Remove the usual margin from paragraphs and lists, where it touches the border of the grid
100+
// leaving only the spacing from the .app-nested-info__value
101+
.app-nested-info__subvalue_row:last-child > .app-nested-info__subvalue > ul:last-child,
102+
.app-nested-info__subvalue_row:last-child > .app-nested-info__subvalue > p:last-child {
103+
@include nhsuk-media-query($from: tablet) {
104+
margin-bottom: 0;
105+
}
106+
}
107+
108+
// No border on specific rows
109+
.app-nested-info__row--no-border {
110+
border: 0;
111+
112+
// Increase padding by 1px to compensate for 'missing' border
113+
@include nhsuk-media-query($from: tablet) {
114+
.app-nested-info__key,
115+
.app-nested-info__value {
116+
padding-bottom: nhsuk-spacing(2) + 1px;
117+
}
118+
}
119+
}
120+
121+
.nhsuk-card__content {
122+
.app-nested-info:last-child .app-nested-info__row:last-of-type {
123+
margin-bottom: 0;
124+
}
125+
}

manage_breast_screening/assets/sass/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@forward "components/appointment-status";
99
@forward "components/secondary-navigation";
1010
@forward "components/special-appointment-banner";
11+
@forward "components/nested-info";
1112

1213
$color_app-dark-blue: #00386e;
1314

manage_breast_screening/clinics/models.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from django.conf import settings
66
from django.contrib.postgres.fields import ArrayField
7+
from django.core.exceptions import ValidationError
78
from django.core.validators import MinLengthValidator
89
from django.db import models
910
from django.db.models import OuterRef, Subquery
@@ -193,6 +194,12 @@ def __str__(self):
193194
self.clinic.setting.name + " " + self.starts_at.strftime("%Y-%m-%d %H:%M")
194195
)
195196

197+
def clean(self):
198+
if self.starts_at.date() != self.clinic.starts_at.date():
199+
raise ValidationError(
200+
"Clinic slot must start on the same date as the clinic"
201+
)
202+
196203

197204
class ClinicStatus(models.Model):
198205
SCHEDULED = "SCHEDULED"

0 commit comments

Comments
 (0)