-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move logic to bff and remove unused files (#955)
* move logic to bff and remove unused files * rename file * feat: Add successful and failed API delegations to ConfirmationPage The code changes in this commit add the functionality to display successful and failed API delegations on the ConfirmationPage. This is achieved by filtering the data received from the API and storing the successful and failed delegations separately. The color of the page is also updated based on the presence of failed or successful delegations. * Update property names in ApiDelegationOutput and ApiDelegationResult * Refactor APIDelegationController endpoint to support multiple third party organizations * Refactor APIDelegationController endpoint to support multiple third party organizations * Add batch delegation api test * remove unused setting * Refactor API delegation endpoint to remove unnecessary message property * Refactor API delegation endpoint to remove unnecessary message property * Refactor test * chore: Remove logging of exception in APIDelegationController * Refactor useTranslation hook in ConfirmationPage component * chore: Remove exception logging in APIDelegationController * chore: Refactor APIDelegationController to remove unnecessary exception logging and merge conflicts * chore: Handle exception in CreateMaskinportenDelegationBatch endpoint
- Loading branch information
Showing
27 changed files
with
519 additions
and
412 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
...cessManagement.UI/Altinn.AccessManagement.UI.Core/Models/Delegation/ApiDelegationInput.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,20 @@ | ||
using System.ComponentModel.DataAnnotations; | ||
|
||
namespace Altinn.AccessManagement.UI.Core.Models | ||
{ | ||
/// <summary> | ||
/// Model for performing a delegation of one or more rights to one or more recipients. | ||
/// </summary> | ||
public class ApiDelegationInput | ||
{ | ||
/// <summary> | ||
/// Gets or sets the list of organization numbers. This field is required. | ||
/// </summary> | ||
public List<string> OrgNumbers { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the list of API identifiers. This field is required. | ||
/// </summary> | ||
public List<string> ApiIdentifiers { get; set; } | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
...essManagement.UI/Altinn.AccessManagement.UI.Core/Models/Delegation/ApiDelegationOutput.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,25 @@ | ||
using Altinn.AccessManagement.UI.Core.Models.SingleRight; | ||
|
||
namespace Altinn.AccessManagement.UI.Core.Models | ||
{ | ||
/// <summary> | ||
/// Response model for the result of a api-delegation to a recipient. | ||
/// </summary> | ||
public class ApiDelegationOutput | ||
{ | ||
/// <summary> | ||
/// Gets or sets the organization identifier. | ||
/// </summary> | ||
public string OrgNumber { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the API identifier. | ||
/// </summary> | ||
public string ApiId { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets a value indicating whether the operation was successful. | ||
/// </summary> | ||
public bool Success { get; set; } | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
...nagement.UI.Mocks/Data/MaskinportenSchema/Delegation/batch-delegation-mixed-response.json
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,22 @@ | ||
[ | ||
{ | ||
"orgNumber": "810418362", | ||
"apiId": "appid-402", | ||
"success": true | ||
}, | ||
{ | ||
"orgNumber": "123456789", | ||
"apiId": "appid-402", | ||
"success": true | ||
}, | ||
{ | ||
"orgNumber": "123456789", | ||
"apiId": "invalid_org_id", | ||
"success": false | ||
}, | ||
{ | ||
"orgNumber": "810418362", | ||
"apiId": "invalid_org_id", | ||
"success": false | ||
} | ||
] |
22 changes: 22 additions & 0 deletions
22
...cessManagement.UI.Mocks/Data/MaskinportenSchema/Delegation/batch-delegation-response.json
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,22 @@ | ||
[ | ||
{ | ||
"orgNumber": "810418362", | ||
"apiId": "appid-402", | ||
"success": true | ||
}, | ||
{ | ||
"orgNumber": "810418362", | ||
"apiId": "appid-400", | ||
"success": true | ||
}, | ||
{ | ||
"orgNumber": "810418532", | ||
"apiId": "appid-402", | ||
"success": true | ||
}, | ||
{ | ||
"orgNumber": "810418532", | ||
"apiId": "appid-400", | ||
"success": true | ||
} | ||
] |
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
4 changes: 4 additions & 0 deletions
4
...cessManagement.UI.Tests/Data/RequestInputs/MaskinportenSchema/Delegation/Input_Batch.json
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,4 @@ | ||
{ | ||
"apiIdentifiers": ["appid-402", "appid-400"], | ||
"orgNumbers": ["810418362", "810418532"] | ||
} |
4 changes: 4 additions & 0 deletions
4
...gement.UI.Tests/Data/RequestInputs/MaskinportenSchema/Delegation/Input_Batch_Invalid.json
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,4 @@ | ||
{ | ||
"apiIdentifiers": ["appid-402", "invalid_org_id"], | ||
"orgNumbers": ["810418362", "123456789"] | ||
} |
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.