WIP: added action buttons to quote list
This commit is contained in:
parent
c5f648b799
commit
b5cf59069f
5 changed files with 114 additions and 72 deletions
|
@ -32,7 +32,7 @@
|
||||||
<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")
|
@if (ReportItem.StatusTypeEnum.ToLower() is "quote")
|
||||||
{
|
{
|
||||||
<h3 class="text-center">TILBUD @ReportItem.ESalesNumber</h3>
|
<h3 class="text-center">TILBUD <span style="font-family: monospace;">@ReportItem.ESalesNumber</span></h3>
|
||||||
}
|
}
|
||||||
@if (ReportItem.VisitTypeEnum.ToLower() == "phone" || ReportItem.OurRef.Contains("T:"))
|
@if (ReportItem.VisitTypeEnum.ToLower() == "phone" || ReportItem.OurRef.Contains("T:"))
|
||||||
{
|
{
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<h3 class="text-center">Åbne tilbud</h3>
|
<h3 class="text-center">Åbne tilbud</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-group">
|
<div class="list-group list-group-flush">
|
||||||
<div class="list-group-item bg-dark text-white">
|
<div class="list-group-item bg-dark text-white">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
|
@ -27,10 +27,10 @@
|
||||||
{
|
{
|
||||||
foreach (var quote in Quotes)
|
foreach (var quote in Quotes)
|
||||||
{
|
{
|
||||||
<a class="list-group-item list-group-item-action" href="/companies/@quote.Company.CompanyId/quotes/@quote.ActivityId">
|
<div class="list-group-item list-group-item-action">
|
||||||
<div class="row g-3">
|
<div class="row align-items-center">
|
||||||
<div class="col-sm-2" style="font-family: monospace;">
|
<div class="col-sm-2" style="font-family: monospace;">
|
||||||
@quote.ESalesNumber
|
<a class="btn btn-outline-dark d-block" href="/companies/@quote.Company.CompanyId/quotes/@quote.ActivityId">@quote.ESalesNumber</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4">
|
||||||
@quote.Company.Name
|
@quote.Company.Name
|
||||||
|
@ -41,9 +41,10 @@
|
||||||
<div class="col-sm-2 text-end">
|
<div class="col-sm-2 text-end">
|
||||||
@($"{quote.OrderAmount:N2}")
|
@($"{quote.OrderAmount:N2}")
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-3">
|
<div class="col-sm-1"><button type="button" class="btn btn-outline-danger" @onclick="() => SetQuote(2)"><i class="bi-hand-thumbs-down-fill"></i> </button></div>
|
||||||
|
<div class="col-sm-1"><button type="button" class="btn btn-outline-dark" @onclick="() => SetQuote(3)"><i class="bi-trash2-fill"></i> </button></div>
|
||||||
</div>
|
<div class="col-sm-1"><button type="button" class="btn btn-outline-success" @onclick="() => SetQuote(1)"><i class="bi-hand-thumbs-up-fill"></i> </button></div>
|
||||||
|
<div class="col-sm-1"></div>
|
||||||
@if (!string.IsNullOrWhiteSpace(quote.OfficeNote))
|
@if (!string.IsNullOrWhiteSpace(quote.OfficeNote))
|
||||||
{
|
{
|
||||||
<div class="col-sm-2"><i class="bi-pencil"></i> Note</div>
|
<div class="col-sm-2"><i class="bi-pencil"></i> Note</div>
|
||||||
|
@ -52,7 +53,7 @@
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -11,7 +11,7 @@ public partial class CrmQuotes : IDisposable
|
||||||
[Inject] public ICrmActivityHttpRepository ActivityRepo { get; set; }
|
[Inject] public ICrmActivityHttpRepository ActivityRepo { get; set; }
|
||||||
[Inject] public HttpInterceptorService Interceptor { get; set; }
|
[Inject] public HttpInterceptorService Interceptor { get; set; }
|
||||||
private List<ReportItemView> Quotes { get; set; } = new();
|
private List<ReportItemView> Quotes { get; set; } = new();
|
||||||
private bool Working = true;
|
private bool Working { get; set; } = true;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
@ -23,6 +23,15 @@ public partial class CrmQuotes : IDisposable
|
||||||
Working = false;
|
Working = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SetQuote(int status)
|
||||||
|
{
|
||||||
|
// todo - implement update quote from status
|
||||||
|
// status matches QuoteStatusEnum
|
||||||
|
// 0 - None
|
||||||
|
// 1 - Win
|
||||||
|
// 2 - Lose
|
||||||
|
// 3 - Draw
|
||||||
|
}
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
{
|
{
|
||||||
Interceptor.DisposeEvent();
|
Interceptor.DisposeEvent();
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"appInfo": {
|
"appInfo": {
|
||||||
"name": "Wonky Client",
|
"name": "Wonky Client",
|
||||||
"version": "0.85.2",
|
"version": "0.85.4",
|
||||||
"rc": true,
|
"rc": true,
|
||||||
"sandBox": false,
|
"sandBox": false,
|
||||||
"image": "grumpy-coder.png"
|
"image": "grumpy-coder.png"
|
||||||
|
|
|
@ -21,96 +21,128 @@ public class ReportItemView
|
||||||
/// Customer company info
|
/// Customer company info
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ReportItemCustomer Company { get; set; } = new();
|
public ReportItemCustomer Company { get; set; } = new();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Lines
|
/// Lines
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<ReportItemLine> Lines { get; set; } = new();
|
public List<ReportItemLine> Lines { get; set; } = new();
|
||||||
/// <summary>
|
|
||||||
/// entity id for sales rep
|
|
||||||
/// </summary>
|
|
||||||
public string SalesRepId { get; set; } = "";
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Activity entity id
|
/// Activity entity id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ActivityId { get; set; } = "";
|
public string ActivityId { get; set; } = "";
|
||||||
/// <summary>
|
|
||||||
/// Entity CreateTimestamp as string
|
|
||||||
/// </summary>
|
|
||||||
public string CreateTimestamp { get; set; } = "";
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Closed sale
|
/// Closed sale
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Closed { get; set; }
|
public bool Closed { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ProcessStatus as string
|
/// Entity CreateTimestamp as string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string ProcessStatusEnum { get; set; } = "";
|
public string CreateTimestamp { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// express flag
|
/// CRM Note
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool Express { get; set; }
|
public string CrmNote { get; set; } = "";
|
||||||
/// <summary>
|
|
||||||
/// ESales number
|
|
||||||
/// </summary>
|
|
||||||
public string ESalesNumber { get; set; } = "";
|
|
||||||
/// <summary>
|
|
||||||
/// Order amount
|
|
||||||
/// </summary>
|
|
||||||
public decimal OrderAmount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Order safe seal amount
|
|
||||||
/// </summary>
|
|
||||||
public decimal SasAmount { get; set; }
|
|
||||||
/// <summary>
|
|
||||||
/// Order date
|
|
||||||
/// </summary>
|
|
||||||
public string OrderDate { get; set; } = "";
|
|
||||||
/// <summary>
|
|
||||||
/// Office note
|
|
||||||
/// </summary>
|
|
||||||
public string OfficeNote { get; set; } = "";
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Product demo
|
/// Product demo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Demo { get; set; } = "";
|
public string Demo { get; set; } = "";
|
||||||
/// <summary>
|
|
||||||
/// Product sale resume
|
|
||||||
/// </summary>
|
|
||||||
public string Sales { get; set; } = "";
|
|
||||||
/// <summary>
|
|
||||||
/// Our reference
|
|
||||||
/// </summary>
|
|
||||||
public string OurRef { get; set; } = "";
|
|
||||||
/// <summary>
|
|
||||||
/// Customer reference
|
|
||||||
/// </summary>
|
|
||||||
public string YourRef { get; set; } = "";
|
|
||||||
/// <summary>
|
|
||||||
/// Customer reference number
|
|
||||||
/// </summary>
|
|
||||||
public string ReferenceNumber { get; set; } = "";
|
|
||||||
/// <summary>
|
|
||||||
/// Visit type enum as string
|
|
||||||
/// </summary>
|
|
||||||
public string VisitTypeEnum { get; set; } = "";
|
|
||||||
/// <summary>
|
|
||||||
/// Status type enum as string
|
|
||||||
/// </summary>
|
|
||||||
public string StatusTypeEnum { get; set; } = "";
|
|
||||||
/// <summary>
|
|
||||||
/// Customer deliver name
|
|
||||||
/// </summary>
|
|
||||||
public string DlvName { get; set; } = "";
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Customer delivery address line 1
|
/// Customer delivery address line 1
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DlvAddress1 { get; set; } = "";
|
public string DlvAddress1 { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Customer delivery address line 2
|
/// Customer delivery address line 2
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DlvAddress2 { get; set; } = "";
|
public string DlvAddress2 { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Customer deliver name
|
||||||
|
/// </summary>
|
||||||
|
public string DlvName { get; set; } = "";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Customer delivery post code and city name
|
/// Customer delivery post code and city name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DlvZipCity { get; set; } = "";
|
public string DlvZipCity { get; set; } = "";
|
||||||
|
/// <summary>
|
||||||
|
/// ESales number
|
||||||
|
/// </summary>
|
||||||
|
public string ESalesNumber { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// express flag
|
||||||
|
/// </summary>
|
||||||
|
public bool Express { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Office note
|
||||||
|
/// </summary>
|
||||||
|
public string OfficeNote { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Order amount
|
||||||
|
/// </summary>
|
||||||
|
public decimal OrderAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Order date
|
||||||
|
/// </summary>
|
||||||
|
public string OrderDate { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Our reference
|
||||||
|
/// </summary>
|
||||||
|
public string OurRef { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ProcessStatus as string
|
||||||
|
/// </summary>
|
||||||
|
public string ProcessStatusEnum { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// QuoteStatus as string
|
||||||
|
/// </summary>
|
||||||
|
public string QuoteStatusEnum { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Customer reference number
|
||||||
|
/// </summary>
|
||||||
|
public string ReferenceNumber { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Product sale resume
|
||||||
|
/// </summary>
|
||||||
|
public string Sales { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// entity id for sales rep
|
||||||
|
/// </summary>
|
||||||
|
public string SalesRepId { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Order safe seal amount
|
||||||
|
/// </summary>
|
||||||
|
public decimal SasAmount { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Status type enum as string
|
||||||
|
/// </summary>
|
||||||
|
public string StatusTypeEnum { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Visit type enum as string
|
||||||
|
/// </summary>
|
||||||
|
public string VisitTypeEnum { get; set; } = "";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Customer reference
|
||||||
|
/// </summary>
|
||||||
|
public string YourRef { get; set; } = "";
|
||||||
}
|
}
|
Loading…
Reference in a new issue