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 IAdvisorCustomerHistoryRepository _historyRepo;
|
||||||
private readonly ICountryCatalogRepository _catalogRepo;
|
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(
|
public CabinetDrawerService(
|
||||||
ILogger<CabinetDrawerService> logger,
|
ILogger<CabinetDrawerService> logger,
|
||||||
ILocalStorageService asyncStorageService,
|
ILocalStorageService asyncStorageService,
|
||||||
|
@ -44,12 +35,7 @@ public class CabinetDrawerService : ICabinetDrawerService
|
||||||
_activityRepo = activityRepo;
|
_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)
|
public async Task<ActivityDrawer> GetActivityDrawerAsync(string companyId, bool force = false)
|
||||||
{
|
{
|
||||||
var drawer = await _asyncStorageService
|
var drawer = await _asyncStorageService
|
||||||
|
@ -67,12 +53,6 @@ public class CabinetDrawerService : ICabinetDrawerService
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sales Catalog
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="countryCode"></param>
|
|
||||||
/// <param name="force"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<CatalogDrawer> GetCatalogDrawerAsync(string countryCode, bool force = false)
|
public async Task<CatalogDrawer> GetCatalogDrawerAsync(string countryCode, bool force = false)
|
||||||
{
|
{
|
||||||
var drawer = await _asyncStorageService
|
var drawer = await _asyncStorageService
|
||||||
|
@ -91,12 +71,6 @@ public class CabinetDrawerService : ICabinetDrawerService
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Company Info
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="companyId"></param>
|
|
||||||
/// <param name="force"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<InfoDrawer> GetInfoDrawerAsync(string companyId, bool force = false)
|
public async Task<InfoDrawer> GetInfoDrawerAsync(string companyId, bool force = false)
|
||||||
{
|
{
|
||||||
var drawer = await _asyncStorageService
|
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)
|
public async Task<InventoryDrawer> GetInventoryDrawerAsync(string companyId, bool force = false)
|
||||||
{
|
{
|
||||||
var drawer = await _asyncStorageService
|
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)
|
public async Task<InvoiceDrawer> GetInvoiceDrawerAsync(string companyId, bool force = false)
|
||||||
{
|
{
|
||||||
var drawer = await _asyncStorageService
|
var drawer = await _asyncStorageService
|
||||||
|
@ -162,12 +124,6 @@ public class CabinetDrawerService : ICabinetDrawerService
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <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)
|
public async Task<StatisticDrawer> GetStatisticDrawerAsync(string companyId, bool force = false)
|
||||||
{
|
{
|
||||||
var drawer = await _asyncStorageService
|
var drawer = await _asyncStorageService
|
||||||
|
@ -195,11 +151,6 @@ public class CabinetDrawerService : ICabinetDrawerService
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Store Activity
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="companyId"></param>
|
|
||||||
/// <param name="drawer"></param>
|
|
||||||
public async Task StoreActivityDrawerAsync(string companyId, ActivityDrawer drawer)
|
public async Task StoreActivityDrawerAsync(string companyId, ActivityDrawer drawer)
|
||||||
{
|
{
|
||||||
if (drawer.Content.Any())
|
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)
|
public async Task StoreCatalogDrawerAsync(string countryCode, CatalogDrawer drawer)
|
||||||
{
|
{
|
||||||
await _asyncStorageService.SetItemAsync($"{countryCode}.{CatalogDrawer.Label}", 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)
|
public async Task StoreInfoDrawerAsync(string companyId, InfoDrawer drawer)
|
||||||
{
|
{
|
||||||
await _asyncStorageService.SetItemAsync($"{companyId}.{InfoDrawer.Label}", 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)
|
public async Task StoreInventoryDrawerAsync(string companyId, InventoryDrawer drawer)
|
||||||
{
|
{
|
||||||
if (drawer.Content.Any())
|
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)
|
public async Task StoreInvoiceDrawerAsync(string companyId, InvoiceDrawer drawer)
|
||||||
{
|
{
|
||||||
if (drawer.Content.Any())
|
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)
|
public async Task StoreStatisticDrawerAsync(string companyId, StatisticDrawer drawer)
|
||||||
{
|
{
|
||||||
if (drawer.Content.Any())
|
if (drawer.Content.Any())
|
||||||
|
|
|
@ -102,6 +102,7 @@ public partial class AdvisorCustomerInventoryListPage : IDisposable
|
||||||
{
|
{
|
||||||
Inventory = drawer.Content;
|
Inventory = drawer.Content;
|
||||||
}
|
}
|
||||||
|
Logger.LogDebug("{}",JsonSerializer.Serialize(drawer));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"appInfo": {
|
"appInfo": {
|
||||||
"name": "Wonky Online",
|
"name": "Wonky Online",
|
||||||
"version": "223.2",
|
"version": "224.0",
|
||||||
"rc": true,
|
"rc": true,
|
||||||
"sandBox": false,
|
"sandBox": false,
|
||||||
"image": "grumpy-coder.png",
|
"image": "grumpy-coder.png",
|
||||||
|
@ -9,19 +9,19 @@
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "None",
|
"Default": "Debug",
|
||||||
"System": "None",
|
"System": "Debug",
|
||||||
"Microsoft": "None"
|
"Microsoft": "None"
|
||||||
},
|
},
|
||||||
"Debug": {
|
"Debug": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
"Default": "None"
|
"Default": "Debug"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apiConfig": {
|
"apiConfig": {
|
||||||
"assetUrl": "https://files.innotec.dk",
|
"assetUrl": "https://files.innotec.dk",
|
||||||
"baseUrl": "https://zeta.innotec.dk",
|
"baseUrl": "https://dev.innotec.dk",
|
||||||
"catalog": "api/v2/catalog/country",
|
"catalog": "api/v2/catalog/country",
|
||||||
"crmCustomers": "api/v2/crm/companies",
|
"crmCustomers": "api/v2/crm/companies",
|
||||||
"crmReports": "api/v2/crm/advisors/reports",
|
"crmReports": "api/v2/crm/advisors/reports",
|
||||||
|
|
Loading…
Reference in a new issue