Skip to content
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

Allow bulk deletion of Incomplete Submissions #10258

Merged
merged 6 commits into from
Dec 13, 2024

Conversation

taslangraham
Copy link
Contributor

For #6528

Copy link
Contributor

@jonasraoni jonasraoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taslangraham I just saw it's a work in progress, but sharing some nitpicks.

I've used the GitHub suggestions, so it's easier to pick the changes and do a single commit 😁
image

locale/en/common.po Outdated Show resolved Hide resolved
classes/submission/Collector.php Outdated Show resolved Hide resolved
classes/submission/Collector.php Outdated Show resolved Hide resolved
classes/submission/Collector.php Show resolved Hide resolved
api/v1/_submissions/PKPBackendSubmissionsController.php Outdated Show resolved Hide resolved
api/v1/_submissions/PKPBackendSubmissionsController.php Outdated Show resolved Hide resolved
api/v1/_submissions/PKPBackendSubmissionsController.php Outdated Show resolved Hide resolved
api/v1/_submissions/PKPBackendSubmissionsController.php Outdated Show resolved Hide resolved
classes/submission/Collector.php Show resolved Hide resolved
@taslangraham
Copy link
Contributor Author

@jonasraoni Thanks for the early feedback!

@taslangraham taslangraham force-pushed the i6528-main branch 5 times, most recently from daf8647 to 0211993 Compare August 5, 2024 17:43
@taslangraham taslangraham marked this pull request as ready for review August 5, 2024 18:15
Comment on lines 257 to 259
* @param int[] $submissionIds Submission IDs
*/
public function filterBySubmissionIds(array $submissionIds): static
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think null should be allowed to disable the filter.

Suggested change
* @param int[] $submissionIds Submission IDs
*/
public function filterBySubmissionIds(array $submissionIds): static
* @param ?int[] $submissionIds Submission IDs
*/
public function filterBySubmissionIds(?array $submissionIds): static

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@@ -34,7 +34,7 @@ class SubmissionAccessPolicy extends ContextPolicy
* @param array $roleAssignments
* @param string $submissionParameterName the request parameter we
* expect the submission id in.
* @param bool $permitDeclined True iff declined reviews are permitted for viewing by reviewers
* @param bool $permitDeclined True if declined reviews are permitted for viewing by reviewers
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was a typo as well, but it means "if and only if" 😁

@taslangraham
Copy link
Contributor Author

thanks for the review @jonasraoni

Repo::submission()->delete($submission);
}

return response()->json([], Response::HTTP_OK);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps the frontend won't be very friendly with that, but the response()->noContent() would fit better :)

@beatrizmilz
Copy link

Please, this feature would be great!!
#5709

Comment on lines 373 to 374
msgid "common.deselectAll"
msgstr "Deselect All"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jardakotesovec I'm not sure if your UI implementation uses this and the entry below. If not I'll remove them

@taslangraham taslangraham merged commit 2837b80 into pkp:main Dec 13, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants