You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

164 lines
8.0 KiB

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. x:Class="GMCabsDriverAssistantSolution.Views.BookingDetailsPage"
  5. xmlns:vm="clr-namespace:GMCabsDriverAssistantSolution.ViewModels" x:DataType="vm:BookingDetailViewModel"
  6. xmlns:models="clr-namespace:GMCabsDriverAssistant.Models"
  7. Title="{Binding Title}">
  8. <ContentPage.Resources>
  9. <ResourceDictionary>
  10. <Style x:Key="InnerFrameLabel" TargetType="Label">
  11. <Setter Property="HorizontalTextAlignment" Value="Center"/>
  12. <Setter Property="FontAttributes" Value="Bold"/>
  13. <Setter Property="TextColor" Value="Black"/>
  14. <Setter Property="FontSize" Value="25"/>
  15. </Style>
  16. <Style x:Key="OuterFrameLabel" TargetType="Label">
  17. <Setter Property="HorizontalTextAlignment" Value="Center"/>
  18. <Setter Property="FontAttributes" Value="Bold"/>
  19. <Setter Property="TextColor" Value="Black"/>
  20. <Setter Property="FontSize" Value="25"/>
  21. </Style>
  22. <Style x:Key="BelowFrameStyle" TargetType="Frame">
  23. <Setter Property="BackgroundColor" Value="#C4C4C4"/>
  24. <Setter Property="WidthRequest" Value="70"/>
  25. </Style>
  26. <Color x:Key="Accent">#96d1ff</Color>
  27. </ResourceDictionary>
  28. </ContentPage.Resources>
  29. <ContentPage.Content>
  30. <StackLayout Orientation="Vertical"
  31. Padding="20,5,20,5"
  32. BackgroundColor="#DCDCDC">
  33. <Label
  34. TextColor="Black"
  35. HorizontalTextAlignment="Center"
  36. FontSize="25">
  37. <Label.Triggers>
  38. <DataTrigger TargetType="Label" Binding="{Binding IsFutureBooking}" Value="True">
  39. <Setter Property="Text" Value=""/>
  40. </DataTrigger>
  41. <DataTrigger TargetType="Label" Binding="{Binding IsFutureBooking}" Value="False">
  42. <Setter Property="Text" Value="{Binding FormattedDistance}" />
  43. </DataTrigger>
  44. </Label.Triggers>
  45. </Label>
  46. <StackLayout Orientation="Horizontal">
  47. <Image Source="green_pin.png"
  48. HeightRequest="40"/>
  49. <Label TextColor="Black"
  50. HorizontalTextAlignment="Start"
  51. FontSize="20"
  52. Margin="10,10,0,0"
  53. Text="{Binding StartStreetName}">
  54. </Label>
  55. </StackLayout>
  56. <StackLayout Orientation="Horizontal">
  57. <Image Source="red_pin.png"
  58. HeightRequest="40"/>
  59. <Label TextColor="Black"
  60. HorizontalTextAlignment="Start"
  61. FontSize="20"
  62. Margin="10,10,0,0"
  63. Text="{Binding EndStreetName}">
  64. </Label>
  65. </StackLayout>
  66. <Frame CornerRadius="25"
  67. Padding="0"
  68. Margin="0,15,0,0"
  69. BackgroundColor="#BCA70F0F">
  70. <StackLayout>
  71. <Frame BackgroundColor="#C4C4C4"
  72. HeightRequest="28"
  73. Padding="0,5,0,5"
  74. CornerRadius="25">
  75. <StackLayout Orientation="Horizontal"
  76. HorizontalOptions="CenterAndExpand">
  77. <Image Source="clock.png"
  78. Margin="0,0,10,0"/>
  79. <Label
  80. TextColor="Black"
  81. FontAttributes="Bold"
  82. VerticalTextAlignment="Center"
  83. HorizontalTextAlignment="Center"
  84. FontSize="20">
  85. <Label.Triggers>
  86. <DataTrigger TargetType="Label" Binding="{Binding IsFutureBooking}" Value="True">
  87. <Setter Property="Text" Value="{Binding FormattedPickUpTime}"/>
  88. </DataTrigger>
  89. <DataTrigger TargetType="Label" Binding="{Binding IsFutureBooking}" Value="False">
  90. <Setter Property="Text" Value="READY NOW" />
  91. </DataTrigger>
  92. </Label.Triggers>
  93. </Label>
  94. </StackLayout>
  95. </Frame>
  96. <Frame x:Name="corporateVIPFrame" BackgroundColor="Transparent"
  97. Padding="5">
  98. <Label Text="Corporate VIP Booking"
  99. TextColor="White"
  100. FontAttributes="Bold"
  101. VerticalTextAlignment="Start"
  102. HorizontalTextAlignment="Center"
  103. FontSize="20"/>
  104. </Frame>
  105. </StackLayout>
  106. </Frame>
  107. <StackLayout Orientation="Horizontal"
  108. Margin="0,5,0,0">
  109. <StackLayout HorizontalOptions="StartAndExpand">
  110. <Label Text="PAYMENT"
  111. HorizontalTextAlignment="Center"
  112. TextColor="Black"
  113. FontSize="15"/>
  114. <Frame Padding="4,12"
  115. WidthRequest="100"
  116. CornerRadius="24"
  117. Style="{StaticResource BelowFrameStyle}">
  118. <Label Text="{Binding FareTypeValue}"
  119. FontSize="20"
  120. Style="{StaticResource InnerFrameLabel}"/>
  121. </Frame>
  122. </StackLayout>
  123. <StackLayout HorizontalOptions="CenterAndExpand">
  124. <Label Text="POINTS"
  125. HorizontalTextAlignment="Center"
  126. TextColor="Black"
  127. FontSize="15"/>
  128. <Frame Style="{StaticResource BelowFrameStyle}"
  129. Padding="4,12"
  130. CornerRadius="24">
  131. <Label Text="{Binding RewardPoints}" FontSize="20"
  132. Style="{StaticResource InnerFrameLabel}"/>
  133. </Frame>
  134. </StackLayout>
  135. <StackLayout HorizontalOptions="EndAndExpand">
  136. <Label Text="FEE"
  137. HorizontalTextAlignment="Center"
  138. TextColor="Black"
  139. FontSize="15"/>
  140. <Frame Style="{StaticResource BelowFrameStyle}"
  141. Padding="4,12"
  142. CornerRadius="24">
  143. <Label Text="{Binding BookingFee, StringFormat='{0}%'}" FontSize="20"
  144. TextColor="#B44444"
  145. Style="{StaticResource InnerFrameLabel}"/>
  146. </Frame>
  147. </StackLayout>
  148. </StackLayout>
  149. <StackLayout VerticalOptions="EndAndExpand"
  150. Margin="0,5,0,0">
  151. <Button
  152. Margin="20,0,20,0"
  153. Text="Accept Booking"
  154. FontSize="20"
  155. Command="{Binding OnAcceptBookingClicked}"/>
  156. <Button
  157. Margin="20,0,20,15"
  158. Text="Decline Booking"
  159. FontSize="20"
  160. TextTransform="Uppercase"
  161. Command="{Binding OnDeclineBookingClicked}"/>
  162. </StackLayout>
  163. </StackLayout>
  164. </ContentPage.Content>
  165. </ContentPage>