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 8007e19eb7..8c533ae850 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 @@ -274,25 +274,30 @@ type GetUserProfileResponse { type GridAreaDto { priceAreaCode: PriceAreaCode! displayName: String! + status: GridAreaStatus! includedInCalculation: Boolean! id: UUID! code: String! name: String! + type: GridAreaType! validFrom: DateTime! validTo: DateTime } type GridAreaOverviewItemDto { + priceAreaCode: PriceAreaCode! + displayName: String! + status: GridAreaStatus! id: UUID! code: String! name: String! - priceAreaCode: String! validFrom: DateTime! validTo: DateTime actorNumber: String actorName: String organizationName: String fullFlexDate: DateTime + type: GridAreaType! } "Imbalance price" @@ -1140,6 +1145,24 @@ enum ExchangeEventSortProperty { LATEST_DISPATCHED } +enum GridAreaStatus { + Created + Active + Expired + Archived +} + +enum GridAreaType { + NotSet + Transmission + Distribution + Other + Test + GridLossDK + GridLossAbroad + Aboard +} + enum ImbalancePriceStatus { NO_DATA IN_COMPLETE diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/MarketParticipant/V1/MarketParticipantClient.cs b/apps/dh/api-dh/source/DataHub.WebApi/Clients/MarketParticipant/V1/MarketParticipantClient.cs index 9dad1a70ca..49159b618c 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/MarketParticipant/V1/MarketParticipantClient.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/Clients/MarketParticipant/V1/MarketParticipantClient.cs @@ -216,15 +216,6 @@ public partial interface IMarketParticipantClient_V1 /// A server side error occurred. System.Threading.Tasks.Task> BalanceResponsibilityRelationsAsync(System.Guid actorId, System.Threading.CancellationToken cancellationToken, string? api_version = null); - /// OK - /// A server side error occurred. - System.Threading.Tasks.Task GridAreaPostAsync(CreateGridAreaDto? body, string? api_version = null); - - /// 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 GridAreaPostAsync(CreateGridAreaDto? body, System.Threading.CancellationToken cancellationToken, string? api_version = null); - /// OK /// A server side error occurred. System.Threading.Tasks.Task> GridAreaGetAsync(string? api_version = null); @@ -234,15 +225,6 @@ public partial interface IMarketParticipantClient_V1 /// A server side error occurred. System.Threading.Tasks.Task> GridAreaGetAsync(System.Threading.CancellationToken cancellationToken, string? api_version = null); - /// OK - /// A server side error occurred. - System.Threading.Tasks.Task GridAreaPutAsync(System.Guid gridAreaId, ChangeGridAreaDto? body, string? api_version = null); - - /// 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 GridAreaPutAsync(System.Guid gridAreaId, ChangeGridAreaDto? body, System.Threading.CancellationToken cancellationToken, string? api_version = null); - /// OK /// A server side error occurred. System.Threading.Tasks.Task GridAreaGetAsync(System.Guid gridAreaId, string? api_version = null); @@ -2560,94 +2542,6 @@ public virtual async System.Threading.Tasks.Task AuditIdentity } } - /// OK - /// A server side error occurred. - public virtual System.Threading.Tasks.Task GridAreaPostAsync(CreateGridAreaDto? body, string? api_version = null) - { - return GridAreaPostAsync(body, System.Threading.CancellationToken.None, api_version); - } - - /// 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 GridAreaPostAsync(CreateGridAreaDto? body, System.Threading.CancellationToken cancellationToken, string? api_version = null) - { - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); - var content_ = new System.Net.Http.StringContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "GridArea" - urlBuilder_.Append("GridArea"); - urlBuilder_.Append('?'); - if (api_version != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("api-version")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(api_version, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - urlBuilder_.Length--; - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - 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); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - /// OK /// A server side error occurred. public virtual System.Threading.Tasks.Task> GridAreaGetAsync(string? api_version = null) @@ -2732,92 +2626,6 @@ public virtual async System.Threading.Tasks.Task AuditIdentity } } - /// OK - /// A server side error occurred. - public virtual System.Threading.Tasks.Task GridAreaPutAsync(System.Guid gridAreaId, ChangeGridAreaDto? body, string? api_version = null) - { - return GridAreaPutAsync(gridAreaId, body, System.Threading.CancellationToken.None, api_version); - } - - /// 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 GridAreaPutAsync(System.Guid gridAreaId, ChangeGridAreaDto? body, System.Threading.CancellationToken cancellationToken, string? api_version = null) - { - if (gridAreaId == null) - throw new System.ArgumentNullException("gridAreaId"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); - var content_ = new System.Net.Http.StringContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); - - var urlBuilder_ = new System.Text.StringBuilder(); - if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); - // Operation Path: "GridArea/{gridAreaId}" - urlBuilder_.Append("GridArea/"); - urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(gridAreaId, System.Globalization.CultureInfo.InvariantCulture))); - urlBuilder_.Append('?'); - if (api_version != null) - { - urlBuilder_.Append(System.Uri.EscapeDataString("api-version")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(api_version, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); - } - urlBuilder_.Length--; - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - return; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - /// OK /// A server side error occurred. public virtual System.Threading.Tasks.Task GridAreaGetAsync(System.Guid gridAreaId, string? api_version = null) @@ -7326,14 +7134,6 @@ public partial class ChangeActorDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class ChangeGridAreaDto - { - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ChangeOrganizationDto { @@ -7418,20 +7218,6 @@ public partial class CreateActorDto } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class CreateGridAreaDto - { - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Code { get; set; } = default!; - - [Newtonsoft.Json.JsonProperty("priceAreaCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string PriceAreaCode { get; set; } = default!; - - } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class CreateOrganizationDto { @@ -7713,6 +7499,9 @@ public partial class GridAreaDto [Newtonsoft.Json.JsonProperty("priceAreaCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string PriceAreaCode { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GridAreaType Type { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("validFrom", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset ValidFrom { get; set; } = default!; @@ -7754,6 +7543,31 @@ public partial class GridAreaOverviewItemDto [Newtonsoft.Json.JsonProperty("fullFlexDate", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.DateTimeOffset? FullFlexDate { get; set; } = default!; + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GridAreaType Type { get; set; } = default!; + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + public enum GridAreaType + { + + NotSet = 0, + + Transmission = 1, + + Distribution = 2, + + Other = 3, + + Test = 4, + + GridLossDK = 5, + + GridLossAbroad = 6, + + Aboard = 7, + } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] diff --git a/apps/dh/api-dh/source/DataHub.WebApi/Clients/MarketParticipant/V1/swagger.json b/apps/dh/api-dh/source/DataHub.WebApi/Clients/MarketParticipant/V1/swagger.json index 050f218ccc..144f4ebbb6 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/Clients/MarketParticipant/V1/swagger.json +++ b/apps/dh/api-dh/source/DataHub.WebApi/Clients/MarketParticipant/V1/swagger.json @@ -1148,77 +1148,6 @@ } }, "/GridArea": { - "post": { - "tags": [ - "GridArea" - ], - "operationId": "GridAreaPOST", - "parameters": [ - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/CreateGridAreaDto" - } - ] - } - }, - "text/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/CreateGridAreaDto" - } - ] - } - }, - "application/*+json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/CreateGridAreaDto" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK", - "content": { - "text/plain": { - "schema": { - "type": "string", - "format": "uuid" - } - }, - "application/json": { - "schema": { - "type": "string", - "format": "uuid" - } - }, - "text/json": { - "schema": { - "type": "string", - "format": "uuid" - } - } - } - } - } - }, "get": { "tags": [ "GridArea" @@ -1267,71 +1196,11 @@ } }, "/GridArea/{gridAreaId}": { - "put": { - "tags": [ - "GridArea" - ], - "operationId": "GridAreaPUT", - "parameters": [ - { - "name": "gridAreaId", - "in": "path", - "required": true, - "schema": { - "type": "string", - "format": "uuid" - } - }, - { - "name": "api-version", - "in": "query", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ChangeGridAreaDto" - } - ] - } - }, - "text/json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ChangeGridAreaDto" - } - ] - } - }, - "application/*+json": { - "schema": { - "allOf": [ - { - "$ref": "#/components/schemas/ChangeGridAreaDto" - } - ] - } - } - } - }, - "responses": { - "200": { - "description": "OK" - } - } - }, "get": { "tags": [ "GridArea" ], - "operationId": "GridAreaGET", + "operationId": "GridArea", "parameters": [ { "name": "gridAreaId", @@ -4165,15 +4034,6 @@ } } }, - "ChangeGridAreaDto": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - } - } - }, "ChangeOrganizationDto": { "type": "object", "additionalProperties": false, @@ -4297,21 +4157,6 @@ } } }, - "CreateGridAreaDto": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string" - }, - "code": { - "type": "string" - }, - "priceAreaCode": { - "type": "string" - } - } - }, "CreateOrganizationDto": { "type": "object", "additionalProperties": false, @@ -4720,6 +4565,23 @@ "priceAreaCode": { "type": "string" }, + "type": { + "x-enumNames": [ + "NotSet", + "Transmission", + "Distribution", + "Other", + "Test", + "GridLossDK", + "GridLossAbroad", + "Aboard" + ], + "allOf": [ + { + "$ref": "#/components/schemas/GridAreaType" + } + ] + }, "validFrom": { "type": "string", "format": "date-time" @@ -4773,9 +4635,50 @@ "type": "string", "format": "date-time", "nullable": true + }, + "type": { + "x-enumNames": [ + "NotSet", + "Transmission", + "Distribution", + "Other", + "Test", + "GridLossDK", + "GridLossAbroad", + "Aboard" + ], + "allOf": [ + { + "$ref": "#/components/schemas/GridAreaType" + } + ] } } }, + "GridAreaType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "NotSet", + "Transmission", + "Distribution", + "Other", + "Test", + "GridLossDK", + "GridLossAbroad", + "Aboard" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7 + ] + }, "InvitationUserDetailsDto": { "type": "object", "additionalProperties": false, diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/GridAreaStatus.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/GridAreaStatus.cs new file mode 100644 index 0000000000..afbe89bbf6 --- /dev/null +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Enums/GridAreaStatus.cs @@ -0,0 +1,23 @@ +// 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 GridAreaStatus +{ + Created, + Active, + Expired, + Archived, +} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/GridAreaResolver.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/GridAreaResolver.cs new file mode 100644 index 0000000000..1cbc5f7c95 --- /dev/null +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/GridAreaResolver.cs @@ -0,0 +1,62 @@ +// 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.WebApi.Clients.MarketParticipant.v1; +using Energinet.DataHub.WebApi.GraphQL.Enums; + +namespace Energinet.DataHub.WebApi.GraphQL.Resolvers; + +public class GridAreaResolvers +{ + public GridAreaStatus CalculateGridAreaStatus([Parent] IGridArea gridarea) + { + var validFrom = gridarea.ValidFrom; + var validTo = gridarea.ValidTo; + + if (validFrom > DateTimeOffset.UtcNow) + { + return GridAreaStatus.Created; + } + + if (validTo < DateTimeOffset.UtcNow) + { + return GridAreaStatus.Expired; + } + + if (validFrom <= DateTimeOffset.UtcNow && validTo >= DateTimeOffset.UtcNow) + { + return GridAreaStatus.Active; + } + + if (validFrom <= DateTimeOffset.UtcNow && validTo == null) + { + return GridAreaStatus.Active; + } + + return GridAreaStatus.Archived; + } + + public PriceAreaCode ParsePriceAreaCode([Parent] IGridArea gridarea) + { + return Enum.Parse(gridarea.PriceAreaCode); + } + + public string DisplayName([Parent] IGridArea gridarea) => + gridarea switch + { + null => string.Empty, + var gridArea when string.IsNullOrWhiteSpace(gridArea.Name) => gridArea.Code, + var gridArea => $"{gridArea.Code} • {gridArea.Name}", + }; +} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/MarketParticipantResolvers.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/MarketParticipantResolvers.cs index 7f672c4f7b..e9331c4101 100644 --- a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/MarketParticipantResolvers.cs +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Resolvers/MarketParticipantResolvers.cs @@ -14,6 +14,7 @@ using Energinet.DataHub.WebApi.Clients.MarketParticipant.v1; using Energinet.DataHub.WebApi.GraphQL.DataLoaders; +using Energinet.DataHub.WebApi.GraphQL.Enums; using Energinet.DataHub.WebApi.GraphQL.Types.Actor; using Energinet.DataHub.WebApi.GraphQL.Types.Process; using Energinet.DataHub.WebApi.GraphQL.Types.User; diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaDto.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaDto.cs new file mode 100644 index 0000000000..bc0feb856a --- /dev/null +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaDto.cs @@ -0,0 +1,20 @@ +// 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 SA1300 // Element should begin with upper-case letter +namespace Energinet.DataHub.WebApi.Clients.MarketParticipant.v1; +#pragma warning restore SA1300 // Element should begin with upper-case letter + +public partial class GridAreaDto : IGridArea +{ } diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaDtoType.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaDtoType.cs new file mode 100644 index 0000000000..dcf1200bee --- /dev/null +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaDtoType.cs @@ -0,0 +1,44 @@ +// 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.WebApi.Clients.MarketParticipant.v1; +using Energinet.DataHub.WebApi.GraphQL.Resolvers; + +namespace Energinet.DataHub.WebApi.GraphQL.Types.GridArea; + +public class GridAreaDtoType : ObjectType +{ + protected override void Configure(IObjectTypeDescriptor descriptor) + { + descriptor.Name("GridAreaDto"); + + descriptor + .Field(f => f.PriceAreaCode) + .Name("priceAreaCode") + .ResolveWith(c => c.ParsePriceAreaCode(default!)); + + descriptor + .Field("displayName") + .Type>() + .ResolveWith(c => c.DisplayName(default!)); + + descriptor + .Field("status") + .ResolveWith(c => c.CalculateGridAreaStatus(default!)); + + descriptor + .Field("includedInCalculation") + .Resolve(context => new[] { GridAreaType.Test, GridAreaType.Distribution, GridAreaType.GridLossDK }.Contains(context.Parent().Type)); + } +} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaEnumType.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaEnumType.cs new file mode 100644 index 0000000000..533e8f0d6a --- /dev/null +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaEnumType.cs @@ -0,0 +1,26 @@ +// 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.WebApi.Clients.MarketParticipant.v1; +using Energinet.DataHub.WebApi.GraphQL.Extensions; + +namespace Energinet.DataHub.WebApi.GraphQL.Types.GridArea; + +public class GridAreaEnumType : EnumType +{ + protected override void Configure(IEnumTypeDescriptor descriptor) + { + descriptor.AsIsCase(); + } +} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaOverviewItemDto.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaOverviewItemDto.cs new file mode 100644 index 0000000000..58f372eed2 --- /dev/null +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaOverviewItemDto.cs @@ -0,0 +1,20 @@ +// 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 SA1300 // Element should begin with upper-case letter +namespace Energinet.DataHub.WebApi.Clients.MarketParticipant.v1; +#pragma warning restore SA1300 // Element should begin with upper-case letter + +public partial class GridAreaOverviewItemDto : IGridArea +{ } diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaOverviewItemDtoType.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaOverviewItemDtoType.cs new file mode 100644 index 0000000000..163e4e69fd --- /dev/null +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaOverviewItemDtoType.cs @@ -0,0 +1,38 @@ +// 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.WebApi.Clients.MarketParticipant.v1; +using Energinet.DataHub.WebApi.GraphQL.Resolvers; + +namespace Energinet.DataHub.WebApi.GraphQL.Types.GridArea; + +public class GridAreaOverviewItemDtoType : ObjectType +{ + protected override void Configure(IObjectTypeDescriptor descriptor) + { + descriptor + .Field(f => f.PriceAreaCode) + .Name("priceAreaCode") + .ResolveWith(c => c.ParsePriceAreaCode(default!)); + + descriptor + .Field("displayName") + .Type>() + .ResolveWith(c => c.DisplayName(default!)); + + descriptor + .Field("status") + .ResolveWith(c => c.CalculateGridAreaStatus(default!)); + } +} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaStatusType.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaStatusType.cs new file mode 100644 index 0000000000..3cd193a903 --- /dev/null +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/GridAreaStatusType.cs @@ -0,0 +1,26 @@ +// 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.WebApi.GraphQL.Enums; +using Energinet.DataHub.WebApi.GraphQL.Extensions; + +namespace Energinet.DataHub.WebApi.GraphQL.Types.GridArea; + +public class GridAreaStatusType : EnumType +{ + protected override void Configure(IEnumTypeDescriptor descriptor) + { + descriptor.AsIsCase(); + } +} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/IGridArea.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/IGridArea.cs new file mode 100644 index 0000000000..b5f4bf3d9d --- /dev/null +++ b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridArea/IGridArea.cs @@ -0,0 +1,48 @@ +// 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 SA1300 // Element should begin with upper-case letter +namespace Energinet.DataHub.WebApi.Clients.MarketParticipant.v1; +#pragma warning restore SA1300 // Element should begin with upper-case letter + +/// +/// Represents a grid area. +/// +public interface IGridArea +{ + /// + /// The grid area code. + /// + public string PriceAreaCode { get; } + + /// + /// The grid area name. + /// + public string Name { get; } + + /// + /// The grid area code. + /// + public string Code { get; } + + /// + /// The grid area Validfrom. + /// + public DateTimeOffset ValidFrom { get; } + + /// + /// The grid area Validto. + /// + public DateTimeOffset? ValidTo { get; } +} diff --git a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridAreaType.cs b/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridAreaType.cs deleted file mode 100644 index 5a60475ae6..0000000000 --- a/apps/dh/api-dh/source/DataHub.WebApi/GraphQL/Types/GridAreaType.cs +++ /dev/null @@ -1,53 +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 Energinet.DataHub.WebApi.Clients.MarketParticipant.v1; -using Energinet.DataHub.WebApi.GraphQL.Enums; - -namespace Energinet.DataHub.WebApi.GraphQL.Types; - -public class GridAreaType : ObjectType -{ - // This list should be replaced with data from the MarketParticipant API once available - private readonly List _includedInCalculation = [ - "003", "007", "016", "031", "042", "051", "084", "085", "131", "141", "151", "154", "233", - "244", "245", "331", "341", "342", "344", "347", "348", "351", "357", "370", "371", "381", - "384", "385", "396", "531", "532", "533", "543", "584", "740", "757", "791", "853", "854", - "860", "911", "950", "951", "952", "953", "954", "960", "962", "990"]; - - protected override void Configure(IObjectTypeDescriptor descriptor) - { - descriptor.Name("GridAreaDto"); - - descriptor - .Field(f => f.PriceAreaCode) - .Name("priceAreaCode") - .Resolve(context => - Enum.Parse(context.Parent().PriceAreaCode)); - - descriptor - .Field("displayName") - .Type>() - .Resolve(context => context.Parent() switch - { - null => string.Empty, - var gridArea when string.IsNullOrWhiteSpace(gridArea.Name) => gridArea.Code, - var gridArea => $"{gridArea.Code} • {gridArea.Name}", - }); - - descriptor - .Field("includedInCalculation") - .Resolve(context => _includedInCalculation.Contains(context.Parent().Code)); - } -} diff --git a/libs/dh/admin/data-access-graphql/project.json b/libs/dh/admin/data-access-graphql/project.json index 25c303f1b6..36573da9be 100644 --- a/libs/dh/admin/data-access-graphql/project.json +++ b/libs/dh/admin/data-access-graphql/project.json @@ -5,6 +5,7 @@ "sourceRoot": "libs/dh/admin/data-access-graphql", "prefix": "dh", "tags": ["product:dh", "domain:admin", "type:data-access"], + "implicitDependencies": ["api-dh"], "targets": { "lint": { "executor": "@nx/eslint:lint" diff --git a/libs/dh/esett/data-access-graphql/project.json b/libs/dh/esett/data-access-graphql/project.json index 1fdf2c82b4..346792b414 100644 --- a/libs/dh/esett/data-access-graphql/project.json +++ b/libs/dh/esett/data-access-graphql/project.json @@ -5,6 +5,7 @@ "sourceRoot": "libs/dh/esett/data-access-graphql", "prefix": "dh", "tags": ["product:dh", "domain:esett", "type:data-access"], + "implicitDependencies": ["api-dh"], "targets": { "lint": { "executor": "@nx/eslint:lint" 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 c3344b0693..2da6f09bed 100644 --- a/libs/dh/globalization/assets-localization/src/assets/i18n/da.json +++ b/libs/dh/globalization/assets-localization/src/assets/i18n/da.json @@ -675,11 +675,30 @@ "columns": { "code": "Netområde", "actor": "Netvirksomhed", - "organization": "Organisation" + "organization": "Organisation", + "status": "Status", + "type": "Type" }, "priceAreaCodes": { "Dk1": "DK1", "Dk2": "DK2" + }, + "areaTypePlaceholder": "Vælg type", + "status": { + "Created": "Oprettet", + "Active": "Aktiv", + "Expired": "Udløbet", + "Archived": "Arkiveret" + }, + "types": { + "NotSet": "Ikke angivet", + "Transmission": "Transmission", + "Distribution": "Distribution", + "Other": "Andet", + "Test": "Test", + "GridLossDK": "Nettab DK", + "GridLossAbroad": "Nettab udland", + "Aboard": "Udland" } } }, 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 3204d2d2fe..810f9c4733 100644 --- a/libs/dh/globalization/assets-localization/src/assets/i18n/en.json +++ b/libs/dh/globalization/assets-localization/src/assets/i18n/en.json @@ -676,11 +676,30 @@ "columns": { "code": "Grid area", "actor": "Grid access provider", - "organization": "Organisation" + "organization": "Organisation", + "status": "Status", + "type": "Type" }, "priceAreaCodes": { "Dk1": "DK1", "Dk2": "DK2" + }, + "areaTypePlaceholder": "Choose type", + "status": { + "Created": "Created", + "Active": "Active", + "Expired": "Expired", + "Archived": "Archived" + }, + "types": { + "NotSet": "Not specified", + "Transmission": "Transmission", + "Distribution": "Distribution", + "Other": "Other", + "Test": "Test", + "GridLossDK": "Grid loss DK", + "GridLossAbroad": "Grid loss abroad", + "Aboard": "Abroad" } } }, diff --git a/libs/dh/imbalance-prices/data-access-graphql/project.json b/libs/dh/imbalance-prices/data-access-graphql/project.json index 6880042358..bcb2573523 100644 --- a/libs/dh/imbalance-prices/data-access-graphql/project.json +++ b/libs/dh/imbalance-prices/data-access-graphql/project.json @@ -5,6 +5,7 @@ "sourceRoot": "libs/dh/imbalance-prices/data-access-graphql", "prefix": "dh", "tags": ["product:dh", "domain:imbalance-prices", "type:data-access"], + "implicitDependencies": ["api-dh"], "targets": { "lint": { "executor": "@nx/eslint:lint" diff --git a/libs/dh/market-participant/actors/data-access-graphql/project.json b/libs/dh/market-participant/actors/data-access-graphql/project.json index 0e56a37c6f..a2a064b082 100644 --- a/libs/dh/market-participant/actors/data-access-graphql/project.json +++ b/libs/dh/market-participant/actors/data-access-graphql/project.json @@ -5,6 +5,7 @@ "sourceRoot": "libs/dh/market-participant/actors/data-access-graphql", "prefix": "dh", "tags": ["product:dh", "domain:market-participant", "type:data-access"], + "implicitDependencies": ["api-dh"], "targets": { "lint": { "executor": "@nx/eslint:lint" diff --git a/libs/dh/market-participant/data-access-graphql/project.json b/libs/dh/market-participant/data-access-graphql/project.json index 8fdd7bbbdb..dfb5a248f7 100644 --- a/libs/dh/market-participant/data-access-graphql/project.json +++ b/libs/dh/market-participant/data-access-graphql/project.json @@ -5,6 +5,7 @@ "sourceRoot": "libs/dh/market-participant/data-access-graphql", "prefix": "dh", "tags": ["product:dh", "domain:market-participant", "type:data-access"], + "implicitDependencies": ["api-dh"], "targets": { "lint": { "executor": "@nx/eslint:lint" diff --git a/libs/dh/market-participant/data-access-graphql/query/get-grid-area-overview.graphql b/libs/dh/market-participant/data-access-graphql/query/get-grid-area-overview.graphql index dc95984a5a..0c3ac55db9 100644 --- a/libs/dh/market-participant/data-access-graphql/query/get-grid-area-overview.graphql +++ b/libs/dh/market-participant/data-access-graphql/query/get-grid-area-overview.graphql @@ -9,6 +9,8 @@ query GetGridAreaOverview { actorNumber actorName organizationName + type fullFlexDate + status } } diff --git a/libs/dh/market-participant/grid-areas/overview/src/lib/dh-grid-area-status-badge.component.ts b/libs/dh/market-participant/grid-areas/overview/src/lib/dh-grid-area-status-badge.component.ts new file mode 100644 index 0000000000..e6d20d3848 --- /dev/null +++ b/libs/dh/market-participant/grid-areas/overview/src/lib/dh-grid-area-status-badge.component.ts @@ -0,0 +1,53 @@ +/** + * @license + * 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. + */ +import { ChangeDetectionStrategy, Component, input } from '@angular/core'; +import { TranslocoDirective } from '@ngneat/transloco'; + +import { WattBadgeComponent } from '@energinet-datahub/watt/badge'; +import { GridAreaStatus } from '@energinet-datahub/dh/shared/domain/graphql'; +import { DhEmDashFallbackPipe } from '@energinet-datahub/dh/shared/ui-util'; + +@Component({ + standalone: true, + selector: 'dh-gridarea-status-badge', + template: ` + + @switch (status()) { + @case ('Created') { + {{ t('Created') }} + } + @case ('Active') { + {{ t('Active') }} + } + @case ('Expired') { + {{ t('Expired') }} + } + @case ('Archived') { + {{ t('Archived') }} + } + @default { + {{ status() | dhEmDashFallback }} + } + } + + `, + changeDetection: ChangeDetectionStrategy.OnPush, + imports: [TranslocoDirective, WattBadgeComponent, DhEmDashFallbackPipe], +}) +export class DhGridAreaStatusBadgeComponent { + status = input.required(); +} 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 8dd5618fd4..ee84a94691 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 @@ -15,8 +15,8 @@ limitations under the License. --> - - + +

{{ t("topBarTitle") }}

{{ dataSource.data.length }} @@ -29,22 +29,54 @@

{{ t("topBarTitle") }}

}}
+ + + + > + + {{ gridArea.code }} + + + + {{ gridArea.actor }} + + + + {{ gridArea.organization }} + + + + {{ t("types." + gridArea.type) }} + + + + + + @if (!isLoading() && (hasError() || dataSource.data.length === 0)) { - + + + } diff --git a/libs/dh/market-participant/grid-areas/overview/src/lib/dh-market-participant-gridarea-overview.component.ts b/libs/dh/market-participant/grid-areas/overview/src/lib/dh-market-participant-gridarea-overview.component.ts index d84e3ee1bf..1fd1846e5d 100644 --- a/libs/dh/market-participant/grid-areas/overview/src/lib/dh-market-participant-gridarea-overview.component.ts +++ b/libs/dh/market-participant/grid-areas/overview/src/lib/dh-market-participant-gridarea-overview.component.ts @@ -14,28 +14,43 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Component, effect, input } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { Component, effect, input, signal } from '@angular/core'; import { TranslocoDirective, TranslocoPipe, translate } from '@ngneat/transloco'; -import { WATT_CARD } from '@energinet-datahub/watt/card'; -import { WattSearchComponent } from '@energinet-datahub/watt/search'; -import { WattButtonComponent } from '@energinet-datahub/watt/button'; import { VaterFlexComponent, VaterSpacerComponent, VaterStackComponent, VaterUtilityDirective, } from '@energinet-datahub/watt/vater'; + import { WATT_TABLE, WattTableColumnDef, WattTableDataSource } from '@energinet-datahub/watt/table'; -import { DhEmDashFallbackPipe, exportToCSV } from '@energinet-datahub/dh/shared/ui-util'; + +import { + DhDropdownTranslatorDirective, + DhEmDashFallbackPipe, + dhEnumToWattDropdownOptions, + exportToCSV, +} from '@energinet-datahub/dh/shared/ui-util'; + +import { WATT_CARD } from '@energinet-datahub/watt/card'; import { WattDatePipe } from '@energinet-datahub/watt/date'; +import { WattSearchComponent } from '@energinet-datahub/watt/search'; +import { WattButtonComponent } from '@energinet-datahub/watt/button'; +import { WattDropdownComponent } from '@energinet-datahub/watt/dropdown'; import { WattPaginatorComponent } from '@energinet-datahub/watt/paginator'; import { WattEmptyStateComponent } from '@energinet-datahub/watt/empty-state'; +import { GridAreaStatus, GridAreaType } from '@energinet-datahub/dh/shared/domain/graphql'; + +import { DhGridAreaStatusBadgeComponent } from './dh-grid-area-status-badge.component'; export interface GridAreaOverviewRow { code: string; actor: string; organization: string; + status: GridAreaStatus; + type: GridAreaType; } @Component({ @@ -58,23 +73,28 @@ export interface GridAreaOverviewRow { `, ], imports: [ - TranslocoDirective, + FormsModule, + TranslocoPipe, + TranslocoDirective, WATT_CARD, WATT_TABLE, + WattDatePipe, + WattButtonComponent, + WattSearchComponent, + WattDropdownComponent, WattPaginatorComponent, + WattEmptyStateComponent, + VaterFlexComponent, - VaterSpacerComponent, VaterStackComponent, + VaterSpacerComponent, VaterUtilityDirective, - WattEmptyStateComponent, - WattSearchComponent, - WattButtonComponent, - WattButtonComponent, - WattDatePipe, DhEmDashFallbackPipe, + DhDropdownTranslatorDirective, + DhGridAreaStatusBadgeComponent, ], }) export class DhMarketParticipantGridAreaOverviewComponent { @@ -82,17 +102,25 @@ export class DhMarketParticipantGridAreaOverviewComponent { code: { accessor: 'code' }, actor: { accessor: 'actor' }, organization: { accessor: 'organization' }, + type: { accessor: 'type' }, + status: { accessor: 'status' }, }; gridAreas = input([]); isLoading = input(false); hasError = input(false); + gridAreaTypeOptions = dhEnumToWattDropdownOptions(GridAreaType, 'asc', [GridAreaType.NotSet]); + + selectedGridAreaType = signal(null); + readonly dataSource = new WattTableDataSource(); constructor() { effect(() => { - this.dataSource.data = this.gridAreas(); + this.dataSource.data = this.gridAreas()?.filter( + (x) => x.type === this.selectedGridAreaType() || this.selectedGridAreaType() === null + ); }); } @@ -109,16 +137,23 @@ export class DhMarketParticipantGridAreaOverviewComponent { const columnsPath = 'marketParticipant.gridAreas.columns'; + const statusPath = 'marketParticipant.gridAreas.status'; + const typesPath = 'marketParticipant.gridAreas.types'; + const headers = [ `"${translate(columnsPath + '.code')}"`, `"${translate(columnsPath + '.actor')}"`, `"${translate(columnsPath + '.organization')}"`, + `"${translate(columnsPath + '.type')}"`, + `"${translate(columnsPath + '.status')}"`, ]; const lines = dataSorted.map((gridArea) => [ `"${gridArea.code}"`, `"${gridArea.actor}"`, `"${gridArea.organization}"`, + `"${translate(typesPath + '.' + gridArea.type)}"`, + `"${translate(statusPath + '.' + gridArea.status)}"`, ]); exportToCSV({ headers, lines, fileName: 'grid-areas' }); diff --git a/libs/dh/market-participant/grid-areas/shell/src/lib/dh-grid-areas-shell.component.html b/libs/dh/market-participant/grid-areas/shell/src/lib/dh-grid-areas-shell.component.html index 0f91cf10a8..871be31aed 100644 --- a/libs/dh/market-participant/grid-areas/shell/src/lib/dh-grid-areas-shell.component.html +++ b/libs/dh/market-participant/grid-areas/shell/src/lib/dh-grid-areas-shell.component.html @@ -14,8 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. --> + diff --git a/libs/dh/market-participant/grid-areas/shell/src/lib/dh-grid-areas-shell.component.ts b/libs/dh/market-participant/grid-areas/shell/src/lib/dh-grid-areas-shell.component.ts index 4daf0701b8..fa2f2451d9 100644 --- a/libs/dh/market-participant/grid-areas/shell/src/lib/dh-grid-areas-shell.component.ts +++ b/libs/dh/market-participant/grid-areas/shell/src/lib/dh-grid-areas-shell.component.ts @@ -14,45 +14,43 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { Component, inject } from '@angular/core'; +import { Component, computed } from '@angular/core'; + import { - DhMarketParticipantGridAreaOverviewComponent, GridAreaOverviewRow, + DhMarketParticipantGridAreaOverviewComponent, } from '@energinet-datahub/dh/market-participant/grid-areas/overview'; -import { Apollo } from 'apollo-angular'; + +import { query } from '@energinet-datahub/dh/shared/util-apollo'; import { GetGridAreaOverviewDocument } from '@energinet-datahub/dh/shared/domain/graphql'; -import { takeUntilDestroyed } from '@angular/core/rxjs-interop'; @Component({ selector: 'dh-grid-areas-shell', + styles: ` + :host { + display: block; + } + `, templateUrl: './dh-grid-areas-shell.component.html', standalone: true, imports: [DhMarketParticipantGridAreaOverviewComponent], }) export class DhGridAreasShellComponent { private readonly gln = new RegExp('^[0-9]+$'); - private readonly apollo = inject(Apollo); - - getActorsQuery$ = this.apollo.watchQuery({ - query: GetGridAreaOverviewDocument, - }); - - isLoading = false; - hasError = false; - rows: GridAreaOverviewRow[] = []; + getActorsQuery = query(GetGridAreaOverviewDocument); - constructor() { - this.getActorsQuery$.valueChanges.pipe(takeUntilDestroyed()).subscribe((result) => { - this.hasError = !!result.error || !!result.errors?.length; - this.isLoading = result.loading; - this.rows = - result.data?.gridAreaOverview?.map((x) => ({ - code: x.code, - actor: x.actorNumber - ? `${x.actorName} • ${this.gln.test(x.actorNumber) ? 'GLN' : 'EIC'} ${x.actorNumber}` - : '', - organization: x.organizationName ?? '', - })) ?? []; - }); - } + isLoading = this.getActorsQuery.loading; + hasError = computed(() => Boolean(this.getActorsQuery.error())); + rows = computed( + () => + this.getActorsQuery.data()?.gridAreaOverview.map((x) => ({ + code: x.code, + actor: x.actorNumber + ? `${x.actorName} • ${this.gln.test(x.actorNumber) ? 'GLN' : 'EIC'} ${x.actorNumber}` + : '', + organization: x.organizationName ?? '', + status: x.status, + type: x.type, + })) ?? [] + ); } diff --git a/libs/dh/profile/data-access-graphql/project.json b/libs/dh/profile/data-access-graphql/project.json index 9cd39d3087..b8b729e303 100644 --- a/libs/dh/profile/data-access-graphql/project.json +++ b/libs/dh/profile/data-access-graphql/project.json @@ -5,6 +5,7 @@ "sourceRoot": "libs/dh/profile/data-access-graphql", "prefix": "dh", "tags": ["product:dh", "domain:profile", "type:data-access"], + "implicitDependencies": ["api-dh"], "targets": { "lint": { "executor": "@nx/eslint:lint" diff --git a/libs/dh/shared/data-access-graphql/project.json b/libs/dh/shared/data-access-graphql/project.json index 77a5535b50..c5dde04872 100644 --- a/libs/dh/shared/data-access-graphql/project.json +++ b/libs/dh/shared/data-access-graphql/project.json @@ -4,6 +4,7 @@ "projectType": "library", "sourceRoot": "libs/dh/shared/data-access-graphql/src", "prefix": "dh", + "implicitDependencies": ["api-dh"], "targets": { "test": { "executor": "@nx/jest:jest", diff --git a/libs/dh/shared/data-access-mocks/src/lib/data/balance-responsible-agreements.ts b/libs/dh/shared/data-access-mocks/src/lib/data/balance-responsible-agreements.ts index 586ab00a6f..a7bba53784 100644 --- a/libs/dh/shared/data-access-mocks/src/lib/data/balance-responsible-agreements.ts +++ b/libs/dh/shared/data-access-mocks/src/lib/data/balance-responsible-agreements.ts @@ -18,6 +18,8 @@ import { BalanceResponsibilityAgreement, BalanceResponsibilityAgreementStatus, GridAreaDto, + GridAreaStatus, + GridAreaType, MarketParticipantMeteringPointType, PriceAreaCode, } from '@energinet-datahub/dh/shared/domain/graphql'; @@ -32,6 +34,8 @@ const gridArea: GridAreaDto = { validFrom: new Date('2024-03-01T00:00+03:00'), validTo: new Date('2024-03-01T00:00+04:00'), includedInCalculation: true, + status: GridAreaStatus.Active, + type: GridAreaType.Distribution, }; export const balanceResponsibleAgreements: BalanceResponsibilityAgreement[] = [ diff --git a/libs/dh/shared/data-access-mocks/src/lib/data/esett-detailed-exchange-events.ts b/libs/dh/shared/data-access-mocks/src/lib/data/esett-detailed-exchange-events.ts index be92b57f2b..8b7df3142e 100644 --- a/libs/dh/shared/data-access-mocks/src/lib/data/esett-detailed-exchange-events.ts +++ b/libs/dh/shared/data-access-mocks/src/lib/data/esett-detailed-exchange-events.ts @@ -20,6 +20,8 @@ import { EsettOutgoingMessage, EsettTimeSeriesType, PriceAreaCode, + GridAreaType, + GridAreaStatus, } from '@energinet-datahub/dh/shared/domain/graphql'; import dayjs from 'dayjs'; @@ -44,6 +46,8 @@ export const eSettDetailedExchangeEvents: EsettOutgoingMessage[] = [ validTo: null, validFrom: new Date(), includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, calculationType: ExchangeEventCalculationType.Aggregation, documentStatus: DocumentStatus.Accepted, @@ -66,6 +70,8 @@ export const eSettDetailedExchangeEvents: EsettOutgoingMessage[] = [ validTo: null, validFrom: new Date(), includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, calculationType: ExchangeEventCalculationType.Aggregation, documentStatus: DocumentStatus.Rejected, @@ -88,6 +94,8 @@ export const eSettDetailedExchangeEvents: EsettOutgoingMessage[] = [ validTo: null, validFrom: new Date(), includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, calculationType: ExchangeEventCalculationType.Aggregation, documentStatus: DocumentStatus.AwaitingReply, @@ -110,6 +118,8 @@ export const eSettDetailedExchangeEvents: EsettOutgoingMessage[] = [ validTo: null, validFrom: new Date(), includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, calculationType: ExchangeEventCalculationType.BalanceFixing, documentStatus: DocumentStatus.AwaitingReply, diff --git a/libs/dh/shared/data-access-mocks/src/lib/data/esett-exchange-events.ts b/libs/dh/shared/data-access-mocks/src/lib/data/esett-exchange-events.ts index 3167fea5f1..a986e3649e 100644 --- a/libs/dh/shared/data-access-mocks/src/lib/data/esett-exchange-events.ts +++ b/libs/dh/shared/data-access-mocks/src/lib/data/esett-exchange-events.ts @@ -37,6 +37,8 @@ import { ExchangeEventSearchResult, PriceAreaCode, EsettTimeSeriesType, + GridAreaType, + GridAreaStatus, } from '@energinet-datahub/dh/shared/domain/graphql'; export const eSettExchangeEvents: ExchangeEventSearchResult[] = [ @@ -56,6 +58,8 @@ export const eSettExchangeEvents: ExchangeEventSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, calculationType: ExchangeEventCalculationType.Aggregation, gridAreaCodeOut: null, @@ -81,6 +85,8 @@ export const eSettExchangeEvents: ExchangeEventSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, calculationType: ExchangeEventCalculationType.Aggregation, gridAreaCodeOut: '111', @@ -106,6 +112,8 @@ export const eSettExchangeEvents: ExchangeEventSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, calculationType: ExchangeEventCalculationType.Aggregation, gridAreaCodeOut: '222', @@ -131,6 +139,8 @@ export const eSettExchangeEvents: ExchangeEventSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, calculationType: ExchangeEventCalculationType.BalanceFixing, gridAreaCodeOut: '333', @@ -156,6 +166,8 @@ export const eSettExchangeEvents: ExchangeEventSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, calculationType: ExchangeEventCalculationType.BalanceFixing, gridAreaCodeOut: '333', @@ -181,6 +193,8 @@ export const eSettExchangeEvents: ExchangeEventSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, calculationType: ExchangeEventCalculationType.BalanceFixing, gridAreaCodeOut: '333', diff --git a/libs/dh/shared/data-access-mocks/src/lib/data/esett/mga-imbalance-search-response-query.ts b/libs/dh/shared/data-access-mocks/src/lib/data/esett/mga-imbalance-search-response-query.ts index 1f39eab53f..6cdbfad93b 100644 --- a/libs/dh/shared/data-access-mocks/src/lib/data/esett/mga-imbalance-search-response-query.ts +++ b/libs/dh/shared/data-access-mocks/src/lib/data/esett/mga-imbalance-search-response-query.ts @@ -33,6 +33,8 @@ */ import { GetMeteringGridAreaImbalanceQuery, + GridAreaStatus, + GridAreaType, MeteringGridAreaImbalanceSearchResult, PriceAreaCode, } from '@energinet-datahub/dh/shared/domain/graphql'; @@ -55,6 +57,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-19T09:03:20.000Z'), receivedDateTime: new Date('2024-02-19T09:05:19.415Z'), @@ -153,6 +157,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-19T09:03:20.000Z'), receivedDateTime: new Date('2024-02-19T09:05:19.415Z'), @@ -254,6 +260,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-19T06:11:01.000Z'), receivedDateTime: new Date('2024-02-19T06:11:15.166Z'), @@ -359,6 +367,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-19T06:11:01.000Z'), receivedDateTime: new Date('2024-02-19T06:11:15.166Z'), @@ -464,6 +474,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-18T09:04:20.000Z'), receivedDateTime: new Date('2024-02-18T09:05:45.274Z'), @@ -562,6 +574,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-18T09:04:20.000Z'), receivedDateTime: new Date('2024-02-18T09:05:45.274Z'), @@ -660,6 +674,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-18T06:11:56.000Z'), receivedDateTime: new Date('2024-02-18T06:12:10.384Z'), @@ -765,6 +781,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-18T06:11:56.000Z'), receivedDateTime: new Date('2024-02-18T06:12:10.384Z'), @@ -870,6 +888,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-17T09:05:54.000Z'), receivedDateTime: new Date('2024-02-17T09:06:59.176Z'), @@ -968,6 +988,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-17T09:05:54.000Z'), receivedDateTime: new Date('2024-02-17T09:06:59.176Z'), @@ -1066,6 +1088,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-17T06:11:51.000Z'), receivedDateTime: new Date('2024-02-17T06:12:06.802Z'), @@ -1171,6 +1195,8 @@ const mgaImbalanceSearchResult: MeteringGridAreaImbalanceSearchResult[] = [ validFrom: new Date('2020-01-01T00:00:00.000Z'), __typename: 'GridAreaDto', includedInCalculation: true, + type: GridAreaType.Distribution, + status: GridAreaStatus.Active, }, documentDateTime: new Date('2024-02-17T06:11:51.000Z'), receivedDateTime: new Date('2024-02-17T06:12:06.802Z'), diff --git a/libs/dh/shared/data-access-mocks/src/lib/data/get-grid-area-overview.ts b/libs/dh/shared/data-access-mocks/src/lib/data/get-grid-area-overview.ts index 97fdfddb2a..cc2576f744 100644 --- a/libs/dh/shared/data-access-mocks/src/lib/data/get-grid-area-overview.ts +++ b/libs/dh/shared/data-access-mocks/src/lib/data/get-grid-area-overview.ts @@ -14,7 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { GetGridAreaOverviewQuery } from '@energinet-datahub/dh/shared/domain/graphql'; +import { + GetGridAreaOverviewQuery, + GridAreaStatus, + GridAreaType, + PriceAreaCode, +} from '@energinet-datahub/dh/shared/domain/graphql'; export const getGridAreaOverviewMock: GetGridAreaOverviewQuery = { __typename: 'Query', @@ -24,78 +29,90 @@ export const getGridAreaOverviewMock: GetGridAreaOverviewQuery = { code: '003', id: '3', name: 'Grid Area 3', - priceAreaCode: 'DK1', + priceAreaCode: PriceAreaCode.Dk1, actorName: 'Actor 3', actorNumber: '123456783', organizationName: 'Org 3', validFrom: new Date('2021-08-15T12:30:00'), validTo: null, fullFlexDate: new Date('2021-08-16T12:30:00'), + status: GridAreaStatus.Active, + type: GridAreaType.Distribution, }, { __typename: 'GridAreaOverviewItemDto', code: '001', id: '1', name: 'Grid Area 1', - priceAreaCode: 'DK1', + priceAreaCode: PriceAreaCode.Dk1, actorName: 'Actor 1', actorNumber: '123456781', organizationName: 'Org 1', validFrom: new Date('2021-08-17T12:30:00'), validTo: null, fullFlexDate: new Date('2021-08-18T12:30:00'), + status: GridAreaStatus.Archived, + type: GridAreaType.Aboard, }, { __typename: 'GridAreaOverviewItemDto', code: '002', id: '2', name: 'Grid Area 1', - priceAreaCode: 'DK1', + priceAreaCode: PriceAreaCode.Dk1, actorName: 'Actor 2', actorNumber: '123456782', organizationName: 'Org 2', validFrom: new Date('2021-08-14T12:30:00'), validTo: null, fullFlexDate: new Date('2021-08-14T12:30:00'), + status: GridAreaStatus.Created, + type: GridAreaType.GridLossAbroad, }, { __typename: 'GridAreaOverviewItemDto', code: '004', id: '4', name: 'Grid Area 4', - priceAreaCode: 'DK1', + priceAreaCode: PriceAreaCode.Dk1, actorName: 'Actor 4', actorNumber: '123456784', organizationName: 'Org 4', validFrom: new Date('2021-08-15T12:30:00'), validTo: null, fullFlexDate: new Date('2021-08-16T12:30:00'), + status: GridAreaStatus.Expired, + type: GridAreaType.Other, }, { __typename: 'GridAreaOverviewItemDto', code: '005', id: '5', name: 'Grid Area 5', - priceAreaCode: 'DK1', + priceAreaCode: PriceAreaCode.Dk1, actorName: 'Actor 5', actorNumber: '123456785', organizationName: 'Org 5', validFrom: new Date('2021-08-17T12:30:00'), validTo: null, fullFlexDate: new Date('2021-08-18T12:30:00'), + status: GridAreaStatus.Active, + type: GridAreaType.Transmission, }, { __typename: 'GridAreaOverviewItemDto', code: '006', id: '6', name: 'Grid Area 6', - priceAreaCode: 'DK1', + priceAreaCode: PriceAreaCode.Dk1, actorName: 'Actor 6', actorNumber: '123456786', organizationName: 'Org 6', validFrom: new Date('2021-08-19T12:30:00'), validTo: null, fullFlexDate: new Date('2021-08-20T12:30:00'), + status: GridAreaStatus.Active, + type: GridAreaType.GridLossDk, }, ], }; diff --git a/libs/dh/shared/data-access-mocks/src/lib/wholesale.ts b/libs/dh/shared/data-access-mocks/src/lib/wholesale.ts index e5f6b6b1f2..41e570087a 100644 --- a/libs/dh/shared/data-access-mocks/src/lib/wholesale.ts +++ b/libs/dh/shared/data-access-mocks/src/lib/wholesale.ts @@ -41,6 +41,8 @@ import { CalculationProgressStep, ProgressStatus, CalculationExecutionType, + GridAreaStatus, + GridAreaType, } from '@energinet-datahub/dh/shared/domain/graphql'; import { mockRequestCalculationMutation } from '@energinet-datahub/dh/shared/domain/graphql'; @@ -114,6 +116,8 @@ export const mockedGridAreas: GridAreaDto[] = [ priceAreaCode: PriceAreaCode.Dk1, validFrom, validTo: null, + status: GridAreaStatus.Active, + type: GridAreaType.Distribution, includedInCalculation: true, }, { @@ -123,6 +127,8 @@ export const mockedGridAreas: GridAreaDto[] = [ name: 'hello again', displayName: '002 • hello again', priceAreaCode: PriceAreaCode.Dk1, + status: GridAreaStatus.Created, + type: GridAreaType.GridLossDk, validFrom, validTo: null, includedInCalculation: false, diff --git a/libs/dh/wholesale/data-access-graphql/project.json b/libs/dh/wholesale/data-access-graphql/project.json index 0797893f9e..a4e6c844fa 100644 --- a/libs/dh/wholesale/data-access-graphql/project.json +++ b/libs/dh/wholesale/data-access-graphql/project.json @@ -5,6 +5,7 @@ "sourceRoot": "libs/dh/wholesale/data-access-graphql", "prefix": "dh", "tags": ["product:dh", "domain:wholesale", "type:data-access"], + "implicitDependencies": ["api-dh"], "targets": { "lint": { "executor": "@nx/eslint:lint"