115 lines
5.9 KiB
XML
115 lines
5.9 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:Asistencia.ViewModels"
|
|
x:Class="Asistencia.Views.AsistenciaView"
|
|
x:DataType="vm:AsistenciaViewModel">
|
|
|
|
<ScrollViewer>
|
|
<StackPanel Spacing="0" Margin="32,24" MaxWidth="500">
|
|
|
|
<Button Content="Volver" Classes="secondary"
|
|
HorizontalAlignment="Left"
|
|
Command="{Binding VolverCommand}"
|
|
Margin="0,0,0,16" />
|
|
|
|
<TextBlock Text="Tomar Asistencia" Classes="page-header" />
|
|
|
|
<Border Classes="card" Margin="0,0,0,16">
|
|
<StackPanel Spacing="12">
|
|
<TextBlock Text="ID Curso Abierto" FontSize="13" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextPrimary}" />
|
|
<TextBox PlaceholderText="Ej: 16451"
|
|
Text="{Binding InputCursoAbierto}"
|
|
FontSize="14" />
|
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
|
<Button Content="Iniciar Sesion" Classes="success"
|
|
Command="{Binding IniciarSesionCommand}"
|
|
IsVisible="{Binding !EnSesion}" />
|
|
<Button Content="Finalizar Sesion" Classes="danger"
|
|
Command="{Binding FinalizarSesionCommand}"
|
|
IsVisible="{Binding EnSesion}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<Border Classes="card" Margin="0,0,0,16"
|
|
IsVisible="{Binding EnSesion}">
|
|
<StackPanel Spacing="12">
|
|
<TextBlock Text="RUT Alumno" FontSize="13" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextPrimary}" />
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<TextBox Grid.Column="0"
|
|
PlaceholderText="Ej: 11111111-1"
|
|
Text="{Binding InputRutAlumno}"
|
|
FontSize="14"
|
|
KeyDown="OnRutAlumnoKeyDown" />
|
|
<Button Grid.Column="1"
|
|
Content="+"
|
|
Classes="primary"
|
|
Command="{Binding AgregarAlumnoCommand}"
|
|
Margin="8,0,0,0"
|
|
Width="40" Height="40"
|
|
FontSize="18" FontWeight="Bold" />
|
|
</Grid>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<TextBlock Text="{Binding MensajeEstado}"
|
|
FontSize="13" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource PrimaryNavy}"
|
|
Margin="0,0,0,12"
|
|
IsVisible="{Binding !HasError}" />
|
|
|
|
<TextBlock Text="{Binding MensajeError}"
|
|
FontSize="13"
|
|
Foreground="{DynamicResource DangerColor}"
|
|
Margin="0,0,0,12"
|
|
IsVisible="{Binding HasError}" />
|
|
|
|
<Border Classes="card" Padding="0"
|
|
IsVisible="{Binding EnSesion}">
|
|
<StackPanel>
|
|
<Border Background="{DynamicResource BackgroundSecondary}"
|
|
CornerRadius="12,12,0,0" Padding="16,12">
|
|
<TextBlock Text="Alumnos Presentes"
|
|
FontSize="13" FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextSecondary}" />
|
|
</Border>
|
|
<ListBox ItemsSource="{Binding AlumnosPresentes}"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
Padding="0"
|
|
MaxHeight="300">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:AlumnoPresenteViewModel">
|
|
<Border Padding="16,10"
|
|
BorderBrush="{DynamicResource BorderColor}"
|
|
BorderThickness="0,0,0,1">
|
|
<Grid ColumnDefinitions="Auto,*">
|
|
<Border Grid.Column="0"
|
|
Background="{DynamicResource SuccessColor}"
|
|
CornerRadius="12" Padding="10,4"
|
|
VerticalAlignment="Center">
|
|
<TextBlock Text="P" Foreground="White"
|
|
FontSize="12" FontWeight="Bold" />
|
|
</Border>
|
|
<StackPanel Grid.Column="1" Margin="12,0,0,0"
|
|
VerticalAlignment="Center">
|
|
<TextBlock Text="{Binding NombreCompleto}"
|
|
FontSize="14" FontWeight="SemiBold" />
|
|
<TextBlock Text="{Binding IdAlumno}"
|
|
FontSize="12"
|
|
Foreground="{DynamicResource TextSecondary}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
</UserControl>
|