-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: assign statuses to Xpress proposals #848
base: develop
Are you sure you want to change the base?
Conversation
This reverts commit 041253f.
@UserOfficeProject/swap Martin was automatically assigned and I wasn't sure who to replace him with, so I have just assigned Fredrik for now 🙂 |
I am adding myself as the reviewer as well. |
@@ -517,6 +516,165 @@ export default class ProposalMutations { | |||
return result || rejection('Can not change proposal status', { result }); | |||
} | |||
|
|||
@EventBus(Event.PROPOSAL_STATUS_CHANGED_BY_USER) | |||
@Authorized([Roles.USER_OFFICER]) | |||
async changeProposalsStatus( |
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.
I dont see this is referenced by resolver or any other place.
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.
Git shows this as a new addition, but this is unchanged from before and the resolver still exists. The implementation for it is now moved to a private function processProposalsStatusChange
so that both this mutation changeProposalsStatus
and the Xpress one changeXpressProposalsStatus
can use it without duplication.
user-office-core/apps/backend/src/resolvers/mutations/ChangeProposalsStatusMutation.ts
Line 26 in 012587b
async changeProposalsStatus( |
Description
This PR allows user officers and scientists to change statuses on Xpress proposals.
User Officers can change the instrument and status without any restrictions.
Scientists have a set of conditions that determine whether they can set the instrument and status. For example, they can only change an instrument when the status is Under Review, and once the status moves to Finished, the status and instrument are locked in place.
The changes in this PR are mainly for the statuses, but the instrument logic has been adjusted slightly to account for the current status. There are also a couple of minor changes to only show Xpress calls and statuses in the dropdown filters.
GMT20241107-143404_Recording_2560x1380.mp4
Motivation and Context
Both scientists and user officers need to be able to change the status of Xpress proposals. For scientists this needs to be limited and take into account the current status and instrument.
Changes
How Has This Been Tested?
Fixes Jira Issue
Resolves UserOfficeProject/issue-tracker#1138
Depends On
Tests included/Docs Updated?