This commit is contained in:
Frede Hundewadt 2022-08-30 08:59:15 +02:00
parent 1c70a4a44b
commit fb06ac7b45
14 changed files with 145 additions and 56 deletions

View file

@ -31,7 +31,7 @@ namespace Wonky.Client.Components
protected override async Task OnInitializedAsync()
{
Preferences = await PreferenceService.GetPreferences();
SearchTerm = string.IsNullOrWhiteSpace(Preferences.CompanyFilterPhrase) ? "" : Preferences.CompanyFilterPhrase;
SearchTerm = string.IsNullOrWhiteSpace(Preferences.CompanyFilterPhrase) ? "" : Preferences.CompanyFilterPhrase.Trim();
if(!string.IsNullOrWhiteSpace(SearchTerm))
await OnChanged.InvokeAsync(SearchTerm);
@ -41,17 +41,19 @@ namespace Wonky.Client.Components
{
InputTimer.Dispose();
SearchTerm = "";
await PreferenceService.SetCompanyFilterPhrase(SearchTerm.Trim());
await OnChanged.InvokeAsync(SearchTerm);
}
private async Task OnSearchChanged()
{
await PreferenceService.SetCompanyFilterPhrase(SearchTerm.Trim());
InputTimer.Dispose();
InputTimer = new Timer(500);
InputTimer.AutoReset = false;
InputTimer.Elapsed += OnTimerElapsed;
InputTimer.Enabled = true;
await PreferenceService.SetCompanyFilterPhrase(SearchTerm.Trim());
}
private void OnTimerElapsed(object? sender, ElapsedEventArgs e)

View file

@ -20,42 +20,41 @@
<PageTitle>Inno Web CRM</PageTitle>
<div class="py-5">
<div class="container">
<div class="row row-cols-1 row-cols-md-2 g-4">
<div class="col">
<div class="card">
<img src="..." class="card-img-left" alt="..." />
<div class="card-body">
danske sælgere
</div>
</div>
</div>
<div class="col">
<div class="card">
<img src="..." class="card-img-left" alt="..." />
<div class="card-body">
norske sælgere
</div>
</div>
</div>
<div class="col">
<div class="card">
<img src="..." class="card-img-left" alt="..." />
<div class="card-body">
svenske sælgere
</div>
</div>
</div>
<div class="col">
<div class="card">
<img src="..." class="card-img-left" alt="..." />
<div class="card-body">
Produkt prisliste
</div>
</div>
<div class="card mb-3" style="max-width: 300px">
<div class="row g-0">
<div class="col-4">
<i class="img-fluid rounded-start fi fi-dk" alt="dk flag"></i>
</div>
<div class="col-8">
<div class="card-body">
Danmark
</div>
</div>
</div>
</div>
<div class="card mb-3" style="max-width: 300px">
<div class="row g-0">
<div class="col-4">
<i class="img-fluid rounded-start fi fi-no" alt="no flag"></i>
</div>
<div class="col-8">
<div class="card-body">
Norge
</div>
</div>
</div>
</div>
<div class="card mb-3" style="max-width: 300px">
<div class="row g-0">
<div class="col-4">
<i class="img-fluid rounded-start fi fi-se" alt="se flag"></i>
</div>
<div class="col-8">
<div class="card-body">
Sverige
</div>
</div>
</div>
</div>

View file

@ -18,15 +18,25 @@
@using Wonky.Entity.Views
<div class="report-page-item d-block">
<table class="table table-sm table-striped table-bordered d-print-table">
<table class="table table-sm table-striped d-print-table">
<thead>
<tr class="bg-light text-black">
<th colspan="4">
@if (ReportItem.Express)
{
<h2 class="text-center">TELEFONORDRE</h2>
}
<h2 class="text-center">@ReportItem.Company.Name</h2>
<tr>
<th class="p-0" colspan="4">
<div class="bg-light text-dark border border-1 rounded-3 pt-3 mb-2">
<h2 class="fw-bold text-center">@ReportItem.Company.Name</h2>
@if (ReportItem.StatusTypeEnum.ToLower() is "quote")
{
<h3 class="text-center">TILBUD</h3>
}
@if (ReportItem.VisitTypeEnum.ToLower() == "phone" || ReportItem.OurRef.Contains("T:"))
{
<h3 class="text-center">TELEFONORDRE</h3>
}
@if (ReportItem.Express)
{
<h3 class="fw-bold text-center">HASTER</h3>
}
</div>
</th>
</tr>
</thead>
@ -119,5 +129,4 @@
[Parameter]
public ReportItemView ReportItem { get; set; } = new();
}

View file

@ -57,13 +57,6 @@ else
<option value="phone">Telefon</option>
</InputSelect>
<ValidationMessage For="@(() => _draft.ActivityTypeEnum)"></ValidationMessage>
@if (_draft.ActivityTypeEnum == "phone")
{
<div class="form-check">
<InputCheckbox id="express" class="form-check-input" @bind-Value="@_draft.Express"/>
<label class="form-check-label" for="express">Express</label>
</div>
}
</div>
<label for="statusType" class="col-md-2 col-form-label">Status</label>
@ -77,6 +70,13 @@ else
}
</InputSelect>
<ValidationMessage For="@(() => _draft.ActivityStatusEnum)"></ValidationMessage>
@if (_draft.ActivityStatusEnum == "order")
{
<div class="form-check">
<InputCheckbox id="express" class="form-check-input" @bind-Value="@_draft.Express"/>
<label class="form-check-label" for="express">Express</label>
</div>
}
</div>
</div>

