This commit is contained in:
Frede Hundewadt 2022-06-09 10:10:26 +02:00
parent 91a8e6f346
commit 6d14b61ed7
4 changed files with 20 additions and 20 deletions

View file

@ -28,8 +28,11 @@
<th colspan="2">Virksomhedsopslag</th>
</tr>
<tr>
<th>Reg.nr.</th>
<th>Adresse</th>
<th>Moms/Org Reg.nr.</th>
@if (_dk)
{
<th>Adresse</th>
}
</tr>
</thead>
<tbody>
@ -37,7 +40,7 @@
<td class="align-middle">
<VatNumberInputComponent OnValidSubmit="GetInfoFromVat"/>
</td>
@if (_countryCode == "dk")
@if (_dk)
{
<td class="align-middle">
<VatAddressInputComponent Address="_vatAddress" OnValidSubmit="GetInfoFromAddress"/>
@ -84,7 +87,7 @@
<thead>
<tr>
<th>
Besøgt
Besøg dato
</th>
<th>
Næste besøg
@ -120,7 +123,7 @@
</thead>
<tbody>
<tr>
<td class="align-middle">Reg.nr.</td>
<td class="align-middle">Moms/Org Reg.</td>
<td class="align-middle state"><DisplayStateComponent StateClass="@RegState"></DisplayStateComponent></td>
<td class="align-middle">
<InputText id="vatNumber" class="form-control" @bind-Value="_createDto.VatNumber"/>
@ -133,15 +136,12 @@
<tr>
<td class="align-middle">Firmanavn</td>
<td class="align-middle"></td>
<td colspan="3">
<td>
<InputText id="name" class="form-control" @bind-Value="_createDto.Name"/>
<ValidationMessage For="@(() => _createDto.Name)"></ValidationMessage>
</td>
</tr>
<tr>
<td class="align-middle">Attention</td>
<td class="align-middle"></td>
<td colspan="3">
<td>
<InputText id="attention" class="form-control" @bind-Value="_createDto.Attention"/>
</td>
</tr>

View file

@ -53,7 +53,7 @@ namespace Wonky.Client.Pages
private string RegState = "";
private DateTime _lastVisit { get; set; }
private DateTime _nextVisit { get; set; }
private string _countryCode;
private bool _dk = false;
protected override async Task OnInitializedAsync()
{
@ -61,9 +61,9 @@ namespace Wonky.Client.Pages
Interceptor.RegisterBeforeSendEvent();
var ux = await StorageService.GetItemAsync<UserInfoView>("_xu");
_countryCode = ux.CountryCode;
_dk = ux.CountryCode.ToLower() == "dk";
_createDto.SalesRepId = ux.Id;
_createDto.CountryCode = ux.CountryCode;
_createDto.CountryCode = ux.CountryCode.ToLower();
_lastVisit = DateTime.Now;
_nextVisit = DateTime.Now.AddDays(_createDto.Interval * 7);
_createDto.LastVisit = $"{_lastVisit:yyyy-MM-dd}";
@ -86,7 +86,7 @@ namespace Wonky.Client.Pages
});
if (!_vInfos.Any())
{
ToastService.ShowInfo($"Ingen data fundet ...");
ToastService.ShowWarning($"Ingen data fundet ...");
}
}
private async Task GetInfoFromVat(string vatNumber)

View file

@ -8,12 +8,12 @@
},
"appInfo": {
"name": "Wonky Client",
"version": "0.3.y",
"version": "0.3.8",
"isBeta": true,
"image": "grumpy-coder.png"
},
"apiConfig": {
"baseAddress": "https://dev.innotec.dk",
"baseAddress": "https://staging.innotec.dk",
"tokenPath": "token",
"userInfo": "api/auth/userinfo",
"customerEndpoint": "api/v2/crm/companies",

View file

@ -9,10 +9,10 @@
/* visit / vat state classes */
.state {
width: 24px;
height: 24px;
min-width: 24px;
min-height: 24px;
width: 16px;
height: 16px;
min-width: 16px;
min-height: 16px;
}
.text-inno {
color: #ffaa00;