WIP: code cleanup
This commit is contained in:
parent
97608df37b
commit
510e819f56
64 changed files with 282 additions and 87 deletions
|
@ -15,6 +15,7 @@
|
|||
|
||||
@using Wonky.Client.Models
|
||||
@using System.ComponentModel.Design
|
||||
@using Wonky.Client.Enums
|
||||
<div class="row">
|
||||
|
||||
@if (Inventory.Any())
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.Models;
|
||||
using Wonky.Entity.Views;
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
*@
|
||||
@using Wonky.Client.Models
|
||||
@using System.ComponentModel.Design
|
||||
@using Wonky.Client.Enums
|
||||
<div class="row">
|
||||
|
||||
@if (Inventory.Any())
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.Models;
|
||||
using Wonky.Entity.Views;
|
||||
#pragma warning disable CS8618
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
using System.Reflection.Metadata.Ecma335;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.VisualBasic.CompilerServices;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.OverlayOffice;
|
||||
using Wonky.Entity.DTO;
|
||||
using Wonky.Entity.Views;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
@using Wonky.Client.Models
|
||||
@using System.ComponentModel.Design
|
||||
@using Wonky.Client.Enums
|
||||
<div class="row">
|
||||
|
||||
@if (Inventory.Any())
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.Models;
|
||||
using Wonky.Entity.Views;
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
@using Wonky.Entity.Views
|
||||
@using Wonky.Client.Models
|
||||
@using Wonky.Client.Enums
|
||||
|
||||
<div class="list-group list-group-flush">
|
||||
<div class="list-group-item bg-dark text-white">
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
//
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.Models;
|
||||
using Wonky.Entity.Views;
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
|
||||
@using Wonky.Client.Models
|
||||
@using Wonky.Client.Enums
|
||||
|
||||
@if (OrderList != null)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
//
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.Models;
|
||||
using Wonky.Entity.Views;
|
||||
|
||||
|
|
38
Wonky.Client/Enums/DocumentSection.cs
Normal file
38
Wonky.Client/Enums/DocumentSection.cs
Normal file
|
@ -0,0 +1,38 @@
|
|||
namespace Wonky.Client.Enums;
|
||||
|
||||
public enum DocumentSection
|
||||
{
|
||||
None,
|
||||
EmergencyLabel,
|
||||
EmergencyText,
|
||||
FirstAidLabel,
|
||||
FirstAidText,
|
||||
SignatureLabel,
|
||||
FooterText,
|
||||
WasteLabel,
|
||||
WasteText,
|
||||
ProductLabel,
|
||||
ProductText,
|
||||
ProtectionLabel,
|
||||
KapvLabel,
|
||||
HRiskPhrase,
|
||||
ERiskPhrase,
|
||||
PRiskPhrase,
|
||||
Section0,
|
||||
Section1,
|
||||
Section2,
|
||||
Section3,
|
||||
Section4,
|
||||
Section5,
|
||||
Section6,
|
||||
Section7,
|
||||
Section8,
|
||||
Section9,
|
||||
PrintDoc,
|
||||
ClpPictogram,
|
||||
ProductCategory,
|
||||
KapvDefaultText,
|
||||
QuoteLabel,
|
||||
QuoteText,
|
||||
QuoteMailText
|
||||
}
|
|
@ -13,7 +13,7 @@
|
|||
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||
//
|
||||
|
||||
namespace Wonky.Client.Models;
|
||||
namespace Wonky.Client.Enums;
|
||||
|
||||
public enum PrintTarget
|
||||
{
|
|
@ -14,7 +14,7 @@
|
|||
//
|
||||
|
||||
|
||||
namespace Wonky.Client.Models;
|
||||
namespace Wonky.Client.Enums;
|
||||
|
||||
public enum ProcessStatus
|
||||
{
|
|
@ -14,7 +14,7 @@
|
|||
//
|
||||
|
||||
|
||||
namespace Wonky.Client.Models;
|
||||
namespace Wonky.Client.Enums;
|
||||
|
||||
public enum ProductSort
|
||||
{
|
|
@ -14,7 +14,7 @@
|
|||
//
|
||||
|
||||
|
||||
namespace Wonky.Client.Models;
|
||||
namespace Wonky.Client.Enums;
|
||||
|
||||
public enum QuoteStatus
|
||||
{
|
|
@ -13,7 +13,7 @@
|
|||
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||
//
|
||||
|
||||
namespace Wonky.Client.Models;
|
||||
namespace Wonky.Client.Enums;
|
||||
|
||||
public enum ValidateType
|
||||
{
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
using System.Net.Mail;
|
||||
using System.Text.RegularExpressions;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.Models;
|
||||
using Wonky.Entity.DTO;
|
||||
|
||||
|
|
|
@ -127,10 +127,9 @@ public class AdvisorCustomerHistoryRepository : IAdvisorCustomerHistoryRepositor
|
|||
/// <returns></returns>
|
||||
public async Task<string> InvoiceErpToCrmRpc(string companyId, string syncDate)
|
||||
{
|
||||
var x = await _client.GetAsync($"{_api.SyncRpc}/companies/{companyId}/{_api.SyncRpcInvoiceExt}/{syncDate}");
|
||||
var x = await _client.GetAsync($"{_api.SyncRpc}/companies/{companyId}/invoices/{syncDate}");
|
||||
if (!x.IsSuccessStatusCode)
|
||||
return string.Empty;
|
||||
var content = await x.Content.ReadAsStringAsync();
|
||||
return content.Replace("\"", "");
|
||||
return await x.Content.ReadAsStringAsync();
|
||||
}
|
||||
}
|
|
@ -1,9 +1,13 @@
|
|||
using System.Collections.Specialized;
|
||||
using Wonky.Entity.DTO;
|
||||
|
||||
namespace Wonky.Client.HttpRepository;
|
||||
|
||||
public interface ISystemTextsRepository
|
||||
{
|
||||
// Task<NameValueCollection> GetTexts(string countryCode, string textType, string textSection);
|
||||
// Task PutTexts(string countryCode, string textType, string textSection, NameValueCollection texts);
|
||||
|
||||
Task<KrvEmergencyTexts> GetKrvEmergencyTexts();
|
||||
Task UpdateKrvEmergencyTexts(KrvEmergencyTexts model);
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using System.Collections.Specialized;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
@ -28,6 +29,17 @@ public class SystemTextsRepository : ISystemTextsRepository
|
|||
_api = configuration.Value;
|
||||
}
|
||||
|
||||
// public async Task<NameValueCollection> GetTexts(string countryCode, string textType, string textSection)
|
||||
// {
|
||||
// var result = await _client.GetFromJsonAsync<NameValueCollection>($"{_api.SystemDocStringUrl}/{textType}/{textSection}", _options);
|
||||
// return result ?? new NameValueCollection();
|
||||
// }
|
||||
//
|
||||
// public async Task PutTexts(string countryCode, string textType, string textSection, NameValueCollection texts)
|
||||
// {
|
||||
// throw new NotImplementedException();
|
||||
// }
|
||||
|
||||
public async Task<KrvEmergencyTexts> GetKrvEmergencyTexts()
|
||||
{
|
||||
var result = await _client.GetFromJsonAsync<KrvEmergencyTexts>($"{_api.SystemTexts}/emergency", _options);
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
//
|
||||
|
||||
|
||||
using Wonky.Client.Enums;
|
||||
|
||||
namespace Wonky.Client.Models;
|
||||
|
||||
public class QuoteCallbackArgs
|
||||
|
@ -22,6 +24,7 @@ public class QuoteCallbackArgs
|
|||
/// ESalesNumber
|
||||
/// </summary>
|
||||
public string ESalesNumber { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// QStatus
|
||||
/// </summary>
|
||||
|
|
|
@ -22,10 +22,12 @@ public class SelectedSku
|
|||
/// ItemId
|
||||
/// </summary>
|
||||
public string ItemId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Quantity
|
||||
/// </summary>
|
||||
public string Quantity { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Rate
|
||||
/// </summary>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
*@
|
||||
|
||||
@using Wonky.Client.Models
|
||||
@using Wonky.Client.Enums
|
||||
|
||||
<div class="modal" tabindex="-1" role="dialog" style="display:@_modalDisplay">
|
||||
<div class="modal-dialog modal-dialog-scrollable modal-fullscreen">
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.HttpInterceptors;
|
||||
using Wonky.Client.HttpRepository;
|
||||
using Wonky.Client.Models;
|
||||
|
|
|
@ -26,10 +26,15 @@ namespace Wonky.Client.Pages;
|
|||
|
||||
public partial class AdvisorCustomerActivityListPage : IDisposable
|
||||
{
|
||||
[Parameter] public string CompanyId { get; set; } = "";
|
||||
// ######################################################################
|
||||
[Inject] public HttpInterceptorService Interceptor { get; set; }
|
||||
[Inject] public IAdvisorActivityRepository AdvisorActivityRepo { get; set; }
|
||||
[Inject] public IAdvisorCustomerRepository CompanyRepo { get; set; }
|
||||
|
||||
// ######################################################################
|
||||
[Parameter] public string CompanyId { get; set; } = "";
|
||||
|
||||
// ######################################################################
|
||||
private List<ReportItemView> ActivityList { get; set; } = new();
|
||||
private CompanyDto Company { get; set; } = new();
|
||||
private bool Working { get; set; } = true;
|
||||
|
@ -40,17 +45,17 @@ public partial class AdvisorCustomerActivityListPage : IDisposable
|
|||
Interceptor.RegisterBeforeSendEvent();
|
||||
|
||||
Company = await CompanyRepo.GetCompanyById(CompanyId);
|
||||
|
||||
await GetActivities();
|
||||
|
||||
Working = false;
|
||||
}
|
||||
|
||||
private async Task GetActivities()
|
||||
{
|
||||
Working = true;
|
||||
ActivityList = await AdvisorActivityRepo.GetCustomerActivities(CompanyId);
|
||||
if (ActivityList.Any())
|
||||
ActivityList = ActivityList.OrderByDescending(x => x.OrderDate).ToList();
|
||||
Working = false;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
|
||||
using System.Text.Json;
|
||||
using System.Xml;
|
||||
using Blazored.LocalStorage;
|
||||
using Blazored.Toast.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
@ -53,11 +54,20 @@ public partial class AdvisorCustomerInventoryListPage : IDisposable
|
|||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
||||
Interceptor.RegisterEvent();
|
||||
Interceptor.RegisterBeforeSendEvent();
|
||||
|
||||
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
|
||||
await FetchProductInventory();
|
||||
|
||||
|
@ -83,29 +93,10 @@ public partial class AdvisorCustomerInventoryListPage : IDisposable
|
|||
private async Task FetchProductInventory()
|
||||
{
|
||||
Inventory = new List<ProductInventoryView>();
|
||||
|
||||
var pStorage = await Storage.GetItemAsStringAsync($"{Company.CompanyId}-products");
|
||||
var pDate = await Storage.GetItemAsStringAsync($"{Company.CompanyId}-pDate");
|
||||
var local = !string.IsNullOrWhiteSpace(pStorage) && !string.IsNullOrWhiteSpace(pDate);
|
||||
// if we have a list and pDate was today return the list
|
||||
if (local && pDate.Replace("\"", "") == $"{DateTime.Now:yyyy-MM-dd}")
|
||||
{
|
||||
Inventory = JsonSerializer.Deserialize<List<ProductInventoryView>>(pStorage);
|
||||
Logger.LogDebug("CustomerProductListCrmPage => Inventory <= {}", JsonSerializer.Serialize(Inventory, _options));
|
||||
}
|
||||
Logger.LogDebug("pulling products from backend");
|
||||
// fetch product history
|
||||
Inventory = await HistoryRepo.FetchInventory(CompanyId);
|
||||
|
||||
// default sort order by description
|
||||
if (Inventory.Any())
|
||||
Inventory = Inventory.OrderBy(x => x.Description).ToList();
|
||||
|
||||
// send products to storage
|
||||
await Storage.SetItemAsync($"{Company.CompanyId}-products", Inventory);
|
||||
await Storage.SetItemAsync($"{Company.CompanyId}-pDate", $"{DateTime.Now:yyyy-MM-dd}");
|
||||
Logger.LogDebug("Loaded products from backend");
|
||||
Logger.LogDebug("CustomerProductListCrmPage => Inventory <= {}", JsonSerializer.Serialize(Inventory, _options));
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<a class="btn btn-primary d-block" href="/advisor/customers/@Company.CompanyId/activities/new"><i class="bi-arrow-right"></i> Besøg</a>
|
||||
</div>
|
||||
</div>
|
||||
<CustomerInvoiceListComponent OnShowInvoice="CallInvoiceModal" CompanyId="@_companyId" InvoiceList="@CompanyInvoices.Invoices"/>
|
||||
<CustomerInvoiceListComponent OnShowInvoice="CallInvoiceModal" CompanyId="@CompanyId" InvoiceList="@CompanyInvoices.Invoices"/>
|
||||
}
|
||||
|
||||
@if (Working)
|
||||
|
@ -40,4 +40,4 @@
|
|||
<WorkingThreeDots />
|
||||
}
|
||||
|
||||
<CustomerInvoiceViewOverlay CompanyId="@_companyId" InvoiceId="@InvoiceId" @ref="CustomerInvoiceView" />
|
||||
<CustomerInvoiceViewOverlay CompanyId="@CompanyId" InvoiceId="@InvoiceId" @ref="CustomerInvoiceView" />
|
|
@ -96,15 +96,16 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
|
|||
Logger.LogDebug("companyId => {}", CompanyId);
|
||||
|
||||
Company = await CustomerRepo.GetCompanyById(CompanyId);
|
||||
|
||||
if (Company.Account.StartsWith("KANVAS"))
|
||||
Kanvas = true;
|
||||
|
||||
// internal flag
|
||||
EnableActivity = Company.ValidVat;
|
||||
// override if canvas which has account property as empty string or "NY"
|
||||
if (Company.Account == "NY" || Company.Account.StartsWith("KANVAS") || string.IsNullOrWhiteSpace(Company.Account))
|
||||
EnableActivity = 1;
|
||||
|
||||
if (Company.Account.StartsWith("KANVAS"))
|
||||
Kanvas = true;
|
||||
|
||||
// action link passed to activity button component
|
||||
ActionLink = $"/advisor/customers/{CompanyId}/activities/new"; // used when drawing visit button
|
||||
// only execute if the company a 'real' customer
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
@using Wonky.Client.Components
|
||||
@using Wonky.Client.Models
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Wonky.Client.Enums
|
||||
@attribute [Authorize(Roles = "Advisor")]
|
||||
@page "/advisor/agreements"
|
||||
<PageTitle>Aftaler og Tilbud - Oversigt</PageTitle>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
using Blazored.LocalStorage;
|
||||
using Blazored.Toast.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.Helpers;
|
||||
using Wonky.Client.HttpInterceptors;
|
||||
using Wonky.Client.HttpRepository;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
@using Wonky.Client.Components
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Wonky.Client.Enums
|
||||
@using Wonky.Client.Models
|
||||
@attribute [Authorize(Roles = "Advisor")]
|
||||
@page "/advisor/reports/view/{ReportDate}"
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
using Blazored.LocalStorage;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.HttpInterceptors;
|
||||
using Wonky.Client.HttpRepository;
|
||||
using Wonky.Client.Local.Services;
|
||||
|
|
|
@ -18,6 +18,7 @@ using Blazored.LocalStorage;
|
|||
using Blazored.Toast.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.Helpers;
|
||||
using Wonky.Client.HttpRepository;
|
||||
using Wonky.Client.Models;
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
@using Wonky.Client.Components
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Wonky.Client.Enums
|
||||
@using Wonky.Client.Models
|
||||
@attribute [Authorize(Roles = "Admin,Office,Supervisor")]
|
||||
@page "/office/users/advisors/{CountryCode}/{UserId}/reports/{ReportDate}"
|
||||
|
|
|
@ -19,6 +19,7 @@ using Blazored.LocalStorage;
|
|||
using Blazored.Toast.Services;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.Helpers;
|
||||
using Wonky.Client.HttpInterceptors;
|
||||
using Wonky.Client.HttpRepository;
|
||||
|
|
54
Wonky.Client/Pages/SysDocumentTextsViewEditPage.razor
Normal file
54
Wonky.Client/Pages/SysDocumentTextsViewEditPage.razor
Normal file
|
@ -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/doc/texts/{CountryCode}/{TextType}/{SectionName}"
|
||||
|
||||
<PageTitle>Tekster for '@TextType @SectionName'</PageTitle>
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div class="card-title">
|
||||
<h3>Faremærkning CLP</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>
|
40
Wonky.Client/Pages/SysDocumentTextsViewEditPage.razor.cs
Normal file
40
Wonky.Client/Pages/SysDocumentTextsViewEditPage.razor.cs
Normal file
|
@ -0,0 +1,40 @@
|
|||
// 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 SysDocumentTextsViewEditPage
|
||||
{
|
||||
[Inject] public ISystemTextsRepository TextsRepo { get; set; }
|
||||
|
||||
[Parameter] public string CountryCode { get; set; } = "dk";
|
||||
[Parameter] public string TextType { get; set; } = "";
|
||||
[Parameter] public string SectionName { get; set; } = "";
|
||||
|
||||
private KrvClpPictogramTexts Section { get; set; } = new();
|
||||
private PropertyInfo[] TextProps { get; set; }
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
Section = await TextsRepo.GetKrvClpPictogramTexts();
|
||||
TextProps = Section.GetType().GetProperties();
|
||||
}
|
||||
}
|
|
@ -22,7 +22,7 @@ using Wonky.Entity.DTO;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class SystemClpPictogramTextsViewEditPage
|
||||
public partial class SystemDocumentClpPictogramTextsViewEditPage
|
||||
{
|
||||
[Inject] public ISystemTextsRepository TextsRepo { get; set; }
|
||||
private KrvClpPictogramTexts Section { get; set; } = new();
|
|
@ -22,7 +22,7 @@ using Wonky.Entity.DTO;
|
|||
|
||||
namespace Wonky.Client.Pages;
|
||||
|
||||
public partial class SystemCommonPrintTextsiewEditPage
|
||||
public partial class SystemDocumentCommonPrintTextsViewEditPage
|
||||
{
|
||||
[Inject] public ISystemTextsRepository TextsRepo { get; set; }
|
||||
private KrvCommonPrintTexts Section { get; set; } = new();
|
|
@ -13,6 +13,8 @@
|
|||
// 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/labels/"
|
||||
<div class="card">
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
// 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/products"
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
// 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/protections"
|
||||
<div class="card">
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
*@
|
||||
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
@page "/system/texts/section0"
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
// 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/"
|
||||
<div class="card">
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
@page "/system"
|
||||
<PageTitle>System Mmanager</PageTitle>
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@
|
|||
*@
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
@page "/system/sms"
|
||||
|
||||
|
||||
<div id="msg-box" style="display:@(MsgSent ? "none" : "block")">
|
||||
<div style="display:@(MsgSent ? "none" : "block")">
|
||||
<div class="row">
|
||||
<div class="h3 col-sm-10">
|
||||
Drift Meddelelse (SMS)
|
||||
|
@ -35,6 +35,9 @@
|
|||
<div class="col-sm-12 d-grid mx-auto">
|
||||
<textarea id="message" cols="50" rows="5" @bind-Value:event="oninput" @bind-Value="Message.Body"></textarea>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<input type="checkbox" @bind-Value:event="onchange" @bind-Value="Message.Flash"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row ms-2">
|
||||
@foreach (var recipient in Recipients)
|
||||
|
@ -51,7 +54,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="msg-box" style="display:@(MsgSent ? "block" : "none")">
|
||||
<div style="display:@(MsgSent ? "block" : "none")">
|
||||
<div class="row">
|
||||
<div class="col-10">
|
||||
<table class="table table-striped">
|
||||
|
|
|
@ -67,7 +67,7 @@ public partial class SystemShortMessagePage : IDisposable
|
|||
}
|
||||
Message.From = "Innotec IT";
|
||||
Message.To = string.Join(",", recipients);
|
||||
|
||||
|
||||
Logger.LogDebug("{}", JsonSerializer.Serialize(Message, _options));
|
||||
|
||||
SmsResponse = await SmsService.SendSms(Message);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
@page "/system/supervisors"
|
||||
|
||||
<PageTitle>Supervisor Oversigt</PageTitle>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
@page "/system/supervisors/{UserId}"
|
||||
|
||||
<PageTitle>Supervisor Sælger Tilknytning</PageTitle>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Wonky.Client.Components
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
@page "/system/users/create"
|
||||
|
||||
<div class="card">
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
@page "/system/users"
|
||||
|
||||
<PageTitle>System Bruger Oversigt</PageTitle>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Wonky.Client.Components
|
||||
@attribute [Authorize(Roles = "Admin")]
|
||||
|
||||
@page "/system/users/{UserId}"
|
||||
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
@using Wonky.Client.Components
|
||||
@using Microsoft.AspNetCore.Authorization
|
||||
@attribute [Authorize(Roles = "Admin,Office,Warehouse")]
|
||||
|
||||
@page "/warehouse/orders/{Status}"
|
||||
|
||||
<div class="row">
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Wonky.Client.Enums;
|
||||
using Wonky.Client.Helpers;
|
||||
using Wonky.Client.HttpInterceptors;
|
||||
using Wonky.Client.HttpRepository;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
@using Microsoft.AspNetCore.Authorization
|
||||
@using Wonky.Client.Components
|
||||
@attribute [Authorize(Roles = "Admin,Office,Warehouse")]
|
||||
|
||||
@page "/warehouse/orders/process/{OrderId}"
|
||||
|
||||
@if (!string.IsNullOrWhiteSpace(Order.OrderDate))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"appInfo": {
|
||||
"name": "Wonky Online",
|
||||
"version": "0.133.1",
|
||||
"version": "0.134.2",
|
||||
"rc": true,
|
||||
"sandBox": false,
|
||||
"image": "grumpy-coder.png"
|
||||
|
@ -43,6 +43,7 @@
|
|||
"servicesAuth": "v2/token",
|
||||
"syncRpc": "api/v2/rpc",
|
||||
"syncRpcInvoiceExt": "invoices",
|
||||
"systemDocStringUrl": "api/v2/admin/doc",
|
||||
"systemLabels": "api/v2/admin/doc/labels",
|
||||
"systemTexts": "api/v2/admin/doc/texts",
|
||||
"userData": "/api/v2/client/users",
|
||||
|
|
|
@ -137,6 +137,10 @@ public class ApiConfig
|
|||
/// </summary>
|
||||
public string SyncRpcInvoiceExt { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Generic system string endpoint
|
||||
/// </summary>
|
||||
public string SystemDocStringUrl { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Get system document labels for translation
|
||||
/// </summary>
|
||||
|
|
|
@ -9,4 +9,5 @@ public class ShortMessage
|
|||
[Required] [MaxLength(1000)] public string To { get; set; } = "";
|
||||
|
||||
[Required] [MaxLength(100)] public string Body { get; set; } = "";
|
||||
public bool Flash { get; set; }
|
||||
}
|
|
@ -2,17 +2,17 @@ namespace Wonky.Entity.DTO;
|
|||
|
||||
public class SystemQuoteLabels
|
||||
{
|
||||
public string DocumentDateLabel { get; set; } = "";
|
||||
public string NameLabel { get; set; } = "";
|
||||
public string EMailLabel { get; set; } = "";
|
||||
public string PhoneLabel { get; set; } = "";
|
||||
public string ConsultantLabel { get; set; } = "";
|
||||
public string QuoteDocumentDateLabel { get; set; } = "";
|
||||
public string QuoteNameLabel { get; set; } = "";
|
||||
public string QuoteEMailLabel { get; set; } = "";
|
||||
public string QuotePhoneLabel { get; set; } = "";
|
||||
public string QuoteConsultantLabel { get; set; } = "";
|
||||
|
||||
public string ItemColumnLabel { get; set; } = "";
|
||||
public string QuantityColumnLabel { get; set; } = "";
|
||||
public string DescriptionColumnLabel { get; set; } = "";
|
||||
public string PriceColumnLabel { get; set; } = "";
|
||||
public string DiscountColumnLabel { get; set; } = "";
|
||||
public string LineSumColumnLabel { get; set; } = "";
|
||||
public string ConditionsLabel { get; set; } = "";
|
||||
public string QuoteItemColumnLabel { get; set; } = "";
|
||||
public string QuoteQuantityColumnLabel { get; set; } = "";
|
||||
public string QuoteDescriptionColumnLabel { get; set; } = "";
|
||||
public string QuotePriceColumnLabel { get; set; } = "";
|
||||
public string QuoteDiscountColumnLabel { get; set; } = "";
|
||||
public string QuoteLineSumColumnLabel { get; set; } = "";
|
||||
public string QuoteConditionsLabel { get; set; } = "";
|
||||
}
|
|
@ -2,15 +2,15 @@ namespace Wonky.Entity.DTO;
|
|||
|
||||
public class SystemQuoteMailTexts
|
||||
{
|
||||
public string MailGreeting1 { get; set; } = "";
|
||||
public string MailGreeting2 { get; set; } = "";
|
||||
public string MailText1 { get; set; } = "";
|
||||
public string MailText2 { get; set; } = "";
|
||||
public string MailLinkReference { get; set; } = "";
|
||||
public string MailSalute { get; set; } = "";
|
||||
public string MailSender { get; set; } = "";
|
||||
public string MailFooter { get; set; } = "";
|
||||
public string MailCopyHeader { get; set; } = "";
|
||||
public string MailCopySalesNumber { get; set; } = "";
|
||||
public string MailCopyCreatedBy { get; set; } = "";
|
||||
public string QuoteMailGreeting1 { get; set; } = "";
|
||||
public string QuoteMailGreeting2 { get; set; } = "";
|
||||
public string QuoteMailText1 { get; set; } = "";
|
||||
public string QuoteMailText2 { get; set; } = "";
|
||||
public string QuoteMailLinkReference { get; set; } = "";
|
||||
public string QuoteMailSalute { get; set; } = "";
|
||||
public string QuoteMailSender { get; set; } = "";
|
||||
public string QuoteMailFooter { get; set; } = "";
|
||||
public string QuoteMailCopyHeader { get; set; } = "";
|
||||
public string QuoteMailCopySalesNumber { get; set; } = "";
|
||||
public string QuoteMailCopyCreatedBy { get; set; } = "";
|
||||
}
|
|
@ -2,27 +2,27 @@ namespace Wonky.Entity.DTO;
|
|||
|
||||
public class SystemQuoteTexts
|
||||
{
|
||||
public string HtmlTitle { get; set; } = "";
|
||||
public string DocumentName { get; set; } = "";
|
||||
public string DocumentNumber { get; set; } = "";
|
||||
public string DocumentDate { get; set; } = "";
|
||||
public string CustomerName { get; set; } = "";
|
||||
public string CustomerPhone { get; set; } = "";
|
||||
public string CustomerEMail { get; set; } = "";
|
||||
public string ConsultantName { get; set; } = "";
|
||||
public string ConsultantPhone { get; set; } = "";
|
||||
public string ConsultantEMail { get; set; } = "";
|
||||
public string TotalSum { get; set; } = "";
|
||||
public string QuoteHtmlTitle { get; set; } = "";
|
||||
public string QuoteDocumentName { get; set; } = "";
|
||||
public string QuoteDocumentNumber { get; set; } = "";
|
||||
public string QuoteDocumentDate { get; set; } = "";
|
||||
public string QuoteCustomerName { get; set; } = "";
|
||||
public string QuoteCustomerPhone { get; set; } = "";
|
||||
public string QuoteCustomerEMail { get; set; } = "";
|
||||
public string QuoteConsultantName { get; set; } = "";
|
||||
public string QuoteConsultantPhone { get; set; } = "";
|
||||
public string QuoteConsultantEMail { get; set; } = "";
|
||||
public string QuoteTotalSum { get; set; } = "";
|
||||
|
||||
public string ConditionVatExclusive { get; set; } = "";
|
||||
public string ConditionValidityPeriod { get; set; } = "";
|
||||
public string ConditionValidityQuantity { get; set; } = "";
|
||||
public string ConditionQuestion { get; set; } = "";
|
||||
public string Greeting { get; set; } = "";
|
||||
public string FooterCompanyName { get; set; } = "";
|
||||
public string FooterCompanyPostalAddress { get; set; } = "";
|
||||
public string FooterCompanyPhone { get; set; } = "";
|
||||
public string FooterCompanyWeb { get; set; } = "";
|
||||
public string FooterCompanyVat { get; set; } = "";
|
||||
public string QuoteConditionVatExclusive { get; set; } = "";
|
||||
public string QuoteConditionValidityPeriod { get; set; } = "";
|
||||
public string QuoteConditionValidityQuantity { get; set; } = "";
|
||||
public string QuoteConditionQuestion { get; set; } = "";
|
||||
public string QuoteGreeting { get; set; } = "";
|
||||
public string QuoteFooterCompanyName { get; set; } = "";
|
||||
public string QuoteFooterCompanyPostalAddress { get; set; } = "";
|
||||
public string QuoteFooterCompanyPhone { get; set; } = "";
|
||||
public string QuoteFooterCompanyWeb { get; set; } = "";
|
||||
public string QuoteFooterCompanyVat { get; set; } = "";
|
||||
|
||||
}
|
Loading…
Reference in a new issue