DEV: v.135.1
This commit is contained in:
parent
510e819f56
commit
1389f99b81
18 changed files with 224 additions and 40 deletions
|
@ -60,14 +60,6 @@ public partial class AdvisorCustomerInventoryListPage : IDisposable
|
||||||
|
|
||||||
Company = await CustomerRepo.GetCompanyById(CompanyId);
|
Company = await CustomerRepo.GetCompanyById(CompanyId);
|
||||||
|
|
||||||
while (string.IsNullOrWhiteSpace(Company.HistorySync))
|
|
||||||
await Task.Delay(250);
|
|
||||||
|
|
||||||
var x = await HistoryRepo.InvoiceErpToCrmRpc(CompanyId, Company.HistorySync);
|
|
||||||
|
|
||||||
while(string.IsNullOrWhiteSpace(x))
|
|
||||||
await Task.Delay(500);
|
|
||||||
|
|
||||||
// fetch product inventory
|
// fetch product inventory
|
||||||
await FetchProductInventory();
|
await FetchProductInventory();
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
@using Microsoft.AspNetCore.Authorization
|
@using Microsoft.AspNetCore.Authorization
|
||||||
@using Microsoft.AspNetCore.Components
|
@using Microsoft.AspNetCore.Components
|
||||||
@using Wonky.Client.Components
|
@using Wonky.Client.Components
|
||||||
|
@using Wonky.Entity.Configuration
|
||||||
@attribute [Authorize(Roles = "Advisor")]
|
@attribute [Authorize(Roles = "Advisor")]
|
||||||
@page "/advisor/customers/{CompanyId}"
|
@page "/advisor/customers/{CompanyId}"
|
||||||
<PageTitle>Kundekort for @Company.Name</PageTitle>
|
<PageTitle>Kundekort for @Company.Name</PageTitle>
|
||||||
|
@ -266,11 +267,14 @@
|
||||||
<button type="button" class="btn btn-danger" @onclick="ToggleVisibility">@ToggleButtonText</button>
|
<button type="button" class="btn btn-danger" @onclick="ToggleVisibility">@ToggleButtonText</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-5">
|
@if (AppInfo.Value.Rc)
|
||||||
<div class="col-sm-3">
|
{
|
||||||
<a class="btn btn-info" href="@($"/advisor/customers/{CompanyId}/workplaces")">Arbejdssteder</a>
|
<div class="row mt-5">
|
||||||
|
<div class="col-sm-3">
|
||||||
|
<a class="btn btn-info" href="@($"/advisor/customers/{CompanyId}/workplaces")">Arbejdssteder</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
}
|
||||||
}
|
}
|
||||||
</EditForm>
|
</EditForm>
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,12 +19,14 @@ using Blazored.LocalStorage;
|
||||||
using Blazored.Toast.Services;
|
using Blazored.Toast.Services;
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components.Forms;
|
using Microsoft.AspNetCore.Components.Forms;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
using Wonky.Client.Helpers;
|
using Wonky.Client.Helpers;
|
||||||
using Wonky.Client.HttpInterceptors;
|
using Wonky.Client.HttpInterceptors;
|
||||||
using Wonky.Client.HttpRepository;
|
using Wonky.Client.HttpRepository;
|
||||||
using Wonky.Client.Local.Services;
|
using Wonky.Client.Local.Services;
|
||||||
using Wonky.Client.Models;
|
using Wonky.Client.Models;
|
||||||
using Wonky.Client.Shared;
|
using Wonky.Client.Shared;
|
||||||
|
using Wonky.Entity.Configuration;
|
||||||
using Wonky.Entity.DTO;
|
using Wonky.Entity.DTO;
|
||||||
using Wonky.Entity.Models;
|
using Wonky.Entity.Models;
|
||||||
|
|
||||||
|
@ -34,7 +36,7 @@ namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
public partial class AdvisorCustomerViewEditPage : IDisposable
|
public partial class AdvisorCustomerViewEditPage : IDisposable
|
||||||
{
|
{
|
||||||
[Parameter] public string CompanyId { get; set; } = "";
|
// ###########################################################################
|
||||||
[Inject] public IToastService Toaster { get; set; }
|
[Inject] public IToastService Toaster { get; set; }
|
||||||
[Inject] public ILogger<AdvisorCustomerViewEditPage> Logger { get; set; }
|
[Inject] public ILogger<AdvisorCustomerViewEditPage> Logger { get; set; }
|
||||||
[Inject] public NavigationManager Navigator { get; set; }
|
[Inject] public NavigationManager Navigator { get; set; }
|
||||||
|
@ -45,7 +47,12 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
||||||
[Inject] public VatInfoLookupService VatService { get; set; }
|
[Inject] public VatInfoLookupService VatService { get; set; }
|
||||||
[Inject] public ILocalStorageService Storage { get; set; }
|
[Inject] public ILocalStorageService Storage { get; set; }
|
||||||
[Inject] public IUserInfoService UserInfoService { get; set; }
|
[Inject] public IUserInfoService UserInfoService { get; set; }
|
||||||
|
[Inject] public IOptions<AppInfo?>? AppInfo { get; set; }
|
||||||
|
|
||||||
|
// ###########################################################################
|
||||||
|
[Parameter] public string CompanyId { get; set; } = "";
|
||||||
|
|
||||||
|
// ###########################################################################
|
||||||
private readonly JsonSerializerOptions _options = new() { PropertyNameCaseInsensitive = true };
|
private readonly JsonSerializerOptions _options = new() { PropertyNameCaseInsensitive = true };
|
||||||
private CompanyDto Company { get; set; } = new();
|
private CompanyDto Company { get; set; } = new();
|
||||||
private EditContext ErpContext { get; set; }
|
private EditContext ErpContext { get; set; }
|
||||||
|
@ -108,6 +115,7 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
||||||
|
|
||||||
// action link passed to activity button component
|
// action link passed to activity button component
|
||||||
ActionLink = $"/advisor/customers/{CompanyId}/activities/new"; // used when drawing visit button
|
ActionLink = $"/advisor/customers/{CompanyId}/activities/new"; // used when drawing visit button
|
||||||
|
|
||||||
// only execute if the company a 'real' customer
|
// only execute if the company a 'real' customer
|
||||||
if (!Kanvas)
|
if (!Kanvas)
|
||||||
{
|
{
|
||||||
|
@ -152,8 +160,10 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
||||||
if (CountryIsDk)
|
if (CountryIsDk)
|
||||||
CompanyVatAddress = PrepareVatAddress(Company);
|
CompanyVatAddress = PrepareVatAddress(Company);
|
||||||
|
|
||||||
await FetchContacts(CompanyId);
|
await FetchContacts(CompanyId);
|
||||||
await Task.Delay(100);
|
|
||||||
|
Working = false;
|
||||||
|
|
||||||
await RequestErpUpdate();
|
await RequestErpUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ using Wonky.Entity.DTO;
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
public partial class SystemEmergcencyTextsViewEditPage
|
public partial class SystemDocumentEmergencyTextsViewEditPage
|
||||||
{
|
{
|
||||||
[Inject] public ISystemTextsRepository TextsRepo { get; set; }
|
[Inject] public ISystemTextsRepository TextsRepo { get; set; }
|
||||||
private KrvEmergencyTexts Section { get; set; } = new();
|
private KrvEmergencyTexts Section { get; set; } = new();
|
|
@ -22,7 +22,7 @@ using Wonky.Entity.DTO;
|
||||||
|
|
||||||
namespace Wonky.Client.Pages;
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
public partial class SystemFirstAidTextsViewEditPage
|
public partial class SystemDocumentFirstAidTextsViewEditPage
|
||||||
{
|
{
|
||||||
[Inject] public ISystemTextsRepository TextsRepo { get; set; }
|
[Inject] public ISystemTextsRepository TextsRepo { get; set; }
|
||||||
private KrvFirstAidTexts Section { get; set; } = new();
|
private KrvFirstAidTexts Section { get; set; } = new();
|
|
@ -23,6 +23,11 @@
|
||||||
Dokument Labels (beskrivelse af feltindhold)
|
Dokument Labels (beskrivelse af feltindhold)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="list-group">
|
||||||
|
<a class="list-group-item list-group-item-action list-group-item-success" href="/system/labels/quote">Tilbud Dokument</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<a class="list-group-item list-group-item-action list-group-item-warning" href="/system/labels/emergency">Ved Uheld - APB</a>
|
<a class="list-group-item list-group-item-action list-group-item-warning" href="/system/labels/emergency">Ved Uheld - APB</a>
|
||||||
|
@ -34,9 +39,4 @@
|
||||||
<a class="list-group-item list-group-item-action list-group-item-warning" href="/system/labels/kapv">Kemisk Risiko Vurdering - KAPV</a>
|
<a class="list-group-item list-group-item-action list-group-item-warning" href="/system/labels/kapv">Kemisk Risiko Vurdering - KAPV</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
|
||||||
<div class="list-group">
|
|
||||||
<a class="list-group-item list-group-item-action list-group-item-success" href="/system/labels/quote">Tilbud Dokument</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
|
@ -2,7 +2,7 @@ namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
#pragma warning disable CS8618
|
#pragma warning disable CS8618
|
||||||
|
|
||||||
public partial class SystemDocumentLabelsAdminPage
|
public partial class SystemDocumentLandingLabelsPage
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
|
@ -23,6 +23,12 @@
|
||||||
Dokument Tekster
|
Dokument Tekster
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
<div class="list-group">
|
||||||
|
<a class="list-group-item list-group-item-action list-group-item-success" href="/system/texts/quote">Tilbud tekster</a>
|
||||||
|
<a class="list-group-item list-group-item-action list-group-item-success" href="/system/texts/quotemail">Tilbud mail tekster</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="list-group">
|
<div class="list-group">
|
||||||
<a class="list-group-item list-group-item-action list-group-item-info" href="/system/texts/section1">Produkt/Anvendelse</a>
|
<a class="list-group-item list-group-item-action list-group-item-info" href="/system/texts/section1">Produkt/Anvendelse</a>
|
||||||
|
@ -53,10 +59,4 @@
|
||||||
<a class="list-group-item list-group-item-action list-group-item-danger" href="/system/texts/riske">Risikosætninger gruppe EUH</a>
|
<a class="list-group-item list-group-item-action list-group-item-danger" href="/system/texts/riske">Risikosætninger gruppe EUH</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
|
||||||
<div class="list-group">
|
|
||||||
<a class="list-group-item list-group-item-action list-group-item-success" href="/system/texts/quote">Tilbud tekster</a>
|
|
||||||
<a class="list-group-item list-group-item-action list-group-item-success" href="/system/texts/quotemail">Tilbud mail tekster</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
|
@ -0,0 +1,6 @@
|
||||||
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
|
public partial class SystemDocumentLandingTextsPage
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
|
@ -18,11 +18,11 @@
|
||||||
|
|
||||||
@page "/system/labels/quote"
|
@page "/system/labels/quote"
|
||||||
|
|
||||||
<PageTitle>Labels for 'Affald og Spild APB/KRV Dokument'</PageTitle>
|
<PageTitle>Labels for 'Tilbud dokumentt'</PageTitle>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<div class="card-title">
|
<div class="card-title">
|
||||||
<h3>Affald og Spild</h3>
|
<h3>Tilbud Labels</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
|
|
|
@ -0,0 +1,54 @@
|
||||||
|
@* Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
*@
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Authorization
|
||||||
|
@attribute [Authorize(Roles = "Admin")]
|
||||||
|
|
||||||
|
@page "/system/texts/quotemail"
|
||||||
|
|
||||||
|
<PageTitle>Tekster for 'Tilbud Mail dokument'</PageTitle>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-title">
|
||||||
|
<h3>Tilbud Mail Tekster</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
@if (TextProps.Any())
|
||||||
|
{
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td>Navn</td>
|
||||||
|
<td>Tekst</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach (var textProp in TextProps)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>@textProp.Name</td>
|
||||||
|
<td><input type="text" class="form-control" name="@textProp.Name" value="@textProp.GetValue(Section, null)"/></td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div>Ingen data!</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using Wonky.Client.HttpRepository;
|
||||||
|
using Wonky.Entity.DTO;
|
||||||
|
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
|
||||||
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
|
public partial class SystemDocumentQuoteMailTextsViewEditPage
|
||||||
|
{
|
||||||
|
[Inject] public ISystemTextsRepository TextRepo { get; set; }
|
||||||
|
private SystemQuoteMailTexts Section { get; set; } = new();
|
||||||
|
private PropertyInfo[] TextProps { get; set; }
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
Section = await TextRepo.GetSystemQuoteMailTexts();
|
||||||
|
TextProps = Section.GetType().GetProperties();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,54 @@
|
||||||
|
@* Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
*@
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Authorization
|
||||||
|
@attribute [Authorize(Roles = "Admin")]
|
||||||
|
|
||||||
|
@page "/system/texts/quote"
|
||||||
|
|
||||||
|
<PageTitle>Tekster for 'Tilbud dokument'</PageTitle>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="card-title">
|
||||||
|
<h3>Tilbud Tekster</h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body">
|
||||||
|
@if (TextProps.Any())
|
||||||
|
{
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<td>Navn</td>
|
||||||
|
<td>Tekst</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach (var textProp in TextProps)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>@textProp.Name</td>
|
||||||
|
<td><input type="text" class="form-control" name="@textProp.Name" value="@textProp.GetValue(Section, null)"/></td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<div>Ingen data!</div>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,35 @@
|
||||||
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
//
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using Wonky.Client.HttpRepository;
|
||||||
|
using Wonky.Entity.DTO;
|
||||||
|
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
|
||||||
|
namespace Wonky.Client.Pages;
|
||||||
|
|
||||||
|
public partial class SystemDocumentQuoteTextsViewEditPage
|
||||||
|
{
|
||||||
|
[Inject] public ISystemTextsRepository TextRepo { get; set; }
|
||||||
|
private SystemQuoteTexts Section { get; set; } = new();
|
||||||
|
private PropertyInfo[] TextProps { get; set; }
|
||||||
|
protected override async Task OnInitializedAsync()
|
||||||
|
{
|
||||||
|
Section = await TextRepo.GetSystemQuoteTexts();
|
||||||
|
TextProps = Section.GetType().GetProperties();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +0,0 @@
|
||||||
namespace Wonky.Client.Pages;
|
|
||||||
|
|
||||||
public partial class SystemDocumentTextsAdminPage
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"appInfo": {
|
"appInfo": {
|
||||||
"name": "Wonky Online",
|
"name": "Wonky Online",
|
||||||
"version": "0.134.2",
|
"version": "0.135.1",
|
||||||
"rc": true,
|
"rc": true,
|
||||||
"sandBox": false,
|
"sandBox": false,
|
||||||
"image": "grumpy-coder.png"
|
"image": "grumpy-coder.png"
|
||||||
|
@ -19,7 +19,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"apiConfig": {
|
"apiConfig": {
|
||||||
"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",
|
||||||
"crmInventoryExt": "history/inventory",
|
"crmInventoryExt": "history/inventory",
|
||||||
|
|
Loading…
Reference in a new issue