Utopia-Canteen-System/Views/MealSchedulesView.xaml

752 lines
41 KiB
XML

<!--<UserControl x:Class="UtopiaCanteenSystem.Views.MealSchedulesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:UtopiaCanteenSystem.Converters">
<UserControl.Resources>
<converters:MealSessionToNameConverter x:Key="MealSessionConverter"/>
--><!-- Palette --><!--
<SolidColorBrush x:Key="PrimaryText" Color="#1F2933"/>
<SolidColorBrush x:Key="MutedText" Color="#718096"/>
<SolidColorBrush x:Key="PrimaryAccent" Color="#5BA3A0"/>
<SolidColorBrush x:Key="PrimaryAccentLight" Color="#E3F5F4"/>
<SolidColorBrush x:Key="BorderBrush" Color="#E2E8F0"/>
<SolidColorBrush x:Key="ErrorBrush" Color="#E53E3E"/>
<SolidColorBrush x:Key="CardBackground" Color="#FFFFFF"/>
--><!-- Card style --><!--
<Style x:Key="CardBorder" TargetType="Border">
<Setter Property="Background" Value="{StaticResource CardBackground}"/>
<Setter Property="CornerRadius" Value="16"/>
<Setter Property="Padding" Value="20"/>
<Setter Property="Margin" Value="0,0,0,18"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Effect">
<Setter.Value>
<DropShadowEffect BlurRadius="18"
ShadowDepth="0"
Opacity="0.08"
Color="#000000"/>
</Setter.Value>
</Setter>
</Style>
--><!-- Buttons --><!--
<Style x:Key="PrimaryButton" TargetType="Button">
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background" Value="{StaticResource PrimaryAccent}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Padding" Value="18,10"/>
<Setter Property="MinHeight" Value="36"/>
<Setter Property="MinWidth" Value="110"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="HorizontalAlignment" Value="Right"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="8"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="SecondaryButton" TargetType="Button">
<Setter Property="Foreground" Value="{StaticResource PrimaryText}"/>
<Setter Property="Background" Value="#FFFFFF"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="16,9"/>
<Setter Property="MinHeight" Value="36"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}"
CornerRadius="8"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="DangerButton" TargetType="Button" BasedOn="{StaticResource SecondaryButton}">
<Setter Property="Foreground" Value="#E53E3E"/>
<Setter Property="BorderBrush" Value="#FED7D7"/>
<Setter Property="Background" Value="#FFF5F5"/>
</Style>
--><!-- Back button: pill style with hover/pressed --><!--
<Style x:Key="BackButton" TargetType="Button" BasedOn="{StaticResource SecondaryButton}">
<Setter Property="Padding" Value="18,10"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Background" Value="#F7FAFC"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{StaticResource PrimaryText}"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="BackBtnBorder"
Background="{TemplateBinding Background}"
CornerRadius="20"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="←" FontSize="14" Margin="0,0,6,0" VerticalAlignment="Center"/>
<ContentPresenter VerticalAlignment="Center"/>
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BackBtnBorder" Property="Background" Value="#EDF2F7"/>
<Setter TargetName="BackBtnBorder" Property="BorderBrush" Value="{StaticResource PrimaryAccent}"/>
<Setter Property="Foreground" Value="{StaticResource PrimaryAccent}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="BackBtnBorder" Property="Background" Value="#E2E8F0"/>
<Setter TargetName="BackBtnBorder" Property="BorderBrush" Value="#CBD5E0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
--><!-- Small icon action buttons for DataGrid Actions column --><!--
<Style x:Key="GridActionButton" TargetType="Button">
<Setter Property="Width" Value="28"/>
<Setter Property="Height" Value="28"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Margin" Value="2,0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="BtnBorder"
Background="{TemplateBinding Background}"
CornerRadius="14"
BorderThickness="0">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="BtnBorder" Property="Background" Value="#E2E8F0"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="BtnBorder" Property="Background" Value="#CBD5E0"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="GridActionEditButton" TargetType="Button" BasedOn="{StaticResource GridActionButton}">
<Setter Property="Foreground" Value="{StaticResource PrimaryAccent}"/>
<Setter Property="ToolTip" Value="Edit"/>
</Style>
<Style x:Key="GridActionDeleteButton" TargetType="Button" BasedOn="{StaticResource GridActionButton}">
<Setter Property="Foreground" Value="{StaticResource ErrorBrush}"/>
<Setter Property="ToolTip" Value="Delete"/>
</Style>
--><!-- Inputs --><!--
<Style x:Key="ModernTextBox" TargetType="TextBox">
<Setter Property="Margin" Value="0"/>
<Setter Property="Padding" Value="10,8"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Background" Value="White"/>
<Setter Property="MinHeight" Value="34"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
</Style>
<Style x:Key="ModernComboBox" TargetType="ComboBox">
<Setter Property="Padding" Value="10,4"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Background" Value="White"/>
<Setter Property="MinHeight" Value="34"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
--><!-- DataGrid styling --><!--
<Style x:Key="ModernDataGrid" TargetType="DataGrid">
<Setter Property="AutoGenerateColumns" Value="False"/>
<Setter Property="CanUserAddRows" Value="False"/>
<Setter Property="CanUserDeleteRows" Value="False"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="HeadersVisibility" Value="Column"/>
<Setter Property="GridLinesVisibility" Value="None"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="RowBackground" Value="White"/>
<Setter Property="AlternatingRowBackground" Value="#F7FAFC"/>
<Setter Property="RowHeight" Value="44"/>
<Setter Property="ColumnHeaderHeight" Value="44"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="HorizontalGridLinesBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="ColumnHeaderStyle">
<Setter.Value>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#F7FAFC"/>
<Setter Property="Foreground" Value="{StaticResource MutedText}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="BorderThickness" Value="0,0,0,1"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="16,10"/>
</Style>
</Setter.Value>
</Setter>
<Setter Property="CellStyle">
<Setter.Value>
<Style TargetType="DataGridCell">
<Setter Property="Padding" Value="16,10"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridCell">
<Border Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="RowStyle">
<Setter.Value>
<Style TargetType="DataGridRow">
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="MinHeight" Value="44"/>
<Setter Property="BorderThickness" Value="0,0,0,1"/>
<Setter Property="BorderBrush" Value="#EDF2F7"/>
<Setter Property="Background" Value="White"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{StaticResource PrimaryAccentLight}"/>
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="#E0F2F1"/>
<Setter Property="BorderBrush" Value="{StaticResource PrimaryAccent}"/>
</Trigger>
</Style.Triggers>
</Style>
</Setter.Value>
</Setter>
</Style>
</UserControl.Resources>
<Grid Background="#F4F7FB">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
--><!-- HEADER BAR --><!--
<Grid Grid.Row="0" Margin="24,20,24,16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
--><!-- Back --><!--
<Button Grid.Column="0"
Command="{Binding BackCommand}"
Style="{StaticResource BackButton}"
Content="Back"/>
--><!-- Title + subtitle --><!--
<StackPanel Grid.Column="1" Margin="16,0,0,0" VerticalAlignment="Center">
<TextBlock Text="Meal Schedules"
FontSize="24"
FontWeight="SemiBold"
Foreground="{StaticResource PrimaryText}"/>
--><!--<TextBlock Text="(production hrms.meal_schedule)"
FontSize="13"
Foreground="{StaticResource MutedText}"
Margin="0,2,0,0"/>--><!--
</StackPanel>
--><!-- Site filter --><!--
<StackPanel Grid.Column="2"
Orientation="Horizontal"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Margin="0,0,16,0">
<TextBlock Text="Site"
VerticalAlignment="Center"
Margin="0,0,8,0"
Foreground="{StaticResource MutedText}"
FontSize="13"/>
<ComboBox ItemsSource="{Binding SiteFilterChoices}"
SelectedItem="{Binding SelectedSiteFilter, Mode=TwoWay}"
MinWidth="100"
Style="{StaticResource ModernComboBox}"/>
</StackPanel>
--><!-- Add New --><!--
<Button Grid.Column="3"
Command="{Binding AddNewCommand}"
Style="{StaticResource PrimaryButton}">
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="+" Margin="0,0,6,0" FontWeight="Bold"/>
<TextBlock Text="Add New"/>
</StackPanel>
</Button>
</Grid>
--><!-- MAIN CONTENT --><!--
<ScrollViewer Grid.Row="1"
Margin="24,0,24,16"
VerticalScrollBarVisibility="Auto">
<StackPanel>
--><!-- Schedules card --><!--
<Border Style="{StaticResource CardBorder}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
--><!-- Card header --><!--
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,12">
<StackPanel>
<TextBlock Text="Schedules"
FontSize="16"
FontWeight="SemiBold"
Foreground="{StaticResource PrimaryText}"/>
<TextBlock Text="Configured meal windows per site"
FontSize="12"
Foreground="{StaticResource MutedText}"/>
</StackPanel>
</StackPanel>
--><!-- DataGrid --><!--
<DataGrid Grid.Row="1"
Style="{StaticResource ModernDataGrid}"
ItemsSource="{Binding Schedules}"
SelectedItem="{Binding SelectedSchedule, Mode=TwoWay}">
<DataGrid.Columns>
<DataGridTextColumn Header="Site"
Binding="{Binding LocationSiteId}"
Width="*"/>
<DataGridTextColumn Header="Session"
Binding="{Binding MealName}"
Width="*"/>
<DataGridTextColumn Header="Start"
Binding="{Binding StartTime}"
Width="*"/>
<DataGridTextColumn Header="End"
Binding="{Binding EndTime}"
Width="*"/>
<DataGridTemplateColumn Header="Actions" Width="100" MinWidth="100">
<DataGridTemplateColumn.HeaderStyle>
<Style TargetType="DataGridColumnHeader">
<Setter Property="Background" Value="#F7FAFC"/>
<Setter Property="Foreground" Value="{StaticResource MutedText}"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="Padding" Value="16,10"/>
<Setter Property="HorizontalContentAlignment" Value="Right"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="0,0,0,1"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
</Style>
</DataGridTemplateColumn.HeaderStyle>
<DataGridTemplateColumn.CellStyle>
<Style TargetType="DataGridCell">
<Setter Property="Padding" Value="8,6"/>
<Setter Property="HorizontalContentAlignment" Value="Right"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="DataGridCell">
<Border Padding="{TemplateBinding Padding}" Background="{TemplateBinding Background}">
<ContentPresenter VerticalAlignment="Center" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DataGridTemplateColumn.CellStyle>
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
<Button Style="{StaticResource GridActionEditButton}"
Command="{Binding DataContext.SelectScheduleCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
CommandParameter="{Binding}"
Content="✎"
FontSize="12"/>
<Button Style="{StaticResource GridActionDeleteButton}"
Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=DataGrid}}"
CommandParameter="{Binding}"
Content="🗑"
FontSize="12"/>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Border>
--><!-- Add / Edit card --><!--
<Border Style="{StaticResource CardBorder}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
--><!-- Card header --><!--
<StackPanel Grid.Row="0" Orientation="Horizontal" Margin="0,0,0,16">
<StackPanel>
<TextBlock Text="Add or Edit Meal Schedule"
FontSize="16"
FontWeight="SemiBold"
Foreground="{StaticResource PrimaryText}"/>
</StackPanel>
</StackPanel>
--><!-- Form --><!--
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
--><!-- Left column --><!--
<StackPanel Grid.Column="0" Margin="0,0,16,0">
--><!-- Location Site ID --><!--
<StackPanel Margin="0,0,0,12">
<TextBlock Text="Location Site ID"
FontSize="12"
Foreground="{StaticResource MutedText}"
Margin="0,0,0,4"/>
<TextBox Text="{Binding LocationSiteId, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource ModernTextBox}"/>
</StackPanel>
--><!-- Meal Session --><!--
<StackPanel Margin="0,0,0,12">
<TextBlock Text="Meal Session"
FontSize="12"
Foreground="{StaticResource MutedText}"
Margin="0,0,0,4"/>
<TextBox Text="{Binding MealName, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource ModernTextBox}"/>
</StackPanel>
</StackPanel>
--><!-- Right column --><!--
<StackPanel Grid.Column="1" Margin="0,0,0,0">
--><!-- Start time --><!--
<StackPanel Margin="0,0,0,12">
<TextBlock Text="Start (HH:mm:ss)"
FontSize="12"
Foreground="{StaticResource MutedText}"
Margin="0,0,0,4"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0"
Text="{Binding StartTime, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource ModernTextBox}"
Margin="0"/>
<TextBlock Grid.Column="1"
Text="🕒"
Margin="6,0,4,0"
VerticalAlignment="Center"
Foreground="{StaticResource MutedText}"/>
</Grid>
</StackPanel>
--><!-- End time --><!--
<StackPanel Margin="0,0,0,12">
<TextBlock Text="End (HH:mm:ss)"
FontSize="12"
Foreground="{StaticResource MutedText}"
Margin="0,0,0,4"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox Grid.Column="0"
Text="{Binding EndTime, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource ModernTextBox}"
Margin="0"/>
<TextBlock Grid.Column="1"
Text="🕒"
Margin="6,0,4,0"
VerticalAlignment="Center"
Foreground="{StaticResource MutedText}"/>
</Grid>
</StackPanel>
</StackPanel>
</Grid>
--><!-- Buttons --><!--
<StackPanel Grid.Row="2"
Orientation="Horizontal"
HorizontalAlignment="Right"
Margin="0,18,0,0">
<Button Content="Add New"
Command="{Binding AddNewCommand}"
Style="{StaticResource SecondaryButton}"
Margin="0,0,8,0"/>
<Button Content="Save"
Command="{Binding SaveCommand}"
Style="{StaticResource PrimaryButton}"
Margin="0,0,8,0"/>
<Button Content="Delete"
Command="{Binding DeleteCommand}"
Style="{StaticResource DangerButton}"/>
</StackPanel>
</Grid>
</Border>
</StackPanel>
</ScrollViewer>
--><!-- Message --><!--
<Border Grid.Row="2"
Margin="24,0,24,20"
Background="Transparent">
<TextBlock Text="{Binding Message}"
FontSize="14">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource PrimaryText}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsError}" Value="True">
<Setter Property="Foreground" Value="{StaticResource ErrorBrush}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Message}" Value="">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Border>
</Grid>
</UserControl>-->
<UserControl x:Class="UtopiaCanteenSystem.Views.MealSchedulesView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:UtopiaCanteenSystem.Converters">
<UserControl.Resources>
<converters:MealSessionToNameConverter x:Key="MealSessionConverter"/>
<SolidColorBrush x:Key="PrimaryText" Color="#1F2933"/>
<SolidColorBrush x:Key="MutedText" Color="#718096"/>
<SolidColorBrush x:Key="PrimaryAccent" Color="#5BA3A0"/>
<SolidColorBrush x:Key="PrimaryAccentLight" Color="#E3F5F4"/>
<SolidColorBrush x:Key="BorderBrush" Color="#E2E8F0"/>
<SolidColorBrush x:Key="ErrorBrush" Color="#E53E3E"/>
<SolidColorBrush x:Key="CardBackground" Color="#FFFFFF"/>
<Style x:Key="CardBorder" TargetType="Border">
<Setter Property="Background" Value="{StaticResource CardBackground}"/>
<Setter Property="CornerRadius" Value="16"/>
<Setter Property="Padding" Value="20"/>
<Setter Property="Margin" Value="0,0,0,18"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style x:Key="SecondaryButton" TargetType="Button">
<Setter Property="Foreground" Value="{StaticResource PrimaryText}"/>
<Setter Property="Background" Value="#FFFFFF"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="16,9"/>
<Setter Property="MinHeight" Value="36"/>
<Setter Property="MinWidth" Value="100"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Cursor" Value="Hand"/>
</Style>
<Style x:Key="BackButton" TargetType="Button" BasedOn="{StaticResource SecondaryButton}">
<Setter Property="Padding" Value="18,10"/>
<Setter Property="MinWidth" Value="100"/>
</Style>
<Style x:Key="ModernComboBox" TargetType="ComboBox">
<Setter Property="Padding" Value="10,4"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Background" Value="White"/>
<Setter Property="MinHeight" Value="34"/>
</Style>
<Style x:Key="ModernDataGrid" TargetType="DataGrid">
<Setter Property="AutoGenerateColumns" Value="False"/>
<Setter Property="CanUserAddRows" Value="False"/>
<Setter Property="CanUserDeleteRows" Value="False"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="HeadersVisibility" Value="Column"/>
<Setter Property="GridLinesVisibility" Value="None"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="RowBackground" Value="White"/>
<Setter Property="AlternatingRowBackground" Value="#F7FAFC"/>
<Setter Property="RowHeight" Value="44"/>
<Setter Property="ColumnHeaderHeight" Value="44"/>
</Style>
</UserControl.Resources>
<Grid Background="#F4F7FB">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- Header -->
<Grid Grid.Row="0" Margin="24,20,24,16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Button Grid.Column="0"
Command="{Binding BackCommand}"
Style="{StaticResource BackButton}"
Content="← Back"/>
<StackPanel Grid.Column="1" Margin="16,0,0,0" VerticalAlignment="Center">
<TextBlock Text="Meal Schedules"
FontSize="24"
FontWeight="SemiBold"
Foreground="{StaticResource PrimaryText}"/>
</StackPanel>
<StackPanel Grid.Column="2"
Orientation="Horizontal"
HorizontalAlignment="Right"
VerticalAlignment="Center">
<TextBlock Text="Site"
VerticalAlignment="Center"
Margin="0,0,8,0"
Foreground="{StaticResource MutedText}"
FontSize="13"/>
<ComboBox ItemsSource="{Binding SiteFilterChoices}"
SelectedItem="{Binding SelectedSiteFilter, Mode=TwoWay}"
MinWidth="100"
Style="{StaticResource ModernComboBox}"/>
</StackPanel>
</Grid>
<!-- Content -->
<ScrollViewer Grid.Row="1"
Margin="24,0,24,16"
VerticalScrollBarVisibility="Auto">
<StackPanel>
<Border Style="{StaticResource CardBorder}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Margin="0,0,0,12">
<TextBlock Text="Meal Schedules"
FontSize="16"
FontWeight="SemiBold"
Foreground="{StaticResource PrimaryText}"/>
<TextBlock Text="View-only mode - configured meal windows per site"
FontSize="12"
Foreground="{StaticResource MutedText}"/>
</StackPanel>
<DataGrid Grid.Row="1"
Style="{StaticResource ModernDataGrid}"
ItemsSource="{Binding Schedules}"
SelectedItem="{Binding SelectedSchedule, Mode=TwoWay}">
<DataGrid.Columns>
<DataGridTextColumn Header="Site"
Binding="{Binding LocationSiteId}"
Width="*"/>
<DataGridTextColumn Header="Session"
Binding="{Binding MealName}"
Width="*"/>
<DataGridTextColumn Header="Start Time"
Binding="{Binding StartTime}"
Width="*"/>
<DataGridTextColumn Header="End Time"
Binding="{Binding EndTime}"
Width="*"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Border>
</StackPanel>
</ScrollViewer>
<!-- Message -->
<Border Grid.Row="2"
Margin="24,0,24,20"
Background="Transparent">
<TextBlock Text="{Binding Message}" FontSize="14">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource PrimaryText}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsError}" Value="True">
<Setter Property="Foreground" Value="{StaticResource ErrorBrush}"/>
</DataTrigger>
<DataTrigger Binding="{Binding Message}" Value="">
<Setter Property="Visibility" Value="Collapsed"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</Border>
</Grid>
</UserControl>