From 6a0307856a213f1a5c4f2ecd10b4e5429d469f29 Mon Sep 17 00:00:00 2001 From: William Craig Date: Tue, 19 Mar 2024 11:26:10 +0000 Subject: [PATCH 01/20] VIH-10306 reviewing current styles (#2121) * initial changes to bring inline with gds Signed-off-by: William Craig * Added some missing imports Signed-off-by: William Craig * linting Signed-off-by: William Craig * Removed moj frontend as per VIH-10278 and updated headers to use govuk classes Signed-off-by: William Craig * Unit test fix * Removed commented out code; sonar cloud code smells --------- Signed-off-by: William Craig --- VideoWeb/VideoWeb/ClientApp/angular.json | 340 +++++++++--------- VideoWeb/VideoWeb/ClientApp/package-lock.json | 6 +- .../host-hearing-table.component.scss | 2 - .../introduction/introduction.component.scss | 3 +- .../accessibility/accessibility.component.css | 79 ---- .../accessibility.component.scss | 75 ++++ .../accessibility/accessibility.component.ts | 2 +- .../chat-body-window.component.scss | 2 +- .../contact-us-folding.component.scss | 2 - .../header-logo-svg.component.html | 8 +- .../header-logo-svg.component.spec.ts | 0 .../header-logo-svg.component.ts | 0 .../app/shared/header/header.component.css | 14 - .../app/shared/header/header.component.html | 70 ++-- .../app/shared/header/header.component.scss | 22 ++ .../src/app/shared/header/header.component.ts | 2 +- .../ClientApp/src/app/shared/shared.module.ts | 2 +- .../app/shared/toast/vh-toast.component.scss | 10 +- .../admin-im-list.component.scss | 5 +- .../admin-im/admin-im.component.scss | 3 +- .../command-centre-menu.component.scss | 3 +- .../command-centre.component.scss | 2 +- .../court-rooms-filters.component.scss | 8 +- .../hearing-status.component.scss | 2 +- .../monitoring-graph.component.scss | 2 +- .../participant-network-status.component.scss | 2 +- .../participant-status.component.scss | 5 +- .../pending-tasks.component.scss | 2 +- .../tasks-table/tasks-table.component.scss | 2 +- .../vho-chat/vho-chat.component.scss | 4 +- .../src/app/vh-officer/vho-global-styles.scss | 3 +- .../vho-hearing-list.component.scss | 9 +- .../analogue-clock.component.scss | 4 +- ...ual-participant-status-list.component.scss | 2 +- ...dge-participant-status-list.component.scss | 2 +- .../participant-chat.component.scss | 3 +- .../VideoWeb/ClientApp/src/sass/main.scss | 2 +- VideoWeb/VideoWeb/ClientApp/src/styles.css | 11 - VideoWeb/VideoWeb/ClientApp/src/styles.scss | 37 +- 39 files changed, 370 insertions(+), 382 deletions(-) delete mode 100644 VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.css create mode 100644 VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.scss rename VideoWeb/VideoWeb/ClientApp/src/app/shared/{ => header}/header-logo-svg/header-logo-svg.component.html (99%) rename VideoWeb/VideoWeb/ClientApp/src/app/shared/{ => header}/header-logo-svg/header-logo-svg.component.spec.ts (100%) rename VideoWeb/VideoWeb/ClientApp/src/app/shared/{ => header}/header-logo-svg/header-logo-svg.component.ts (100%) delete mode 100644 VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.css create mode 100644 VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.scss delete mode 100644 VideoWeb/VideoWeb/ClientApp/src/styles.css diff --git a/VideoWeb/VideoWeb/ClientApp/angular.json b/VideoWeb/VideoWeb/ClientApp/angular.json index c8c43693a4..3a1d5f178d 100644 --- a/VideoWeb/VideoWeb/ClientApp/angular.json +++ b/VideoWeb/VideoWeb/ClientApp/angular.json @@ -1,169 +1,183 @@ { - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "VideoWeb": { - "root": "", - "sourceRoot": "src", - "projectType": "application", - "prefix": "app", - "schematics": {}, - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "progress": true, - "outputPath": "dist", - "index": "src/index.html", - "main": "src/main.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.app.json", - "assets": [ - "src/assets", - { - "glob": "*", - "input": "node_modules/govuk-frontend/govuk/assets/fonts", - "output": "assets/fonts/" - }, - "src/scripts" - ], - "styles": ["src/styles.css", "src/styles.scss", "node_modules/ngx-toastr/toastr.css"], - "stylePreprocessorOptions": { - "includePaths": ["src/sass"] - }, - "scripts": [ - "src/scripts/pexrtc.js", - "src/scripts/EdgePF.js", - "src/scripts/IEPF.js", - "src/scripts/Heartbeat.js", - "node_modules/govuk-frontend/govuk/all.js", - "node_modules/chart.js/dist/chart.min.js", - "node_modules/@mediapipe/camera_utils/camera_utils.js", - "node_modules/@mediapipe/control_utils/control_utils.js", - "node_modules/@mediapipe/drawing_utils/drawing_utils.js", - "node_modules/@mediapipe/selfie_segmentation/selfie_segmentation.js" - ], - "vendorChunk": true, - "extractLicenses": false, - "buildOptimizer": false, - "sourceMap": true, - "optimization": false, - "namedChunks": true - }, - "configurations": { - "development": {}, - "production": { - "fileReplacements": [ - { - "replace": "src/environments/environment.ts", - "with": "src/environments/environment.prod.ts" + "$schema": "./node_modules/@angular/cli/lib/config/schema.json", + "version": 1, + "newProjectRoot": "projects", + "projects": { + "VideoWeb": { + "root": "", + "sourceRoot": "src", + "projectType": "application", + "prefix": "app", + "schematics": {}, + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:browser", + "options": { + "progress": true, + "outputPath": "dist", + "index": "src/index.html", + "main": "src/main.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.app.json", + "assets": [ + "src/assets", + { + "glob": "*", + "input": "node_modules/govuk-frontend/govuk/assets/fonts", + "output": "assets/fonts/" + }, + "src/scripts" + ], + "styles": [ + "src/styles.scss", + "node_modules/ngx-toastr/toastr.css" + ], + "stylePreprocessorOptions": { + "includePaths": [ + "src/sass" + ] + }, + "scripts": [ + "src/scripts/pexrtc.js", + "src/scripts/EdgePF.js", + "src/scripts/IEPF.js", + "src/scripts/Heartbeat.js", + "node_modules/govuk-frontend/govuk/all.js", + "node_modules/chart.js/dist/chart.min.js", + "node_modules/@mediapipe/camera_utils/camera_utils.js", + "node_modules/@mediapipe/control_utils/control_utils.js", + "node_modules/@mediapipe/drawing_utils/drawing_utils.js", + "node_modules/@mediapipe/selfie_segmentation/selfie_segmentation.js" + ], + "vendorChunk": true, + "extractLicenses": false, + "buildOptimizer": false, + "sourceMap": true, + "optimization": false, + "namedChunks": true + }, + "configurations": { + "development": {}, + "production": { + "fileReplacements": [ + { + "replace": "src/environments/environment.ts", + "with": "src/environments/environment.prod.ts" + } + ], + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true, + "vendorChunk": false, + "buildOptimizer": true + } + }, + "defaultConfiguration": "" + }, + "serve": { + "builder": "@angular-devkit/build-angular:dev-server", + "options": { + "publicHost": "0.0.0.0:0", + "browserTarget": "VideoWeb:build" + }, + "configurations": { + "production": { + "browserTarget": "VideoWeb:build:production" + }, + "development": { + "browserTarget": "VideoWeb:build:development" + }, + "defaultConfiguration": "development" + } + }, + "extract-i18n": { + "builder": "@angular-devkit/build-angular:extract-i18n", + "options": { + "browserTarget": "VideoWeb:build" + } + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "src/test.ts", + "polyfills": "src/polyfills.ts", + "tsConfig": "src/tsconfig.spec.json", + "karmaConfig": "src/karma.conf.js", + "codeCoverageExclude": [ + "src/app/testing/**", + "src/app/services/clients/**", + "src/app/vh-officer/helper.ts", + "src/app/services/audio-only-image.service.ts" + ], + "styles": [ + "src/styles.scss" + ], + "stylePreprocessorOptions": { + "includePaths": [ + "src/sass" + ] + }, + "scripts": [ + "src/scripts/pexrtc.js", + "src/scripts/EdgePF.js", + "src/scripts/IEPF.js", + "src/scripts/Heartbeat.js", + "node_modules/chart.js/dist/chart.min.js" + ], + "assets": [ + "src/assets", + { + "glob": "*", + "input": "node_modules/govuk-frontend/govuk/assets/fonts", + "output": "assets/fonts/" + } + ] + } + }, + "server": { + "builder": "@angular-devkit/build-angular:server", + "options": { + "outputPath": "dist-server", + "main": "src/main.ts", + "tsConfig": "src/tsconfig.server.json", + "sourceMap": true, + "optimization": false + }, + "configurations": { + "dev": { + "optimization": true, + "outputHashing": "all", + "namedChunks": false, + "extractLicenses": true + }, + "production": { + "optimization": true, + "outputHashing": "all", + "sourceMap": false, + "namedChunks": false, + "extractLicenses": true + } + }, + "defaultConfiguration": "" + }, + "lint": { + "builder": "@angular-eslint/builder:lint", + "options": { + "lintFilePatterns": [ + "src/**/*.ts", + "src/**/*.html" + ] + } } - ], - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true } - }, - "defaultConfiguration": "" - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "publicHost": "0.0.0.0:0", - "browserTarget": "VideoWeb:build" - }, - "configurations": { - "production": { - "browserTarget": "VideoWeb:build:production" - }, - "development": { - "browserTarget": "VideoWeb:build:development" - }, - "defaultConfiguration": "development" - } - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "browserTarget": "VideoWeb:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "polyfills": "src/polyfills.ts", - "tsConfig": "src/tsconfig.spec.json", - "karmaConfig": "src/karma.conf.js", - "codeCoverageExclude": [ - "src/app/testing/**", - "src/app/services/clients/**", - "src/app/vh-officer/helper.ts", - "src/app/services/audio-only-image.service.ts" - ], - "styles": ["src/styles.css", "src/styles.scss"], - "stylePreprocessorOptions": { - "includePaths": ["src/sass"] - }, - "scripts": [ - "src/scripts/pexrtc.js", - "src/scripts/EdgePF.js", - "src/scripts/IEPF.js", - "src/scripts/Heartbeat.js", - "node_modules/chart.js/dist/chart.min.js" - ], - "assets": [ - "src/assets", - { - "glob": "*", - "input": "node_modules/govuk-frontend/govuk/assets/fonts", - "output": "assets/fonts/" - } - ] - } - }, - "server": { - "builder": "@angular-devkit/build-angular:server", - "options": { - "outputPath": "dist-server", - "main": "src/main.ts", - "tsConfig": "src/tsconfig.server.json", - "sourceMap": true, - "optimization": false - }, - "configurations": { - "dev": { - "optimization": true, - "outputHashing": "all", - "namedChunks": false, - "extractLicenses": true - }, - "production": { - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "namedChunks": false, - "extractLicenses": true - } - }, - "defaultConfiguration": "" - }, - "lint": { - "builder": "@angular-eslint/builder:lint", - "options": { - "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"] - } } - } + }, + "cli": { + "analytics": "d98edcd7-fbf7-457b-8b1a-674a89b98183", + "schematicCollections": [ + "@angular-eslint/schematics" + ] } - }, - "cli": { - "analytics": "d98edcd7-fbf7-457b-8b1a-674a89b98183", - "schematicCollections": ["@angular-eslint/schematics"] - } } diff --git a/VideoWeb/VideoWeb/ClientApp/package-lock.json b/VideoWeb/VideoWeb/ClientApp/package-lock.json index a15bde28dd..d424a581db 100644 --- a/VideoWeb/VideoWeb/ClientApp/package-lock.json +++ b/VideoWeb/VideoWeb/ClientApp/package-lock.json @@ -9089,9 +9089,9 @@ } }, "node_modules/govuk-frontend": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-4.7.0.tgz", - "integrity": "sha512-0OsdCusF5qvLWwKziU8zqxiC0nq6WP0ZQuw51ymZ/1V0tO71oIKMlSLN2S9bm8RcEGSoidPt2A34gKxePrLjvg==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-4.8.0.tgz", + "integrity": "sha512-NOmPJxL8IYq1HSNHYKx9XY2LLTxuwb+IFASiGQO4sgJ8K7AG66SlSeqARrcetevV8zOf+i1z+MbJJ2O7//OxAw==", "engines": { "node": ">= 4.2.0" } diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/on-the-day/host-hearing-list/host-hearing-table/host-hearing-table.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/on-the-day/host-hearing-list/host-hearing-table/host-hearing-table.component.scss index bdafc7474d..e1118e130d 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/on-the-day/host-hearing-list/host-hearing-table/host-hearing-table.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/on-the-day/host-hearing-list/host-hearing-table/host-hearing-table.component.scss @@ -1,5 +1,3 @@ -@import 'govuk-frontend/govuk/all'; - .table-container { overflow-x: auto; } diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/on-the-day/introduction/introduction.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/on-the-day/introduction/introduction.component.scss index fc9a584eb8..578dc9d72d 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/on-the-day/introduction/introduction.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/on-the-day/introduction/introduction.component.scss @@ -1,5 +1,4 @@ -@import 'govuk-frontend/govuk/all'; - +@import 'govuk-frontend/govuk/base'; $crest-image-width: 180px; $crest-column-padding: 15px; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.css b/VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.css deleted file mode 100644 index 1dba7e5132..0000000000 --- a/VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.css +++ /dev/null @@ -1,79 +0,0 @@ -#contents div { - margin: 0; - float: left; -} - -.vh-section { - margin-bottom: 5em; -} - -.vh-top { - margin-top: 5em; -} - -.vh-left20 { - margin-left: 20px; -} - -.govuk-heading-s { - margin-bottom: 5px; -} - -.govuk-sticky-element { - bottom: 10px; - position: fixed; -} - -.govuk-sticky-element-footer { - bottom: 256px; - position: sticky; -} - -@media (max-width: 40.0625em) { - .govuk-sticky-element { - visibility: hidden; - } - .govuk-sticky-element-footer { - bottom: 256px; - } -} - -.app-c-back-to-top { - font-size: 16px; - line-height: 1.5; -} - -a { - color: #005798; -} - -a:focus:link { - color: #005798 !important; -} - -a:hover { - color: #2b8cc4 !important; -} - -a:link { - color: #005ea5 !important; -} - -.vh-text { - overflow-wrap: normal; - word-break: break-word; - list-style-type: none; - padding-left: 0; - margin-left: 0; - font-family: 'GDS Transport', Arial, sans-serif; -} - -@media (min-width: 40.0625em) { - .vh-text { - padding-top: 7.5px; - } -} - -.vh-text a { - text-decoration: none; -} diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.scss new file mode 100644 index 0000000000..0d8d0860e5 --- /dev/null +++ b/VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.scss @@ -0,0 +1,75 @@ +@import 'govuk-frontend/govuk/base'; + +#contents div { + margin: 0; + float: left; +} + +.vh-section { + margin-bottom: 5em; +} + +.vh-top { + margin-top: 5em; +} + +.vh-left20 { + margin-left: 20px; +} + +.govuk-heading-s { + margin-bottom: 5px; +} + +.govuk-sticky-element { + bottom: 10px; + position: fixed; +} + +.govuk-sticky-element-footer { + bottom: 256px; + position: sticky; +} + +@media (max-width: 40.0625em) { + .govuk-sticky-element { + visibility: hidden; + } + .govuk-sticky-element-footer { + bottom: 256px; + } +} + +.app-c-back-to-top { + font-size: 16px; + line-height: 1.5; +} + +a, +a:hover { + color: govuk-colour('blue') !important; +} + +a:link, +a:focus:link { + color: govuk-colour('light-blue') !important; +} + +.vh-text { + overflow-wrap: normal; + word-break: break-word; + list-style-type: none; + padding-left: 0; + margin-left: 0; + font-family: 'GDS Transport', Arial, sans-serif; +} + +@media (min-width: 40.0625em) { + .vh-text { + padding-top: 7.5px; + } +} + +.vh-text a { + text-decoration: none; +} diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.ts b/VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.ts index 33959703c1..e22b83bd40 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.ts +++ b/VideoWeb/VideoWeb/ClientApp/src/app/shared/accessibility/accessibility.component.ts @@ -5,7 +5,7 @@ import { ScrolledEvent, ScrolledFooter } from '../models/scrolled-event'; @Component({ selector: 'app-accessibility', templateUrl: './accessibility.component.html', - styleUrls: ['./accessibility.component.css'] + styleUrls: ['./accessibility.component.scss'] }) export class AccessibilityComponent { isVisibleContents = true; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/chat-body-window/chat-body-window.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/shared/chat-body-window/chat-body-window.component.scss index db3f2df7c0..20c20d0746 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/shared/chat-body-window/chat-body-window.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/shared/chat-body-window/chat-body-window.component.scss @@ -47,7 +47,7 @@ } .message-item-sent { - color: #ffffff; + color: govuk-colour('white'); background-color: govuk-colour('blue'); margin-right: 10px; padding-right: 25px; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/contact-us-folding/contact-us-folding.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/shared/contact-us-folding/contact-us-folding.component.scss index 477565b675..e52949ca1d 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/shared/contact-us-folding/contact-us-folding.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/shared/contact-us-folding/contact-us-folding.component.scss @@ -1,6 +1,4 @@ @import 'govuk-frontend/govuk/base'; -@import 'govuk-frontend/govuk/all'; - .available-time { color: govuk-colour('mid-grey'); } diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header-logo-svg/header-logo-svg.component.html b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header-logo-svg/header-logo-svg.component.html similarity index 99% rename from VideoWeb/VideoWeb/ClientApp/src/app/shared/header-logo-svg/header-logo-svg.component.html rename to VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header-logo-svg/header-logo-svg.component.html index 6ba17225df..64840c80e2 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header-logo-svg/header-logo-svg.component.html +++ b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header-logo-svg/header-logo-svg.component.html @@ -1,6 +1,4 @@ - + - - - - \ No newline at end of file + + diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header-logo-svg/header-logo-svg.component.spec.ts b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header-logo-svg/header-logo-svg.component.spec.ts similarity index 100% rename from VideoWeb/VideoWeb/ClientApp/src/app/shared/header-logo-svg/header-logo-svg.component.spec.ts rename to VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header-logo-svg/header-logo-svg.component.spec.ts diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header-logo-svg/header-logo-svg.component.ts b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header-logo-svg/header-logo-svg.component.ts similarity index 100% rename from VideoWeb/VideoWeb/ClientApp/src/app/shared/header-logo-svg/header-logo-svg.component.ts rename to VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header-logo-svg/header-logo-svg.component.ts diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.css b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.css deleted file mode 100644 index 1f60cf771f..0000000000 --- a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.css +++ /dev/null @@ -1,14 +0,0 @@ -.govuk-header__logo { - width: 70%; -} - -.vh-ml15 { - margin-right: 15px; - margin-bottom: 10px; -} - -@media only screen and (max-width: 600px) { - .govuk-header__logo { - width: 100%; - } -} diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.html b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.html index bb9bdee362..3b81cbbb35 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.html +++ b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.html @@ -1,42 +1,30 @@ -
- -
- - -
- - - -
+
\ No newline at end of file + diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.scss new file mode 100644 index 0000000000..86e9ba1722 --- /dev/null +++ b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.scss @@ -0,0 +1,22 @@ +.govuk-header__logo { + width: 90%; + margin-bottom: 0px; +} + +.govuk-header__logotype-crown { + margin-right: 10px; +} +.vh-ml15 { + margin-right: 15px; + margin-bottom: 10px; +} + +@media only screen and (max-width: 600px) { + .govuk-header__logo { + width: 100%; + } +} + +.header-item { + padding: 5px; +} diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.ts b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.ts index 4b19e2a2ee..0d3eb46daf 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.ts +++ b/VideoWeb/VideoWeb/ClientApp/src/app/shared/header/header.component.ts @@ -8,7 +8,7 @@ import { topMenuItems } from './topMenuItems'; @Component({ selector: 'app-header', templateUrl: './header.component.html', - styleUrls: ['./header.component.css'] + styleUrls: ['./header.component.scss'] }) export class HeaderComponent implements OnInit { @Input() loggedIn: boolean; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/shared.module.ts b/VideoWeb/VideoWeb/ClientApp/src/app/shared/shared.module.ts index edddfe3e69..4b0fae797b 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/shared/shared.module.ts +++ b/VideoWeb/VideoWeb/ClientApp/src/app/shared/shared.module.ts @@ -41,7 +41,7 @@ import { ConfigService } from '../services/api/config.service'; import { LoggerService, LOG_ADAPTER } from '../services/logging/logger.service'; import { ConsoleLogger } from '../services/logging/loggers/console-logger'; import { Logger } from '../services/logging/logger-base'; -import { HeaderLogoSvgComponent } from './header-logo-svg/header-logo-svg.component'; +import { HeaderLogoSvgComponent } from './header/header-logo-svg/header-logo-svg.component'; import { VideoFilterComponent } from './video-filter/video-filter.component'; import { HyphenatePipe } from './pipes/hyphenate.pipe'; import { ForcePlayVideoDirective } from './force-play-video.directive'; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/shared/toast/vh-toast.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/shared/toast/vh-toast.component.scss index 6beed14938..f345325269 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/shared/toast/vh-toast.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/shared/toast/vh-toast.component.scss @@ -13,7 +13,7 @@ font-family: 'GDS Transport', arial, sans-serif; &.black { - background: #1e1e1e; + background: #1e1e1e; //slightly lighter than gov black color: govuk-colour('white'); } @@ -47,7 +47,7 @@ pointer-events: auto; &.grey { - color: #ffffff; + color: govuk-colour('white'); background: rgba(80, 90, 95, 1); &:hover { background: rgba(80, 90, 95, 0.7); @@ -55,11 +55,11 @@ } &.join-hearing-button { - color: #ffffff; - background: #00703c; + color: govuk-colour('white'); + background: govuk-colour('green'); box-shadow: rgb(146 145 145) 0px 2px 0px; &:hover { - background: #005a30; + background: #005a30; // slightly darker than gov green } } &.hearing-started-dismiss-button { diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-im-list/admin-im-list.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-im-list/admin-im-list.component.scss index 11f791e88c..1106651add 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-im-list/admin-im-list.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-im-list/admin-im-list.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .im-list { display: grid; @@ -9,9 +9,8 @@ cursor: pointer; } .im-list-top { - /* margin-top: 12px; */ clear: both; - border-top: 1px solid govuk-colour('mid-grey'); + border-top: 1px solid $govuk-border-colour; padding-top: 12px; } diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-im/admin-im.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-im/admin-im.component.scss index 769c1ef4da..32a657c995 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-im/admin-im.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-im/admin-im.component.scss @@ -1,5 +1,4 @@ -@import 'govuk-frontend/govuk/all'; - +@import 'govuk-frontend/govuk/base'; .im-participant-list { @include govuk-grid-column(one-third); overflow-y: auto; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/command-centre-menu/command-centre-menu.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/command-centre-menu/command-centre-menu.component.scss index df4df94548..a9a23e92e2 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/command-centre-menu/command-centre-menu.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/command-centre-menu/command-centre-menu.component.scss @@ -1,6 +1,5 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; //TABS - .tabcontainer { overflow: hidden; float: right; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/command-centre/command-centre.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/command-centre/command-centre.component.scss index 76b0d74040..ee01d44a30 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/command-centre/command-centre.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/command-centre/command-centre.component.scss @@ -20,7 +20,7 @@ height: 70vh; max-height: 100vh; padding: 0px; - border-right: 1px solid govuk-colour('light-grey') !important; + border-right: 1px solid $govuk-border-colour !important; outline: none; border: 0; } diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/court-rooms-filters/court-rooms-filters.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/court-rooms-filters/court-rooms-filters.component.scss index 6c8c7f20f8..c0d8fdf16c 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/court-rooms-filters/court-rooms-filters.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/court-rooms-filters/court-rooms-filters.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .vh-popup-overlay { cursor: pointer; @@ -20,9 +20,9 @@ .vh-popup-overlay > div { background-color: govuk-colour('white'); - -moz-box-shadow: 7px 11px 30px govuk-colour('light-grey'); - -webkit-box-shadow: 7px 11px 30px govuk-colour('light-grey'); - box-shadow: 11px 5px 30px govuk-colour('light-grey'); + -moz-box-shadow: 7px 11px 30px $govuk-border-colour; + -webkit-box-shadow: 7px 11px 30px $govuk-border-colour; + box-shadow: 11px 5px 30px $govuk-border-colour; display: inline-block; height: auto; max-width: 40%; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/hearing-status/hearing-status.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/hearing-status/hearing-status.component.scss index 36afaaaa76..dd4f1a61e5 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/hearing-status/hearing-status.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/hearing-status/hearing-status.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .status-up { grid-column: 4 / span 2; grid-row: 5/5; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/monitoring-graph/monitoring-graph.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/monitoring-graph/monitoring-graph.component.scss index ae664a2fa4..46541c450c 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/monitoring-graph/monitoring-graph.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/monitoring-graph/monitoring-graph.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .vh-popup-overlay { background: govuk-colour('white'); diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/participant-network-status/participant-network-status.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/participant-network-status/participant-network-status.component.scss index 89ef96e7b9..294b77dc04 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/participant-network-status/participant-network-status.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/participant-network-status/participant-network-status.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .participant-status-header { background: govuk-colour('light-grey'); diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/participant-status/participant-status.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/participant-status/participant-status.component.scss index 3a2fbbe804..a69f898416 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/participant-status/participant-status.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/participant-status/participant-status.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .participant-status-header { background: govuk-colour('light-grey') !important; @@ -21,7 +21,6 @@ } .tooltip-wrapper { - /*position: relative;*/ display: inline-block; text-decoration: underline; color: $govuk-link-colour !important; @@ -72,8 +71,6 @@ /* At the bottom of the tooltip */ left: 5%; margin-left: -5px; - // border-width: 5px; - // border-style: solid; border-left: solid transparent 10px; border-right: solid transparent 10px; border-bottom: solid gray 10px; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/pending-tasks/pending-tasks.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/pending-tasks/pending-tasks.component.scss index f93bc6ab10..94901ae33b 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/pending-tasks/pending-tasks.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/pending-tasks/pending-tasks.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .pending-alerts { color: govuk-colour('red'); diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/tasks-table/tasks-table.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/tasks-table/tasks-table.component.scss index 2cc5c43823..7bbca57fe9 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/tasks-table/tasks-table.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/tasks-table/tasks-table.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .task-header { background: govuk-colour('light-grey'); diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-chat/vho-chat.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-chat/vho-chat.component.scss index a6b261a73e..058b2b7552 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-chat/vho-chat.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-chat/vho-chat.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .participant-name { float: right; @@ -7,7 +7,7 @@ .chat-window { height: calc(50vh - 50px); - border: 1px solid govuk-colour('light-grey'); + border: 1px solid $govuk-border-colour; clear: both; margin-right: 0px !important; margin-left: -5px !important; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-global-styles.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-global-styles.scss index 37c3b58e35..8bc341326f 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-global-styles.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-global-styles.scss @@ -1,3 +1,4 @@ +@import 'govuk-frontend/govuk/base'; $font-size: 1rem; [class^='govuk-'] { @@ -12,8 +13,6 @@ h3[class^='govuk-'] { font-size: 1.5rem; } -@import 'govuk-frontend/govuk/all'; - .govuk-button--black { border: 2px solid govuk-colour('black'); border-radius: 3px; diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-hearing-list/vho-hearing-list.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-hearing-list/vho-hearing-list.component.scss index bf72404caf..fe3cd474b7 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-hearing-list/vho-hearing-list.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/vho-hearing-list/vho-hearing-list.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .vh-width-main { width: 85% !important; @@ -48,7 +48,6 @@ } .tooltip-wrapper { - /*position: relative;*/ color: $govuk-link-colour; white-space: nowrap; padding: 4px !important; @@ -146,8 +145,8 @@ cursor: pointer; } .selected { - background-color: #f8f8f8; - border-left: 8px solid #0b0c0d; + background-color: govuk-colour('light-grey'); + border-left: 8px solid govuk-colour('black'); } .icons { width: 24px; @@ -289,7 +288,7 @@ /* Tooltip container */ .copyTooltip { position: relative; - border-bottom: 1px solid #1d70b8; + border-bottom: 1px solid govuk-colour('blue'); } /* Tooltip text */ diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/analogue-clock/analogue-clock.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/analogue-clock/analogue-clock.component.scss index 10a4527527..8004e68483 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/analogue-clock/analogue-clock.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/analogue-clock/analogue-clock.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .outer_face { display: block; @@ -11,7 +11,7 @@ /* height of clock */ border-radius: 200px; /* clock round corner radius */ - border: 0 solid govuk-colour('mid-grey'); + border: 0 solid $govuk-border-colour; /* thickness of outer border */ &.ontime { diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/individual-participant-status-list/individual-participant-status-list.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/individual-participant-status-list/individual-participant-status-list.component.scss index 08bed31f0d..9c60ce5a5c 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/individual-participant-status-list/individual-participant-status-list.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/individual-participant-status-list/individual-participant-status-list.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .label-status { color: govuk-colour('white'); diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/judge-participant-status-list/judge-participant-status-list.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/judge-participant-status-list/judge-participant-status-list.component.scss index 327aab9865..fb96a2d669 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/judge-participant-status-list/judge-participant-status-list.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/judge-participant-status-list/judge-participant-status-list.component.scss @@ -1,4 +1,4 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; .available { color: govuk-colour('green'); diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/participant-chat/participant-chat.component.scss b/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/participant-chat/participant-chat.component.scss index 203ff0ff32..1b73f8dfbf 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/participant-chat/participant-chat.component.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/app/waiting-space/participant-chat/participant-chat.component.scss @@ -1,4 +1,5 @@ -@import 'govuk-frontend/govuk/all'; +@import 'govuk-frontend/govuk/base'; +@import 'govuk-frontend/govuk/core/links'; @import 'abstracts'; .judge-chat-window { diff --git a/VideoWeb/VideoWeb/ClientApp/src/sass/main.scss b/VideoWeb/VideoWeb/ClientApp/src/sass/main.scss index c89002eaa3..aa14865bea 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/sass/main.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/sass/main.scss @@ -1,3 +1,3 @@ @import 'abstracts'; @import 'vendor-modifications'; -@import 'components' \ No newline at end of file +@import 'components'; diff --git a/VideoWeb/VideoWeb/ClientApp/src/styles.css b/VideoWeb/VideoWeb/ClientApp/src/styles.css deleted file mode 100644 index 6e07291308..0000000000 --- a/VideoWeb/VideoWeb/ClientApp/src/styles.css +++ /dev/null @@ -1,11 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ - -.toast-top-right { - top: 122px !important; - right: 20px !important; -} - -.toast-content { - display: block; - word-wrap: break-word; -} diff --git a/VideoWeb/VideoWeb/ClientApp/src/styles.scss b/VideoWeb/VideoWeb/ClientApp/src/styles.scss index de9ef7e5e2..7681fdfa2d 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/styles.scss +++ b/VideoWeb/VideoWeb/ClientApp/src/styles.scss @@ -1,10 +1,7 @@ $govuk-global-styles: true; -@import 'govuk-frontend/govuk/base'; @import 'govuk-frontend/govuk/all'; -@import '@hmcts/frontend/all'; @import '@ng-select/ng-select/themes/default.theme.css'; -@import '@ministryofjustice/frontend/moj/all'; @import 'main'; .grey-btn { @@ -63,11 +60,11 @@ $govuk-global-styles: true; /* Modal Content/Box */ .modal-content { - background-color: #fefefe; + background-color: govuk-colour('white'); margin: 5% auto; /* 15% from the top and centered */ padding: 20px; - border: 1px solid #888; + border: 1px solid $govuk-border-colour; width: 90%; @media only screen and (min-width: $breakpoint-medium) { width: 680px; @@ -75,9 +72,9 @@ $govuk-global-styles: true; } .modal-content.negative { - color: #ffffff; + color: govuk-colour('white'); background-color: #1e1e1e; - border: 1px solid #888; + border: 1px solid $govuk-border-colour } .shadow { @@ -126,14 +123,14 @@ $govuk-global-styles: true; } .vh-border { - border: 1px solid govuk-colour('mid-grey'); + border: 1px solid $govuk-border-colour; padding: 8px; border-radius: 3px 4px; margin-bottom: 15px; } .vh-line { - border-bottom: 1px solid govuk-colour('mid-grey'); + border-bottom: 1px solid $govuk-border-colour; } .vh-fade-out { @@ -161,7 +158,7 @@ $govuk-global-styles: true; z-index: 999; box-shadow: 0 7px 11px 0px rgba(0, 0, 0, 0.3); background: govuk-colour('blue'); - border: 1px solidgovuk-colour('blue'); + border: 1px solid govuk-colour('blue'); border-radius: 2px; position: absolute; top: 127px; @@ -179,27 +176,27 @@ $govuk-global-styles: true; .vh-tooltip-blue { background: govuk-colour('blue'); - border: 1px solidgovuk-colour('blue'); + border: 1px solid govuk-colour('blue'); } .vh-tooltip-red { background: govuk-colour('red'); - border: 1px solidgovuk-colour('red'); + border: 1px solid govuk-colour('red'); } .vh-tooltip-grey { background: govuk-colour('dark-grey'); - border: 1px solidgovuk-colour('dark-grey'); + border: 1px solid govuk-colour('dark-grey'); } .vh-tooltip-green { background: govuk-colour('green'); - border: 1px solidgovuk-colour('green'); + border: 1px solid govuk-colour('green'); } .vh-tooltip-yellow { background: govuk-colour('yellow'); - border: 1px solidgovuk-colour('yellow') !important; + border: 1px solid govuk-colour('yellow') !important; color: govuk-colour('black'); } @@ -239,3 +236,13 @@ video { padding-bottom: rem(10px); border-bottom: 2px solid govuk-colour('mid-grey'); } + +.toast-top-right { + top: 122px !important; + right: 20px !important; +} + +.toast-content { + display: block; + word-wrap: break-word; +} From d72a363e4dfbe11c970055223c04da468080e822 Mon Sep 17 00:00:00 2001 From: William Craig Date: Tue, 9 Apr 2024 11:15:40 +0100 Subject: [PATCH 02/20] VIH-10550 Fetch conferences for host judiciary participants (#2123) * Updated GetConferencesForHost, to query video-api by the hearingRefIds rather than username * Sonarcloud code smells --- .../GetConferencesForHostTests.cs | 18 ++++++++++----- .../Controllers/ConferencesController.cs | 23 +++++++++++-------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/VideoWeb/VideoWeb.UnitTests/Controllers/ConferenceController/GetConferencesForHostTests.cs b/VideoWeb/VideoWeb.UnitTests/Controllers/ConferenceController/GetConferencesForHostTests.cs index a23201aafc..2f022261b3 100644 --- a/VideoWeb/VideoWeb.UnitTests/Controllers/ConferenceController/GetConferencesForHostTests.cs +++ b/VideoWeb/VideoWeb.UnitTests/Controllers/ConferenceController/GetConferencesForHostTests.cs @@ -23,6 +23,7 @@ using VideoWeb.Mappings; using VideoWeb.Contract.Responses; using VideoApi.Contract.Enums; +using VideoApi.Contract.Requests; using EndpointResponse = BookingsApi.Contract.V1.Responses.EndpointResponse; namespace VideoWeb.UnitTests.Controllers.ConferenceController @@ -64,6 +65,10 @@ public void Setup() _logger = _mocker.Mock>().SetupAllProperties(); _controller = _mocker.Create(); _controller.ControllerContext = context; + _mocker.Mock() + .Setup(x => x.GetConfirmedHearingsByUsernameForTodayAsync(It.IsAny())) + .ReturnsAsync(new List()); + } [Test] @@ -97,7 +102,7 @@ public async Task Should_return_ok_with_list_of_conferences() } _mocker.Mock() - .Setup(x => x.GetConferencesTodayForHostAsync(It.IsAny())) + .Setup(x => x.GetConferencesForHostByHearingRefIdAsync(It.IsAny())) .ReturnsAsync(conferences); _mocker.Mock() @@ -152,7 +157,7 @@ public async Task Should_return_ok_with_list_of_conferences_where_hearings_and_c _mocker.Mock() - .Setup(x => x.GetConferencesTodayForHostAsync(It.IsAny())) + .Setup(x => x.GetConferencesForHostByHearingRefIdAsync(It.IsAny())) .ReturnsAsync(conferences); _mocker.Mock() @@ -181,7 +186,7 @@ public async Task Should_return_ok_with_no_conferences() var conferences = new List(); var bookingException = new BookingsApiException("User does not have any hearings", (int)HttpStatusCode.NotFound, "Error", null, null); _mocker.Mock() - .Setup(x => x.GetConferencesTodayForHostAsync(It.IsAny())) + .Setup(x => x.GetConferencesForHostByHearingRefIdAsync(It.IsAny())) .ReturnsAsync(conferences); _mocker.Mock() .Setup(x => x.GetConfirmedHearingsByUsernameForTodayAsync(It.IsAny())) @@ -202,7 +207,7 @@ public async Task Should_return_bad_request() var apiException = new VideoApiException("Bad Request", (int) HttpStatusCode.BadRequest, "Please provide a valid email", null, default, null); _mocker.Mock() - .Setup(x => x.GetConferencesTodayForHostAsync(It.IsAny())) + .Setup(x => x.GetConferencesForHostByHearingRefIdAsync(It.IsAny())) .ThrowsAsync(apiException); var result = await _controller.GetConferencesForHostAsync(); @@ -218,7 +223,7 @@ public async Task Should_return_forbidden_request() (int) HttpStatusCode.Unauthorized, "Invalid Client ID", null, default, null); _mocker.Mock() - .Setup(x => x.GetConferencesTodayForHostAsync(It.IsAny())) + .Setup(x => x.GetConferencesForHostByHearingRefIdAsync(It.IsAny())) .ThrowsAsync(apiException); var result = await _controller.GetConferencesForHostAsync(); @@ -230,11 +235,12 @@ public async Task Should_return_forbidden_request() [Test] public async Task Should_forward_error_when_video_api_returns_error() { + var apiException = new VideoApiException("Internal Server Error", (int) HttpStatusCode.InternalServerError, "Stacktrace goes here", null, default, null); _mocker.Mock() - .Setup(x => x.GetConferencesTodayForHostAsync(It.IsAny())) + .Setup(x => x.GetConferencesForHostByHearingRefIdAsync(It.IsAny())) .ThrowsAsync(apiException); var result = await _controller.GetConferencesForHostAsync(); diff --git a/VideoWeb/VideoWeb/Controllers/ConferencesController.cs b/VideoWeb/VideoWeb/Controllers/ConferencesController.cs index 701d4b7855..1be5cd9985 100644 --- a/VideoWeb/VideoWeb/Controllers/ConferencesController.cs +++ b/VideoWeb/VideoWeb/Controllers/ConferencesController.cs @@ -72,10 +72,13 @@ public async Task>> GetConferencesF var conferenceForHostResponseMapper = _mapperFactory.Get, ConferenceForHostResponse>(); var username = User.Identity!.Name; var hearings = await _bookingApiClient.GetConfirmedHearingsByUsernameForTodayAsync(username); - var conferencesForHost = await _videoApiClient.GetConferencesTodayForHostAsync(username); + var conferencesForHost = await _videoApiClient.GetConferencesForHostByHearingRefIdAsync(new GetConferencesByHearingIdsRequest + { + HearingRefIds = hearings.Select(x => x.Id).ToArray() + }); if(conferencesForHost.Count != hearings.Count) - _logger.LogError(@"Number of hearings ({HearingCount}) does not match number of conferences ({ConferenceCount}) for user {Username}", + _logger.LogError("Number of hearings ({HearingCount}) does not match number of conferences ({ConferenceCount}) for user {Username}", hearings.Count, conferencesForHost.Count, username); var response = hearings @@ -257,14 +260,14 @@ public async Task> GetConferenceByIdVHOAsync if (conference == null) { - _logger.LogWarning("Conference details with id: {conferenceId} not found", conferenceId); + _logger.LogWarning("Conference details with id: {ConferenceId} not found", conferenceId); return NoContent(); } } catch (VideoApiException e) { - _logger.LogError(e, $"Unable to retrieve conference: ${conferenceId}"); + _logger.LogError(e, "Unable to retrieve conference: {ConferenceId}", conferenceId); return StatusCode(e.StatusCode, e.Response); } @@ -272,8 +275,8 @@ public async Task> GetConferenceByIdVHOAsync if (!conference.IsWaitingRoomOpen) { _logger.LogInformation( - $"Unauthorised to view conference details {conferenceId} because user is not " + - "Officer nor a participant of the conference, or the conference has been closed for over 30 minutes"); + "Unauthorised to view conference details {ConferenceId} because user is not Officer " + + "nor a participant of the conference, or the conference has been closed for over 30 minutes", conferenceId); return Unauthorized(); } @@ -337,14 +340,14 @@ public async Task> GetConferenceByIdAsync(Guid if (conference == null) { - _logger.LogWarning("Conference details with id: {conferenceId} not found", conferenceId); + _logger.LogWarning("Conference details with id: {ConferenceId} not found", conferenceId); return NoContent(); } } catch (VideoApiException e) { - _logger.LogError(e, $"Unable to retrieve conference: ${conferenceId}"); + _logger.LogError(e, "Unable to retrieve conference: {ConferenceId}", conferenceId); return StatusCode(e.StatusCode, e.Response); } @@ -352,8 +355,8 @@ public async Task> GetConferenceByIdAsync(Guid (conference.Participants.TrueForAll(x => x.Username.ToLower().Trim() != username) || !conference.IsWaitingRoomOpen)) { _logger.LogInformation( - $"Unauthorised to view conference details {conferenceId} because user is neither a VH " + - "Officer nor a participant of the conference, or the conference has been closed for over 30 minutes"); + "Unauthorised to view conference details {ConferenceId} because user is neither a VH Officer " + + "nor a participant of the conference, or the conference has been closed for over 30 minutes", conferenceId); return Unauthorized(); } From cf909d36f533e88003f1b794938a9fb91c8429d5 Mon Sep 17 00:00:00 2001 From: marcogagliardi Date: Wed, 10 Apr 2024 14:40:20 +0100 Subject: [PATCH 03/20] VIH-10607 - added feature flag for vodafone (#2124) * added feature flag for vodafone * lint fix --- .../src/app/services/launch-darkly.service.ts | 3 ++- .../admin-hearing.component.html | 2 +- .../admin-hearing.component.spec.ts | 19 ++++++++++++++++++- .../admin-hearing/admin-hearing.component.ts | 7 ++++++- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/services/launch-darkly.service.ts b/VideoWeb/VideoWeb/ClientApp/src/app/services/launch-darkly.service.ts index fda0a20a74..6ed1986a9e 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/services/launch-darkly.service.ts +++ b/VideoWeb/VideoWeb/ClientApp/src/app/services/launch-darkly.service.ts @@ -10,7 +10,8 @@ export const FEATURE_FLAGS = { dom1SignIn: 'dom1', multiIdpSelection: 'multi-idp-selection', wowzaKillButton: 'wowza-listener-kill-switch', - hostMuteMicrophone: 'host-mute-microphone' + hostMuteMicrophone: 'host-mute-microphone', + vodafone: 'vodafone' }; @Injectable({ diff --git a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-hearing/admin-hearing.component.html b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-hearing/admin-hearing.component.html index 67b70deb73..ba1fbf89a9 100644 --- a/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-hearing/admin-hearing.component.html +++ b/VideoWeb/VideoWeb/ClientApp/src/app/vh-officer/admin-hearing/admin-hearing.component.html @@ -6,7 +6,7 @@
-
+