Compare commits

..

No commits in common. "bb764b4d125f574fbbd66658369834bc79bea4db" and "228403bac616fa19cb4334d763b06a3822e53626" have entirely different histories.

3 changed files with 0 additions and 64 deletions

View File

@ -7,7 +7,6 @@ using phronCare.UIBlazor;
using phronCare.UIBlazor.Services.Authorization;
using phronCare.UIBlazor.Services.Integrations;
using phronCare.UIBlazor.Services.Lookups;
using phronCare.UIBlazor.Services.Sales.DeliveryNotes;
using phronCare.UIBlazor.Services.Sales;
using phronCare.UIBlazor.Services.Sales.Quotes;
using phronCare.UIBlazor.Services.Stock;
@ -57,7 +56,6 @@ static void InjectDependencies(WebAssemblyHostBuilder builder)
builder.Services.AddScoped<IStockScanService, StockScanService>();
builder.Services.AddScoped<IExpeditionService, ExpeditionService>();
builder.Services.AddScoped<IQuoteService,QuoteService>();
builder.Services.AddScoped<IDeliveryNoteService, DeliveryNoteService>();
builder.Services.AddScoped<ExchangeRateService>();
builder.Services.AddScoped<TicketsService>();

View File

@ -1,51 +0,0 @@
using Domain.Dtos.Sales;
using System.Net.Http.Json;
namespace phronCare.UIBlazor.Services.Sales.DeliveryNotes
{
public class DeliveryNoteService : IDeliveryNoteService
{
private readonly HttpClient _http;
public DeliveryNoteService(HttpClient http)
{
_http = http;
}
public async Task<DeliveryNoteDto?> GetByIdAsync(int id)
{
try
{
return await _http.GetFromJsonAsync<DeliveryNoteDto>($"/api/deliverynote/{id}");
}
catch
{
return null;
}
}
public async Task<DeliveryNoteDto?> GetByDeliveryNoteNumberAsync(string deliveryNoteNumber)
{
try
{
return await _http.GetFromJsonAsync<DeliveryNoteDto>($"/api/deliverynote/number/{Uri.EscapeDataString(deliveryNoteNumber)}");
}
catch
{
return null;
}
}
public async Task<IEnumerable<DeliveryNoteDto>> GetByQuoteIdAsync(int quoteId)
{
try
{
return await _http.GetFromJsonAsync<IEnumerable<DeliveryNoteDto>>($"/api/deliverynote/by-quote/{quoteId}") ?? Enumerable.Empty<DeliveryNoteDto>();
}
catch
{
return Enumerable.Empty<DeliveryNoteDto>();
}
}
}
}

View File

@ -1,11 +0,0 @@
using Domain.Dtos.Sales;
namespace phronCare.UIBlazor.Services.Sales.DeliveryNotes
{
public interface IDeliveryNoteService
{
Task<DeliveryNoteDto?> GetByIdAsync(int id);
Task<DeliveryNoteDto?> GetByDeliveryNoteNumberAsync(string deliveryNoteNumber);
Task<IEnumerable<DeliveryNoteDto>> GetByQuoteIdAsync(int quoteId);
}
}