From a410383508cbd69e51ce26ba0789c18edde39d9a Mon Sep 17 00:00:00 2001 From: Vaibhav Mule <vaibhavmule135@gmail.com> Date: Mon, 11 May 2020 09:57:24 +0530 Subject: [PATCH] add draft status in workflow. --- hypha/apply/funds/workflow.py | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/hypha/apply/funds/workflow.py b/hypha/apply/funds/workflow.py index d9888b11a..329205a0b 100644 --- a/hypha/apply/funds/workflow.py +++ b/hypha/apply/funds/workflow.py @@ -194,6 +194,20 @@ Proposal = Stage('Proposal', True) INITIAL_STATE = 'in_discussion' SingleStageDefinition = [ + { + 'draft': { + 'transitions': { + INITIAL_STATE: { + 'display': 'Submit', + 'permissions': {UserPermissions.APPLICANT}, + 'method': 'create_revision', + }, + }, + 'display': 'Draft', + 'stage': Request, + 'permissions': applicant_edit_permissions, + } + }, { INITIAL_STATE: { 'transitions': { @@ -293,6 +307,20 @@ SingleStageDefinition = [ ] SingleStageExternalDefinition = [ + { + 'ext_draft': { + 'transitions': { + INITIAL_STATE: { + 'display': 'Submit', + 'permissions': {UserPermissions.APPLICANT}, + 'method': 'create_revision', + }, + }, + 'display': 'Draft', + 'stage': Request, + 'permissions': applicant_edit_permissions, + } + }, { INITIAL_STATE: { 'transitions': { @@ -423,6 +451,20 @@ SingleStageExternalDefinition = [ SingleStageCommunityDefinition = [ + { + 'com_draft': { + 'transitions': { + INITIAL_STATE: { + 'display': 'Submit', + 'permissions': {UserPermissions.APPLICANT}, + 'method': 'create_revision', + }, + }, + 'display': 'Draft', + 'stage': Request, + 'permissions': applicant_edit_permissions, + } + }, { INITIAL_STATE: { 'transitions': { @@ -577,6 +619,20 @@ SingleStageCommunityDefinition = [ DoubleStageDefinition = [ + { + 'concept_draft': { + 'transitions': { + INITIAL_STATE: { + 'display': 'Submit', + 'permissions': {UserPermissions.APPLICANT}, + 'method': 'create_revision', + }, + }, + 'display': 'Draft', + 'stage': Request, + 'permissions': applicant_edit_permissions, + } + }, { INITIAL_STATE: { 'transitions': { -- GitLab