-
Notifications
You must be signed in to change notification settings - Fork 6
Feature 2759/server side markdown generation #2792
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
mkimberlin
merged 9 commits into
develop
from
feature-2759/server-side-markdown-generation
Dec 18, 2024
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
16402cd
Switch to server-side markdown. This has not been fully tested.
ocielliottc ad2b6d5
Use version 1.3.1.1 of the markdowngenerator from mavenCentral.
ocielliottc aa60fef
Provide an indicator for when document generation is complete.
ocielliottc f145ced
Added the review period name to the review period pull down.
ocielliottc e3c3e91
Merge branch 'develop' into feature-2759/server-side-markdown-generation
ocielliottc 819a746
Corrected hour format of the generated markdown and updated the Repor…
ocielliottc 5a76dd4
Updated to reflect the label change.
ocielliottc b5e4977
Changed report generation to a POST so that member ids could be part …
ocielliottc 88f61ca
Merge branch 'develop' into feature-2759/server-side-markdown-generation
ocielliottc 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
399 changes: 399 additions & 0 deletions
399
server/src/main/java/com/objectcomputing/checkins/services/reports/MarkdownGeneration.java
Large diffs are not rendered by default.
Oops, something went wrong.
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
40 changes: 1 addition & 39 deletions
40
server/src/main/java/com/objectcomputing/checkins/services/reports/ReportDataDTO.java
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 |
|---|---|---|
| @@ -1,58 +1,20 @@ | ||
| package com.objectcomputing.checkins.services.reports; | ||
|
|
||
| import com.objectcomputing.checkins.services.memberprofile.MemberProfile; | ||
| import io.micronaut.core.annotation.Introspected; | ||
| import jakarta.validation.constraints.NotNull; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Getter; | ||
| import lombok.Setter; | ||
|
|
||
| import java.time.LocalDate; | ||
| import java.util.List; | ||
| import java.util.UUID; | ||
|
|
||
| @Getter | ||
| @Setter | ||
| @AllArgsConstructor | ||
| @Introspected | ||
| public class ReportDataDTO { | ||
|
|
||
| @NotNull | ||
| private UUID memberId; | ||
| private List<UUID> memberIds; | ||
|
|
||
| @NotNull | ||
| private UUID reviewPeriodId; | ||
|
|
||
| @NotNull | ||
| private LocalDate startDate; | ||
|
|
||
| @NotNull | ||
| private LocalDate endDate; | ||
|
|
||
| @NotNull | ||
| private MemberProfile memberProfile; | ||
|
|
||
| @NotNull | ||
| private List<ReportKudos> kudos; | ||
|
|
||
| @NotNull | ||
| private List<CompensationHistory.Compensation> compensationHistory; | ||
|
|
||
| @NotNull | ||
| private CurrentInformation.Information currentInformation; | ||
|
|
||
| @NotNull | ||
| private List<PositionHistory.Position> positionHistory; | ||
|
|
||
| @NotNull | ||
| private List<Feedback> selfReviews; | ||
|
|
||
| @NotNull | ||
| private List<Feedback> reviews; | ||
|
|
||
| @NotNull | ||
| private List<Feedback> feedback; | ||
|
|
||
| @NotNull | ||
| private ReportHours hours; | ||
| } |
59 changes: 59 additions & 0 deletions
59
.../test/java/com/objectcomputing/checkins/services/reports/FileServicesImplReplacement.java
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,59 @@ | ||
| package com.objectcomputing.checkins.services.reports; | ||
|
|
||
| /************************************************************************* | ||
| * | ||
| * This class is here due to the fact that the ReportDataController now | ||
| * references the FileServices. The real FileServicesImpl requires the | ||
| * GoogleApiAccess class that does not exist during testing. | ||
| * | ||
| * This replacement class does not require that and can help us test the | ||
| * output of the MarkdownGeneration class. | ||
| * | ||
| ************************************************************************/ | ||
|
|
||
| import com.objectcomputing.checkins.services.file.FileInfoDTO; | ||
| import com.objectcomputing.checkins.services.file.FileServices; | ||
| import com.objectcomputing.checkins.services.file.FileServicesImpl; | ||
|
|
||
| import io.micronaut.http.multipart.CompletedFileUpload; | ||
|
|
||
| import java.io.File; | ||
| import java.util.Set; | ||
| import java.util.HashSet; | ||
| import java.util.UUID; | ||
|
|
||
| import jakarta.inject.Singleton; | ||
| import io.micronaut.context.env.Environment; | ||
| import io.micronaut.context.annotation.Replaces; | ||
| import io.micronaut.context.annotation.Requires; | ||
|
|
||
| @Singleton | ||
| @Replaces(FileServicesImpl.class) | ||
| @Requires(env = Environment.TEST) | ||
| public class FileServicesImplReplacement implements FileServices { | ||
| public String documentName = ""; | ||
| public String documentText = ""; | ||
|
|
||
| public Set<FileInfoDTO> findFiles(UUID checkInId) { | ||
| return new HashSet<FileInfoDTO>(); | ||
| } | ||
|
|
||
| public File downloadFiles(String uploadDocId) { | ||
| return null; | ||
| } | ||
|
|
||
| public FileInfoDTO uploadFile(UUID checkInID, CompletedFileUpload file) { | ||
| return new FileInfoDTO(); | ||
| } | ||
|
|
||
| public FileInfoDTO uploadDocument(String directory, | ||
| String name, String text) { | ||
| documentName = name; | ||
| documentText = text; | ||
| return new FileInfoDTO(); | ||
| } | ||
|
|
||
| public boolean deleteFile(String uploadDocId) { | ||
| return true; | ||
| } | ||
| } | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's the magic!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! It came to me one morning to do it like we do the email sender!