Version 3.0.363

This commit is contained in:
Anja 2023-04-19 12:14:14 +02:00
parent 4ff3307997
commit 91d42552c7
212 changed files with 1799 additions and 1318 deletions

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Threading.Tasks;
using Serilog;
using TINK.Model.Bikes.BikeInfoNS.CopriLock;
@ -47,7 +47,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
/// <summary> Open bike and update COPRI lock state. </summary>
public async Task<IRequestHandler> HandleRequestOption2() => await OpenLock();
/// <summary> Requst is not supported, button should be disabled. </summary>
/// <summary> Request is not supported, button should be disabled. </summary>
public async Task<IRequestHandler> UnsupportedRequest()
{
Log.ForContext<BookedClosed>().Error("Click of unsupported button click detected.");

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Threading.Tasks;
using Serilog;
using TINK.Model.Bikes.BikeInfoNS.CopriLock;
@ -48,7 +48,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
/// <summary> Close lock in order to pause ride and update COPRI lock state.</summary>
public async Task<IRequestHandler> HandleRequestOption2() => await OpenLock();
/// <summary> Requst is not supported, button should be disabled. </summary>
/// <summary> Request is not supported, button should be disabled. </summary>
public async Task<IRequestHandler> UnsupportedRequest()
{
Log.ForContext<BookedOpen>().Error("Click of unsupported button click detected.");

View file

@ -63,7 +63,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
if (alertResult == false)
{
// User aborted booking process
Log.ForContext<DisposableClosed>().Information("User selected bike {bike} in order to book and release bike from station but action was cancelled.", SelectedBike);
Log.ForContext<DisposableClosed>().Information("User selected bike {bike} in order to book and release bike from station but action was canceled.", SelectedBike);
BikesViewModel.IsIdle = true;
return this;
@ -139,7 +139,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
if (alertResult == false)
{
// User aborted booking process
Log.ForContext<DisposableClosed>().Information("User selected availalbe bike {bike} in order to reserve but action was canceled.", SelectedBike);
Log.ForContext<DisposableClosed>().Information("User selected centered bike {bike} in order to reserve but action was canceled.", SelectedBike);
BikesViewModel.IsIdle = true;
return this;
}
@ -175,7 +175,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
|| exception is RequestNotCachableException)
{
// Copri server is not reachable.
Log.ForContext<DisposableClosed>().Information("User selected availalbe bike {bike} but reserving failed (Copri server not reachable).", SelectedBike);
Log.ForContext<DisposableClosed>().Information("User selected centered bike {bike} but reserving failed (Copri server not reachable).", SelectedBike);
await ViewService.DisplayAdvancedAlert(
AppResources.MessageReservingBikeErrorConnectionTitle,
@ -185,7 +185,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
}
else
{
Log.ForContext<DisposableClosed>().Error("User selected availalbe bike {bike} but reserving failed. {@exception}", SelectedBike, exception);
Log.ForContext<DisposableClosed>().Error("User selected centered bike {bike} but reserving failed. {@exception}", SelectedBike, exception);
await ViewService.DisplayAlert(
AppResources.MessageReservingBikeErrorGeneralTitle,

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Threading.Tasks;
using Serilog;
using TINK.Model.Bikes.BikeInfoNS.CopriLock;
@ -46,7 +46,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
/// <summary> Open bike and update COPRI lock state. </summary>
public async Task<IRequestHandler> HandleRequestOption2() => await GiveFeedback();
/// <summary> Requst is not supported, button should be disabled. </summary>
/// <summary> Request is not supported, button should be disabled. </summary>
/// <returns></returns>
public async Task<IRequestHandler> UnsupportedRequest()
{
@ -110,7 +110,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
if (SelectedBike?.BookingFinishedModel?.MiniSurvey?.Questions?.Count > 0)
{
// No need to restrart polling again because different page is shown.
// No need to restart polling again because different page is shown.
await ViewService.PushModalAsync(ViewTypes.MiniSurvey);
}
@ -121,4 +121,4 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
return RequestHandlerFactory.Create(SelectedBike, IsConnectedDelegate, ConnectorFactory, ViewUpdateManager, SmartDevice, ViewService, BikesViewModel, ActiveUser);
}
}
}
}

View file

@ -14,11 +14,11 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
{
using IRequestHandler = BluetoothLock.IRequestHandler;
/// <summary> Bike is reserved, lock is closed and and connected to app. </summary>
/// <summary> Bike is reserved, lock is closed and connected to app. </summary>
/// <remarks>
/// Occures when
/// - biks was reserved out of reach and is in reach now
/// - bike is is reserved while in reach
/// Occurs when
/// - bike was reserved out of reach and is in reach now
/// - bike is reserved while in reach
/// </remarks>
public class ReservedClosed : Base, IRequestHandler
{
@ -85,7 +85,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
{
await ConnectorFactory(IsConnected).Command.DoCancelReservation(SelectedBike);
// If canceling bike succedes remove bike because it is not ready to be booked again
// If canceling bike succeeds remove bike because it is not ready to be booked again
IsRemoveBikeRequired = true;
}
catch (Exception exception)