WIP
This commit is contained in:
parent
96134e804d
commit
c5ce40b48e
3 changed files with 11 additions and 84 deletions
|
@ -19,15 +19,6 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
private readonly IAdvisorCustomerHistoryRepository _historyRepo;
|
||||
private readonly ICountryCatalogRepository _catalogRepo;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="logger"></param>
|
||||
/// <param name="asyncStorageService"></param>
|
||||
/// <param name="catalogRepo"></param>
|
||||
/// <param name="historyRepo"></param>
|
||||
/// <param name="customerRepo"></param>
|
||||
/// <param name="activityRepo"></param>
|
||||
public CabinetDrawerService(
|
||||
ILogger<CabinetDrawerService> logger,
|
||||
ILocalStorageService asyncStorageService,
|
||||
|
@ -44,12 +35,7 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
_activityRepo = activityRepo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Activity
|
||||
/// </summary>
|
||||
/// <param name="companyId"></param>
|
||||
/// <param name="force"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public async Task<ActivityDrawer> GetActivityDrawerAsync(string companyId, bool force = false)
|
||||
{
|
||||
var drawer = await _asyncStorageService
|
||||
|
@ -66,13 +52,7 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
return drawer ?? new ActivityDrawer();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Sales Catalog
|
||||
/// </summary>
|
||||
/// <param name="countryCode"></param>
|
||||
/// <param name="force"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public async Task<CatalogDrawer> GetCatalogDrawerAsync(string countryCode, bool force = false)
|
||||
{
|
||||
var drawer = await _asyncStorageService
|
||||
|
@ -90,13 +70,7 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
return drawer ?? new CatalogDrawer();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Company Info
|
||||
/// </summary>
|
||||
/// <param name="companyId"></param>
|
||||
/// <param name="force"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public async Task<InfoDrawer> GetInfoDrawerAsync(string companyId, bool force = false)
|
||||
{
|
||||
var drawer = await _asyncStorageService
|
||||
|
@ -115,12 +89,6 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Inventory
|
||||
/// </summary>
|
||||
/// <param name="companyId"></param>
|
||||
/// <param name="force"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<InventoryDrawer> GetInventoryDrawerAsync(string companyId, bool force = false)
|
||||
{
|
||||
var drawer = await _asyncStorageService
|
||||
|
@ -139,12 +107,6 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Invoices
|
||||
/// </summary>
|
||||
/// <param name="companyId"></param>
|
||||
/// <param name="force"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<InvoiceDrawer> GetInvoiceDrawerAsync(string companyId, bool force = false)
|
||||
{
|
||||
var drawer = await _asyncStorageService
|
||||
|
@ -161,13 +123,7 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
return drawer ?? new InvoiceDrawer();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Statistic (invoice lines)
|
||||
/// </summary>
|
||||
/// <param name="companyId"></param>
|
||||
/// <param name="force"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
public async Task<StatisticDrawer> GetStatisticDrawerAsync(string companyId, bool force = false)
|
||||
{
|
||||
var drawer = await _asyncStorageService
|
||||
|
@ -194,12 +150,7 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
return drawer ?? new StatisticDrawer();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Store Activity
|
||||
/// </summary>
|
||||
/// <param name="companyId"></param>
|
||||
/// <param name="drawer"></param>
|
||||
|
||||
public async Task StoreActivityDrawerAsync(string companyId, ActivityDrawer drawer)
|
||||
{
|
||||
if (drawer.Content.Any())
|
||||
|
@ -211,33 +162,18 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Store Sales Catalog
|
||||
/// </summary>
|
||||
/// <param name="countryCode"></param>
|
||||
/// <param name="drawer"></param>
|
||||
public async Task StoreCatalogDrawerAsync(string countryCode, CatalogDrawer drawer)
|
||||
{
|
||||
await _asyncStorageService.SetItemAsync($"{countryCode}.{CatalogDrawer.Label}", drawer);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Store Company Info
|
||||
/// </summary>
|
||||
/// <param name="companyId"></param>
|
||||
/// <param name="drawer"></param>
|
||||
public async Task StoreInfoDrawerAsync(string companyId, InfoDrawer drawer)
|
||||
{
|
||||
await _asyncStorageService.SetItemAsync($"{companyId}.{InfoDrawer.Label}", drawer);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Store Inventory
|
||||
/// </summary>
|
||||
/// <param name="companyId"></param>
|
||||
/// <param name="drawer"></param>
|
||||
public async Task StoreInventoryDrawerAsync(string companyId, InventoryDrawer drawer)
|
||||
{
|
||||
if (drawer.Content.Any())
|
||||
|
@ -249,11 +185,6 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Store Invoices
|
||||
/// </summary>
|
||||
/// <param name="companyId"></param>
|
||||
/// <param name="drawer"></param>
|
||||
public async Task StoreInvoiceDrawerAsync(string companyId, InvoiceDrawer drawer)
|
||||
{
|
||||
if (drawer.Content.Any())
|
||||
|
@ -265,11 +196,6 @@ public class CabinetDrawerService : ICabinetDrawerService
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Store statistic (invoice lines)
|
||||
/// </summary>
|
||||
/// <param name="companyId"></param>
|
||||
/// <param name="drawer"></param>
|
||||
public async Task StoreStatisticDrawerAsync(string companyId, StatisticDrawer drawer)
|
||||
{
|
||||
if (drawer.Content.Any())
|
||||
|
|
|
@ -102,6 +102,7 @@ public partial class AdvisorCustomerInventoryListPage : IDisposable
|
|||
{
|
||||
Inventory = drawer.Content;
|
||||
}
|
||||
Logger.LogDebug("{}",JsonSerializer.Serialize(drawer));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"appInfo": {
|
||||
"name": "Wonky Online",
|
||||
"version": "223.2",
|
||||
"version": "224.0",
|
||||
"rc": true,
|
||||
"sandBox": false,
|
||||
"image": "grumpy-coder.png",
|
||||
|
@ -9,19 +9,19 @@
|
|||
},
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "None",
|
||||
"System": "None",
|
||||
"Default": "Debug",
|
||||
"System": "Debug",
|
||||
"Microsoft": "None"
|
||||
},
|
||||
"Debug": {
|
||||
"LogLevel": {
|
||||
"Default": "None"
|
||||
"Default": "Debug"
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiConfig": {
|
||||
"assetUrl": "https://files.innotec.dk",
|
||||
"baseUrl": "https://zeta.innotec.dk",
|
||||
"baseUrl": "https://dev.innotec.dk",
|
||||
"catalog": "api/v2/catalog/country",
|
||||
"crmCustomers": "api/v2/crm/companies",
|
||||
"crmReports": "api/v2/crm/advisors/reports",
|
||||
|
|
Loading…
Reference in a new issue