199 lines
8.7 KiB
XML
199 lines
8.7 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
xmlns:models="clr-namespace:CORP_MAUI.Models"
|
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
|
x:Class="CORP_MAUI.Pages.EmployeeProfilePage"
|
|
Title="Профиль сотрудника"
|
|
BackgroundColor="White">
|
|
|
|
<Shell.BackButtonBehavior>
|
|
<BackButtonBehavior IsVisible="True" TextOverride="Назад" />
|
|
</Shell.BackButtonBehavior>
|
|
|
|
<Grid RowDefinitions="Auto,*">
|
|
|
|
<!-- Шапка -->
|
|
<Grid
|
|
Grid.Row="0"
|
|
ColumnDefinitions="50,*,50"
|
|
Padding="15,10"
|
|
BackgroundColor="#E5E5E5">
|
|
|
|
<!-- Кнопка назад -->
|
|
<Border
|
|
Grid.Column="0"
|
|
WidthRequest="40"
|
|
HeightRequest="40"
|
|
StrokeShape="RoundRectangle 20"
|
|
BackgroundColor="Transparent"
|
|
Stroke="Transparent"
|
|
HorizontalOptions="Start">
|
|
<Border.GestureRecognizers>
|
|
<TapGestureRecognizer Tapped="OnBackTapped"/>
|
|
</Border.GestureRecognizers>
|
|
<Image
|
|
Source="arrow_back.png"
|
|
WidthRequest="24"
|
|
HeightRequest="24"
|
|
HorizontalOptions="Center"
|
|
VerticalOptions="Center">
|
|
<Image.Behaviors>
|
|
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
|
|
</Image.Behaviors>
|
|
</Image>
|
|
</Border>
|
|
|
|
<!-- Заголовок -->
|
|
<Label
|
|
Grid.Column="1"
|
|
Text="Профиль сотрудника"
|
|
FontSize="18"
|
|
FontAttributes="Bold"
|
|
TextColor="{StaticResource Gray900}"
|
|
HorizontalOptions="Center"
|
|
VerticalOptions="Center"/>
|
|
|
|
<!-- Пустое место справа -->
|
|
<BoxView Grid.Column="2" Color="Transparent"/>
|
|
</Grid>
|
|
|
|
<!-- Контент -->
|
|
<ScrollView Grid.Row="1">
|
|
<VerticalStackLayout Padding="15" Spacing="15">
|
|
|
|
<!-- Аватар и основная информация -->
|
|
<Border Style="{StaticResource CardBorderLarge}">
|
|
<VerticalStackLayout Spacing="15" HorizontalOptions="Center">
|
|
|
|
<!-- Аватар -->
|
|
<Border Style="{StaticResource AvatarXLarge}">
|
|
<Grid>
|
|
<Image
|
|
x:Name="AvatarImage"
|
|
Aspect="AspectFill"/>
|
|
<!-- Индикатор онлайн статуса -->
|
|
<Border
|
|
Style="{StaticResource OnlineIndicatorLarge}"
|
|
x:Name="OnlineIndicator"
|
|
IsVisible="False"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- ФИО -->
|
|
<Label
|
|
x:Name="FullNameLabel"
|
|
Style="{StaticResource PageTitle}"/>
|
|
|
|
<!-- Должность -->
|
|
<Label
|
|
x:Name="PositionLabel"
|
|
Style="{StaticResource CardText}"
|
|
FontSize="16"
|
|
HorizontalOptions="Center"
|
|
HorizontalTextAlignment="Center"/>
|
|
|
|
<!-- Кнопка "Написать сообщение" -->
|
|
<Button
|
|
x:Name="ChatButton"
|
|
Text="💬 Написать сообщение"
|
|
Style="{StaticResource PrimaryButton}"
|
|
Clicked="OnChatButtonClicked"
|
|
Margin="0,10,0,0"/>
|
|
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
|
|
<!-- Контактная информация -->
|
|
<VerticalStackLayout Spacing="10">
|
|
|
|
<Label Text="Контакты" Style="{StaticResource SectionTitle}" Margin="5,0,0,0"/>
|
|
|
|
<!-- Email -->
|
|
<Border
|
|
Style="{StaticResource CardBorderLarge}"
|
|
x:Name="EmailSection"
|
|
IsVisible="False">
|
|
<HorizontalStackLayout Spacing="12">
|
|
<Image Source="email.png" WidthRequest="24" HeightRequest="24" VerticalOptions="Center">
|
|
<Image.Behaviors>
|
|
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
|
|
</Image.Behaviors>
|
|
</Image>
|
|
<VerticalStackLayout Spacing="3">
|
|
<Label Text="Email" Style="{StaticResource CardMeta}"/>
|
|
<Label x:Name="EmailLabel" Style="{StaticResource CardText}" TextColor="{StaticResource Gray900}"/>
|
|
</VerticalStackLayout>
|
|
</HorizontalStackLayout>
|
|
</Border>
|
|
|
|
<!-- Телефон -->
|
|
<Border
|
|
Style="{StaticResource CardBorderLarge}"
|
|
x:Name="PhoneSection"
|
|
IsVisible="False">
|
|
<HorizontalStackLayout Spacing="12">
|
|
<Image Source="phone.png" WidthRequest="24" HeightRequest="24" VerticalOptions="Center">
|
|
<Image.Behaviors>
|
|
<toolkit:IconTintColorBehavior TintColor="{StaticResource Primary}"/>
|
|
</Image.Behaviors>
|
|
</Image>
|
|
<VerticalStackLayout Spacing="3">
|
|
<Label Text="Телефон" Style="{StaticResource CardMeta}"/>
|
|
<Label x:Name="PhoneLabel" Style="{StaticResource CardText}" TextColor="{StaticResource Gray900}"/>
|
|
</VerticalStackLayout>
|
|
</HorizontalStackLayout>
|
|
</Border>
|
|
|
|
</VerticalStackLayout>
|
|
|
|
<!-- Отделы -->
|
|
<VerticalStackLayout
|
|
Spacing="10"
|
|
x:Name="DepartmentsSection"
|
|
IsVisible="False">
|
|
|
|
<Label Text="Отделы" Style="{StaticResource SectionTitle}" Margin="5,0,0,0"/>
|
|
|
|
<Border Style="{StaticResource CardBorderLarge}">
|
|
<VerticalStackLayout
|
|
x:Name="DepartmentsContainer"
|
|
Spacing="5"/>
|
|
</Border>
|
|
|
|
</VerticalStackLayout>
|
|
|
|
<!-- Навыки -->
|
|
<VerticalStackLayout
|
|
Spacing="10"
|
|
x:Name="SkillsSection"
|
|
IsVisible="False">
|
|
|
|
<Label Text="Навыки" Style="{StaticResource SectionTitle}" Margin="5,0,0,0"/>
|
|
|
|
<Border Style="{StaticResource CardBorderLarge}">
|
|
<FlexLayout
|
|
x:Name="SkillsContainer"
|
|
Wrap="Wrap"
|
|
JustifyContent="Start"
|
|
AlignItems="Start"/>
|
|
</Border>
|
|
|
|
</VerticalStackLayout>
|
|
|
|
<!-- Индикатор загрузки -->
|
|
<ActivityIndicator
|
|
x:Name="LoadingIndicator"
|
|
IsRunning="False"
|
|
IsVisible="False"
|
|
Color="{StaticResource Primary}"
|
|
VerticalOptions="Center"
|
|
HorizontalOptions="Center"
|
|
Margin="0,50,0,0"/>
|
|
|
|
</VerticalStackLayout>
|
|
</ScrollView>
|
|
</Grid>
|
|
|
|
</ContentPage>
|