wip: v148.0

This commit is contained in:
Frede Hundewadt 2023-05-27 16:37:17 +02:00
parent ee9921296a
commit f90e745e1a
41 changed files with 412 additions and 379 deletions

View file

@ -26,7 +26,7 @@ public partial class CustomerInventoryListComponent
{
[Inject] public ILocalStorageService Storage { get; set; }
// Parameters
[Parameter] public List<ProductInventoryView> Inventory { get; set; } = new();
[Parameter] public List<ProductInventoryItemView> Inventory { get; set; } = new();
[Parameter] public string CompanyId { get; set; } = "";
[Parameter] public EventCallback<string> OnReorderSelected { get; set; }

View file

@ -23,7 +23,7 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Components;
public partial class CustomerProductCheckListComponent
{
[Parameter] public List<ProductInventoryView> Inventory { get; set; } = new();
[Parameter] public List<ProductInventoryItemView> Inventory { get; set; } = new();
[Parameter] public string CompanyId { get; set; } = "";
[Inject] public ILocalStorageService Storage { get; set; }
// private variables

View file

@ -54,7 +54,7 @@ public partial class OfficeCountryCustomerListComponent
// variables
private InvoiceListView InvoiceList { get; set; } = new();
private List<ReportItemView> ActivityList { get; set; } = new();
private List<ProductInventoryView> ProductList { get; set; } = new();
private List<ProductInventoryItemView> ProductList { get; set; } = new();
private CompanyDto SelectedCompany { get; set; } = new();
// ******************************************************

View file

@ -29,7 +29,7 @@ public partial class OfficeInventoryListComponent
[Inject] public ILocalStorageService Storage { get; set; }
// *************************************************************
// Parameters
[Parameter] public List<ProductInventoryView> Inventory { get; set; } = new();
[Parameter] public List<ProductInventoryItemView> Inventory { get; set; } = new();
[Parameter] public string CompanyId { get; set; } = "";
[Parameter] public EventCallback<string> OnReorderSelected { get; set; }
// *************************************************************

View file

@ -79,7 +79,7 @@ public class CountryCustomerHistoryRepository : ICountryCustomerHistoryRepositor
}
public async Task<List<ProductInventoryView>> GetInventory(string countryCode, string companyId)
public async Task<List<ProductInventoryItemView>> GetInventory(string countryCode, string companyId)
{
var response = await _client
.GetAsync($"{_api.OfficeCustomers}/{countryCode}/{companyId}/history/inventory");
@ -88,11 +88,11 @@ public class CountryCustomerHistoryRepository : ICountryCustomerHistoryRepositor
if (!response.IsSuccessStatusCode || string.IsNullOrWhiteSpace(content))
{
return new List<ProductInventoryView>();
return new List<ProductInventoryItemView>();
}
return JsonSerializer.Deserialize<List<ProductInventoryView>>(content, _options)
?? new List<ProductInventoryView>();
return JsonSerializer.Deserialize<List<ProductInventoryItemView>>(content, _options)
?? new List<ProductInventoryItemView>();
}

View file

@ -75,15 +75,15 @@ public class CrmCustomerHistoryRepository : ICrmCustomerHistoryRepository
/// </summary>
/// <param name="companyId"></param>
/// <returns></returns>
public async Task<List<ProductInventoryView>> FetchInventory(string companyId)
public async Task<List<ProductInventoryItemView>> FetchInventory(string companyId)
{
var response = await _client.GetAsync($"{_api.CrmCustomers}/{companyId}/{_api.CrmInventoryExt}");
if (!response.IsSuccessStatusCode)
return new List<ProductInventoryView>();
return new List<ProductInventoryItemView>();
var content = await response.Content.ReadAsStringAsync();
return string.IsNullOrWhiteSpace(content)
? new List<ProductInventoryView>()
: JsonSerializer.Deserialize<List<ProductInventoryView>>(content, _options);
? new List<ProductInventoryItemView>()
: JsonSerializer.Deserialize<List<ProductInventoryItemView>>(content, _options);
}
/// <summary>

View file

@ -23,7 +23,7 @@ public interface ICountryCustomerHistoryRepository
Task<InvoiceView> GetInvoice(string countryCode, string companyId, string invoiceId);
Task<List<ProductInventoryView>> GetInventory(string countryCode, string companyId);
Task<List<ProductInventoryItemView>> GetInventory(string countryCode, string companyId);
Task<List<ProductHistoryView>> GetHistory(string countryCode, string companyId);

View file

@ -42,7 +42,7 @@ public interface ICrmCustomerHistoryRepository
/// </summary>
/// <param name="companyId"></param>
/// <returns></returns>
Task<List<ProductInventoryView>> FetchInventory(string companyId);
Task<List<ProductInventoryItemView>> FetchInventory(string companyId);
/// <summary>
/// Fetch History for given customer

View file

@ -0,0 +1,30 @@
using System.ComponentModel.DataAnnotations;
using Wonky.Entity.DTO;
namespace Wonky.Client.Models;
public class DocRevisionDto
{
[Required] public string EyeCleanerLocation { get; set; } = "";
[Required]public string FirstAidLocation { get; set; } = "";
[Required]public string GlovesStorage { get; set; } = "";
[Required]public string GogglesStorage { get; set; } = "";
[Required]public string MaskStorage { get; set; } = "";
[Required]public string ProductStorage { get; set; } = "";
[Required]public string WasteDeposit { get; set; } = "";
[Required]public string AuthoredBy { get; set; } = "";
[Required]public string ApprovedBy { get; set; } = "";
[Required]public string ApprovedDate { get; set; } = "";
[Required]public string FollowupDate { get; set; } = "";
public List<DocRevisionItemDto> Items { get; set; } = new();
}
public class DocRevisionItemDto
{
public string VariantId { get; set; } = "";
public string VariantName { get; set; } = "";
public string S5A { get; set; } = "";
public string S9A { get; set; } = "";
public bool Selected { get; set; } = true;
}

View file

@ -0,0 +1,10 @@
namespace Wonky.Client.Models;
public class DocSelectDisplay
{
public string S5A { get; set; } = "";
public string S9A { get; set; } = "";
public bool Selected { get; set; }
public string VariantId { get; set; } = "";
public string VariantName { get; set; } = "";
}

View file

@ -32,7 +32,7 @@ public partial class CustomerInventoryListOverlay : IDisposable
[Parameter] public string CompanyName { get; set; } = "";
[Parameter] public string CompanyId { get; set; } = "";
[Parameter] public string CountryCode { get; set; } = "";
[Parameter] public List<ProductInventoryView> Inventory { get; set; } = new();
[Parameter] public List<ProductInventoryItemView> Inventory { get; set; } = new();
[Parameter] public EventCallback<DraftItem> OnSelected { get; set; }

View file

@ -23,6 +23,44 @@
<button type="button" class="btn-close" onclick="@Hide" data-bs-dismiss="modal" aria-label="Luk"></button>
</div>
<div class="modal-body">
<div class="accordion open" id="productSelection">
<div class="accordion-item">
<h2 class="accordion-header" id="curProducts">
<button class="accordion-button" type="button"
data-bs-toggle="collapse" data-bs-target="#curProductList"
aria-expanded="true" aria-controls="curProductList">
Dokumenterede produkter
</button>
</h2>
<div class="accordion-collapse collapse show" id="curProductList"
data-bs-parent="productSelection" aria-labelledby="curProducts">
<div class="accordion-body">
@if (CurProducts.Any())
{
}
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="newProducts">
<button class="accordion-button" type="button"
data-bs-toggle="collapse" data-bs-target="#newProductList"
aria-expanded="true" aria-controls="newProductList">
Nye kunde produkter
</button>
</h2>
<div class="accordion-collapse collapse show" id="newProductList"
data-bs-parent="productSelection" aria-labelledby="newProducts">
<div class="accordion-body">
@if (NewProducts.Any())
{
}
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -14,6 +14,7 @@
//
using Microsoft.AspNetCore.Components;
using Wonky.Client.Models;
using Wonky.Entity.Views;
namespace Wonky.Client.OverlayDocuments;
@ -21,7 +22,8 @@ namespace Wonky.Client.OverlayDocuments;
public partial class ProductSelectionOverlay
{
//###############################################################
[Parameter] public List<ExternalProductListView> ProductListViews { get; set; } = new();
[Parameter] public List<DocSelectDisplay> CurProducts { get; set; } = new();
[Parameter] public List<DocSelectDisplay> NewProducts { get; set; } = new();
[Parameter] public EventCallback<ExternalProductVariantView> OnSelected { get; set; }
//###############################################################

View file

@ -40,7 +40,7 @@ public partial class OfficeCustomerProductListOverlay : IDisposable
private bool Descending { get; set; }
[Parameter] public CompanyDto Company { get; set; } = new();
[Parameter] public List<ProductInventoryView> Inventory { get; set; } = new();
[Parameter] public List<ProductInventoryItemView> Inventory { get; set; } = new();
protected override void OnParametersSet()
{

View file

@ -31,7 +31,7 @@ public partial class OfficeOrderInventoryListOverlay : IDisposable
[Inject] public ILogger<OfficeOrderInventoryListOverlay> Logger { get; set; }
[Parameter] public CompanyDto Company { get; set; } = new();
[Parameter] public List<ProductInventoryView> Inventory { get; set; } = new();
[Parameter] public List<ProductInventoryItemView> Inventory { get; set; } = new();
[Parameter] public EventCallback<DraftItem> OnSelected { get; set; }
private string _modalDisplay = "";

View file

@ -25,7 +25,7 @@ public partial class ProductCheckConfirmationOverlay
private bool _showBackdrop;
[Parameter] public string BodyMessage { get; set; } = "";
[Parameter] public string CompanyId { get; set; } = "";
[Parameter] public List<ProductInventoryView> Products { get; set; } = new();
[Parameter] public List<ProductInventoryItemView> Products { get; set; } = new();
[Parameter] public EventCallback OnOkClicked { get; set; }
public void Show()

View file

@ -92,8 +92,8 @@ public partial class AdvisorActivityCreatePage : IDisposable
private CustomerActivityListOverlay ActivityListOverlay { get; set; } = new();
// #############################################################
private List<ProductInventoryView> Inventory { get; set; } = new();
private List<ProductInventoryView> CheckList { get; set; } = new();
private List<ProductInventoryItemView> Inventory { get; set; } = new();
private List<ProductInventoryItemView> CheckList { get; set; } = new();
private InvoiceListView CompanyInvoices { get; set; } = new();
private List<ReportItemView> Activities { get; set; } = new();
private bool Kanvas { get; set; }
@ -144,6 +144,11 @@ public partial class AdvisorActivityCreatePage : IDisposable
// decide if new or recall
Activity.ActivityVisitEnum = Company.Account.StartsWith("NY")
? "new" : "recall";
if (string.IsNullOrWhiteSpace(Company.Segment) && SalesRep.CountryCode.ToLower() == "dk")
{
Toaster.ShowError("Der mangler information om Segment. Ret kunde segment, gem erp data og prøv igen.");
Navigator.NavigateTo($"/advisor/customers/{CompanyId}");
}
}
// Populate base activity information
@ -292,7 +297,7 @@ public partial class AdvisorActivityCreatePage : IDisposable
else
{
// deserialize storage data
CheckList = JsonSerializer.Deserialize<List<ProductInventoryView>>(pStorage);
CheckList = JsonSerializer.Deserialize<List<ProductInventoryItemView>>(pStorage) ?? new List<ProductInventoryItemView>();
if (CheckList.Any())
CheckList = CheckList.OrderBy(x => x.Description).ToList();
}

View file

@ -17,6 +17,7 @@
@page "/advisor/customers/new"
@using Microsoft.AspNetCore.Authorization
@using Wonky.Client.Components
@using System.Xml
@attribute [Authorize(Roles = "Advisor")]
<PageTitle>Rådgiver Opret Kunde</PageTitle>
@ -48,43 +49,69 @@
</div>
@* entity name *@
<label for="name" class="col-sm-1 col-form-label-sm">Navn</label>
<div class="col-sm-7">
<div class="col-sm-5">
<InputText id="name" class="form-control" @bind-Value="Company.Name"/>
<ValidationMessage For="@(() => Company.Name)"></ValidationMessage>
</div>
@* entity attention *@
<label for="attention" class="col-sm-1 col-form-label-sm">Att.</label>
<div class="col-sm-3">
<div class="col-sm-5">
<InputText id="attention" class="form-control" @bind-Value="Company.Attention"/>
<ValidationMessage For="@(() => Company.Attention)"></ValidationMessage>
</div>
@* entity address 1 *@
<label for="address1" class="col-sm-1 col-form-label-sm">Adresse</label>
<div class="col-sm-6">
<div class="col-sm-5">
<InputText id="address1" class="form-control" @bind-Value="Company.Address1"/>
<ValidationMessage For="@(() => Company.Address1)"></ValidationMessage>
</div>
@* entity address 2 *@
<label for="address2" class="col-sm-1 col-form-label-sm">Adresse</label>
<div class="col-sm-4">
<div class="col-sm-5">
<InputText id="address2" class="form-control" @bind-Value="Company.Address2"/>
<ValidationMessage For="@(() => Company.Address2)"></ValidationMessage>
</div>
@* entity postal code *@
<label for="zipCode" class="col-sm-1 col-form-label-sm">Post Nr</label>
<div class="col-sm-2">
<div class="col-sm-1">
<InputText id="zipCode" class="form-control" @bind-Value="Company.ZipCode"/>
<ValidationMessage For="@(() => Company.ZipCode)"></ValidationMessage>
</div>
@* entity city name *@
<label for="city" class="col-sm-1 col-form-label-sm">Bynavn</label>
<div class="col-sm-8">
<div class="col-sm-3">
<InputText id="city" class="form-control" @bind-Value="Company.City"/>
<ValidationMessage For="@(() => Company.City)"></ValidationMessage>
</div>
@* entity email *@
<label for="email" class="col-sm-1 col-form-label-sm">Email</label>
<div class="col-sm-5">
<InputText id="email" class="form-control" @bind-Value="Company.Email"/>
<ValidationMessage For="@(() => Company.Email)"></ValidationMessage>
</div>
@* entity phone *@
<label for="phone" class="col-sm-1 col-form-label-sm">Telefon</label>
<div class="col-sm-2">
<InputText id="phone" class="form-control" @bind-Value="Company.Phone"/>
<ValidationMessage For="@(() => Company.Phone)"></ValidationMessage>
</div>
@* entity mobile *@
<label for="mobile" class="col-sm-1 col-form-label-sm">Mobil</label>
<div class="col-sm-2">
<InputText id="mobile" class="form-control" @bind-Value="Company.Mobile"/>
<ValidationMessage For="@(() => Company.Mobile)"></ValidationMessage>
</div>
@* placeholder *@
<div class="col-sm-6">
@* placeholder *@
</div>
@* entity vat number *@
<label for="vatNumber" class="col-sm-1 col-form-label-sm">Cvr/Org Nr.</label>
<div class="col-sm-3">
<div class="col-sm-2">
<div class="input-group">
<span class="input-group-text">
<DisplayStateComponent StateClass="@RegState"/>
@ -93,24 +120,33 @@
<ValidationMessage For="@(() => Company.VatNumber)"></ValidationMessage>
</div>
</div>
@* entity phone *@
<label for="phone" class="col-sm-1 col-form-label-sm">Telefon</label>
<div class="col-sm-3">
<InputText id="phone" class="form-control" @bind-Value="Company.Phone"/>
<ValidationMessage For="@(() => Company.Phone)"></ValidationMessage>
</div>
@* entity segment *@
@if (UserInfo.CountryCode.ToLower() == "dk")
{
<label for="segment" class="col-sm-1 col-form-label-sm">Segment</label>
<div class="col-sm-2">
<InputSelect id="segment" class="form-select bg-warning text-bg-warning"
@bind-Value="@Company.Segment">
<option value="" disabled>segment</option>
<option value="1">AUTO</option>
<option value="2">INDUSTRI</option>
</InputSelect>
<ValidationMessage For="@(() => Company.Segment)"></ValidationMessage>
</div>
}
else
{
<div class="col-sm-3">
@* placeholder *@
</div>
}
@* entity mobile *@
<label for="mobile" class="col-sm-1 col-form-label-sm">Mobil</label>
<div class="col-sm-3">
<InputText id="mobile" class="form-control" @bind-Value="Company.Mobile"/>
<ValidationMessage For="@(() => Company.Mobile)"></ValidationMessage>
</div>
@* entity email *@
<label for="email" class="col-sm-1 col-form-label-sm">Email</label>
<div class="col-sm-11">
<InputText id="email" class="form-control" @bind-Value="Company.Email"/>
<ValidationMessage For="@(() => Company.Email)"></ValidationMessage>
<label for="eanNumber" class="col-sm-1 col-form-label-sm">EAN</label>
<div class="col-sm-5">
<InputText id="eanNumber" class="form-control" @bind-Value="Company.EanNumber"/>
<ValidationMessage For="@(() => Company.EanNumber)"></ValidationMessage>
</div>
</div>
<hr class="mb-3"/>
<div class="row g-2 mb-3">

View file

@ -54,6 +54,7 @@ public partial class AdvisorCustomerCreatePage : IDisposable
private DateTime NextVisit { get; set; }
private bool Dk { get; set; } = true;
private bool Working { get; set; }
private UserManagerEditView UserInfo { get; set; }
protected override async Task OnInitializedAsync()
{
@ -62,11 +63,11 @@ public partial class AdvisorCustomerCreatePage : IDisposable
CompanyContext.OnFieldChanged += HandleFieldChanged;
CompanyContext.OnValidationStateChanged += ValidationChanged;
var xu = await UserInfoService.GetUserInfo();
Dk = xu.CountryCode.ToLower() == "dk";
UserInfo = await UserInfoService.GetUserInfo();
Dk = UserInfo.CountryCode.ToLower() == "dk";
Company.SalesRepId = xu.UserId;
Company.CountryCode = xu.CountryCode.ToLower();
Company.SalesRepId = UserInfo.UserId;
Company.CountryCode = UserInfo.CountryCode.ToLower();
LastVisit = DateTime.Now;
NextVisit = DateTime.Now.AddDays(Company.Interval * 7);
@ -161,6 +162,17 @@ public partial class AdvisorCustomerCreatePage : IDisposable
FormInvalid = !CompanyContext.Validate();
}
// if dk then check content of segment
if (UserInfo.CountryCode.ToLower() == "dk")
{
if (string.IsNullOrWhiteSpace(Company.Segment))
{
Toaster.ShowError("Segment skal vælges - AUTO eller INDUSTRI");
FormInvalid = true;
return;
}
}
StateHasChanged();
}

View file

@ -49,7 +49,7 @@ public partial class AdvisorCustomerInventoryListPage : IDisposable
private bool Working { get; set; } = true;
private SalesItemView SalesItem { get; set; } = new();
private CustomerInventoryReorderOverlay ReorderOverlay { get; set; } = new();
private List<ProductInventoryView> Inventory { get; set; } = new();
private List<ProductInventoryItemView> Inventory { get; set; } = new();
protected override async Task OnInitializedAsync()
@ -84,7 +84,7 @@ public partial class AdvisorCustomerInventoryListPage : IDisposable
private async Task FetchProductInventory()
{
Inventory = new List<ProductInventoryView>();
Inventory = new List<ProductInventoryItemView>();
Inventory = await HistoryRepo.FetchInventory(CompanyId);
if (Inventory.Any())
Inventory = Inventory.OrderBy(x => x.Description).ToList();

View file

@ -79,7 +79,7 @@ public partial class AdvisorCustomerPagedListPage : IDisposable
{
Working = true;
ShowFolded = !ShowFolded;
ToggleFoldedText = ShowFolded ? "Normal Visning" : "Vis Lukkede";
ToggleFoldedText = ShowFolded ? "Normale" : "Lukkede";
CompanyList = new List<CompanyDto>();
Paging.PageNumber = 1;
Paging.HasFolded = ShowFolded ? 1 : 0;
@ -90,7 +90,7 @@ public partial class AdvisorCustomerPagedListPage : IDisposable
{
Working = true;
ShowHidden = !ShowHidden;
ToggleHiddenText = ShowHidden ? "Normal Visning" : "Inkl. Skjulte";
ToggleHiddenText = ShowHidden ? "Aktive" : "Inaktive";
CompanyList = new List<CompanyDto>();
Paging.PageNumber = 1;
Paging.IsHidden = ShowHidden ? 1 : 0;

View file

@ -28,11 +28,20 @@
</div>
}
<div class="row pt-2 pb-2 mb-2 rounded rounded-2 bg-dark text-white">
<div class="col-sm-10">
<div class="col-sm-8">
<div class="mt-1">
<span class="h3">@Company.Name</span> <span>(@Company.Account)</span>
</div>
</div>
<div class="col-sm-2">
@if (AppInfo!.Value!.Rc)
{
@if (UserInfo.CountryCode is "DK")
{
<a class="btn btn-secondary" href="/advisor/customers/@CompanyId/workplaces/new"><i class="bi-plus-lg"></i> Arbejdssted</a>
}
}
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/advisor/customers"><i class="bi-chevron-left"></i> Tilbage</a>
</div>
@ -105,22 +114,31 @@
@if (!Kanvas)
{
<label for="segment" class="col-sm-1 col-form-label-sm">Segment</label>
<div class="col-sm-2">
<InputSelect id="segment" class="form-select bg-warning text-bg-warning"
@bind-Value="@Company.Segment" disabled="@(ErpEditDisabled)">
<option value="" disabled>segment</option>
<option value="1">AUTO</option>
<option value="2">INDUSTRI</option>
</InputSelect>
<ValidationMessage For="@(() => Company.Segment)"></ValidationMessage>
</div>
<div class="col-sm-1">
<div class="led-box @(DateTime.Now < DateTime.Parse("2023-12-31") ? "inno-display" : "inno-hidden")">
<div class="led-red"></div>
@* entity segment *@
@if (UserInfo.CountryCode.ToLower() == "dk")
{
<label for="segment" class="col-sm-1 col-form-label-sm">Segment</label>
<div class="col-sm-2">
<InputSelect id="segment" class="form-select bg-warning text-bg-warning"
@bind-Value="@Company.Segment" disabled="@(ErpEditDisabled)">
<option value="" disabled>segment</option>
<option value="1">AUTO</option>
<option value="2">INDUSTRI</option>
</InputSelect>
<ValidationMessage For="@(() => Company.Segment)"></ValidationMessage>
</div>
</div>
<div class="col-sm-1">
<div class="led-box @(DateTime.Now < DateTime.Parse("2023-12-31") ? "inno-display" : "inno-hidden")">
<div class="led-red"></div>
</div>
</div>
}
else
{
<div class="col-sm-4">
@* placeholder *@
</div>
}
@* Enable edit/save *@
<div class="col-sm-2 d-grid mx-auto">
<button type="button" class="btn btn-edit" onclick="@ToggleErpEdit"><i class="bi-pencil"></i> STAM data</button>
@ -295,7 +313,10 @@
<div class="col-sm-4 d-grid">
@if (AppInfo!.Value!.Rc)
{
<a class="btn btn-info" href="@($"/advisor/customers/{CompanyId}/workplaces")">Kemi Dokumentation</a>
@if (UserInfo.CountryCode is "DK")
{
<a class="btn btn-info" href="@($"/advisor/customers/{CompanyId}/workplaces")">Kemi Dokumentation</a>
}
}
</div>
</div>

View file

@ -94,7 +94,7 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
// assign event handlers to context
ErpContext.OnFieldChanged += HandleFieldChanged;
ErpContext.OnValidationStateChanged += ValidationChanged;
ErpContext.OnValidationStateChanged += ValidationChanged!;
// fetch user info from local storage
UserInfo = await UserInfoService.GetUserInfo();
@ -159,8 +159,10 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
// create search address from address
if (CountryIsDk)
{
CompanyVatAddress = PrepareVatAddress(Company);
}
await FetchContacts(CompanyId);
Working = false;

View file

@ -18,71 +18,102 @@
@attribute [Authorize(Roles = "Advisor")]
@page "/advisor/customers/{CompanyId}/workplaces/{WorkplaceId}/documents/new"
<PageTitle>@Workplace.CompanyName - @Workplace.Name</PageTitle>
<div class="row -mb-3">
<div class="col-sm-4">
<h2>@Workplace.CompanyName</h2>
</div>
<div class="col-sm-4">
<h3>@Workplace.Name @(!string.IsNullOrWhiteSpace(Workplace.Description) ? $"- {Workplace.Description}" : "")</h3>
<div class="row mb-3">
<div class="col-sm-8">
<span class="h3">@Workplace.CompanyName</span>
</div>
<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> *@
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/advisor/customers/@CompanyId/workplaces/@WorkplaceId"><i class="bi-chevron-left"></i> Tilbage</a>
</div>
<div class="col-sm-12">
<span class="h3">@Workplace.Name</span><span class="text-small">@(!string.IsNullOrWhiteSpace(Workplace.Description) ? $"({Workplace.Description})" : "")</span>
</div>
</div>
<EditForm EditContext="FormContext" OnValidSubmit="SubmitForm">
<DataAnnotationsValidator/>
@* locations *@
<div class="row g-3 mb-3">
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="eyeCleanerLocation" class="form-control" @bind-Value="WorkplaceDocumentDto.EyeCleanerLocation" placeholder="Øjenskylleflaske"/>
<InputText id="eyeCleanerLocation" class="form-control" @bind-Value="DocumentsDto.EyeCleanerLocation" placeholder="Øjenskylleflaske"/>
<label for="eyeCleanerLocation">Øjenskylleflaske</label>
<ValidationMessage For="@(() => WorkplaceDocumentDto.EyeCleanerLocation)"></ValidationMessage>
<ValidationMessage For="@(() => DocumentsDto.EyeCleanerLocation)"></ValidationMessage>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="firstAidStorage" class="form-control" @bind-Value="WorkplaceDocumentDto.FirstAidLocation" placeholder="Førstehjælp"/>
<InputText id="firstAidStorage" class="form-control" @bind-Value="DocumentsDto.FirstAidLocation" placeholder="Førstehjælp"/>
<label for="firstAidStorage">Førstehjælp</label>
<ValidationMessage For="@(() => WorkplaceDocumentDto.FirstAidLocation)"></ValidationMessage>
<ValidationMessage For="@(() => DocumentsDto.FirstAidLocation)"></ValidationMessage>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="productStorage" class="form-control" @bind-Value="WorkplaceDocumentDto.ProductStorage" placeholder="Produkt opbevaring"/>
<InputText id="productStorage" class="form-control" @bind-Value="DocumentsDto.ProductStorage" placeholder="Produkt opbevaring"/>
<label for="productStorage">Produkt Opbevaring</label>
<ValidationMessage For="@(() => WorkplaceDocumentDto.ProductStorage)"></ValidationMessage>
<ValidationMessage For="@(() => DocumentsDto.ProductStorage)"></ValidationMessage>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="maskStorage" class="form-control" @bind-Value="WorkplaceDocumentDto.MaskStorage" placeholder="Maske opbevaring"/>
<InputText id="maskStorage" class="form-control" @bind-Value="DocumentsDto.MaskStorage" placeholder="Maske opbevaring"/>
<label for="maskStorage">Maske Opbevaring</label>
<ValidationMessage For="@(() => WorkplaceDocumentDto.MaskStorage)"></ValidationMessage>
<ValidationMessage For="@(() => DocumentsDto.MaskStorage)"></ValidationMessage>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="glovesStorage" class="form-control" @bind-Value="WorkplaceDocumentDto.GlovesStorage" placeholder="Handsker"/>
<InputText id="glovesStorage" class="form-control" @bind-Value="DocumentsDto.GlovesStorage" placeholder="Handsker"/>
<label for="glovesStorage">Handsker</label>
<ValidationMessage For="@(() => WorkplaceDocumentDto.GlovesStorage)"></ValidationMessage>
<ValidationMessage For="@(() => DocumentsDto.GlovesStorage)"></ValidationMessage>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="gogglesStorage" class="form-control" @bind-Value="WorkplaceDocumentDto.GogglesStorage" placeholder="Beskyttelsesbriller"/>
<InputText id="gogglesStorage" class="form-control" @bind-Value="DocumentsDto.GogglesStorage" placeholder="Beskyttelsesbriller"/>
<label for="gogglesStorage">Beskyttelsesbriller</label>
<ValidationMessage For="@(() => WorkplaceDocumentDto.GogglesStorage)"></ValidationMessage>
<ValidationMessage For="@(() => DocumentsDto.GogglesStorage)"></ValidationMessage>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="wasteDeposit" class="form-control" @bind-Value="WorkplaceDocumentDto.WasteDeposit" placeholder="Affald og Spild"/>
<InputText id="wasteDeposit" class="form-control" @bind-Value="DocumentsDto.WasteDeposit" placeholder="Affald og Spild"/>
<label for="wasteDeposit">Affald og Spild</label>
<ValidationMessage For="@(() => WorkplaceDocumentDto.WasteDeposit)"></ValidationMessage>
<ValidationMessage For="@(() => DocumentsDto.WasteDeposit)"></ValidationMessage>
</div>
</div>
</div>
<div class="row g-3 mb-3">
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="authoredBy" class="form-control" @bind-Value="DocumentsDto.AuthoredBy" placeholder="Oprettet af"/>
<label for="authoredBy">Oprettet af</label>
<ValidationMessage For="@(() => DocumentsDto.AuthoredBy)"></ValidationMessage>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="followupDate" class="form-control" @bind-Value="DocumentsDto.FollowupDate" placeholder="Revisions dato"/>
<label for="followupDate">Revisions dato</label>
<ValidationMessage For="@(() => DocumentsDto.FollowupDate)"></ValidationMessage>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="approvedBy" class="form-control" @bind-Value="DocumentsDto.ApprovedBy" placeholder="Godkendt af"/>
<label for="approvedBy">Godkendt af</label>
<ValidationMessage For="@(() => DocumentsDto.ApprovedBy)"></ValidationMessage>
</div>
</div>
<div class="col-sm-12 col-md-6">
<div class="form-floating">
<InputText id="approvedDate" class="form-control" @bind-Value="DocumentsDto.ApprovedDate" placeholder="Godkendt dato"/>
<label for="approvedDate">Gokendt dato</label>
<ValidationMessage For="@(() => DocumentsDto.ApprovedBy)"></ValidationMessage>
</div>
</div>
</div>
@ -94,8 +125,44 @@
<button type="submit" class="btn btn-success mx-auto" disabled="@FormInvalid"><i class="bi-cloud-upload"></i> Gem</button>
</div>
</div>
</EditForm>
@* current documents *@
<div class="list-group list-group-flush">
<div class="list-group-item">
<div class="row">
<div class="col-sm-4 h4">
Produkt Variant
</div>
<div class="col-sm-2 h4">
Opdater
</div>
</div>
</div>
@foreach (var doc in DocumentsDto.Items)
{
<div class="list-group-item">
<div class="row">
<div class="col-sm-4">
<span class="fw-bold">@doc.VariantName.ToUpperInvariant()</span>
</div>
<div class="col-sm-2">
<InputCheckbox id="@doc.VariantId" class="form-check" @bind-Value="@doc.Selected" />
</div>
<div class="col-sm-3">
@doc.S5A
</div>
<div class="col-sm-3">
@doc.S9A
</div>
</div>
</div>
}
<div class="list-group-item">
<div class="row">
</div>
</div>
</div>
</EditForm>
@if (Working)
@ -112,4 +179,4 @@
<ValidationMessage For="@(() => Workplace.Name)"></ValidationMessage>
</div>
</div>
*@
*@

View file

@ -39,40 +39,74 @@ public partial class CrmCustomerWorkplaceDocumentAddPage : IDisposable
[Inject] public NavigationManager Navigator { get; set; }
[Inject] public ILogger<CrmCustomerWorkplaceDocumentAddPage> Logger { get; set; }
[Inject] public IToastService Toaster { get; set; }
[Inject] public IUserInfoService UserService { get; set; }
// #############################################################
[Parameter] public string CompanyId { get; set; } = "";
[Parameter] public string WorkplaceId { get; set; } = "";
// #############################################################
private UserManagerEditView UserInfo { get; set; }
private EditContext FormContext { get; set; }
private WorkplaceDto Workplace { get; set; } = new();
private WorkplaceInventory WorkplaceInventory { get; set; } = new();
private List<ExternalProductListView> AvailableProducts { get; set; } = new();
private WorkplaceDocumentDto WorkplaceDocumentDto { get; set; } = new();
private DocRevisionDto DocumentsDto { get; set; } = new();
private bool Working { get; set; } = true;
private bool FormInvalid { get; set; } = true;
private List<DocRevisionItemDto> CurDocuments { get; set; } = new();
private List<DocRevisionItemDto> NewDocuments { get; set; } = new();
protected override async Task OnInitializedAsync()
{
FormContext = new EditContext(WorkplaceDocumentDto);
FormContext = new EditContext(DocumentsDto);
Interceptor.RegisterEvent();
Interceptor.RegisterBeforeSendEvent();
UserInfo = await UserService.GetUserInfo();
Workplace = await WorkplaceRepo.GetWorkplace(CompanyId, WorkplaceId);
Logger.LogDebug("Workplace {}", JsonSerializer.Serialize(Workplace, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
WorkplaceInventory = await WorkplaceRepo.GetWorkplaceInventory(CompanyId, WorkplaceId);
AvailableProducts = await PublicProductRepo.GetProducts();
foreach (var variant in WorkplaceInventory.Products.SelectMany(product => product.Variants))
{
CurDocuments.Add(new DocRevisionItemDto { VariantName = variant.VariantName, VariantId = variant.VariantId });
}
DocumentsDto.Items = CurDocuments;
Logger.LogDebug("Current Documents List {}", JsonSerializer.Serialize(CurDocuments, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
foreach (var variant in AvailableProducts.SelectMany(product => product.Variants))
{
var x = new DocRevisionItemDto { VariantName = variant.Name, VariantId = variant.VariantId };
if (!CurDocuments.Contains(x))
{
NewDocuments.Add(x);
}
}
Logger.LogDebug("New Documents List {}", JsonSerializer.Serialize(NewDocuments, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
DocumentsDto.GlovesStorage = Workplace.GlovesStorage;
DocumentsDto.GogglesStorage = Workplace.GogglesStorage;
DocumentsDto.MaskStorage = Workplace.MaskStorage;
DocumentsDto.ProductStorage = Workplace.ProductStorage;
DocumentsDto.EyeCleanerLocation = Workplace.EyeCleanerLocation;
DocumentsDto.FirstAidLocation = Workplace.FirstAidStorage;
DocumentsDto.WasteDeposit = Workplace.WasteDeposit;
DocumentsDto.ApprovedDate = $"{DateTime.Now:yyyy-MM-dd}";
DocumentsDto.AuthoredBy = $"{UserInfo.FirstName} {UserInfo.LastName}";
DocumentsDto.FollowupDate = $"{DateTime.Now.AddMonths(24):yyyy-MM-dd}";
Working = false;
}
private void SubmitForm()
{
}
public void Dispose()
{
Interceptor.DisposeEvent();
}
}
}
}

View file

@ -23,13 +23,13 @@
<div class="card">
<div class="card-header">
<div class="row">
<div class="col-sm-6">
<h2>@Company.Name</h2>
<div class="col-sm-8">
<span class="h3">Arbejdssteder @Company.Name</span>
</div>
<div class="col-sm-3">
<div class="col-sm-2">
<a class="btn btn-primary" href="/advisor/customers/@CompanyId"><i class="bi-chevron-left"></i> Stamkort</a>
</div>
<div class="col-sm-3">
<div class="col-sm-2">
<a class="btn btn-primary" href="/advisor/customers/@CompanyId/workplaces/new"><i class="bi-plus-lg"></i> Arbejdssted</a>
</div>
</div>

View file

@ -29,7 +29,9 @@ public partial class CrmCustomerWorkplaceListPage : IDisposable
// ###############################################################
[Inject] public ICrmWorkplaceRepository WorkplaceRepo { get; set; }
[Inject] public ICrmCustomerRepository CustomerRepo { get; set; }
[Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public NavigationManager Navigator { get; set; }
// ###############################################################
[Parameter] public string CompanyId { get; set; } = "";
@ -50,15 +52,14 @@ public partial class CrmCustomerWorkplaceListPage : IDisposable
await Task.Delay(150);
Workplaces = await WorkplaceRepo.GetWorkplaces(CompanyId);
if (Workplaces.Count == 1)
{
Navigator.NavigateTo($"/advisor/customers/{CompanyId}/workplaces/{Workplaces[0].WorkplaceId}");
}
Working = false;
}
private async Task<List<WorkplaceListView>> GetWorkplaces()
{
return await WorkplaceRepo.GetWorkplaces(CompanyId);
}
public void Dispose()
{

View file

@ -20,7 +20,7 @@
<PageTitle>@Company.Name - Opret Arbejdssted</PageTitle>
<div class="row g-1 mb-3">
<div class="col-sm-8">
<h3>@Company.Name Opret Arbejdssted</h3>
@Company.Name - Opret Arbejdssted
</div>
<div class="col-sm-2">
<a class="btn btn-primary" href="/advisor/customers/@CompanyId"><i class="bi-chevron-left"></i> Stamkort</a>

View file

@ -75,7 +75,9 @@ public partial class CrmCustomerWorkplaceNewPage : IDisposable
{
Logger.LogDebug("CompanyId {}", JsonSerializer.Serialize(Workplace));
Logger.LogDebug("Workplace {}", JsonSerializer.Serialize(Workplace, new JsonSerializerOptions(JsonSerializerDefaults.Web)));
var result = await WorkplaceRepo.CreateWorkplace(CompanyId, Workplace);
Logger.LogDebug("HTTP result {}", result);
if (!string.IsNullOrWhiteSpace(result))
{

View file

@ -17,19 +17,28 @@
@using Wonky.Client.Components
@attribute [Authorize(Roles = "Advisor")]
@page "/advisor/customers/{CompanyId}/workplaces/{WorkplaceId}"
<PageTitle>@Workplace.CompanyName - @Workplace.Name</PageTitle>
<div class="row -mb-3">
<div class="col-sm-4">
<h2>@Workplace.CompanyName</h2>
</div>
<div class="col-sm-4">
<h3>@Workplace.Name @(!string.IsNullOrWhiteSpace(Workplace.Description) ? $"- {Workplace.Description}" : "")</h3>
<div class="col-sm-8">
@Workplace.CompanyName
</div>
<div class="col-sm-2">
<a class="btn btn-primary" href="/advisor/customers/@CompanyId"><i class="bi-chevron-left"></i> Stamkort</a>
</div>
<div class="col-sm-2 text-end">
<a class="btn btn-primary" href="/advisor/customers/@CompanyId/workplaces"><i class="bi-chevron-left"></i> Tilbage</a>
@if (OnlyOne)
{
<a class="btn btn-primary" href="/advisor/customers/@CompanyId"><i class="bi-chevron-left"></i> Tilbage</a>
}
else
{
<a class="btn btn-primary" href="/advisor/customers/@CompanyId/workplaces"><i class="bi-chevron-left"></i> Tilbage</a>
}
</div>
<div class="col-sm-12">
@Workplace.Name @(!string.IsNullOrWhiteSpace(Workplace.Description) ? $" ({Workplace.Description})" : "")
</div>
</div>
@ -114,11 +123,11 @@
<a class="btn btn-primary" href="@Workplace.ShortUrl" target="_blank"><i class="bi-list-ul"></i> Vis QR-koder</a>
</div>
<div class="col-sm-3 text-end">
<button class="btn btn-primary"><i class="bi-plus-lg"></i> Produkt(er)</button>
<a class="btn btn-primary" href="/advisor/customers/@CompanyId/workplaces/@WorkplaceId/documents/new"><i class="bi-pencil-square"></i> Opret / Ændre</a>
</div>
<div class="col-sm-12 col-md-6">
<div class="input-group">
<label class="input-group-text" for="qrlink">
<label class="input-group-text" for="qrlink" @onclick="@OnCopyLink">
<i class="bi-clipboard-plus"></i>
</label>
<input class="form-control text-muted" id="qrlink" type="text" readonly value="@Workplace.ShortUrl"/>

View file

@ -65,6 +65,7 @@ public partial class CrmCustomerWorkplaceViewEditPage : IDisposable
private string _copyButtonText = CopyText;
private string _copyButtonStyle = CopyStyle;
private DocView SelectedProduct { get; set; } = new();
private bool OnlyOne { get; set; } = true;
protected override async Task OnInitializedAsync()
@ -75,10 +76,12 @@ public partial class CrmCustomerWorkplaceViewEditPage : IDisposable
Interceptor.RegisterEvent();
Interceptor.RegisterBeforeSendEvent();
var x = await Workplaces.GetWorkplaces(CompanyId);
OnlyOne = x.Count is 1;
await Task.Delay(250);
Workplace = await Workplaces.GetWorkplace(CompanyId, WorkplaceId);
WorkplaceInventory = await WorkplaceRepo.GetWorkplaceInventory(CompanyId, WorkplaceId);
DocViews = GenerateDocumentListView();
Working = false;
}

View file

@ -84,7 +84,7 @@ public partial class OfficeOrderCreatePage : IDisposable
// #############################################################
// lists
private List<ProductInventoryView> CompanyInventory { get; set; } = new();
private List<ProductInventoryItemView> CompanyInventory { get; set; } = new();
private InvoiceListView CompanyInvoices { get; set; } = new();
private List<ReportItemView> CompanyActivities { get; set; } = new();

View file

@ -67,6 +67,7 @@ public class AuthStateProvider : AuthenticationStateProvider
from role in userInfo.AssignedRoles
where role.Assigned select new Claim(ClaimTypes.Role, role.Name)
);
claims.Add( new Claim(ClaimTypes.Role, userInfo.CountryCode));
// return the authState for the user
return new AuthenticationState(

View file

@ -1,146 +0,0 @@
@* 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]
*@
@inject IWebAssemblyHostEnvironment HostEnvironment
@using Wonky.Client.Components;
@using Wonky.Entity.Views
@using Blazored.LocalStorage
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="/"><TopbarDisplayUser /></a>
<button title="Navigation menu" class="navbar-toggler" onclick="@ToggleNavMenu">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
<div class="@NavMenuCssClass" onclick="@ToggleNavMenu">
<nav class="flex-column">
<AuthorizeView>
<NotAuthorized>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/" Match="NavLinkMatch.All">
<i class="bi-person-workspace pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Start
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/login">
<i class="bi-lock pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Log ind
</NavLink>
</div>
</NotAuthorized>
</AuthorizeView>
<AuthorizeView Roles="Admin,Office,Warehouse">
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/office/country">
<i class="bi-people pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Sælgere
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/office/customers/dk">
<i class="bi-building pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Kunder DK
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/office/customers/no">
<i class="bi-building pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Kunder NO
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/office/customers/se">
<i class="bi-building pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Kunder SE
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/warehouse/orders/none">
<i class="bi-box pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Forsendelse
</NavLink>
</div>
</AuthorizeView>
<AuthorizeView Roles="Advisor">
<Authorized>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/home">
<i class="bi-calendar pe-2" style="font-size:1.3em;" aria-hidden="true"></i> ToDo
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/catalog">
<i class="bi-file-spreadsheet pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Priskatalog
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/advisor/customers">
<i class="bi-building pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Firmaer
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/advisor/agreements">
<i class="bi-calculator pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Aftaler/Tilbud
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/advisor/activity-today">
<i class="bi-activity pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Aktivitet
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/advisor/reports">
<i class="bi-file-earmark-spreadsheet pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Dagsrapporter
</NavLink>
</div>
</Authorized>
</AuthorizeView>
<AuthorizeView Roles="Admin">
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/system">
<i class="bi-gear-wide-connected pe-2" style="font-size:1.3em;" aria-hidden="true"></i> System
</NavLink>
</div>
</AuthorizeView>
<AuthorizeView Roles="Admin,Advisor,Office,Supervisor,Warehouse">
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/info">
<i class="bi-question pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Hjælp
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link ps-2" href="/logout">
<i class="bi-lock pe-2" style="font-size:1.3em;" aria-hidden="true"></i> Log af
</NavLink>
</div>
</AuthorizeView>
</nav>
</div>
@code {
private bool collapseNavMenu = true;
private string? NavMenuCssClass => collapseNavMenu ? "collapse" : null;
private void ToggleNavMenu()
{
collapseNavMenu = !collapseNavMenu;
}
}

View file

@ -1,81 +0,0 @@
/* 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]
*/
.navbar-toggler {
background-color: rgba(255, 255, 255, 0.1);
}
.top-row {
height: 3.5rem;
background-color: rgba(0,0,0,0.4);
}
.navbar-brand {
font-size: 1.1rem;
}
.oi {
width: 2rem;
font-size: 1.1rem;
vertical-align: text-top;
top: -2px;
}
.nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
}
.nav-item:first-of-type {
padding-top: 1rem;
}
.nav-item:last-of-type {
padding-bottom: 1rem;
}
.nav-item ::deep a {
color: #d7d7d7;
border-radius: 4px;
height: 3rem;
display: flex;
align-items: center;
line-height: 3rem;
}
.nav-item ::deep a.active {
background-color: rgba(255,255,255,0.25);
color: white;
}
.nav-item ::deep a:hover {
background-color: rgba(255,255,255,0.1);
color: white;
}
.list-group.panel > .list-group-item {
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
@media (min-width: 1025px) {
.navbar-toggler {
display: none;
}
.collapse {
/* Never collapse the sidebar for wide screens */
display: block;
}
}

View file

@ -34,6 +34,7 @@
<Content Remove="wwwroot\icons\**" />
<Content Remove="Pages\AdvisorCustomerOrderViewPage.razor" />
<Content Remove="Pages\OfficeUserAdvisorViewEditPage.razor" />
<Content Remove="Shared\NavMenu-backup.razor" />
</ItemGroup>
<ItemGroup>

View file

@ -1,9 +1,9 @@
{
"appInfo": {
"name": "Wonky Online",
"version": "147.0",
"version": "148.0",
"rc": true,
"sandBox": false,
"sandBox": true,
"image": "grumpy-coder.png"
},
"Logging": {

View file

@ -25,7 +25,7 @@ html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
h1:focus {
h1,h2:focus {
outline: none;
}
@ -217,7 +217,6 @@ a, .btn-link {
border-radius: 50%;
box-shadow: rgba(0, 0, 0, 0.2) 0 -1px 7px 1px, inset #006 0 -1px 9px, #3F8CFF 0 2px 14px;
}
/* end led elements */
/*#blazor-error-ui {*/

View file

@ -78,8 +78,7 @@ public class CompanyDto
public string SalesRep { get; set; } = "";
public string SalesRepId { get; set; } = "";
[Required(ErrorMessage = "Segment skal vælges - AUTO eller INDUSTRI")]
public string Segment { get; set; } = "";
public int ValidVat { get; set; }

View file

@ -15,26 +15,13 @@
namespace Wonky.Entity.Views;
public class ProductInventoryView
public class ProductInventoryItemView
{
/// <summary>
/// entity description
/// </summary>
public string Description { get; set; } = "";
/// <summary>
/// entity item number
/// </summary>
public string Sku { get; set; } = "";
/// <summary>
/// quantity bought over time
/// </summary>
public int Quantity { get; set; }
/// <summary>
/// Product has been discontinued
/// </summary>
public bool Discontinued { get; set; }
/// <summary>
/// Virtual checkmark
/// </summary>
public virtual bool Check { get; set; }
public string Description { get; set; } = "";
public bool Discontinued { get; set; }
public string PictureLink { get; set; } = "";
public int Quantity { get; set; }
public string Sku { get; set; } = "";
public string VendorItemNo { get; set; } = "";
}

View file

@ -6,5 +6,6 @@ public class WorkplaceProductVariant
{
public string VariantName { get; set; } = "";
public string VariantId { get; set; } = "";
public string VendorItemNo { get; set; } = "";
public List<WorkplaceProductVariantDoc> Docs { get; set; } = new();
}