feat: implement core domain models, authentication service, and UI components for the attendance system
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
<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">
|
||||
|
||||
<Design.DataContext>
|
||||
<vm:AsistenciaViewModel />
|
||||
</Design.DataContext>
|
||||
|
||||
<ScrollViewer>
|
||||
<StackPanel Spacing="0" Margin="32,24">
|
||||
|
||||
<Button Content="Volver" Classes="secondary"
|
||||
HorizontalAlignment="Left"
|
||||
Command="{Binding VolverCommand}"
|
||||
Margin="0,0,0,16" />
|
||||
|
||||
<TextBlock Text="{Binding NombreCurso}" Classes="page-header" />
|
||||
|
||||
<Border Classes="card" Margin="0,0,0,20">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="{Binding InfoCurso}"
|
||||
FontSize="14" Foreground="{DynamicResource TextSecondary}" />
|
||||
|
||||
<TextBlock Text="{Binding MensajeEstado}"
|
||||
FontSize="13" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource PrimaryNavy}" />
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="8" Margin="0,8,0,0">
|
||||
<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>
|
||||
|
||||
<Grid ColumnDefinitions="*,Auto" Margin="0,0,0,16">
|
||||
<TextBlock Grid.Column="0"
|
||||
Classes="section-title"
|
||||
Text="Alumnos"
|
||||
VerticalAlignment="Center" />
|
||||
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" Spacing="16">
|
||||
<StackPanel Orientation="Horizontal" Spacing="4">
|
||||
<Border Background="{DynamicResource SuccessColor}"
|
||||
CornerRadius="4" Width="12" Height="12" />
|
||||
<TextBlock Text="{Binding Presentes}" FontSize="13"
|
||||
Foreground="{DynamicResource TextSecondary}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="4">
|
||||
<Border Background="{DynamicResource WarningColor}"
|
||||
CornerRadius="4" Width="12" Height="12" />
|
||||
<TextBlock Text="{Binding Tardanzas}" FontSize="13"
|
||||
Foreground="{DynamicResource TextSecondary}" />
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="4">
|
||||
<Border Background="{DynamicResource DangerColor}"
|
||||
CornerRadius="4" Width="12" Height="12" />
|
||||
<TextBlock Text="{Binding Ausentes}" FontSize="13"
|
||||
Foreground="{DynamicResource TextSecondary}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Border Classes="card" Padding="0">
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
|
||||
<Border Grid.Row="0" Background="{DynamicResource BackgroundSecondary}"
|
||||
CornerRadius="12,12,0,0" Padding="16,12">
|
||||
<Grid ColumnDefinitions="*,120">
|
||||
<TextBlock Grid.Column="0" Text="Alumno"
|
||||
FontSize="13" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextSecondary}" />
|
||||
<TextBlock Grid.Column="1" Text="Estado"
|
||||
FontSize="13" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextSecondary}"
|
||||
HorizontalAlignment="Center" />
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<ListBox Grid.Row="1"
|
||||
ItemsSource="{Binding Alumnos}"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Padding="0">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate x:DataType="vm:AlumnoAsistenciaViewModel">
|
||||
<Border Padding="16,12"
|
||||
BorderBrush="{DynamicResource BorderColor}"
|
||||
BorderThickness="0,0,0,1">
|
||||
<Grid ColumnDefinitions="*,120">
|
||||
<TextBlock Grid.Column="0"
|
||||
Text="{Binding NombreCompleto}"
|
||||
FontSize="14"
|
||||
VerticalAlignment="Center" />
|
||||
|
||||
<Button Grid.Column="1"
|
||||
HorizontalAlignment="Center"
|
||||
Command="{Binding $parent[ListBox].((vm:AsistenciaViewModel)DataContext).MarcarAlumnoCommand}"
|
||||
CommandParameter="{Binding}"
|
||||
Background="{Binding TipoAsistenciaColor}"
|
||||
CornerRadius="20"
|
||||
Padding="16,6"
|
||||
FontSize="13"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="White"
|
||||
BorderThickness="0"
|
||||
MinWidth="100">
|
||||
<TextBlock Text="{Binding TipoAsistenciaTexto}"
|
||||
Foreground="White" />
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<Border Classes="card" Margin="0,16,0,0"
|
||||
IsVisible="{Binding !Alumnos.Count}"
|
||||
Background="#FFF3CD">
|
||||
<TextBlock Text="No hay alumnos en este curso."
|
||||
FontSize="14" Foreground="#856404" />
|
||||
</Border>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user