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.
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
|
@ -57,18 +58,18 @@
|
|||
{<i class="bi-calculator"></i>}
|
||||
</td>
|
||||
<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>
|
||||
</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-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>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -23,18 +23,18 @@ public partial class AdvisorActivityTableComponent
|
|||
[Parameter] public List<ReportItemView> Activities { get; set; }
|
||||
[Inject] public NavigationManager _navigator { get; set; }
|
||||
|
||||
private static string GetProcessStatus(string processStatus)
|
||||
{
|
||||
return processStatus.ToLower() switch
|
||||
{
|
||||
"express" => "the-fast",
|
||||
"none" => "the-ugly",
|
||||
"picked" => "the-bad",
|
||||
"packed" => "the-good",
|
||||
"shipped" => "the-draw",
|
||||
_ => "the-dead"
|
||||
};
|
||||
}
|
||||
// private static string GetProcessStatus(string processStatus)
|
||||
// {
|
||||
// return processStatus.ToLower() switch
|
||||
// {
|
||||
// "express" => "the-fast",
|
||||
// "none" => "the-good",
|
||||
// "picked" => "the-bad",
|
||||
// "packed" => "the-ugly",
|
||||
// "shipped" => "the-dead",
|
||||
// _ => ""
|
||||
// };
|
||||
// }
|
||||
|
||||
private void ShowOrder(string companyId, string orderId)
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
{<i class="bi-calculator"></i>}
|
||||
</td>
|
||||
<td class="align-middle state">
|
||||
@if (activity.Lines.Any())
|
||||
@if (activity.Lines.Any() && activity.StatusTypeEnum == "Order")
|
||||
{
|
||||
<ProcessStateComponent StateClass="@GetProcessStatus(activity.ProcessStatusEnum)"/>
|
||||
}
|
||||
|
|
|
@ -24,18 +24,18 @@
|
|||
<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)
|
||||
{
|
||||
<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>
|
||||
}
|
||||
@if (ReportItem.StatusTypeEnum is "Quote")
|
||||
{
|
||||
<h5 class="text-center">TILBUD</h5>
|
||||
}
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -118,9 +118,9 @@
|
|||
@if (ReportItem.Express)
|
||||
{
|
||||
<tr>
|
||||
<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 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>
|
||||
</tr>
|
||||
}
|
||||
|
@ -136,14 +136,6 @@
|
|||
}
|
||||
</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{
|
||||
|
||||
[Parameter]
|
||||
|
|
|
@ -39,4 +39,17 @@ public static class Utils
|
|||
|
||||
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>
|
||||
<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.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">
|
||||
<i class="bi-lightning-charge text-dark" style="font-size: 11rem;"></i>
|
||||
</div>
|
||||
@if (_reportItem.ProcessStatusEnum == "None")
|
||||
{
|
||||
<AuthorizeView Roles="Admin,Office,Warehouse">
|
||||
<Authorized>
|
||||
<div class="d-print-none">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col text-end">
|
||||
<button type="button" class="btn btn-warning d-block" onclick="window.print();">PRINT</button>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<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>
|
||||
</Authorized>
|
||||
</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:"))
|
||||
{
|
||||
<h5 class="text-center">TELEFONORDRE</h5>
|
||||
}
|
||||
@if (_reportItem.StatusTypeEnum is "Quote")
|
||||
{
|
||||
<h5 class="text-center">TILBUD</h5>
|
||||
}
|
||||
</div>
|
||||
</th>
|
||||
</tr>
|
||||
|
@ -120,8 +121,10 @@
|
|||
</tr>
|
||||
@if (_reportItem.Express)
|
||||
{
|
||||
<td 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="bg-dark" colspan="4"></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>
|
||||
</table>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
|
||||
@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>
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"appInfo": {
|
||||
"name": "Wonky Client",
|
||||
"version": "0.25.1",
|
||||
"version": "0.25.4",
|
||||
"rc": true,
|
||||
"sandBox": false,
|
||||
"image": "grumpy-coder.png"
|
||||
|
|
Loading…
Reference in a new issue