wip v0.8.6

This commit is contained in:
Frede Hundewadt 2022-06-18 08:30:29 +02:00
parent 66c4164baa
commit dd936c75ef
66 changed files with 62699 additions and 151 deletions

View file

@ -16,14 +16,16 @@
// //
*@ *@
<PageTitle>Innotec Danmark A/S</PageTitle> <PageTitle>Inno Web CRM</PageTitle>
<div class="row mb-1"> <AuthorizeView>
<Authorized>
<div class="row mb-1 align-items-center">
<div class="col-md-4"> <div class="col-md-4">
<span class="workDate">@($"{DateTime.Parse(_workDate).ToLongDateString()}")</span> <span class="workDate">@(string.IsNullOrWhiteSpace(_workDate) ? "" : $"{DateTime.Parse(_workDate).ToLongDateString()}")</span>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<WorkDateComponent OnChanged="FetchActivities"></WorkDateComponent> <WorkDateComponent OnChanged="GetActivities"></WorkDateComponent>
</div> </div>
<div class="col"> <div class="col">
</div> </div>
@ -34,7 +36,7 @@
<h5>Dagens aktivitet</h5> <h5>Dagens aktivitet</h5>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr class="align-items-center">
<th scope="col">Kunde</th> <th scope="col">Kunde</th>
<th scope="col">Demo</th> <th scope="col">Demo</th>
<th scope="col">Salg</th> <th scope="col">Salg</th>
@ -46,7 +48,7 @@
{ {
foreach (var activity in _view.Activities) foreach (var activity in _view.Activities)
{ {
<tr> <tr class="align-items-center">
<td> <td>
@activity.Company.Name @activity.Company.Name
</td> </td>
@ -64,3 +66,8 @@
} }
</tbody> </tbody>
</table> </table>
</Authorized>
<NotAuthorized>
<a href="/login">Login</a>
</NotAuthorized>
</AuthorizeView>

View file

@ -37,23 +37,23 @@ public partial class Home : IDisposable
[Inject] private NavigationManager Navigator { get; set; } [Inject] private NavigationManager Navigator { get; set; }
[Inject] private IActivityHttpRepository ActivityRepo { get; set; } [Inject] private IActivityHttpRepository ActivityRepo { get; set; }
[Inject] private IToastService _toast { get; set; } [Inject] private IToastService _toast { get; set; }
private NgActivityListView _view { get; set; } private NgActivityListView _view { get; set; } = new();
private Preferences _prefs { get; set; } = new(); private Preferences _prefs { get; set; } = new();
private string _workDate { get; set; } = $"{DateTime.Now:yyyy-MM-dd}"; private string _workDate { get; set; } = $"{DateTime.Now:yyyy-MM-dd}";
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
_prefs = await UserPrefs.GetPreferences(); _prefs = await UserPrefs.GetPreferences();
if(!string.IsNullOrWhiteSpace(_prefs.WorkDate)) if(!string.IsNullOrWhiteSpace(_prefs.WorkDate))
_workDate = _prefs.WorkDate; _workDate = _prefs.WorkDate;
Interceptor.RegisterEvent(); Interceptor.RegisterEvent();
Interceptor.RegisterBeforeSendEvent(); Interceptor.RegisterBeforeSendEvent();
await FetchActivities(_workDate);
await GetActivities(_workDate);
} }
private async Task FetchActivities(string workDate) private async Task GetActivities(string workDate)
{ {
_toast.ShowInfo("Vent nogle sekunder for data"); _toast.ShowInfo("Vent nogle sekunder for data");
_workDate = workDate; _workDate = workDate;

View file

@ -95,8 +95,9 @@ public class CompanyHttpRepository : ICompanyHttpRepository
{ {
var response = await _client.PostAsJsonAsync($"{_apiConfig.CustomerEndpoint}", model); var response = await _client.PostAsJsonAsync($"{_apiConfig.CustomerEndpoint}", model);
var content = await response.Content.ReadAsStringAsync(); var content = await response.Content.ReadAsStringAsync();
Console.WriteLine(content);
var result = JsonSerializer.Deserialize<CompanyDto>(content); var result = JsonSerializer.Deserialize<CompanyDto>(content);
return result.CompanyId; return result == null ? "" : result.CompanyId;
} }
public async Task<bool> UpdateCompany(string companyId, CompanyDto model) public async Task<bool> UpdateCompany(string companyId, CompanyDto model)

View file

@ -34,8 +34,8 @@ public class ReportHttpRepository :IReportHttpRepository
{ {
var result = var result =
await _client await _client
.GetFromJsonAsync<NgActivityListView>($"{_apiConfig.ReportEndpoint}/exist/{workDate}"); .GetFromJsonAsync<ReportClosedView>($"{_apiConfig.ReportEndpoint}/exist/{workDate}");
return result.ReportClosed || true; return result.ReportClosed;
} }
public async Task<NgSalesReportView> GetReport(string workDate) public async Task<NgSalesReportView> GetReport(string workDate)

View file

@ -19,20 +19,23 @@
@using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Roles = "Adviser")] @attribute [Authorize(Roles = "Adviser")]
@using Wonky.Client.Components @using Wonky.Client.Components
<div class="row"> <div class="row mb-2 align-items-center">
<div class="col-md-4"> <div class="col">
<h5 style="font-variant: small-caps">@_workDate.ToLongDateString()</h5> <h5 style="font-variant: small-caps">@_workDate.ToLongDateString()</h5>
</div> </div>
<div class="col-md-3"> <div class="col">
<WorkDateComponent OnChanged="SetWorkDate"></WorkDateComponent> <WorkDateComponent OnChanged="SetWorkDate"></WorkDateComponent>
</div> </div>
</div> </div>
@if (_reportClosdd) @if (_reportClosdd)
{ {
<div class="row"> <div class="row align-items-md-center">
<div class="col"> <div class="col">
<h5>Der kan ikke oprettes aktiviteter for den valgte dato</h5> <h5>Rapport for @($"{_workDate:yyyy-MM-dd}") er fundet.</h5>
</div>
<div class="col">
<a class="btn btn-info" href="/sales-report/view/@($"{_workDate:yyyy-MM-dd}")">Vis rapport</a>
</div> </div>
</div> </div>
} }

