Skip to content

Commit

Permalink
Add withdraw to new workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
frjo committed Nov 27, 2024
1 parent e937ab8 commit 4d15ac9
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions hypha/apply/funds/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,11 @@ def make_permissions(edit=None, review=None, view=None, withdraw=None):
"same_internal_review": _("Open Review"),
"same_determination": _("Ready For Determination"),
"same_rejected": _("Dismiss"),
"same_withdrawn": {
"display": _("Withdraw"),
"permissions": {UserPermissions.APPLICANT},
"method": "withdraw",
},
},
"display": _("Need screening"),
"public": _("Application Received"),
Expand All @@ -476,6 +481,11 @@ def make_permissions(edit=None, review=None, view=None, withdraw=None):
"method": "create_revision",
"custom": {"trigger_on_submit": True},
},
"same_withdrawn": {
"display": _("Withdraw"),
"permissions": {UserPermissions.APPLICANT},
"method": "withdraw",
},
},
"display": _("More information required"),
"stage": RequestSame,
Expand All @@ -486,6 +496,11 @@ def make_permissions(edit=None, review=None, view=None, withdraw=None):
"same_internal_review": {
"transitions": {
"same_post_review_discussion": _("Close Review"),
"same_withdrawn": {
"display": _("Withdraw"),
"permissions": {UserPermissions.APPLICANT},
"method": "withdraw",
},
INITIAL_STATE: _("Need screening (revert)"),
},
"display": _("Review"),
Expand All @@ -503,6 +518,11 @@ def make_permissions(edit=None, review=None, view=None, withdraw=None):
"same_determination": _("Ready For Determination"),
"same_internal_review": _("Open Review (revert)"),
"same_rejected": _("Dismiss"),
"same_withdrawn": {
"display": _("Withdraw"),
"permissions": {UserPermissions.APPLICANT},
"method": "withdraw",
},
},
"display": _("Ready For Discussion"),
"stage": RequestSame,
Expand All @@ -521,6 +541,11 @@ def make_permissions(edit=None, review=None, view=None, withdraw=None):
"method": "create_revision",
"custom": {"trigger_on_submit": True},
},
"same_withdrawn": {
"display": _("Withdraw"),
"permissions": {UserPermissions.APPLICANT},
"method": "withdraw",
},
},
"display": _("More information required"),
"stage": RequestSame,
Expand All @@ -534,6 +559,11 @@ def make_permissions(edit=None, review=None, view=None, withdraw=None):
"same_almost": _("Accept but additional info required"),
"same_accepted": _("Accept"),
"same_rejected": _("Dismiss"),
"same_withdrawn": {
"display": _("Withdraw"),
"permissions": {UserPermissions.APPLICANT},
"method": "withdraw",
},
},
"display": _("Ready for Determination"),
"permissions": hidden_from_applicant_permissions,
Expand All @@ -551,6 +581,11 @@ def make_permissions(edit=None, review=None, view=None, withdraw=None):
"transitions": {
"same_accepted": _("Accept"),
"same_post_review_discussion": _("Ready For Discussion (revert)"),
"same_withdrawn": {
"display": _("Withdraw"),
"permissions": {UserPermissions.APPLICANT},
"method": "withdraw",
},
},
"display": _("Accepted but additional info required"),
"stage": RequestSame,
Expand All @@ -561,6 +596,11 @@ def make_permissions(edit=None, review=None, view=None, withdraw=None):
"stage": RequestSame,
"permissions": no_permissions,
},
"same_withdrawn": {
"display": _("Withdraw"),
"stage": RequestSame,
"permissions": no_permissions,
},
},
]

Expand Down

0 comments on commit 4d15ac9

Please sign in to comment.