refactor for extend check and display

This commit is contained in:
Frede Hundewadt 2023-11-27 17:35:13 +01:00
parent e8a0e446fd
commit 64766abd48
18 changed files with 104 additions and 64 deletions

View file

@ -25,16 +25,25 @@
{ {
<div class="col-sm-6"> <div class="col-sm-6">
<div class="card"> <div class="card">
<div class="card-header fw-bold @(company.HasFolded == 1 ? "alert alert-dark" : "alert alert-success")"> @if (string.IsNullOrWhiteSpace(company.Blocked))
@company.Name @(company.HasFolded == 1 ? "(OPHØRT)" : "") {
</div> <div class="card-header fw-bold @(company.HasFolded == 1 ? "alert alert-dark" : "alert alert-success")">
@company.Name @(company.HasFolded == 1 ? "(OPHØRT)" : "")
</div>
}
else
{
<div class="card-header fw-bold alert alert-danger">
@company.Name (spærret med kode '@company.Blocked')
</div>
}
<div class="card-body"> <div class="card-body">
<table class="table"> <table class="table">
<tr> <tr>
<th scope="row">Konto</th> <th scope="row">Konto</th>
<td>@company.Account</td> <td>@company.Account</td>
<th scope="row">Org Nr.</th> <th scope="row">Org Nr.</th>
<td>@(string.IsNullOrWhiteSpace(@company.VatNumber) ? "mangler" : @company.VatNumber) </td> <td>@(string.IsNullOrWhiteSpace(company.VatNumber) ? "mangler" : company.VatNumber) </td>
</tr> </tr>
<tr> <tr>
<th scope="row">Telefon</th> <th scope="row">Telefon</th>

View file

@ -47,7 +47,7 @@ public static class Utils
} }
public static List<ProductVariant> GenerateVariantListDto(IEnumerable<DocView> items) public static List<ProductVariant> GenerateVariantListDto(IEnumerable<DocDataView> items)
{ {
return items.Select(item => new ProductVariant return items.Select(item => new ProductVariant
{ {
@ -57,23 +57,24 @@ public static class Utils
}) })
.ToList(); .ToList();
} }
public static List<DocDataView> GenerateRevListView(IEnumerable<WorkplaceProduct> workplaceProducts)
public static List<DocView> GenerateRevListView(IEnumerable<WorkplaceProduct> products)
{ {
var result = new List<DocView>(); var result = new List<DocDataView>();
var docProducts = products.OrderBy(x => x.TradingName).ToList(); var products = workplaceProducts.OrderBy(x => x.TradingName).ToList();
foreach (var product in docProducts) foreach (var product in products)
{ {
foreach (var variant in product.Variants) foreach (var variant in product.Variants)
{ {
var newDoc = new DocView var docDataView = new DocDataView
{ {
ProductId = product.ProductId, ProductId = product.ProductId,
VariantId = variant.VariantId, VariantId = variant.VariantId,
VariantName = variant.VariantName, VariantName = variant.VariantName,
ApprovedBy = variant.Docs[0].ApprovedBy,
DocumentDate = variant.Docs[0].ApprovedBy,
}; };
var docs = variant.Docs.OrderBy(x => x.DocumentTypeEnum).ToList(); var docs = variant.Docs.OrderBy(x => x.DocumentTypeEnum).ToList();
@ -82,17 +83,17 @@ public static class Utils
switch (doc.DocumentTypeEnum.ToLower()) switch (doc.DocumentTypeEnum.ToLower())
{ {
case "apb": case "apb":
newDoc.ApbDocId = doc.DocumentId; docDataView.ApbDocId = doc.DocumentId;
break; break;
case "apv": case "apv":
newDoc.ApvDocId = doc.DocumentId; docDataView.ApvDocId = doc.DocumentId;
newDoc.S5A = doc.S5A; docDataView.S5A = doc.S5A;
newDoc.S9A = doc.S9A; docDataView.S9A = doc.S9A;
break; break;
} }
} }
result.Add(newDoc); result.Add(docDataView);
} }
} }
@ -100,9 +101,9 @@ public static class Utils
} }
public static List<DocView> GenerateDocListView(IEnumerable<WorkplaceProduct> products, ApiConfig config) public static List<DocDataView> GenerateDocListView(IEnumerable<WorkplaceProduct> products, ApiConfig config)
{ {
var result = new List<DocView>(); var result = new List<DocDataView>();
var docProducts = products.OrderBy(x => x.TradingName).ToList(); var docProducts = products.OrderBy(x => x.TradingName).ToList();
@ -110,7 +111,7 @@ public static class Utils
{ {
foreach (var variant in product.Variants) foreach (var variant in product.Variants)
{ {
var newDoc = new DocView var newDoc = new DocDataView
{ {
ProductId = product.ProductId, ProductId = product.ProductId,
VariantId = variant.VariantId, VariantId = variant.VariantId,

View file

@ -18,7 +18,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.HttpRepository; namespace Wonky.Client.HttpRepository;
public interface IAdvisorWorkplaceRepository public interface IWorkplaceRepository
{ {
Task<List<WorkplaceListView>> GetWorkplaces(string companyId); Task<List<WorkplaceListView>> GetWorkplaces(string companyId);

View file

@ -23,7 +23,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.HttpRepository; namespace Wonky.Client.HttpRepository;
public class AdvisorWorkplaceRepository : IAdvisorWorkplaceRepository public class WorkplaceRepository : IWorkplaceRepository
{ {
private readonly JsonSerializerOptions? _options = new JsonSerializerOptions private readonly JsonSerializerOptions? _options = new JsonSerializerOptions
{ {
@ -31,13 +31,13 @@ public class AdvisorWorkplaceRepository : IAdvisorWorkplaceRepository
}; };
private readonly NavigationManager _navigation; private readonly NavigationManager _navigation;
private ILogger<AdvisorWorkplaceRepository> _logger; private ILogger<WorkplaceRepository> _logger;
private readonly HttpClient _client; private readonly HttpClient _client;
private readonly ApiConfig _api; private readonly ApiConfig _api;
public AdvisorWorkplaceRepository(HttpClient client, public WorkplaceRepository(HttpClient client,
ILogger<AdvisorWorkplaceRepository> logger, ILogger<WorkplaceRepository> logger,
NavigationManager navigation, NavigationManager navigation,
IOptions<ApiConfig> configuration) IOptions<ApiConfig> configuration)
{ {

View file

@ -2,11 +2,12 @@ using System.ComponentModel.DataAnnotations;
namespace Wonky.Client.Models; namespace Wonky.Client.Models;
public class DocView public class DocDataView
{ {
public bool Added { get; set; } public bool Added { get; set; }
public string ApbDocId { get; set; } = ""; public string ApbDocId { get; set; } = "";
public string ApbDocLink { get; set; } = ""; public string ApbDocLink { get; set; } = "";
public string ApprovedBy { get; set; } = "";
public string ApvDocId { get; set; } = ""; public string ApvDocId { get; set; } = "";
public string ApvDocLink { get; set; } = ""; public string ApvDocLink { get; set; } = "";
public string DocumentDate { get; set; } = ""; public string DocumentDate { get; set; } = "";

View file

@ -22,13 +22,13 @@ namespace Wonky.Client.OverlayDocuments;
public partial class ProductSelectionOverlay public partial class ProductSelectionOverlay
{ {
//############################################################### //###############################################################
[Parameter] public List<DocView> NewItems { get; set; } = new(); [Parameter] public List<DocDataView> NewItems { get; set; } = new();
[Parameter] public EventCallback<DocView> OnSelectItem { get; set; } [Parameter] public EventCallback<DocDataView> OnSelectItem { get; set; }
//############################################################### //###############################################################
private string _modalDisplay = ""; private string _modalDisplay = "";
private bool _showBackdrop; private bool _showBackdrop;
private List<DocView> FilteredList { get; set; } = new(); private List<DocDataView> FilteredList { get; set; } = new();
private string SearchTerm { get; set; } = ""; private string SearchTerm { get; set; } = "";
@ -38,7 +38,7 @@ public partial class ProductSelectionOverlay
} }
private async Task SelectItem(DocView item) private async Task SelectItem(DocDataView item)
{ {
item.Added = !item.Added; item.Added = !item.Added;
await OnSelectItem.InvokeAsync(item); await OnSelectItem.InvokeAsync(item);

View file

@ -384,7 +384,7 @@ else
<div class="card mb-3 @(_activity.ActivityStatusEnum == "order" ? "inno-display" : "inno-hidden")"> <div class="card mb-3 @(_activity.ActivityStatusEnum == "order" ? "inno-display" : "inno-hidden")">
<div class="card-header text-end"> <div class="card-header text-end">
<button class="btn btn-secondary" type="button" @onclick="@(ToggleDeliveryAddress)"> <button class="btn btn-secondary" type="button" @onclick="@(ToggleDeliveryAddress)">
Leveringsadresse Alternativ Leveringsadresse (ændres kun for denne bestiling)
</button> </button>
</div> </div>
<div class="@(_hideDeliveryAddress ? "inno-hidden" : "inno-display")"> <div class="@(_hideDeliveryAddress ? "inno-hidden" : "inno-display")">

View file

@ -244,7 +244,6 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
if (!string.IsNullOrWhiteSpace(newSync)) if (!string.IsNullOrWhiteSpace(newSync))
{ {
Toaster.ShowSuccess($"{forceBackend} {newSync} ERP hitorik synkroniseret til CRM.");
_company.HistorySync = newSync; _company.HistorySync = newSync;
if (!_company.Account.StartsWith("NY")) if (!_company.Account.StartsWith("NY"))
{ {

View file

@ -28,7 +28,7 @@ namespace Wonky.Client.Pages;
public partial class AdvisorCustomerWorkplaceListPage : IDisposable public partial class AdvisorCustomerWorkplaceListPage : IDisposable
{ {
// ############################################################### // ###############################################################
[Inject] public IAdvisorWorkplaceRepository WorkplaceRepo { get; set; } [Inject] public IWorkplaceRepository WorkplaceRepo { get; set; }
[Inject] public IAdvisorCustomerRepository CustomerRepo { get; set; } [Inject] public IAdvisorCustomerRepository CustomerRepo { get; set; }
[Inject] public HttpInterceptorService Interceptor { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public NavigationManager Navigator { get; set; } [Inject] public NavigationManager Navigator { get; set; }

View file

@ -30,7 +30,7 @@ public partial class AdvisorCustomerWorkplaceNewPage : IDisposable
// ############################################################### // ###############################################################
[Inject] public HttpInterceptorService Interceptor { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public IAdvisorCustomerRepository CustomerRepo { get; set; } [Inject] public IAdvisorCustomerRepository CustomerRepo { get; set; }
[Inject] public IAdvisorWorkplaceRepository WorkplaceRepo { get; set; } [Inject] public IWorkplaceRepository WorkplaceRepo { get; set; }
[Inject] public IToastService Toaster { get; set; } [Inject] public IToastService Toaster { get; set; }
[Inject] public ILogger<AdvisorCustomerWorkplaceNewPage> Logger { get; set; } [Inject] public ILogger<AdvisorCustomerWorkplaceNewPage> Logger { get; set; }
[Inject] public NavigationManager Navigator { get; set; } [Inject] public NavigationManager Navigator { get; set; }

View file

@ -65,6 +65,20 @@
<ValidationMessage For="@(() => Revision.ApprovedBy)"></ValidationMessage> <ValidationMessage For="@(() => Revision.ApprovedBy)"></ValidationMessage>
</div> </div>
</div> </div>
<div class="col-sm-9"></div>
<div class="col-sm-3 col-md-3">
<div class="form-floating">
@foreach (var approvedByName in _approvedBy)
{
<div class="form-check">
<input class="form-check-input" type="radio"
name="approvedBy" id="approvedByName" value="@approvedByName"
@onchange="() => OnApprovedChange(approvedByName)"/>
<label class="form-checl-label" for="@approvedByName">@approvedByName</label>
</div>
}
</div>
</div>
</div> </div>
<div class="row mb-5"> <div class="row mb-5">

View file

@ -36,7 +36,7 @@ namespace Wonky.Client.Pages;
public partial class AdvisorCustomerWorkplaceRevisionPage : IDisposable public partial class AdvisorCustomerWorkplaceRevisionPage : IDisposable
{ {
// ############################################################# // #############################################################
[Inject] public IAdvisorWorkplaceRepository WorkplaceRepo { get; set; } [Inject] public IWorkplaceRepository WorkplaceRepo { get; set; }
[Inject] public IExternalProductRepository PublicProductRepo { get; set; } [Inject] public IExternalProductRepository PublicProductRepo { get; set; }
[Inject] public HttpInterceptorService Interceptor { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public NavigationManager Navigator { get; set; } [Inject] public NavigationManager Navigator { get; set; }
@ -52,15 +52,16 @@ public partial class AdvisorCustomerWorkplaceRevisionPage : IDisposable
private UserManagerEditView UserInfo { get; set; } private UserManagerEditView UserInfo { get; set; }
private EditContext FormContext { get; set; } private EditContext FormContext { get; set; }
private WorkplaceDto Workplace { get; set; } = new(); private WorkplaceDto Workplace { get; set; } = new();
private WorkplaceDocInfo WorkplaceInfo { get; set; } = new(); private WorkplaceDocInfo WorkplaceData { get; set; } = new();
private List<ExternalProductListView> AvailableProducts { get; set; } = new(); private List<ExternalProductListView> AvailableProducts { get; set; } = new();
private DocRevision Revision { get; set; } = new(); private DocRevision Revision { get; set; } = new();
private bool Working { get; set; } = true; private bool Working { get; set; } = true;
private bool FormInvalid { get; set; } = true; private bool FormInvalid { get; set; } = true;
private List<DocView> CurrentItems { get; set; } = new(); private List<DocDataView> CurrentItems { get; set; } = new();
private List<DocView> AvailableItems { get; set; } = new(); private List<DocDataView> AvailableItems { get; set; } = new();
private List<DocView> AppendItems { get; set; } = new(); private List<DocDataView> AppendItems { get; set; } = new();
private ProductSelectionOverlay SelectionOverlay { get; set; } private ProductSelectionOverlay SelectionOverlay { get; set; }
private List<string> _approvedBy = new();
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
@ -76,31 +77,36 @@ public partial class AdvisorCustomerWorkplaceRevisionPage : IDisposable
UserInfo = await UserService.GetUserInfo(); UserInfo = await UserService.GetUserInfo();
Workplace = await WorkplaceRepo.GetWorkplace(CompanyId, WorkplaceId); Workplace = await WorkplaceRepo.GetWorkplace(CompanyId, WorkplaceId);
Logger.LogDebug("Workplace {}", Logger.LogDebug("Workplace {}",
JsonSerializer.Serialize(Workplace, new JsonSerializerOptions(JsonSerializerDefaults.Web))); JsonSerializer.Serialize(Workplace, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
AvailableProducts = await PublicProductRepo.GetProducts(); AvailableProducts = await PublicProductRepo.GetProducts();
WorkplaceInfo = await WorkplaceRepo.GetRevisionList(CompanyId, WorkplaceId); WorkplaceData = await WorkplaceRepo.GetRevisionList(CompanyId, WorkplaceId);
Logger.LogDebug("Workplace Info => {}",
CurrentItems = Utils.GenerateRevListView(WorkplaceInfo.Products); JsonSerializer.Serialize(WorkplaceData, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
Logger.LogDebug("Workplace Products => {}",
JsonSerializer.Serialize(WorkplaceData.Products, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
CurrentItems = Utils.GenerateRevListView(WorkplaceData.Products);
Logger.LogDebug("Current Items List {}", Logger.LogDebug("Current Items List {}",
JsonSerializer.Serialize(CurrentItems, new JsonSerializerOptions(JsonSerializerDefaults.Web))); JsonSerializer.Serialize(CurrentItems, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
_approvedBy = CurrentItems.Select(x => x.ApprovedBy).Distinct().ToList();
Logger.LogDebug("_approved by {}",
JsonSerializer.Serialize(_approvedBy, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
// create list with variants not in the current variant list // create list with variants not in the current variant list
foreach (var variant in AvailableProducts.SelectMany(product => product.Variants)) foreach (var variant in AvailableProducts.SelectMany(product => product.Variants))
{ {
var v = CurrentItems.FirstOrDefault(v => v.VariantId == variant.VariantId); var v = CurrentItems.FirstOrDefault(v => v.VariantId == variant.VariantId);
if (v == null) if (v == null)
{ {
AvailableItems.Add(new DocView { VariantName = variant.Name, VariantId = variant.VariantId }); AvailableItems.Add(new DocDataView { VariantName = variant.Name, VariantId = variant.VariantId });
} }
} }
Logger.LogDebug("New Products List {}",
JsonSerializer.Serialize(AvailableItems, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
Revision.ApprovedDate = $"{DateTime.Now:yyyy-MM-dd}"; Revision.ApprovedDate = $"{DateTime.Now:yyyy-MM-dd}";
Revision.AuthoredBy = $"{UserInfo.FirstName} {UserInfo.LastName}"; Revision.AuthoredBy = $"{UserInfo.FirstName} {UserInfo.LastName}";
Revision.FollowupDate = $"{DateTime.Now.AddMonths(24):yyyy-MM-dd}"; Revision.FollowupDate = $"{DateTime.Now.AddMonths(24):yyyy-MM-dd}";
@ -151,13 +157,20 @@ public partial class AdvisorCustomerWorkplaceRevisionPage : IDisposable
} }
private void OnApprovedChange(string approvedBy)
{
Revision.ApprovedBy = approvedBy;
FormInvalid = !FormContext.Validate();
StateHasChanged();
}
private void CancelNewProducts() private void CancelNewProducts()
{ {
AppendItems.Clear(); AppendItems.Clear();
} }
private void AddSelectedItem(DocView item) private void AddSelectedItem(DocDataView item)
{ {
if (item.Added) if (item.Added)
{ {

View file

@ -22,7 +22,7 @@
<div class="row -mb-3"> <div class="row -mb-3">
<div class="col-sm-8"> <div class="col-sm-8">
@Workplace.CompanyName <h3>@Workplace.CompanyName</h3>
</div> </div>
<div class="col-sm-2"> <div class="col-sm-2">
<a class="btn btn-primary" href="/advisor/customers/@CompanyId"><i class="bi-chevron-left"></i> Stamkort</a> <a class="btn btn-primary" href="/advisor/customers/@CompanyId"><i class="bi-chevron-left"></i> Stamkort</a>
@ -38,7 +38,7 @@
} }
</div> </div>
<div class="col-sm-12"> <div class="col-sm-12">
@Workplace.Name @(!string.IsNullOrWhiteSpace(Workplace.Description) ? $" ({Workplace.Description})" : "") <span class="h5">@Workplace.Name </span><span>@(!string.IsNullOrWhiteSpace(Workplace.Description) ? $" ({Workplace.Description})" : "")</span>
</div> </div>
</div> </div>

View file

@ -35,9 +35,9 @@ namespace Wonky.Client.Pages;
public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
{ {
// ############################################################# // #############################################################
[Inject] public IAdvisorWorkplaceRepository Workplaces { get; set; } [Inject] public IWorkplaceRepository Workplaces { get; set; }
[Inject] public IAdvisorCustomerRepository CustomerRepo { get; set; } [Inject] public IAdvisorCustomerRepository CustomerRepo { get; set; }
[Inject] public IAdvisorWorkplaceRepository WorkplaceRepo { get; set; } [Inject] public IWorkplaceRepository WorkplaceRepo { get; set; }
[Inject] public HttpInterceptorService Interceptor { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public NavigationManager Navigator { get; set; } [Inject] public NavigationManager Navigator { get; set; }
[Inject] public ILogger<AdvisorCustomerWorkplaceViewEditPage> Logger { get; set; } [Inject] public ILogger<AdvisorCustomerWorkplaceViewEditPage> Logger { get; set; }
@ -56,7 +56,7 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
private EditContext WorkplaceContext { get; set; } private EditContext WorkplaceContext { get; set; }
private bool Working { get; set; } = true; private bool Working { get; set; } = true;
private WorkplaceDocInfo WorkplaceDocInfo { get; set; } = new(); private WorkplaceDocInfo WorkplaceDocInfo { get; set; } = new();
private List<DocView> DocViews { get; set; } = new(); private List<DocDataView> DocViews { get; set; } = new();
private ConfirmationModal ConfirmActionWorkplace { get; set; } private ConfirmationModal ConfirmActionWorkplace { get; set; }
private string DeleteMessage { get; set; } = ""; private string DeleteMessage { get; set; } = "";
private string LinkRecipients { get; set; } = ""; private string LinkRecipients { get; set; } = "";
@ -79,7 +79,7 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
private ApiConfig _config = new(); private ApiConfig _config = new();
private ConfirmationModal ConfirmActionVariant { get; set; } private ConfirmationModal ConfirmActionVariant { get; set; }
private DocView SelectedItem { get; set; } = new(); private DocDataView SelectedItem { get; set; } = new();
private bool OnlyOne { get; set; } = true; private bool OnlyOne { get; set; } = true;
@ -94,11 +94,13 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
var x = await Workplaces.GetWorkplaces(CompanyId); var x = await Workplaces.GetWorkplaces(CompanyId);
OnlyOne = x.Count is 1; OnlyOne = x.Count is 1;
await Task.Delay(250); await Task.Delay(250);
Workplace = await Workplaces.GetWorkplace(CompanyId, WorkplaceId); Workplace = await Workplaces.GetWorkplace(CompanyId, WorkplaceId);
WorkplaceDocInfo = await WorkplaceRepo.GetDocuments(CompanyId, WorkplaceId); WorkplaceDocInfo = await WorkplaceRepo.GetDocuments(CompanyId, WorkplaceId);
// Logger.LogDebug("WorkplaceDocInfo => {}", JsonSerializer.Serialize(WorkplaceDocInfo, JsonSerializerOptions.Default));
DocViews = Utils.GenerateDocListView(WorkplaceDocInfo.Products, _config); DocViews = Utils.GenerateDocListView(WorkplaceDocInfo.Products, _config);
// Logger.LogDebug("docViews => {}", JsonSerializer.Serialize(DocViews, JsonSerializerOptions.Default));
Working = false; Working = false;
} }
@ -182,12 +184,13 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
private async Task OnSubmitUpdate() private async Task OnSubmitUpdate()
{ {
Working = true; Working = true;
Toaster.ShowWarning("HUSK REVISION AF DOKUMENTER.");
await Workplaces.PutWorkplace(CompanyId, Workplace); await Workplaces.PutWorkplace(CompanyId, Workplace);
Working = false; Working = false;
Toaster.ShowSuccess("Arbejdssted er opdateret"); Toaster.ShowSuccess("Arbejdssted er opdateret.");
} }
@ -215,7 +218,7 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
} }
private void OnConfirmDeleteVariant(DocView selectedItem) private void OnConfirmDeleteVariant(DocDataView selectedItem)
{ {
SelectedItem = selectedItem; SelectedItem = selectedItem;
DeleteMessage = DeleteMessage =
@ -241,7 +244,7 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
// update browser // update browser
WorkplaceDocInfo.Products.Remove(item); WorkplaceDocInfo.Products.Remove(item);
DocViews = Utils.GenerateDocListView(WorkplaceDocInfo.Products, _config); DocViews = Utils.GenerateDocListView(WorkplaceDocInfo.Products, _config);
SelectedItem = new DocView(); SelectedItem = new DocDataView();
Working = false; Working = false;
} }

View file

@ -66,7 +66,7 @@ builder.Services.AddScoped<IAdvisorContactRepository, AdvisorContactRepository>(
builder.Services.AddScoped<IAdvisorCustomerHistoryRepository, AdvisorCustomerHistoryRepository>(); builder.Services.AddScoped<IAdvisorCustomerHistoryRepository, AdvisorCustomerHistoryRepository>();
builder.Services.AddScoped<IAdvisorTaskItemRepository, AdvisorTaskItemRepository>(); builder.Services.AddScoped<IAdvisorTaskItemRepository, AdvisorTaskItemRepository>();
builder.Services.AddScoped<IAdvisorSalesReportRepository, AdvisorSalesReportRepository>(); builder.Services.AddScoped<IAdvisorSalesReportRepository, AdvisorSalesReportRepository>();
builder.Services.AddScoped<IAdvisorWorkplaceRepository, AdvisorWorkplaceRepository>(); builder.Services.AddScoped<IWorkplaceRepository, WorkplaceRepository>();
builder.Services.AddScoped<IExternalProductRepository, ExternalProductRepository>(); builder.Services.AddScoped<IExternalProductRepository, ExternalProductRepository>();
// administrative repositories // administrative repositories
builder.Services.AddScoped<ICountryCustomerHistoryRepository, CountryCustomerHistoryRepository>(); builder.Services.AddScoped<ICountryCustomerHistoryRepository, CountryCustomerHistoryRepository>();

View file

@ -34,7 +34,7 @@
<div class="content d-none d-print-block"> <div class="content d-none d-print-block">
@Body @Body
</div> </div>
<BlazoredToasts Position="ToastPosition.TopRight" Timeout="5" MaxToastCount="10" ShowProgressBar="true" /> <BlazoredToasts Position="ToastPosition.BottomRight" Timeout="10" MaxToastCount="3" ShowProgressBar="true" />
</main> </main>
</div> </div>

View file

@ -1,7 +1,7 @@
{ {
"appInfo": { "appInfo": {
"name": "Wonky Online", "name": "Wonky Online",
"version": "303.0", "version": "306.0",
"rc": false, "rc": false,
"sandBox": true, "sandBox": true,
"image": "grumpy-coder.png", "image": "grumpy-coder.png",

View file

@ -3,8 +3,8 @@ namespace Wonky.Entity.Views;
public class WorkplaceProductVariantDoc public class WorkplaceProductVariantDoc
{ {
public string ApprovedBy { get; set; } = ""; public string ApprovedBy { get; set; } = "";
public string DocumentDescription { get; set; } = "";
public string DocumentDate { get; set; } = ""; public string DocumentDate { get; set; } = "";
public string DocumentDescription { get; set; } = "";
public string DocumentId { get; set; } = ""; public string DocumentId { get; set; } = "";
public string DocumentLink { get; set; } = ""; public string DocumentLink { get; set; } = "";
public string DocumentTypeEnum { get; set; } = ""; public string DocumentTypeEnum { get; set; } = "";