@@ -27,8 +27,6 @@ export const projectTransitions = () =>
27
27
'Prep for Consultant Endorsement -> Pending Consultant Endorsement' ,
28
28
'Prep for Consultant & Financial Endorsement & Finalizing Proposal -> Pending Concept Approval' ,
29
29
'Prep for Consultant & Financial Endorsement & Finalizing Proposal -> Did Not Develop' ,
30
- 'Pending Consultant Endorsement -> Prep for Financial Endorsement With Consultant Endorsement' ,
31
- 'Pending Consultant Endorsement -> Prep for Financial Endorsement Without Consultant Endorsement' ,
32
30
'Prep for Financial Endorsement -> Pending Financial Endorsement' ,
33
31
'Prep for Financial Endorsement & Finalizing Proposal -> Pending Consultant Endorsement' ,
34
32
'Finalizing Proposal -> Pending Regional Director Approval' ,
@@ -53,6 +51,12 @@ export const projectTransitions = () =>
53
51
'Finalizing Completion -> Completed' ,
54
52
] ) ;
55
53
54
+ export const momentumProjectsTransitions = ( ) =>
55
+ ProjectWorkflow . pickNames ( [
56
+ 'Pending Consultant Endorsement -> Prep for Financial Endorsement With Consultant Endorsement' ,
57
+ 'Pending Consultant Endorsement -> Prep for Financial Endorsement Without Consultant Endorsement' ,
58
+ ] ) ;
59
+
56
60
// NOTE: There could be other permissions for this role from other policies
57
61
@Policy (
58
62
[ Role . ProjectManager , Role . RegionalDirector , Role . FieldOperationsDirector ] ,
@@ -132,6 +136,12 @@ export const projectTransitions = () =>
132
136
member ,
133
137
r . ProjectWorkflowEvent . isTransitions ( projectTransitions ) ,
134
138
) . execute ,
139
+ // PMs can also endorse for consultant for momentum projects
140
+ r . ProjectWorkflowEvent . whenAll (
141
+ field ( 'project.type' , 'MomentumTranslation' ) ,
142
+ member ,
143
+ r . ProjectWorkflowEvent . isTransitions ( momentumProjectsTransitions ) ,
144
+ ) . execute ,
135
145
r . Project . read . create
136
146
. when ( member )
137
147
. edit . specifically ( ( p ) => [
0 commit comments