Skip to content

Commit

Permalink
Merge pull request #4088 from Vitaliy-1/i8887_views_counts
Browse files Browse the repository at this point in the history
pkp/pkp-lib#8887 REST API for dashboard views
  • Loading branch information
Vitaliy-1 authored Nov 13, 2023
2 parents 5bb6c28 + 41d69ff commit 715d3e7
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 3 deletions.
6 changes: 6 additions & 0 deletions classes/facades/Repo.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use APP\user\Repository as UserRepository;
use PKP\facades\Repo as BaseRepo;
use PKP\galley\Repository as GalleyRepository;
use PKP\submission\reviewAssignment\Repository as ReviewAssignmentRepository;

class Repo extends BaseRepo
{
Expand Down Expand Up @@ -77,4 +78,9 @@ public static function mailable(): MailRepository
{
return app(MailRepository::class);
}

public static function reviewAssignment(): ReviewAssignmentRepository
{
return app(ReviewAssignmentRepository::class);
}
}
106 changes: 106 additions & 0 deletions docs/dev/swagger-source.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"Submissions / Participants",
"Submissions / Publications",
"Submissions / Publications / Contributors",
"Submissions / DashboardViews",
"Issues",
"Users",
"Contexts",
Expand Down Expand Up @@ -116,6 +117,9 @@
{
"name": "Submissions / Publications / Contributors"
},
{
"name": "Submissions / DashboardViews"
},
{
"name": "Issues"
},
Expand Down Expand Up @@ -7346,6 +7350,108 @@
}
}
},
"/_submissions/assigned": {
"get": {
"tags": [
"Submissions"
],
"summary": "Get a list of submissions assigned to a user",
"parameters": [
{
"description": "Accepts most parameters supported by the public `/submissions` endpoint."
}
],
"responses": {
"200": {
"x-summary": "Success",
"description": "List of submissions."
},
"404": {
"x-summary": "Request Not Found",
"description": "The context could not be found.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/_submissions/reviews": {
"get": {
"tags": [
"Submissions"
],
"summary": "Get a list of submissions in a review stage",
"parameters": [
{
"name": "needsReviewers",
"description": "Filter results by submissions which need reviewers to be assigned",
"in": "query",
"required": false,
"type": "boolean"
},
{
"name": "awaitingReviews",
"description": "Filter results by those awaiting reply from reviewers",
"in": "query",
"required": false,
"type": "boolean"
},
{
"name": "reviewsSubmitted",
"description": "Filter results by those where reviews were submitted by reviewers",
"in": "query",
"required": false,
"type": "boolean"
},
{
"name": "reviewsOverdue",
"description": "Filter results by those with one or more overdue review assignment",
"in": "query",
"required": false,
"type": "boolean"
},
{
"name": "revisionsRequested",
"description": "Filter results by those in the review stage where file revision is requested from the author",
"in": "query",
"required": false,
"type": "boolean"
}
],
"responses": {
"200": {
"x-summary": "Success",
"description": "List of submissions."
},
"404": {
"x-summary": "Request Not Found",
"description": "The context could not be found.",
"schema": {
"$ref": "#/definitions/ErrorResponse"
}
}
}
}
},
"/_submissions/viewsCount": {
"get": {
"tags": [
"Submissions / DashboardViews"
],
"summary": "Get a collection of views count",
"description": "This endpoint delivers the count of submissions and review assignments for all views available to the user",
"responses": {
"200": {
"x-summary": "Success",
"description": "List of dashboard views name (key) and count (value) pairs.",
"schema": {
"type": "object"
}
}
}
}
},
"/contexts/editDoiRegistrationAgencyPlugin" : {
"put": {
"tags": [
Expand Down
2 changes: 1 addition & 1 deletion lib/pkp
Submodule pkp updated 66 files
+166 −9 api/v1/_submissions/PKPBackendSubmissionsController.php
+7 −5 api/v1/submissions/PKPSubmissionController.php
+6 −0 classes/components/forms/context/PKPReviewSetupForm.php
+17 −23 classes/controllers/grid/users/reviewer/PKPReviewerGridHandler.php
+0 −1 classes/core/PKPApplication.php
+4 −2 classes/decision/types/CancelReviewRound.php
+8 −5 classes/decision/types/traits/InExternalReviewRound.php
+8 −9 classes/decision/types/traits/NotifyReviewers.php
+6 −5 classes/decision/types/traits/WithReviewAssignments.php
+2 −5 classes/invitation/invitations/ReviewerAccessInvite.php
+2 −4 classes/log/event/EventLogEntry.php
+3 −7 classes/notification/PKPNotificationManager.php
+2 −5 classes/security/authorization/ReviewAssignmentFileWritePolicy.php
+2 −4 classes/security/authorization/internal/QueryUserAccessibleWorkflowStageRequiredPolicy.php
+6 −5 classes/security/authorization/internal/ReviewAssignmentAccessPolicy.php
+2 −4 classes/security/authorization/internal/ReviewAssignmentRequiredPolicy.php
+2 −3 classes/security/authorization/internal/SubmissionFileAssignedReviewerAccessPolicy.php
+2 −4 classes/security/authorization/internal/SubmissionFileAuthorEditorPolicy.php
+2 −4 classes/security/authorization/internal/SubmissionFileStageRequiredPolicy.php
+207 −10 classes/submission/Collector.php
+3 −3 classes/submission/DAO.php
+131 −0 classes/submission/DashboardView.php
+316 −3 classes/submission/Repository.php
+29 −0 classes/submission/ViewsCount.php
+25 −26 classes/submission/action/EditorAction.php
+7 −8 classes/submission/maps/Schema.php
+335 −0 classes/submission/reviewAssignment/Collector.php
+179 −0 classes/submission/reviewAssignment/DAO.php
+262 −0 classes/submission/reviewAssignment/Repository.php
+2 −4 classes/submission/reviewAssignment/ReviewAssignment.php
+0 −676 classes/submission/reviewAssignment/ReviewAssignmentDAO.php
+96 −0 classes/submission/reviewAssignment/maps/Schema.php
+5 −4 classes/submission/reviewRound/ReviewRound.php
+6 −8 classes/submission/reviewer/ReviewerAction.php
+7 −19 classes/submission/reviewer/form/PKPReviewerReviewStep3Form.php
+2 −5 classes/submission/reviewer/form/ReviewerReviewForm.php
+2 −3 classes/submissionFile/DAO.php
+5 −12 classes/task/ReviewReminder.php
+3 −5 classes/user/Repository.php
+2 −5 controllers/grid/eventLog/EventLogGridCellProvider.php
+1 −4 controllers/grid/eventLog/EventLogGridRow.php
+1 −5 controllers/grid/files/attachment/ReviewerReviewAttachmentGridDataProvider.php
+1 −3 controllers/grid/notifications/NotificationsGridCellProvider.php
+8 −6 controllers/grid/queries/form/QueryForm.php
+3 −5 controllers/grid/settings/reviewForms/ReviewFormGridHandler.php
+8 −3 controllers/grid/users/reviewer/AuthorReviewerGridHandler.php
+7 −6 controllers/grid/users/reviewer/form/AdvancedSearchReviewerForm.php
+13 −10 controllers/grid/users/reviewer/form/EditReviewForm.php
+3 −5 controllers/grid/users/reviewer/form/ReinstateReviewerForm.php
+5 −7 controllers/grid/users/reviewer/form/ResendRequestReviewerForm.php
+3 −6 controllers/grid/users/reviewer/form/ReviewReminderForm.php
+22 −15 controllers/grid/users/reviewer/form/ReviewerForm.php
+5 −10 controllers/grid/users/reviewer/form/ThankReviewerForm.php
+2 −6 controllers/grid/users/reviewer/form/UnassignReviewerForm.php
+9 −6 controllers/grid/users/stageParticipant/form/AddParticipantForm.php
+8 −3 controllers/tab/authorDashboard/AuthorDashboardReviewRoundTabHandler.php
+1 −5 controllers/wizard/fileUpload/form/PKPSubmissionFilesUploadBaseForm.php
+6 −0 locale/en/api.po
+6 −0 locale/en/common.po
+3 −0 locale/en/editor.po
+6 −0 locale/en/manager.po
+71 −0 locale/en/submission.po
+6 −136 pages/dashboard/DashboardHandlerNext.php
+9 −1 schemas/context.json
+224 −0 schemas/reviewAssignment.json
+25 −17 tools/travis/run-tests.sh
2 changes: 1 addition & 1 deletion plugins/generic/orcidProfile
2 changes: 1 addition & 1 deletion plugins/reports/reviewReport

0 comments on commit 715d3e7

Please sign in to comment.