View file

@ -83,7 +83,9 @@ public partial class ActivityCreate : IDisposable
_workDate = DateTime.Parse(_prefs.WorkDate); _workDate = DateTime.Parse(_prefs.WorkDate);
_poDraft.ActivityDate = $"{_workDate:yyyy-MM-dd}" ; _poDraft.ActivityDate = $"{_workDate:yyyy-MM-dd}" ;
// check if report is closed // check if report is closed
_reportClosdd = await _reportRepo.ReportExist(_poDraft.ActivityDate); _reportClosdd = await _reportRepo.ReportExist(_poDraft.ActivityDate);
_paging.SearchColumn = _prefs.ItemSearch ?? "name"; _paging.SearchColumn = _prefs.ItemSearch ?? "name";
@ -94,6 +96,10 @@ public partial class ActivityCreate : IDisposable
Ux = await _storage.GetItemAsync<UserInfoView>("_xu"); Ux = await _storage.GetItemAsync<UserInfoView>("_xu");
NgCompany = await _companyRepo.GetCompanyById(CompanyId); NgCompany = await _companyRepo.GetCompanyById(CompanyId);
DraftContext = new EditContext(_poDraft);
DraftContext.OnFieldChanged += HandleFieldChanged;
DraftContext.OnValidationStateChanged += ValidationChanged;
// set up identification // set up identification
_poDraft.CompanyId = NgCompany.CompanyId; _poDraft.CompanyId = NgCompany.CompanyId;
_poDraft.BcId = NgCompany.BcId; _poDraft.BcId = NgCompany.BcId;
@ -122,15 +128,12 @@ public partial class ActivityCreate : IDisposable
_poDraft.DlvZipCode = NgCompany.ZipCode; _poDraft.DlvZipCode = NgCompany.ZipCode;
_poDraft.DlvCity = NgCompany.City; _poDraft.DlvCity = NgCompany.City;
DraftContext = new EditContext(_poDraft);
DraftContext.OnFieldChanged += HandleFieldChanged;
DraftContext.OnValidationStateChanged += ValidationChanged;
} }
private void SetWorkDate(string workDate) private void SetWorkDate(string workDate)
{ {
_logger.LogInformation("WorkDateComponent.OnChanged(SetWorkDate(workDate)) => {workDate}", workDate); _logger.LogInformation("WorkDateComponent.OnChanged(SetWorkDate(workDate)) => {workDate}", workDate);
_workDate = DateTime.Parse(workDate);
_poDraft.ActivityDate = workDate; _poDraft.ActivityDate = workDate;
} }

View file

@ -187,12 +187,14 @@
</div> </div>
<div class="card-footer"> <div class="card-footer">
<div class="row"> <div class="row">
@*
<div class="col"> <div class="col">
<button type="button" class="btn btn-warning">Fjern</button> <button type="button" class="btn btn-warning">Fjern</button>
</div> </div>
<div class="col"> <div class="col">
<button type="button" class="btn btn-danger">Slet</button> <button type="button" class="btn btn-danger">Slet</button>
</div> </div>
*@
<div class="col"> <div class="col">
<button type="submit" class="btn btn-success">Gem</button> <button type="submit" class="btn btn-success">Gem</button>
</div> </div>

View file

