build v.314
reorder activity header add property salesRepName to activity header code cleanup
This commit is contained in:
parent
03af77e0f0
commit
fe8950579f
27 changed files with 229 additions and 236 deletions
|
@ -27,18 +27,18 @@
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Dato</th>
|
<th scope="row">Dato</th>
|
||||||
<td>@ReportItem.OrderDate</td>
|
<td>@ReportItem.OrderDate</td>
|
||||||
<th scope="row">Konto</th>
|
<th scope="row">Vores Ref</th>
|
||||||
<td>@ReportItem.Company.Account</td>
|
<td>@ReportItem.OurRef</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Telefon</th>
|
<th scope="row">Konto</th>
|
||||||
<td>@ReportItem.Company.Phone</td>
|
<td>@ReportItem.Company.Account</td>
|
||||||
<th scope="col">Køber</th>
|
<th scope="col">Køber</th>
|
||||||
<td>@ReportItem.YourRef</td>
|
<td>@ReportItem.YourRef</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">CVR/VAT</th>
|
<th scope="col">Telefon</th>
|
||||||
<td>@ReportItem.Company.VatNumber</td>
|
<td>@ReportItem.Company.Phone</td>
|
||||||
<th scope="col">Rekvisition</th>
|
<th scope="col">Rekvisition</th>
|
||||||
<td>@ReportItem.ReferenceNumber</td>
|
<td>@ReportItem.ReferenceNumber</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -68,11 +68,13 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Email</th>
|
<th scope="col">Email</th>
|
||||||
<td colspan="3">@ReportItem.Company.Email</td>
|
<td>@ReportItem.Company.Email</td>
|
||||||
|
<th scope="col">Sælger</th>
|
||||||
|
<td>@SalesRep</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">Vores Ref</th>
|
<th scope="col">CVR/VAT</th>
|
||||||
<td>@ReportItem.OurRef</td>
|
<td>@ReportItem.Company.VatNumber</td>
|
||||||
<th scope="row">Oprettet af</th>
|
<th scope="row">Oprettet af</th>
|
||||||
<td>@ReportItem.CreatedBy</td>
|
<td>@ReportItem.CreatedBy</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -80,10 +82,3 @@
|
||||||
<tfoot>
|
<tfoot>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@code {
|
|
||||||
|
|
||||||
[Parameter]
|
|
||||||
public ReportItemView ReportItem { get; set; } = new();
|
|
||||||
|
|
||||||
}
|
|
10
Wonky.Client/Components/ActivityHeaderComponent.razor.cs
Normal file
10
Wonky.Client/Components/ActivityHeaderComponent.razor.cs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
namespace Wonky.Client.Components;
|
||||||
|
|
||||||
|
public partial class ActivityHeaderComponent
|
||||||
|
{
|
||||||
|
[Parameter] public ReportItemView ReportItem { get; set; } = new();
|
||||||
|
[Parameter] public string SalesRep { get; set; } = "";
|
||||||
|
}
|
|
@ -23,83 +23,89 @@
|
||||||
<div class="row mt-2 d-flex g-3">
|
<div class="row mt-2 d-flex g-3">
|
||||||
@foreach (var company in CompanyList)
|
@foreach (var company in CompanyList)
|
||||||
{
|
{
|
||||||
<div class="col-sm-6">
|
<div class="mx-3 card px-0 col-sm-12 col-lg-6 col-xxl-4" style="width:500px;">
|
||||||
|
@*
|
||||||
|
<div class="row g-0">
|
||||||
|
|
||||||
|
<div class="col-sm-12 col-md-6 col-lg-4 col-xl-3">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
@if (string.IsNullOrWhiteSpace(company.Blocked))
|
*@
|
||||||
{
|
@if (string.IsNullOrWhiteSpace(company.Blocked))
|
||||||
<div class="card-header fw-bold @(company.HasFolded == 1 ? "alert alert-dark" : "alert alert-success")">
|
{
|
||||||
@company.Name @(company.HasFolded == 1 ? "(OPHØRT)" : "")
|
<div class="card-header fw-bold @(company.HasFolded == 1 ? "alert alert-dark" : "alert alert-success")">
|
||||||
</div>
|
@company.Name @(company.HasFolded == 1 ? "(OPHØRT)" : "")
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
<div class="card-header fw-bold alert alert-danger">
|
|
||||||
@company.Name (spærret med kode '@company.Blocked')
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
<div class="card-body">
|
|
||||||
<table class="table">
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Konto</th>
|
|
||||||
<td>@company.Account</td>
|
|
||||||
<th scope="row">Org Nr.</th>
|
|
||||||
<td>@(string.IsNullOrWhiteSpace(company.VatNumber) ? "mangler" : company.VatNumber) </td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Telefon</th>
|
|
||||||
<td colspan="3">@company.Phone</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Adresse</th>
|
|
||||||
<td colspan="3">@company.Address1 @(string.IsNullOrWhiteSpace(company.Address2) ? "" : ",") @company.Address2</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Post By</th>
|
|
||||||
<td colspan="3">@company.CountryCode.ToUpper()-@company.ZipCode @company.City</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">
|
|
||||||
Sælgernr.
|
|
||||||
</th>
|
|
||||||
<td>
|
|
||||||
@company.SalesRep
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Sidst besøgt</th>
|
|
||||||
<td>
|
|
||||||
@(Mapper.MapVisitState(company.LastVisit) == "the-draw" ? "?" : company.LastVisit)
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<th scope="row">Næste besøg</th>
|
|
||||||
<td>
|
|
||||||
@(Mapper.MapVisitState(company.LastVisit) == "the-draw" ? "?" : company.NextVisit)
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="card-footer">
|
}
|
||||||
<div class="row">
|
else
|
||||||
<div class="col">
|
{
|
||||||
<button class="btn btn-sm btn-danger" @onclick="@(() => ShowInvoiceList(company.CompanyId))">Faktura</button>
|
<div class="card-header fw-bold alert alert-danger">
|
||||||
</div>
|
@company.Name (spærret med kode '@company.Blocked')
|
||||||
<div class="col">
|
</div>
|
||||||
<button class="btn btn-sm btn-warning" @onclick="@(() => ShowActivityList(company.CompanyId))">Aktiviteter</button>
|
}
|
||||||
</div>
|
<div class="card-body mx-0">
|
||||||
<div class="col">
|
<table class="m-0 table table-sm table-striped table-light">
|
||||||
<button class="btn btn-sm btn-success" @onclick="@(() => ShowInventory(company.CompanyId))">Produkter</button>
|
<tr>
|
||||||
</div>
|
<th scope="row" class="text-sm-start align-middle">Konto</th>
|
||||||
<div class="col">
|
<td class="text-sm-start align-middle">@company.Account</td>
|
||||||
<a class="btn btn-sm btn-primary" href="/office/customers/@CountryCode/@company.CompanyId/order">Bestilling</a>
|
<th scope="row" class="text-sm-start align-middle">Org Nr.</th>
|
||||||
</div>
|
<td class="text-sm-start align-middle">@(string.IsNullOrWhiteSpace(company.VatNumber) ? "mangler" : company.VatNumber) </td>
|
||||||
<div class="col">
|
</tr>
|
||||||
<button class="btn btn-sm btn-secondary" @onclick="() => RequestBusinessCentralData(company.CompanyId, true)">BC <i class="bi-database-down"></i></button>
|
<tr>
|
||||||
</div>
|
<th scope="row" class="text-sm-start align-middle">Telefon</th>
|
||||||
|
<td colspan="3" class="text-sm-start align-middle">@company.Phone</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="text-sm-start align-middle">Adresse</th>
|
||||||
|
<td colspan="3" class="text-sm-start align-middle">@company.Address1 @(string.IsNullOrWhiteSpace(company.Address2) ? "" : ",") @company.Address2</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="text-sm-start align-middle">Post By</th>
|
||||||
|
<td colspan="3" class="text-sm-start align-middle">@company.CountryCode.ToUpper()-@company.ZipCode @company.City</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="text-sm-start align-middle">
|
||||||
|
Sælgernr.
|
||||||
|
</th>
|
||||||
|
<td colspan="3" class="text-sm-start align-middle">
|
||||||
|
@company.SalesRep
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="text-sm-start align-middle">Sidst besøgt</th>
|
||||||
|
<td colspan="3" class="text-sm-start align-middle">
|
||||||
|
@(Mapper.MapVisitState(company.LastVisit) == "the-draw" ? "?" : company.LastVisit)
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th scope="row" class="text-sm-start align-middle">Næste besøg</th>
|
||||||
|
<td class="text-sm-start align-middle">
|
||||||
|
@(Mapper.MapVisitState(company.LastVisit) == "the-draw" ? "?" : company.NextVisit)
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
<td class="align-middle">
|
||||||
|
<button class="btn btn-sm btn-secondary w-100" @onclick="() => RequestBusinessCentralData(company.CompanyId, true)"><i class="bi-arrow-repeat"></i> BC</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="row">
|
||||||
|
<div class="px-1 col-sm-3">
|
||||||
|
<button class="btn btn-sm btn-danger w-100" @onclick="@(() => ShowInvoiceList(company.CompanyId))"> Salg</button>
|
||||||
|
</div>
|
||||||
|
<div class="px-1 col-sm-3">
|
||||||
|
<button class="btn btn-sm btn-warning w-100" @onclick="@(() => ShowActivityList(company.CompanyId))">Aktivitet</button>
|
||||||
|
</div>
|
||||||
|
<div class="px-1 col-sm-3">
|
||||||
|
<button class="btn btn-sm btn-success w-100" @onclick="@(() => ShowInventory(company.CompanyId))">Produkt</button>
|
||||||
|
</div>
|
||||||
|
<div class="px-1 col-sm-3">
|
||||||
|
<a class="btn btn-sm btn-primary w-100" href="/office/customers/@CountryCode/@company.CompanyId/order">Bestilling</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
// </div>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<OfficeCustomerInvoiceListOverlay Company="@SelectedCompany" InvoiceList="@InvoiceList" @ref="@InvoiceListOverlay"/>
|
<OfficeCustomerInvoiceListOverlay Company="@SelectedCompany" InvoiceList="@InvoiceList" @ref="@InvoiceListOverlay"/>
|
||||||
|
@ -109,4 +115,4 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<div>Ingen data</div>
|
<div>Ingen data</div>
|
||||||
}
|
}
|
|
@ -73,13 +73,13 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="5"></td>
|
<td colspan="6"></td>
|
||||||
<td class="text-end">@(Activities.Sum(x => x.SasAmount))</td>
|
<td class="text-end">@(Activities.Sum(x => x.SasAmount))</td>
|
||||||
<td class="text-end">@(Activities.Sum(x => x.OrderAmount))</td>
|
<td class="text-end">@(Activities.Sum(x => x.OrderAmount))</td>
|
||||||
<td colspan="4"></td>
|
<td colspan="4"></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="6" class="text-end">TOTAL</td>
|
<td colspan="7" class="text-end">TOTAL</td>
|
||||||
<td class="text-end">@(Activities.Sum(x => x.SasAmount) + Activities.Sum(x => x.OrderAmount))</td>
|
<td class="text-end">@(Activities.Sum(x => x.SasAmount) + Activities.Sum(x => x.OrderAmount))</td>
|
||||||
<td colspan="4"></td>
|
<td colspan="4"></td>
|
||||||
</tr>
|
</tr>
|
|
@ -19,7 +19,7 @@ using Wonky.Entity.Views;
|
||||||
|
|
||||||
namespace Wonky.Client.Components;
|
namespace Wonky.Client.Components;
|
||||||
|
|
||||||
public partial class ActivityListComponent
|
public partial class ReportActivityListComponent
|
||||||
{
|
{
|
||||||
[Inject] public NavigationManager Navigator { get; set; }
|
[Inject] public NavigationManager Navigator { get; set; }
|
||||||
[Parameter] public List<ReportItemView> Activities { get; set; } = new();
|
[Parameter] public List<ReportItemView> Activities { get; set; } = new();
|
|
@ -15,8 +15,9 @@
|
||||||
|
|
||||||
|
|
||||||
@using Wonky.Client.Helpers
|
@using Wonky.Client.Helpers
|
||||||
|
@*
|
||||||
<span>ReportActivityListShowDocumentCallbackComponent.razor</span>
|
called via supervisor -> advisor -> activity button
|
||||||
|
*@
|
||||||
@if (Activities.Any())
|
@if (Activities.Any())
|
||||||
{
|
{
|
||||||
<table class="table table-sm table-bordered table-striped">
|
<table class="table table-sm table-bordered table-striped">
|
||||||
|
|
|
@ -19,7 +19,7 @@ using Microsoft.AspNetCore.Components;
|
||||||
|
|
||||||
namespace Wonky.Client.Components;
|
namespace Wonky.Client.Components;
|
||||||
|
|
||||||
public partial class ReportDescriptionComponent
|
public partial class ReportLedgerDescriptionComponent
|
||||||
{
|
{
|
||||||
[Parameter] public ReportDataView ReportDataView { get; set; } = new();
|
[Parameter] public ReportDataView ReportDataView { get; set; } = new();
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<th class="text-center" colspan="4" scope="col">Måneds Resultat</th>
|
<th class="text-center" colspan="4" scope="col">Måneds Resultat</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="border-bottom">
|
<tr class="border-bottom">
|
||||||
<td>SALG</td>
|
<th scope="col">AKTIVITET</th>
|
||||||
<th class="text-end" scope="col">Besøg</th>
|
<th class="text-end" scope="col">Besøg</th>
|
||||||
<th class="text-end" scope="col">Demo</th>
|
<th class="text-end" scope="col">Demo</th>
|
||||||
<th class="text-end" scope="col">Salg</th>
|
<th class="text-end" scope="col">Salg</th>
|
||||||
|
@ -65,62 +65,62 @@
|
||||||
</tr>
|
</tr>
|
||||||
@* PHONE row *@
|
@* PHONE row *@
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">TELEFON</th>
|
<th scope="row">TLF</th>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.PhoneCount</td>
|
<td class="text-end">@ReportData.PhoneCount</td>
|
||||||
<td class="text-end border-end">@ReportData.PhoneTurnover</td>
|
<td class="text-end border-end">@ReportData.PhoneTurnover</td>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.PhoneCountMonth</td>
|
<td class="text-end">@ReportData.PhoneCountMonth</td>
|
||||||
<td class="text-end">@ReportData.PhoneTurnoverMonth</td>
|
<td class="text-end">@ReportData.PhoneTurnoverMonth</td>
|
||||||
</tr>
|
</tr>
|
||||||
@* WEB row *@
|
@* WEB row *@
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">WEB</th>
|
<th scope="row">WEB</th>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.WebCount</td>
|
<td class="text-end">@ReportData.WebCount</td>
|
||||||
<td class="text-end border-end">@ReportData.WebTurnover</td>
|
<td class="text-end border-end">@ReportData.WebTurnover</td>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.WebCountMonth</td>
|
<td class="text-end">@ReportData.WebCountMonth</td>
|
||||||
<td class="text-end">@ReportData.WebTurnoverMonth</td>
|
<td class="text-end">@ReportData.WebTurnoverMonth</td>
|
||||||
</tr>
|
</tr>
|
||||||
@* SUMMARY row *@
|
@* SUMMARY row *@
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">NORMAL SALG</th>
|
<th scope="row">SALG</th>
|
||||||
<td class=""></td>
|
<td class="text-end">@ReportData.TotalVisitCount</td>
|
||||||
<td class="bg-light"></td>
|
<td class="text-end">@ReportData.TotalDemoCount</td>
|
||||||
<td class="bg-light"></td>
|
<td class="text-end">@ReportData.TotalSaleCount</td>
|
||||||
<td class="text-end fw-bold border-end">@(ReportData.NormalTurnover)</td>
|
<td class="text-end fw-bold border-end">@(ReportData.NormalTurnover)</td>
|
||||||
<td class="bg-light"></td>
|
<td class="text-end">@ReportData.TotalVisitCountMonth</td>
|
||||||
<td class="bg-light"></td>
|
<td class="text-end">@ReportData.TotalDemoCountMonth</td>
|
||||||
<td class="bg-light"></td>
|
<td class="text-end">@ReportData.TotalSaleCountMonth</td>
|
||||||
<td class="text-end fw-bold">@(ReportData.NormalTurnoverMonth)</td>
|
<td class="text-end fw-bold">@(ReportData.NormalTurnoverMonth)</td>
|
||||||
</tr>
|
</tr>
|
||||||
@* SAS row *@
|
@* SAS row *@
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">SAS</th>
|
<th scope="row">SAS</th>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.SasCount</td>
|
<td class="text-end">@ReportData.SasCount</td>
|
||||||
<td class="text-end fw-bold border-end">@ReportData.SasTurnover</td>
|
<td class="text-end fw-bold border-end">@ReportData.SasTurnover</td>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="bg-light"></td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.SasCountMonth</td>
|
<td class="text-end">@ReportData.SasCountMonth</td>
|
||||||
<td class="text-end fw-bold">@ReportData.SasTurnoverMonth</td>
|
<td class="text-end fw-bold">@ReportData.SasTurnoverMonth</td>
|
||||||
</tr>
|
</tr>
|
||||||
@* TOTAL summarry row *@
|
@* TOTAL summarry row *@
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">TOTAL SALG</th>
|
<th>SUM</th>
|
||||||
<td class="text-end">@ReportData.TotalVisitCount</td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.TotalDemoCount</td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.TotalSaleCount</td>
|
<td></td>
|
||||||
<td class="text-end border-end">@ReportData.TotalTurnover</td>
|
<td class="text-end border-end">@ReportData.TotalTurnover</td>
|
||||||
<td class="text-end">@ReportData.TotalVisitCountMonth</td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.TotalDemoCountMonth</td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.TotalSaleCountMonth</td>
|
<td></td>
|
||||||
<td class="text-end">@ReportData.TotalTurnoverMonth</td>
|
<td class="text-end">@ReportData.TotalTurnoverMonth</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
|
@ -124,7 +124,7 @@ public class CountryPriceCatalogRepository : ICountryPriceCatalogRepository
|
||||||
public async Task<ProductDetailView> GetProductDetailView(string salesItemId)
|
public async Task<ProductDetailView> GetProductDetailView(string salesItemId)
|
||||||
{
|
{
|
||||||
var detailView = await _client
|
var detailView = await _client
|
||||||
.GetFromJsonAsync<ProductDetailView>($"{_api.CountryPriceCatalog}/{salesItemId}");
|
.GetFromJsonAsync<ProductDetailView>($"{_api.CountryPriceCatalog}/item/{salesItemId}");
|
||||||
return detailView ?? new ProductDetailView();
|
return detailView ?? new ProductDetailView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ public class CountryProductCatalogRepository : ICountryProductCatalogRepository
|
||||||
public async Task<ProductDetailView> GetProductDetailView(string salesItemId)
|
public async Task<ProductDetailView> GetProductDetailView(string salesItemId)
|
||||||
{
|
{
|
||||||
var detailView = await _client
|
var detailView = await _client
|
||||||
.GetFromJsonAsync<ProductDetailView>($"{_api.CountryProductCatalog}/{salesItemId}");
|
.GetFromJsonAsync<ProductDetailView>($"{_api.CountryProductCatalog}/item/{salesItemId}");
|
||||||
return detailView ?? new ProductDetailView();
|
return detailView ?? new ProductDetailView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<div class="modal-dialog modal-dialog-scrollable modal-fullscreen">
|
<div class="modal-dialog modal-dialog-scrollable modal-fullscreen">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h2 class="modal-title">Salgsfaktura @(Invoice.DocumentNumber.Split("-")[1])</h2>
|
<h2 class="modal-title">Info fra @(Invoice.DocumentNumber.Split("-")[1])</h2>
|
||||||
<button type="button" class="btn btn-danger" @onclick="@Hide" data-bs-dismiss="modal" aria-label="Luk"><i class="bi-x-lg"></i></button>
|
<button type="button" class="btn btn-danger" @onclick="@Hide" data-bs-dismiss="modal" aria-label="Luk"><i class="bi-x-lg"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
@ -79,7 +79,6 @@
|
||||||
<th class="text-end" scope="col">Pris</th>
|
<th class="text-end" scope="col">Pris</th>
|
||||||
<th class="text-end" scope="col">Rabat</th>
|
<th class="text-end" scope="col">Rabat</th>
|
||||||
<th class="text-end" scope="col">Beløb</th>
|
<th class="text-end" scope="col">Beløb</th>
|
||||||
<th class="text-center" scope="col">SAS</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -92,32 +91,12 @@
|
||||||
<td class="text-end">@line.Price</td>
|
<td class="text-end">@line.Price</td>
|
||||||
<td class="text-end">@line.Discount</td>
|
<td class="text-end">@line.Discount</td>
|
||||||
<td class="text-end">@line.LineAmount</td>
|
<td class="text-end">@line.LineAmount</td>
|
||||||
<td class="text-center"><i class="bi- @(line.Sas ? "bi-check-square" : "bi-square")"></i></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
@*
|
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="text-end">Salg</td>
|
<td colspan="5" class="text-end">Beløb</td>
|
||||||
<td class="text-end">@NormalAmount</td>
|
|
||||||
<td colspan="2"></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" class="text-end">Heraf SAS</td>
|
|
||||||
<td></td>
|
|
||||||
<td class="text-end">@SasAmount</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td colspan="3" class="text-end">Rabat</td>
|
|
||||||
<td></td>
|
|
||||||
<td class="text-end">@DiscountAmount</td>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
*@
|
|
||||||
<tr>
|
|
||||||
<td colspan="5" class="text-end">Faktura beløb</td>
|
|
||||||
<td class="text-end">@Invoice.InvoiceAmount</td>
|
<td class="text-end">@Invoice.InvoiceAmount</td>
|
||||||
<td colspan="1"></td>
|
<td colspan="1"></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
</div>
|
</div>
|
||||||
@if (ReportStatusView.ReportItems.Any())
|
@if (ReportStatusView.ReportItems.Any())
|
||||||
{
|
{
|
||||||
<ActivityListComponent Activities="ReportStatusView.ReportItems" ViewAs="advisor"/>
|
<ReportActivityListComponent Activities="ReportStatusView.ReportItems" ViewAs="advisor"/>
|
||||||
}
|
}
|
||||||
@if (Working)
|
@if (Working)
|
||||||
{
|
{
|
||||||
|
|
|
@ -185,13 +185,13 @@
|
||||||
@if (_activities.Any())
|
@if (_activities.Any())
|
||||||
{
|
{
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<ActivityListComponent Activities="_activities" ViewAs="advisor"/>
|
<ReportActivityListComponent Activities="_activities" ViewAs="advisor"/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@* ledger summaries calculated *@
|
@* ledger summaries calculated *@
|
||||||
<ReportLedgerActivityComponent ReportData="Report.Figures"/>
|
<ReportLedgerSummaryComponent ReportData="Report.Figures"/>
|
||||||
</div>
|
</div>
|
||||||
</EditForm>
|
</EditForm>
|
||||||
|
|
||||||
|
|
|
@ -45,14 +45,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="w-75">
|
<div class="w-75">
|
||||||
<ReportDescriptionComponent ReportDataView="Report.ReportData"/>
|
<ReportLedgerDescriptionComponent ReportDataView="Report.ReportData"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-25">
|
<div class="w-25">
|
||||||
<ReportLedgerDistanceComponent ReportDataView="Report.ReportData"/>
|
<ReportLedgerDistanceComponent ReportDataView="Report.ReportData"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ActivityListComponent Activities="Report.ReportItems" ViewAs="advisor"/>
|
<ReportActivityListComponent Activities="Report.ReportItems" ViewAs="advisor"/>
|
||||||
<ReportLedgerActivityComponent ReportData="Report.ReportData"/>
|
<ReportLedgerSummaryComponent ReportData="Report.ReportData"/>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,10 +23,11 @@
|
||||||
<div class="card col-md-4">
|
<div class="card col-md-4">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">
|
<h5 class="card-title">
|
||||||
@_businessInfo.Name
|
Firmainfo
|
||||||
</h5>
|
</h5>
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
<i class="bi-card-heading"></i> @_businessInfo.Account<br/>
|
<i class="bi-card-heading"></i> @_businessInfo.Name<br/>
|
||||||
|
<i class="bi-card-text"></i> @_businessInfo.Account<br/>
|
||||||
<i class="bi-phone"></i> @_businessInfo.Phone<br/>
|
<i class="bi-phone"></i> @_businessInfo.Phone<br/>
|
||||||
<i class="bi-at"></i> @_businessInfo.Email<br/>
|
<i class="bi-at"></i> @_businessInfo.Email<br/>
|
||||||
</p>
|
</p>
|
||||||
|
@ -38,18 +39,19 @@
|
||||||
Leveringsadresse
|
Leveringsadresse
|
||||||
</h5>
|
</h5>
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
@_businessInfo.Address1<br/>
|
<i class="bi-card-heading"></i> @_businessInfo.Address1<br/>
|
||||||
@_businessInfo.Address2<br/>
|
<i class="bi-card-text"></i> @_businessInfo.Address2<br/>
|
||||||
@_businessInfo.ZipCode @_businessInfo.City<br/>
|
<i class="bi-pin-map"></i> @_businessInfo.ZipCode @_businessInfo.City<br/>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card col-md-4">
|
<div class="card col-md-4">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">
|
<h5 class="card-title">
|
||||||
@_advisorInfo.Name
|
Innotec Konsulent
|
||||||
</h5>
|
</h5>
|
||||||
<p class="card-text">
|
<p class="card-text">
|
||||||
|
<i class="bi-card-heading"></i> @_advisorInfo.Name<br/>
|
||||||
<i class="bi-phone"></i> @_advisorInfo.Phone<br/>
|
<i class="bi-phone"></i> @_advisorInfo.Phone<br/>
|
||||||
<i class="bi-at"></i> @_advisorInfo.Email<br/>
|
<i class="bi-at"></i> @_advisorInfo.Email<br/>
|
||||||
</p>
|
</p>
|
||||||
|
@ -73,17 +75,17 @@
|
||||||
@foreach (var line in DraftProvider.Draft.Items)
|
@foreach (var line in DraftProvider.Draft.Items)
|
||||||
{
|
{
|
||||||
<tr>
|
<tr>
|
||||||
<td>@line.Item.Sku</td>
|
<td class="align-middle">@line.Item.Sku</td>
|
||||||
<td>@line.Item.Name</td>
|
<td class="align-middle">@line.Item.Name</td>
|
||||||
<td>@line.Quantity</td>
|
<td class="align-middle">@line.Quantity</td>
|
||||||
<td><button class="btn btn-danger" @onclick="() => RemoveItem(line.Item.Sku)" >Slet</button></td>
|
<td><button class="btn btn-danger" @onclick="() => RemoveItem(line.Item.Sku)" >Slet</button></td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
|
<td class="align-middle text-end"><span class="px-3 pt-2 badge rounded-pill bg-info text-bg-info">kladde udløber efter @(DraftProvider.Draft.TimeToLiveInSeconds/60)m</span></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td></td>
|
<td class="text-end"><a class="btn btn-primary" href="/b2b/@CountryCode/@CompanyId/order/new" >Vis Bestilling</a></td>
|
||||||
<td><button class="btn btn-primary">Send bestilling</button></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -34,11 +34,11 @@ public partial class BusinessCustomerLandingPage : IDisposable
|
||||||
private List<ProductInventoryItemView> _productInventory = new();
|
private List<ProductInventoryItemView> _productInventory = new();
|
||||||
private ApiConfig _config = new();
|
private ApiConfig _config = new();
|
||||||
private B2BProductPriceHistoryOverlay PriceHistoryOverlay { get; set; }
|
private B2BProductPriceHistoryOverlay PriceHistoryOverlay { get; set; }
|
||||||
private string _price = "0";
|
// private string _price = "0";
|
||||||
private string _quantity = "1";
|
// private string _quantity = "1";
|
||||||
private string _productName = "";
|
private string _productName = "";
|
||||||
private ItemSelect _selectedItem = new();
|
private ItemSelect _selectedItem = new();
|
||||||
private string _sku = "";
|
// private string _sku = "";
|
||||||
private B2BGetOrderQuantityOverlay GetQuantity { get; set; }
|
private B2BGetOrderQuantityOverlay GetQuantity { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ public partial class BusinessCustomerLandingPage : IDisposable
|
||||||
{
|
{
|
||||||
ItemNo = sku,
|
ItemNo = sku,
|
||||||
Quantity = $"{_productHistory[0].Quantity}",
|
Quantity = $"{_productHistory[0].Quantity}",
|
||||||
Rate = $"{_productHistory[0].Price}",
|
Rate = "0",
|
||||||
};
|
};
|
||||||
GetQuantity.Show();
|
GetQuantity.Show();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1,18 @@
|
||||||
|
@* Copyright (C) 2022 FCS Frede's Computer Services.
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU Affero General Public License as
|
||||||
|
// published by the Free Software Foundation, either version 3 of the
|
||||||
|
// License, or (at your option) any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU Affero General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU Affero General Public License
|
||||||
|
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||||
|
*@
|
||||||
|
|
||||||
|
@attribute [Authorize(Roles = "EShop")]
|
||||||
@page "/b2b/{countryCode}/{companyId}/order/new"
|
@page "/b2b/{countryCode}/{companyId}/order/new"
|
||||||
|
@using Microsoft.AspNetCore.Authorization
|
||||||
|
|
|
@ -43,6 +43,7 @@ public partial class BusinessOrderViewPage
|
||||||
private ActivityDto Activity { get; set; } = new();
|
private ActivityDto Activity { get; set; } = new();
|
||||||
private DateTime SelectedDate { get; set; }
|
private DateTime SelectedDate { get; set; }
|
||||||
private bool Working { get; set; } = true;
|
private bool Working { get; set; } = true;
|
||||||
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
@ -52,40 +53,15 @@ public partial class BusinessOrderViewPage
|
||||||
// get info for logged in user
|
// get info for logged in user
|
||||||
UserInfo = await UserInfoService.GetUserInfo();
|
UserInfo = await UserInfoService.GetUserInfo();
|
||||||
|
|
||||||
|
SelectedDate = DateTime.Now;
|
||||||
|
var today = $"{SelectedDate:yyyy-MM-dd}";
|
||||||
|
|
||||||
|
Activity.ActivityDate = today;
|
||||||
Activity.ActivityVisitEnum = "web";
|
Activity.ActivityVisitEnum = "web";
|
||||||
Activity.ActivityTypeEnum = "phone";
|
Activity.ActivityTypeEnum = "phone";
|
||||||
Activity.ActivityStatusEnum = "order";
|
Activity.ActivityStatusEnum = "order";
|
||||||
Activity.Express = true;
|
Activity.Express = true;
|
||||||
Activity.OurRef = $"TLF:{UserInfo.FirstName}";
|
Activity.OurRef = $"WEB:{UserInfo.FirstName}";
|
||||||
|
|
||||||
// setup edit context
|
|
||||||
// ActivityContext = new EditContext(Activity);
|
|
||||||
// ActivityContext.OnFieldChanged += HandleFieldChanged;
|
|
||||||
// ActivityContext.OnValidationStateChanged += ValidationChanged;
|
|
||||||
// // fetch customer
|
|
||||||
// Company = await CustomerRepo.GetByCustomerId(CountryCode, CompanyId);
|
|
||||||
// Logger.LogDebug("OfficeOrderCreate => Customer => {}", JsonSerializer.Serialize(Company));
|
|
||||||
// construct today's workdate
|
|
||||||
// Initialize date variable
|
|
||||||
SelectedDate = DateTime.Now;
|
|
||||||
var today = $"{SelectedDate:yyyy-MM-dd}";
|
|
||||||
Activity.ActivityDate = today;
|
|
||||||
// initiate a sync to ensure up-to-date product history
|
|
||||||
// if (Company.HistorySync != today)
|
|
||||||
// {
|
|
||||||
// Company.HistorySync = await HistoryRepo.RequestErpToCrmSync(CompanyId, Company.HistorySync, false);
|
|
||||||
// Logger.LogDebug("OfficeOrderCreate => RequestErpToCrmSync <= {}", Company.HistorySync);
|
|
||||||
// }
|
|
||||||
// fetch invoices
|
|
||||||
// CompanyInvoices = await HistoryRepo.GetInvoiceList(CountryCode, CompanyId);
|
|
||||||
// Logger.LogDebug("OfficeOrderCreate => Invoices => {}", JsonSerializer.Serialize(CompanyInvoices));
|
|
||||||
// fetch activities
|
|
||||||
// CompanyActivities = await CountryActivityRepo.GetActivityList(CompanyId);
|
|
||||||
// Logger.LogDebug("OfficeOrderCreate => Activities => {}", JsonSerializer.Serialize(CompanyActivities));
|
|
||||||
// fetch inventory
|
|
||||||
// CompanyInventory = await HistoryRepo.GetInventory(CountryCode, CompanyId);
|
|
||||||
// CompanyInventory = CompanyInventory.OrderBy(x => x.Description).ToList();
|
|
||||||
// Logger.LogDebug("OfficeOrderCreate => Inventory => {}", JsonSerializer.Serialize(CompanyInventory));
|
|
||||||
// get sales rep info
|
// get sales rep info
|
||||||
// SalesRep = await UserRepo.GetUserInfo(Company.SalesRepId);
|
// SalesRep = await UserRepo.GetUserInfo(Company.SalesRepId);
|
||||||
// Logger.LogDebug("OfficeOrderCreate => SalesRep => {}", JsonSerializer.Serialize(SalesRep));
|
// Logger.LogDebug("OfficeOrderCreate => SalesRep => {}", JsonSerializer.Serialize(SalesRep));
|
||||||
|
|
|
@ -48,15 +48,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="w-75">
|
<div class="w-75">
|
||||||
<ReportDescriptionComponent ReportDataView="Report.ReportData"/>
|
<ReportLedgerDescriptionComponent ReportDataView="Report.ReportData"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-25">
|
<div class="w-25">
|
||||||
<ReportLedgerDistanceComponent ReportDataView="Report.ReportData"/>
|
<ReportLedgerDistanceComponent ReportDataView="Report.ReportData"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@* <ReportActivityListOfficeComponent Activities="Report.ReportItems"/> *@
|
@* <ReportActivityListOfficeComponent Activities="Report.ReportItems"/> *@
|
||||||
<ActivityListComponent Activities="Report.ReportItems" ViewAs="office" />
|
<ReportActivityListComponent Activities="Report.ReportItems" ViewAs="office" />
|
||||||
<ReportLedgerActivityComponent ReportData="Report.ReportData"/>
|
<ReportLedgerSummaryComponent ReportData="Report.ReportData"/>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ActivityHeaderComponent ReportItem="ReportItem"/>
|
<ActivityHeaderComponent ReportItem="ReportItem" SalesRep="@($"{_salesRep.FirstName} {_salesRep.LastName}")"/>
|
||||||
<ActivityLinesComponent ReportItem="ReportItem"/>
|
<ActivityLinesComponent ReportItem="ReportItem"/>
|
||||||
|
|
||||||
@if (!string.IsNullOrWhiteSpace(ReportItem.OfficeNote))
|
@if (!string.IsNullOrWhiteSpace(ReportItem.OfficeNote))
|
||||||
|
|
|
@ -40,7 +40,7 @@ public partial class OfficeOrderViewPage : IDisposable
|
||||||
[Inject] public ILocalStorageService Storage { get; set; }
|
[Inject] public ILocalStorageService Storage { get; set; }
|
||||||
[Inject] public ICountryUserInfoRepository UserRepo { get; set; }
|
[Inject] public ICountryUserInfoRepository UserRepo { get; set; }
|
||||||
[Inject] public ILogger<OfficeOrderViewPage> Logger { get; set; }
|
[Inject] public ILogger<OfficeOrderViewPage> Logger { get; set; }
|
||||||
[Inject] public IToastService Toast { get; set; }
|
[Inject] public IToastService Toaster { get; set; }
|
||||||
[Inject] public IUserInfoService UserInfoService { get; set; }
|
[Inject] public IUserInfoService UserInfoService { get; set; }
|
||||||
[Inject] public IJSRuntime JsRuntime { get; set; }
|
[Inject] public IJSRuntime JsRuntime { get; set; }
|
||||||
[Inject] public IOrderProcessRepository ProcessRepo { get; set; }
|
[Inject] public IOrderProcessRepository ProcessRepo { get; set; }
|
||||||
|
@ -55,6 +55,9 @@ public partial class OfficeOrderViewPage : IDisposable
|
||||||
private bool IsNotified { get; set; }
|
private bool IsNotified { get; set; }
|
||||||
private bool Working { get; set; } = true;
|
private bool Working { get; set; } = true;
|
||||||
private IJSObjectReference JsModule { get; set; }
|
private IJSObjectReference JsModule { get; set; }
|
||||||
|
private UserInfoAdvisorView _salesRep = new();
|
||||||
|
private UserManagerEditView _user = new();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private readonly JsonSerializerOptions _options = new JsonSerializerOptions
|
private readonly JsonSerializerOptions _options = new JsonSerializerOptions
|
||||||
|
@ -66,9 +69,13 @@ public partial class OfficeOrderViewPage : IDisposable
|
||||||
{
|
{
|
||||||
Interceptor.RegisterEvent();
|
Interceptor.RegisterEvent();
|
||||||
Interceptor.RegisterBeforeSendEvent();
|
Interceptor.RegisterBeforeSendEvent();
|
||||||
// fetch order from backend
|
|
||||||
ReportItem = await AdvisorActivityRepo.GetReportItem(OrderId);
|
ReportItem = await AdvisorActivityRepo.GetReportItem(OrderId);
|
||||||
Logger.LogDebug("ReportItem => \n {}", JsonSerializer.Serialize(ReportItem, _options));
|
|
||||||
|
_user = await UserInfoService.GetUserInfo();
|
||||||
|
|
||||||
|
_salesRep = await UserRepo.GetUserInfo(ReportItem.SalesRepId);
|
||||||
|
|
||||||
Working = false;
|
Working = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,32 +94,33 @@ public partial class OfficeOrderViewPage : IDisposable
|
||||||
if (Working)
|
if (Working)
|
||||||
return;
|
return;
|
||||||
Working = true;
|
Working = true;
|
||||||
// send request to backend
|
|
||||||
var responseView = await AdvisorActivityRepo.GetExpressState(ReportItem.ActivityId);
|
var responseView = await AdvisorActivityRepo.GetExpressState(ReportItem.ActivityId);
|
||||||
// get user info from storage
|
if (!responseView.IsSuccess)
|
||||||
var user = await UserInfoService.GetUserInfo();
|
{
|
||||||
// fetch sales rep from response
|
Toaster.ShowError("Noget gik galt med forbindelsen. Ordrestatus er ikke ændret og kvittering kan ikke sendes");
|
||||||
var salesRep = await UserRepo.GetUserInfo(responseView.Id);
|
Working = false;
|
||||||
// create email notification body
|
return;
|
||||||
|
}
|
||||||
var body = new StringBuilder();
|
var body = new StringBuilder();
|
||||||
body.AppendLine($"Kvittering for modtagelse af hasteordre {ReportItem.ESalesNumber}");
|
body.AppendLine($"Kvittering for modtagelse af hasteordre {ReportItem.ESalesNumber}");
|
||||||
body.AppendLine($"Konto : {ReportItem.Company.Account}");
|
body.AppendLine($"Konto : {ReportItem.Company.Account}");
|
||||||
body.AppendLine($"Navn : {ReportItem.Company.Name}");
|
body.AppendLine($"Navn : {ReportItem.Company.Name}");
|
||||||
body.AppendLine($"Post By : {salesRep.CountryCode.ToUpper()}-{ReportItem.Company.ZipCode} {ReportItem.Company.City}");
|
body.AppendLine($"Post By : {_salesRep.CountryCode.ToUpper()}-{ReportItem.Company.ZipCode} {ReportItem.Company.City}");
|
||||||
body.AppendLine();
|
body.AppendLine();
|
||||||
body.AppendLine("Med venlig hilsen");
|
body.AppendLine("Med venlig hilsen");
|
||||||
body.AppendLine($"{user.FirstName} {user.LastName}");
|
body.AppendLine($"{_user.FirstName} {_user.LastName}");
|
||||||
body.AppendLine($"{user.PhoneNumber}");
|
body.AppendLine($"{_user.PhoneNumber}");
|
||||||
// create a list of mail addresses
|
|
||||||
var sendTo = new List<EmailContact>
|
var sendTo = new List<EmailContact>
|
||||||
{
|
{
|
||||||
new()
|
new()
|
||||||
{
|
{
|
||||||
Email = salesRep.Email,
|
Email = _salesRep.Email,
|
||||||
Name = $"{salesRep.FirstName} {salesRep.LastName}"
|
Name = $"{_salesRep.FirstName} {_salesRep.LastName}"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
// create an email
|
|
||||||
var msg = new EmailMessage
|
var msg = new EmailMessage
|
||||||
{
|
{
|
||||||
Body = body.ToString(),
|
Body = body.ToString(),
|
||||||
|
@ -120,20 +128,18 @@ public partial class OfficeOrderViewPage : IDisposable
|
||||||
To = sendTo,
|
To = sendTo,
|
||||||
IsBodyHtml = false
|
IsBodyHtml = false
|
||||||
};
|
};
|
||||||
Logger.LogDebug("SetExpressState Notification => \n {}", JsonSerializer.Serialize(msg));
|
|
||||||
// send a system generated email
|
|
||||||
var sendMail = await MailService.SendMail("System", msg);
|
var sendMail = await MailService.SendMail("System", msg);
|
||||||
|
|
||||||
// result notification
|
|
||||||
if (sendMail.IsSuccess)
|
if (sendMail.IsSuccess)
|
||||||
{
|
{
|
||||||
Toast.ShowSuccess($"Status er opdateret og notifikation sendt til {salesRep.FirstName}.");
|
Toaster.ShowSuccess($"Status er opdateret og notifikation sendt til {_salesRep.FirstName}.");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Toast.ShowWarning($"Notifikation til {salesRep.FirstName} kunne ikke sendes. {sendMail.Message}");
|
Toaster.ShowWarning($"Notifikation til {_salesRep.FirstName} kunne ikke sendes. {sendMail.Message}");
|
||||||
}
|
}
|
||||||
// disable further notifications
|
|
||||||
IsNotified = true;
|
IsNotified = true;
|
||||||
Working = false;
|
Working = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,13 +39,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="w-75">
|
<div class="w-75">
|
||||||
<ReportDescriptionComponent ReportDataView="Report.ReportData"/>
|
<ReportLedgerDescriptionComponent ReportDataView="Report.ReportData"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-25">
|
<div class="w-25">
|
||||||
<ReportLedgerDistanceComponent ReportDataView="Report.ReportData"/>
|
<ReportLedgerDistanceComponent ReportDataView="Report.ReportData"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@* <ReportActivityListOfficeComponent Activities="Report.ReportItems"/> *@
|
@* <ReportActivityListOfficeComponent Activities="Report.ReportItems"/> *@
|
||||||
<ActivityListComponent Activities="Report.ReportItems" />
|
<ReportActivityListComponent Activities="Report.ReportItems" />
|
||||||
<ReportLedgerActivityComponent ReportData="Report.ReportData"/>
|
<ReportLedgerSummaryComponent ReportData="Report.ReportData"/>
|
||||||
</div>
|
</div>
|
|
@ -42,14 +42,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="w-75">
|
<div class="w-75">
|
||||||
<ReportDescriptionComponent ReportDataView="Report.ReportData"/>
|
<ReportLedgerDescriptionComponent ReportDataView="Report.ReportData"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-25">
|
<div class="w-25">
|
||||||
<ReportLedgerDistanceComponent ReportDataView="Report.ReportData"/>
|
<ReportLedgerDistanceComponent ReportDataView="Report.ReportData"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ReportActivityListShowDocumentCallbackComponent Activities="Report.ReportItems" OnShowDocument="ShowDocument"/>
|
<ReportActivityListShowDocumentCallbackComponent Activities="Report.ReportItems" OnShowDocument="ShowDocument"/>
|
||||||
<ReportLedgerActivityComponent ReportData="Report.ReportData"/>
|
<ReportLedgerSummaryComponent ReportData="Report.ReportData"/>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"appInfo": {
|
"appInfo": {
|
||||||
"name": "Wonky Online",
|
"name": "Wonky Online",
|
||||||
"version": "310.0",
|
"version": "313.0",
|
||||||
"rc": false,
|
"rc": false,
|
||||||
"sandBox": true,
|
"sandBox": true,
|
||||||
"image": "grumpy-coder.png",
|
"image": "grumpy-coder.png",
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
html, body {
|
html, body {
|
||||||
height: 290mm;
|
height: 290mm;
|
||||||
width: 210mm;
|
width: 210mm;
|
||||||
-webkit-print-color-adjust: exact;
|
/*-webkit-print-color-adjust: exact;*/
|
||||||
color-adjust: exact;
|
/*color-adjust: exact;*/
|
||||||
}
|
}
|
||||||
.report-main {
|
.report-main {
|
||||||
/*page-break-before: always;*/
|
/*page-break-before: always;*/
|
||||||
|
@ -26,8 +26,8 @@
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
width: initial;
|
width: initial;
|
||||||
-webkit-print-color-adjust: exact;
|
/*-webkit-print-color-adjust: exact;*/
|
||||||
color-adjust: exact;
|
/*color-adjust: exact;*/
|
||||||
}
|
}
|
||||||
.report-visit {
|
.report-visit {
|
||||||
/*page-break-before: always;*/
|
/*page-break-before: always;*/
|
||||||
|
@ -43,8 +43,8 @@
|
||||||
min-height: 250mm;
|
min-height: 250mm;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: initial;
|
width: initial;
|
||||||
-webkit-print-color-adjust: exact;
|
/*-webkit-print-color-adjust: exact;*/
|
||||||
color-adjust: exact;
|
/*color-adjust: exact;*/
|
||||||
}
|
}
|
||||||
.report-visit td {
|
.report-visit td {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class ReportItemView
|
||||||
public string ReferenceNumber { get; set; } = "";
|
public string ReferenceNumber { get; set; } = "";
|
||||||
public string Sales { get; set; } = "";
|
public string Sales { get; set; } = "";
|
||||||
public string SalesRepId { get; set; } = "";
|
public string SalesRepId { get; set; } = "";
|
||||||
|
public string SalesRep { get; set; } = "";
|
||||||
public decimal SasAmount { get; set; }
|
public decimal SasAmount { get; set; }
|
||||||
public string StatusTypeEnum { get; set; } = "";
|
public string StatusTypeEnum { get; set; } = "";
|
||||||
public string VisitTypeEnum { get; set; } = "";
|
public string VisitTypeEnum { get; set; } = "";
|
||||||
|
|
Loading…
Reference in a new issue