From 02ab162d8ff88783003fdbc8669fdd1d6534fca8 Mon Sep 17 00:00:00 2001
From: EladTrebor <150268161+EladTrebor@users.noreply.github.com>
Date: Wed, 23 Oct 2024 11:27:03 +0100
Subject: [PATCH 1/5] Update to Location-Information-Content.cshtml
Small change to add a location journey in oder to address issue flagged by Salford VCFSs.
---
.../manage-locations/Location-Information-Content.cshtml | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/ui/manage-ui/src/FamilyHubs.ServiceDirectory.Admin.Web/Pages/manage-locations/Location-Information-Content.cshtml b/src/ui/manage-ui/src/FamilyHubs.ServiceDirectory.Admin.Web/Pages/manage-locations/Location-Information-Content.cshtml
index 7d6abdce3..a7b3a11cb 100644
--- a/src/ui/manage-ui/src/FamilyHubs.ServiceDirectory.Admin.Web/Pages/manage-locations/Location-Information-Content.cshtml
+++ b/src/ui/manage-ui/src/FamilyHubs.ServiceDirectory.Admin.Web/Pages/manage-locations/Location-Information-Content.cshtml
@@ -1,10 +1,9 @@
Is there anything else people need to know about this location?
-This could include:
+You must only include information about this location. For example:
- - contact information
- - opening times
+ - opening times for the building
- if the building is wheelchair accessible
- - how to access the location
-
\ No newline at end of file
+ how to access the building
+
From 0bd9dc8e07d5bf16b030e2da914e80c3312f3e3d Mon Sep 17 00:00:00 2001
From: Thomas Cheyney
Date: Tue, 29 Oct 2024 14:47:08 +0000
Subject: [PATCH 2/5] Fix blank page in service list
---
.../GetServicesByOrganisationId/GetServiceNamesCommand.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/service/service-directory-api/src/FamilyHubs.ServiceDirectory.Core/Queries/Services/GetServicesByOrganisationId/GetServiceNamesCommand.cs b/src/service/service-directory-api/src/FamilyHubs.ServiceDirectory.Core/Queries/Services/GetServicesByOrganisationId/GetServiceNamesCommand.cs
index d39d46256..12d93f5f0 100644
--- a/src/service/service-directory-api/src/FamilyHubs.ServiceDirectory.Core/Queries/Services/GetServicesByOrganisationId/GetServiceNamesCommand.cs
+++ b/src/service/service-directory-api/src/FamilyHubs.ServiceDirectory.Core/Queries/Services/GetServicesByOrganisationId/GetServiceNamesCommand.cs
@@ -79,7 +79,7 @@ private async Task> GetServiceNames(GetServiceNamesCommand
private async Task GetServicesCount(GetServiceNamesCommand request, CancellationToken cancellationToken)
{
var serviceCountQuery = _context.Services
- .Where(s => s.Status != ServiceStatusType.Deleted);
+ .Where(s => s.Status != ServiceStatusType.Defunct);
if (request.OrganisationId != null)
{
From 3bb7004b9494aedffe4beb9b18623ccf64051dca Mon Sep 17 00:00:00 2001
From: Thomas Cheyney
Date: Tue, 29 Oct 2024 14:49:27 +0000
Subject: [PATCH 3/5] Remove duplicated code
---
.../GetServiceNamesCommand.cs | 32 +++++++++----------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/src/service/service-directory-api/src/FamilyHubs.ServiceDirectory.Core/Queries/Services/GetServicesByOrganisationId/GetServiceNamesCommand.cs b/src/service/service-directory-api/src/FamilyHubs.ServiceDirectory.Core/Queries/Services/GetServicesByOrganisationId/GetServiceNamesCommand.cs
index 12d93f5f0..b31199b21 100644
--- a/src/service/service-directory-api/src/FamilyHubs.ServiceDirectory.Core/Queries/Services/GetServicesByOrganisationId/GetServiceNamesCommand.cs
+++ b/src/service/service-directory-api/src/FamilyHubs.ServiceDirectory.Core/Queries/Services/GetServicesByOrganisationId/GetServiceNamesCommand.cs
@@ -1,5 +1,6 @@
using AutoMapper;
using AutoMapper.QueryableExtensions;
+using FamilyHubs.ServiceDirectory.Data.Entities;
using FamilyHubs.ServiceDirectory.Data.Repository;
using FamilyHubs.ServiceDirectory.Shared.Dto;
using FamilyHubs.ServiceDirectory.Shared.Enums;
@@ -52,17 +53,7 @@ private async Task> GetServiceNames(GetServiceNamesCommand
int skip = (request.PageNumber - 1) * request.PageSize;
//todo: do we need _context.ServiceNames?
- var servicesQuery = _context.Services
- .Where(s => s.Status != ServiceStatusType.Defunct);
-
- if (request.OrganisationId != null)
- {
- servicesQuery = servicesQuery.Where(s => s.OrganisationId == request.OrganisationId);
- }
- if (!string.IsNullOrEmpty(request.ServiceNameSearch))
- {
- servicesQuery = servicesQuery.Where(s => s.Name.Contains(request.ServiceNameSearch));
- }
+ var servicesQuery = GetBaseQuery(request);
servicesQuery = request.Order == SortOrder.ascending
? servicesQuery.OrderBy(s => s.Name)
@@ -78,18 +69,25 @@ private async Task> GetServiceNames(GetServiceNamesCommand
private async Task GetServicesCount(GetServiceNamesCommand request, CancellationToken cancellationToken)
{
- var serviceCountQuery = _context.Services
+ var serviceCountQuery = GetBaseQuery(request);
+
+ return await serviceCountQuery.CountAsync(cancellationToken);
+ }
+
+ private IQueryable GetBaseQuery(GetServiceNamesCommand cmd)
+ {
+ var query = _context.Services
.Where(s => s.Status != ServiceStatusType.Defunct);
- if (request.OrganisationId != null)
+ if (cmd.OrganisationId != null)
{
- serviceCountQuery = serviceCountQuery.Where(s => s.OrganisationId == request.OrganisationId);
+ query = query.Where(s => s.OrganisationId == cmd.OrganisationId);
}
- if (!string.IsNullOrEmpty(request.ServiceNameSearch))
+ if (!string.IsNullOrEmpty(cmd.ServiceNameSearch))
{
- serviceCountQuery = serviceCountQuery.Where(s => s.Name.Contains(request.ServiceNameSearch));
+ query = query.Where(s => s.Name.Contains(cmd.ServiceNameSearch));
}
- return await serviceCountQuery.CountAsync(cancellationToken);
+ return query;
}
}
From 4f25257126cc16b8aa60992e33b42c719b08b46e Mon Sep 17 00:00:00 2001
From: Aaron Yarborough
Date: Thu, 31 Oct 2024 13:26:40 +0000
Subject: [PATCH 4/5] chore: docker container name change
---
local/db/docker-compose.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/local/db/docker-compose.yml b/local/db/docker-compose.yml
index 6d23c9568..71e83d80f 100644
--- a/local/db/docker-compose.yml
+++ b/local/db/docker-compose.yml
@@ -1,4 +1,5 @@
version: '3.8'
+name: 'family-hubs'
services:
mssql:
image: mcr.microsoft.com/mssql/server:2022-latest
From 01a6855394eb38a3ed0764f172d6323d2b0eb740 Mon Sep 17 00:00:00 2001
From: Aaron Yarborough
Date: Fri, 1 Nov 2024 08:46:20 +0000
Subject: [PATCH 5/5] chore: move src/test/ stuff into test/ (#213)
---
{src/test => test}/k6/.gitignore | 0
{src/test => test}/k6/README.md | 0
{src/test => test}/k6/env/local/config.load.json | 0
{src/test => test}/k6/env/local/config.soak.json | 0
{src/test => test}/k6/env/local/config.stress.json | 0
{src/test => test}/k6/env/local/settings.json | 0
{src/test => test}/k6/main.js | 0
{src/test => test}/k6/package-lock.json | 0
{src/test => test}/k6/package.json | 0
{src/test => test}/k6/tests/find-tests.js | 0
10 files changed, 0 insertions(+), 0 deletions(-)
rename {src/test => test}/k6/.gitignore (100%)
rename {src/test => test}/k6/README.md (100%)
rename {src/test => test}/k6/env/local/config.load.json (100%)
rename {src/test => test}/k6/env/local/config.soak.json (100%)
rename {src/test => test}/k6/env/local/config.stress.json (100%)
rename {src/test => test}/k6/env/local/settings.json (100%)
rename {src/test => test}/k6/main.js (100%)
rename {src/test => test}/k6/package-lock.json (100%)
rename {src/test => test}/k6/package.json (100%)
rename {src/test => test}/k6/tests/find-tests.js (100%)
diff --git a/src/test/k6/.gitignore b/test/k6/.gitignore
similarity index 100%
rename from src/test/k6/.gitignore
rename to test/k6/.gitignore
diff --git a/src/test/k6/README.md b/test/k6/README.md
similarity index 100%
rename from src/test/k6/README.md
rename to test/k6/README.md
diff --git a/src/test/k6/env/local/config.load.json b/test/k6/env/local/config.load.json
similarity index 100%
rename from src/test/k6/env/local/config.load.json
rename to test/k6/env/local/config.load.json
diff --git a/src/test/k6/env/local/config.soak.json b/test/k6/env/local/config.soak.json
similarity index 100%
rename from src/test/k6/env/local/config.soak.json
rename to test/k6/env/local/config.soak.json
diff --git a/src/test/k6/env/local/config.stress.json b/test/k6/env/local/config.stress.json
similarity index 100%
rename from src/test/k6/env/local/config.stress.json
rename to test/k6/env/local/config.stress.json
diff --git a/src/test/k6/env/local/settings.json b/test/k6/env/local/settings.json
similarity index 100%
rename from src/test/k6/env/local/settings.json
rename to test/k6/env/local/settings.json
diff --git a/src/test/k6/main.js b/test/k6/main.js
similarity index 100%
rename from src/test/k6/main.js
rename to test/k6/main.js
diff --git a/src/test/k6/package-lock.json b/test/k6/package-lock.json
similarity index 100%
rename from src/test/k6/package-lock.json
rename to test/k6/package-lock.json
diff --git a/src/test/k6/package.json b/test/k6/package.json
similarity index 100%
rename from src/test/k6/package.json
rename to test/k6/package.json
diff --git a/src/test/k6/tests/find-tests.js b/test/k6/tests/find-tests.js
similarity index 100%
rename from src/test/k6/tests/find-tests.js
rename to test/k6/tests/find-tests.js