AddEditTask.xaml 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. x:Class="comal.timesheets.Tasks.AddEditTask"
  5. xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
  6. material:MaterialNavigationPage.AppBarTitleTextFontSize="16.0"
  7. Title="Add/Edit Task">
  8. <ContentPage.Content>
  9. <Grid>
  10. <!--Outer Grid-->
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="*"/>
  13. <RowDefinition Height="auto"/>
  14. </Grid.RowDefinitions>
  15. <ScrollView Grid.Row="0" Padding="5" x:Name="pageScroller">
  16. <StackLayout Spacing="10">
  17. <!--Inner StackLayout start-->
  18. <Button Text="Share" FontSize="Medium" x:Name="shareBtn" Clicked="ShareBtn_Clicked" IsVisible="false"
  19. HorizontalOptions="CenterAndExpand" Padding="3" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  20. <!--Row 0 Title-->
  21. <Label Text="Title:" FontSize="Medium" FontAttributes="Bold" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
  22. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  23. <Editor x:Name="titleEdt" AutoSize="TextChanges" TextChanged="TitleEdt_Changed" Placeholder="Edit Title" BackgroundColor="Transparent" />
  24. </Frame>
  25. <!--Row 1 Job No-->
  26. <Label Text="Job No:" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
  27. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  28. <Grid>
  29. <Grid.ColumnDefinitions>
  30. <ColumnDefinition Width="*"/>
  31. <ColumnDefinition Width="auto"/>
  32. </Grid.ColumnDefinitions>
  33. <Label x:Name="jobNoLbl" Grid.Column="0" FontSize="Medium" VerticalTextAlignment="Center" Text=""/>
  34. <Button Text="Select" FontSize="Medium" x:Name="jobNoBtn" Clicked="JobNoBtn_Clicked" Grid.Column="1" HorizontalOptions="EndAndExpand" Padding="3" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  35. </Grid>
  36. </Frame>
  37. <!--Row 2 Description/Summary-->
  38. <Label Text="Description:" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center" MaxLines="1" HorizontalOptions="FillAndExpand"/>
  39. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  40. <Editor x:Name="descriptionEdt" AutoSize="TextChanges" TextChanged="DescriptionEdt_Changed" VerticalOptions="FillAndExpand" Placeholder="Edit Description" BackgroundColor="Transparent"/>
  41. </Frame>
  42. <Label Text="Notes:" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center" MaxLines="1" HorizontalOptions="FillAndExpand"/>
  43. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  44. <StackLayout>
  45. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  46. <Label x:Name="existingNotesLbl"/>
  47. </Frame>
  48. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  49. <StackLayout>
  50. <Editor x:Name="notesEdt" AutoSize="TextChanges" TextChanged="NotesEdt_TextChanged"
  51. VerticalOptions="FillAndExpand" Placeholder="Type notes here" BackgroundColor="Transparent"/>
  52. <Button Text="Add" FontSize="Medium" x:Name="addNotesBtn" Clicked="AddNotes_Clicked" IsEnabled="False"
  53. HorizontalOptions="CenterAndExpand" Padding="3" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold" Margin="3"/>
  54. </StackLayout>
  55. </Frame>
  56. </StackLayout>
  57. </Frame>
  58. <!--Row 3 Task Type-->
  59. <Label Text="Task Type:" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
  60. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  61. <Grid>
  62. <Grid.ColumnDefinitions>
  63. <ColumnDefinition Width="*"/>
  64. <ColumnDefinition Width="auto"/>
  65. </Grid.ColumnDefinitions>
  66. <Label x:Name="taskTypeLbl" Grid.Column="0" VerticalTextAlignment="Center" FontSize="Medium"/>
  67. <Button Text="Select" Grid.Column="1" FontSize="Medium" x:Name="taskTypeBtn" Clicked="TaskType_Clicked" HorizontalOptions="EndAndExpand" Padding="3" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold" Margin="3"/>
  68. </Grid>
  69. </Frame>
  70. <!--Row 4 Start Date-->
  71. <Label Text="Start Date: (tap date to edit)" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
  72. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  73. <DatePicker x:Name="startDatePck" DateSelected="StartDatePck_Selected" BackgroundColor="Transparent"/>
  74. </Frame>
  75. <!--Row 5 Estimated Time-->
  76. <Label Text="Estimated Time:" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
  77. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  78. <Grid>
  79. <Grid.ColumnDefinitions>
  80. <ColumnDefinition Width="auto"/>
  81. <!--0-->
  82. <ColumnDefinition Width="*"/>
  83. <!--1-->
  84. <ColumnDefinition Width="auto"/>
  85. <!--2-->
  86. <ColumnDefinition Width="auto"/>
  87. <!--3-->
  88. <ColumnDefinition Width="*"/>
  89. <!--4-->
  90. <ColumnDefinition Width="auto"/>
  91. <!--5-->
  92. <ColumnDefinition Width="auto"/>
  93. <!--6-->
  94. </Grid.ColumnDefinitions>
  95. <Button Grid.Column="0" x:Name="decreaseBtn" Text="-" Clicked="DecreaseBtn_Clicked" Margin="0,0,5,0" Padding="3" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold" FontSize="Large" WidthRequest="45"/>
  96. <Editor Grid.Column="1" x:Name="estimatedHoursEdt" FontSize="Medium" Keyboard="Numeric" TextChanged="EstimatedHoursEdt_Changed"/>
  97. <Label Grid.Column="2" Text="Hrs" VerticalTextAlignment="Center" FontAttributes="Bold" FontSize="Medium"/>
  98. <Label Grid.Column="3" WidthRequest="45"/>
  99. <Editor Grid.Column="4" x:Name="estimatedMinsEdt" FontSize="Medium" Keyboard="Numeric" TextChanged="EstimatedMinsEdt_Changed"/>
  100. <Label Grid.Column="5" Text="Mins" VerticalTextAlignment="Center" FontAttributes="Bold" FontSize="Medium"/>
  101. <Button Grid.Column="6" x:Name="increaseBtn" Text="+" Clicked="IncreaseBtn_Clicked" Margin="5,0,0,0" Padding="3" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold" FontSize="Large" WidthRequest="45"/>
  102. </Grid>
  103. </Frame>
  104. <!--Row 6 Due Date-->
  105. <Label Text="Due Date: (tap date to edit)" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
  106. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  107. <DatePicker x:Name="dueDatePck" DateSelected="DueDatePck_Selected" BackgroundColor="Transparent"/>
  108. </Frame>
  109. <!--Row 7 Assigned To & Private Checkbox-->
  110. <Grid>
  111. <Grid.ColumnDefinitions>
  112. <ColumnDefinition Width="auto"/>
  113. <ColumnDefinition Width="*"/>
  114. <ColumnDefinition Width="auto"/>
  115. </Grid.ColumnDefinitions>
  116. <Label Text="Assigned To:" Grid.Column="0" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
  117. <Label Text="Private" FontAttributes="Bold" Grid.Column="1" FontSize="Medium" VerticalTextAlignment="Center" HorizontalOptions="End" Margin="5"/>
  118. <CheckBox x:Name="privateCheckBox" Grid.Column="2" HorizontalOptions="Start" CheckedChanged="CheckPrivateChanged"/>
  119. </Grid>
  120. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  121. <Grid>
  122. <Grid.ColumnDefinitions>
  123. <ColumnDefinition Width="*"/>
  124. <ColumnDefinition Width="auto"/>
  125. </Grid.ColumnDefinitions>
  126. <Label x:Name="assignedToLbl" Grid.Column="0" FontSize="Medium" VerticalTextAlignment="Center"/>
  127. <Button Text="Select" FontSize="Medium" Grid.Column="1" x:Name="assignedToBtn" Clicked="AssignedToBtn_Clicked" HorizontalOptions="EndAndExpand" Padding="3" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  128. </Grid>
  129. </Frame>
  130. <!--Row 8 Allocated By-->
  131. <Label Text="Allocated By:" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
  132. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  133. <Grid>
  134. <Grid.ColumnDefinitions>
  135. <ColumnDefinition Width="*"/>
  136. <ColumnDefinition Width="auto"/>
  137. </Grid.ColumnDefinitions>
  138. <Label x:Name="allocatedByLbl" Grid.Column="0" FontSize="Medium" VerticalTextAlignment="Center"/>
  139. <Button Text="Select" FontSize="Medium" Grid.Column="1" x:Name="allocatedByBtn" Clicked="AllocatedByBtn_Clicked" HorizontalOptions="EndAndExpand" Padding="3" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold" Margin="3"/>
  140. </Grid>
  141. </Frame>
  142. <!--Row 9 Subscribers-->
  143. <Label Text="Subscribers (Observers):" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
  144. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  145. <Grid>
  146. <Grid.RowDefinitions>
  147. <RowDefinition Height="auto"/>
  148. <RowDefinition Height="auto"/>
  149. </Grid.RowDefinitions>
  150. <Grid.ColumnDefinitions>
  151. <ColumnDefinition Width="*"/>
  152. <ColumnDefinition Width="*"/>
  153. </Grid.ColumnDefinitions>
  154. <Button Text="Add" FontSize="Medium" Grid.Column="0" Grid.Row="0" x:Name="addSubscriberBtn" Clicked="AddSubscriberBtn_Clicked" Padding="3" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  155. <Button Text="Remove" FontSize="Medium" Grid.Column="1" Grid.Row="0" x:Name="removeSubscriberBtn" Clicked="RemoveSubscriberBtn_Clicked" Padding="3" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold"/>
  156. <StackLayout x:Name="observerStackLayout" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"/>
  157. </Grid>
  158. </Frame>
  159. <!--Row 10 Category-->
  160. <Label Text="Category: (tap to edit)" FontAttributes="Bold" FontSize="Medium" Margin="5" HorizontalTextAlignment="Start" VerticalTextAlignment="Center"/>
  161. <Frame Padding="10" BorderColor="#15C7C1" CornerRadius="5">
  162. <Picker x:Name="categoryPck" Title="Choose an Option" SelectedIndexChanged="category_Changed" HorizontalOptions="FillAndExpand" BackgroundColor="Transparent">
  163. <Picker.Items>
  164. <x:String>To Do</x:String>
  165. <x:String>In Progress</x:String>
  166. <x:String>Waiting</x:String>
  167. <x:String>Completed</x:String>
  168. </Picker.Items>
  169. </Picker>
  170. </Frame>
  171. <!--Row 11 Photo Frame-->
  172. <Frame Padding="5" BorderColor="#15C7C1" Margin="2" CornerRadius="5" x:Name="photoFrame">
  173. <StackLayout Orientation="Vertical">
  174. <Label x:Name="photosLbl" Text="Photos" HorizontalOptions="Center" FontSize="Large" FontAttributes="Bold" Margin="5"/>
  175. <ScrollView Orientation="Horizontal" x:Name="ImageScroller" IsVisible="false">
  176. <StackLayout x:Name="images" Orientation="Horizontal" HeightRequest="150" HorizontalOptions="StartAndExpand" VerticalOptions="Fill"/>
  177. </ScrollView>
  178. </StackLayout>
  179. </Frame>
  180. </StackLayout>
  181. <!--Inner StackLayout end-->
  182. </ScrollView>
  183. <!--ScrollView end-->
  184. <!--Fixed buttons for photos/QA forms-->
  185. <Frame Grid.Row="1" Padding="2" BorderColor="Black" Margin="5,0,5,30" BackgroundColor="#EBEBEB" CornerRadius="5">
  186. <Grid>
  187. <Grid.RowDefinitions>
  188. <RowDefinition Height="50"/>
  189. </Grid.RowDefinitions>
  190. <Grid.ColumnDefinitions>
  191. <ColumnDefinition Width="*"/>
  192. <ColumnDefinition Width="*"/>
  193. <ColumnDefinition Width="*"/>
  194. </Grid.ColumnDefinitions>
  195. <ImageButton x:Name="TakePhoto" Grid.Row="0" Grid.Column="0" Source="camera" Aspect="AspectFit" Clicked="TakePhoto_Clicked" CornerRadius="5" Margin="3" BorderColor="Black" BorderWidth="1" BackgroundColor="#15C7C1"/>
  196. <ImageButton x:Name="ChooseImage" Grid.Row="0" Grid.Column="1" Source="photo" Aspect="AspectFit" Clicked="ChooseImage_Clicked" CornerRadius="5" Margin="3" BorderColor="Black" BorderWidth="1" BackgroundColor="#15C7C1"/>
  197. <Button x:Name="formsBtn" Grid.Row="0" Grid.Column="2" Text="Forms" FontSize="Large" Padding="3" FontAttributes="Bold" CornerRadius="5" Margin="3" BorderColor="Black" BorderWidth="1" BackgroundColor="#15C7C1" TextColor="White" Clicked="Forms_Clicked" IsEnabled="False"/>
  198. </Grid>
  199. </Frame>
  200. </Grid>
  201. </ContentPage.Content>
  202. </ContentPage>