Update ExchangeRateService
All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 5m25s

This commit is contained in:
Leandro Hernan Rojas 2025-05-08 08:55:54 -03:00
parent 65fb465b63
commit 9db1452387
4 changed files with 15 additions and 3 deletions

View File

@ -2,9 +2,9 @@
@using System.Globalization; @using System.Globalization;
@using System.Net.Http.Json @using System.Net.Http.Json
@using Blazored.Typeahead @using Blazored.Typeahead
@using Core.Interfaces
@using Services.Lookups @using Services.Lookups
@using phronCare.UIBlazor.Pages.Sales.Modals @using phronCare.UIBlazor.Pages.Sales.Modals
@using phronCare.UIBlazor.Services.Integrations
@using phronCare.UIBlazor.Services.Sales.Quotes @using phronCare.UIBlazor.Services.Sales.Quotes
@inject ISalesLookupService SalesLookupService @inject ISalesLookupService SalesLookupService
@ -12,7 +12,7 @@
@inject IToastService toastService @inject IToastService toastService
@inject NavigationManager Navigation @inject NavigationManager Navigation
@inject IModalService Modal @inject IModalService Modal
@inject IExchangeRateDom ExchangeRateService @inject IExchangeRateService ExchangeRateService
<EditForm Model="_quoteModel" > <EditForm Model="_quoteModel" >
<div class="container mt-4" style="zoom:0.8;"> <div class="container mt-4" style="zoom:0.8;">

View File

@ -54,6 +54,8 @@ await builder.Build().RunAsync();
static void InjectDependencies(WebAssemblyHostBuilder builder) static void InjectDependencies(WebAssemblyHostBuilder builder)
{ {
builder.Services.AddScoped<ISalesLookupService, SalesLookupService>(); builder.Services.AddScoped<ISalesLookupService, SalesLookupService>();
builder.Services.AddScoped<IExchangeRateService, ExchangeRateService>();
builder.Services.AddScoped<IQuoteService,QuoteService>(); builder.Services.AddScoped<IQuoteService,QuoteService>();
builder.Services.AddScoped<ExchangeRateService>(); builder.Services.AddScoped<ExchangeRateService>();

View File

@ -4,7 +4,7 @@ using System.Net.Http.Json;
namespace phronCare.UIBlazor.Services.Integrations namespace phronCare.UIBlazor.Services.Integrations
{ {
public class ExchangeRateService public class ExchangeRateService: IExchangeRateService
{ {
private readonly HttpClient _http; private readonly HttpClient _http;

View File

@ -0,0 +1,10 @@
using Domain.Entities;
namespace phronCare.UIBlazor.Services.Integrations
{
public interface IExchangeRateService
{
Task<EExchangeRateHistory?> GetByDateAsync(DateOnly date);
Task<EExchangeRateHistory> GetYesterdayRateAsync();
}
}