-
-
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: update appointments handling, services and general features in…
… Groomwise application - Update appointment services to use new Community Toolkit MVVM, replacing old MVVMGen. - Enrich Appointment model with: appointment overlapping check, available time-slots generation for new appointments - Remove dependency on Lombok and use Community Toolkit MVVM. - Add appointment cancellation and saving functionalities, with necessary validation and notifications. - Move to DateTime instead of separate Date and Time entities, for easier management of appointments and services. - Add service removal functionality with adjustments to overall appointment duration - Rework Toast notifications to self-remove themselves after a cooldown period. - Various related improvements and clean-ups on all associated files. Signed-off-by: Russell Camo <[email protected]>
- Loading branch information
Showing
22 changed files
with
376 additions
and
165 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 DeleteAppointmentEvent(); |
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 GroomWise.Domain.Entities; | ||
|
||
namespace GroomWise.Application.Extensions; | ||
|
||
public static class TimeExtensions | ||
{ | ||
public static bool IsBetween(this TimeOnly target, TimeOnly start, TimeOnly end) | ||
{ | ||
if (start <= end) | ||
{ | ||
return start <= target && target <= end; | ||
} | ||
return start <= target || target <= end; | ||
} | ||
|
||
public static bool IsOverlapping(this Appointment appointment, TimeOnly start, TimeOnly end) | ||
{ | ||
return appointment.StartTime < end && appointment.EndTime > start; | ||
} | ||
} |
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
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.