bump sdk 7.0.400 redirect kanvas customer to visit
This commit is contained in:
parent
7b87fa6b88
commit
e30acdb005
5 changed files with 287 additions and 311 deletions
|
@ -34,8 +34,6 @@
|
|||
</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>
|
||||
|
@ -49,7 +47,6 @@
|
|||
<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>
|
||||
|
@ -118,8 +115,6 @@
|
|||
<ValidationMessage For="@(() => _company.EanNumber)"></ValidationMessage>
|
||||
</div>
|
||||
|
||||
@if (!_kanvas)
|
||||
{
|
||||
@* entity segment *@
|
||||
@if (_userInfo.CountryCode.ToLower() == "dk")
|
||||
{
|
||||
|
@ -192,7 +187,7 @@
|
|||
<div class="col-sm-3 d-grid mx-auto">
|
||||
<button type="button" class="btn btn-warning d-block" @onclick="@UpdateVatNumber" disabled="@(_vatEditDisabled)"><i class="bi-cloud-arrow-up"></i> Moms/Org Nr.</button>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -200,31 +195,22 @@
|
|||
@* activity buttons *@
|
||||
<div class="row mt-3 mb-3">
|
||||
<div class="col-sm-3">
|
||||
@if (!_kanvas)
|
||||
{
|
||||
<ActionButton ActionLink="@_invoiceLink"
|
||||
ButtonText="Faktura"
|
||||
ButtonType="danger"
|
||||
Enabled="@_enableLink"/>
|
||||
}
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
@if (!_kanvas)
|
||||
{
|
||||
<ActionButton ActionLink="@_activitiesLink"
|
||||
ButtonText="Tidl. Besøg"
|
||||
ButtonType="warning"
|
||||
Enabled="@_enableLink"/>
|
||||
}
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
@if (!_kanvas )
|
||||
{
|
||||
<ActionButton ActionLink="@_inventoryLink"
|
||||
ButtonText="Produkter"
|
||||
ButtonType="success"
|
||||
Enabled="@_enableLink"/>
|
||||
}
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<ActionButton ActionLink="@_newActivityLink"
|
||||
|
@ -235,8 +221,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
@if (!_kanvas)
|
||||
{
|
||||
<hr class="mb-3"/>
|
||||
@* crm context - OBS note *@
|
||||
<div class="row mb-2">
|
||||
|
@ -320,10 +304,8 @@
|
|||
<InputTextArea id="crmNotes" class="form-control" @bind-Value="_company.CrmNotes"/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</EditForm>
|
||||
@if (!_kanvas)
|
||||
{
|
||||
<hr class="mb-3"/>
|
||||
<div class="row pt-3 mb-5">
|
||||
<div class="col-sm-4 d-grid">
|
||||
|
@ -337,7 +319,6 @@
|
|||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@if (_working)
|
||||
{
|
||||
|
|
|
@ -77,7 +77,6 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
private bool _erpEditDisabled = true;
|
||||
private bool _vatEditDisabled = true;
|
||||
private string _toggleButtonText = "";
|
||||
private bool _kanvas;
|
||||
private string _inventoryLink = "";
|
||||
private string _activitiesLink = "";
|
||||
private string _invoiceLink = "";
|
||||
|
@ -117,13 +116,23 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
_erpFormContext = new EditContext(_company);
|
||||
_erpFormContext.OnFieldChanged += HandleFieldChanged;
|
||||
_erpFormContext.OnValidationStateChanged += ValidationChanged!;
|
||||
/*
|
||||
* fetch company
|
||||
*/
|
||||
_company = await AdvisorCustomerRepo.GetCompanyById(CompanyId);
|
||||
/*
|
||||
* redirect if KANVAS
|
||||
*/
|
||||
if (_company.Account.StartsWith("KANVAS"))
|
||||
{
|
||||
Navigator.NavigateTo($"/advisor/customers/{CompanyId}/activities/new");
|
||||
}
|
||||
/*
|
||||
* fetch user info from local storage
|
||||
*/
|
||||
_userInfo = await UserInfoService.GetUserInfo();
|
||||
_countryCode = _userInfo.CountryCode.ToLower();
|
||||
_countryIsDk = _countryCode == "dk";
|
||||
_company = await AdvisorCustomerRepo.GetCompanyById(CompanyId);
|
||||
_infoDrawer = await DrawerService.GetInfoDrawerAsync(CompanyId);
|
||||
_infoDrawer.Content = _company;
|
||||
await DrawerService.StoreInfoDrawerAsync(CompanyId, _infoDrawer);
|
||||
|
@ -139,16 +148,9 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
{
|
||||
_enableActivity = 1;
|
||||
}
|
||||
if (_company.Account.StartsWith("KANVAS"))
|
||||
{
|
||||
_kanvas = true;
|
||||
Navigator.NavigateTo($"/advisor/customers/{CompanyId}/activities/new");
|
||||
}
|
||||
/*
|
||||
* only execute if the InfoDrawer.Company is not KANVAS
|
||||
*/
|
||||
if (!_kanvas)
|
||||
{
|
||||
Logger.LogDebug("_company => {}", JsonSerializer.Serialize(_company));
|
||||
/*
|
||||
* toggle view button text
|
||||
|
@ -213,7 +215,6 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
_companyVatAddress = PrepareVatAddress(_company);
|
||||
}
|
||||
// await GetContacts(CompanyId);
|
||||
}
|
||||
/*
|
||||
* remove loading image
|
||||
*/
|
||||
|
@ -223,9 +224,6 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (_kanvas)
|
||||
return;
|
||||
|
||||
if (firstRender)
|
||||
{
|
||||
await GetContacts(CompanyId);
|
||||
|
@ -240,9 +238,6 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
|
||||
private async Task ReloadHistory(bool force = false)
|
||||
{
|
||||
if (_kanvas)
|
||||
return;
|
||||
|
||||
if (force)
|
||||
{
|
||||
Toaster.ShowInfo("Afventer svar fra tjenester ...");
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using Microsoft.AspNetCore.Components;
|
||||
using Toolbelt.Blazor;
|
||||
using Wonky.Client.HttpInterceptors;
|
||||
using Wonky.Client.HttpRepository;
|
||||
using Wonky.Entity.Views;
|
||||
|
@ -16,6 +15,7 @@ public partial class CatalogProductDetailPage
|
|||
|
||||
// ##############################################################
|
||||
[Parameter] public string SalesItemId { get; set; } = "";
|
||||
[Parameter] public string CustomerId { get; set; } = "";
|
||||
|
||||
// ##############################################################
|
||||
private ProductDetailView _item = new();
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="Blazored.LocalStorage" Version="4.3.0" />
|
||||
<PackageReference Include="Blazored.Toast" Version="4.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.9" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.10" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Configuration" Version="7.0.0" />
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"appInfo": {
|
||||
"name": "Wonky Online",
|
||||
"version": "211.0",
|
||||
"rc": true,
|
||||
"version": "213.0",
|
||||
"rc": false,
|
||||
"sandBox": true,
|
||||
"image": "grumpy-coder.png",
|
||||
"sdk": "dotnet 7.0"
|
||||
|
@ -21,7 +21,7 @@
|
|||
},
|
||||
"apiConfig": {
|
||||
"assetUrl": "https://files.innotec.dk",
|
||||
"baseUrl": "https://eta.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