2024-04-09 12:53:23 +02:00
|
|
|
|
using ShareeBike.Model.State;
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
2024-04-09 12:53:23 +02:00
|
|
|
|
namespace ShareeBike.ViewModel.Bikes.Bike.BC
|
2021-05-13 20:03:07 +02:00
|
|
|
|
{
|
2022-09-06 16:08:19 +02:00
|
|
|
|
public static class StateToText
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Get button text for given copri state. </summary>
|
|
|
|
|
public static string GetActionText(this InUseStateEnum state)
|
|
|
|
|
{
|
|
|
|
|
switch (state)
|
|
|
|
|
{
|
|
|
|
|
case InUseStateEnum.Disposable:
|
|
|
|
|
return "Rad reservieren";
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
case InUseStateEnum.Reserved:
|
|
|
|
|
return "Reservierung aufheben";
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
case InUseStateEnum.Booked:
|
|
|
|
|
return "Miete beenden";
|
2021-05-13 20:03:07 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
default:
|
|
|
|
|
return $"{state}";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-05-13 20:03:07 +02:00
|
|
|
|
}
|