wip
This commit is contained in:
parent
91a8e6f346
commit
6d14b61ed7
4 changed files with 20 additions and 20 deletions
|
@ -28,8 +28,11 @@
|
||||||
<th colspan="2">Virksomhedsopslag</th>
|
<th colspan="2">Virksomhedsopslag</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Reg.nr.</th>
|
<th>Moms/Org Reg.nr.</th>
|
||||||
<th>Adresse</th>
|
@if (_dk)
|
||||||
|
{
|
||||||
|
<th>Adresse</th>
|
||||||
|
}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
|
@ -37,7 +40,7 @@
|
||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<VatNumberInputComponent OnValidSubmit="GetInfoFromVat"/>
|
<VatNumberInputComponent OnValidSubmit="GetInfoFromVat"/>
|
||||||
</td>
|
</td>
|
||||||
@if (_countryCode == "dk")
|
@if (_dk)
|
||||||
{
|
{
|
||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<VatAddressInputComponent Address="_vatAddress" OnValidSubmit="GetInfoFromAddress"/>
|
<VatAddressInputComponent Address="_vatAddress" OnValidSubmit="GetInfoFromAddress"/>
|
||||||
|
@ -84,7 +87,7 @@
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>
|
<th>
|
||||||
Besøgt
|
Besøg dato
|
||||||
</th>
|
</th>
|
||||||
<th>
|
<th>
|
||||||
Næste besøg
|
Næste besøg
|
||||||
|
@ -120,7 +123,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<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 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="_createDto.VatNumber"/>
|
||||||
|
@ -133,15 +136,12 @@
|
||||||
<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 colspan="3">
|
<td>
|
||||||
<InputText id="name" class="form-control" @bind-Value="_createDto.Name"/>
|
<InputText id="name" class="form-control" @bind-Value="_createDto.Name"/>
|
||||||
<ValidationMessage For="@(() => _createDto.Name)"></ValidationMessage>
|
<ValidationMessage For="@(() => _createDto.Name)"></ValidationMessage>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="align-middle">Attention</td>
|
<td class="align-middle">Attention</td>
|
||||||
<td class="align-middle"></td>
|
<td>
|
||||||
<td colspan="3">
|
|
||||||
<InputText id="attention" class="form-control" @bind-Value="_createDto.Attention"/>
|
<InputText id="attention" class="form-control" @bind-Value="_createDto.Attention"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace Wonky.Client.Pages
|
||||||
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 string _countryCode;
|
private bool _dk = false;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
|
@ -61,9 +61,9 @@ namespace Wonky.Client.Pages
|
||||||
Interceptor.RegisterBeforeSendEvent();
|
Interceptor.RegisterBeforeSendEvent();
|
||||||
|
|
||||||
var ux = await StorageService.GetItemAsync<UserInfoView>("_xu");
|
var ux = await StorageService.GetItemAsync<UserInfoView>("_xu");
|
||||||
_countryCode = ux.CountryCode;
|
_dk = ux.CountryCode.ToLower() == "dk";
|
||||||
_createDto.SalesRepId = ux.Id;
|
_createDto.SalesRepId = ux.Id;
|
||||||
_createDto.CountryCode = ux.CountryCode;
|
_createDto.CountryCode = ux.CountryCode.ToLower();
|
||||||
_lastVisit = DateTime.Now;
|
_lastVisit = DateTime.Now;
|
||||||
_nextVisit = DateTime.Now.AddDays(_createDto.Interval * 7);
|
_nextVisit = DateTime.Now.AddDays(_createDto.Interval * 7);
|
||||||
_createDto.LastVisit = $"{_lastVisit:yyyy-MM-dd}";
|
_createDto.LastVisit = $"{_lastVisit:yyyy-MM-dd}";
|
||||||
|
@ -86,7 +86,7 @@ namespace Wonky.Client.Pages
|
||||||
});
|
});
|
||||||
if (!_vInfos.Any())
|
if (!_vInfos.Any())
|
||||||
{
|
{
|
||||||
ToastService.ShowInfo($"Ingen data fundet ...");
|
ToastService.ShowWarning($"Ingen data fundet ...");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private async Task GetInfoFromVat(string vatNumber)
|
private async Task GetInfoFromVat(string vatNumber)
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
},
|
},
|
||||||
"appInfo": {
|
"appInfo": {
|
||||||
"name": "Wonky Client",
|
"name": "Wonky Client",
|
||||||
"version": "0.3.y",
|
"version": "0.3.8",
|
||||||
"isBeta": true,
|
"isBeta": true,
|
||||||
"image": "grumpy-coder.png"
|
"image": "grumpy-coder.png"
|
||||||
},
|
},
|
||||||
"apiConfig": {
|
"apiConfig": {
|
||||||
"baseAddress": "https://dev.innotec.dk",
|
"baseAddress": "https://staging.innotec.dk",
|
||||||
"tokenPath": "token",
|
"tokenPath": "token",
|
||||||
"userInfo": "api/auth/userinfo",
|
"userInfo": "api/auth/userinfo",
|
||||||
"customerEndpoint": "api/v2/crm/companies",
|
"customerEndpoint": "api/v2/crm/companies",
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
|
|
||||||
/* visit / vat state classes */
|
/* visit / vat state classes */
|
||||||
.state {
|
.state {
|
||||||
width: 24px;
|
width: 16px;
|
||||||
height: 24px;
|
height: 16px;
|
||||||
min-width: 24px;
|
min-width: 16px;
|
||||||
min-height: 24px;
|
min-height: 16px;
|
||||||
}
|
}
|
||||||
.text-inno {
|
.text-inno {
|
||||||
color: #ffaa00;
|
color: #ffaa00;
|
||||||
|
|
Loading…
Reference in a new issue