EditEmployeesView.axaml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  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. mc:Ignorable="d" d:DesignWidth="1550" d:DesignHeight="800.5"
  6. xmlns:vm="using:Acosta.ViewModels"
  7. x:DataType="vm:MainWindowViewModel"
  8. x:Class="Acosta.Views.EditEmployeesView">
  9. <Grid>
  10. <StackPanel Height="50" Background="#E40714" VerticalAlignment="Top">
  11. <StackPanel.Styles>
  12. <Style Selector="TextBlock.headerLogo">
  13. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  14. <Setter Property="FontFamily" Value="Roboto"></Setter>
  15. <Setter Property="FontWeight" Value="Regular"></Setter>
  16. <Setter Property="FontSize" Value="35"></Setter>
  17. <Setter Property="Margin" Value="30 0 0 0"></Setter>
  18. </Style>
  19. <Style Selector="TextBlock.greeting">
  20. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  21. <Setter Property="FontFamily" Value="Roboto"></Setter>
  22. <Setter Property="FontWeight" Value="Medium"></Setter>
  23. <Setter Property="FontSize" Value="16"></Setter>
  24. </Style>
  25. <Style Selector="Button.headerBt">
  26. <Setter Property="Background" Value="Transparent"></Setter>
  27. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  28. <Setter Property="FontFamily" Value="Roboto"></Setter>
  29. <Setter Property="FontSize" Value="16"></Setter>
  30. <Setter Property="FontWeight" Value="Medium"></Setter>
  31. </Style>
  32. <Style Selector="Button.headerBt:pointerover /template/ ContentPresenter">
  33. <Setter Property="Background" Value="Transparent"></Setter>
  34. <Setter Property="Foreground" Value="#D5AFAF"></Setter>
  35. <Setter Property="FontWeight" Value="Medium"></Setter>
  36. <Setter Property="FontSize" Value="16"></Setter>
  37. </Style>
  38. <Style Selector="Button.headerBt:pressed">
  39. <Setter Property="RenderTransform" Value="none"/>
  40. </Style>
  41. </StackPanel.Styles>
  42. <StackPanel Orientation="Horizontal">
  43. <TextBlock Classes="headerLogo">Acosta</TextBlock>
  44. <TextBlock Classes="greeting" Margin="770 12 0 0">Добро пожаловать, оператор</TextBlock>
  45. <TextBlock Classes="greeting" Margin="7 12 0 0" FontWeight="Bold" Name="FIO" Text="{Binding PersonalAccountVM.CurrentUser.Surname}">Фамилия И.О.</TextBlock>
  46. <TextBlock Classes="greeting" Margin="10 10 0 0">/</TextBlock>
  47. <Button Classes="headerBt" Command="{Binding ChangePasswordView}">Изменить пароль</Button>
  48. <TextBlock Classes="greeting" Margin="0 10 0 0">/</TextBlock>
  49. <Button Classes="headerBt" Command="{Binding ExitFromProfile}">Выйти</Button>
  50. </StackPanel>
  51. </StackPanel>
  52. <StackPanel Orientation="Vertical">
  53. <StackPanel.Styles>
  54. <Style Selector="TextBlock.TextToTextBox">
  55. <Setter Property="Foreground" Value="Black"></Setter>
  56. <Setter Property="FontFamily" Value="Roboto"></Setter>
  57. <Setter Property="FontWeight" Value="Regular"></Setter>
  58. <Setter Property="FontSize" Value="18"></Setter>
  59. <Setter Property="Margin" Value="200 30 0 0"></Setter>
  60. </Style>
  61. <Style Selector="ComboBox">
  62. <Setter Property="Background" Value="#FFF8F8"></Setter>
  63. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  64. <Setter Property="CornerRadius" Value="9"></Setter>
  65. <Setter Property="BorderThickness" Value="2"></Setter>
  66. <Setter Property="FontSize" Value="14"></Setter>
  67. <Setter Property="FontFamily" Value="Roboto"></Setter>
  68. </Style>
  69. <Style Selector="TextBox">
  70. <Setter Property="Background" Value="#FFF8F8"></Setter>
  71. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  72. <Setter Property="CornerRadius" Value="9"></Setter>
  73. <Setter Property="BorderThickness" Value="2"></Setter>
  74. <Setter Property="FontSize" Value="14"></Setter>
  75. <Setter Property="FontFamily" Value="Roboto"></Setter>
  76. </Style>
  77. <Style Selector="TextBox:pointerover /template/ TextBlock#PART_Watermark">
  78. <Setter Property="TextBox.BorderBrush" Value="#A10009" />
  79. </Style>
  80. <Style Selector="TextBox:focus /template/ TextBlock#PART_Watermark">
  81. <Setter Property="TextBox.BorderBrush" Value="#A10009" />
  82. </Style>
  83. <Style Selector="TextBlock.TextBtBack">
  84. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  85. <Setter Property="FontFamily" Value="Roboto"></Setter>
  86. <Setter Property="FontWeight" Value="Medium"></Setter>
  87. <Setter Property="FontSize" Value="20"></Setter>
  88. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  89. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  90. </Style>
  91. <Style Selector="TextBlock.Chapter">
  92. <Setter Property="Foreground" Value="Black"></Setter>
  93. <Setter Property="FontFamily" Value="Roboto"></Setter>
  94. <Setter Property="FontWeight" Value="Medium"></Setter>
  95. <Setter Property="FontSize" Value="20"></Setter>
  96. <Setter Property="Margin" Value="30 85 0 0"></Setter>
  97. </Style>
  98. <Style Selector="Button.BtBack">
  99. <Setter Property="Width" Value="140"></Setter>
  100. <Setter Property="Height" Value="40"></Setter>
  101. <Setter Property="Margin" Value="30 80 0 0"></Setter>
  102. <Setter Property="Background" Value="#E40714"></Setter>
  103. <Setter Property="CornerRadius" Value="13"></Setter>
  104. </Style>
  105. <Style Selector="Button.BtBack:pointerover /template/ ContentPresenter">
  106. <Setter Property="Background" Value="#A10009"></Setter>
  107. </Style>
  108. <Style Selector="Button.BtBack:pressed">
  109. <Setter Property="RenderTransform" Value="none"/>
  110. </Style>
  111. <Style Selector="Button.BtAdd">
  112. <Setter Property="Height" Value="35"></Setter>
  113. <Setter Property="Margin" Value="620 80 0 0"></Setter>
  114. <Setter Property="Background" Value="#E40714"></Setter>
  115. <Setter Property="CornerRadius" Value="13"></Setter>
  116. </Style>
  117. <Style Selector="Button.BtAdd:pointerover /template/ ContentPresenter">
  118. <Setter Property="Background" Value="#A10009"></Setter>
  119. </Style>
  120. <Style Selector="TextBlock.TextBtAdd">
  121. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  122. <Setter Property="FontFamily" Value="Roboto"></Setter>
  123. <Setter Property="FontWeight" Value="Medium"></Setter>
  124. <Setter Property="FontSize" Value="20"></Setter>
  125. <Setter Property="Margin" Value="20 0 0 0"></Setter>
  126. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  127. </Style>
  128. <Style Selector="ComboBox.TextToComboBox">
  129. <Setter Property="Background" Value="#FFF8F8"></Setter>
  130. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  131. <Setter Property="CornerRadius" Value="9"></Setter>
  132. <Setter Property="BorderThickness" Value="2"></Setter>
  133. <Setter Property="FontSize" Value="18"></Setter>
  134. <Setter Property="FontFamily" Value="Roboto"></Setter>
  135. </Style>
  136. <Style Selector="Button.BtAdd:pressed">
  137. <Setter Property="RenderTransform" Value="none"/>
  138. </Style>
  139. <Style Selector="CheckBox.TextToCheckBox">
  140. <Setter Property="FontSize" Value="18"></Setter>
  141. <Setter Property="FontFamily" Value="Roboto"></Setter>
  142. </Style>
  143. <Style Selector="CheckBox.TextToCheckBox /template/ Border#NormalRectangle">
  144. <Setter Property="BorderBrush" Value="#E40714"/>
  145. <Setter Property="CornerRadius" Value="5"></Setter>
  146. </Style>
  147. </StackPanel.Styles>
  148. <StackPanel Orientation="Horizontal">
  149. <Button Classes="BtBack" Command="{Binding BackEmployeesView}">
  150. <TextBlock Classes="TextBtBack">Назад</TextBlock>
  151. </Button>
  152. <TextBlock Classes="Chapter">Изменение данных о сотруднике</TextBlock>
  153. </StackPanel>
  154. <ScrollViewer Height="600">
  155. <StackPanel Orientation="Vertical">
  156. <StackPanel Orientation="Horizontal">
  157. <TextBlock Classes="TextToTextBox">Фамилия:</TextBlock>
  158. <TextBox Text="{Binding EditUserVM.CurrentUser.Surname}" Watermark="Фамилия" Width="360" Margin="160 20 0 0"></TextBox>
  159. </StackPanel>
  160. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  161. <StackPanel Orientation="Horizontal">
  162. <TextBlock Classes="TextToTextBox">Имя:</TextBlock>
  163. <TextBox Text="{Binding EditUserVM.CurrentUser.Name}" Watermark="Имя" Width="360" Margin="200 20 0 0"></TextBox>
  164. </StackPanel>
  165. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  166. <StackPanel Orientation="Horizontal">
  167. <TextBlock Classes="TextToTextBox">Отчетсво:</TextBlock>
  168. <TextBox Text="{Binding EditUserVM.CurrentUser.Patronymic}" Watermark="Отчетсво" Width="360" Margin="160 20 0 0"></TextBox>
  169. </StackPanel>
  170. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  171. <StackPanel Orientation="Horizontal">
  172. <TextBlock Classes="TextToTextBox">Почта:</TextBlock>
  173. <TextBox Text="{Binding EditUserVM.CurrentUser.Email}" Watermark="Почта" Width="360" Margin="185 20 0 0"></TextBox>
  174. </StackPanel>
  175. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  176. <StackPanel Orientation="Horizontal">
  177. <TextBlock Classes="TextToTextBox">Телефон:</TextBlock>
  178. <TextBox Text="{Binding EditUserVM.CurrentUser.Phonenumber}" Watermark="Телефон" Width="360" Margin="168 20 0 0"></TextBox>
  179. </StackPanel>
  180. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="200 30 0 10" HorizontalAlignment="Left"></Border>
  181. <!--<StackPanel Orientation="Horizontal">
  182. <TextBlock Classes="TextToTextBox">Роль:</TextBlock>
  183. <TextBox Text="{Binding EditUserVM.CurrentUser.Role}" Watermark="Роль" Width="360" Margin="200 20 0 0"></TextBox>
  184. </StackPanel>-->
  185. <StackPanel Orientation="Horizontal">
  186. <TextBlock Classes="TextToTextBox">Роль:</TextBlock>
  187. <ComboBox Width="360" Margin="200 27 0 0" ItemsSource="{Binding AddEmployeesVM.Roles}" SelectedItem="{Binding AddEmployeesVM.CurrentUser.RoleNavigation}">
  188. <ComboBox.ItemTemplate>
  189. <DataTemplate>
  190. <TextBlock Text="{Binding Title}"/>
  191. </DataTemplate>
  192. </ComboBox.ItemTemplate>
  193. </ComboBox>
  194. </StackPanel>
  195. <Border Background="#969696" CornerRadius="13" Width="1150" Height="0.5" Margin="197 30 0 10" HorizontalAlignment="Left"></Border>
  196. <TextBlock Classes="TextToTextBox">Проекты:</TextBlock>
  197. <ListBox ItemsSource="{Binding ListProjects}" Background="Transparent" IsTabStop="False" Classes="filters" Width="1150">
  198. <ListBox.ItemTemplate>
  199. <DataTemplate>
  200. <StackPanel Orientation="Vertical">
  201. <CheckBox Classes="TextToCheckBox" Margin="-5 0 0 -10">
  202. <TextBlock Text="{Binding Title}"></TextBlock>
  203. </CheckBox>
  204. </StackPanel>
  205. </DataTemplate>
  206. </ListBox.ItemTemplate>
  207. </ListBox>
  208. </StackPanel>
  209. </ScrollViewer>
  210. </StackPanel>
  211. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  212. <StackPanel.Styles>
  213. <Style Selector="TextBlock.TextBtDelete">
  214. <Setter Property="Foreground" Value="#E40714"></Setter>
  215. <Setter Property="FontFamily" Value="Roboto"></Setter>
  216. <Setter Property="FontWeight" Value="Medium"></Setter>
  217. <Setter Property="FontSize" Value="20"></Setter>
  218. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  219. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  220. </Style>
  221. <Style Selector="Button.BtDelete">
  222. <Setter Property="BorderThickness" Value="2"></Setter>
  223. <Setter Property="Width" Value="180"></Setter>
  224. <Setter Property="Height" Value="38"></Setter>
  225. <Setter Property="Margin" Value="0 740 70 20"></Setter>
  226. <Setter Property="Background" Value="Transparent"></Setter>
  227. <Setter Property="CornerRadius" Value="13"></Setter>
  228. <Setter Property="BorderBrush" Value="#E40714"></Setter>
  229. </Style>
  230. <Style Selector="Button.BtDelete:pointerover /template/ ContentPresenter">
  231. <Setter Property="BorderBrush" Value="#A10009"></Setter>
  232. <Setter Property="Background" Value="Transparent"></Setter>
  233. </Style>
  234. <Style Selector="Button.BtDelete:pressed">
  235. <Setter Property="RenderTransform" Value="none"/>
  236. </Style>
  237. <Style Selector="TextBlock.TextBtSave">
  238. <Setter Property="Foreground" Value="#F5F5F5"></Setter>
  239. <Setter Property="FontFamily" Value="Roboto"></Setter>
  240. <Setter Property="FontWeight" Value="Medium"></Setter>
  241. <Setter Property="FontSize" Value="20"></Setter>
  242. <Setter Property="HorizontalAlignment" Value="Center"></Setter>
  243. <Setter Property="VerticalAlignment" Value="Center"></Setter>
  244. </Style>
  245. <Style Selector="Button.BtSave">
  246. <Setter Property="Width" Value="180"></Setter>
  247. <Setter Property="Height" Value="38"></Setter>
  248. <Setter Property="Margin" Value="0 740 30 20"></Setter>
  249. <Setter Property="Background" Value="#E40714"></Setter>
  250. <Setter Property="CornerRadius" Value="13"></Setter>
  251. </Style>
  252. <Style Selector="Button.BtSave:pointerover /template/ ContentPresenter">
  253. <Setter Property="Background" Value="#A10009"></Setter>
  254. </Style>
  255. <Style Selector="Button.BtSave:pressed">
  256. <Setter Property="RenderTransform" Value="none"/>
  257. </Style>
  258. </StackPanel.Styles>
  259. <Button Classes="BtDelete" Command="">
  260. <TextBlock Classes="TextBtDelete">Удалить</TextBlock>
  261. </Button>
  262. <Button Classes="BtSave" Command="{Binding SaveEditUser}">
  263. <TextBlock Classes="TextBtSave">Сохранить</TextBlock>
  264. </Button>
  265. </StackPanel>
  266. </Grid>
  267. </UserControl>