|
|
|
|
|
|
|
|
<div class="mat-layout-grid-inner">
|
|
|
<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">
|
|
|
<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"
|
|
|
<MatStringField Class="w-100 form-check-label" Label="@getAddressLbl()" Outlined="true" Required="true" Type="text" @bind-Value="@bicycleGeoPosition.Address"
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatStringField>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<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="@I18n["PlaceOfDiscovery"]" Outlined="true" Required="true" type="text" @bind-Value="@bicycleGeoPosition.DisplayCity"
|
|
|
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatStringField>
|
|
|
|
|
|
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatStringField>
|
|
|
</div>
|
|
|
</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>
|
|
|
|
|
|
</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">
|
|
|
|
|
|
<div class="outlined">
|
|
|
|
|
|
<MatAutocompleteList TItem="ZipCity" FullWidth="true" Label="@getZipCityLbl()" Required="true" Items="@ZipCities" OnTextChanged="setZipCityValue" @bind-Value="SelectedZipCity" CustomStringSelector="@(i => i?.Zip_City)"
|
|
|
|
|
|
ShowClearButton="true" NumberOfElementsInPopup="6" @onkeydown="InputCursorHandler.OnKeyDownHandlerAsync">
|
|
|
|
|
|
<ItemTemplate>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<span>@context?.Zip_City</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</ItemTemplate>
|
|
|
|
|
|
</MatAutocompleteList>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
<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">
|
|
|
<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">
|
|
|
<MatTextField Class="w-100 form-check-label italic" Label="@I18n["Latitude"]" Outlined="true" ReadOnly="true" @bind-Value="@bicycleGeoPosition.Latitude"
|
|
|
<MatTextField Class="w-100 form-check-label italic" Label="@I18n["Latitude"]" Outlined="true" ReadOnly="true" @bind-Value="@bicycleGeoPosition.Latitude"
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatTextField>
|
|
|
|
|
|
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatTextField>
|
|
|
</div>
|
|
|
</div>
|
|
|
<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">
|
|
|
<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">
|
|
|
<MatTextField Class="w-100 form-check-label italic" Label="@I18n["Longitude"]" Outlined="true" ReadOnly="true" @bind-Value="@bicycleGeoPosition.Longitude"
|
|
|
<MatTextField Class="w-100 form-check-label italic" Label="@I18n["Longitude"]" Outlined="true" ReadOnly="true" @bind-Value="@bicycleGeoPosition.Longitude"
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatTextField>
|
|
|
|
|
|
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatTextField>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
<div class="mat-layout-grid-inner">
|
|
|
<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-4-desktop">
|
|
|
<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">
|
|
|
<MatSelectValue Class="required" FullWidth="true" Outlined="true" Label="@I18n["Color"]" @bind-Value="selectedColor" Items="@Colors" ValueSelector="@(i=>i)"
|
|
|
<MatSelectValue Class="required" FullWidth="true" Outlined="true" Label="@I18n["Color"]" @bind-Value="selectedColor" Items="@Colors" ValueSelector="@(i=>i)"
|
|
|
@onkeydown="InputCursorHandler.OnKeyDownHandlerAsync">
|
|
|
|
|
|
|
|
|
@onkeydown="InputCursorHandler.OnKeyDownHandlerAsync">
|
|
|
<ItemTemplate>
|
|
|
<ItemTemplate>
|
|
|
<div>
|
|
|
<div>
|
|
|
<span class="btn-sm" style="background-color:@context.Code;
|
|
|
<span class="btn-sm" style="background-color:@context.Code;
|
|
|
|
|
|
|
|
|
<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">
|
|
|
<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">
|
|
|
<div class="outlined">
|
|
|
<div class="outlined">
|
|
|
<MatAutocompleteList TItem="Brand" FullWidth="true" Label="@I18n["Brand"]" Required="true" Items="@Brands" OnTextChanged="setBrandValue" @bind-Value="SelectedBrand" CustomStringSelector="@(i => i?.Bezeichnung)"
|
|
|
<MatAutocompleteList TItem="Brand" FullWidth="true" Label="@I18n["Brand"]" Required="true" Items="@Brands" OnTextChanged="setBrandValue" @bind-Value="SelectedBrand" CustomStringSelector="@(i => i?.Bezeichnung)"
|
|
|
ShowClearButton="true" NumberOfElementsInPopup="6" @onkeydown="InputCursorHandler.OnKeyDownHandlerAsync">
|
|
|
|
|
|
|
|
|
ShowClearButton="true" NumberOfElementsInPopup="6" @onkeydown="InputCursorHandler.OnKeyDownHandlerAsync">
|
|
|
<ItemTemplate>
|
|
|
<ItemTemplate>
|
|
|
<div>
|
|
|
<div>
|
|
|
<span>@context?.Bezeichnung</span>
|
|
|
<span>@context?.Bezeichnung</span>
|
|
|
|
|
|
|
|
|
</div>
|
|
|
</div>
|
|
|
<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">
|
|
|
<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">
|
|
|
<MatSelectValue Class="required" FullWidth="true" Outlined="true" Label="@I18n["Type"]" @bind-Value="selectedBcType" Items="@BicycleTypes" ValueSelector="@(i=>i)"
|
|
|
<MatSelectValue Class="required" FullWidth="true" Outlined="true" Label="@I18n["Type"]" @bind-Value="selectedBcType" Items="@BicycleTypes" ValueSelector="@(i=>i)"
|
|
|
@onkeydown="InputCursorHandler.OnKeyDownHandlerAsync">
|
|
|
|
|
|
|
|
|
@onkeydown="InputCursorHandler.OnKeyDownHandlerAsync">
|
|
|
<ItemTemplate>
|
|
|
<ItemTemplate>
|
|
|
<div>
|
|
|
<div>
|
|
|
<span>@context?.Bezeichnung</span>
|
|
|
<span>@context?.Bezeichnung</span>
|
|
|
|
|
|
|
|
|
<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">
|
|
|
<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">
|
|
|
<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">
|
|
|
<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="@I18n["FrameNumber"]" Outlined="true" type="text" @bind-Value="frameNumber"
|
|
|
<MatStringField Class="w-100 form-check-label" Label="@I18n["FrameNumber"]" Outlined="true" type="text" @bind-Value="frameNumber"
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatStringField>
|
|
|
|
|
|
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatStringField>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<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">
|
|
|
<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">
|
|
|
<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">
|
|
|
<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="@I18n["Remark"]" Outlined="true" type="text" @bind-Value="remark"
|
|
|
<MatStringField Class="w-100 form-check-label" Label="@I18n["Remark"]" Outlined="true" type="text" @bind-Value="remark"
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatStringField>
|
|
|
|
|
|
|
|
|
OnKeyDown="@InputCursorHandler.OnKeyDownHandlerAsync"></MatStringField>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<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">
|
|
|
<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">
|
|
|
<div>
|
|
|
<div>
|
|
|
<MatCheckbox @bind-Value="@abholadresseIsNotContact" Label="@I18n["AlternatePickupContact"]"
|
|
|
<MatCheckbox @bind-Value="@abholadresseIsNotContact" Label="@I18n["AlternatePickupContact"]"
|
|
|
@onkeydown="InputCursorHandler.OnKeyDownHandlerAsync"></MatCheckbox>
|
|
|
|
|
|
|
|
|
@onkeydown="InputCursorHandler.OnKeyDownHandlerAsync"></MatCheckbox>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
brandStringValue = value;
|
|
|
brandStringValue = value;
|
|
|
selectedBrand = null;
|
|
|
selectedBrand = null;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private string zipCityStringValue;
|
|
|
|
|
|
private ZipCity selectedZipCity;
|
|
|
|
|
|
private ZipCity SelectedZipCity {
|
|
|
|
|
|
get { return selectedZipCity; }
|
|
|
|
|
|
set { selectedZipCity = (value != null) ? value : new ZipCity(zipCityStringValue); }
|
|
|
|
|
|
}
|
|
|
|
|
|
private void setZipCityValue(string value) {
|
|
|
|
|
|
zipCityStringValue = value;
|
|
|
|
|
|
selectedZipCity = null;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
private string frameNumber;
|
|
|
private string frameNumber;
|
|
|
private string remark;
|
|
|
private string remark;
|
|
|
private bool abholadresseIsNotContact;
|
|
|
private bool abholadresseIsNotContact;
|
|
|
|
|
|
|
|
|
await GetColors();
|
|
|
await GetColors();
|
|
|
await GetBicycleTypes();
|
|
|
await GetBicycleTypes();
|
|
|
await GetBrands();
|
|
|
await GetBrands();
|
|
|
|
|
|
await GetZipCities();
|
|
|
refreshGUIFromDto();
|
|
|
refreshGUIFromDto();
|
|
|
OnlineStatusProvider.AddOnlineStatusChangeCallBack(OnOnlineStatusChanged);
|
|
|
OnlineStatusProvider.AddOnlineStatusChangeCallBack(OnOnlineStatusChanged);
|
|
|
StateHasChanged();
|
|
|
StateHasChanged();
|
|
|
|
|
|
|
|
|
await MasterDataService.GetBrands();
|
|
|
await MasterDataService.GetBrands();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private async Task GetZipCities() {
|
|
|
|
|
|
await MasterDataService.GetZipCities();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
private ColorItem[] Colors {
|
|
|
private ColorItem[] Colors {
|
|
|
get => MasterDataService.Colors;
|
|
|
get => MasterDataService.Colors;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
get => MasterDataService.Brands;
|
|
|
get => MasterDataService.Brands;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private ZipCity[] ZipCities {
|
|
|
|
|
|
get => MasterDataService.ZipCities;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Next() {
|
|
|
private void Next() {
|
|
|
updateDtoFromGUI();
|
|
|
updateDtoFromGUI();
|
|
|
PageHistoryManager.AddPageToHistory(NavigationManager.Uri);
|
|
|
PageHistoryManager.AddPageToHistory(NavigationManager.Uri);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private string getAddressLbl() {
|
|
|
private string getAddressLbl() {
|
|
|
return I18n.GetString("Address") + " (" + I18n.GetString("PlaceOfDiscovery") + ")";
|
|
|
|
|
|
|
|
|
return I18n.GetString("Street") + " (" + I18n.GetString("PlaceOfDiscovery") + ")";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private string getZipCityLbl() {
|
|
|
|
|
|
return String.Format("{0} {1} ({2})", I18n.GetString("Zip"), I18n.GetString("City"), I18n.GetString("PlaceOfDiscovery"));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
private async Task OnGatheringPicture(InputFileChangeEventArgs e) {
|
|
|
private async Task OnGatheringPicture(InputFileChangeEventArgs e) {
|
|
|
|
|
|
|
|
|
bicycleGeoPosition.City = report.GeographicInfo.Town;
|
|
|
bicycleGeoPosition.City = report.GeographicInfo.Town;
|
|
|
bicycleGeoPosition.Latitude = report.GeographicInfo.Latitude;
|
|
|
bicycleGeoPosition.Latitude = report.GeographicInfo.Latitude;
|
|
|
bicycleGeoPosition.Longitude = report.GeographicInfo.Longitude;
|
|
|
bicycleGeoPosition.Longitude = report.GeographicInfo.Longitude;
|
|
|
bicycleGeoPosition.DisplayCity = await GetFormattedAddressZipAndTown(ReportDataProvider);
|
|
|
|
|
|
|
|
|
if (OnlineStatusProvider.Online) {
|
|
|
|
|
|
bicycleGeoPosition.DisplayCity = await GetFormattedAddressZipAndTown(ReportDataProvider);
|
|
|
|
|
|
} else {
|
|
|
|
|
|
setZipCityValue(report.GeographicInfo.Postcode + " " + report.GeographicInfo.Town);
|
|
|
|
|
|
SelectedZipCity = new ZipCity(zipCityStringValue);
|
|
|
|
|
|
}
|
|
|
imgUrl = report.FotoString;
|
|
|
imgUrl = report.FotoString;
|
|
|
selectedColor = Array.Find(Colors, color => color.Id == report.FarbeId);
|
|
|
selectedColor = Array.Find(Colors, color => color.Id == report.FarbeId);
|
|
|
selectedBrand = String.IsNullOrEmpty(report.NeueMarke) ? Array.Find(Brands, brand => brand.Id == report.MarkeId) : new Brand(-999, report.NeueMarke);
|
|
|
selectedBrand = String.IsNullOrEmpty(report.NeueMarke) ? Array.Find(Brands, brand => brand.Id == report.MarkeId) : new Brand(-999, report.NeueMarke);
|
|
|
|
|
|
|
|
|
private void updateDtoFromGUI() {
|
|
|
private void updateDtoFromGUI() {
|
|
|
FoundReport report = ReportDataProvider.GetFoundReport();
|
|
|
FoundReport report = ReportDataProvider.GetFoundReport();
|
|
|
report.GeographicInfo.Address = bicycleGeoPosition.Address;
|
|
|
report.GeographicInfo.Address = bicycleGeoPosition.Address;
|
|
|
report.GeographicInfo.Postcode = bicycleGeoPosition.Zip;
|
|
|
|
|
|
report.GeographicInfo.Town = bicycleGeoPosition.City;
|
|
|
|
|
|
|
|
|
if (OnlineStatusProvider.Online) {
|
|
|
|
|
|
report.GeographicInfo.Postcode = bicycleGeoPosition.Zip;
|
|
|
|
|
|
report.GeographicInfo.Town = bicycleGeoPosition.City;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
report.GeographicInfo.Postcode = SelectedZipCity.Zip;
|
|
|
|
|
|
report.GeographicInfo.Town = SelectedZipCity.City;
|
|
|
|
|
|
}
|
|
|
report.GeographicInfo.Latitude = bicycleGeoPosition.Latitude;
|
|
|
report.GeographicInfo.Latitude = bicycleGeoPosition.Latitude;
|
|
|
report.GeographicInfo.Longitude = bicycleGeoPosition.Longitude;
|
|
|
report.GeographicInfo.Longitude = bicycleGeoPosition.Longitude;
|
|
|
report.FotoString = imgUrl;
|
|
|
report.FotoString = imgUrl;
|