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>
|
||||
@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:"))
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<h3 class="text-center">Åbne tilbud</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-group">
|
||||
<div class="list-group list-group-flush">
|
||||
<div class="list-group-item bg-dark text-white">
|
||||
<div class="row g-3">
|
||||
<div class="col-sm-2">
|
||||
|
@ -27,10 +27,10 @@
|
|||
{
|
||||
foreach (var quote in Quotes)
|
||||
{
|
||||
<a class="list-group-item list-group-item-action" href="/companies/@quote.Company.CompanyId/quotes/@quote.ActivityId">
|
||||
<div class="row g-3">
|
||||
<div class="list-group-item list-group-item-action">
|
||||
<div class="row align-items-center">
|
||||
<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 class="col-sm-4">
|
||||
@quote.Company.Name
|
||||
|
@ -41,9 +41,10 @@
|
|||
<div class="col-sm-2 text-end">
|
||||
@($"{quote.OrderAmount:N2}")
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
|
||||
</div>
|
||||
<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 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))
|
||||
{
|
||||
<div class="col-sm-2"><i class="bi-pencil"></i> Note</div>
|
||||
|
@ -52,7 +53,7 @@
|
|||
</div>
|
||||
}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -11,7 +11,7 @@ public partial class CrmQuotes : IDisposable
|
|||
[Inject] public ICrmActivityHttpRepository ActivityRepo { get; set; }
|
||||
[Inject] public HttpInterceptorService Interceptor { get; set; }
|
||||
private List<ReportItemView> Quotes { get; set; } = new();
|
||||
private bool Working = true;
|
||||
private bool Working { get; set; } = true;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
|
@ -23,6 +23,15 @@ public partial class CrmQuotes : IDisposable
|
|||
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()
|
||||
{
|
||||
Interceptor.DisposeEvent();
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"appInfo": {
|
||||
"name": "Wonky Client",
|
||||
"version": "0.85.2",
|
||||
"version": "0.85.4",
|
||||
"rc": true,
|
||||
"sandBox": false,
|
||||
"image": "grumpy-coder.png"
|
||||
|
|
|
@ -21,96 +21,128 @@ public class ReportItemView
|
|||
/// Customer company info
|
||||
/// </summary>
|
||||
public ReportItemCustomer Company { get; set; } = new();
|
||||
|
||||
/// <summary>
|
||||
/// Lines
|
||||
/// </summary>
|
||||
public List<ReportItemLine> Lines { get; set; } = new();
|
||||
/// <summary>
|
||||
/// entity id for sales rep
|
||||
/// </summary>
|
||||
public string SalesRepId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Activity entity id
|
||||
/// </summary>
|
||||
public string ActivityId { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Entity CreateTimestamp as string
|
||||
/// </summary>
|
||||
public string CreateTimestamp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Closed sale
|
||||
/// </summary>
|
||||
public bool Closed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// ProcessStatus as string
|
||||
/// Entity CreateTimestamp as string
|
||||
/// </summary>
|
||||
public string ProcessStatusEnum { get; set; } = "";
|
||||
public string CreateTimestamp { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// express flag
|
||||
/// CRM Note
|
||||
/// </summary>
|
||||
public bool Express { 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; } = "";
|
||||
public string CrmNote { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Product demo
|
||||
/// </summary>
|
||||
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>
|
||||
/// Customer delivery address line 1
|
||||
/// </summary>
|
||||
public string DlvAddress1 { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Customer delivery address line 2
|
||||
/// </summary>
|
||||
public string DlvAddress2 { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Customer deliver name
|
||||
/// </summary>
|
||||
public string DlvName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Customer delivery post code and city name
|
||||
/// </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