fix kanvas
This commit is contained in:
parent
61845516af
commit
7b87fa6b88
9 changed files with 305 additions and 283 deletions
|
@ -212,6 +212,8 @@ public partial class AdvisorActivityCreatePage : IDisposable
|
|||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (_kanvas)
|
||||
return;
|
||||
if (firstRender)
|
||||
{
|
||||
if (!_company.Account.StartsWith("NY"))
|
||||
|
|
|
@ -36,8 +36,14 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<CustomerInventoryListComponent OnReorderSelected="@OnReorderCallback" CompanyId="@CompanyId" Inventory="@Inventory"/>
|
||||
<CustomerInventoryReorderOverlay OnSelected="@OnSelectedItem" CompanyId="@CompanyId" SalesItemView="@SalesItem" @ref="@ReorderOverlay"/>
|
||||
<div class="container">
|
||||
<CustomerInventoryListComponent OnReorderSelected="@OnReorderCallback"
|
||||
CompanyId="@CompanyId" Inventory="@Inventory" />
|
||||
</div>
|
||||
|
||||
@* reorder overlay *@
|
||||
<CustomerInventoryReorderOverlay OnSelected="@OnSelectedItem"
|
||||
CompanyId="@CompanyId" SalesItemView="@SalesItem" @ref="@ReorderOverlay"/>
|
||||
|
||||
@if (Working)
|
||||
{
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 text-end">
|
||||
@if (!_kanvas)
|
||||
{
|
||||
@if (_userInfo.CountryCode is "DK")
|
||||
{
|
||||
<a class="btn btn-secondary btn-sm me-2" href="/advisor/customers/@CompanyId/workplaces/new"><i class="bi-plus-lg"></i> Arbejdssted</a>
|
||||
|
@ -47,9 +49,9 @@
|
|||
<a class="btn btn-secondary btn-sm me-2" href="/advisor/customers/@CompanyId/statistic" disabled="@(_company.Account.StartsWith("NY"))"><i class="bi-activity"></i> Statistik</a>
|
||||
}
|
||||
<button class="btn btn-secondary btn-sm me-2" @onclick="@(() => ReloadHistory(true))" disabled="@(_working || _company.Account.StartsWith("NY"))"><i class="bi-repeat"></i> Historik</button>
|
||||
}
|
||||
<a class="btn btn-primary btn-sm me-2" href="/advisor/customers"><i class="bi-chevron-left"></i> Tilbage</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
// erp context
|
||||
<EditForm EditContext="_erpFormContext">
|
||||
|
@ -320,10 +322,12 @@
|
|||
</div>
|
||||
}
|
||||
</EditForm>
|
||||
@if (!_kanvas)
|
||||
{
|
||||
<hr class="mb-3"/>
|
||||
<div class="row pt-3 mb-5">
|
||||
<div class="col-sm-4 d-grid">
|
||||
<button type="button" class="btn btn-outline-dark" @onclick="@ToggleVisibility">@_toggleButtonText</button>
|
||||
<button type="button" class="btn btn-outline-dark text-dark" @onclick="@ToggleVisibility">@_toggleButtonText</button>
|
||||
</div>
|
||||
<div class="col-sm-4 d-grid">
|
||||
@if (_userInfo.CountryCode is "DK")
|
||||
|
@ -333,6 +337,7 @@
|
|||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@if (_working)
|
||||
{
|
||||
|
|
|
@ -142,6 +142,7 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
if (_company.Account.StartsWith("KANVAS"))
|
||||
{
|
||||
_kanvas = true;
|
||||
Navigator.NavigateTo($"/advisor/customers/{CompanyId}/activities/new");
|
||||
}
|
||||
/*
|
||||
* only execute if the InfoDrawer.Company is not KANVAS
|
||||
|
@ -222,6 +223,9 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (_kanvas)
|
||||
return;
|
||||
|
||||
if (firstRender)
|
||||
{
|
||||
await GetContacts(CompanyId);
|
||||
|
@ -236,6 +240,9 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
|
||||
private async Task ReloadHistory(bool force = false)
|
||||
{
|
||||
if (_kanvas)
|
||||
return;
|
||||
|
||||
if (force)
|
||||
{
|
||||
Toaster.ShowInfo("Afventer svar fra tjenester ...");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@using Wonky.Client.Components
|
||||
@using System.Text.Json
|
||||
@page "/catalog/item/{SalesItemId}"
|
||||
|
||||
@page "/advisor/customers/{CustomerId}/history/inventory/{SalesItemId}"
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(_item.Sku))
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"appInfo": {
|
||||
"name": "Wonky Online",
|
||||
"version": "208.0",
|
||||
"version": "211.0",
|
||||
"rc": true,
|
||||
"sandBox": true,
|
||||
"image": "grumpy-coder.png",
|
||||
|
@ -15,13 +15,13 @@
|
|||
},
|
||||
"Debug": {
|
||||
"LogLevel": {
|
||||
"Default": "Critical"
|
||||
"Default": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"apiConfig": {
|
||||
"assetUrl": "https://files.innotec.dk",
|
||||
"baseUrl": "https://dev.innotec.dk",
|
||||
"baseUrl": "https://eta.innotec.dk",
|
||||
"catalog": "api/v2/catalog/country",
|
||||
"crmCustomers": "api/v2/crm/companies",
|
||||
"crmReports": "api/v2/crm/advisors/reports",
|
||||
|
|
|
@ -26,6 +26,7 @@ public class ProductDetailView
|
|||
public string PictureLink { get; set; } = "";
|
||||
public string ProductGroup { get; set; } = "";
|
||||
public bool Discontinued { get; set; }
|
||||
public bool OnDemand { get; set; }
|
||||
public int BoxSize { get; set; }
|
||||
public List<DocumentView> Documents { get; set; } = new();
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ public class SalesItemView
|
|||
public string PictureLink { get; set; } = "";
|
||||
public string Location { get; set; } = "";
|
||||
public bool Discontinued { get; set; }
|
||||
public bool OnDemand { get; set; }
|
||||
public int BoxSize { get; set; }
|
||||
public List<SalesRateView> Rates { get; set; } = new();
|
||||
}
|
Loading…
Reference in a new issue