From 0ac35a1f105bf7dc9de01b702e8d42de17f4cab7 Mon Sep 17 00:00:00 2001 From: Frede Hundewadt Date: Fri, 10 Feb 2023 17:54:03 +0100 Subject: [PATCH] WIP: office reorder customer products --- .../HttpRepository/CountryCustomerHistoryRepository.cs | 6 +++--- .../OfficeCustomerInventoryReorderOverlay.razor.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Wonky.Client/HttpRepository/CountryCustomerHistoryRepository.cs b/Wonky.Client/HttpRepository/CountryCustomerHistoryRepository.cs index d6726060..141f9724 100644 --- a/Wonky.Client/HttpRepository/CountryCustomerHistoryRepository.cs +++ b/Wonky.Client/HttpRepository/CountryCustomerHistoryRepository.cs @@ -91,7 +91,7 @@ public class CountryCustomerHistoryRepository : ICountryCustomerHistoryRepositor /// public async Task> FetchInventory(string countryCode, string companyId) { - var response = await _client.GetAsync($"{_api.OfficeCustomers}/{countryCode}/{companyId}/{_api.CrmInventoryExt}"); + var response = await _client.GetAsync($"{_api.OfficeCustomers}/{countryCode}/{companyId}/history/inventory"); if (!response.IsSuccessStatusCode) return new List(); var content = await response.Content.ReadAsStringAsync(); @@ -108,7 +108,7 @@ public class CountryCustomerHistoryRepository : ICountryCustomerHistoryRepositor /// public async Task> FetchHistory(string countryCode, string companyId) { - var response = await _client.GetAsync($"{_api.OfficeCustomers}/{countryCode}/{companyId}/{_api.CrmProductExt}"); + var response = await _client.GetAsync($"{_api.OfficeCustomers}/{countryCode}/{companyId}/history/products"); if (!response.IsSuccessStatusCode) return new List(); @@ -127,7 +127,7 @@ public class CountryCustomerHistoryRepository : ICountryCustomerHistoryRepositor /// public async Task> FetchHistory(string countryCode, string companyId, string sku) { - var response = await _client.GetAsync($"{_api.OfficeCustomers}/{countryCode}/{companyId}/{_api.CrmProductExt}/{sku}"); + var response = await _client.GetAsync($"{_api.OfficeCustomers}/{countryCode}/{companyId}/history/products/{sku}"); if (!response.IsSuccessStatusCode) return new List(); var content = await response.Content.ReadAsStringAsync(); diff --git a/Wonky.Client/OverlayOffice/OfficeCustomerInventoryReorderOverlay.razor.cs b/Wonky.Client/OverlayOffice/OfficeCustomerInventoryReorderOverlay.razor.cs index 893b475d..5f79f146 100644 --- a/Wonky.Client/OverlayOffice/OfficeCustomerInventoryReorderOverlay.razor.cs +++ b/Wonky.Client/OverlayOffice/OfficeCustomerInventoryReorderOverlay.razor.cs @@ -27,7 +27,7 @@ public partial class OfficeCustomerInventoryReorderOverlay { [Parameter] public string CompanyId { get; set; } = ""; [Parameter] public SalesItemView SalesItem { get; set; } = new(); - [Inject] private IAdvisorCustomerHistoryRepository HistoryRepo { get; set; } + [Inject] public ICountryCustomerHistoryRepository HistoryRepo { get; set; } [Parameter] public EventCallback OnSelected { get; set; } private List? History { get; set; } = new(); private DraftItem SelectedItem { get; set; } = new();