VisitsView.axaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:vm="using:Acosta.ViewModels"
  6. x:DataType="vm:MainWindowViewModel"
  7. mc:Ignorable="d" d:DesignWidth="1550" d:DesignHeight="800.5"
  8. x:Class="Acosta.Views.VisitsView">
  9. <Grid>
  10. <StackPanel>
  11. <StackPanel Height="50" Background="#E40714" VerticalAlignment="Top">
  12. <StackPanel.Styles>
  13. <Style Selector="TextBlock.headerLogo">
  14. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  15. <Setter Property="FontFamily" Value="Roboto"></Setter>
  16. <Setter Property="FontWeight" Value="Regular"></Setter>
  17. <Setter Property="FontSize" Value="35"></Setter>
  18. <Setter Property="Margin" Value="30 0 0 0"></Setter>
  19. </Style>
  20. <Style Selector="TextBlock.greeting">
  21. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  22. <Setter Property="FontFamily" Value="Roboto"></Setter>
  23. <Setter Property="FontWeight" Value="Medium"></Setter>
  24. <Setter Property="FontSize" Value="16"></Setter>
  25. </Style>
  26. <Style Selector="Button.headerBt">
  27. <Setter Property="Background" Value="Transparent"></Setter>
  28. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  29. <Setter Property="FontFamily" Value="Roboto"></Setter>
  30. <Setter Property="FontSize" Value="16"></Setter>
  31. <Setter Property="FontWeight" Value="Medium"></Setter>
  32. </Style>
  33. <Style Selector="Button.headerBt:pointerover /template/ ContentPresenter">
  34. <Setter Property="Background" Value="Transparent"></Setter>
  35. <Setter Property="Foreground" Value="#D5AFAF"></Setter>
  36. <Setter Property="FontWeight" Value="Medium"></Setter>
  37. <Setter Property="FontSize" Value="16"></Setter>
  38. </Style>
  39. <Style Selector="Button.headerBt:pressed">
  40. <Setter Property="RenderTransform" Value="none"/>
  41. </Style>
  42. </StackPanel.Styles>
  43. <StackPanel Orientation="Horizontal">
  44. <TextBlock Classes="headerLogo">Acosta</TextBlock>
  45. <TextBlock Classes="greeting" Margin="770 12 0 0">Добро пожаловать, оператор</TextBlock>
  46. <TextBlock Classes="greeting" Margin="7 12 0 0" FontWeight="Bold" Name="FIO" Text="{Binding PersonalAccountVM.CurrentUser.Surname}">Фамилия И.О.</TextBlock>
  47. <TextBlock Classes="greeting" Margin="10 10 0 0">/</TextBlock>
  48. <Button Classes="headerBt" Command="{Binding ChangePasswordView}">Изменить пароль</Button>
  49. <TextBlock Classes="greeting" Margin="0 10 0 0">/</TextBlock>
  50. <Button Classes="headerBt" Command="{Binding ExitFromProfile}">Выйти</Button>
  51. </StackPanel>
  52. </StackPanel>
  53. <StackPanel Classes="PanelMenu" Orientation="Horizontal">
  54. <StackPanel.Styles>
  55. <Style Selector="StackPanel.PanelMenu">
  56. <Setter Property="Margin" Value="30"></Setter>
  57. </Style>
  58. <Style Selector="TextBlock.TextBtBack">
  59. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  60. <Setter Property="FontFamily" Value="Roboto"></Setter>
  61. <Setter Property="FontWeight" Value="Medium"></Setter>
  62. <Setter Property="FontSize" Value="20"></Setter>
  63. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  64. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  65. </Style>
  66. <Style Selector="TextBlock.Chapter">
  67. <Setter Property="Foreground" Value="Black"></Setter>
  68. <Setter Property="FontFamily" Value="Roboto"></Setter>
  69. <Setter Property="FontWeight" Value="Medium"></Setter>
  70. <Setter Property="FontSize" Value="20"></Setter>
  71. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  72. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  73. <Setter Property="Margin" Value="30 0"></Setter>
  74. </Style>
  75. <Style Selector="Button.BtBack">
  76. <Setter Property="Width" Value="140"></Setter>
  77. <Setter Property="Height" Value="40"></Setter>
  78. <Setter Property="Background" Value="#E40714"></Setter>
  79. <Setter Property="CornerRadius" Value="13"></Setter>
  80. </Style>
  81. <Style Selector="Button.BtBack:pointerover /template/ ContentPresenter">
  82. <Setter Property="Background" Value="#A10009"></Setter>
  83. </Style>
  84. <Style Selector="Button.BtBack:pressed">
  85. <Setter Property="RenderTransform" Value="none"/>
  86. </Style>
  87. <Style Selector="Button.BtAdd">
  88. <Setter Property="Height" Value="40"></Setter>
  89. <Setter Property="Margin" Value="670 0 0 0"></Setter>
  90. <Setter Property="Background" Value="#E40714"></Setter>
  91. <Setter Property="CornerRadius" Value="13"></Setter>
  92. </Style>
  93. <Style Selector="Button.BtAdd:pointerover /template/ ContentPresenter">
  94. <Setter Property="Background" Value="#A10009"></Setter>
  95. </Style>
  96. <Style Selector="TextBlock.TextBtAdd">
  97. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  98. <Setter Property="FontFamily" Value="Roboto"></Setter>
  99. <Setter Property="FontWeight" Value="Medium"></Setter>
  100. <Setter Property="FontSize" Value="18"></Setter>
  101. <Setter Property="Margin" Value="20 0 0 0"></Setter>
  102. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  103. </Style>
  104. <Style Selector="Button.BtAdd:pressed">
  105. <Setter Property="RenderTransform" Value="none"/>
  106. </Style>
  107. </StackPanel.Styles>
  108. <Button Classes="BtBack" Command="{Binding BackPersonalAccountView}">
  109. <TextBlock Classes="TextBtBack">Назад</TextBlock>
  110. </Button>
  111. <TextBlock Classes="Chapter">Выберите Визит для изменения</TextBlock>
  112. <StackPanel Orientation="Horizontal">
  113. <Button Classes="BtAdd" Width="240" Command="{Binding AddVisitView}">
  114. <TextBlock Classes="TextBtAdd">
  115. Добавить визит <Image Source="avares://Acosta/Assets/plus.png" Width="25" Margin="20 0" HorizontalAlignment="Center" VerticalAlignment="Center"></Image>
  116. </TextBlock>
  117. </Button>
  118. </StackPanel>
  119. </StackPanel>
  120. <StackPanel>
  121. <StackPanel.Styles>
  122. <Style Selector="TextBlock.TextColumns">
  123. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  124. <Setter Property="FontFamily" Value="Roboto"></Setter>
  125. <Setter Property="FontWeight" Value="Medium"></Setter>
  126. <Setter Property="FontSize" Value="18"></Setter>
  127. <Setter Property="Margin" Value="60 0"></Setter>
  128. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  129. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  130. </Style>
  131. <Style Selector="Border.TextColumns">
  132. <Setter Property="Margin" Value="0 0 0 20"></Setter>
  133. </Style>
  134. </StackPanel.Styles>
  135. <Border Classes="TextColumns" Background="#80E40714" CornerRadius="13" Height="40" Margin="60 0">
  136. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  137. <TextBlock Classes="TextColumns">НАЗВАНИЕ ТОРГОВОЙ ТОЧКИ</TextBlock>
  138. <TextBlock Classes="TextColumns">НАЗВАНИЕ ПРОЕКТА</TextBlock>
  139. <TextBlock Classes="TextColumns">ДАТА ВИЗИТА</TextBlock>
  140. <TextBlock Classes="TextColumns">ВРЕМЯ ВИЗИТА</TextBlock>
  141. <TextBlock Classes="TextColumns" Margin="20 0 60 0">ВИЗИТ ПРИНЯТ</TextBlock>
  142. </StackPanel>
  143. </Border>
  144. </StackPanel>
  145. <StackPanel Orientation="Vertical" Margin="0 30">
  146. <!--<StackPanel Orientation="Horizontal">
  147. <Border Classes="TextColumn">
  148. <Button Background="Transparent" Command="{Binding EditVisitView}">
  149. <TextBlock Classes="TextColumn">Название торговой точки</TextBlock>
  150. </Button>
  151. </Border>
  152. <Border Classes="TextColumn">
  153. <TextBlock Classes="TextColumn">Название проекта</TextBlock>
  154. </Border>
  155. <Border Classes="TextColumn">
  156. <TextBlock Classes="TextColumn" Margin="30 0">Дата визита</TextBlock>
  157. </Border>
  158. <Border Classes="TextColumn">
  159. <TextBlock Classes="TextColumn">Время визита</TextBlock>
  160. </Border>
  161. <Border Classes="TextColumn">
  162. <ComboBox Classes="TextColumn">
  163. <ComboBoxItem>Принят</ComboBoxItem>
  164. <ComboBoxItem>Не принят</ComboBoxItem>
  165. </ComboBox>
  166. </Border>
  167. </StackPanel>-->
  168. <ScrollViewer Height="500">
  169. <StackPanel Orientation="Vertical">
  170. <StackPanel.Styles>
  171. <Style Selector="ListBox.filters ListBoxItem:pointerover /template/ ContentPresenter">
  172. <Setter Property="Background" Value="#FFF8F8"/>
  173. </Style>
  174. <Style Selector="ListBox.filters ListBoxItem:focus /template/ ContentPresenter">
  175. <Setter Property="Background" Value="#F48288"/>
  176. </Style>
  177. <Style Selector="TextBlock.TextColumn">
  178. <Setter Property="Foreground" Value="Black"></Setter>
  179. <Setter Property="FontFamily" Value="Roboto"></Setter>
  180. <Setter Property="FontWeight" Value="Medium"></Setter>
  181. <Setter Property="FontSize" Value="18"></Setter>
  182. <Setter Property="Margin" Value="10 0"></Setter>
  183. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  184. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  185. </Style>
  186. <Style Selector="ComboBox.TextColumn">
  187. <Setter Property="Foreground" Value="Black"></Setter>
  188. <Setter Property="FontFamily" Value="Roboto"></Setter>
  189. <Setter Property="FontWeight" Value="Medium"></Setter>
  190. <Setter Property="FontSize" Value="18"></Setter>
  191. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  192. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  193. <Setter Property="BorderBrush" Value="Transparent"></Setter>
  194. <Setter Property="Background" Value="Transparent"></Setter>
  195. <Setter Property="Width" Value="180"></Setter>
  196. </Style>
  197. <Style Selector="Border.TextColumn">
  198. <Setter Property="Margin" Value="60 0 0 20"></Setter>
  199. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  200. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  201. <Setter Property="Background" Value="#FFF8F8"></Setter>
  202. <Setter Property="Height" Value="40"></Setter>
  203. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  204. <Setter Property="BorderThickness" Value="2"></Setter>
  205. <Setter Property="CornerRadius" Value="13"></Setter>
  206. <Setter Property="Width" Value="150"></Setter>
  207. </Style>
  208. <Style Selector="Button.BtEdit">
  209. <Setter Property="BorderThickness" Value="2"></Setter>
  210. <Setter Property="Background" Value="#FFF8F8"></Setter>
  211. <Setter Property="CornerRadius" Value="13"></Setter>
  212. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  213. </Style>
  214. <Style Selector="Button.BtEdit:pointerover /template/ ContentPresenter">
  215. <Setter Property="Background" Value="#FFF8F8"></Setter>
  216. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  217. </Style>
  218. <Style Selector="Button.BtEdit:pressed">
  219. <Setter Property="RenderTransform" Value="none"/>
  220. </Style>
  221. </StackPanel.Styles>
  222. <ListBox ItemsSource="{Binding ListVisits}" Classes="filters" Background="Transparent" IsTabStop="False">
  223. <ListBox.ItemTemplate>
  224. <DataTemplate>
  225. <StackPanel Orientation="Horizontal" Margin="0 20 0 0">
  226. <Border Classes="TextColumn" Width="350">
  227. <TextBlock Text="{Binding OutletNavigation.Address}" Classes="TextColumn">Название торговой точки</TextBlock>
  228. </Border>
  229. <Border Classes="TextColumn" Width="250">
  230. <TextBlock Text="{Binding ProjectNavigation.Title}" Classes="TextColumn">Название проекта</TextBlock>
  231. </Border>
  232. <Border Classes="TextColumn" Width="180">
  233. <TextBlock Text="{Binding Visitdate}" Classes="TextColumn" Margin="30 0">Дата визита</TextBlock>
  234. </Border>
  235. <Border Classes="TextColumn" Width="170">
  236. <TextBlock Text="{Binding Visittime}" Classes="TextColumn">Время визита</TextBlock>
  237. </Border>
  238. <Border Classes="TextColumn">
  239. <TextBlock Text="{Binding AcceptedNavigation.Title}" Classes="TextColumn">Принят</TextBlock>
  240. </Border>
  241. <Button Classes="BtEdit" Margin="30 5" FontFamily="Roboto" VerticalAlignment="Top">
  242. <Image Source="avares://Acosta/Assets/change.png" Width="20"></Image>
  243. </Button>
  244. </StackPanel>
  245. </DataTemplate>
  246. </ListBox.ItemTemplate>
  247. </ListBox>
  248. </StackPanel>
  249. </ScrollViewer>
  250. </StackPanel>
  251. </StackPanel>
  252. </Grid>
  253. </UserControl>