feat: add GetAvailableWeeks query and update protobuf imports
All checks were successful
Build and Deploy / build (push) Successful in 2m18s
All checks were successful
Build and Deploy / build (push) Successful in 2m18s
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
using MediatR;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Commands.ApproveManualPayment;
|
||||
|
||||
public class ApproveManualPaymentCommand : IRequest<bool>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using BackOffice.BFF.Application.Common.Interfaces;
|
||||
using BackOffice.BFF.ManualPayment.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
using MediatR;
|
||||
using CMSMicroservice.Protobuf.Protos.ManualPayment;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Commands.ApproveManualPayment;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Commands.ApproveManualPayment;
|
||||
|
||||
public class ApproveManualPaymentCommandValidator : AbstractValidator<ApproveManualPaymentCommand>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using MediatR;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Commands.CreateManualPayment;
|
||||
|
||||
public class CreateManualPaymentCommand : IRequest<CreateManualPaymentResponseDto>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using BackOffice.BFF.Application.Common.Interfaces;
|
||||
using BackOffice.BFF.ManualPayment.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
using MediatR;
|
||||
using CMSMicroservice.Protobuf.Protos.ManualPayment;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Commands.CreateManualPayment;
|
||||
@@ -31,7 +28,7 @@ public class CreateManualPaymentCommandHandler : IRequestHandler<CreateManualPay
|
||||
{
|
||||
UserId = request.UserId,
|
||||
Amount = request.Amount,
|
||||
Type = request.Type,
|
||||
Type = (ManualPaymentType)request.Type,
|
||||
Description = request.Description
|
||||
};
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Commands.CreateManualPayment;
|
||||
|
||||
public class CreateManualPaymentCommandValidator : AbstractValidator<CreateManualPaymentCommand>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using MediatR;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Commands.RejectManualPayment;
|
||||
|
||||
public class RejectManualPaymentCommand : IRequest<bool>
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using BackOffice.BFF.Application.Common.Interfaces;
|
||||
using BackOffice.BFF.ManualPayment.Protobuf;
|
||||
using MediatR;
|
||||
using CMSMicroservice.Protobuf.Protos.ManualPayment;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Commands.RejectManualPayment;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using FluentValidation;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Commands.RejectManualPayment;
|
||||
|
||||
public class RejectManualPaymentCommandValidator : AbstractValidator<RejectManualPaymentCommand>
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using MediatR;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Queries.GetManualPayments;
|
||||
|
||||
public class GetManualPaymentsQuery : IRequest<GetManualPaymentsResponseDto>
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
using BackOffice.BFF.Application.Common.Interfaces;
|
||||
using BackOffice.BFF.Application.Common.Models;
|
||||
using BackOffice.BFF.ManualPayment.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
using MediatR;
|
||||
using CMSMicroservice.Protobuf.Protos.ManualPayment;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Queries.GetManualPayments;
|
||||
@@ -29,7 +26,7 @@ public class GetManualPaymentsQueryHandler : IRequestHandler<GetManualPaymentsQu
|
||||
request.Status,
|
||||
request.Type);
|
||||
|
||||
var grpcRequest = new GetManualPaymentsRequest
|
||||
var grpcRequest = new GetAllManualPaymentsRequest
|
||||
{
|
||||
PageNumber = request.PageNumber,
|
||||
PageSize = request.PageSize,
|
||||
@@ -38,7 +35,7 @@ public class GetManualPaymentsQueryHandler : IRequestHandler<GetManualPaymentsQu
|
||||
Type = request.Type
|
||||
};
|
||||
|
||||
var response = await _context.ManualPayments.GetManualPaymentsAsync(grpcRequest, cancellationToken: cancellationToken);
|
||||
var response = await _context.ManualPayments.GetAllManualPaymentsAsync(grpcRequest, cancellationToken: cancellationToken);
|
||||
|
||||
var meta = response.MetaData;
|
||||
|
||||
@@ -50,11 +47,11 @@ public class GetManualPaymentsQueryHandler : IRequestHandler<GetManualPaymentsQu
|
||||
UserFullName = m.UserFullName,
|
||||
UserMobile = m.UserMobile,
|
||||
Amount = m.Amount,
|
||||
Type = m.Type,
|
||||
Type = m.Type.GetHashCode(),
|
||||
TypeDisplay = m.TypeDisplay,
|
||||
Description = m.Description,
|
||||
ReferenceNumber = m.ReferenceNumber,
|
||||
Status = m.Status,
|
||||
Status = m.Status.GetHashCode(),
|
||||
StatusDisplay = m.StatusDisplay,
|
||||
RequestedBy = m.RequestedBy,
|
||||
RequestedByName = m.RequestedByName,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
using BackOffice.BFF.Application.Common.Models;
|
||||
|
||||
namespace BackOffice.BFF.Application.ManualPaymentCQ.Queries.GetManualPayments;
|
||||
|
||||
public class GetManualPaymentsResponseDto
|
||||
|
||||
Reference in New Issue
Block a user