mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-01-18 18:44:27 +01:00
27 lines
603 B
C#
27 lines
603 B
C#
using ShareeBike.Model.State;
|
|
using ShareeBike.MultilingualResources;
|
|
|
|
namespace ShareeBike.ViewModel.Bikes.Bike.BC
|
|
{
|
|
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 AppResources.ActionRequestBike;
|
|
|
|
case InUseStateEnum.Reserved:
|
|
return AppResources.ActionCancelReservation;
|
|
|
|
case InUseStateEnum.Booked:
|
|
return AppResources.ActionEndRental;
|
|
|
|
default:
|
|
return $"{state}";
|
|
}
|
|
}
|
|
}
|
|
}
|