-
Notifications
You must be signed in to change notification settings - Fork 1
feat: #27: add unwell type #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
a56aaee
refactor: move work entry configuration to mapping folder
MDI74 a41a0d6
docs(readme): bring test coverage score up to date
74bc1e7
refactor: #27: add TrackingEntryBase with shared fields and set type …
MDI74 842b197
Merge branch 'feature/#27-add-unwell-type' of github.com:TourmalineCo…
MDI74 58fdf34
docs(readme): bring test coverage score up to date
07427d3
feat: #27: add unwell type
MDI74 4e6ad8a
feat: #27: add create, update unwell entries and update getWorkEntrie…
MDI74 a061f1a
refactor: #27: rename EventType to EntryType
katariniss f41df1a
refactor: #27: rename WorkEntry to TaskEntry & TrackingEntry to Track…
katariniss 7ecd9c9
refactor: #27: change GetWorkEntriesByPeriodResponse
katariniss 57783e7
refactor: #27: rename TrackingEntryBaseMapping to TrackedEntryBaseMap…
MDI74 9e3aac3
refactor: #27: rename test name
katariniss df45e9b
Merge branch 'feature/#27-add-unwell-type' of github.com:TourmalineCo…
katariniss ccd381e
refactor: #27: rename WorkEntries to TaskEntries
MDI74 179c7bd
feat: #27: add AddTrackedEntryBaseAndUnwellEntry and RenameWorkEntryT…
MDI74 4ab6d31
docs(readme): Update Mermaid DB Schema Diagram in README.md (siren-gen)
8e85812
docs(readme): bring test coverage score up to date
0fc5efe
refactor: #27: remove test which checks ck_work_entries_type_not_zero…
MDI74 42f3c3b
test: #27: add autorization tests for unwell entries endpoints
MDI74 0c85b74
refactor: #27: change feature name in tracked-entries-happy-path test
MDI74 0a3ae47
fix: #27: fix unwell-entries-no-permissions-lead-to-unauthorized test
MDI74 ff456f0
refactor: #27: rename createWorkEntryCommand to _createUnwellEntryCom…
MDI74 e59691f
refactor: #27: remove redundant empty lines
MDI74 6023b60
refactor: #27: rename updateWorkEntryCommandParams to updateUnwellEnt…
MDI74 2bb2167
Apply suggestion from @fpandyz
fpandyz a0370d0
refactor: #27: return title to the previous place
MDI74 67ec85b
Merge branch 'master' into feature/#27-add-unwell-type
MDI74 d98040c
refactor: #27: rename CreateUnwellEntryHandler to CreateUnwellEntryAsync
MDI74 f2c3403
Merge branch 'feature/#27-add-unwell-type' of github.com:TourmalineCo…
MDI74 7ab9472
docs(readme): bring test coverage score up to date
0dd1ed4
refactor: #27: rename unwell-entries-no-permissions-lead-to-unauthorized
MDI74 e1e45dc
refactor: #27: remove a redundant test that checks the same thing as …
29e5fb7
Merge branch 'master' into feature/#27-add-unwell-type
MDI74 b2531cf
docs(readme): bring test coverage score up to date
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
34 changes: 34 additions & 0 deletions
34
Api/Features/Tracking/CreateUnwellEntry/CreateUnwellEntryHandler.cs
This file contains hidden or 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,34 @@ | ||
| using Application.Commands; | ||
|
|
||
| namespace Api.Features.Tracking.CreateUnwellEntry; | ||
|
|
||
| public class CreateUnwellEntryHandler | ||
| { | ||
| private readonly CreateUnwellEntryCommand _createUnwellEntryCommand; | ||
|
|
||
|
|
||
| public CreateUnwellEntryHandler( | ||
| CreateUnwellEntryCommand createUnwellEntryCommand | ||
| ) | ||
| { | ||
| _createUnwellEntryCommand = createUnwellEntryCommand; | ||
| } | ||
|
|
||
| public async Task<CreateUnwellResponse> HandleAsync( | ||
| CreateUnwellEntryRequest createUnwellEntryRequest | ||
| ) | ||
| { | ||
| var createUnwellEntryCommandParams = new CreateUnwellEntryCommandParams | ||
| { | ||
| StartTime = createUnwellEntryRequest.StartTime, | ||
| EndTime = createUnwellEntryRequest.EndTime, | ||
| }; | ||
|
|
||
| var newUnwellEntryId = await _createUnwellEntryCommand.ExecuteAsync(createUnwellEntryCommandParams); | ||
|
|
||
| return new CreateUnwellResponse | ||
| { | ||
| NewUnwellEntryId = newUnwellEntryId | ||
|
fpandyz marked this conversation as resolved.
|
||
| }; | ||
| } | ||
| } | ||
12 changes: 12 additions & 0 deletions
12
Api/Features/Tracking/CreateUnwellEntry/CreateUnwellEntryRequest.cs
This file contains hidden or 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,12 @@ | ||
| using System.ComponentModel.DataAnnotations; | ||
|
|
||
| namespace Api.Features.Tracking.CreateUnwellEntry; | ||
|
|
||
| public class CreateUnwellEntryRequest | ||
| { | ||
| [Required] | ||
| public required DateTime StartTime { get; set; } | ||
|
|
||
| [Required] | ||
| public required DateTime EndTime { get; set; } | ||
| } |
7 changes: 7 additions & 0 deletions
7
Api/Features/Tracking/CreateUnwellEntry/CreateUnwellEntryResponse.cs
This file contains hidden or 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,7 @@ | ||
| namespace Api.Features.Tracking.CreateUnwellEntry; | ||
|
|
||
| public class CreateUnwellResponse | ||
| { | ||
| public required long NewUnwellEntryId { get; set; } | ||
| } | ||
|
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
30 changes: 30 additions & 0 deletions
30
Api/Features/Tracking/UpdateUnwellEntry/UpdateUnwellEntryHandler.cs
This file contains hidden or 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,30 @@ | ||
| using Application.Commands; | ||
|
|
||
| namespace Api.Features.Tracking.UpdateUnwellEntry; | ||
|
|
||
| public class UpdateUnwellEntryHandler | ||
| { | ||
| private readonly UpdateUnwellEntryCommand _updateUnwellEntryCommand; | ||
|
|
||
| public UpdateUnwellEntryHandler( | ||
| UpdateUnwellEntryCommand updateUnwellEntryCommand | ||
| ) | ||
| { | ||
| _updateUnwellEntryCommand = updateUnwellEntryCommand; | ||
| } | ||
|
|
||
| public async Task HandleAsync( | ||
| long unwellEntryId, | ||
| UpdateUnwellEntryRequest updateUnwellEntryRequest | ||
| ) | ||
| { | ||
| var updateUnwellEntryCommandParams = new UpdateUnwellEntryCommandParams | ||
| { | ||
| Id = unwellEntryId, | ||
| StartTime = updateUnwellEntryRequest.StartTime, | ||
| EndTime = updateUnwellEntryRequest.EndTime, | ||
| }; | ||
|
|
||
| await _updateUnwellEntryCommand.ExecuteAsync(updateUnwellEntryCommandParams); | ||
| } | ||
| } |
12 changes: 12 additions & 0 deletions
12
Api/Features/Tracking/UpdateUnwellEntry/UpdateUnwellEntryRequest.cs
This file contains hidden or 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,12 @@ | ||
| using System.ComponentModel.DataAnnotations; | ||
|
|
||
| namespace Api.Features.Tracking.UpdateUnwellEntry; | ||
|
|
||
| public class UpdateUnwellEntryRequest | ||
| { | ||
| [Required] | ||
| public required DateTime StartTime { get; set; } | ||
|
|
||
| [Required] | ||
| public required DateTime EndTime { get; set; } | ||
| } |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.