From d8fb1c11ec38f5155b447e13d2503511dee79278 Mon Sep 17 00:00:00 2001 From: Russell Camo <32549126+russkyc@users.noreply.github.com> Date: Fri, 1 Sep 2023 17:04:05 +0800 Subject: [PATCH] feat: update collections to List, add AboutView and DeleteCustomerEvent Signed-off-by: Russell Camo <32549126+russkyc@users.noreply.github.com> --- .../Events/CreateCustomerEvent.cs | 8 + .../Events/DeleteCustomerEvent.cs | 8 + .../Events/DeleteGroomingServiceEvent.cs | 8 + .../Mappers/AppointmentMapper.cs | 30 +- .../Mappers/CustomerMapper.cs | 12 +- .../ViewModels/AboutViewModel.cs | 14 + .../ViewModels/AppViewModel.cs | 9 + .../ViewModels/AppointmentViewModel.cs | 9 +- .../ViewModels/CustomerViewModel.cs | 20 +- .../ViewModels/DashboardViewModel.cs | 11 +- .../ViewModels/GroomingServiceViewModel.cs | 22 + .../ViewModels/LoginViewModel.cs | 2 + .../ViewModels/PetViewModel.cs | 50 +- GroomWise.Domain/Entities/Customer.cs | 4 +- GroomWise.WPF/GroomWise.WPF.csproj | 3 - GroomWise.WPF/Views/Dialogs/LoginView.xaml | 2 +- GroomWise.WPF/Views/MainView.xaml | 26 +- GroomWise.WPF/Views/Pages/AboutView.xaml | 76 ++ GroomWise.WPF/Views/Pages/AboutView.xaml.cs | 16 + .../Views/Pages/AppointmentsView.xaml | 3 +- GroomWise.WPF/Views/Pages/CustomersView.xaml | 12 +- GroomWise.WPF/Views/Pages/DashboardView.xaml | 903 +++++++++--------- GroomWise.WPF/Views/Pages/EmployeesView.xaml | 3 +- GroomWise.WPF/Views/Pages/PetsView.xaml | 77 +- GroomWise.WPF/Views/Pages/ServicesView.xaml | 59 +- GroomWise.WPF/Views/Pages/SettingsView.xaml | 5 +- .../Templates/AppNotificationTemplate.xaml | 87 ++ .../Templates/AppNotificationTemplate.xaml.cs | 16 + .../Templates/CustomerListCardTemplate.xaml | 17 +- .../Views/Templates/PetListCardTemplate.xaml | 79 ++ .../Templates/PetListCardTemplate.xaml.cs | 16 + .../Templates/ServiceListCardTemplate.xaml | 17 +- GroomWise.WPF/appconfig.json | 3 +- 33 files changed, 1098 insertions(+), 529 deletions(-) create mode 100644 GroomWise.Application/Events/CreateCustomerEvent.cs create mode 100644 GroomWise.Application/Events/DeleteCustomerEvent.cs create mode 100644 GroomWise.Application/Events/DeleteGroomingServiceEvent.cs create mode 100644 GroomWise.Application/ViewModels/AboutViewModel.cs create mode 100644 GroomWise.WPF/Views/Pages/AboutView.xaml create mode 100644 GroomWise.WPF/Views/Pages/AboutView.xaml.cs create mode 100644 GroomWise.WPF/Views/Templates/AppNotificationTemplate.xaml create mode 100644 GroomWise.WPF/Views/Templates/AppNotificationTemplate.xaml.cs create mode 100644 GroomWise.WPF/Views/Templates/PetListCardTemplate.xaml create mode 100644 GroomWise.WPF/Views/Templates/PetListCardTemplate.xaml.cs diff --git a/GroomWise.Application/Events/CreateCustomerEvent.cs b/GroomWise.Application/Events/CreateCustomerEvent.cs new file mode 100644 index 0000000..1a867a6 --- /dev/null +++ b/GroomWise.Application/Events/CreateCustomerEvent.cs @@ -0,0 +1,8 @@ +// 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. + +namespace GroomWise.Application.Events; + +public record CreateCustomerEvent(); \ No newline at end of file diff --git a/GroomWise.Application/Events/DeleteCustomerEvent.cs b/GroomWise.Application/Events/DeleteCustomerEvent.cs new file mode 100644 index 0000000..a7331ed --- /dev/null +++ b/GroomWise.Application/Events/DeleteCustomerEvent.cs @@ -0,0 +1,8 @@ +// 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. + +namespace GroomWise.Application.Events; + +public record DeleteCustomerEvent(); \ No newline at end of file diff --git a/GroomWise.Application/Events/DeleteGroomingServiceEvent.cs b/GroomWise.Application/Events/DeleteGroomingServiceEvent.cs new file mode 100644 index 0000000..c80cc9f --- /dev/null +++ b/GroomWise.Application/Events/DeleteGroomingServiceEvent.cs @@ -0,0 +1,8 @@ +// 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. + +namespace GroomWise.Application.Events; + +public record DeleteGroomingServiceEvent(); \ No newline at end of file diff --git a/GroomWise.Application/Mappers/AppointmentMapper.cs b/GroomWise.Application/Mappers/AppointmentMapper.cs index 19d4dca..85348ec 100644 --- a/GroomWise.Application/Mappers/AppointmentMapper.cs +++ b/GroomWise.Application/Mappers/AppointmentMapper.cs @@ -13,9 +13,10 @@ public static class AppointmentMapper { public static ObservableAppointment ToObservable(this Appointment appointment) { - TypeAdapterConfig - .NewConfig() - .Map( + var config = TypeAdapterConfig.NewConfig(); + if (appointment.Services is not null) + { + config.Map( dest => dest.Services, src => src.Services @@ -27,13 +28,26 @@ public static ObservableAppointment ToObservable(this Appointment appointment) } ) .ToList() - ) - .Map( + ); + } + + if (appointment.Employees is not null) + { + config.Map( dest => dest.Employees, src => src.Employees.Select(employee => employee.ToObservable()).ToList() - ) - .Map(dest => dest.Customer, src => src.Customer.ToObservable()) - .Map(dest => dest.Pet, src => src.Pet.ToObservable()); + ); + } + + if (appointment.Customer is not null) + { + config.Map(dest => dest.Customer, src => src.Customer.ToObservable()); + } + + if (appointment.Pet is not null) + { + config.Map(dest => dest.Pet, src => src.Pet.ToObservable()); + } return appointment.Adapt(); } diff --git a/GroomWise.Application/Mappers/CustomerMapper.cs b/GroomWise.Application/Mappers/CustomerMapper.cs index 5d1d90d..3a4783b 100644 --- a/GroomWise.Application/Mappers/CustomerMapper.cs +++ b/GroomWise.Application/Mappers/CustomerMapper.cs @@ -6,7 +6,6 @@ using GroomWise.Application.Observables; using GroomWise.Domain.Entities; using Mapster; -using Swordfish.NET.Collections; namespace GroomWise.Application.Mappers; @@ -14,6 +13,17 @@ public static class CustomerMapper { public static ObservableCustomer ToObservable(this Customer customer) { + var mapper = TypeAdapterConfig.NewConfig(); + + mapper.Map(dest => dest.Pets, src => src.Pets!.Select(pet => pet.ToObservable()).ToList()); + + if (customer.Appointments is not null) + { + mapper.Map( + dest => dest.Appointments, + src => src.Appointments!.Select(appointment => appointment.ToObservable()).ToList() + ); + } return customer.Adapt(); } diff --git a/GroomWise.Application/ViewModels/AboutViewModel.cs b/GroomWise.Application/ViewModels/AboutViewModel.cs new file mode 100644 index 0000000..9fbcc48 --- /dev/null +++ b/GroomWise.Application/ViewModels/AboutViewModel.cs @@ -0,0 +1,14 @@ +// 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 Injectio.Attributes; +using MvvmGen; + +namespace GroomWise.Application.ViewModels; + +[ViewModel] +[ViewModelGenerateInterface] +[RegisterSingleton] +public partial class AboutViewModel { } diff --git a/GroomWise.Application/ViewModels/AppViewModel.cs b/GroomWise.Application/ViewModels/AppViewModel.cs index 0e2661b..ff225e4 100644 --- a/GroomWise.Application/ViewModels/AppViewModel.cs +++ b/GroomWise.Application/ViewModels/AppViewModel.cs @@ -118,6 +118,15 @@ private async Task SetColorTheme(object param) }); } + [Command] + private async Task RemoveNotification(object param) + { + if (param is ObservableNotification notification) + { + Notifications.Remove(notification); + } + } + public void OnEvent(PublishNotificationEvent eventData) { Notifications.Add( diff --git a/GroomWise.Application/ViewModels/AppointmentViewModel.cs b/GroomWise.Application/ViewModels/AppointmentViewModel.cs index 1ea3c8f..0b848ee 100644 --- a/GroomWise.Application/ViewModels/AppointmentViewModel.cs +++ b/GroomWise.Application/ViewModels/AppointmentViewModel.cs @@ -27,7 +27,9 @@ namespace GroomWise.Application.ViewModels; [Inject(typeof(INavigationService))] [Inject(typeof(GroomWiseDbContext))] [RegisterSingleton] -public partial class AppointmentViewModel : IEventSubscriber +public partial class AppointmentViewModel + : IEventSubscriber, + IEventSubscriber { [Property] private ObservableAppointment _activeAppointment; @@ -122,4 +124,9 @@ public void OnEvent(CreateGroomingServiceEvent eventData) { PopulateCollections(); } + + public void OnEvent(DeleteGroomingServiceEvent eventData) + { + PopulateCollections(); + } } diff --git a/GroomWise.Application/ViewModels/CustomerViewModel.cs b/GroomWise.Application/ViewModels/CustomerViewModel.cs index 811915f..ee0df78 100644 --- a/GroomWise.Application/ViewModels/CustomerViewModel.cs +++ b/GroomWise.Application/ViewModels/CustomerViewModel.cs @@ -3,11 +3,9 @@ // 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.Collections.ObjectModel; using GroomWise.Application.Events; using GroomWise.Application.Mappers; using GroomWise.Application.Observables; -using GroomWise.Domain.Entities; using GroomWise.Domain.Enums; using GroomWise.Infrastructure.Database; using GroomWise.Infrastructure.Logging.Interfaces; @@ -89,6 +87,7 @@ private async Task SaveCustomer() var customer = ActiveCustomer.ToEntity(); GroomWiseDbContext.Customers.Insert(customer); DialogService.CloseDialogs(NavigationService); + EventAggregator.Publish(new CreateCustomerEvent()); EventAggregator.Publish( new PublishNotificationEvent( $"Customer {ActiveCustomer.FullName} added.", @@ -132,11 +131,24 @@ private async Task UpdateCustomer(object param) } [Command] - private async Task DeleteCustomer(object param) + private async Task RemoveCustomer(object param) { if (param is ObservableCustomer observableCustomer) { - await Task.Run(() => GroomWiseDbContext.Customers.Delete(observableCustomer.Id)); + await Task.Run(() => + { + var dialogResult = DialogService.Create( + "Customers", + $"Are you sure you want to delete {observableCustomer.FullName}?", + NavigationService + ); + if (dialogResult is true) + { + GroomWiseDbContext.Customers.Delete(observableCustomer.Id); + EventAggregator.Publish(new DeleteCustomerEvent()); + PopulateCollections(); + } + }); } } diff --git a/GroomWise.Application/ViewModels/DashboardViewModel.cs b/GroomWise.Application/ViewModels/DashboardViewModel.cs index cb56a3b..86d7421 100644 --- a/GroomWise.Application/ViewModels/DashboardViewModel.cs +++ b/GroomWise.Application/ViewModels/DashboardViewModel.cs @@ -19,7 +19,9 @@ namespace GroomWise.Application.ViewModels; [RegisterSingleton] [Inject(typeof(IAuthenticationService))] [Inject(typeof(GroomWiseDbContext))] -public partial class DashboardViewModel : IEventSubscriber +public partial class DashboardViewModel + : IEventSubscriber, + IEventSubscriber { [Property] private ConcurrentObservableCollection _appointments; @@ -37,7 +39,7 @@ private async void PopulateCollections() await Task.Run(() => { var appointments = GroomWiseDbContext.Appointments - .GetMultiple(appointment => appointment.Date == DateTime.Today) + .GetMultiple(appointment => appointment.Date == DateTime.Now) .Select(AppointmentMapper.ToObservable) .OrderBy(appointment => appointment.Date); Appointments = new ConcurrentObservableCollection(appointments); @@ -48,4 +50,9 @@ public void OnEvent(LoginEvent eventData) { User = AuthenticationService.GetSession()?.FirstName!; } + + public void OnEvent(CreateAppointmentEvent eventData) + { + PopulateCollections(); + } } diff --git a/GroomWise.Application/ViewModels/GroomingServiceViewModel.cs b/GroomWise.Application/ViewModels/GroomingServiceViewModel.cs index 86b64a7..4855958 100644 --- a/GroomWise.Application/ViewModels/GroomingServiceViewModel.cs +++ b/GroomWise.Application/ViewModels/GroomingServiceViewModel.cs @@ -95,4 +95,26 @@ private async Task SaveService() } }); } + + [Command] + private async Task RemoveService(object param) + { + if (param is ObservableGroomingService observableGroomingService) + { + await Task.Run(() => + { + var dialogResult = DialogService.Create( + "Services", + $"Are you sure you want to delete {observableGroomingService.Type}?", + NavigationService + ); + if (dialogResult is true) + { + GroomWiseDbContext.GroomingServices.Delete(observableGroomingService.Id); + EventAggregator.Publish(new DeleteGroomingServiceEvent()); + PopulateCollections(); + } + }); + } + } } diff --git a/GroomWise.Application/ViewModels/LoginViewModel.cs b/GroomWise.Application/ViewModels/LoginViewModel.cs index bb4b716..721c14d 100644 --- a/GroomWise.Application/ViewModels/LoginViewModel.cs +++ b/GroomWise.Application/ViewModels/LoginViewModel.cs @@ -9,6 +9,7 @@ using GroomWise.Domain.Enums; using GroomWise.Infrastructure.Authentication.Enums; using GroomWise.Infrastructure.Authentication.Interfaces; +using GroomWise.Infrastructure.Configuration.Interfaces; using GroomWise.Infrastructure.Navigation.Interfaces; using Injectio.Attributes; using MvvmGen; @@ -22,6 +23,7 @@ namespace GroomWise.Application.ViewModels; [Inject(typeof(IEventAggregator))] [Inject(typeof(INavigationService))] [Inject(typeof(IAuthenticationService))] +[Inject(typeof(IConfigurationService), PropertyAccessModifier = AccessModifier.Public)] [RegisterSingleton] public partial class LoginViewModel : IEventSubscriber { diff --git a/GroomWise.Application/ViewModels/PetViewModel.cs b/GroomWise.Application/ViewModels/PetViewModel.cs index c263f79..2bed0a7 100644 --- a/GroomWise.Application/ViewModels/PetViewModel.cs +++ b/GroomWise.Application/ViewModels/PetViewModel.cs @@ -3,11 +3,59 @@ // 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 GroomWise.Application.Events; +using GroomWise.Application.Mappers; +using GroomWise.Application.Observables; +using GroomWise.Infrastructure.Database; +using GroomWise.Infrastructure.Navigation.Interfaces; using Injectio.Attributes; using MvvmGen; +using MvvmGen.Events; +using Swordfish.NET.Collections; +using Swordfish.NET.Collections.Auxiliary; namespace GroomWise.Application.ViewModels; [ViewModel] [RegisterSingleton] -public partial class PetViewModel { } +[Inject(typeof(GroomWiseDbContext))] +[Inject(typeof(IDialogService))] +[Inject(typeof(INavigationService))] +[Inject(typeof(IEventAggregator))] +public partial class PetViewModel + : IEventSubscriber, + IEventSubscriber +{ + [Property] + private ObservablePet _activePet = new(); + + [Property] + private ConcurrentObservableCollection _pets = new(); + + partial void OnInitialize() + { + PopulateCollections(); + } + + private async void PopulateCollections() + { + await Task.Run(() => + { + Pets = new(); + var customers = GroomWiseDbContext.Customers + .GetAll() + .Select(CustomerMapper.ToObservable); + customers.ForEach(customer => customer.Pets.ForEach(Pets.Add)); + }); + } + + public void OnEvent(CreateCustomerEvent eventData) + { + PopulateCollections(); + } + + public void OnEvent(DeleteCustomerEvent eventData) + { + PopulateCollections(); + } +} diff --git a/GroomWise.Domain/Entities/Customer.cs b/GroomWise.Domain/Entities/Customer.cs index 1eb1b4e..408cf90 100644 --- a/GroomWise.Domain/Entities/Customer.cs +++ b/GroomWise.Domain/Entities/Customer.cs @@ -16,6 +16,6 @@ public class Customer : IEntity public string? Address { get; set; } public string? ContactNumber { get; set; } public string? Email { get; set; } - public IList? Pets { get; set; } - public IList? Appointments { get; set; } + public List? Pets { get; set; } + public List? Appointments { get; set; } } diff --git a/GroomWise.WPF/GroomWise.WPF.csproj b/GroomWise.WPF/GroomWise.WPF.csproj index 55686f3..78257ce 100644 --- a/GroomWise.WPF/GroomWise.WPF.csproj +++ b/GroomWise.WPF/GroomWise.WPF.csproj @@ -59,9 +59,6 @@ - - Always - Always diff --git a/GroomWise.WPF/Views/Dialogs/LoginView.xaml b/GroomWise.WPF/Views/Dialogs/LoginView.xaml index ec49125..229645f 100644 --- a/GroomWise.WPF/Views/Dialogs/LoginView.xaml +++ b/GroomWise.WPF/Views/Dialogs/LoginView.xaml @@ -1127,7 +1127,7 @@ VerticalAlignment="Bottom" Orientation="Horizontal"> - + diff --git a/GroomWise.WPF/Views/MainView.xaml b/GroomWise.WPF/Views/MainView.xaml index d14338a..b545ecf 100644 --- a/GroomWise.WPF/Views/MainView.xaml +++ b/GroomWise.WPF/Views/MainView.xaml @@ -161,13 +161,20 @@ Selected="{Binding PageContext, Converter={x:Static converters:PageContextToSelectionConverter.Instance}, ConverterParameter={x:Type viewModels:PetViewModel}, Mode=OneWay}" Tooltip="Pets" /> - + + + + @@ -189,6 +196,9 @@ + + + @@ -209,7 +219,7 @@ - + diff --git a/GroomWise.WPF/Views/Pages/AboutView.xaml b/GroomWise.WPF/Views/Pages/AboutView.xaml new file mode 100644 index 0000000..aeb8be6 --- /dev/null +++ b/GroomWise.WPF/Views/Pages/AboutView.xaml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/GroomWise.WPF/Views/Pages/AboutView.xaml.cs b/GroomWise.WPF/Views/Pages/AboutView.xaml.cs new file mode 100644 index 0000000..e1aa85d --- /dev/null +++ b/GroomWise.WPF/Views/Pages/AboutView.xaml.cs @@ -0,0 +1,16 @@ +// 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.Windows.Controls; + +namespace GroomWise.Views.Pages; + +public partial class AboutView : UserControl +{ + public AboutView() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/GroomWise.WPF/Views/Pages/AppointmentsView.xaml b/GroomWise.WPF/Views/Pages/AppointmentsView.xaml index d45ba24..3ae9640 100644 --- a/GroomWise.WPF/Views/Pages/AppointmentsView.xaml +++ b/GroomWise.WPF/Views/Pages/AppointmentsView.xaml @@ -32,7 +32,8 @@ HorizontalAlignment="Stretch"> - + - @@ -102,6 +98,10 @@ + \ No newline at end of file diff --git a/GroomWise.WPF/Views/Pages/DashboardView.xaml b/GroomWise.WPF/Views/Pages/DashboardView.xaml index decb6f8..20daf21 100644 --- a/GroomWise.WPF/Views/Pages/DashboardView.xaml +++ b/GroomWise.WPF/Views/Pages/DashboardView.xaml @@ -23,378 +23,220 @@ - + + + + + + - + + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - - - + + F1 M6381.49 1715.65L8159.74 1715.65L8159.74 2975.24L6381.49 2975.24L6381.49 1715.65Z + - - F1 M6381.49 1715.65L8159.74 1715.65L8159.74 2975.24L6381.49 2975.24L6381.49 1715.65Z - + + + + - - - - + + F1 M5244.78 1414.15L7370.55 1414.15L7370.55 1995.67L5244.78 1995.67L5244.78 1414.15Z + - - F1 M5244.78 1414.15L7370.55 1414.15L7370.55 1995.67L5244.78 1995.67L5244.78 1414.15Z - + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + Thickness="2.13" /> - + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + Thickness="2.13" /> - + - + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - F1 M1638.56 612.571C1632.93 615.251 1635.2 626.512 1642.41 625.526C1649.63 624.54 1644.65 609.669 1638.56 612.571Z - - - - - - - - - F1 M1640.54 613.813C1638.38 614.842 1639.25 619.164 1642.02 618.785C1644.79 618.407 1642.88 612.699 1640.54 613.813Z - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - + - + + Thickness="1.84" /> - + - + + Thickness="1.84" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + F1 M1638.56 612.571C1632.93 615.251 1635.2 626.512 1642.41 625.526C1649.63 624.54 1644.65 609.669 1638.56 612.571Z + + + + + + + + + F1 M1640.54 613.813C1638.38 614.842 1639.25 619.164 1642.02 618.785C1644.79 618.407 1642.88 612.699 1640.54 613.813Z + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + - + + Foreground="{DynamicResource inverted-lighten-2}" + LineHeight="32" + LineStackingStrategy="BlockLineHeight" + Text="{Binding Date, UpdateSourceTrigger=PropertyChanged, Converter={x:Static converters:DateTimeToTimeOfDayConverter.Instance}}" /> + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + - + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GroomWise.WPF/Views/Pages/EmployeesView.xaml b/GroomWise.WPF/Views/Pages/EmployeesView.xaml index 24cd2bc..2aa615b 100644 --- a/GroomWise.WPF/Views/Pages/EmployeesView.xaml +++ b/GroomWise.WPF/Views/Pages/EmployeesView.xaml @@ -37,7 +37,8 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GroomWise.WPF/Views/Pages/ServicesView.xaml b/GroomWise.WPF/Views/Pages/ServicesView.xaml index 8b1becc..a617ff2 100644 --- a/GroomWise.WPF/Views/Pages/ServicesView.xaml +++ b/GroomWise.WPF/Views/Pages/ServicesView.xaml @@ -53,28 +53,41 @@ IconSize="18" LeftIcon="{icons:MaterialIconExt Kind=AddBold}" /> - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GroomWise.WPF/Views/Pages/SettingsView.xaml b/GroomWise.WPF/Views/Pages/SettingsView.xaml index 696e6e0..47c2b9b 100644 --- a/GroomWise.WPF/Views/Pages/SettingsView.xaml +++ b/GroomWise.WPF/Views/Pages/SettingsView.xaml @@ -22,11 +22,12 @@ diff --git a/GroomWise.WPF/Views/Templates/AppNotificationTemplate.xaml b/GroomWise.WPF/Views/Templates/AppNotificationTemplate.xaml new file mode 100644 index 0000000..28e235e --- /dev/null +++ b/GroomWise.WPF/Views/Templates/AppNotificationTemplate.xaml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GroomWise.WPF/Views/Templates/AppNotificationTemplate.xaml.cs b/GroomWise.WPF/Views/Templates/AppNotificationTemplate.xaml.cs new file mode 100644 index 0000000..29a6d95 --- /dev/null +++ b/GroomWise.WPF/Views/Templates/AppNotificationTemplate.xaml.cs @@ -0,0 +1,16 @@ +// 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.Windows.Controls; + +namespace GroomWise.Views.Templates; + +public partial class AppNotificationTemplate : UserControl +{ + public AppNotificationTemplate() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/GroomWise.WPF/Views/Templates/CustomerListCardTemplate.xaml b/GroomWise.WPF/Views/Templates/CustomerListCardTemplate.xaml index 61b7648..e4c7d8b 100644 --- a/GroomWise.WPF/Views/Templates/CustomerListCardTemplate.xaml +++ b/GroomWise.WPF/Views/Templates/CustomerListCardTemplate.xaml @@ -3,10 +3,13 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:enums="clr-namespace:GroomWise.Domain.Enums;assembly=GroomWise.Domain" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:observables="clr-namespace:GroomWise.Application.Observables;assembly=GroomWise.Application" xmlns:pages="clr-namespace:GroomWise.Views.Pages" 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" Height="70" d:DataContext="{d:DesignInstance observables:ObservableCustomer, IsDesignTimeCreatable=True}" @@ -29,13 +32,14 @@ HoverForeground="{DynamicResource fg-000}" PressedBackground="{DynamicResource bg-200}" PressedForeground="{DynamicResource fg-000}" /> - + + + diff --git a/GroomWise.WPF/Views/Templates/PetListCardTemplate.xaml b/GroomWise.WPF/Views/Templates/PetListCardTemplate.xaml new file mode 100644 index 0000000..e1be6db --- /dev/null +++ b/GroomWise.WPF/Views/Templates/PetListCardTemplate.xaml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + diff --git a/GroomWise.WPF/Views/Templates/PetListCardTemplate.xaml.cs b/GroomWise.WPF/Views/Templates/PetListCardTemplate.xaml.cs new file mode 100644 index 0000000..00012ee --- /dev/null +++ b/GroomWise.WPF/Views/Templates/PetListCardTemplate.xaml.cs @@ -0,0 +1,16 @@ +// 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.Windows.Controls; + +namespace GroomWise.Views.Templates; + +public partial class PetListCardTemplate : UserControl +{ + public PetListCardTemplate() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/GroomWise.WPF/Views/Templates/ServiceListCardTemplate.xaml b/GroomWise.WPF/Views/Templates/ServiceListCardTemplate.xaml index 3d684e5..ea87386 100644 --- a/GroomWise.WPF/Views/Templates/ServiceListCardTemplate.xaml +++ b/GroomWise.WPF/Views/Templates/ServiceListCardTemplate.xaml @@ -5,7 +5,10 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:observables="clr-namespace:GroomWise.Application.Observables;assembly=GroomWise.Application" + xmlns:pages="clr-namespace:GroomWise.Views.Pages" 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" Height="70" d:DataContext="{d:DesignInstance observables:ObservableGroomingService, IsDesignTimeCreatable=True}" @@ -24,7 +27,7 @@ HoverForeground="{DynamicResource fg-000}" PressedBackground="{DynamicResource bg-200}" PressedForeground="{DynamicResource fg-000}" /> - + @@ -54,6 +57,18 @@ FontSize="14" FontWeight="Medium" Text="{Binding Description, UpdateSourceTrigger=PropertyChanged}" /> + diff --git a/GroomWise.WPF/appconfig.json b/GroomWise.WPF/appconfig.json index 5be0362..34bed50 100644 --- a/GroomWise.WPF/appconfig.json +++ b/GroomWise.WPF/appconfig.json @@ -1,5 +1,6 @@ { "darkMode": true, "colorTheme": "Blue", - "version": "0.11.0-dev" + "version": "1.4.1-beta", + "dbConnection": "" } \ No newline at end of file