-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Show table * Added routing to components and refactored edit * Refactored to watt data table * chore: add license * poke * Schema * No need for page component * Refactor and PR feedback * chore: add license * poke --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d2c6526
commit 32e8348
Showing
20 changed files
with
542 additions
and
506 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
.../dh/api-dh/source/DataHub.WebApi/GraphQL/Types/Permission/FilteredPermissionsExtension.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// 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.Permission; | ||
|
||
[ExtendObjectType("FilteredPermissionsConnection")] | ||
public class FilteredPermissionsExtension | ||
{ | ||
public string? GetPermissionRelationsUrl( | ||
[Service] IHttpContextAccessor httpContextAccessor, | ||
[Service] LinkGenerator linkGenerator) => | ||
linkGenerator.GetUriByAction( | ||
httpContextAccessor.HttpContext!, | ||
"GetPermissionRelations", | ||
"MarketParticipantPermissions"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
libs/dh/admin/data-access-api/src/lib/types/permission.type.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
//#region License | ||
/** | ||
* @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. | ||
*/ | ||
//#endregion | ||
/** | ||
* @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 type { ResultOf } from '@graphql-typed-document-node/core'; | ||
|
||
import { | ||
GetFilteredPermissionsDocument, | ||
GetPermissionDetailsDocument, | ||
} from '@energinet-datahub/dh/shared/domain/graphql'; | ||
|
||
export type Permissions = NonNullable< | ||
ResultOf<typeof GetFilteredPermissionsDocument>['filteredPermissions'] | ||
>['nodes']; | ||
|
||
export type Permission = NonNullable<Permissions>[0]; | ||
|
||
export type DhPermissionDetailsUserRole = ResultOf< | ||
typeof GetPermissionDetailsDocument | ||
>['permissionById']['userRoles'][0]; | ||
|
||
export type DhPermissionDetailsMarketRole = ResultOf< | ||
typeof GetPermissionDetailsDocument | ||
>['permissionById']['assignableTo'][number]; |
29 changes: 29 additions & 0 deletions
29
libs/dh/admin/data-access-graphql/query/get-filtered-permissons.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
query GetFilteredPermissions( | ||
$after: String | ||
$before: String | ||
$first: Int | ||
$last: Int | ||
$filter: String | ||
$order: [PermissionDtoSortInput!] | ||
) { | ||
filteredPermissions( | ||
after: $after | ||
before: $before | ||
first: $first | ||
last: $last | ||
order: $order | ||
filter: $filter | ||
) { | ||
pageInfo { | ||
startCursor | ||
endCursor | ||
} | ||
permissionRelationsUrl | ||
nodes { | ||
id | ||
name | ||
description | ||
} | ||
totalCount | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.