AddEditTask.xaml 16 KB

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