Implement pricing management functionality and update related components
- Added new endpoints for managing global pricing settings, including retrieval and updates for `PricePerConfigPerQuarter` and `PricePerConfigPerYear`. - Updated `RoleService` and related commands to remove pricing fields from role management, ensuring a clear separation between role configurations and global pricing. - Enhanced the `FactoryResetCommandHandler` to include seeding of pricing settings during a factory reset. - Modified frontend components to support new pricing settings, including forms for creating and updating pricing information. - Updated API documentation to reflect changes in pricing management endpoints and their expected request/response formats. - Adjusted tests to ensure proper coverage for new pricing functionalities and their integration with existing role management features.
This commit is contained in:
+2
-4
@@ -27,7 +27,7 @@ public class ApproveRoleRequestCommandHandlerTests
|
||||
|
||||
var newRoleId = Guid.NewGuid();
|
||||
_roleService
|
||||
.CreateRoleAsync("premium", 10, 5, null, null, Arg.Any<CancellationToken>())
|
||||
.CreateRoleAsync("premium", 10, 5, Arg.Any<CancellationToken>())
|
||||
.Returns(Result.Success(new RoleDto(newRoleId, "premium", 10, 5, false)));
|
||||
_roleService
|
||||
.ChangeUserRoleAsync(userId, newRoleId, Arg.Any<CancellationToken>())
|
||||
@@ -51,7 +51,7 @@ public class ApproveRoleRequestCommandHandlerTests
|
||||
Assert.Equal(TicketStatus.Resolved, ticket.Status);
|
||||
await _roleService
|
||||
.Received(1)
|
||||
.CreateRoleAsync("premium", 10, 5, null, null, Arg.Any<CancellationToken>());
|
||||
.CreateRoleAsync("premium", 10, 5, Arg.Any<CancellationToken>());
|
||||
await _roleService
|
||||
.Received(1)
|
||||
.ChangeUserRoleAsync(userId, newRoleId, Arg.Any<CancellationToken>());
|
||||
@@ -100,8 +100,6 @@ public class ApproveRoleRequestCommandHandlerTests
|
||||
Arg.Any<string>(),
|
||||
Arg.Any<int>(),
|
||||
Arg.Any<int>(),
|
||||
Arg.Any<int?>(),
|
||||
Arg.Any<int?>(),
|
||||
Arg.Any<CancellationToken>()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user