DeliveryDetails.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
  6. xmlns:timesheets="clr-namespace:comal.timesheets"
  7. material:MaterialNavigationPage.AppBarTitleTextFontSize="16.0"
  8. x:Class="comal.timesheets.DeliveryDetails"
  9. >
  10. <timesheets:BasePage.PageContent>
  11. <StackLayout VerticalOptions="StartAndExpand">
  12. <ScrollView x:Name="pageScroller" Padding="10">
  13. <StackLayout Orientation="Vertical" VerticalOptions="StartAndExpand">
  14. <!--Row 0 Delivery Type-->
  15. <material:MaterialLabel Text="Type" TypeScale="H6" HorizontalTextAlignment="Start" Margin="5"/>
  16. <Frame HasShadow="False" Padding="10" BorderColor="Gray" >
  17. <Grid>
  18. <Grid.ColumnDefinitions>
  19. <ColumnDefinition Width="*"/>
  20. <ColumnDefinition Width="auto"/>
  21. </Grid.ColumnDefinitions>
  22. <Label Grid.Column="0" x:Name="TypeLbl" LineBreakMode="WordWrap" VerticalOptions="Center" FontSize="Medium" FontAttributes="Bold"/>
  23. <Button Grid.Column="1" x:Name="SelectTypeBtn" Clicked="SelectType_Clicked" Text="Select" Padding="3" FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  24. </Grid>
  25. </Frame>
  26. <!--Row 1 Job number-->
  27. <material:MaterialLabel Text="Job Number" TypeScale="H6" HorizontalTextAlignment="Start" Margin="5"/>
  28. <Frame HasShadow="False" Padding="10" BorderColor="Gray" >
  29. <Grid>
  30. <Grid.ColumnDefinitions>
  31. <ColumnDefinition Width="*"/>
  32. <ColumnDefinition Width="auto"/>
  33. </Grid.ColumnDefinitions>
  34. <Label Grid.Column="0" x:Name="JobName" LineBreakMode="WordWrap" VerticalOptions="Center" FontSize="Medium" FontAttributes="Bold"/>
  35. <Button Grid.Column="1" x:Name="SelectJob" Clicked="SelectJob_Clicked" Text="Select" Padding="3" FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  36. </Grid>
  37. </Frame>
  38. <!--Row 2 Delivered Address - doesn't show up unless is present-->
  39. <material:MaterialLabel x:Name="DeliveredLbl" Text="Delivered" IsVisible="false" TypeScale="H6" HorizontalTextAlignment="Start" Margin="5"/>
  40. <Frame HasShadow="False" Padding="10" BorderColor="Gray" x:Name="DeliveredFlagFrame" IsVisible="false">
  41. <StackLayout>
  42. <Label x:Name="DeliveredDetails" FontAttributes="Bold" FontSize="Medium" TextColor="PaleVioletRed" HorizontalTextAlignment="Center" Margin="5"/>
  43. <Button x:Name="openMapBtn" IsEnabled="False" Clicked="OpenMapBtn_Clicked" Text="Show in Maps" Padding="3" FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  44. </StackLayout>
  45. </Frame>
  46. <!--Row 3 Address + contact selection-->
  47. <material:MaterialLabel Text="Address / Contact" TypeScale="H6" HorizontalTextAlignment="Start" Margin="5"/>
  48. <Frame HasShadow="False" Padding="10" BorderColor="Gray" >
  49. <StackLayout>
  50. <Grid>
  51. <Grid.ColumnDefinitions>
  52. <ColumnDefinition Width="*"/>
  53. <ColumnDefinition Width="auto"/>
  54. </Grid.ColumnDefinitions>
  55. <Label Grid.Column="0" x:Name="ContactNameLbl" LineBreakMode="WordWrap" VerticalOptions="Center" FontSize="Medium" FontAttributes="Bold" TextColor="DimGray"/>
  56. <Button Grid.Column="1" x:Name="SelectContactBtn" Clicked="SelectContact_Clicked" Text="Select" Padding="3" FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  57. </Grid>
  58. <Grid>
  59. <Grid.RowDefinitions>
  60. <RowDefinition Height="auto"/>
  61. <RowDefinition Height="auto"/>
  62. <RowDefinition Height="auto"/>
  63. <RowDefinition Height="auto"/>
  64. </Grid.RowDefinitions>
  65. <Grid.ColumnDefinitions>
  66. <ColumnDefinition Width="auto"/>
  67. <ColumnDefinition Width="*"/>
  68. </Grid.ColumnDefinitions>
  69. <material:MaterialLabel Grid.Row="0" Grid.Column="0" Text="Street" TypeScale="H6" HorizontalTextAlignment="Start" VerticalOptions="Center" />
  70. <material:MaterialLabel Grid.Row="1" Grid.Column="0" Text="City" TypeScale="H6" HorizontalTextAlignment="Start" VerticalOptions="Center" />
  71. <material:MaterialLabel Grid.Row="2" Grid.Column="0" Text="State" TypeScale="H6" HorizontalTextAlignment="Start" VerticalOptions="Center"/>
  72. <material:MaterialLabel Grid.Row="3" Grid.Column="0" Text="Post Code" TypeScale="H6" HorizontalTextAlignment="Start" VerticalOptions="Center" />
  73. <Editor Grid.Row="0" Grid.Column="1" x:Name="streetEdt" Placeholder="Edit" VerticalOptions="Center" FontSize="Medium" FontAttributes="Bold" TextColor="DimGray" TextChanged="StreetEdt_Changed" AutoSize="TextChanges"/>
  74. <Editor Grid.Row="1" Grid.Column="1" x:Name="cityEdt" Placeholder="Edit" VerticalOptions="Center" FontSize="Medium" FontAttributes="Bold" TextColor="DimGray" TextChanged="CityEdt_Changed" AutoSize="TextChanges"/>
  75. <Picker Grid.Row="2" Grid.Column="1" x:Name="statePicker" VerticalOptions="Center" SelectedIndex="0" FontSize="Medium" FontAttributes="Bold" TextColor="DimGray" SelectedIndexChanged="StatePicker_Changed">
  76. <Picker.Items>
  77. <x:String>Western Australia</x:String>
  78. <x:String>Victoria</x:String>
  79. <x:String>South Australia</x:String>
  80. <x:String>New South Wales</x:String>
  81. <x:String>Queensland</x:String>
  82. <x:String>Tasmania</x:String>
  83. </Picker.Items>
  84. </Picker>
  85. <Editor Grid.Row="3" Grid.Column="1" x:Name="postCodeEdt" Placeholder="Edit" VerticalOptions="Center" FontSize="Medium" FontAttributes="Bold" TextColor="DimGray" Keyboard="Numeric" MaxLength="4" TextChanged="PostCode_Changed"/>
  86. </Grid>
  87. </StackLayout>
  88. </Frame>
  89. <!--Row 4 Delivery Notes-->
  90. <material:MaterialLabel Text="Delivery Notes" TypeScale="H6" HorizontalTextAlignment="Start" Margin="5"/>
  91. <Frame HasShadow="False" BorderColor="Gray" Padding="10" >
  92. <Editor x:Name="deliveryNotesEdt" AutoSize="TextChanges" Placeholder="Edit" TextChanged="DeliveryNotes_Completed"/>
  93. </Frame>
  94. <!--Row 5 Items -->
  95. <material:MaterialLabel x:Name="ItemsToBeDelivered" IsVisible="false" Grid.Column="0" Text="Delivery Items" TypeScale="H6" HorizontalTextAlignment="Start" Margin="5"/>
  96. <Frame x:Name="ItemsFrame" MinimumHeightRequest="50" HasShadow="False" Padding="10" BorderColor="Gray" VerticalOptions="StartAndExpand">
  97. <Button x:Name="loadDeliveryItems" IsEnabled="False" Clicked="Docket_Clicked" Text="View" Padding="3" FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  98. </Frame>
  99. <!--Row 6 Photos-->
  100. <material:MaterialLabel x:Name="photosLbl" Text="Photos" TypeScale="H6" HorizontalTextAlignment="Start" Margin="5"/>
  101. <Frame HasShadow="False" Padding="10" BorderColor="Gray">
  102. <StackLayout Orientation="Vertical">
  103. <CollectionView x:Name="Images">
  104. <CollectionView.ItemsLayout>
  105. <GridItemsLayout Orientation="Horizontal" Span="1" />
  106. </CollectionView.ItemsLayout>
  107. <CollectionView.ItemTemplate>
  108. <DataTemplate>
  109. <Image HeightRequest="150" Aspect="AspectFill" Source="{Binding .}">
  110. <Image.GestureRecognizers>
  111. <TapGestureRecognizer Tapped="ImageTapped" CommandParameter="{Binding .}" NumberOfTapsRequired="1" />
  112. </Image.GestureRecognizers>
  113. </Image>
  114. </DataTemplate>
  115. </CollectionView.ItemTemplate>
  116. </CollectionView>
  117. <!-- <ScrollView Orientation="Horizontal" x:Name="ImageScroller" IsVisible="false"> -->
  118. <!-- <StackLayout x:Name="images" Orientation="Horizontal" HeightRequest="150" HorizontalOptions="StartAndExpand" VerticalOptions="Fill"/> -->
  119. <!-- </ScrollView> -->
  120. <Grid>
  121. <Grid.ColumnDefinitions>
  122. <ColumnDefinition Width="*"/>
  123. <ColumnDefinition Width="*"/>
  124. </Grid.ColumnDefinitions>
  125. <Button x:Name="TakePhoto" Grid.Column="0" Text="Camera" Clicked="TakePhoto_Clicked" Padding="3" FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  126. <Button x:Name="ChooseImage" Grid.Column="1" Text="Library" Clicked="ChooseImage_Clicked" Padding="3" FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  127. </Grid>
  128. </StackLayout>
  129. </Frame>
  130. <!--Row 7 Employee-->
  131. <material:MaterialLabel Text="Requested By" TypeScale="H6" HorizontalTextAlignment="Start" Margin="5"/>
  132. <Frame HasShadow="False" Padding="10" BorderColor="Gray" >
  133. <Grid>
  134. <Grid.ColumnDefinitions>
  135. <ColumnDefinition Width="*"/>
  136. <ColumnDefinition Width="auto"/>
  137. </Grid.ColumnDefinitions>
  138. <Label Grid.Column="0" x:Name="EmployeeName" LineBreakMode="WordWrap" HorizontalOptions="Start" VerticalOptions="Center" FontSize="Medium" FontAttributes="Bold" TextColor="DimGray"/>
  139. <Button Grid.Column="1" x:Name="SelectEmployee" Clicked="SelectEmployee_Clicked" Text="Select" Padding="3" FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  140. </Grid>
  141. </Frame>
  142. <!--Row 8 Due-->
  143. <material:MaterialLabel Text="Due (Tap to edit)" TypeScale="H6" HorizontalTextAlignment="Start" Margin="5"/>
  144. <Frame HasShadow="False" Padding="10" BorderColor="Gray" >
  145. <DatePicker x:Name="dueDate" FontSize="Medium" FontAttributes="Bold" TextColor="DimGray"/>
  146. </Frame>
  147. <!--Row 9 Create a task-->
  148. <material:MaterialLabel x:Name="createATaskLbl" IsVisible="true" Grid.Column="0" Text="Create A Task" TypeScale="H6" HorizontalTextAlignment="Start" Margin="5"/>
  149. <Frame x:Name="TaskFrame" MinimumHeightRequest="50" HasShadow="False" Padding="10" BorderColor="Gray" VerticalOptions="StartAndExpand">
  150. <Button x:Name="convertToTaskBtn" IsEnabled="True" Clicked="ConvertToTaskBtn_Clicked" Text="Create" Padding="3" FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  151. </Frame>
  152. </StackLayout>
  153. </ScrollView>
  154. <!--for future use when pdf exporter for Delivery Docket is ready-->
  155. <!--<Button x:Name="docketViewBtn" Text="View Docket" Clicked="Docket_Clicked" FontSize="Large" Padding="3" FontAttributes="Bold" CornerRadius="5" Margin="3" BorderColor="Black" BorderWidth="1" BackgroundColor="#15C7C1"/>-->
  156. </StackLayout>
  157. </timesheets:BasePage.PageContent>
  158. </timesheets:BasePage>