new attempt to prevent doubled history

This commit is contained in:
Frede Hundewadt 2022-12-13 11:29:34 +01:00
parent 0b0be1a247
commit 743c96972d
4 changed files with 23 additions and 11 deletions

View file

@ -53,7 +53,7 @@
@product.Quantity
</td>
<td class="align-middle">
<a class="btn btn-info d-block" type="button" @onclick="() => CallShowReorderModal(product.Sku)"><i class="bi-arrow-right-circle"></i> Se Historik</a>
<a class="btn btn-info d-block" type="button" @onclick="() => CallShowReorderModal(product.Sku)"><i class="bi-pen"></i> Genbestil</a>
</td>
</tr>
}

View file

@ -43,9 +43,15 @@ public partial class CrmCompanyInventoryPage : IDisposable
Interceptor.RegisterBeforeSendEvent();
Company = await CompanyRepo.GetCompanyById(CompanyId);
var _ = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
while (string.IsNullOrWhiteSpace(Company.HistorySync))
{
await Task.Delay(1000);
}
var ts = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
while (string.IsNullOrWhiteSpace(ts))
{
await Task.Delay(1000);
}
await FetchInventory();
Working = false;
}

View file

@ -27,10 +27,16 @@ public partial class CrmCompanyInvoiceListPage : IDisposable
Company = await CompanyRepo.GetCompanyById(CompanyId);
var _ = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
while (string.IsNullOrWhiteSpace(Company.HistorySync))
{
await Task.Delay(1000);
}
var ts = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
while (string.IsNullOrWhiteSpace(ts))
{
await Task.Delay(1000);
}
History = await HistoryRepo.FetchInvoiceList(CompanyId);
Working = false;
}

View file

@ -1,13 +1,13 @@
{
"appInfo": {
"name": "Wonky Client",
"version": "0.84.1",
"version": "0.84.3",
"rc": true,
"sandBox": false,
"image": "grumpy-coder.png"
},
"apiConfig": {
"baseUrl": "https://eta.innotec.dk",
"baseUrl": "https://zeta.innotec.dk",
"catalog": "api/v2/catalog",
"crmCustomers": "api/v2/crm/companies",
"crmInventoryExt": "history/inventory",