touch-ups and adjustments
This commit is contained in:
parent
4d36e77c5d
commit
9ff13d9914
8 changed files with 68 additions and 59 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
@using Wonky.Client.Helpers
|
||||||
@*
|
@*
|
||||||
// Copyright (C) 2022 FCS Frede's Computer Services.
|
// Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
// This program is free software: you can redistribute it and/or modify
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -57,18 +58,18 @@
|
||||||
{<i class="bi-calculator"></i>}
|
{<i class="bi-calculator"></i>}
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle state">
|
<td class="align-middle state">
|
||||||
@if (activity.Lines.Any())
|
@if (activity.Lines.Any() && activity.StatusTypeEnum == "Order")
|
||||||
{
|
{
|
||||||
<ProcessStateComponent StateClass="@GetProcessStatus(activity.ProcessStatusEnum)"/>
|
<ProcessStateComponent StateClass="@Utils.GetProcessStatus(activity.ProcessStatusEnum)"/>
|
||||||
}
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5" class="bg-light"></td>
|
<td colspan="5" class="bg-dark"></td>
|
||||||
<td class="align-middle text-center">Total</td>
|
<td class="align-middle text-center">Total</td>
|
||||||
<td class="align-middle text-end">@Activities.Where(x => x.StatusTypeEnum == "Order").Sum(x => x.OrderAmount)</td>
|
<td class="align-middle text-end">@Activities.Where(x => x.StatusTypeEnum == "Order").Sum(x => x.OrderAmount)</td>
|
||||||
<td colspan="4" class="bg-light"></td>
|
<td colspan="4" class="bg-dark"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -23,18 +23,18 @@ public partial class AdvisorActivityTableComponent
|
||||||
[Parameter] public List<ReportItemView> Activities { get; set; }
|
[Parameter] public List<ReportItemView> Activities { get; set; }
|
||||||
[Inject] public NavigationManager _navigator { get; set; }
|
[Inject] public NavigationManager _navigator { get; set; }
|
||||||
|
|
||||||
private static string GetProcessStatus(string processStatus)
|
// private static string GetProcessStatus(string processStatus)
|
||||||
{
|
// {
|
||||||
return processStatus.ToLower() switch
|
// return processStatus.ToLower() switch
|
||||||
{
|
// {
|
||||||
"express" => "the-fast",
|
// "express" => "the-fast",
|
||||||
"none" => "the-ugly",
|
// "none" => "the-good",
|
||||||
"picked" => "the-bad",
|
// "picked" => "the-bad",
|
||||||
"packed" => "the-good",
|
// "packed" => "the-ugly",
|
||||||
"shipped" => "the-draw",
|
// "shipped" => "the-dead",
|
||||||
_ => "the-dead"
|
// _ => ""
|
||||||
};
|
// };
|
||||||
}
|
// }
|
||||||
|
|
||||||
private void ShowOrder(string companyId, string orderId)
|
private void ShowOrder(string companyId, string orderId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
{<i class="bi-calculator"></i>}
|
{<i class="bi-calculator"></i>}
|
||||||
</td>
|
</td>
|
||||||
<td class="align-middle state">
|
<td class="align-middle state">
|
||||||
@if (activity.Lines.Any())
|
@if (activity.Lines.Any() && activity.StatusTypeEnum == "Order")
|
||||||
{
|
{
|
||||||
<ProcessStateComponent StateClass="@GetProcessStatus(activity.ProcessStatusEnum)"/>
|
<ProcessStateComponent StateClass="@GetProcessStatus(activity.ProcessStatusEnum)"/>
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,18 +24,18 @@
|
||||||
<th class="p-0" colspan="4">
|
<th class="p-0" colspan="4">
|
||||||
<div class="bg-light text-dark border border-1 rounded-3 pt-3 mb-2">
|
<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>
|
<h2 class="fw-bold text-center">@ReportItem.Company.Name</h2>
|
||||||
@if (ReportItem.StatusTypeEnum.ToLower() is "quote")
|
|
||||||
{
|
|
||||||
<h3 class="text-center">TILBUD</h3>
|
|
||||||
}
|
|
||||||
@if (ReportItem.Express)
|
@if (ReportItem.Express)
|
||||||
{
|
{
|
||||||
<h2 class="fw-bold text-center"><i class="bi-lightning-charge the-fast" style="font-size: 3rem;"></i> HASTER</h2>
|
<h2 class="fw-bold text-center"><i class="bi-lightning-charge the-fast" style="font-size: 3rem;"></i> HASTER</h2>
|
||||||
}
|
}
|
||||||
@if (ReportItem.VisitTypeEnum.ToLower() == "phone" || ReportItem.OurRef.Contains("T:"))
|
@if (ReportItem.VisitTypeEnum == "Phone" || ReportItem.OurRef.Contains("T:"))
|
||||||
{
|
{
|
||||||
<h5 class="text-center">TELEFONORDRE</h5>
|
<h5 class="text-center">TELEFONORDRE</h5>
|
||||||
}
|
}
|
||||||
|
@if (ReportItem.StatusTypeEnum is "Quote")
|
||||||
|
{
|
||||||
|
<h5 class="text-center">TILBUD</h5>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -118,9 +118,9 @@
|
||||||
@if (ReportItem.Express)
|
@if (ReportItem.Express)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4"></td>
|
<td class="bg-dark" colspan="4"></td>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<h5 class="fw-bold text-center"><i class="bi-lightning-charge the-fast" style="font-size: 1rem;"></i> HASTER</h5>
|
<h5 class="fw-bold text-end"><i class="bi-lightning-charge the-fast" style="font-size: 1rem;"></i> HASTER</h5>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
|
@ -136,14 +136,6 @@
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if (ReportItem.Express && ReportItem.ProcessStatusEnum == "Express")
|
|
||||||
{
|
|
||||||
<div class="report-item-express">
|
|
||||||
<i class="bi-lightning-charge the-fast" style="font-size: 11rem;"></i>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@code{
|
@code{
|
||||||
|
|
||||||
[Parameter]
|
[Parameter]
|
||||||
|
|
|
@ -39,4 +39,17 @@ public static class Utils
|
||||||
|
|
||||||
return dtNow > dtNext.AddDays(-14) ? "the-bad" : "the-good";
|
return dtNow > dtNext.AddDays(-14) ? "the-bad" : "the-good";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static string GetProcessStatus(string processStatus)
|
||||||
|
{
|
||||||
|
return processStatus.ToLower() switch
|
||||||
|
{
|
||||||
|
"express" => "the-fast",
|
||||||
|
"none" => "the-good",
|
||||||
|
"picked" => "the-bad",
|
||||||
|
"packed" => "the-ugly",
|
||||||
|
"shipped" => "the-dead",
|
||||||
|
_ => "question-square"
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -7,40 +7,41 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="p-0" colspan="4">
|
<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.Express)
|
@if (_reportItem.Express)
|
||||||
{
|
|
||||||
<h2 class="fw-bold text-center"><i class="bi-lightning-charge text-dark" style="font-size: 2rem;"></i> HASTER</h2>
|
|
||||||
}
|
|
||||||
@if (_reportItem.Express && _reportItem.ProcessStatusEnum == "None")
|
|
||||||
{
|
{
|
||||||
<div id="watermark">
|
<div id="watermark">
|
||||||
<i class="bi-lightning-charge text-dark" style="font-size: 11rem;"></i>
|
<i class="bi-lightning-charge text-dark" style="font-size: 11rem;"></i>
|
||||||
</div>
|
</div>
|
||||||
<AuthorizeView Roles="Admin,Office,Warehouse">
|
@if (_reportItem.ProcessStatusEnum == "None")
|
||||||
<Authorized>
|
{
|
||||||
<div class="d-print-none">
|
<AuthorizeView Roles="Admin,Office,Warehouse">
|
||||||
<div class="row">
|
<Authorized>
|
||||||
<div class="col-md-6">
|
<div class="d-print-none">
|
||||||
<button type="button" class="btn btn-warning d-block" onclick="window.print();">PRINT</button>
|
<div class="row">
|
||||||
</div>
|
<div class="col text-end">
|
||||||
<div class="col-md-6">
|
<button type="button" class="btn btn-warning d-block" onclick="window.print();">PRINT</button>
|
||||||
<button type="button" class="btn btn-warning d-block" @onclick="SetExpressState" >SÆT I GANG</button>
|
<button type="button" class="btn btn-warning d-block" @onclick="SetExpressState">SÆT I GANG</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Authorized>
|
||||||
</Authorized>
|
</AuthorizeView>
|
||||||
</AuthorizeView>
|
}
|
||||||
|
}
|
||||||
|
<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.Express)
|
||||||
|
{
|
||||||
|
<h2 class="fw-bold text-center"><i class="bi-lightning-charge text-dark" style="font-size: 2rem;"></i> HASTER</h2>
|
||||||
}
|
}
|
||||||
@if (_reportItem.VisitTypeEnum.ToLower() == "phone" || _reportItem.OurRef.Contains("T:"))
|
@if (_reportItem.VisitTypeEnum.ToLower() == "phone" || _reportItem.OurRef.Contains("T:"))
|
||||||
{
|
{
|
||||||
<h5 class="text-center">TELEFONORDRE</h5>
|
<h5 class="text-center">TELEFONORDRE</h5>
|
||||||
}
|
}
|
||||||
|
@if (_reportItem.StatusTypeEnum is "Quote")
|
||||||
|
{
|
||||||
|
<h5 class="text-center">TILBUD</h5>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -120,8 +121,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
@if (_reportItem.Express)
|
@if (_reportItem.Express)
|
||||||
{
|
{
|
||||||
<td colspan="4"></td>
|
<td class="bg-dark" colspan="4"></td>
|
||||||
<td colspan="2"><h5 class="fw-bold text-center"><i class="bi-lightning-charge text-dark" style="font-size: 2rem;"></i> HASTER</h5></td>
|
<td class="text-end" colspan="2">
|
||||||
|
<h5 class="fw-bold"><i class="bi-lightning-charge the-fast" style="font-size: 2rem;"></i> HASTER</h5>
|
||||||
|
</td>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
|
|
||||||
@if (_items.Any())
|
@if (_items.Any())
|
||||||
{
|
{
|
||||||
@foreach (var item in _items.Where(item => item.StatusTypeEnum != "Offer" && item.ProcessStatusEnum == "None"))
|
@foreach (var item in _items.Where(item => item.StatusTypeEnum.ToLower() == "order" && item.ProcessStatusEnum.ToLower() == "none"))
|
||||||
{
|
{
|
||||||
<ReportItemComponent ReportItem="@item"></ReportItemComponent>
|
<ReportItemComponent ReportItem="@item"></ReportItemComponent>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"appInfo": {
|
"appInfo": {
|
||||||
"name": "Wonky Client",
|
"name": "Wonky Client",
|
||||||
"version": "0.25.1",
|
"version": "0.25.4",
|
||||||
"rc": true,
|
"rc": true,
|
||||||
"sandBox": false,
|
"sandBox": false,
|
||||||
"image": "grumpy-coder.png"
|
"image": "grumpy-coder.png"
|
||||||
|
|
Loading…
Reference in a new issue