Accept booking process page and its View Model Implemented.
This commit is contained in:
parent
71c2de304f
commit
1ad75a9213
@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace GMCabsDriverAssistantSolution.ViewModels
|
||||||
|
{
|
||||||
|
public class AcceptBookingProcessPageModel : BaseViewModel
|
||||||
|
{
|
||||||
|
#region Fields
|
||||||
|
private bool isProcessing = true;
|
||||||
|
private bool isBookingConfirmed = false;
|
||||||
|
private bool isBookingUnavailable = false;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Properties
|
||||||
|
|
||||||
|
public bool IsProcessing
|
||||||
|
{
|
||||||
|
get => isProcessing;
|
||||||
|
set => SetProperty(ref isProcessing, value);
|
||||||
|
}
|
||||||
|
public bool IsBookingConfirmed
|
||||||
|
{
|
||||||
|
get => isBookingConfirmed;
|
||||||
|
set => SetProperty(ref isBookingConfirmed, value);
|
||||||
|
}
|
||||||
|
public bool IsBookingUnavailable
|
||||||
|
{
|
||||||
|
get => isBookingUnavailable;
|
||||||
|
set => SetProperty(ref isBookingUnavailable, value);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Constructor
|
||||||
|
public AcceptBookingProcessPageModel()
|
||||||
|
{
|
||||||
|
Title = "Processing";
|
||||||
|
Processing();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Methods
|
||||||
|
private async void Processing()
|
||||||
|
{
|
||||||
|
await Task.Delay(3000);
|
||||||
|
Title = "Booking Confirmed";
|
||||||
|
IsProcessing = false;
|
||||||
|
IsBookingConfirmed = true;
|
||||||
|
|
||||||
|
await Task.Delay(4000);
|
||||||
|
Title = "Booking Unavailable";
|
||||||
|
IsBookingConfirmed = false;
|
||||||
|
IsBookingUnavailable = true;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,107 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="GMCabsDriverAssistantSolution.Views.AcceptBookingProcessPage"
|
||||||
|
xmlns:vm="clr-namespace:GMCabsDriverAssistantSolution.ViewModels"
|
||||||
|
xmlns:custom="clr-namespace:GMCabsDriverAssistantSolution.CustomControls"
|
||||||
|
Title="{Binding Title}">
|
||||||
|
<ContentPage.BindingContext>
|
||||||
|
<vm:AcceptBookingProcessPageModel/>
|
||||||
|
</ContentPage.BindingContext>
|
||||||
|
<ContentPage.Content>
|
||||||
|
<StackLayout BackgroundColor="#DCDCDC">
|
||||||
|
|
||||||
|
<StackLayout
|
||||||
|
IsVisible="{Binding IsProcessing}"
|
||||||
|
VerticalOptions="CenterAndExpand">
|
||||||
|
<Label Text="Processing"
|
||||||
|
TextColor="Black"
|
||||||
|
FontSize="25"
|
||||||
|
HorizontalTextAlignment="Center"
|
||||||
|
HorizontalOptions="CenterAndExpand" />
|
||||||
|
<Label Text="Please Wait"
|
||||||
|
TextColor="Black"
|
||||||
|
FontSize="24"
|
||||||
|
Margin="0,15,0,20"
|
||||||
|
HorizontalTextAlignment="Center"
|
||||||
|
HorizontalOptions="CenterAndExpand" />
|
||||||
|
<ActivityIndicator IsRunning="true" />
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout IsVisible="{Binding IsBookingConfirmed}" Margin="0,0,0,0">
|
||||||
|
<Label
|
||||||
|
Text="Booking Awarded"
|
||||||
|
TextColor="Black"
|
||||||
|
FontSize="26"
|
||||||
|
Margin="0,90,0,0"
|
||||||
|
HorizontalTextAlignment="Center"
|
||||||
|
HorizontalOptions="CenterAndExpand" />
|
||||||
|
<Image
|
||||||
|
Source="righttic.png"
|
||||||
|
HeightRequest="100"/>
|
||||||
|
<Label
|
||||||
|
Text="Head to"
|
||||||
|
TextColor="Black"
|
||||||
|
FontSize="20"
|
||||||
|
HorizontalTextAlignment="Center"
|
||||||
|
HorizontalOptions="CenterAndExpand" />
|
||||||
|
<Label
|
||||||
|
Text="Please confirm on terminal ASAP to keep this booking"
|
||||||
|
TextColor="Black"
|
||||||
|
Margin="40,0,40,0"
|
||||||
|
FontSize="26"
|
||||||
|
HorizontalTextAlignment="Center"
|
||||||
|
HorizontalOptions="CenterAndExpand"/>
|
||||||
|
<Label
|
||||||
|
Text="3.00"
|
||||||
|
TextColor="Black"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
Margin="0,20,0,0"
|
||||||
|
FontSize="30"
|
||||||
|
HorizontalOptions="CenterAndExpand"/>
|
||||||
|
<Label
|
||||||
|
Text="Before Automatic Cancellation"
|
||||||
|
TextColor="Black"
|
||||||
|
FontSize="20"
|
||||||
|
Margin="0,20,0,0"
|
||||||
|
HorizontalOptions="CenterAndExpand" />
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout VerticalOptions="End"
|
||||||
|
IsVisible="{Binding IsBookingConfirmed}">
|
||||||
|
<Button CornerRadius="30"
|
||||||
|
VerticalOptions="EndAndExpand"
|
||||||
|
Margin="40,0,40,0"
|
||||||
|
Text="OK"
|
||||||
|
FontSize="20"
|
||||||
|
/>
|
||||||
|
</StackLayout>
|
||||||
|
<StackLayout
|
||||||
|
IsVisible="{Binding IsBookingUnavailable}">
|
||||||
|
<Label
|
||||||
|
Text="Booking Unavailable"
|
||||||
|
TextColor="Black"
|
||||||
|
FontAttributes="Bold"
|
||||||
|
FontSize="24"
|
||||||
|
Margin="40,100,40,0"
|
||||||
|
HorizontalTextAlignment="Center"
|
||||||
|
HorizontalOptions="CenterAndExpand" />
|
||||||
|
|
||||||
|
<Label
|
||||||
|
Text="This booking is no longer available"
|
||||||
|
HorizontalTextAlignment="Center"
|
||||||
|
TextColor="Black"
|
||||||
|
Margin="40,60,40,0"
|
||||||
|
FontSize="25"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Button CornerRadius="30"
|
||||||
|
VerticalOptions="EndAndExpand"
|
||||||
|
Margin="40,140,40,0"
|
||||||
|
Text="OK"
|
||||||
|
FontSize="20"
|
||||||
|
/>
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
</StackLayout>
|
||||||
|
|
||||||
|
</ContentPage.Content>
|
||||||
|
</ContentPage>
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace GMCabsDriverAssistantSolution.Views;
|
||||||
|
|
||||||
|
public partial class AcceptBookingProcessPage : ContentPage
|
||||||
|
{
|
||||||
|
public AcceptBookingProcessPage()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user