DeliveryList.xaml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <timesheets:BasePage
  3. xmlns="http://xamarin.com/schemas/2014/forms"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  5. xmlns:timesheets ="clr-namespace:comal.timesheets"
  6. xmlns:ui="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
  7. x:Class="comal.timesheets.DeliveryList"
  8. Title="Logistics"
  9. >
  10. <timesheets:BasePage.Resources>
  11. <timesheets:DateTimeToBooleanConverter
  12. x:Key="DateTimeToBooleanConverter"
  13. EmptyResult="False"/>
  14. </timesheets:BasePage.Resources>
  15. <timesheets:BasePage.ActionButtons>
  16. <ImageButton
  17. x:Name="addDelivery"
  18. Source="add"
  19. Clicked="AddDelivery_Clicked"/>
  20. <ImageButton
  21. x:Name="_filter"
  22. Source="filter"
  23. Clicked="_filter_OnClicked" />
  24. </timesheets:BasePage.ActionButtons>
  25. <timesheets:BasePage.PageContent>
  26. <Grid Grid.RowSpacing="0">
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="50"/>
  29. <RowDefinition Height="*"/>
  30. </Grid.RowDefinitions>
  31. <timesheets:MobileSearchBar
  32. x:Name="_search"
  33. PlaceHolder="Search"
  34. TextChanged="_search_OnTextChanged"/>
  35. <timesheets:MobileList
  36. x:Name="_deliveries"
  37. Grid.Row="1"
  38. RowHeight="80"
  39. PullToRefresh="True"
  40. Refresh="MobileList_OnRefresh"
  41. ItemTapped="Deliveries_OnItemTapped">
  42. <timesheets:MobileList.ItemTemplate>
  43. <DataTemplate>
  44. <ui:MaterialCard
  45. CornerRadius="5"
  46. Elevation="0"
  47. HorizontalOptions="FillAndExpand"
  48. BorderColor="Silver"
  49. Margin="5,0,5,5"
  50. BackgroundColor="White"
  51. Padding="5">
  52. <Grid x:DataType="timesheets:DeliveryShell">
  53. <Grid.ColumnDefinitions>
  54. <ColumnDefinition Width="40" />
  55. <ColumnDefinition Width="*" />
  56. <ColumnDefinition Width="80" />
  57. <ColumnDefinition Width="40" />
  58. </Grid.ColumnDefinitions>
  59. <Grid.RowDefinitions>
  60. <RowDefinition Height="*"/>
  61. <RowDefinition Height="*"/>
  62. </Grid.RowDefinitions>
  63. <ui:MaterialLabel
  64. Text="{Binding Number}"
  65. Grid.Row="0"
  66. Grid.Column="0"
  67. TypeScale="Subtitle2"
  68. LineHeight="1"
  69. HorizontalTextAlignment="Center"/>
  70. <ui:MaterialLabel
  71. Text="{Binding Address}"
  72. Grid.Row="0"
  73. Grid.Column="1"
  74. TypeScale="Body2"
  75. LineHeight="1"
  76. LineBreakMode="TailTruncation"/>
  77. <ui:MaterialLabel
  78. Text="{Binding Date, StringFormat='{}{0:dd/MM/yy}'}"
  79. Grid.Row="0"
  80. Grid.Column="2"
  81. TypeScale="Subtitle2"
  82. LineHeight="1"
  83. HorizontalTextAlignment="Center"/>
  84. <Image
  85. Source="tick"
  86. Grid.Column="3"
  87. Grid.Row="0"
  88. Grid.RowSpan="2"
  89. IsVisible="{Binding Delivered, Converter={StaticResource DateTimeToBooleanConverter}}"
  90. HeightRequest="40"
  91. WidthRequest="40"/>
  92. <ui:MaterialLabel
  93. Text="{Binding Job}"
  94. Grid.Row="1"
  95. Grid.Column="0"
  96. Grid.ColumnSpan="3"
  97. TypeScale="Subtitle2"
  98. LineHeight="1"
  99. LineBreakMode="TailTruncation"/>
  100. </Grid>
  101. </ui:MaterialCard>
  102. </DataTemplate>
  103. </timesheets:MobileList.ItemTemplate>
  104. </timesheets:MobileList>
  105. </Grid>
  106. </timesheets:BasePage.PageContent>
  107. </timesheets:BasePage>