@ -35,7 +35,7 @@ namespace Wonky.Client.Pages;
public partial class CompanyEdit : IDisposable public partial class CompanyEdit : IDisposable
{ {
[Inject] public IToastService ToastService { get; set; } [Inject] public IToastService ToastService { get; set; }
[Inject] public ILogger<CompanyCreate> Logger { get; set; } [Inject] public ILogger<CreateCompany> Logger { get; set; }
[Inject] public NavigationManager Navigation { get; set; } [Inject] public NavigationManager Navigation { get; set; }
[Inject] public ICompanyHttpRepository CompanyRepo { get; set; } [Inject] public ICompanyHttpRepository CompanyRepo { get; set; }
[Inject] public HttpInterceptorService Interceptor { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; }

View file

@ -71,15 +71,9 @@
<div class="d-flex align-items-end"> <div class="d-flex align-items-end">
<a class="btn btn-primary mx-2" href="/companies">Tilbage</a> <a class="btn btn-primary mx-2" href="/companies">Tilbage</a>
<a class="btn btn-primary mx-2" href="/company/@(_companyDto.CompanyId)/update">Rediger</a> <a class="btn btn-primary mx-2" href="/company/@(_companyDto.CompanyId)/update">Rediger</a>
@if (_vatInvalid || string.IsNullOrWhiteSpace(_companyDto.Address1)) @if (!_vatInvalid && !string.IsNullOrWhiteSpace(_companyDto.Address1))
{ {
<a type="button" class="btn btn-primary mx-2 disabled" aria-disabled="true">Kanvas/Nulsalg</a> <a type="button" class="btn btn-primary mx-2" href="/company/@_companyDto.CompanyId/activity">Opret aktivitet</a>
<a type="button" class="btn btn-primary mx-2 disabled" aria-disabled="true">Besøg</a>
}
else
{
<a type="button" class="btn btn-primary mx-2 disabled" aria-disabled="true">Kanvas/Nulsalg</a>
<a type="button" class="btn btn-primary mx-2" href="/company/@_companyDto.CompanyId/activity">Aktivittet</a>
} }
</div> </div>
</div> </div>

View file

@ -47,7 +47,7 @@
</td> </td>
} }
</tr> </tr>
@if (_vInfos.Any()) @if (_vInfos.Any() && _showInfos)
{ {
<tr> <tr>
<td colspan="2"> <td colspan="2">
@ -80,9 +80,9 @@
</tbody> </tbody>
</table> </table>
<EditForm EditContext="_createCompany" OnValidSubmit="Create"> <EditForm EditContext="_editContext" OnValidSubmit="SubmitCompanyForm">
<DataAnnotationsValidator /> <DataAnnotationsValidator />
<InputText type="hidden" id="salesRepId" @bind-Value="_createDto.SalesRepId"/> <InputText type="hidden" id="salesRepId" @bind-Value="_companyObject.SalesRepId"/>
<table class="table"> <table class="table">
<thead> <thead>
<tr> <tr>
@ -104,11 +104,10 @@
</td> </td>
<td> <td>
<InputDate id="nextVisit" class="form-control" @bind-Value="@(_nextVisit)"/> <InputDate id="nextVisit" class="form-control" @bind-Value="@(_nextVisit)"/>
<ValidationMessage For="@(() => _createDto.NextVisit)"></ValidationMessage>
</td> </td>
<td> <td>
<InputNumber id="interval" class="form-control" @bind-Value="_createDto.Interval"/> <InputNumber id="interval" class="form-control" @bind-Value="_companyObject.Interval"/>
<ValidationMessage For="@(() => _createDto.Interval)"></ValidationMessage> <ValidationMessage For="@(() => _companyObject.Interval)"></ValidationMessage>
</td> </td>
</tr> </tr>
</tbody> </tbody>
@ -126,58 +125,65 @@
<td class="align-middle">Moms/Org Reg.</td> <td class="align-middle">Moms/Org Reg.</td>
<td class="align-middle state"><DisplayStateComponent StateClass="@RegState"></DisplayStateComponent></td> <td class="align-middle state"><DisplayStateComponent StateClass="@RegState"></DisplayStateComponent></td>
<td class="align-middle"> <td class="align-middle">
<InputText id="vatNumber" class="form-control" @bind-Value="_createDto.VatNumber"/> <InputText id="vatNumber" class="form-control" @bind-Value="_companyObject.VatNumber"/>
<ValidationMessage For="@(() => _companyObject.VatNumber)"></ValidationMessage>
</td> </td>
<td class="align-middle">Telefon</td> <td class="align-middle">Telefon</td>
<td class="align-middle"> <td class="align-middle">
<InputText id="phone" class="form-control" @bind-Value="_createDto.Phone"/> <InputText id="phone" class="form-control" @bind-Value="_companyObject.Phone"/>
<ValidationMessage For="@(() => _companyObject.Phone)"></ValidationMessage>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="align-middle">Firmanavn</td> <td class="align-middle">Firmanavn</td>
<td class="align-middle"></td> <td class="align-middle"></td>
<td> <td>
<InputText id="name" class="form-control" @bind-Value="_createDto.Name"/> <InputText id="name" class="form-control" @bind-Value="_companyObject.Name"/>
<ValidationMessage For="@(() => _createDto.Name)"></ValidationMessage> <ValidationMessage For="@(() => _companyObject.Name)"></ValidationMessage>
</td> </td>
<td class="align-middle">Attention</td> <td class="align-middle">Attention</td>
<td> <td>
<InputText id="attention" class="form-control" @bind-Value="_createDto.Attention"/> <InputText id="attention" class="form-control" @bind-Value="_companyObject.Attention"/>
<ValidationMessage For="@(() => _companyObject.Attention)"></ValidationMessage>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="align-middle">Adresse</td> <td class="align-middle">Adresse1</td>
<td class="align-middle"></td> <td class="align-middle"></td>
<td class="align-middle"> <td class="align-middle">
<InputText id="address1" class="form-control" @bind-Value="_createDto.Address1"/> <InputText id="address1" class="form-control" @bind-Value="_companyObject.Address1"/>
<ValidationMessage For="@(() => _companyObject.Address1)"></ValidationMessage>
</td> </td>
<td class="align-middle">Adresse</td> <td class="align-middle">Adresse2</td>
<td class="align-middle"> <td class="align-middle">
<InputText id="address2" class="form-control" @bind-Value="_createDto.Address2"/> <InputText id="address2" class="form-control" @bind-Value="_companyObject.Address2"/>
<ValidationMessage For="@(() => _companyObject.Address2)"></ValidationMessage>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="align-middle">Postnr</td> <td class="align-middle">Postnr</td>
<td class="align-middle"></td> <td class="align-middle"></td>
<td class="align-middle"> <td class="align-middle">
<InputText id="zipCode" class="form-control" @bind-Value="_createDto.ZipCode"/> <InputText id="zipCode" class="form-control" @bind-Value="_companyObject.ZipCode"/>
<ValidationMessage For="@(() => _createDto.ZipCode)"></ValidationMessage> <ValidationMessage For="@(() => _companyObject.ZipCode)"></ValidationMessage>
</td> </td>
<td class="align-middle">Bynavn</td> <td class="align-middle">Bynavn</td>
<td class="align-middle"> <td class="align-middle">
<InputText id="city" class="form-control" @bind-Value="_createDto.City"/> <InputText id="city" class="form-control" @bind-Value="_companyObject.City"/>
<ValidationMessage For="@(() => _createDto.City)"></ValidationMessage> <ValidationMessage For="@(() => _companyObject.City)"></ValidationMessage>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="align-middle">Mobil</td> <td class="align-middle">Mobil</td>
<td class="align-middle"></td> <td class="align-middle"></td>
<td class="align-middle"> <td class="align-middle">
<InputText id="mobile" class="form-control" @bind-Value="_createDto.Mobile"/> <InputText id="mobile" class="form-control" @bind-Value="_companyObject.Mobile"/>
<ValidationMessage For="@(() => _companyObject.Mobile)"></ValidationMessage>
</td> </td>
<td class="align-middle">Email</td> <td class="align-middle">Email</td>
<td class="align-middle"> <td class="align-middle">
<InputText id="email" class="form-control" @bind-Value="_createDto.Email"/> <InputText id="email" class="form-control" @bind-Value="_companyObject.Email"/>
<ValidationMessage For="@(() => _companyObject.Email)"></ValidationMessage>
</td> </td>
</tr> </tr>
</tbody> </tbody>

View file

@ -35,47 +35,54 @@ using Wonky.Entity.Views;
namespace Wonky.Client.Pages namespace Wonky.Client.Pages
{ {
public partial class CompanyCreate : IDisposable public partial class CreateCompany : IDisposable
{ {
[Inject] public IToastService ToastService { get; set; } [Inject] public IToastService ToastService { get; set; }
[Inject] public ILogger<CompanyCreate> Logger { get; set; } [Inject] public ILogger<CreateCompany> Logger { get; set; }
[Inject] public ILocalStorageService StorageService { get; set; } [Inject] public ILocalStorageService StorageService { get; set; }
[Inject] public NavigationManager Navigation { get; set; } [Inject] public NavigationManager Navigation { get; set; }
[Inject] public ICompanyHttpRepository CompanyRepo { get; set; } [Inject] public ICompanyHttpRepository CompanyRepo { get; set; }
[Inject] public HttpInterceptorService Interceptor { get; set; } [Inject] public HttpInterceptorService Interceptor { get; set; }
[Inject] public VatInfoLookupService VatInfoLookupService { get; set; } [Inject] public VatInfoLookupService VatInfoLookupService { get; set; }
private EditContext _editContext { get; set; }
private CompanyDto _companyObject { get; set; } = new();
private VirkRegInfo _virkRegInfo { get; set; } = new();
private List<VirkRegInfo> _vInfos { get; set; } = new(); private List<VirkRegInfo> _vInfos { get; set; } = new();
private CompanyDto _createDto = new(); private VatAddress _vatAddress { get; set; } = new();
private VirkRegInfo _virkRegInfo = new();
private EditContext _createCompany;
private bool _formInvalid = true; private bool _formInvalid = true;
private VatAddress _vatAddress = new();
private string RegState = ""; private string RegState = "";
private DateTime _lastVisit { get; set; } private DateTime _lastVisit { get; set; }
private DateTime _nextVisit { get; set; } private DateTime _nextVisit { get; set; }
private bool _dk = false; private bool _dk = false;
private bool _showInfos = true;
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
Interceptor.RegisterEvent(); _editContext = new EditContext(_companyObject);
Interceptor.RegisterBeforeSendEvent();
_editContext.OnFieldChanged += HandleFieldChanged;
_editContext.OnValidationStateChanged += ValidationChanged;
var ux = await StorageService.GetItemAsync<UserInfoView>("_xu"); var ux = await StorageService.GetItemAsync<UserInfoView>("_xu");
_dk = ux.CountryCode.ToLower() == "dk"; _dk = ux.CountryCode.ToLower() == "dk";
_createDto.SalesRepId = ux.Id;
_createDto.CountryCode = ux.CountryCode.ToLower(); _companyObject.SalesRepId = ux.Id;
_companyObject.CountryCode = ux.CountryCode.ToLower();
_lastVisit = DateTime.Now; _lastVisit = DateTime.Now;
_nextVisit = DateTime.Now.AddDays(_createDto.Interval * 7); _nextVisit = DateTime.Now.AddDays(_companyObject.Interval * 7);
_createDto.LastVisit = $"{_lastVisit:yyyy-MM-dd}";
_createDto.LastVisit = $"{_nextVisit:yyyy-MM-dd}"; _companyObject.LastVisit = $"{_lastVisit:yyyy-MM-dd}";
_createCompany = new EditContext(_createDto); _companyObject.LastVisit = $"{_nextVisit:yyyy-MM-dd}";
_createCompany.OnFieldChanged += HandleFieldChanged;
_createCompany.OnValidationStateChanged += ValidationChanged; Interceptor.RegisterEvent();
Interceptor.RegisterBeforeSendEvent();
} }
private async Task GetInfoFromAddress(VatAddress address) private async Task GetInfoFromAddress(VatAddress address)
{ {
_showInfos = true;
ToastService.ShowInfo("Vent for adresse info ..."); ToastService.ShowInfo("Vent for adresse info ...");
_vInfos = await VatInfoLookupService.QueryVirkRegistry( _vInfos = await VatInfoLookupService.QueryVirkRegistry(
new VirkParams new VirkParams
@ -91,6 +98,7 @@ namespace Wonky.Client.Pages
} }
private async Task GetInfoFromVat(string vatNumber) private async Task GetInfoFromVat(string vatNumber)
{ {
_showInfos = true;
ToastService.ShowInfo("Vent for firma info ..."); ToastService.ShowInfo("Vent for firma info ...");
_vInfos = await VatInfoLookupService _vInfos = await VatInfoLookupService
.QueryVirkRegistry(new VirkParams {VatNumber = vatNumber}); .QueryVirkRegistry(new VirkParams {VatNumber = vatNumber});
@ -101,39 +109,45 @@ namespace Wonky.Client.Pages
} }
private void SelectCompany(string vatNumber) private void SelectCompany(string vatNumber)
{ {
_showInfos = false;
_virkRegInfo = (from x in _vInfos where x.VatNumber == vatNumber select x).First(); _virkRegInfo = (from x in _vInfos where x.VatNumber == vatNumber select x).First();
RegState = _virkRegInfo.States[^1].State == "NORMAL" ? "the-good" : "the-ugly"; RegState = _virkRegInfo.States[^1].State == "NORMAL" ? "the-good" : "the-ugly";
_createDto.Name = _virkRegInfo.Name; _companyObject.Name = _virkRegInfo.Name;
_createDto.Address1 = _virkRegInfo.Address; _companyObject.Address1 = _virkRegInfo.Address;
_createDto.Address2 = _virkRegInfo.CoName; _companyObject.Address2 = _virkRegInfo.CoName;
_createDto.ZipCode = _virkRegInfo.ZipCode; _companyObject.ZipCode = _virkRegInfo.ZipCode;
_createDto.City = _virkRegInfo.City; _companyObject.City = _virkRegInfo.City;
_createDto.VatNumber = _virkRegInfo.VatNumber; _companyObject.VatNumber = _virkRegInfo.VatNumber;
_createDto.ValidVat = 1; _companyObject.ValidVat = 1;
StateHasChanged();
} }
private async Task Create() private async Task SubmitCompanyForm()
{ {
var newId = await CompanyRepo.CreateCompany(_createDto); var newId = await CompanyRepo.CreateCompany(_companyObject);
if (!string.IsNullOrWhiteSpace(newId)) if (!string.IsNullOrWhiteSpace(newId))
{ {
ToastService.ShowSuccess($"'{_createDto.Name}' er oprettet i CRM."); ToastService.ShowSuccess($"'{_companyObject.Name}' er oprettet i CRM.");
Navigation.NavigateTo($"/company/id/{newId}"); Navigation.NavigateTo($"/company/id/{newId}");
} }
else
{
ToastService.ShowWarning($"'{_companyObject.Name}' IKKE oprettet.");
}
} }
private void HandleFieldChanged(object sender, FieldChangedEventArgs e) private void HandleFieldChanged(object sender, FieldChangedEventArgs e)
{ {
_createDto.LastVisit = $"{_lastVisit:yyyy-MM-dd}"; _companyObject.LastVisit = $"{_lastVisit:yyyy-MM-dd}";
_createDto.NextVisit = $"{_nextVisit:yyyy-MM-dd}"; _companyObject.NextVisit = $"{_nextVisit:yyyy-MM-dd}";
if (!VatUtils.ValidateFormat(_createDto.CountryCode, _createDto.VatNumber) if (!VatUtils.ValidateFormat(_companyObject.CountryCode, _companyObject.VatNumber)
|| !_createDto.ValidDateSpan()) || !_companyObject.ValidDateSpan())
{ {
_formInvalid = true; _formInvalid = true;
} }
else else
{ {
_formInvalid = !_createCompany.Validate(); _formInvalid = !_editContext.Validate();
} }
StateHasChanged(); StateHasChanged();
} }
@ -141,19 +155,21 @@ namespace Wonky.Client.Pages
{ {
_formInvalid = true; _formInvalid = true;
_createCompany.OnFieldChanged -= HandleFieldChanged; _editContext.OnFieldChanged -= HandleFieldChanged;
_createCompany = new EditContext(_createDto); _editContext = new EditContext(_companyObject);
_createCompany.OnFieldChanged += HandleFieldChanged; _formInvalid = !_editContext.Validate();
_createCompany.OnValidationStateChanged -= ValidationChanged;
_editContext.OnFieldChanged += HandleFieldChanged;
_editContext.OnValidationStateChanged -= ValidationChanged;
} }
public void Dispose() public void Dispose()
{ {
Interceptor.DisposeEvent(); Interceptor.DisposeEvent();
_createCompany.OnFieldChanged -= HandleFieldChanged; _editContext.OnFieldChanged -= HandleFieldChanged;
_createCompany.OnValidationStateChanged -= ValidationChanged; _editContext.OnValidationStateChanged -= ValidationChanged;
} }
} }
} }

View file

@ -20,7 +20,9 @@
@page "/home" @page "/home"
@using Wonky.Client.Components; @using Wonky.Client.Components;
@using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Authorization
@attribute [Authorize(Roles = "Adviser,Admin,Supervisor")] @attribute [Authorize(Roles = "Adviser,Admin,Supervisor")]
<Home></Home> <Home></Home>
@code{ @code{

View file

@ -6,7 +6,7 @@
<WorkDateComponent OnChanged="GetReport"></WorkDateComponent> <WorkDateComponent OnChanged="GetReport"></WorkDateComponent>
<div> <div>
@if (_report.Activities != null) @if (_report.Activities.Any())
{ {
<table class="table"> <table class="table">
<thead> <thead>

View file

@ -9,13 +9,15 @@ public partial class ReportView
{ {
[Inject] private IReportHttpRepository ReportRepo { get; set; } [Inject] private IReportHttpRepository ReportRepo { get; set; }
[Parameter] public string ReportDate { get; set; } [Parameter] public string ReportDate { get; set; }
private NgSalesReportView _report { get; set; } private NgSalesReportView _report { get; set; } = new();
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
if (!string.IsNullOrWhiteSpace(ReportDate)) if (!string.IsNullOrWhiteSpace(ReportDate))
{
await GetReport(ReportDate); await GetReport(ReportDate);
} }
}
private async Task GetReport(string workDate) private async Task GetReport(string workDate)
{ {

View file

@ -54,6 +54,54 @@
<_ContentIncludedByDefault Remove="Components\SalesItemSort.razor" /> <_ContentIncludedByDefault Remove="Components\SalesItemSort.razor" />
<_ContentIncludedByDefault Remove="Components\SalesItemTable.razor" /> <_ContentIncludedByDefault Remove="Components\SalesItemTable.razor" />
<_ContentIncludedByDefault Remove="Components\SearchPhrase.razor" /> <_ContentIncludedByDefault Remove="Components\SearchPhrase.razor" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-grid.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-grid.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-grid.min.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-grid.min.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-grid.rtl.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-grid.rtl.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-grid.rtl.min.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-grid.rtl.min.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-reboot.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-reboot.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-reboot.min.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-reboot.min.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-reboot.rtl.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-reboot.rtl.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-reboot.rtl.min.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-reboot.rtl.min.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-utilities.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-utilities.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-utilities.min.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-utilities.min.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-utilities.rtl.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-utilities.rtl.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-utilities.rtl.min.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap-utilities.rtl.min.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap.min.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap.min.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap.rtl.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap.rtl.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap.rtl.min.css" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\css\bootstrap.rtl.min.css.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.bundle.js" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.bundle.js.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.bundle.min.js" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.bundle.min.js.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.esm.js" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.esm.js.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.esm.min.js" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.esm.min.js.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.js" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.js.map" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.min.js" />
<_ContentIncludedByDefault Remove="wwwroot\css\bootstrap\js\bootstrap.min.js.map" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\scripts" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -13,7 +13,8 @@
// You should have received a copy of the GNU Affero General Public License // 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] // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
// //
*@@using System.Net.Http *@
@using System.Net.Http
@using System.Net.Http.Json @using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Routing

View file

@ -18,7 +18,7 @@
}, },
"appInfo": { "appInfo": {
"name": "Wonky Client", "name": "Wonky Client",
"version": "0.8.5", "version": "0.8.6",
"isBeta": true, "isBeta": true,
"image": "grumpy-coder.png" "image": "grumpy-coder.png"
}, },

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,491 @@
/*!
* Bootstrap Reboot v5.2.0-beta1 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-black: #000;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-bg: #fff;
--bs-border-width: 1px;
--bs-border-style: solid;
--bs-border-color: #dee2e6;
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
--bs-border-radius: 0.375rem;
--bs-border-radius-sm: 0.25rem;
--bs-border-radius-lg: 0.5rem;
--bs-border-radius-xl: 1rem;
--bs-border-radius-2xl: 2rem;
--bs-border-radius-pill: 50rem;
--bs-heading-color: ;
--bs-link-color: #0d6efd;
--bs-link-hover-color: #0a58ca;
--bs-code-color: #d63384;
--bs-highlight-bg: #fff3cd;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
border: 0;
border-top: 1px solid;
opacity: 0.25;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
color: var(--bs-heading-color);
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-left: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-left: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.1875em;
background-color: var(--bs-highlight-bg);
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: var(--bs-link-color);
text-decoration: underline;
}
a:hover {
color: var(--bs-link-hover-color);
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: var(--bs-font-monospace);
font-size: 1em;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: var(--bs-code-color);
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.1875rem 0.375rem;
font-size: 0.875em;
color: var(--bs-body-bg);
background-color: var(--bs-body-color);
border-radius: 0.25rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: rgba(var(--bs-body-color-rgb), 0.75);
text-align: left;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
display: none !important;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: left;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: left;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
/* rtl:raw:
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
*/
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
::file-selector-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,488 @@
/*!
* Bootstrap Reboot v5.2.0-beta1 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
:root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-black: #000;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg-rgb: 255, 255, 255;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-bg: #fff;
--bs-border-width: 1px;
--bs-border-style: solid;
--bs-border-color: #dee2e6;
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
--bs-border-radius: 0.375rem;
--bs-border-radius-sm: 0.25rem;
--bs-border-radius-lg: 0.5rem;
--bs-border-radius-xl: 1rem;
--bs-border-radius-2xl: 2rem;
--bs-border-radius-pill: 50rem;
--bs-heading-color: ;
--bs-link-color: #0d6efd;
--bs-link-hover-color: #0a58ca;
--bs-code-color: #d63384;
--bs-highlight-bg: #fff3cd;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
@media (prefers-reduced-motion: no-preference) {
:root {
scroll-behavior: smooth;
}
}
body {
margin: 0;
font-family: var(--bs-body-font-family);
font-size: var(--bs-body-font-size);
font-weight: var(--bs-body-font-weight);
line-height: var(--bs-body-line-height);
color: var(--bs-body-color);
text-align: var(--bs-body-text-align);
background-color: var(--bs-body-bg);
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
hr {
margin: 1rem 0;
color: inherit;
border: 0;
border-top: 1px solid;
opacity: 0.25;
}
h6, h5, h4, h3, h2, h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-weight: 500;
line-height: 1.2;
color: var(--bs-heading-color);
}
h1 {
font-size: calc(1.375rem + 1.5vw);
}
@media (min-width: 1200px) {
h1 {
font-size: 2.5rem;
}
}
h2 {
font-size: calc(1.325rem + 0.9vw);
}
@media (min-width: 1200px) {
h2 {
font-size: 2rem;
}
}
h3 {
font-size: calc(1.3rem + 0.6vw);
}
@media (min-width: 1200px) {
h3 {
font-size: 1.75rem;
}
}
h4 {
font-size: calc(1.275rem + 0.3vw);
}
@media (min-width: 1200px) {
h4 {
font-size: 1.5rem;
}
}
h5 {
font-size: 1.25rem;
}
h6 {
font-size: 1rem;
}
p {
margin-top: 0;
margin-bottom: 1rem;
}
abbr[title] {
-webkit-text-decoration: underline dotted;
text-decoration: underline dotted;
cursor: help;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
margin-bottom: 1rem;
font-style: normal;
line-height: inherit;
}
ol,
ul {
padding-right: 2rem;
}
ol,
ul,
dl {
margin-top: 0;
margin-bottom: 1rem;
}
ol ol,
ul ul,
ol ul,
ul ol {
margin-bottom: 0;
}
dt {
font-weight: 700;
}
dd {
margin-bottom: 0.5rem;
margin-right: 0;
}
blockquote {
margin: 0 0 1rem;
}
b,
strong {
font-weight: bolder;
}
small {
font-size: 0.875em;
}
mark {
padding: 0.1875em;
background-color: var(--bs-highlight-bg);
}
sub,
sup {
position: relative;
font-size: 0.75em;
line-height: 0;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
a {
color: var(--bs-link-color);
text-decoration: underline;
}
a:hover {
color: var(--bs-link-hover-color);
}
a:not([href]):not([class]), a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
pre,
code,
kbd,
samp {
font-family: var(--bs-font-monospace);
font-size: 1em;
}
pre {
display: block;
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
font-size: 0.875em;
}
pre code {
font-size: inherit;
color: inherit;
word-break: normal;
}
code {
font-size: 0.875em;
color: var(--bs-code-color);
word-wrap: break-word;
}
a > code {
color: inherit;
}
kbd {
padding: 0.1875rem 0.375rem;
font-size: 0.875em;
color: var(--bs-body-bg);
background-color: var(--bs-body-color);
border-radius: 0.25rem;
}
kbd kbd {
padding: 0;
font-size: 1em;
}
figure {
margin: 0 0 1rem;
}
img,
svg {
vertical-align: middle;
}
table {
caption-side: bottom;
border-collapse: collapse;
}
caption {
padding-top: 0.5rem;
padding-bottom: 0.5rem;
color: rgba(var(--bs-body-color-rgb), 0.75);
text-align: right;
}
th {
text-align: inherit;
text-align: -webkit-match-parent;
}
thead,
tbody,
tfoot,
tr,
td,
th {
border-color: inherit;
border-style: solid;
border-width: 0;
}
label {
display: inline-block;
}
button {
border-radius: 0;
}
button:focus:not(:focus-visible) {
outline: 0;
}
input,
button,
select,
optgroup,
textarea {
margin: 0;
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
button,
select {
text-transform: none;
}
[role=button] {
cursor: pointer;
}
select {
word-wrap: normal;
}
select:disabled {
opacity: 1;
}
[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):not([type=time])::-webkit-calendar-picker-indicator {
display: none !important;
}
button,
[type=button],
[type=reset],
[type=submit] {
-webkit-appearance: button;
}
button:not(:disabled),
[type=button]:not(:disabled),
[type=reset]:not(:disabled),
[type=submit]:not(:disabled) {
cursor: pointer;
}
::-moz-focus-inner {
padding: 0;
border-style: none;
}
textarea {
resize: vertical;
}
fieldset {
min-width: 0;
padding: 0;
margin: 0;
border: 0;
}
legend {
float: right;
width: 100%;
padding: 0;
margin-bottom: 0.5rem;
font-size: calc(1.275rem + 0.3vw);
line-height: inherit;
}
@media (min-width: 1200px) {
legend {
font-size: 1.5rem;
}
}
legend + * {
clear: right;
}
::-webkit-datetime-edit-fields-wrapper,
::-webkit-datetime-edit-text,
::-webkit-datetime-edit-minute,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-year-field {
padding: 0;
}
::-webkit-inner-spin-button {
height: auto;
}
[type=search] {
outline-offset: -2px;
-webkit-appearance: textfield;
}
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
::-webkit-search-decoration {
-webkit-appearance: none;
}
::-webkit-color-swatch-wrapper {
padding: 0;
}
::-webkit-file-upload-button {
font: inherit;
-webkit-appearance: button;
}
::file-selector-button {
font: inherit;
-webkit-appearance: button;
}
output {
display: inline-block;
}
iframe {
border: 0;
}
summary {
display: list-item;
cursor: pointer;
}
progress {
vertical-align: baseline;
}
[hidden] {
display: none !important;
}
/*# sourceMappingURL=bootstrap-reboot.rtl.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -12,10 +12,7 @@
<meta name="theme-color" content="#000"> <meta name="theme-color" content="#000">
<title>Inno Web CRM</title> <title>Inno Web CRM</title>
<base href="/" /> <base href="/" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" <link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous">
<link href="css/app.css" rel="stylesheet" /> <link href="css/app.css" rel="stylesheet" />
<link href="Wonky.Client.styles.css" rel="stylesheet" /> <link href="Wonky.Client.styles.css" rel="stylesheet" />
<link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet" /> <link href="_content/Blazored.Toast/blazored-toast.min.css" rel="stylesheet" />
@ -26,9 +23,7 @@
<img class="spinner" src="loader.gif" alt="Vent venligst..."/> Henter data... <img class="spinner" src="loader.gif" alt="Vent venligst..."/> Henter data...
</div> </div>
</div> </div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" <script src="/bootstrap/js/bootstrap.bundle.min.js"></script>
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
<script src="_framework/blazor.webassembly.js"></script> <script src="_framework/blazor.webassembly.js"></script>
</body> </body>

View file

@ -27,7 +27,6 @@ public class CompanyDto
public string ZipCode { get; set; } public string ZipCode { get; set; }
[Required(ErrorMessage = "Bynavn skal udfyldes")] [MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")] [Required(ErrorMessage = "Bynavn skal udfyldes")] [MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")]
public string City { get; set; } public string City { get; set; }
[Required(ErrorMessage = "ORG/VAT/CVR er ikke et gyldigt nummer")] [Required(ErrorMessage = "ORG/VAT/CVR er ikke et gyldigt nummer")]
public string VatNumber { get; set; } = ""; public string VatNumber { get; set; } = "";
public string CompanyId { get; set; } = ""; public string CompanyId { get; set; } = "";

View file

@ -0,0 +1,6 @@
namespace Wonky.Entity.Views;
public class ReportClosedView
{
public bool ReportClosed { get; set; }
}