From d90dd798a5db64d6974d221414efb7dcdcb845ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Hoffmann?= Date: Mon, 21 Oct 2024 14:56:23 +0200 Subject: [PATCH 1/2] feat(dh): message archive improvements (#3618) * Remove unused code * Remove unsupported business reasons * Add v3 edi client * WIP: Refactor to use v3 instead of v2 * Save working state * bom bom bom bom i want you in my rom * Use v3 of EDI * Update client * Add MarketRoleExtensions * Use MarketRoleExtension over local function * Send senderId instead of senderNumber * Update query to use senderId/receiverId * Update snapshot * Revert change to nswag * Remove unneccessary using * Add EnumType for DocumentType to fix naming * Update snapshot * Update DocumentType translations * Fix license * Fix mock * Fix more mocks --- .../SchemaTests.ChangeTest.verified.graphql | 134 +++------------ .../DataHub.WebApi/Clients/EDI/Actor.cs | 25 --- .../Clients/EDI/ActorService.cs | 54 ------ .../Clients/EDI/ArchivedMessage.cs | 25 --- .../Clients/EDI/ArchivedMessageDto.cs | 23 --- .../EDI/ArchivedMessageSearchCriteria.cs | 18 -- .../EDI/ArchivedMessageSearchCriteriaDto.cs | 28 ---- .../Clients/EDI/ArchivedMessagesSearch.cs | 93 ----------- .../{V2 => V3}/EdiB2CWebAppClient.cs | 92 +++++++++-- .../EDI/B2CWebApi/{V2 => V3}/nswag.json | 6 +- .../EDI/B2CWebApi/{V2 => V3}/swagger.json | 154 ++++++++++++++++-- .../Clients/EDI/SearchResult.cs | 19 --- .../Controllers/MessageArchiveController.cs | 47 +----- .../DataHub.WebApi/DataHub.WebApi.csproj | 2 +- ...=> ActorByNumberAndRoleBatchDataLoader.cs} | 21 ++- .../GraphQL/Enums/BusinessReason.cs | 68 +------- .../GraphQL/Enums/DocumentType.cs | 73 --------- .../Extensions/MarketRoleExtensions.cs | 58 +++++++ .../GraphQL/Query/MessageArchiveQuery.cs | 54 +++--- .../Resolvers/MessageArchiveResolvers.cs | 4 +- .../MessageArchive/ArchivedMessageType.cs | 32 ++-- .../Types/MessageArchive/DocumentTypeType.cs} | 18 +- .../DomainRegistrationExtensions.cs | 11 +- .../src/assets/i18n/da.json | 124 +------------- .../src/assets/i18n/en.json | 124 +------------- .../query/get-archived-messages.graphql | 8 +- .../feature-search/src/lib/start.component.ts | 10 +- .../message-archive-search-response-logs.ts | 20 +-- .../src/lib/message-archive.ts | 2 +- 29 files changed, 430 insertions(+), 917 deletions(-) delete mode 100644 apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/Actor.cs delete mode 100644 apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ActorService.cs delete mode 100644 apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessage.cs delete mode 100644 apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageDto.cs delete mode 100644 apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageSearchCriteria.cs delete mode 100644 apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageSearchCriteriaDto.cs delete mode 100644 apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessagesSearch.cs rename apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/{V2 => V3}/EdiB2CWebAppClient.cs (88%) rename apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/{V2 => V3}/nswag.json (96%) rename apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/{V2 => V3}/swagger.json (68%) delete mode 100644 apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/SearchResult.cs rename apps/dh/api-dh/source/DataHub.WebApi/GraphQL/DataLoaders/{ActorByNumberBatchDataLoader.cs => ActorByNumberAndRoleBatchDataLoader.cs} (61%) delete mode 100644 apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/DocumentType.cs create mode 100644 apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Extensions/MarketRoleExtensions.cs rename apps/dh/api-dh/source/DataHub.WebApi/{Registration/EDIRegistrationExtensions.cs => GraphQL/Types/MessageArchive/DocumentTypeType.cs} (57%) diff --git a/apps/dh/api-dh/source/DataHub.WebApi.Tests/Snapshots/SchemaTests.ChangeTest.verified.graphql b/apps/dh/api-dh/source/DataHub.WebApi.Tests/Snapshots/SchemaTests.ChangeTest.verified.graphql index d59d5aeaeb..02e6857526 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi.Tests/Snapshots/SchemaTests.ChangeTest.verified.graphql +++ b/apps/dh/api-dh/source/DataHub.WebApi.Tests/Snapshots/SchemaTests.ChangeTest.verified.graphql @@ -114,11 +114,13 @@ type ApiErrorDescriptor { type ArchivedMessage { sender: Actor receiver: Actor - documentType: DocumentType! documentUrl: String recordId: Long! id: String! messageId: String + documentType: DocumentType! + senderRole: ActorRole! + receiverRole: ActorRole! createdAt: DateTime! businessReason: String } @@ -527,7 +529,7 @@ type Query { gridAreas: [GridAreaDto!]! imbalancePricesOverview: ImbalancePricesOverview! imbalancePricesForMonth(year: Int! month: Int! areaCode: PriceAreaCode!): [ImbalancePriceDaily!]! - archivedMessages(created: DateRange! senderNumber: String receiverNumber: String documentTypes: [DocumentType!] businessReasons: [BusinessReason!] includeRelated: Boolean filter: String "Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String order: ArchivedMessageSortInput): ArchivedMessagesConnection + archivedMessages(created: DateRange! senderId: UUID receiverId: UUID documentTypes: [DocumentType!] businessReasons: [BusinessReason!] includeRelated: Boolean filter: String "Returns the first _n_ elements from the list." first: Int "Returns the elements in the list that come after the specified cursor." after: String "Returns the last _n_ elements from the list." last: Int "Returns the elements in the list that come before the specified cursor." before: String order: ArchivedMessageSortInput): ArchivedMessagesConnection organizationAuditLogs(organizationId: UUID!): [OrganizationAuditedChangeAuditLogDto!]! organizationById(id: UUID!): Organization! organizations: [Organization!]! @@ -1046,6 +1048,20 @@ enum ActorDelegationStatus { CANCELLED } +enum ActorRole { + METERING_POINT_ADMINISTRATOR + ENERGY_SUPPLIER + GRID_ACCESS_PROVIDER + METERED_DATA_ADMINISTRATOR + METERED_DATA_RESPONSIBLE + BALANCE_RESPONSIBLE_PARTY + IMBALANCE_SETTLEMENT_RESPONSIBLE + SYSTEM_OPERATOR + DANISH_ENERGY_AGENCY + DELEGATED + DATA_HUB_ADMINISTRATOR +} + enum ActorStatus { New Active @@ -1074,70 +1090,10 @@ enum BalanceResponsibleSortProperty { } enum BusinessReason { - D02 D03 D04 D05 - D06 - D07 - D09 - D10 - D11 - D12 - D13 - D14 - D15 - D16 - D17 - D18 - D19 - D20 - D21 - D22 - D23 - D24 - D25 - D26 - D27 - D28 - D29 - D30 - D31 D32 - D33 - D34 - D35 - D36 - D37 - D38 - D39 - D40 - D41 - D43 - D44 - D45 - D46 - D47 - E01 - E02 - E03 - E05 - E06 - E0G - E20 - E23 - E30 - E32 - E34 - E53 - E56 - E65 - E66 - E67 - E75 - E79 - E80 - E84 } enum CalculationExecutionType { @@ -1209,60 +1165,14 @@ enum DocumentStatus { } enum DocumentType { - CONFIRM_REQUEST_CHANGE_OF_SUPPLIER - REJECT_REQUEST_CHANGE_OF_SUPPLIER - REQUEST_CHANGE_OF_SUPPLIER - CONFIRM_REQUEST_REALLOCATE_CHANGE_OF_SUPPLIER - REJECT_REQUEST_REALLOCATE_CHANGE_OF_SUPPLIER - REQUEST_REALLOCATE_CHANGE_OF_SUPPLIER - GENERIC_NOTIFICATION - CONFIRM_REQUEST_END_OF_SUPPLY - REJECT_REQUEST_END_OF_SUPPLY - REQUEST_END_OF_SUPPLY - REJECT_REQUEST_ACCOUNTING_POINT_CHARACTERISTICS - REQUEST_ACCOUNTING_POINT_CHARACTERISTICS - ACKNOWLEDGEMENT - NOTIFY_VALIDATED_MEASURE_DATA + B2C_REQUEST_AGGREGATED_MEASURE_DATA + B2C_REQUEST_WHOLESALE_SETTLEMENT NOTIFY_AGGREGATED_MEASURE_DATA - REJECT_REQUEST_VALIDATED_MEASURE_DATA - REQUEST_VALIDATED_MEASURE_DATA + NOTIFY_WHOLESALE_SERVICES REJECT_REQUEST_AGGREGATED_MEASURE_DATA - REQUEST_AGGREGATED_MEASURE_DATA - B2_C_REQUEST_AGGREGATED_MEASURE_DATA REJECT_REQUEST_WHOLESALE_SETTLEMENT + REQUEST_AGGREGATED_MEASURE_DATA REQUEST_WHOLESALE_SETTLEMENT - B2_C_REQUEST_WHOLESALE_SETTLEMENT - REJECT_REQUEST_FOR_REMINDERS - REMINDER_OF_MISSING_MEASURE_DATA - REQUEST_FOR_REMINDERS - NOTIFY_WHOLESALE_SERVICES - CONFIRM_REQUEST_SERVICE - REJECT_REQUEST_SERVICE - REQUEST_SERVICE - CONFIRM_REQUEST_CHANGE_ACCOUNTING_POINT_CHARACTERISTICS - REJECT_REQUEST_CHANGE_ACCOUNTING_POINT_CHARACTERISTICS - REQUEST_CHANGE_ACCOUNTING_POINT_CHARACTERISTICS - ACCOUNTING_POINT_CHARACTERISTICS - CONFIRM_REQUEST_CANCELLATION - REJECT_REQUEST_CANCELLATION - REQUEST_CANCELLATION - NOTIFY_CANCELLATION - CONFIRM_REQUEST_CHANGE_CUSTOMER_CHARACTERISTICS - REJECT_REQUEST_CHANGE_CUSTOMER_CHARACTERISTICS - REQUEST_CHANGE_CUSTOMER_CHARACTERISTICS - CHARACTERISTICS_OF_A_CUSTOMER_AT_AN_AP - CONFIRM_REQUEST_CHANGE_BILLING_MASTER_DATA - REJECT_REQUEST_CHANGE_BILLING_MASTER_DATA - REQUEST_CHANGE_BILLING_MASTER_DATA - NOTIFY_BILLING_MASTER_DATA - REJECT_REQUEST_BILLING_MASTER_DATA - REQUEST_BILLING_MASTER_DATA - CONFIRM_REQUEST_CHANGE_OF_PRICELIST - REJECT_REQUEST_CHANGE_OF_PRICELIST - REQUEST_CHANGE_OF_PRICELIST - NOTIFY_PRICELIST - REJECT_REQUEST_PRICELIST - REQUEST_PRICELIST } enum ESettStageComponent { diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/Actor.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/Actor.cs deleted file mode 100644 index 0ae96ec159..0000000000 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/Actor.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; - -#pragma warning disable SA1402 // File may only contain a single type - -namespace Energinet.DataHub.WebApi.Clients.EDI; - -public sealed record Actor(Guid ActorId, ActorNumberDto ActorNumber, ActorNameDto Name); - -public sealed record ActorNumberDto(string Value); - -public sealed record ActorNameDto(string Value); diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ActorService.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ActorService.cs deleted file mode 100644 index 4d806c0f89..0000000000 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ActorService.cs +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading; -using System.Threading.Tasks; -using Energinet.DataHub.WebApi.Clients.MarketParticipant.v1; - -namespace Energinet.DataHub.WebApi.Clients.EDI; - -public class ActorService -{ - private readonly IMarketParticipantClient_V1 _marketParticipantClient; - - public ActorService(IMarketParticipantClient_V1 marketParticipantClient) - { - _marketParticipantClient = marketParticipantClient ?? - throw new ArgumentNullException(nameof(marketParticipantClient)); - } - - public async Task> GetActorsAsync(CancellationToken cancellationToken) - { - if (cancellationToken.IsCancellationRequested) return new List(); - - var allActors = await _marketParticipantClient - .ActorGetAsync() - .ConfigureAwait(false); - - return MapResult(allActors); - } - - private IEnumerable MapResult(IEnumerable actorDtos) - { - return actorDtos - .Select(actorDto => new Actor( - ActorId: actorDto.ActorId, - ActorNumber: new ActorNumberDto(actorDto.ActorNumber.Value), - Name: new ActorNameDto(actorDto.Name.Value))) - .ToList(); - } -} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessage.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessage.cs deleted file mode 100644 index e8f0cea41e..0000000000 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessage.cs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; - -namespace Energinet.DataHub.WebApi.Clients.EDI; - -public sealed record ArchivedMessage( - string Id, - string? MessageId, - string? DocumentType, - DateTimeOffset? CreatedDate, - string? SenderGln, - string? ReceiverGln); diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageDto.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageDto.cs deleted file mode 100644 index a776317840..0000000000 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageDto.cs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -namespace Energinet.DataHub.WebApi.Clients.EDI; - -public sealed record ArchivedMessageDto( - string Id, - string? MessageId, - string DocumentType, - string CreatedAt, - string SenderNumber, - string ReceiverNumber); diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageSearchCriteria.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageSearchCriteria.cs deleted file mode 100644 index 7d4b63bded..0000000000 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageSearchCriteria.cs +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -namespace Energinet.DataHub.WebApi.Clients.EDI; - -public sealed record ArchivedMessageSearchCriteria(string DateTimeFrom, string DateTimeTo, string? MessageId, - string? SenderNumber, string? ReceiverNumber, string[]? DocumentTypes, string[]? BusinessReasons, bool IncludeRelatedMessages = false); diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageSearchCriteriaDto.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageSearchCriteriaDto.cs deleted file mode 100644 index 5292a33ed7..0000000000 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessageSearchCriteriaDto.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#pragma warning disable SA1402 // File may only contain a single type - -namespace Energinet.DataHub.WebApi.Clients.EDI; - -internal record ArchivedMessageSearchCriteriaDto( - CreatedDuringPeriod CreatedDuringPeriod, - string? MessageId, - string? SenderNumber, - string? ReceiverNumber, - string[]? DocumentTypes, - string[]? BusinessReasons, - bool? IncludeRelatedMessages = false); - -internal record CreatedDuringPeriod(string? Start, string? End); diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessagesSearch.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessagesSearch.cs deleted file mode 100644 index ce812f43f9..0000000000 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/ArchivedMessagesSearch.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System; -using System.Collections.Generic; -using System.Threading; -using System.Threading.Tasks; -using Energinet.DataHub.Edi.B2CWebApp.Clients.v1; - -namespace Energinet.DataHub.WebApi.Clients.EDI; - -public class ArchivedMessagesSearch -{ - private readonly IEdiB2CWebAppClient_V1 _b2CWebAppClient; - - public ArchivedMessagesSearch(IEdiB2CWebAppClient_V1 b2CWebAppClient) - { - _b2CWebAppClient = b2CWebAppClient; - } - - public async Task SearchAsync( - ArchivedMessageSearchCriteria archivedMessageSearch, - CancellationToken cancellationToken) - { - var searchResultResponseMessages = - await GetSearchResultResponseMessagesAsync(archivedMessageSearch, cancellationToken); - - if (searchResultResponseMessages == null) - { - throw new InvalidOperationException("Could not parse response content from EDI."); - } - - return MapResult(searchResultResponseMessages); - } - - public async Task GetDocumentAsync(Guid id, CancellationToken cancellationToken) - { - return await _b2CWebAppClient.ArchivedMessageGetDocumentAsync(id, "1.0", cancellationToken).ConfigureAwait(false); - } - - private async Task?> GetSearchResultResponseMessagesAsync( - ArchivedMessageSearchCriteria archivedMessageSearch, - CancellationToken cancellationToken) - { - var period = new MessageCreationPeriod() - { - Start = DateTimeOffset.Parse(archivedMessageSearch.DateTimeFrom), - End = DateTimeOffset.Parse(archivedMessageSearch.DateTimeTo), - }; - - var criteria = new SearchArchivedMessagesCriteria() - { - CreatedDuringPeriod = period, - MessageId = archivedMessageSearch.MessageId, - SenderNumber = archivedMessageSearch.SenderNumber, - ReceiverNumber = archivedMessageSearch.ReceiverNumber, - DocumentTypes = archivedMessageSearch.DocumentTypes, - BusinessReasons = archivedMessageSearch.BusinessReasons, - IncludeRelatedMessages = archivedMessageSearch.IncludeRelatedMessages, - }; - - return await _b2CWebAppClient.ArchivedMessageSearchAsync("1.0", criteria, cancellationToken); - } - - private static SearchResult MapResult(ICollection searchResultResponseMessages) - { - var result = new List(); - - foreach (var archivedMessageDto in searchResultResponseMessages) - { - result.Add(new ArchivedMessage( - archivedMessageDto.Id, - archivedMessageDto.MessageId, - archivedMessageDto.DocumentType, - archivedMessageDto.CreatedAt, - archivedMessageDto.SenderNumber, - archivedMessageDto.ReceiverNumber)); - } - - return new SearchResult(result); - } -} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V2/EdiB2CWebAppClient.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V3/EdiB2CWebAppClient.cs similarity index 88% rename from apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V2/EdiB2CWebAppClient.cs rename to apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V3/EdiB2CWebAppClient.cs index 4236cfe808..cbd801149e 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V2/EdiB2CWebAppClient.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V3/EdiB2CWebAppClient.cs @@ -22,23 +22,23 @@ #pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" #pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)." -namespace Energinet.DataHub.Edi.B2CWebApp.Clients.v2 +namespace Energinet.DataHub.Edi.B2CWebApp.Clients.v3 { using System = global::System; [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial interface IEdiB2CWebAppClient_V2 + public partial interface IEdiB2CWebAppClient_V3 { /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// OK /// A server side error occurred. - System.Threading.Tasks.Task ArchivedMessageSearchAsync(string api_version, SearchArchivedMessagesRequest? body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task ArchivedMessageSearchAsync(string api_version, SearchArchivedMessagesRequestV3? body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class EdiB2CWebAppClient_V2 : IEdiB2CWebAppClient_V2 + public partial class EdiB2CWebAppClient_V3 : IEdiB2CWebAppClient_V3 { #pragma warning disable 8618 private string _baseUrl; @@ -49,7 +49,7 @@ public partial class EdiB2CWebAppClient_V2 : IEdiB2CWebAppClient_V2 private Newtonsoft.Json.JsonSerializerSettings _instanceSettings; #pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. - public EdiB2CWebAppClient_V2(string baseUrl, System.Net.Http.HttpClient httpClient) + public EdiB2CWebAppClient_V3(string baseUrl, System.Net.Http.HttpClient httpClient) #pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. { BaseUrl = baseUrl; @@ -88,7 +88,7 @@ public string BaseUrl /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// OK /// A server side error occurred. - public virtual async System.Threading.Tasks.Task ArchivedMessageSearchAsync(string api_version, SearchArchivedMessagesRequest? body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public virtual async System.Threading.Tasks.Task ArchivedMessageSearchAsync(string api_version, SearchArchivedMessagesRequestV3? body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { if (api_version == null) throw new System.ArgumentNullException("api_version"); @@ -139,7 +139,7 @@ public string BaseUrl var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -279,7 +279,35 @@ private string ConvertToString(object? value, System.Globalization.CultureInfo c } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ArchivedMessageResultV2 + public enum ActorRole + { + + MeteringPointAdministrator = 0, + + EnergySupplier = 1, + + GridAccessProvider = 2, + + MeteredDataAdministrator = 3, + + MeteredDataResponsible = 4, + + BalanceResponsibleParty = 5, + + ImbalanceSettlementResponsible = 6, + + SystemOperator = 7, + + DanishEnergyAgency = 8, + + Delegated = 9, + + DataHubAdministrator = 10, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ArchivedMessageResultV3 { [Newtonsoft.Json.JsonProperty("recordId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long RecordId { get; set; } = default!; @@ -291,14 +319,20 @@ public partial class ArchivedMessageResultV2 public string? MessageId { get; set; } = default!; [Newtonsoft.Json.JsonProperty("documentType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string DocumentType { get; set; } = default!; + public DocumentType DocumentType { get; set; } = default!; [Newtonsoft.Json.JsonProperty("senderNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string SenderNumber { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("senderRole", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ActorRole SenderRole { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("receiverNumber", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string ReceiverNumber { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("receiverRole", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ActorRole ReceiverRole { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("createdAt", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset CreatedAt { get; set; } = default!; @@ -308,10 +342,10 @@ public partial class ArchivedMessageResultV2 } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ArchivedMessageSearchResponse + public partial class ArchivedMessageSearchResponseV3 { [Newtonsoft.Json.JsonProperty("messages", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Messages { get; set; } = default!; + public System.Collections.Generic.ICollection Messages { get; set; } = default!; [Newtonsoft.Json.JsonProperty("totalCount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public int TotalCount { get; set; } = default!; @@ -331,6 +365,28 @@ public enum DirectionToSortBy } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public enum DocumentType + { + + NotifyAggregatedMeasureData = 0, + + NotifyWholesaleServices = 1, + + RejectRequestAggregatedMeasureData = 2, + + RejectRequestWholesaleSettlement = 3, + + RequestAggregatedMeasureData = 4, + + B2CRequestAggregatedMeasureData = 5, + + RequestWholesaleSettlement = 6, + + B2CRequestWholesaleSettlement = 7, + + } + /// /// Represents the fields that can be sorted on when searching for archived messages. /// @@ -362,7 +418,7 @@ public partial class MessageCreationPeriod } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class SearchArchivedMessagesCriteria + public partial class SearchArchivedMessagesCriteriaV3 { [Newtonsoft.Json.JsonProperty("createdDuringPeriod", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public MessageCreationPeriod? CreatedDuringPeriod { get; set; } = default!; @@ -373,11 +429,17 @@ public partial class SearchArchivedMessagesCriteria [Newtonsoft.Json.JsonProperty("senderNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string? SenderNumber { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("senderRole", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ActorRole? SenderRole { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("receiverNumber", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string? ReceiverNumber { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("receiverRole", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ActorRole? ReceiverRole { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("documentTypes", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection? DocumentTypes { get; set; } = default!; + public System.Collections.Generic.ICollection? DocumentTypes { get; set; } = default!; [Newtonsoft.Json.JsonProperty("businessReasons", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection? BusinessReasons { get; set; } = default!; @@ -437,10 +499,10 @@ public partial class SearchArchivedMessagesPagination } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class SearchArchivedMessagesRequest + public partial class SearchArchivedMessagesRequestV3 { [Newtonsoft.Json.JsonProperty("searchCriteria", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public SearchArchivedMessagesCriteria SearchCriteria { get; set; } = default!; + public SearchArchivedMessagesCriteriaV3 SearchCriteria { get; set; } = default!; /// /// Pagination when searching for archived messages that supports sorting on a specific field. diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V2/nswag.json b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V3/nswag.json similarity index 96% rename from apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V2/nswag.json rename to apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V3/nswag.json index 651d639ff4..7db52a2bc4 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V2/nswag.json +++ b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V3/nswag.json @@ -3,15 +3,15 @@ "defaultVariables": null, "documentGenerator": { "fromDocument": { - "url": "https://app-b2cwebapi-edi-d-we-002.azurewebsites.net/swagger/v2/swagger.json", + "url": "https://app-b2cwebapi-edi-d-we-002.azurewebsites.net/swagger/v3/swagger.json", "output": "swagger.json", "newLineBehavior": "Auto" } }, "codeGenerators": { "openApiToCSharpClient": { - "namespace": "Energinet.DataHub.Edi.B2CWebApp.Clients.v2", - "className": "{controller}EdiB2CWebAppClient_V2", + "namespace": "Energinet.DataHub.Edi.B2CWebApp.Clients.v3", + "className": "{controller}EdiB2CWebAppClient_V3", "output": "EdiB2CWebAppClient.cs", "generateOptionalParameters": true, "classStyle": "Poco", diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V2/swagger.json b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V3/swagger.json similarity index 68% rename from apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V2/swagger.json rename to apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V3/swagger.json index 1846b9ea4b..9ab0d10520 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V2/swagger.json +++ b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/B2CWebApi/V3/swagger.json @@ -2,7 +2,7 @@ "openapi": "3.0.1", "info": { "title": "EDI B2C Web API", - "version": "2.0" + "version": "3.0" }, "paths": { "/ArchivedMessageSearch": { @@ -27,7 +27,7 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SearchArchivedMessagesRequest" + "$ref": "#/components/schemas/SearchArchivedMessagesRequestV3" } ] } @@ -36,7 +36,7 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SearchArchivedMessagesRequest" + "$ref": "#/components/schemas/SearchArchivedMessagesRequestV3" } ] } @@ -45,7 +45,7 @@ "schema": { "allOf": [ { - "$ref": "#/components/schemas/SearchArchivedMessagesRequest" + "$ref": "#/components/schemas/SearchArchivedMessagesRequestV3" } ] } @@ -58,17 +58,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ArchivedMessageSearchResponse" + "$ref": "#/components/schemas/ArchivedMessageSearchResponseV3" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ArchivedMessageSearchResponse" + "$ref": "#/components/schemas/ArchivedMessageSearchResponseV3" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ArchivedMessageSearchResponse" + "$ref": "#/components/schemas/ArchivedMessageSearchResponseV3" } } } @@ -79,7 +79,37 @@ }, "components": { "schemas": { - "ArchivedMessageResultV2": { + "ActorRole": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "MeteringPointAdministrator", + "EnergySupplier", + "GridAccessProvider", + "MeteredDataAdministrator", + "MeteredDataResponsible", + "BalanceResponsibleParty", + "ImbalanceSettlementResponsible", + "SystemOperator", + "DanishEnergyAgency", + "Delegated", + "DataHubAdministrator" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + ] + }, + "ArchivedMessageResultV3": { "type": "object", "additionalProperties": false, "properties": { @@ -95,14 +125,68 @@ "nullable": true }, "documentType": { - "type": "string" + "x-enumNames": [ + "NotifyAggregatedMeasureData", + "NotifyWholesaleServices", + "RejectRequestAggregatedMeasureData", + "RejectRequestWholesaleSettlement", + "RequestAggregatedMeasureData", + "B2CRequestAggregatedMeasureData", + "RequestWholesaleSettlement", + "B2CRequestWholesaleSettlement" + ], + "allOf": [ + { + "$ref": "#/components/schemas/DocumentType" + } + ] }, "senderNumber": { "type": "string" }, + "senderRole": { + "x-enumNames": [ + "MeteringPointAdministrator", + "EnergySupplier", + "GridAccessProvider", + "MeteredDataAdministrator", + "MeteredDataResponsible", + "BalanceResponsibleParty", + "ImbalanceSettlementResponsible", + "SystemOperator", + "DanishEnergyAgency", + "Delegated", + "DataHubAdministrator" + ], + "allOf": [ + { + "$ref": "#/components/schemas/ActorRole" + } + ] + }, "receiverNumber": { "type": "string" }, + "receiverRole": { + "x-enumNames": [ + "MeteringPointAdministrator", + "EnergySupplier", + "GridAccessProvider", + "MeteredDataAdministrator", + "MeteredDataResponsible", + "BalanceResponsibleParty", + "ImbalanceSettlementResponsible", + "SystemOperator", + "DanishEnergyAgency", + "Delegated", + "DataHubAdministrator" + ], + "allOf": [ + { + "$ref": "#/components/schemas/ActorRole" + } + ] + }, "createdAt": { "type": "string", "format": "date-time" @@ -113,14 +197,14 @@ } } }, - "ArchivedMessageSearchResponse": { + "ArchivedMessageSearchResponseV3": { "type": "object", "additionalProperties": false, "properties": { "messages": { "type": "array", "items": { - "$ref": "#/components/schemas/ArchivedMessageResultV2" + "$ref": "#/components/schemas/ArchivedMessageResultV3" } }, "totalCount": { @@ -142,6 +226,30 @@ 1 ] }, + "DocumentType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "NotifyAggregatedMeasureData", + "NotifyWholesaleServices", + "RejectRequestAggregatedMeasureData", + "RejectRequestWholesaleSettlement", + "RequestAggregatedMeasureData", + "B2CRequestAggregatedMeasureData", + "RequestWholesaleSettlement", + "B2CRequestWholesaleSettlement" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + }, "FieldToSortBy": { "type": "integer", "description": "Represents the fields that can be sorted on when searching for archived messages.", @@ -175,7 +283,7 @@ } } }, - "SearchArchivedMessagesCriteria": { + "SearchArchivedMessagesCriteriaV3": { "type": "object", "additionalProperties": false, "properties": { @@ -195,15 +303,31 @@ "type": "string", "nullable": true }, + "senderRole": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ActorRole" + } + ] + }, "receiverNumber": { "type": "string", "nullable": true }, + "receiverRole": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ActorRole" + } + ] + }, "documentTypes": { "type": "array", "nullable": true, "items": { - "type": "string" + "$ref": "#/components/schemas/DocumentType" } }, "businessReasons": { @@ -274,14 +398,14 @@ } } }, - "SearchArchivedMessagesRequest": { + "SearchArchivedMessagesRequestV3": { "type": "object", "additionalProperties": false, "properties": { "searchCriteria": { "allOf": [ { - "$ref": "#/components/schemas/SearchArchivedMessagesCriteria" + "$ref": "#/components/schemas/SearchArchivedMessagesCriteriaV3" } ] }, diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/SearchResult.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/SearchResult.cs deleted file mode 100644 index 5b478b065e..0000000000 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/EDI/SearchResult.cs +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -using System.Collections.Generic; - -namespace Energinet.DataHub.WebApi.Clients.EDI; - -public sealed record SearchResult(IReadOnlyList Messages); diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Controllers/MessageArchiveController.cs b/apps/dh/api-dh/source/DataHub.WebApi/Controllers/MessageArchiveController.cs index 3384ec2a04..bbe1ac377d 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/Controllers/MessageArchiveController.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/Controllers/MessageArchiveController.cs @@ -13,7 +13,7 @@ // limitations under the License. using System.Net.Mime; -using Energinet.DataHub.WebApi.Clients.EDI; +using Energinet.DataHub.Edi.B2CWebApp.Clients.v1; using Microsoft.AspNetCore.Mvc; namespace Energinet.DataHub.WebApi.Controllers; @@ -22,44 +22,11 @@ namespace Energinet.DataHub.WebApi.Controllers; [Route("v1/[controller]")] public class MessageArchiveController : ControllerBase { - private readonly ArchivedMessagesSearch _archivedMessagesSearch; - private readonly ActorService _actorService; + private readonly IEdiB2CWebAppClient_V1 _client; - public MessageArchiveController(ArchivedMessagesSearch archivedMessagesSearch, ActorService actorService) + public MessageArchiveController(IEdiB2CWebAppClient_V1 client) { - _archivedMessagesSearch = - archivedMessagesSearch ?? throw new ArgumentNullException(nameof(archivedMessagesSearch)); - _actorService = actorService ?? throw new ArgumentNullException(nameof(actorService)); - } - - /// - /// Get saved request and response logs. - /// - /// Search result. - [HttpPost("SearchRequestResponseLogs")] - public async Task> SearchRequestResponseLogsAsync( - ArchivedMessageSearchCriteria archivedMessageSearch, CancellationToken cancellationToken) - { - var result = await _archivedMessagesSearch.SearchAsync(archivedMessageSearch, cancellationToken) - .ConfigureAwait(false); - - return !result.Messages.Any() ? NoContent() : Ok(result); - } - - [HttpGet("Actors")] - public async Task>> GetActorsAsync(CancellationToken cancellationToken) - { - var result = await _actorService.GetActorsAsync(cancellationToken); - - return !result.Any() ? NoContent() : Ok(result); - } - - [HttpGet("{id}/Document")] - [Produces("text/plain")] - public async Task> GetDocumentAsync(string id, CancellationToken cancellationToken) - { - var document = await _archivedMessagesSearch.GetDocumentAsync(Guid.Parse(id), cancellationToken); - return Ok(document); + _client = client; } [HttpGet] @@ -67,7 +34,11 @@ public async Task> GetDocumentAsync(string id, Cancellation [Produces(MediaTypeNames.Text.Plain)] public async Task> GetDocumentByIdAsync(string id, CancellationToken cancellationToken) { - var document = await _archivedMessagesSearch.GetDocumentAsync(Guid.Parse(id), cancellationToken); + var document = await _client.ArchivedMessageGetDocumentAsync( + Guid.Parse(id), + "1.0", + cancellationToken); + return Ok(document); } } diff --git a/apps/dh/api-dh/source/DataHub.WebApi/DataHub.WebApi.csproj b/apps/dh/api-dh/source/DataHub.WebApi/DataHub.WebApi.csproj index 9cb5f6cb1d..53f2f5b1da 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/DataHub.WebApi.csproj +++ b/apps/dh/api-dh/source/DataHub.WebApi/DataHub.WebApi.csproj @@ -36,7 +36,7 @@ limitations under the License. - + diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/DataLoaders/ActorByNumberBatchDataLoader.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/DataLoaders/ActorByNumberAndRoleBatchDataLoader.cs similarity index 61% rename from apps/dh/api-dh/source/DataHub.WebApi/GraphQL/DataLoaders/ActorByNumberBatchDataLoader.cs rename to apps/dh/api-dh/source/DataHub.WebApi/GraphQL/DataLoaders/ActorByNumberAndRoleBatchDataLoader.cs index e000e54540..c033142f31 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/DataLoaders/ActorByNumberBatchDataLoader.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/DataLoaders/ActorByNumberAndRoleBatchDataLoader.cs @@ -16,25 +16,24 @@ namespace Energinet.DataHub.WebApi.GraphQL.DataLoaders; -public class ActorByNumberBatchDataLoader : BatchDataLoader +public class ActorByNumberAndRoleBatchDataLoader : BatchDataLoader<(string, EicFunction), ActorDto> { private readonly IMarketParticipantClient_V1 _client; - public ActorByNumberBatchDataLoader( + public ActorByNumberAndRoleBatchDataLoader( IMarketParticipantClient_V1 client, IBatchScheduler batchScheduler, DataLoaderOptions? options = null) : base(batchScheduler, options) => _client = client; - protected override async Task> LoadBatchAsync( - IReadOnlyList keys, + protected override async Task> LoadBatchAsync( + IReadOnlyList<(string, EicFunction)> keys, CancellationToken cancellationToken) - { - return (await _client - .ActorGetAsync(cancellationToken)) - .Where(x => keys.Contains(x.ActorNumber.Value)) - .DistinctBy(x => x.ActorNumber.Value) // TODO: This is not the correct way - .ToDictionary(x => x.ActorNumber.Value); - } + { + return (await _client + .ActorGetAsync(cancellationToken)) + .Where(x => x.MarketRoles.Any(role => keys.Contains((x.ActorNumber.Value, role.EicFunction)))) + .ToDictionary(x => (x.ActorNumber.Value, x.MarketRoles.First(role => keys.Contains((x.ActorNumber.Value, role.EicFunction))).EicFunction)); + } } diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/BusinessReason.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/BusinessReason.cs index 62126034bb..934c86985c 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/BusinessReason.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/BusinessReason.cs @@ -16,68 +16,8 @@ namespace Energinet.DataHub.WebApi.GraphQL.Enums; public enum BusinessReason { - D02, - D03, - D04, - D05, - D06, - D07, - D09, - D10, - D11, - D12, - D13, - D14, - D15, - D16, - D17, - D18, - D19, - D20, - D21, - D22, - D23, - D24, - D25, - D26, - D27, - D28, - D29, - D30, - D31, - D32, - D33, - D34, - D35, - D36, - D37, - D38, - D39, - D40, - D41, - D43, - D44, - D45, - D46, - D47, - E01, - E02, - E03, - E05, - E06, - E0G, - E20, - E23, - E30, - E32, - E34, - E53, - E56, - E65, - E66, - E67, - E75, - E79, - E80, - E84, + D03, + D04, + D05, + D32, } diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/DocumentType.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/DocumentType.cs deleted file mode 100644 index 795c492c2b..0000000000 --- a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/DocumentType.cs +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2020 Energinet DataHub A/S -// -// Licensed under the Apache License, Version 2.0 (the "License2"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -namespace Energinet.DataHub.WebApi.GraphQL.Enums; - -public enum DocumentType -{ - ConfirmRequestChangeOfSupplier, - RejectRequestChangeOfSupplier, - RequestChangeOfSupplier, - ConfirmRequestReallocateChangeOfSupplier, - RejectRequestReallocateChangeOfSupplier, - RequestReallocateChangeOfSupplier, - GenericNotification, - ConfirmRequestEndOfSupply, - RejectRequestEndOfSupply, - RequestEndOfSupply, - RejectRequestAccountingPointCharacteristics, - RequestAccountingPointCharacteristics, - Acknowledgement, - NotifyValidatedMeasureData, - NotifyAggregatedMeasureData, - RejectRequestValidatedMeasureData, - RequestValidatedMeasureData, - RejectRequestAggregatedMeasureData, - RequestAggregatedMeasureData, - B2CRequestAggregatedMeasureData, - RejectRequestWholesaleSettlement, - RequestWholesaleSettlement, - B2CRequestWholesaleSettlement, - RejectRequestForReminders, - ReminderOfMissingMeasureData, - RequestForReminders, - NotifyWholesaleServices, - ConfirmRequestService, - RejectRequestService, - RequestService, - ConfirmRequestChangeAccountingPointCharacteristics, - RejectRequestChangeAccountingPointCharacteristics, - RequestChangeAccountingPointCharacteristics, - AccountingPointCharacteristics, - ConfirmRequestCancellation, - RejectRequestCancellation, - RequestCancellation, - NotifyCancellation, - ConfirmRequestChangeCustomerCharacteristics, - RejectRequestChangeCustomerCharacteristics, - RequestChangeCustomerCharacteristics, - CharacteristicsOfACustomerAtAnAP, - ConfirmRequestChangeBillingMasterData, - RejectRequestChangeBillingMasterData, - RequestChangeBillingMasterData, - NotifyBillingMasterData, - RejectRequestBillingMasterData, - RequestBillingMasterData, - ConfirmRequestChangeOfPricelist, - RejectRequestChangeOfPricelist, - RequestChangeOfPricelist, - NotifyPricelist, - RejectRequestPricelist, - RequestPricelist, -} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Extensions/MarketRoleExtensions.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Extensions/MarketRoleExtensions.cs new file mode 100644 index 0000000000..465f84f1bb --- /dev/null +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Extensions/MarketRoleExtensions.cs @@ -0,0 +1,58 @@ +// Copyright 2020 Energinet DataHub A/S +// +// Licensed under the Apache License, Version 2.0 (the "License2"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +using Energinet.DataHub.Edi.B2CWebApp.Clients.v3; +using Energinet.DataHub.WebApi.Clients.MarketParticipant.v1; + +namespace Energinet.DataHub.WebApi.GraphQL.Extensions; + +public static class MarketRoleExtensions +{ + internal static EicFunction ToEicFunction(this ActorRole role) => + role switch + { + ActorRole.BalanceResponsibleParty => EicFunction.BalanceResponsibleParty, + ActorRole.DanishEnergyAgency => EicFunction.DanishEnergyAgency, + ActorRole.DataHubAdministrator => EicFunction.DataHubAdministrator, + ActorRole.Delegated => EicFunction.Delegated, + ActorRole.EnergySupplier => EicFunction.EnergySupplier, + ActorRole.GridAccessProvider => EicFunction.GridAccessProvider, + ActorRole.ImbalanceSettlementResponsible => EicFunction.ImbalanceSettlementResponsible, + ActorRole.MeteredDataAdministrator => EicFunction.MeteredDataAdministrator, + ActorRole.MeteredDataResponsible => EicFunction.MeteredDataResponsible, + ActorRole.MeteringPointAdministrator => EicFunction.MeteringPointAdministrator, + ActorRole.SystemOperator => EicFunction.SystemOperator, + }; + + internal static ActorRole? ToActorRole(this EicFunction function) => + function switch + { + EicFunction.BalanceResponsibleParty => ActorRole.BalanceResponsibleParty, + EicFunction.DanishEnergyAgency => ActorRole.DanishEnergyAgency, + EicFunction.DataHubAdministrator => ActorRole.DataHubAdministrator, + EicFunction.Delegated => ActorRole.Delegated, + EicFunction.EnergySupplier => ActorRole.EnergySupplier, + EicFunction.GridAccessProvider => ActorRole.GridAccessProvider, + EicFunction.ImbalanceSettlementResponsible => ActorRole.ImbalanceSettlementResponsible, + EicFunction.MeteredDataAdministrator => ActorRole.MeteredDataAdministrator, + EicFunction.MeteredDataResponsible => ActorRole.MeteredDataResponsible, + EicFunction.MeteringPointAdministrator => ActorRole.MeteringPointAdministrator, + EicFunction.SystemOperator => ActorRole.SystemOperator, + EicFunction.BillingAgent => null, + EicFunction.MeterOperator => null, + EicFunction.IndependentAggregator => null, + EicFunction.SerialEnergyTrader => null, + EicFunction.ItSupplier => null, + }; +} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Query/MessageArchiveQuery.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Query/MessageArchiveQuery.cs index 0d403ea652..30b99eaa00 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Query/MessageArchiveQuery.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Query/MessageArchiveQuery.cs @@ -12,22 +12,25 @@ // See the License for the specific language governing permissions and // limitations under the License. -using Energinet.DataHub.Edi.B2CWebApp.Clients.v2; +using Energinet.DataHub.Edi.B2CWebApp.Clients.v3; +using Energinet.DataHub.WebApi.Clients.MarketParticipant.v1; using Energinet.DataHub.WebApi.GraphQL.Enums; +using Energinet.DataHub.WebApi.GraphQL.Extensions; using Energinet.DataHub.WebApi.GraphQL.Types.MessageArchive; using HotChocolate.Types.Pagination; using Microsoft.IdentityModel.Tokens; using NodaTime; +using SortDirection = Energinet.DataHub.WebApi.GraphQL.Enums.SortDirection; namespace Energinet.DataHub.WebApi.GraphQL.Query; public partial class Query { [UsePaging] - public async Task> GetArchivedMessagesAsync( + public async Task> GetArchivedMessagesAsync( Interval created, - string? senderNumber, - string? receiverNumber, + Guid? senderId, + Guid? receiverId, DocumentType[]? documentTypes, BusinessReason[]? businessReasons, bool? includeRelated, @@ -37,26 +40,36 @@ public async Task> GetArchivedMessagesAsync( int? last, string? before, ArchivedMessageSortInput? order, - [Service] IEdiB2CWebAppClient_V2 client) + [Service] IMarketParticipantClient_V1 markPartClient, + [Service] IEdiB2CWebAppClient_V3 ediClient) { + async Task GetActorAsync(Guid? id) + { + return id.HasValue + ? await markPartClient.ActorGetAsync(id.Value) + : null; + } + + var sender = GetActorAsync(senderId); + var receiver = GetActorAsync(receiverId); var searchCriteria = !string.IsNullOrWhiteSpace(filter) - ? new SearchArchivedMessagesCriteria() + ? new SearchArchivedMessagesCriteriaV3() { MessageId = filter, IncludeRelatedMessages = includeRelated ?? false, } - : new SearchArchivedMessagesCriteria() + : new SearchArchivedMessagesCriteriaV3() { CreatedDuringPeriod = new MessageCreationPeriod() { Start = created.Start.ToDateTimeOffset(), End = created.End.ToDateTimeOffset(), }, - SenderNumber = string.IsNullOrEmpty(senderNumber) ? null : senderNumber, - ReceiverNumber = string.IsNullOrEmpty(receiverNumber) ? null : receiverNumber, - DocumentTypes = documentTypes.IsNullOrEmpty() - ? null - : documentTypes?.Select(x => x.ToString()).ToArray(), + SenderNumber = (await sender)?.ActorNumber.Value, + SenderRole = (await sender)?.MarketRoles.FirstOrDefault()?.EicFunction.ToActorRole(), + ReceiverNumber = (await receiver)?.ActorNumber.Value, + ReceiverRole = (await receiver)?.MarketRoles.FirstOrDefault()?.EicFunction.ToActorRole(), + DocumentTypes = documentTypes, BusinessReasons = businessReasons.IsNullOrEmpty() ? null : businessReasons?.Select(x => x.ToString()).ToArray(), @@ -84,14 +97,14 @@ public async Task> GetArchivedMessagesAsync( DirectionToSortBy = (DirectionToSortBy?)direction, }; - var searchArchivedMessagesRequest = new SearchArchivedMessagesRequest + var searchArchivedMessagesRequest = new SearchArchivedMessagesRequestV3 { SearchCriteria = searchCriteria, Pagination = pagination, }; - var response = await client.ArchivedMessageSearchAsync( - "2.0", + var response = await ediClient.ArchivedMessageSearchAsync( + "3.0", searchArchivedMessagesRequest, CancellationToken.None); @@ -112,7 +125,7 @@ public async Task> GetArchivedMessagesAsync( edges.FirstOrDefault()?.Cursor, edges.LastOrDefault()?.Cursor); - var connection = new Connection( + var connection = new Connection( edges, pageInfo, response.TotalCount); @@ -136,19 +149,20 @@ public async Task> GetArchivedMessagesAsync( : new SearchArchivedMessagesCursor { FieldToSortByValue = sub[1], RecordId = recordId }; } - private static Edge MakeEdge( - ArchivedMessageResultV2 message, + private static Edge MakeEdge( + ArchivedMessageResultV3 message, FieldToSortBy field) { var sortCursor = field switch { FieldToSortBy.MessageId => message.MessageId ?? string.Empty, - FieldToSortBy.DocumentType => message.DocumentType, + FieldToSortBy.DocumentType => message.DocumentType.ToString(), FieldToSortBy.SenderNumber => message.SenderNumber ?? string.Empty, FieldToSortBy.ReceiverNumber => message.ReceiverNumber ?? string.Empty, FieldToSortBy.CreatedAt => message.CreatedAt.ToString("yyyy-MM-dd HH:mm:ss.fff"), + _ => throw new ArgumentOutOfRangeException(nameof(field), field, "Unexpected FieldToSortBy value"), }; - return new Edge(message, $"{message.RecordId}+{sortCursor}"); + return new Edge(message, $"{message.RecordId}+{sortCursor}"); } } diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/MessageArchiveResolvers.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/MessageArchiveResolvers.cs index 3ac02a84dd..6ff942eb48 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/MessageArchiveResolvers.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/MessageArchiveResolvers.cs @@ -12,14 +12,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -using Energinet.DataHub.Edi.B2CWebApp.Clients.v2; +using Energinet.DataHub.Edi.B2CWebApp.Clients.v3; namespace Energinet.DataHub.WebApi.GraphQL.Resolvers; public class MessageArchiveResolvers { public string? GetDocument( - [Parent] ArchivedMessageResultV2 result, + [Parent] ArchivedMessageResultV3 result, [Service] IHttpContextAccessor httpContextAccessor, [Service] LinkGenerator linkGenerator) => linkGenerator.GetUriByAction( httpContextAccessor.HttpContext!, diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/MessageArchive/ArchivedMessageType.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/MessageArchive/ArchivedMessageType.cs index 2680088877..697ab23740 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/MessageArchive/ArchivedMessageType.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/MessageArchive/ArchivedMessageType.cs @@ -12,17 +12,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -using Energinet.DataHub.Edi.B2CWebApp.Clients.v2; +using Energinet.DataHub.Edi.B2CWebApp.Clients.v3; using Energinet.DataHub.WebApi.GraphQL.DataLoaders; -using Energinet.DataHub.WebApi.GraphQL.Enums; +using Energinet.DataHub.WebApi.GraphQL.Extensions; using Energinet.DataHub.WebApi.GraphQL.Resolvers; using Energinet.DataHub.WebApi.GraphQL.Types.Actor; namespace Energinet.DataHub.WebApi.GraphQL.Types.MessageArchive; -public class ArchivedMessageType : ObjectType +public class ArchivedMessageType : ObjectType { - protected override void Configure(IObjectTypeDescriptor descriptor) + protected override void Configure(IObjectTypeDescriptor descriptor) { descriptor.Name("ArchivedMessage"); @@ -30,21 +30,25 @@ protected override void Configure(IObjectTypeDescriptor .Field(f => f.SenderNumber) .Name("sender") .Type() - .Resolve(context => context.DataLoader().LoadAsync( - context.Parent().SenderNumber, - context.RequestAborted)); + .Resolve(context => + { + var message = context.Parent(); + return context.DataLoader().LoadAsync( + (message.SenderNumber, message.SenderRole.ToEicFunction()), + context.RequestAborted); + }); descriptor .Field(f => f.ReceiverNumber) .Name("receiver") .Type() - .Resolve(context => context.DataLoader().LoadAsync( - context.Parent().ReceiverNumber, - context.RequestAborted)); - - descriptor - .Field(f => f.DocumentType) - .Resolve(context => Enum.Parse(context.Parent().DocumentType)); + .Resolve(context => + { + var message = context.Parent(); + return context.DataLoader().LoadAsync( + (message.ReceiverNumber, message.ReceiverRole.ToEicFunction()), + context.RequestAborted); + }); descriptor.Field("documentUrl") .ResolveWith(c => c.GetDocument(default!, default!, default!)); diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Registration/EDIRegistrationExtensions.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/MessageArchive/DocumentTypeType.cs similarity index 57% rename from apps/dh/api-dh/source/DataHub.WebApi/Registration/EDIRegistrationExtensions.cs rename to apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/MessageArchive/DocumentTypeType.cs index b107d7c1f6..67de83e420 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/Registration/EDIRegistrationExtensions.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/MessageArchive/DocumentTypeType.cs @@ -12,16 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -using Energinet.DataHub.WebApi.Clients.EDI; +using Energinet.DataHub.Edi.B2CWebApp.Clients.v3; -namespace Energinet.DataHub.WebApi.Registration; - -internal static class EDIRegistrationExtensions +public class DocumentTypeType : EnumType { - internal static IServiceCollection RegisterEDIServices(this IServiceCollection services, string messageArchiveBaseUrl) + protected override void Configure(IEnumTypeDescriptor descriptor) { - services.AddScoped(); - services.AddScoped(); - return services; + descriptor + .Value(DocumentType.B2CRequestAggregatedMeasureData) + .Name("B2C_REQUEST_AGGREGATED_MEASURE_DATA"); + + descriptor + .Value(DocumentType.B2CRequestWholesaleSettlement) + .Name("B2C_REQUEST_WHOLESALE_SETTLEMENT"); } } diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Registration/DomainRegistrationExtensions.cs b/apps/dh/api-dh/source/DataHub.WebApi/Registration/DomainRegistrationExtensions.cs index d766df4b77..5ee83ed332 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/Registration/DomainRegistrationExtensions.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/Registration/DomainRegistrationExtensions.cs @@ -13,7 +13,7 @@ // limitations under the License. using Energinet.DataHub.Edi.B2CWebApp.Clients.v1; -using Energinet.DataHub.Edi.B2CWebApp.Clients.v2; +using Energinet.DataHub.Edi.B2CWebApp.Clients.v3; using Energinet.DataHub.WebApi.Clients.ESettExchange.v1; using Energinet.DataHub.WebApi.Clients.ImbalancePrices.v1; using Energinet.DataHub.WebApi.Clients.MarketParticipant.v1; @@ -34,7 +34,6 @@ public static IServiceCollection AddDomainClients(this IServiceCollection servic .AddHttpClient() .AddHttpContextAccessor() .AddAuthorizedHttpClient() - .RegisterEDIServices(apiClientSettings.EdiB2CWebApiBaseUrl) .AddMarketParticipantGeneratedClient( GetBaseUri(apiClientSettings.MarketParticipantBaseUrl)) .AddWholesaleClient( @@ -49,7 +48,7 @@ public static IServiceCollection AddDomainClients(this IServiceCollection servic GetBaseUri(apiClientSettings.ESettExchangeBaseUrl)) .AddEdiWebAppClient( GetBaseUri(apiClientSettings.EdiB2CWebApiBaseUrl)) - .AddEdiWebAppClientV2( + .AddEdiWebAppClientV3( GetBaseUri(apiClientSettings.EdiB2CWebApiBaseUrl)) .AddImbalancePricesClient( GetBaseUri(apiClientSettings.ImbalancePricesBaseUrl)) @@ -123,10 +122,10 @@ private static IServiceCollection AddEdiWebAppClient(this IServiceCollection ser provider.GetRequiredService().CreateClient(baseUri))); } - private static IServiceCollection AddEdiWebAppClientV2(this IServiceCollection serviceCollection, Uri baseUri) + private static IServiceCollection AddEdiWebAppClientV3(this IServiceCollection serviceCollection, Uri baseUri) { - return serviceCollection.AddScoped( - provider => new EdiB2CWebAppClient_V2( + return serviceCollection.AddScoped( + provider => new EdiB2CWebAppClient_V3( baseUri.ToString(), provider.GetRequiredService().CreateClient(baseUri))); } diff --git a/libs/dh/globalization/assets-localization/src/assets/i18n/da.json b/libs/dh/globalization/assets-localization/src/assets/i18n/da.json index 040d89e2e8..cda7aaea2d 100644 --- a/libs/dh/globalization/assets-localization/src/assets/i18n/da.json +++ b/libs/dh/globalization/assets-localization/src/assets/i18n/da.json @@ -202,126 +202,20 @@ "download": "Download" }, "documentType": { - "CONFIRM_REQUEST_CHANGE_OF_SUPPLIER": "ConfirmRequestChangeOfSupplier (RSM-001)", - "REJECT_REQUEST_CHANGE_OF_SUPPLIER": "RejectRequestChangeOfSupplier (RSM-001)", - "REQUEST_CHANGE_OF_SUPPLIER": "RequestChangeOfSupplier (RSM-001)", - "CONFIRM_REQUEST_REALLOCATE_CHANGE_OF_SUPPLIER": "ConfirmRequestReallocateChangeOfSupplier (RSM-003)", - "REJECT_REQUEST_REALLOCATE_CHANGE_OF_SUPPLIER": "RejectRequestReallocateChangeOfSupplier (RSM-003)", - "REQUEST_REALLOCATE_CHANGE_OF_SUPPLIER": "RequestReallocateChangeOfSupplier (RSM-003)", - "GENERIC_NOTIFICATION": "GenericNotification (RSM-004)", - "CONFIRM_REQUEST_END_OF_SUPPLY": "ConfirmRequestEndOfSupply (RSM-005)", - "REJECT_REQUEST_END_OF_SUPPLY": "RejectRequestEndOfSupply (RSM-005)", - "REQUEST_END_OF_SUPPLY": "RequestEndOfSupply (RSM-005)", - "REJECT_REQUEST_ACCOUNTING_POINT_CHARACTERISTICS": "RejectRequestAccountingPointCharacteristics (RSM-006)", - "REQUEST_ACCOUNTING_POINT_CHARACTERISTICS": "RequestAccountingPointCharacteristics (RSM-006)", - "ACKNOWLEDGEMENT": "Acknowledgement (RSM-009)", - "NOTIFY_VALIDATED_MEASURE_DATA": "NotifyValidatedMeasureData (RSM-012)", - "NOTIFY_AGGREGATED_MEASURE_DATA": "NotifyAggregatedMeasureData (RSM-014)", - "REJECT_REQUEST_VALIDATED_MEASURE_DATA": "RejectRequestValidatedMeasureData (RSM-015)", - "REQUEST_VALIDATED_MEASURE_DATA": "RequestValidatedMeasureData (RSM-015)", - "REJECT_REQUEST_AGGREGATED_MEASURE_DATA": "RejectRequestAggregatedMeasureData (RSM-016)", - "REQUEST_AGGREGATED_MEASURE_DATA": "RequestAggregatedMeasureData (RSM-016)", - "B2_C_REQUEST_AGGREGATED_MEASURE_DATA": "B2CRequestAggregatedMeasureData (RSM-016)", - "REJECT_REQUEST_WHOLESALE_SETTLEMENT": "RejectRequestWholesaleSettlement (RSM-017)", - "REQUEST_WHOLESALE_SETTLEMENT": "RequestWholesaleSettlement (RSM-017)", - "B2_C_REQUEST_WHOLESALE_SETTLEMENT": "B2CRequestWholesaleSettlement (RSM-017)", - "REJECT_REQUEST_FOR_REMINDERS": "RejectRequestForReminders (RSM-018)", - "REMINDER_OF_MISSING_MEASURE_DATA": "ReminderOfMissingMeasureData (RSM-018)", - "REQUEST_FOR_REMINDERS": "RequestForReminders (RSM-018)", - "NOTIFY_WHOLESALE_SERVICES": "NotifyWholesaleServices (RSM-019)", - "CONFIRM_REQUEST_SERVICE": "ConfirmRequestService (RSM-020)", - "REJECT_REQUEST_SERVICE": "RejectRequestService (RSM-020)", - "REQUEST_SERVICE": "RequestService (RSM-020)", - "CONFIRM_REQUEST_CHANGE_ACCOUNTING_POINT_CHARACTERISTICS": "ConfirmRequestChangeAccountingPointCharacteristics (RSM-021)", - "REJECT_REQUEST_CHANGE_ACCOUNTING_POINT_CHARACTERISTICS": "RejectRequestChangeAccountingPointCharacteristics (RSM-021)", - "REQUEST_CHANGE_ACCOUNTING_POINT_CHARACTERISTICS": "RequestChangeAccountingPointCharacteristics (RSM-021)", - "ACCOUNTING_POINT_CHARACTERISTICS": "AccountingPointCharacteristics (RSM-022)", - "CONFIRM_REQUEST_CANCELLATION": "ConfirmRequestCancellation (RSM-024)", - "REJECT_REQUEST_CANCELLATION": "RejectRequestCancellation (RSM-024)", - "REQUEST_CANCELLATION": "RequestCancellation (RSM-024)", - "NOTIFY_CANCELLATION": "NotifyCancellation (RSM-025)", - "CONFIRM_REQUEST_CHANGE_CUSTOMER_CHARACTERISTICS": "ConfirmRequestChangeCustomerCharacteristics (RSM-027)", - "REJECT_REQUEST_CHANGE_CUSTOMER_CHARACTERISTICS": "RejectRequestChangeCustomerCharacteristics (RSM-027)", - "REQUEST_CHANGE_CUSTOMER_CHARACTERISTICS": "RequestChangeCustomerCharacteristics (RSM-027)", - "CHARACTERISTICS_OF_A_CUSTOMER_AT_AN_AP": "CharacteristicsOfACustomerAtAnAP (RSM-028)", - "CONFIRM_REQUEST_CHANGE_BILLING_MASTER_DATA": "ConfirmRequestChangeBillingMasterData (RSM-030)", - "REJECT_REQUEST_CHANGE_BILLING_MASTER_DATA": "RejectRequestChangeBillingMasterData (RSM-030)", - "REQUEST_CHANGE_BILLING_MASTER_DATA": "RequestChangeBillingMasterData (RSM-030)", - "NOTIFY_BILLING_MASTER_DATA": "NotifyBillingMasterData (RSM-031)", - "REJECT_REQUEST_BILLING_MASTER_DATA": "RejectRequestBillingMasterData (RSM-032)", - "REQUEST_BILLING_MASTER_DATA": "RequestBillingMasterData (RSM-032)", - "CONFIRM_REQUEST_CHANGE_OF_PRICELIST": "ConfirmRequestChangeOfPricelist (RSM-033)", - "REJECT_REQUEST_CHANGE_OF_PRICELIST": "RejectRequestChangeOfPricelist (RSM-033)", - "REQUEST_CHANGE_OF_PRICELIST": "RequestChangeOfPricelist (RSM-033)", - "NOTIFY_PRICELIST": "NotifyPricelist (RSM-034)", - "REJECT_REQUEST_PRICELIST": "RejectRequestPricelist (RSM-035)", - "REQUEST_PRICELIST": "RequestPricelist (RSM-035)" + "NOTIFY_AGGREGATED_MEASURE_DATA": "Notifikation om aggregerede tidsserier (RSM-014)", + "REJECT_REQUEST_AGGREGATED_MEASURE_DATA": "Afvis anmod om aggregerede måledata (RSM-016)", + "REQUEST_AGGREGATED_MEASURE_DATA": "Anmod om aggregerede måledata (RSM-016)", + "B2C_REQUEST_AGGREGATED_MEASURE_DATA": "B2C: Anmod om aggregerede måledata (RSM-016)", + "REJECT_REQUEST_WHOLESALE_SETTLEMENT": "Afvis anmod om engrosydelser (RSM-017)", + "REQUEST_WHOLESALE_SETTLEMENT": "Anmod om engrosydelser (RSM-017)", + "B2C_REQUEST_WHOLESALE_SETTLEMENT": "B2C: Anmod om engrosydelser (RSM-017)", + "NOTIFY_WHOLESALE_SERVICES": "Notifikation om aggregerede engrosydelser (RSM-019)" }, "businessReason": { - "D02": "Forberedelse til balanceafregning (D02)", "D03": "Midlertidig (D03)", "D04": "1. afregning (D04)", "D05": "2. afregning (D05)", - "D06": "Kontinuerlig måleraflæsning fra profilmålepunkter (D06)", - "D07": "Tilbageførsel af leverandørskifte (D07)", - "D09": "Seneste tilgængelige værdi (D09)", - "D10": "Måleraflæsning, indberettet forbrug (D10)", - "D11": "Forkert proces (D11)", - "D12": "Annuller måleraflæsningsanmodning (D12)", - "D13": "Skift af leverandør til sidstnævnte udbyder (D13)", - "D14": "Luk målepunkt ned (D14)", - "D15": "Tilslut målepunkt (D15)", - "D16": "Sammensmeltning af net (D16)", - "D17": "Opdater afregningsdata (D17)", - "D18": "Opdater takstoplysninger (D18)", - "D19": "Måleraflæsning (D19)", - "D20": "Elektrisk opvarmning (D20)", - "D21": "Indflytning af anden årsag (D21)", - "D22": "Serviceanmodning (D22)", - "D23": "Ikke brugt (D23)", - "D24": "Manglende flex-måleraflæsning (D24)", - "D25": "Manglende ikke-profilen tidsserie (D25)", - "D26": "Manglende flex-tidsserie (D26)", - "D27": "Manglende profillæsning (D27)", - "D28": "Forslag kontaktinformation (D28)", - "D29": "Sekundær indflytning (D29)", - "D30": "Skift med kort varsel (D30)", - "D31": "Overfør målepunkt (D31)", - "D32": "Korrektionsafregning (D32)", - "D33": "Forkert flytning (D33)", - "D34": "Afslut forsyning pga. omfordeling (D34)", - "D35": "Fortsæt forsyning pga. afvist omfordeling (D35)", - "D36": "Fortsæt kundens forsyning (D36)", - "D37": "Annuller serviceanmodning (D37)", - "D38": "Afslut forsyning med kort varsel (D38)", - "D39": "Produktionsforpligtelse (D39)", - "D40": "Fjernede forældre relation på målepunkt (D40)", - "D41": "Ingen afbrydelse af målepunkt (D41)", - "D43": "Historiske oplysninger om forbrug (D43)", - "D44": "Proces annulleret af anmodende part (D44)", - "D45": "Proces annulleret af ITX (D45)", - "D46": "Dato for leverandørskifte forårsaget af afslutning af forsyning (D46)", - "D47": "Påmindelse (D47)", - "E01": "Flytte (E01)", - "E02": "Nyt målepunkt (E02)", - "E03": "Skift af balanceleverandør (E03)", - "E05": "Annullering (E05)", - "E06": "Ikke-anmodet skift af balanceleverandør (E06)", - "E0G": "Datajustering for stamdata målepunkt (E0G)", - "E20": "Afslutning af forsyning (E20)", - "E23": "Periodisk aflæsning (E23)", - "E30": "Historiske data (E30)", - "E32": "Opdater stamdata målepunkt (E32)", - "E34": "Opdater stamdata forbruger (E34)", - "E53": "Måleraflæsning på forespørgsel (E53)", - "E56": "Skift af balanceresponsabel part (E56)", - "E65": "Kunde indflytning (E65)", - "E66": "Kunde fraflytning (E66)", - "E67": "Placering af måler (E67)", - "E75": "Skift af afmålingsmetode (E75)", - "E79": "Skift af tilslutningsstatus (E79)", - "E80": "Ændring af estimeret årligt volumen (E80)", - "E84": "Opdater stamdata måler (E84)" + "D32": "Korrektionsafregning (D32)" }, "search": { "topBarTitle": "Fremsøg forretningsbesked", diff --git a/libs/dh/globalization/assets-localization/src/assets/i18n/en.json b/libs/dh/globalization/assets-localization/src/assets/i18n/en.json index 7b26910d28..ac624d6cd3 100644 --- a/libs/dh/globalization/assets-localization/src/assets/i18n/en.json +++ b/libs/dh/globalization/assets-localization/src/assets/i18n/en.json @@ -202,126 +202,20 @@ "download": "Download" }, "documentType": { - "CONFIRM_REQUEST_CHANGE_OF_SUPPLIER": "ConfirmRequestChangeOfSupplier (RSM-001)", - "REJECT_REQUEST_CHANGE_OF_SUPPLIER": "RejectRequestChangeOfSupplier (RSM-001)", - "REQUEST_CHANGE_OF_SUPPLIER": "RequestChangeOfSupplier (RSM-001)", - "CONFIRM_REQUEST_REALLOCATE_CHANGE_OF_SUPPLIER": "ConfirmRequestReallocateChangeOfSupplier (RSM-003)", - "REJECT_REQUEST_REALLOCATE_CHANGE_OF_SUPPLIER": "RejectRequestReallocateChangeOfSupplier (RSM-003)", - "REQUEST_REALLOCATE_CHANGE_OF_SUPPLIER": "RequestReallocateChangeOfSupplier (RSM-003)", - "GENERIC_NOTIFICATION": "GenericNotification (RSM-004)", - "CONFIRM_REQUEST_END_OF_SUPPLY": "ConfirmRequestEndOfSupply (RSM-005)", - "REJECT_REQUEST_END_OF_SUPPLY": "RejectRequestEndOfSupply (RSM-005)", - "REQUEST_END_OF_SUPPLY": "RequestEndOfSupply (RSM-005)", - "REJECT_REQUEST_ACCOUNTING_POINT_CHARACTERISTICS": "RejectRequestAccountingPointCharacteristics (RSM-006)", - "REQUEST_ACCOUNTING_POINT_CHARACTERISTICS": "RequestAccountingPointCharacteristics (RSM-006)", - "ACKNOWLEDGEMENT": "Acknowledgement (RSM-009)", - "NOTIFY_VALIDATED_MEASURE_DATA": "NotifyValidatedMeasureData (RSM-012)", - "NOTIFY_AGGREGATED_MEASURE_DATA": "NotifyAggregatedMeasureData (RSM-014)", - "REJECT_REQUEST_VALIDATED_MEASURE_DATA": "RejectRequestValidatedMeasureData (RSM-015)", - "REQUEST_VALIDATED_MEASURE_DATA": "RequestValidatedMeasureData (RSM-015)", - "REJECT_REQUEST_AGGREGATED_MEASURE_DATA": "RejectRequestAggregatedMeasureData (RSM-016)", - "REQUEST_AGGREGATED_MEASURE_DATA": "RequestAggregatedMeasureData (RSM-016)", - "B2_C_REQUEST_AGGREGATED_MEASURE_DATA": "B2CRequestAggregatedMeasureData (RSM-016)", - "REJECT_REQUEST_WHOLESALE_SETTLEMENT": "RejectRequestWholesaleSettlement (RSM-017)", - "REQUEST_WHOLESALE_SETTLEMENT": "RequestWholesaleSettlement (RSM-017)", - "B2_C_REQUEST_WHOLESALE_SETTLEMENT": "B2CRequestWholesaleSettlement (RSM-017)", - "REJECT_REQUEST_FOR_REMINDERS": "RejectRequestForReminders (RSM-018)", - "REMINDER_OF_MISSING_MEASURE_DATA": "ReminderOfMissingMeasureData (RSM-018)", - "REQUEST_FOR_REMINDERS": "RequestForReminders (RSM-018)", - "NOTIFY_WHOLESALE_SERVICES": "NotifyWholesaleServices (RSM-019)", - "CONFIRM_REQUEST_SERVICE": "ConfirmRequestService (RSM-020)", - "REJECT_REQUEST_SERVICE": "RejectRequestService (RSM-020)", - "REQUEST_SERVICE": "RequestService (RSM-020)", - "CONFIRM_REQUEST_CHANGE_ACCOUNTING_POINT_CHARACTERISTICS": "ConfirmRequestChangeAccountingPointCharacteristics (RSM-021)", - "REJECT_REQUEST_CHANGE_ACCOUNTING_POINT_CHARACTERISTICS": "RejectRequestChangeAccountingPointCharacteristics (RSM-021)", - "REQUEST_CHANGE_ACCOUNTING_POINT_CHARACTERISTICS": "RequestChangeAccountingPointCharacteristics (RSM-021)", - "ACCOUNTING_POINT_CHARACTERISTICS": "AccountingPointCharacteristics (RSM-022)", - "CONFIRM_REQUEST_CANCELLATION": "ConfirmRequestCancellation (RSM-024)", - "REJECT_REQUEST_CANCELLATION": "RejectRequestCancellation (RSM-024)", - "REQUEST_CANCELLATION": "RequestCancellation (RSM-024)", - "NOTIFY_CANCELLATION": "NotifyCancellation (RSM-025)", - "CONFIRM_REQUEST_CHANGE_CUSTOMER_CHARACTERISTICS": "ConfirmRequestChangeCustomerCharacteristics (RSM-027)", - "REJECT_REQUEST_CHANGE_CUSTOMER_CHARACTERISTICS": "RejectRequestChangeCustomerCharacteristics (RSM-027)", - "REQUEST_CHANGE_CUSTOMER_CHARACTERISTICS": "RequestChangeCustomerCharacteristics (RSM-027)", - "CHARACTERISTICS_OF_A_CUSTOMER_AT_AN_AP": "CharacteristicsOfACustomerAtAnAP (RSM-028)", - "CONFIRM_REQUEST_CHANGE_BILLING_MASTER_DATA": "ConfirmRequestChangeBillingMasterData (RSM-030)", - "REJECT_REQUEST_CHANGE_BILLING_MASTER_DATA": "RejectRequestChangeBillingMasterData (RSM-030)", - "REQUEST_CHANGE_BILLING_MASTER_DATA": "RequestChangeBillingMasterData (RSM-030)", - "NOTIFY_BILLING_MASTER_DATA": "NotifyBillingMasterData (RSM-031)", - "REJECT_REQUEST_BILLING_MASTER_DATA": "RejectRequestBillingMasterData (RSM-032)", - "REQUEST_BILLING_MASTER_DATA": "RequestBillingMasterData (RSM-032)", - "CONFIRM_REQUEST_CHANGE_OF_PRICELIST": "ConfirmRequestChangeOfPricelist (RSM-033)", - "REJECT_REQUEST_CHANGE_OF_PRICELIST": "RejectRequestChangeOfPricelist (RSM-033)", - "REQUEST_CHANGE_OF_PRICELIST": "RequestChangeOfPricelist (RSM-033)", - "NOTIFY_PRICELIST": "NotifyPricelist (RSM-034)", - "REJECT_REQUEST_PRICELIST": "RejectRequestPricelist (RSM-035)", - "REQUEST_PRICELIST": "RequestPricelist (RSM-035)" + "NOTIFY_AGGREGATED_MEASURE_DATA": "Notification of aggregated time series (RSM-014)", + "REJECT_REQUEST_AGGREGATED_MEASURE_DATA": "Reject request for aggregated measurement data (RSM-016)", + "REQUEST_AGGREGATED_MEASURE_DATA": "Request for aggregated measurement data (RSM-016)", + "B2C_REQUEST_AGGREGATED_MEASURE_DATA": "B2C: Request for aggregated measurement data (RSM-016)", + "REJECT_REQUEST_WHOLESALE_SETTLEMENT": "Reject request for wholesale services (RSM-017)", + "REQUEST_WHOLESALE_SETTLEMENT": "Request for wholesale services (RSM-017)", + "B2C_REQUEST_WHOLESALE_SETTLEMENT": "B2C: Request for wholesale services (RSM-017)", + "NOTIFY_WHOLESALE_SERVICES": "Notification of aggregated wholesale services (RSM-019)" }, "businessReason": { - "D02": "Preparation for imbalance settlement (D02)", "D03": "Temporary (D03)", "D04": "1st settlement (D04)", "D05": "2nd settlement (D05)", - "D06": "Continuous meter reading from profiled metering points (D06)", - "D07": "Rollback Change-of-supplier (D07)", - "D09": "Latest available value (D09)", - "D10": "Meter reading, filed consumption (D10)", - "D11": "Incorrect process (D11)", - "D12": "Cancel meter reading request (D12)", - "D13": "Change of supply to supplier of last resort (D13)", - "D14": "Close down metering point (D14)", - "D15": "Connect meteringpoint (D15)", - "D16": "Merge of Grids (D16)", - "D17": "Update masterdata settlement (D17)", - "D18": "Update charge information (D18)", - "D19": "Meter Reading (D19)", - "D20": "Electrical heating (D20)", - "D21": "Move-in due to other reason (D21)", - "D22": "Service request (D22)", - "D23": "Not used (D23)", - "D24": "Missing flex meter reading (D24)", - "D25": "Missing non-profiled time series (D25)", - "D26": "Missing flex time series (D26)", - "D27": "Missing profiled reading (D27)", - "D28": "Proposal contact information (D28)", - "D29": "Secondary move-in (D29)", - "D30": "Switch with short notice (D30)", - "D31": "Transfer metering point (D31)", - "D32": "Correction settlement (D32)", - "D33": "Incorrect move (D33)", - "D34": "End supply due to reallocate (D34)", - "D35": "Continue supply due to rejected reallocate (D35)", - "D36": "Continue supply of customer (D36)", - "D37": "Cancel service request (D37)", - "D38": "End of supply with short notice (D38)", - "D39": "Production Obligation (D39)", - "D40": "Removed parent relation on meteringpoint (D40)", - "D41": "No disconnection of meteringpoint (D41)", - "D43": "Historical information about consumption (D43)", - "D44": "Process cancelled by requesting party (D44)", - "D45": "Process cancelled by ITX (D45)", - "D46": "Date of Supplier change caused by End of supply (D46)", - "D47": "Reminder (D47)", - "E01": "Move (E01)", - "E02": "New metering point (E02)", - "E03": "Change of balance supplier (E03)", - "E05": "Cancellation (E05)", - "E06": "Unrequested change of balance supplier (E06)", - "E0G": "Data alignment for master data metering point (E0G)", - "E20": "End of supply (E20)", - "E23": "Periodic metering (E23)", - "E30": "Historical data (E30)", - "E32": "Update master data metering point (E32)", - "E34": "Update master data consumer (E34)", - "E53": "Meter reading on demand (E53)", - "E56": "Change of Balance Responsible Party (E56)", - "E65": "Customer move-in (E65)", - "E66": "Customer move-out (E66)", - "E67": "Placement of Meter (E67)", - "E75": "Change of metering method (E75)", - "E79": "Change Connection Status (E79)", - "E80": "Change of estimated annual volume (E80)", - "E84": "Update master data meter (E84)" + "D32": "Correction settlement (D32)" }, "search": { "topBarTitle": "Search in request and response messages", diff --git a/libs/dh/message-archive/data-access-graphql/query/get-archived-messages.graphql b/libs/dh/message-archive/data-access-graphql/query/get-archived-messages.graphql index c77bdc8a5d..2c9e12a2b0 100644 --- a/libs/dh/message-archive/data-access-graphql/query/get-archived-messages.graphql +++ b/libs/dh/message-archive/data-access-graphql/query/get-archived-messages.graphql @@ -1,7 +1,7 @@ query GetArchivedMessages( $created: DateRange! - $senderNumber: String - $receiverNumber: String + $senderId: UUID + $receiverId: UUID $documentTypes: [DocumentType!] $businessReasons: [BusinessReason!] $includeRelated: Boolean @@ -14,8 +14,8 @@ query GetArchivedMessages( ) { archivedMessages( created: $created - senderNumber: $senderNumber - receiverNumber: $receiverNumber + senderId: $senderId + receiverId: $receiverId documentTypes: $documentTypes businessReasons: $businessReasons includeRelated: $includeRelated diff --git a/libs/dh/message-archive/feature-search/src/lib/start.component.ts b/libs/dh/message-archive/feature-search/src/lib/start.component.ts index d2a8e0ee05..3601a7a368 100644 --- a/libs/dh/message-archive/feature-search/src/lib/start.component.ts +++ b/libs/dh/message-archive/feature-search/src/lib/start.component.ts @@ -82,13 +82,13 @@ import { /> @@ -114,8 +114,8 @@ export class DhMessageArchiveSearchStartComponent { form = new FormGroup({ documentTypes: dhMakeFormControl(), businessReasons: dhMakeFormControl(), - senderNumber: dhMakeFormControl(), - receiverNumber: dhMakeFormControl(), + senderId: dhMakeFormControl(), + receiverId: dhMakeFormControl(), start: dhMakeFormControl(dayjs().startOf('day').toDate()), end: dhMakeFormControl(dayjs().endOf('day').toDate()), }); @@ -131,7 +131,7 @@ export class DhMessageArchiveSearchStartComponent { actors = computed(() => this.actorsQuery.data()?.actors ?? []); actorOptions = computed(() => this.actors().map((actor) => ({ - value: actor.glnOrEicNumber, + value: actor.id, displayValue: actor.name || actor.glnOrEicNumber, })) ); diff --git a/libs/dh/shared/data-access-mocks/src/lib/data/message-archive-search-response-logs.ts b/libs/dh/shared/data-access-mocks/src/lib/data/message-archive-search-response-logs.ts index 04b9f20afd..1fe926a829 100644 --- a/libs/dh/shared/data-access-mocks/src/lib/data/message-archive-search-response-logs.ts +++ b/libs/dh/shared/data-access-mocks/src/lib/data/message-archive-search-response-logs.ts @@ -38,7 +38,7 @@ export const messageArchiveSearchResponseLogs = { }, { messageId: messageId2, - documentType: DocumentType.NotifyBillingMasterData, + documentType: DocumentType.NotifyAggregatedMeasureData, createdDate: '2023-06-14T12:25:02.6605962+00:00', senderGln: '5790001330552', receiverGln: '7080005056076', @@ -46,7 +46,7 @@ export const messageArchiveSearchResponseLogs = { }, { messageId: messageId3, - documentType: DocumentType.NotifyCancellation, + documentType: DocumentType.B2CRequestAggregatedMeasureData, createdDate: '2023-06-14T12:25:29.0746675+00:00', senderGln: '5790001330552', receiverGln: '7080005056076', @@ -54,7 +54,7 @@ export const messageArchiveSearchResponseLogs = { }, { messageId: messageId4, - documentType: DocumentType.NotifyPricelist, + documentType: DocumentType.B2CRequestWholesaleSettlement, createdDate: '2023-06-14T12:23:53.6801627+00:00', senderGln: '5790001330552', receiverGln: '5790001687137', @@ -62,7 +62,7 @@ export const messageArchiveSearchResponseLogs = { }, { messageId: messageId5, - documentType: DocumentType.NotifyValidatedMeasureData, + documentType: DocumentType.NotifyAggregatedMeasureData, createdDate: '2023-06-14T10:41:25.3732968+00:00', senderGln: '5790001330552', receiverGln: '5790001687137', @@ -70,7 +70,7 @@ export const messageArchiveSearchResponseLogs = { }, { messageId: messageId6, - documentType: DocumentType.AccountingPointCharacteristics, + documentType: DocumentType.NotifyWholesaleServices, createdDate: '2023-06-14T12:24:13.9029624+00:00', senderGln: '5790001330552', receiverGln: '5790001687137', @@ -78,7 +78,7 @@ export const messageArchiveSearchResponseLogs = { }, { messageId: messageId7, - documentType: DocumentType.Acknowledgement, + documentType: DocumentType.RejectRequestAggregatedMeasureData, createdDate: '2023-06-14T12:24:49.2059959+00:00', senderGln: '5790001330552', receiverGln: '7080005056076', @@ -94,7 +94,7 @@ export const messageArchiveSearchResponseLogs = { }, { messageId: '932b5654-520c-4b81-afdb-9c3e22ce7162', - documentType: DocumentType.NotifyCancellation, + documentType: DocumentType.RejectRequestWholesaleSettlement, createdDate: '2023-06-14T12:11:53.579528+00:00', senderGln: '5790001330552', receiverGln: '7080000729821', @@ -110,7 +110,7 @@ export const messageArchiveSearchResponseLogs = { }, { messageId: 'c50b271a11d8-408f', - documentType: DocumentType.CharacteristicsOfACustomerAtAnAp, + documentType: DocumentType.RequestAggregatedMeasureData, createdDate: '2023-06-14T12:12:08.6108809+00:00', senderGln: '5790001330552', receiverGln: '7080000729821', @@ -118,7 +118,7 @@ export const messageArchiveSearchResponseLogs = { }, { messageId: 'ActorsMayWriteWhatever', - documentType: DocumentType.ConfirmRequestCancellation, + documentType: DocumentType.RequestWholesaleSettlement, createdDate: '2023-06-14T12:26:06.6019294+00:00', senderGln: '5790001330552', receiverGln: '5706552000028', @@ -134,7 +134,7 @@ export const messageArchiveSearchResponseLogs = { }, { messageId: 'RequestAggregatedMeasureData-ID', - documentType: DocumentType.ConfirmRequestChangeBillingMasterData, + documentType: DocumentType.RequestWholesaleSettlement, createdDate: '2023-06-14T12:12:29.5600357+00:00', senderGln: '5790001330552', receiverGln: '7080000729821', diff --git a/libs/dh/shared/data-access-mocks/src/lib/message-archive.ts b/libs/dh/shared/data-access-mocks/src/lib/message-archive.ts index f528d5565f..76be490dba 100644 --- a/libs/dh/shared/data-access-mocks/src/lib/message-archive.ts +++ b/libs/dh/shared/data-access-mocks/src/lib/message-archive.ts @@ -75,7 +75,7 @@ function getArchivedMessages(apiBase: string) { }, createdAt: m.createdDate ? new Date(m.createdDate) : new Date(), documentUrl: `${apiBase}/v1/MessageArchive/Document?id=${m.id}`, - businessReason: BusinessReason.D14, + businessReason: BusinessReason.D04, })), }, }, From a5935554fb6de714ce823516e401ca7efe4b9fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Hoffmann?= Date: Mon, 21 Oct 2024 15:06:52 +0200 Subject: [PATCH 2/2] feat(dh): add input to sort dropdown entries by translation key order (#3649) * Add input to sort dropdown entries by translation key order * Fix ordering of translation for marketRoles * Align translation with enum Doesn't really matter in this case, since UI overwrites sorting to be ASC * Revert "Align translation with enum" This reverts commit f9a96d969eedb00cff02a123f665c3d0bef6fe02. * Revert "Fix ordering of translation for marketRoles" This reverts commit 017ccf8fa5fb74dd5def7fbf331573866eabe4cd. * Make translation sort order the default behavior * Fix translation order to match enum for calculationType * Align requestCalculationDataType translation with enum * Use better ordering from translation file * Move sortDirection to watt-dropdown instead * Remove asc sort from CalculationTypes to align with other dropdowns * Remove unneeded asc sort of enum * Remove unneeded asc order of EicFunction * Remove asc sort order from statusOptions * Remove asc from delegatedProcesses option * Align status translation with enum (sorted by order of operation) * Remove asc from ActorDelegationStatus * Move asc sort to template for gridAreas types * Remove asc from CalculationType dropdown in request calculation * Remove sort option from dhEnumToWattDropdownOptions * Remove more null args --- .../src/lib/filters/dh-filters.component.ts | 3 +-- .../src/lib/filters/dh-filters.component.html | 1 + .../src/lib/filters/dh-filters.component.ts | 6 +++--- .../assets-localization/src/assets/i18n/da.json | 16 ++++++++-------- .../assets-localization/src/assets/i18n/en.json | 16 ++++++++-------- .../create/steps/dh-new-actor-step.component.ts | 2 +- ...ance-responsible-relation-filter.component.ts | 3 +-- .../dh-delegation-create-modal.component.ts | 6 +----- .../src/lib/dh-delegation-tab.component.ts | 2 +- ...-participant-gridarea-overview.component.html | 1 + ...et-participant-gridarea-overview.component.ts | 2 +- .../src/lib/dh-dropdown-translator.directive.ts | 4 ++++ .../src/lib/dh-enum-to-dropdown-options.ts | 15 +-------------- .../src/lib/filters/filters.component.ts | 2 +- .../src/lib/dh-wholesale-request-calculation.ts | 3 +-- ...-request-settlement-report-modal.component.ts | 2 +- 16 files changed, 35 insertions(+), 49 deletions(-) diff --git a/libs/dh/esett/feature-metering-gridarea-imbalance/src/lib/filters/dh-filters.component.ts b/libs/dh/esett/feature-metering-gridarea-imbalance/src/lib/filters/dh-filters.component.ts index 6536b21cbc..34ecf8df95 100644 --- a/libs/dh/esett/feature-metering-gridarea-imbalance/src/lib/filters/dh-filters.component.ts +++ b/libs/dh/esett/feature-metering-gridarea-imbalance/src/lib/filters/dh-filters.component.ts @@ -94,8 +94,7 @@ export class DhMeteringGridAreaImbalanceFiltersComponent implements OnInit { gridAreaOptions$ = getGridAreaOptions(); valuestoIncludeOptions: WattDropdownOptions = dhEnumToWattDropdownOptions( - MeteringGridImbalanceValuesToInclude, - 'asc' + MeteringGridImbalanceValuesToInclude ); formGroup!: FormGroup; diff --git a/libs/dh/esett/feature-outgoing-messages/src/lib/filters/dh-filters.component.html b/libs/dh/esett/feature-outgoing-messages/src/lib/filters/dh-filters.component.html index 311c5badfa..49cd1401cc 100644 --- a/libs/dh/esett/feature-outgoing-messages/src/lib/filters/dh-filters.component.html +++ b/libs/dh/esett/feature-outgoing-messages/src/lib/filters/dh-filters.component.html @@ -37,6 +37,7 @@ [chipMode]="true" [options]="messageTypeOptions" [placeholder]="t('messageType')" + sortDirection="asc" dhDropdownTranslator translateKey="eSett.outgoingMessages.shared.messageType" /> diff --git a/libs/dh/esett/feature-outgoing-messages/src/lib/filters/dh-filters.component.ts b/libs/dh/esett/feature-outgoing-messages/src/lib/filters/dh-filters.component.ts index 624a0965c7..11f31ac745 100644 --- a/libs/dh/esett/feature-outgoing-messages/src/lib/filters/dh-filters.component.ts +++ b/libs/dh/esett/feature-outgoing-messages/src/lib/filters/dh-filters.component.ts @@ -100,11 +100,11 @@ export class DhOutgoingMessagesFiltersComponent implements OnInit { filter = output(); formReset = output(); - calculationTypeOptions = dhEnumToWattDropdownOptions(ExchangeEventCalculationType, 'asc'); - messageTypeOptions = dhEnumToWattDropdownOptions(EsettTimeSeriesType, 'asc'); + calculationTypeOptions = dhEnumToWattDropdownOptions(ExchangeEventCalculationType); + messageTypeOptions = dhEnumToWattDropdownOptions(EsettTimeSeriesType); gridAreaOptions$ = getGridAreaOptions(); energySupplierOptions$ = getActorOptions([EicFunction.EnergySupplier]); - documentStatusOptions = dhEnumToWattDropdownOptions(DocumentStatus, 'asc'); + documentStatusOptions = dhEnumToWattDropdownOptions(DocumentStatus); formGroup!: FormGroup; diff --git a/libs/dh/globalization/assets-localization/src/assets/i18n/da.json b/libs/dh/globalization/assets-localization/src/assets/i18n/da.json index cda7aaea2d..fa44855a68 100644 --- a/libs/dh/globalization/assets-localization/src/assets/i18n/da.json +++ b/libs/dh/globalization/assets-localization/src/assets/i18n/da.json @@ -294,8 +294,8 @@ }, "statusPlaceholder": "Status", "status": { - "ACTIVE": "Aktiv", "AWAITING": "Afventer", + "ACTIVE": "Aktiv", "EXPIRED": "Stoppet", "CANCELLED": "Annulleret" } @@ -512,8 +512,8 @@ "E17Consumption": "Forbrug" }, "statusOptions": { - "ACTIVE": "Aktiv", "AWAITING": "Afventer", + "ACTIVE": "Aktiv", "EXPIRED": "Udløbet", "SOON_TO_EXPIRE": "Udløber snart" }, @@ -822,9 +822,9 @@ "RECEIVED": "Modtaget", "AWAITING_DISPATCH": "Afventer afsendelse", "AWAITING_REPLY": "Afventer svar fra eSett", + "BIZ_TALK_ACCEPTED": "Afventer svar fra ECP", "ACCEPTED": "Accepteret", - "REJECTED": "Afvist", - "BIZ_TALK_ACCEPTED": "Afventer svar fra ECP" + "REJECTED": "Afvist" } }, "filters": { @@ -1088,8 +1088,8 @@ }, "calculationTypes": { "BALANCE_FIXING": "{{wholesale.shared.BALANCE_FIXING}}", - "WHOLESALE_FIXING": "{{wholesale.shared.WHOLESALE_FIXING}}", "AGGREGATION": "{{wholesale.shared.AGGREGATION}}", + "WHOLESALE_FIXING": "{{wholesale.shared.WHOLESALE_FIXING}}", "FIRST_CORRECTION_SETTLEMENT": "{{wholesale.shared.FIRST_CORRECTION_SETTLEMENT}}", "SECOND_CORRECTION_SETTLEMENT": "{{wholesale.shared.SECOND_CORRECTION_SETTLEMENT}}", "THIRD_CORRECTION_SETTLEMENT": "{{wholesale.shared.THIRD_CORRECTION_SETTLEMENT}}", @@ -1202,12 +1202,12 @@ "MONTHLY_SUBSCRIPTION": "Abonnement månedssum", "MONTHLY_FEE": "Gebyr månedssum", "MONTHLY_TARIFF_SUBSCRIPTION_AND_FEE": "Alle månedssummer", - "ALL_ENERGY": "Alle", + "PRODUCTION": "Produktion", "FLEX_CONSUMPTION": "Forbrug (flexafregning)", "TOTAL_CONSUMPTION": "Total forbrug", - "PRODUCTION": "Produktion", "NON_PROFILED_CONSUMPTION": "Forbrug (timeafregning)", - "EXCHANGE": "Udveksling" + "EXCHANGE": "Udveksling", + "ALL_ENERGY": "Alle" } }, "settlementReports": { diff --git a/libs/dh/globalization/assets-localization/src/assets/i18n/en.json b/libs/dh/globalization/assets-localization/src/assets/i18n/en.json index ac624d6cd3..5265855a40 100644 --- a/libs/dh/globalization/assets-localization/src/assets/i18n/en.json +++ b/libs/dh/globalization/assets-localization/src/assets/i18n/en.json @@ -294,8 +294,8 @@ }, "statusPlaceholder": "Status", "status": { - "ACTIVE": "Active", "AWAITING": "Pending", + "ACTIVE": "Active", "EXPIRED": "Stopped", "CANCELLED": "Cancelled" } @@ -513,8 +513,8 @@ "E17Consumption": "Consumption" }, "statusOptions": { - "ACTIVE": "Active", "AWAITING": "Awaiting", + "ACTIVE": "Active", "EXPIRED": "Expired", "SOON_TO_EXPIRE": "Soon to expire" }, @@ -823,9 +823,9 @@ "RECEIVED": "Received", "AWAITING_DISPATCH": "Awaiting dispatch", "AWAITING_REPLY": "Awaiting reply from eSett", + "BIZ_TALK_ACCEPTED": "Awaiting reply from ECP", "ACCEPTED": "Accepted", - "REJECTED": "Rejected", - "BIZ_TALK_ACCEPTED": "Awaiting reply from ECP" + "REJECTED": "Rejected" } }, "filters": { @@ -1089,8 +1089,8 @@ }, "calculationTypes": { "BALANCE_FIXING": "{{wholesale.shared.BALANCE_FIXING}}", - "WHOLESALE_FIXING": "{{wholesale.shared.WHOLESALE_FIXING}}", "AGGREGATION": "{{wholesale.shared.AGGREGATION}}", + "WHOLESALE_FIXING": "{{wholesale.shared.WHOLESALE_FIXING}}", "FIRST_CORRECTION_SETTLEMENT": "{{wholesale.shared.FIRST_CORRECTION_SETTLEMENT}}", "SECOND_CORRECTION_SETTLEMENT": "{{wholesale.shared.SECOND_CORRECTION_SETTLEMENT}}", "THIRD_CORRECTION_SETTLEMENT": "{{wholesale.shared.THIRD_CORRECTION_SETTLEMENT}}", @@ -1203,12 +1203,12 @@ "MONTHLY_SUBSCRIPTION": "Subscription monthly sum", "MONTHLY_FEE": "Fee monthly sum", "MONTHLY_TARIFF_SUBSCRIPTION_AND_FEE": "All monthly sums", - "ALL_ENERGY": "All", + "PRODUCTION": "Production", "FLEX_CONSUMPTION": "Flex consumption", "TOTAL_CONSUMPTION": "Total consumption", - "PRODUCTION": "Production", "NON_PROFILED_CONSUMPTION": "Non profiled consumption", - "EXCHANGE": "Exchange" + "EXCHANGE": "Exchange", + "ALL_ENERGY": "All" } }, "settlementReports": { diff --git a/libs/dh/market-participant/actors/feature-actors/src/lib/create/steps/dh-new-actor-step.component.ts b/libs/dh/market-participant/actors/feature-actors/src/lib/create/steps/dh-new-actor-step.component.ts index 6df48a6911..696f578a3b 100644 --- a/libs/dh/market-participant/actors/feature-actors/src/lib/create/steps/dh-new-actor-step.component.ts +++ b/libs/dh/market-participant/actors/feature-actors/src/lib/create/steps/dh-new-actor-step.component.ts @@ -139,7 +139,7 @@ import { dhMarketParticipantNameMaxLength } from '../../dh-market-participant-na export class DhNewActorStepComponent { newActorForm = input.required(); - marketRoleOptions: WattDropdownOptions = dhEnumToWattDropdownOptions(EicFunction, 'asc'); + marketRoleOptions: WattDropdownOptions = dhEnumToWattDropdownOptions(EicFunction); gridAreaOptions = getGridAreaOptions(); showGridAreaOptions = signal(false); diff --git a/libs/dh/market-participant/actors/feature-actors/src/lib/drawer/balance-responsible-relation-tab/dh-balance-responsible-relation-filter.component.ts b/libs/dh/market-participant/actors/feature-actors/src/lib/drawer/balance-responsible-relation-tab/dh-balance-responsible-relation-filter.component.ts index d25b9e7302..92b7119f86 100644 --- a/libs/dh/market-participant/actors/feature-actors/src/lib/drawer/balance-responsible-relation-tab/dh-balance-responsible-relation-filter.component.ts +++ b/libs/dh/market-participant/actors/feature-actors/src/lib/drawer/balance-responsible-relation-tab/dh-balance-responsible-relation-filter.component.ts @@ -143,8 +143,7 @@ export class DhBalanceResponsibleRelationFilterComponent implements OnInit { balanceResponsibleOptions$ = getActorOptions([EicFunction.BalanceResponsibleParty], 'actorId'); gridAreaOptions$ = getGridAreaOptions(); statusOptions: WattDropdownOptions = dhEnumToWattDropdownOptions( - BalanceResponsibilityAgreementStatus, - 'asc' + BalanceResponsibilityAgreementStatus ); filtersForm = new FormGroup({ diff --git a/libs/dh/market-participant/actors/feature-delegation/src/lib/create/dh-delegation-create-modal.component.ts b/libs/dh/market-participant/actors/feature-delegation/src/lib/create/dh-delegation-create-modal.component.ts index 214a36a0c7..c3e00d3d62 100644 --- a/libs/dh/market-participant/actors/feature-delegation/src/lib/create/dh-delegation-create-modal.component.ts +++ b/libs/dh/market-participant/actors/feature-delegation/src/lib/create/dh-delegation-create-modal.component.ts @@ -169,11 +169,7 @@ export class DhDelegationCreateModalComponent extends WattTypedModal { diff --git a/libs/dh/market-participant/actors/feature-delegation/src/lib/dh-delegation-tab.component.ts b/libs/dh/market-participant/actors/feature-delegation/src/lib/dh-delegation-tab.component.ts index cc1de22c64..e7d0bcdf29 100644 --- a/libs/dh/market-participant/actors/feature-delegation/src/lib/dh-delegation-tab.component.ts +++ b/libs/dh/market-participant/actors/feature-delegation/src/lib/dh-delegation-tab.component.ts @@ -98,7 +98,7 @@ export class DhDelegationTabComponent { isEmpty = computed(() => this.delegationsRaw().length === 0); statusControl = new FormControl(null); - statusOptions = dhEnumToWattDropdownOptions(ActorDelegationStatus, 'asc'); + statusOptions = dhEnumToWattDropdownOptions(ActorDelegationStatus); constructor() { effect(() => this.fetchData(this.actor().id), { allowSignalWrites: true }); diff --git a/libs/dh/market-participant/grid-areas/overview/src/lib/dh-market-participant-gridarea-overview.component.html b/libs/dh/market-participant/grid-areas/overview/src/lib/dh-market-participant-gridarea-overview.component.html index e1a5407fb0..f0db536c83 100644 --- a/libs/dh/market-participant/grid-areas/overview/src/lib/dh-market-participant-gridarea-overview.component.html +++ b/libs/dh/market-participant/grid-areas/overview/src/lib/dh-market-participant-gridarea-overview.component.html @@ -31,6 +31,7 @@

{{ t("topBarTitle") }}

(false); hasError = input(false); - gridAreaTypeOptions = dhEnumToWattDropdownOptions(GridAreaType, 'asc', [GridAreaType.NotSet]); + gridAreaTypeOptions = dhEnumToWattDropdownOptions(GridAreaType, [GridAreaType.NotSet]); selectedGridAreaType = signal(null); diff --git a/libs/dh/shared/ui-util/src/lib/dh-dropdown-translator.directive.ts b/libs/dh/shared/ui-util/src/lib/dh-dropdown-translator.directive.ts index 5f49149055..9e00d4fb75 100644 --- a/libs/dh/shared/ui-util/src/lib/dh-dropdown-translator.directive.ts +++ b/libs/dh/shared/ui-util/src/lib/dh-dropdown-translator.directive.ts @@ -47,6 +47,10 @@ export class DhDropdownTranslatorDirective implements OnInit { displayValue: this.translateDisplayValue(keys[option.value as keyof typeof keys]), })); + // Sort translatedOptions based on the order of the translation keys + const keyOrder = Object.keys(keys); + translatedOptions.sort((a, b) => keyOrder.indexOf(a.value) - keyOrder.indexOf(b.value)); + this.host.options = this.host.sortDirection ? this.host.sortOptions(translatedOptions) : translatedOptions; diff --git a/libs/dh/shared/ui-util/src/lib/dh-enum-to-dropdown-options.ts b/libs/dh/shared/ui-util/src/lib/dh-enum-to-dropdown-options.ts index 8c42493125..6016e34c90 100644 --- a/libs/dh/shared/ui-util/src/lib/dh-enum-to-dropdown-options.ts +++ b/libs/dh/shared/ui-util/src/lib/dh-enum-to-dropdown-options.ts @@ -16,24 +16,11 @@ */ import { WattDropdownOptions } from '@energinet-datahub/watt/dropdown'; -export function dhEnumToWattDropdownOptions( - enumObj: T, - sort: 'asc' | 'desc' | null = null, - exclude?: string[] -) { +export function dhEnumToWattDropdownOptions(enumObj: T, exclude?: string[]) { return Object.keys(enumObj) .map((key) => ({ displayValue: key, value: Object.values(enumObj)[Object.keys(enumObj).indexOf(key)], })) - .sort((a, b) => { - if (sort === null) return 0; - - if (sort === 'asc') { - return a.displayValue.localeCompare(b.displayValue); - } else { - return b.displayValue.localeCompare(a.displayValue); - } - }) .filter(({ value }) => !exclude?.includes(value)) as WattDropdownOptions; } diff --git a/libs/dh/wholesale/feature-calculations/src/lib/filters/filters.component.ts b/libs/dh/wholesale/feature-calculations/src/lib/filters/filters.component.ts index 7b34c2c91a..8f47b0c690 100644 --- a/libs/dh/wholesale/feature-calculations/src/lib/filters/filters.component.ts +++ b/libs/dh/wholesale/feature-calculations/src/lib/filters/filters.component.ts @@ -142,7 +142,7 @@ export class DhCalculationsFiltersComponent implements OnInit { calculationTypesOptions = dhEnumToWattDropdownOptions(CalculationType); executionTypeOptions = dhEnumToWattDropdownOptions(CalculationExecutionType); gridAreaOptions$ = getGridAreaOptions(); - executionStateOptions = dhEnumToWattDropdownOptions(CalculationOrchestrationState, null, [ + executionStateOptions = dhEnumToWattDropdownOptions(CalculationOrchestrationState, [ CalculationOrchestrationState.ActorMessagesEnqueued, ]); diff --git a/libs/dh/wholesale/feature-request-calculation/src/lib/dh-wholesale-request-calculation.ts b/libs/dh/wholesale/feature-request-calculation/src/lib/dh-wholesale-request-calculation.ts index 0efc9719ff..0d8bf829ce 100644 --- a/libs/dh/wholesale/feature-request-calculation/src/lib/dh-wholesale-request-calculation.ts +++ b/libs/dh/wholesale/feature-request-calculation/src/lib/dh-wholesale-request-calculation.ts @@ -168,7 +168,7 @@ export class DhWholesaleRequestCalculationComponent { }); calculationTypeOptions = computed(() => - dhEnumToWattDropdownOptions(CalculationType, 'asc', this.excludeCalculationTypes()) + dhEnumToWattDropdownOptions(CalculationType, this.excludeCalculationTypes()) ); excludeRequestCalculationDataTypes = computed(() => { @@ -202,7 +202,6 @@ export class DhWholesaleRequestCalculationComponent { requestCalculationDataTypeOptions = computed(() => { return dhEnumToWattDropdownOptions( RequestCalculationDataType, - null, this.excludeRequestCalculationDataTypes() ); }); diff --git a/libs/dh/wholesale/feature-settlement-reports/src/lib/modal/dh-request-settlement-report-modal.component.ts b/libs/dh/wholesale/feature-settlement-reports/src/lib/modal/dh-request-settlement-report-modal.component.ts index 9f89b6c810..c562e70a9e 100644 --- a/libs/dh/wholesale/feature-settlement-reports/src/lib/modal/dh-request-settlement-report-modal.component.ts +++ b/libs/dh/wholesale/feature-settlement-reports/src/lib/modal/dh-request-settlement-report-modal.component.ts @@ -370,7 +370,7 @@ export class DhRequestSettlementReportModalComponent extends WattTypedModal