Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
584c436
page for edit requests (placeholder)
lucas-phillips28 Nov 19, 2024
7178351
update browse page + add feature toggle
lucas-phillips28 Nov 25, 2024
26623d5
add instruction + add tests
lucas-phillips28 Nov 25, 2024
ec12e34
Merge branch 'master' into S28-250/edit-request-page
lucas-phillips28 Nov 25, 2024
019daf4
Bumping chart version/ fixing aliases
hmcts-jenkins-cnp[bot] Nov 25, 2024
d29895e
linting
lucas-phillips28 Nov 25, 2024
3f09697
Merge remote-tracking branch 'origin/S28-250/edit-request-page' into …
lucas-phillips28 Nov 25, 2024
a792e24
add validation (s28-266)
lucas-phillips28 Nov 26, 2024
9371d10
Merge branch 'master' into S28-250/edit-request-page
lucas-phillips28 Nov 26, 2024
795301a
fix play link
lucas-phillips28 Nov 27, 2024
f851560
add update + delete (s28-264, s28-3287)
lucas-phillips28 Nov 27, 2024
9dd66a4
add edit view/submit page + slight refactor
lucas-phillips28 Nov 28, 2024
e8a3c2a
refactor
lucas-phillips28 Dec 3, 2024
94146a0
fix lint
lucas-phillips28 Dec 3, 2024
15949c4
clean up code
lucas-phillips28 Dec 4, 2024
cffdc7a
point at pre-api pr 836
lucas-phillips28 Dec 4, 2024
4dc77e5
Merge branch 'master' into S28-250/edit-request-page
lucas-phillips28 Dec 4, 2024
c2961a7
fix merge conflicts
lucas-phillips28 Dec 4, 2024
0641669
Bumping chart version/ fixing aliases
hmcts-jenkins-cnp[bot] Dec 4, 2024
732d459
remove duplicate endpoint
lucas-phillips28 Dec 4, 2024
b4198de
Merge remote-tracking branch 'origin/S28-250/edit-request-page' into …
lucas-phillips28 Dec 4, 2024
df5b7f6
add tests for parsing applied edits on watch page
lucas-phillips28 Dec 4, 2024
f0753a5
linting
lucas-phillips28 Dec 4, 2024
71c8663
Merge branch 'master' into S28-250/edit-request-page
Dec 12, 2025
7cccfc6
Bumping chart version/ fixing aliases
hmcts-jenkins-cnp[bot] Dec 12, 2025
5a26004
Update API PR value
Dec 12, 2025
728f65c
Merge branch 'S28-250/edit-request-page' of github.com:hmcts/pre-port…
Dec 12, 2025
3d73014
Update API URL
Dec 12, 2025
757c66d
Locate edit requests under Admin section and put in secondary nav
Dec 15, 2025
13018c5
Move admin nav to admin template
Dec 15, 2025
8de57c0
Tidy up
Dec 15, 2025
af3b50f
Redirection of admin page; restructure project folders
Dec 15, 2025
5e180e0
Edit request routing
Dec 15, 2025
efd69f7
Move sign out link to nav
Dec 15, 2025
11ad507
Revert change: edit request view should not be under admin
Dec 16, 2025
fbce955
Trim whitespace
Dec 16, 2025
b6c2271
lint
Dec 16, 2025
fb55044
Fix unit tests
Dec 16, 2025
22e3859
Merge branch 'master' into S28-250/edit-request-page
lydiaralphgov Jan 8, 2026
fdd4a59
Bumping chart version/ fixing aliases
hmcts-jenkins-cnp[bot] Jan 8, 2026
92a120b
Merge branch 'master' into S28-250/edit-request-page
lydiaralphgov Jan 12, 2026
0537e1c
Bumping chart version/ fixing aliases
hmcts-jenkins-cnp[bot] Jan 12, 2026
0cf198f
Point to API PR for testing
lydiaralphgov Jan 16, 2026
992ddb1
Merge branch 'master' into S28-4634/delete-edit-request
lydiaralphgov Jan 16, 2026
8eeefd2
Merge branch 'master' into S28-4634/delete-edit-request
lydiaralphgov Jan 16, 2026
16c42d1
Ignore security issues as its a dummy PR
lydiaralphgov Jan 16, 2026
cc1d0d9
Merge branch 'S28-4634/delete-edit-request' of github.com:hmcts/pre-p…
lydiaralphgov Jan 16, 2026
e5f592f
Merge branch 'master' into S28-250/edit-request-page
lydiaralphgov Jan 19, 2026
55b8de3
Update functional tests
lydiaralphgov Jan 19, 2026
1d47bf1
Temporarily ignore issues to unblock PR
lydiaralphgov Jan 19, 2026
e4fc96c
Update yarn security check
lydiaralphgov Jan 19, 2026
be8da9d
Consolidate admin nav into one menu, and fix admin tests
lydiaralphgov Jan 20, 2026
a088215
Fix a11y issue with duplicate submit-button id
lydiaralphgov Jan 20, 2026
9eb4f34
Fix a11y issues by using buttons instead of links
lydiaralphgov Jan 20, 2026
30cc4c2
Merge branch 'S28-250/edit-request-page' into S28-4634/delete-edit-re…
lydiaralphgov Jan 20, 2026
45334e7
Linting
lydiaralphgov Jan 20, 2026
4f56ce0
Merge branch 'S28-250/edit-request-page' into S28-4634/delete-edit-re…
lydiaralphgov Jan 20, 2026
d6d6532
Implement some SonarQube recommendations
lydiaralphgov Jan 20, 2026
49ba566
Refactor to deduplicate code
lydiaralphgov Jan 20, 2026
5ab78d0
Linting
lydiaralphgov Jan 20, 2026
096a813
Corrected regex matcher
lydiaralphgov Jan 20, 2026
15a1280
Merge branch 'S28-250/edit-request-page' into S28-4634/delete-edit-re…
lydiaralphgov Jan 20, 2026
1d6e15a
Correct feature test: audits page does not have nav as it is unavailable
lydiaralphgov Jan 20, 2026
c75cc1a
Merge branch 'S28-250/edit-request-page' into S28-4634/delete-edit-re…
lydiaralphgov Jan 20, 2026
da7fe3a
Simple refactor to stop the file getting really big
lydiaralphgov Jan 21, 2026
f1f27fb
Merge S28 4635/edit reference row UI fix (#1139)
a-sealey-justice-gov Jan 29, 2026
8ae2d13
Merge remote-tracking branch 'origin/master' into S28-250/edit-reques…
a-sealey-justice-gov Jan 29, 2026
c3184f5
S28 4636/edit times overlap (#1132)
lydiaralphgov Jan 29, 2026
8375a3f
Add export for parseIsoDuration
a-sealey-justice-gov Feb 3, 2026
0655595
Add more edit-request tests to increase coverage
a-sealey-justice-gov Feb 3, 2026
d83b6bf
Add invalid id test to edit-request-view
a-sealey-justice-gov Feb 3, 2026
aaf9074
lint fix
a-sealey-justice-gov Feb 3, 2026
0921338
Merge branch 'master' into S28-250/edit-request-page
lydiaralphgov Feb 13, 2026
369a2a8
Yarn audit
lydiaralphgov Feb 13, 2026
1b90eb3
Merge branch 'S28-4634/delete-edit-request' into S28-250/edit-request…
lydiaralphgov Feb 26, 2026
9e9d102
Merge branch 'S28-3202/display-edit-requests' into S28-250/edit-reque…
lydiaralphgov Feb 26, 2026
7b0ebd3
Update yarn
lydiaralphgov Feb 26, 2026
fa81834
Merge branch 'master' into S28-250/edit-request-page
lydiaralphgov Feb 26, 2026
d516d64
Yarn lint
lydiaralphgov Feb 26, 2026
3509655
Undo refactor, and fix applied edits tests
lydiaralphgov Feb 26, 2026
0aa6eab
Merge branch 'master' into S28-250/edit-request-page
lydiaralphgov Feb 27, 2026
db44ca5
Yarn lint
lydiaralphgov Feb 27, 2026
2c759e2
Call the correct test endpoint
lydiaralphgov Feb 27, 2026
4274754
Merge branch 'master' into S28-250/edit-request-page
lydiaralphgov Feb 27, 2026
4eb6320
Change API URL back to staging as API PR has been merged
lydiaralphgov Feb 27, 2026
d231af8
Refactor Edit Request JS and UI (#1183)
a-sealey-justice-gov Mar 2, 2026
b5cb707
Comment out test to get branch deployed onto preview
lydiaralphgov Mar 3, 2026
41b35e0
Merge branch 'master' into S28-250/edit-request-page
lydiaralphgov Mar 3, 2026
d71e7a2
Merge remote-tracking branch 'origin/master' into S28-250/edit-reques…
a-sealey-justice-gov Mar 18, 2026
4820c01
Merge remote-tracking branch 'origin/master' into S28-250/edit-reques…
a-sealey-justice-gov Mar 31, 2026
d6f5ed9
S28 4794/edit request unit test (#1225)
a-sealey-justice-gov Mar 31, 2026
1a43510
yarn.lock fixes
a-sealey-justice-gov Mar 31, 2026
87c9675
Unit test sonarqube quality fixes
a-sealey-justice-gov Mar 31, 2026
0178661
S28-4781/edit-request-status (#1256)
a-sealey-justice-gov Apr 1, 2026
3554930
Change edit request /view page radio to a checkbox
a-sealey-justice-gov Apr 1, 2026
609d097
Merge branch 'master' into S28-250/edit-request-page
a-sealey-justice-gov Apr 1, 2026
a86bb51
edit-request-update-runtime-reference (#1259)
a-sealey-justice-gov Apr 2, 2026
c0b5ac3
S28-4828 Update ACR to latest
a-sealey-justice-gov Apr 2, 2026
feffef6
Lodash vulnerability upgrade
a-sealey-justice-gov Apr 2, 2026
82d00a7
Update ACR to correct prod registries
a-sealey-justice-gov Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
429 changes: 417 additions & 12 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ---- Base image ----
FROM hmctspublic.azurecr.io/base/node:22-alpine as base
FROM hmctsprod.azurecr.io/base/node:22-alpine as base
USER root
RUN corepack enable
COPY --chown=hmcts:hmcts . .
Expand Down
4 changes: 2 additions & 2 deletions charts/pre-portal/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ appVersion: '1.0'
description: A Helm chart for pre-portal App
name: pre-portal
home: https://github.com/hmcts/pre-portal
version: 0.0.30
version: 0.0.31
dependencies:
- name: nodejs
version: 3.2.0
repository: oci://hmctspublic.azurecr.io/helm
repository: oci://hmctsprod.azurecr.io/helm
3 changes: 2 additions & 1 deletion charts/pre-portal/values.dev.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ nodejs:
ingressHost: ${SERVICE_FQDN}
environment:
PORTAL_URL: https://pre-portal-pr-${CHANGE_ID}.dev.platform.hmcts.net
API_URL: https://sds-api-mgmt.staging.platform.hmcts.net/pre-api
PRE_API_URL: https://sds-api-mgmt.staging.platform.hmcts.net/pre-api
ALLOW_CONFIG_MUTATIONS: true
B2C_APP_CLIENT_ID: d20a7462-f222-46b8-a363-d2e30eb274eb
B2C_BASE_URL: https://hmctsstgextid.b2clogin.com/hmctsstgextid.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=B2C_1A_SignUpOrSignin
B2C_END_SESSION_ENDPOINT: https://hmctsstgextid.b2clogin.com/hmctsstgextid.onmicrosoft.com/oauth2/v2.0/logout?p=b2c_1a_signuporsignin
ENABLE_AUTOMATED_EDITING: true
# Uncomment to enable dynatrace RUM in dev envs
#DYNATRACE_JSTAG: https://js-cdn.dynatrace.com/jstag/17177a07246/bf24054dsx/636bef1033a59525_complete.js
1 change: 1 addition & 0 deletions charts/pre-portal/values.stg.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ nodejs:
PRE_API_URL: https://sds-api-mgmt.staging.platform.hmcts.net/pre-api
PORTAL_URL: https://pre-portal-staging.staging.platform.hmcts.net
B2C_APP_CLIENT_ID: d20a7462-f222-46b8-a363-d2e30eb274eb
ENABLE_AUTOMATED_EDITING: true
3 changes: 2 additions & 1 deletion charts/pre-portal/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ nodejs:
applicationPort: 4551
aadIdentityName: pre
ingressHost: pre-portal.{{ .Values.global.environment }}.platform.hmcts.net
image: 'sdshmctspublic.azurecr.io/pre/portal:latest'
image: 'hmctsprod.azurecr.io/pre/portal:latest'
keyVaults:
pre-hmctskv:
secrets:
Expand All @@ -23,6 +23,7 @@ nodejs:
PRE_API_URL: https://sds-api-mgmt.staging.platform.hmcts.net/pre-api
PORTAL_URL: https://pre-portal.platform.hmcts.net
B2C_APP_CLIENT_ID: c8deb898-d595-4fb2-8ba5-52fffa8db064
ENABLE_AUTOMATED_EDITING: false
B2C_BASE_URL: https://hmcts{{ .Values.global.environment }}extid.b2clogin.com/hmcts{{ .Values.global.environment }}extid.onmicrosoft.com/v2.0/.well-known/openid-configuration?p=B2C_1A_SignUpOrSignin
B2C_END_SESSION_ENDPOINT: https://hmcts{{ .Values.global.environment }}extid.b2clogin.com/hmcts{{ .Values.global.environment }}extid.onmicrosoft.com/oauth2/v2.0/logout?p=b2c_1a_signuporsignin
USE_DEV_B2C: false
1 change: 1 addition & 0 deletions config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
},
"portalUrl": "https://localhost:4551",
"mediaKindPlayerKey": "",
"enableAutomatedEditing": false,
"portalXUserId": ""
},
"session": {
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ module.exports = {
'^routes/(.*)$': '<rootDir>/src/main/routes/$1',
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
coveragePathIgnorePatterns: ['/src/main/modules/properties-volume/*', '/src/main/assets/js/*'],
coveragePathIgnorePatterns: ['/src/main/modules/properties-volume/*'],
testPathIgnorePatterns: ['(^|/)[^/]*helper\\.ts$'],
};
3 changes: 2 additions & 1 deletion local.env
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ B2C_TEST_LOGIN_PASSWORD=
APIM_SUB_PORTAL_PRIMARY_KEY=
APIM_SUB_PORTAL_SECONDARY_KEY=
MEDIA_KIND_PLAYER_KEY=
TEST_HEADLESS=true
B2C_TEST_SUPER_USER_LOGIN_EMAIL=
B2C_TEST_SUPER_USER_LOGIN_PASSWORD=
TEST_HEADLESS=true
ENABLE_AUTOMATED_EDITING=true
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"helmet": "8.1.0",
"hls.js": "^1.6.15",
"jose": "^6.1.3",
"lodash": "4.17.23",
"lodash": "4.18.1",
"marked": "^15.0.0",
"multer": "^2.0.2",
"nunjucks": "3.2.4",
Expand Down Expand Up @@ -103,6 +103,7 @@
"html-webpack-plugin": "5.6.6",
"husky": "9.1.7",
"jest": "30.2.0",
"jest-environment-jsdom": "30.2.0",
"jest-html-reporter": "4.3.0",
"jest-util": "^30.0.5",
"lint-staged": "16.2.7",
Expand Down Expand Up @@ -130,7 +131,7 @@
"tinyglobby@npm:0.2.15/picomatch": "4.0.4",
"picomatch@npm:2.3.1": "2.3.2",
"picomatch@npm:4.0.3": "4.0.4",
"lodash": "4.17.23",
"lodash": "4.18.1",
"@opentelemetry/instrumentation": "0.208.0",
"axios": "1.13.5",
"bfj": "9.1.3",
Expand Down
66 changes: 66 additions & 0 deletions src/main/assets/js/edit-request-view.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
export class EditRequestView {
private readonly editRequest: any;
private readonly postUrl!: string;

constructor($module: HTMLElement) {
const configData = $module.dataset['config'];
if (!configData) {
return;
}

const config = JSON.parse(configData);
this.editRequest = config.editRequest;
this.postUrl = config.postUrl;

const form = document.querySelector('form[data-edit-submission]') as HTMLFormElement;
if (form) {
form.addEventListener('submit', e => this.onSubmit(e));
}
}

private readonly onError = () => {
const errorMessage = document.getElementById('error-message');
if (errorMessage) {
errorMessage.innerHTML = '<span class="govuk-visually-hidden">Error:</span> Select the confirmation checkbox';
}

const formGroup = document.getElementById('form-group');
if (formGroup) {
formGroup.classList.add('govuk-form-group--error');
}
};

private readonly onSubmit = (e: Event) => {
e.preventDefault();
const form = e.target as HTMLFormElement;
const formData = new FormData(form);
const jointlyAgreed = formData.get('jointlyAgreed');

if (!jointlyAgreed) {
this.onError();
return;
}

fetch(this.postUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
accept: 'application/json',
},
body: JSON.stringify({
...this.editRequest,
jointly_agreed: Boolean(jointlyAgreed),
status: 'SUBMITTED',
}),
})
.then(async response => {
if (!response.ok) {
throw new Error(response as any);
}
globalThis.location.href = '/browse';
})
.catch(error => {
console.error(error);
});
};
}
Loading