Skip to content

Commit

Permalink
Added: Send message while rejecting a project
Browse files Browse the repository at this point in the history
  • Loading branch information
djuarezgf committed Apr 15, 2024
1 parent 75935a3 commit 13a9d1d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Project and project view url in email context
- Create notification after sending an email
- Send message while requesting changes in script or project
- Send message while rejecting a project
16 changes: 12 additions & 4 deletions src/main/java/de/samply/app/ProjectManagerController.java
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,9 @@ public ResponseEntity<String> acceptProject(
@FrontendAction(action = ProjectManagerConst.REJECT_PROJECT_ACTION)
@PostMapping(value = ProjectManagerConst.REJECT_PROJECT)
public ResponseEntity<String> rejectProject(
@ProjectCode @RequestParam(name = ProjectManagerConst.PROJECT_CODE) String projectCode
@ProjectCode @RequestParam(name = ProjectManagerConst.PROJECT_CODE) String projectCode,
// Message is sent per email
@Message @RequestParam(name = ProjectManagerConst.MESSAGE, required = false) String message
) {
return convertToResponseEntity(() -> projectEventService.reject(projectCode));
}
Expand All @@ -509,7 +511,9 @@ public ResponseEntity<String> acceptBridgeheadProject(
@PostMapping(value = ProjectManagerConst.REJECT_BRIDGEHEAD_PROJECT)
public ResponseEntity<String> rejectBridgeheadProject(
@ProjectCode @RequestParam(name = ProjectManagerConst.PROJECT_CODE) String projectCode,
@Bridgehead @RequestParam(name = ProjectManagerConst.BRIDGEHEAD) String bridgehead
@Bridgehead @RequestParam(name = ProjectManagerConst.BRIDGEHEAD) String bridgehead,
// Message is sent per email
@Message @RequestParam(name = ProjectManagerConst.MESSAGE, required = false) String message
) {
return convertToResponseEntity(() -> projectBridgeheadService.rejectProject(projectCode, bridgehead));
}
Expand Down Expand Up @@ -537,7 +541,9 @@ public ResponseEntity<String> acceptScript(
@PostMapping(value = ProjectManagerConst.REJECT_SCRIPT)
public ResponseEntity<String> rejectScript(
@ProjectCode @RequestParam(name = ProjectManagerConst.PROJECT_CODE) String projectCode,
@Bridgehead @RequestParam(name = ProjectManagerConst.BRIDGEHEAD) String bridgehead
@Bridgehead @RequestParam(name = ProjectManagerConst.BRIDGEHEAD) String bridgehead,
// Message is sent per email
@Message @RequestParam(name = ProjectManagerConst.MESSAGE, required = false) String message
) {
return convertToResponseEntity(() -> userService.rejectProject(projectCode, bridgehead));
}
Expand Down Expand Up @@ -579,7 +585,9 @@ public ResponseEntity<String> acceptProjectResults(
@PostMapping(value = ProjectManagerConst.REJECT_PROJECT_RESULTS)
public ResponseEntity<String> rejectProjectResults(
@ProjectCode @RequestParam(name = ProjectManagerConst.PROJECT_CODE) String projectCode,
@Bridgehead @RequestParam(name = ProjectManagerConst.BRIDGEHEAD) String bridgehead
@Bridgehead @RequestParam(name = ProjectManagerConst.BRIDGEHEAD) String bridgehead,
// Message is sent per email
@Message @RequestParam(name = ProjectManagerConst.MESSAGE, required = false) String message
) {
return convertToResponseEntity(() -> userService.rejectProject(projectCode, bridgehead));
}
Expand Down

0 comments on commit 13a9d1d

Please sign in to comment.