View file

@ -13,6 +13,7 @@
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
//
using System.Net.Http.Headers;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.AspNetCore.Components.Authorization;
@ -40,6 +41,8 @@ builder.Services.AddHttpClient("InnoAPI", (sp, cl) =>
{
var apiConfig = sp.GetRequiredService<IOptions<ApiConfig>>();
cl.BaseAddress = new Uri(apiConfig.Value.InnoBaseUrl);
cl.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache, no-store, must-revalidate");
cl.DefaultRequestHeaders.Add("Pragma", "no-cache");
cl.EnableIntercept(sp);
});

View file

@ -1,13 +1,13 @@
{
"appInfo": {
"name": "Wonky Client",
"version": "0.11.103",
"rc": true,
"version": "0.11.122",
"rc": false,
"sandBox": false,
"image": "grumpy-coder.png"
},
"apiConfig": {
"innoBaseUrl": "https://zeta.innotec.dk",
"innoBaseUrl": "https://eta.innotec.dk",
"glsTrackUrl": "https://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/DK01/DA/5004.htm?txtAction=71000&txtRefNo=",
"glsId": "",
"serviceVirk": "api/v2/services/virk",

View file

@ -0,0 +1,40 @@
.fib {
background-size: contain;
background-position: 50%;
background-repeat: no-repeat;
}
.fi {
font-size: 64px;
background-size: contain;
background-position: 50%;
background-repeat: no-repeat;
position: relative;
display: inline-block;
width: 1.33333333em;
line-height: 1em;
}
.fi:before {
content: '\00a0';
}
.fi.fis {
width: 1em;
}
.fi-dk {
background-image: url(flags/4x3/dk.svg);
}
.fi-dk.fis {
background-image: url(flags/1x1/dk.svg);
}
.fi-no {
background-image: url(flags/4x3/no.svg);
}
.fi-no.fis {
background-image: url(flags/1x1/no.svg);
}
.fi-se {
background-image: url(flags/4x3/se.svg);
}
.fi-se.fis {
background-image: url(flags/1x1/se.svg);
}

View file

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-dk" viewBox="0 0 512 512">
<path fill="#c8102e" d="M0 0h512.1v512H0z"/>
<path fill="#fff" d="M144 0h73.1v512H144z"/>
<path fill="#fff" d="M0 219.4h512.1v73.2H0z"/>
</svg>

After

Width:  |  Height:  |  Size: 232 B

View file

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-no" viewBox="0 0 512 512">
<path fill="#ed2939" d="M0 0h512v512H0z"/>
<path fill="#fff" d="M128 0h128v512H128z"/>
<path fill="#fff" d="M0 192h512v128H0z"/>
<path fill="#002664" d="M160 0h64v512h-64z"/>
<path fill="#002664" d="M0 224h512v64H0z"/>
</svg>

After

Width:  |  Height:  |  Size: 318 B

View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-se" viewBox="0 0 512 512">
<path fill="#005293" d="M0 0h512v512H0z"/>
<path fill="#fecb00" d="M134 0v204.8H0v102.4h134V512h102.4V307.2H512V204.8H236.4V0H134z"/>
</svg>

After

Width:  |  Height:  |  Size: 227 B

View file

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-dk" viewBox="0 0 640 480">
<path fill="#c8102e" d="M0 0h640.1v480H0z"/>
<path fill="#fff" d="M205.7 0h68.6v480h-68.6z"/>
<path fill="#fff" d="M0 205.7h640.1v68.6H0z"/>
</svg>

After

Width:  |  Height:  |  Size: 236 B

View file

@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-no" viewBox="0 0 640 480">
<path fill="#ed2939" d="M0 0h640v480H0z"/>
<path fill="#fff" d="M180 0h120v480H180z"/>
<path fill="#fff" d="M0 180h640v120H0z"/>
<path fill="#002664" d="M210 0h60v480h-60z"/>
<path fill="#002664" d="M0 210h640v60H0z"/>
</svg>

After

Width:  |  Height:  |  Size: 318 B

View file

@ -0,0 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-se" viewBox="0 0 640 480">
<path fill="#005293" d="M0 0h640v480H0z"/>
<path fill="#fecb00" d="M176 0v192H0v96h176v192h96V288h368v-96H272V0h-96z"/>
</svg>

After

Width:  |  Height:  |  Size: 213 B

View file

@ -2,8 +2,11 @@
<html lang="da">
<head>
<title>Inno Web CRM</title>
<meta charset="utf-8" />
<title>Inno Web CRM</title>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="apple-touch-icon" sizes="180x180" href="apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png" />
@ -13,6 +16,7 @@
<meta name="theme-color" content="#000" />
<base href="/" />
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="flag-icons/flag-icons.css" rel="stylesheet" />
<link href="css/app-v0.10.101.css" rel="stylesheet" />
<link href="Wonky.Client.styles.css" rel="stylesheet" />
<link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet" />