new attempt to prevent doubled history
This commit is contained in:
parent
0b0be1a247
commit
743c96972d
4 changed files with 23 additions and 11 deletions
|
@ -53,7 +53,7 @@
|
||||||
@product.Quantity
|
@product.Quantity
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle">
|
<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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,15 @@ public partial class CrmCompanyInventoryPage : IDisposable
|
||||||
Interceptor.RegisterBeforeSendEvent();
|
Interceptor.RegisterBeforeSendEvent();
|
||||||
|
|
||||||
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
||||||
|
while (string.IsNullOrWhiteSpace(Company.HistorySync))
|
||||||
var _ = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
|
{
|
||||||
|
await Task.Delay(1000);
|
||||||
|
}
|
||||||
|
var ts = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
|
||||||
|
while (string.IsNullOrWhiteSpace(ts))
|
||||||
|
{
|
||||||
|
await Task.Delay(1000);
|
||||||
|
}
|
||||||
await FetchInventory();
|
await FetchInventory();
|
||||||
Working = false;
|
Working = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,10 +27,16 @@ public partial class CrmCompanyInvoiceListPage : IDisposable
|
||||||
|
|
||||||
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
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);
|
History = await HistoryRepo.FetchInvoiceList(CompanyId);
|
||||||
|
|
||||||
Working = false;
|
Working = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"appInfo": {
|
"appInfo": {
|
||||||
"name": "Wonky Client",
|
"name": "Wonky Client",
|
||||||
"version": "0.84.1",
|
"version": "0.84.3",
|
||||||
"rc": true,
|
"rc": true,
|
||||||
"sandBox": false,
|
"sandBox": false,
|
||||||
"image": "grumpy-coder.png"
|
"image": "grumpy-coder.png"
|
||||||
},
|
},
|
||||||
"apiConfig": {
|
"apiConfig": {
|
||||||
"baseUrl": "https://eta.innotec.dk",
|
"baseUrl": "https://zeta.innotec.dk",
|
||||||
"catalog": "api/v2/catalog",
|
"catalog": "api/v2/catalog",
|
||||||
"crmCustomers": "api/v2/crm/companies",
|
"crmCustomers": "api/v2/crm/companies",
|
||||||
"crmInventoryExt": "history/inventory",
|
"crmInventoryExt": "history/inventory",
|
||||||
|
|
Loading…
Reference in a new issue