|
|
|
@@ -109,13 +109,15 @@ |
|
|
|
<div class="mat-layout-grid-inner">
|
|
|
|
<div class="mat-layout-grid-cell mat-layout-grid-cell-span-4-phone mat-layout-grid-cell-span-4-tablet mat-layout-grid-cell-span-12-desktop">
|
|
|
|
<MatStringField Class="w-100 form-check-label" Label="@getAddressLbl()" Outlined="true" Required="true" Type="text" @bind-Value="@bicycleGeoPosition.Address"
|
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync" maxlength="50"></MatStringField>
|
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync" maxlength="50"
|
|
|
|
OnFocusOut="@TransformAdressToDeviceMapLocation"></MatStringField>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if (OnlineStatusProvider.Online) {
|
|
|
|
<div class="mat-layout-grid-cell mat-layout-grid-cell-span-4-phone mat-layout-grid-cell-span-4-tablet mat-layout-grid-cell-span-12-desktop">
|
|
|
|
<MatStringField Class="w-100 form-check-label" Label="@getZipCityLbl()" Outlined="true" Required="true" type="text" @bind-Value="@bicycleGeoPosition.DisplayCity"
|
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatStringField>
|
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"
|
|
|
|
OnFocusOut="@TransformAdressToDeviceMapLocation"></MatStringField>
|
|
|
|
</div>
|
|
|
|
} else {
|
|
|
|
<div class="mat-layout-grid-cell mat-layout-grid-cell-span-4-phone mat-layout-grid-cell-span-4-tablet mat-layout-grid-cell-span-4-desktop">
|
|
|
|
@@ -259,7 +261,7 @@ |
|
|
|
await GetBicycleTypes();
|
|
|
|
await GetBrands();
|
|
|
|
await GetZipCities();
|
|
|
|
refreshGUIFromDto();
|
|
|
|
RefreshGUIFromDto();
|
|
|
|
OnlineStatusProvider.AddOnlineStatusChangeCallBack(OnOnlineStatusChanged);
|
|
|
|
StateHasChanged();
|
|
|
|
}
|
|
|
|
@@ -327,7 +329,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
private void Next() {
|
|
|
|
updateDtoFromGUI();
|
|
|
|
UpdateDtoFromGUI();
|
|
|
|
PageHistoryManager.AddPageToHistory(NavigationManager.Uri);
|
|
|
|
try {
|
|
|
|
Validator.ValidateFoundReportKeyData(ReportDataProvider.GetFoundReport());
|
|
|
|
@@ -383,7 +385,7 @@ |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private async void refreshGUIFromDto() {
|
|
|
|
private async void RefreshGUIFromDto() {
|
|
|
|
FoundReport report = ReportDataProvider.GetFoundReport();
|
|
|
|
bicycleGeoPosition.Address = report.GeographicInfo.Address;
|
|
|
|
bicycleGeoPosition.Zip = report.GeographicInfo.Postcode;
|
|
|
|
@@ -406,7 +408,7 @@ |
|
|
|
StateHasChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
private void updateDtoFromGUI() {
|
|
|
|
private void UpdateDtoFromGUI() {
|
|
|
|
FoundReport report = ReportDataProvider.GetFoundReport();
|
|
|
|
report.GeographicInfo.Address = bicycleGeoPosition.Address;
|
|
|
|
if (OnlineStatusProvider.Online) {
|
|
|
|
@@ -433,4 +435,11 @@ |
|
|
|
report.Bemerkung = remark;
|
|
|
|
report.AbholadresseIstKontakt = !abholadresseIsNotContact;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private async void TransformAdressToDeviceMapLocation() {
|
|
|
|
bicycleGeoPosition.DisplayCity = bicycleGeoPosition.DisplayCity; // Hack, force a decode of zip and city
|
|
|
|
await ShowBicycleGeoLocation(true);
|
|
|
|
StateHasChanged();
|
|
|
|
}
|
|
|
|
} |