-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor customer scheduling process and UI improvements
- Updated EditCustomersView and AddCustomersView with adjusted font size and weight for improved visibility and refined user interface. - Extended observable collections in AppointmentViewModel for better data management. - Added functionalities in DialogService to create a selection dialog, aiding proper customer selection. - Inserted a new AppointmentCustomerSelectionListCardTemplate view for better customer selection in appointments. - Developed a new SelectCustomerView to facilitate customer selection during appointment booking, enhancing user experience and system functionality. Signed-off-by: Russell Camo <[email protected]>
- Loading branch information
Showing
16 changed files
with
368 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<russkyc:ModernWindow | ||
x:Class="GroomWise.Views.Dialogs.SelectCustomerView" | ||
xmlns="http:https://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http:https://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:b="http:https://schemas.microsoft.com/xaml/behaviors" | ||
xmlns:d="http:https://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http:https://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:russkyc="clr-namespace:org.russkyc.moderncontrols;assembly=Russkyc.ModernControls.WPF" | ||
xmlns:templates="clr-namespace:GroomWise.Views.Templates" | ||
xmlns:viewModels="clr-namespace:GroomWise.Application.ViewModels;assembly=GroomWise.Application" | ||
Title="AddCustomersView" | ||
Width="600" | ||
Height="400" | ||
d:DataContext="{d:DesignInstance viewModels:AppointmentViewModel, | ||
IsDesignTimeCreatable=True}" | ||
FocusManager.FocusedElement="{Binding ElementName=FullNameTextBox}" | ||
NoDecorations="True" | ||
ResizeMode="NoResize" | ||
SizeToContent="Height" | ||
TitleBarHeight="0" | ||
WindowStartupLocation="CenterOwner" | ||
mc:Ignorable="d"> | ||
<Grid Margin="16" Style="{StaticResource FadeInAnimation}"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="*" /> | ||
<RowDefinition Height="Auto" /> | ||
</Grid.RowDefinitions> | ||
<TextBlock | ||
Grid.Row="0" | ||
Margin="0,0,0,12" | ||
FontSize="18" | ||
FontWeight="Medium" | ||
Text="Select Customer" /> | ||
<ItemsControl Grid.Row="1" ItemsSource="{Binding Customers.EditableCollectionView, UpdateSourceTrigger=PropertyChanged}"> | ||
<ItemsControl.ItemTemplate> | ||
<DataTemplate> | ||
<templates:AppointmentCustomerSelectionListCardTemplate /> | ||
</DataTemplate> | ||
</ItemsControl.ItemTemplate> | ||
|
||
<ItemsControl.ItemsPanel> | ||
<ItemsPanelTemplate> | ||
<VirtualizingStackPanel IsVirtualizing="True" VirtualizationMode="Recycling" /> | ||
</ItemsPanelTemplate> | ||
</ItemsControl.ItemsPanel> | ||
|
||
<ItemsControl.ItemContainerStyle> | ||
<Style TargetType="{x:Type FrameworkElement}"> | ||
<Setter Property="Margin" Value="0,0,0,10" /> | ||
</Style> | ||
</ItemsControl.ItemContainerStyle> | ||
|
||
<ItemsControl.Template> | ||
<ControlTemplate TargetType="ItemsControl"> | ||
<Border | ||
Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}"> | ||
<ScrollViewer | ||
Padding="{TemplateBinding Padding}" | ||
CanContentScroll="True" | ||
Focusable="False"> | ||
<ItemsPresenter /> | ||
</ScrollViewer> | ||
</Border> | ||
</ControlTemplate> | ||
</ItemsControl.Template> | ||
</ItemsControl> | ||
<russkyc:ModernButton | ||
Grid.Row="2" | ||
HorizontalAlignment="Right" | ||
Content="Cancel" | ||
CornerRadius="5" | ||
DefaultBackground="{DynamicResource bg-000}" | ||
FontWeight="Medium" | ||
Foreground="{DynamicResource fg-600}" | ||
HoverBackground="{DynamicResource bg-000}" | ||
PressedBackground="{DynamicResource bg-100}"> | ||
<b:Interaction.Triggers> | ||
<b:EventTrigger EventName="Click"> | ||
<b:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=russkyc:ModernWindow}}" /> | ||
</b:EventTrigger> | ||
</b:Interaction.Triggers> | ||
</russkyc:ModernButton> | ||
</Grid> | ||
</russkyc:ModernWindow> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright (C) 2023 Russell Camo (Russkyc).- All Rights Reserved | ||
// | ||
// Unauthorized copying or redistribution of all files, in source and binary forms via any medium | ||
// without written, signed consent from the author is strictly prohibited. | ||
|
||
using System; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
|
||
namespace GroomWise.Views.Dialogs; | ||
|
||
public partial class SelectCustomerView | ||
{ | ||
public SelectCustomerView(object vm) | ||
{ | ||
DataContext = vm; | ||
InitializeComponent(); | ||
} | ||
|
||
protected override void OnClosing(CancelEventArgs e) | ||
{ | ||
var parent = App.Current.Windows.OfType<MainView>().FirstOrDefault(); | ||
parent.Focus(); | ||
base.OnClosing(e); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.