-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement service management functionality
Signed-off-by: Russell Camo <32549126+russkyc@users.noreply.github.com>
- Loading branch information
Showing
9 changed files
with
299 additions
and
120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
<russkyc:ModernWindow | ||
x:Class="GroomWise.Views.Dialogs.AddServicesView" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:russkyc="clr-namespace:org.russkyc.moderncontrols;assembly=Russkyc.ModernControls.WPF" | ||
xmlns:viewModels="clr-namespace:GroomWise.Application.ViewModels;assembly=GroomWise.Application" | ||
xmlns:wpf="clr-namespace:Material.Icons.WPF;assembly=Material.Icons.WPF" | ||
Title="AddServicesView" | ||
Width="600" | ||
d:DataContext="{d:DesignInstance viewModels:GroomingServiceViewModel, | ||
IsDesignTimeCreatable=True}" | ||
FocusManager.FocusedElement="{Binding ElementName=ServiceNameBox}" | ||
NoDecorations="True" | ||
ResizeMode="NoResize" | ||
SizeToContent="Height" | ||
TitleBarHeight="0" | ||
WindowStartupLocation="CenterOwner" | ||
mc:Ignorable="d"> | ||
<Grid Style="{StaticResource FadeInAnimation}"> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="Auto" /> | ||
<RowDefinition Height="*" /> | ||
</Grid.RowDefinitions> | ||
<TextBlock | ||
Grid.Row="0" | ||
Grid.Column="0" | ||
Margin="20,16,0,12" | ||
HorizontalAlignment="Left" | ||
FontSize="16" | ||
Text="New GroomingService" /> | ||
<StackPanel | ||
Grid.Row="1" | ||
Margin="20,0,16,20" | ||
HorizontalAlignment="Stretch" | ||
VerticalAlignment="Top"> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="350" /> | ||
<ColumnDefinition /> | ||
</Grid.ColumnDefinitions> | ||
<russkyc:ModernTextBox | ||
Name="ServiceNameBox" | ||
Grid.Column="0" | ||
Margin="0,0,0,0" | ||
CornerRadius="5" | ||
HelperText="Max Length (200)" | ||
Placeholder="Service Name" | ||
Text="{Binding ActiveGroomingService.Type, UpdateSourceTrigger=PropertyChanged}" /> | ||
<russkyc:ModernTextBox | ||
Grid.Column="1" | ||
Margin="12,0,0,0" | ||
CornerRadius="5" | ||
HelperText="Max Length (200)" | ||
Placeholder="Service Info" | ||
Text="{Binding ActiveCustomer.ContactNumber, UpdateSourceTrigger=PropertyChanged}" /> | ||
|
||
</Grid> | ||
<Grid Margin="0,12,0,0"> | ||
<russkyc:ModernTextBox | ||
Margin="0,0,0,0" | ||
AcceptsReturn="True" | ||
CornerRadius="5" | ||
HelperText="Max Length (200)" | ||
Placeholder="Description" | ||
Text="{Binding ActiveGroomingService.Description, UpdateSourceTrigger=PropertyChanged}" /> | ||
</Grid> | ||
|
||
<StackPanel | ||
Margin="0,24,0,0" | ||
HorizontalAlignment="Right" | ||
Orientation="Horizontal"> | ||
<russkyc:ModernButton | ||
Margin="0,0,12,0" | ||
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> | ||
<russkyc:ModernButton | ||
HorizontalAlignment="Right" | ||
Command="{Binding SaveServiceCommand}" | ||
Content="Save Service" | ||
CornerRadius="5" | ||
FontWeight="Medium" | ||
LeftCenterIcon="{wpf:MaterialIconExt Kind=ContentSave}" /> | ||
</StackPanel> | ||
</StackPanel> | ||
</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,25 @@ | ||
// 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.ComponentModel; | ||
using System.Linq; | ||
|
||
namespace GroomWise.Views.Dialogs; | ||
|
||
public partial class AddServicesView | ||
{ | ||
public AddServicesView(object vm) | ||
{ | ||
DataContext = vm; | ||
InitializeComponent(); | ||
} | ||
|
||
protected override void OnClosing(CancelEventArgs e) | ||
{ | ||
var parent = App.Current.Windows.OfType<MainView>().FirstOrDefault(); | ||
parent.Focus(); | ||
base.OnClosing(e); | ||
} | ||
} |
Oops, something went wrong.