@@ -13,7 +13,7 @@ import {
13
13
ResolveParams ,
14
14
} from './transitions/dynamic-step' ;
15
15
import {
16
- EmailDistros ,
16
+ EmailDistro ,
17
17
FinancialApprovers ,
18
18
TeamMembers ,
19
19
} from './transitions/notifiers' ;
@@ -22,6 +22,16 @@ import {
22
22
// Therefore, these should generally flow down.
23
23
// "Back" transitions should come before/above "forward" transitions.
24
24
25
+ const Distros = {
26
+ Projects :
EmailDistro ( '[email protected] ' ) ,
27
+ Approval :
EmailDistro ( '[email protected] ' ) ,
28
+ Extension :
EmailDistro ( '[email protected] ' ) ,
29
+ Revision :
EmailDistro ( '[email protected] ' ) ,
30
+ Suspension :
EmailDistro ( '[email protected] ' ) ,
31
+ Termination :
EmailDistro ( '[email protected] ' ) ,
32
+ Closing :
EmailDistro ( '[email protected] ' ) ,
33
+ } ;
34
+
25
35
export const ProjectWorkflow = defineWorkflow ( {
26
36
id : '8297b9a1-b50b-4ec9-9021-a0347424b3ec' ,
27
37
name : 'Project' ,
@@ -254,10 +264,7 @@ export const ProjectWorkflow = defineWorkflow({
254
264
to : Step . Active ,
255
265
label : 'Confirm Project 🎉' ,
256
266
type : Type . Approve ,
257
- notifiers : [
258
- FinancialApprovers ,
259
-
260
- ] ,
267
+ notifiers : [ FinancialApprovers , Distros . Approval , Distros . Projects ] ,
261
268
} ,
262
269
'Pending Finance Confirmation -> Pending Regional Director Approval' : {
263
270
from : Step . PendingFinanceConfirmation ,
@@ -306,30 +313,21 @@ export const ProjectWorkflow = defineWorkflow({
306
313
to : Step . DiscussingChangeToPlan ,
307
314
label : 'Discuss Change to Plan' ,
308
315
type : Type . Neutral ,
309
- notifiers : [
310
- FinancialApprovers ,
311
-
312
- ] ,
316
+ notifiers : [ FinancialApprovers , Distros . Extension , Distros . Revision ] ,
313
317
} ,
314
318
'Active -> Discussing Termination' : {
315
319
from : [ Step . Active , Step . ActiveChangedPlan ] ,
316
320
to : Step . DiscussingTermination ,
317
321
label : 'Discuss Termination' ,
318
322
type : Type . Neutral ,
319
- notifiers : [
320
- FinancialApprovers ,
321
-
322
- ] ,
323
+ notifiers : [ FinancialApprovers , Distros . Extension , Distros . Revision ] ,
323
324
} ,
324
325
'Active -> Finalizing Completion' : {
325
326
from : [ Step . Active , Step . ActiveChangedPlan ] ,
326
327
to : Step . FinalizingCompletion ,
327
328
label : 'Finalize Completion' ,
328
329
type : Type . Approve ,
329
- notifiers : [
330
- FinancialApprovers ,
331
-
332
- ] ,
330
+ notifiers : [ FinancialApprovers , Distros . Extension , Distros . Revision ] ,
333
331
} ,
334
332
335
333
// Disucssing Change To Plan
@@ -338,27 +336,21 @@ export const ProjectWorkflow = defineWorkflow({
338
336
to : Step . PendingChangeToPlanApproval ,
339
337
label : 'Submit for Approval' ,
340
338
type : Type . Approve ,
341
- notifiers : [
342
-
343
- ] ,
339
+ notifiers : [ Distros . Extension , Distros . Revision ] ,
344
340
} ,
345
341
'Discussing Change To Plan -> Discussing Suspension' : {
346
342
from : Step . DiscussingChangeToPlan ,
347
343
to : Step . DiscussingSuspension ,
348
344
label : 'Discuss Suspension' ,
349
345
type : Type . Neutral ,
350
- notifiers : [
351
-
352
- ] ,
346
+ notifiers : [ Distros . Extension , Distros . Revision ] ,
353
347
} ,
354
348
'Discussing Change To Plan -> Back To Active' : {
355
349
from : Step . DiscussingChangeToPlan ,
356
350
to : BackToActive ,
357
351
label : 'Will Not Change Plan' ,
358
352
type : Type . Neutral ,
359
- notifiers : [
360
-
361
- ] ,
353
+ notifiers : [ Distros . Extension , Distros . Revision ] ,
362
354
} ,
363
355
364
356
// Pending Change To Plan Approval
@@ -367,30 +359,21 @@ export const ProjectWorkflow = defineWorkflow({
367
359
to : Step . DiscussingChangeToPlan ,
368
360
label : 'Send Back for Corrections' ,
369
361
type : Type . Reject ,
370
- notifiers : EmailDistros (
371
-
372
-
373
- ) ,
362
+ notifiers : [ Distros . Extension , Distros . Revision ] ,
374
363
} ,
375
364
'Pending Change To Plan Approval -> Pending Change To Plan Confirmation' : {
376
365
from : Step . PendingChangeToPlanApproval ,
377
366
to : Step . PendingChangeToPlanConfirmation ,
378
367
label : 'Approve Change to Plan' ,
379
368
type : Type . Approve ,
380
- notifiers : EmailDistros (
381
-
382
-
383
- ) ,
369
+ notifiers : [ Distros . Extension , Distros . Revision ] ,
384
370
} ,
385
371
'Pending Change To Plan Approval -> Back To Active' : {
386
372
from : Step . PendingChangeToPlanApproval ,
387
373
to : BackToActive ,
388
374
label : 'Reject Change to Plan' ,
389
375
type : Type . Reject ,
390
- notifiers : EmailDistros (
391
-
392
-
393
- ) ,
376
+ notifiers : [ Distros . Extension , Distros . Revision ] ,
394
377
} ,
395
378
396
379
// Pending Change To Plan Confirmation
@@ -399,30 +382,21 @@ export const ProjectWorkflow = defineWorkflow({
399
382
to : Step . DiscussingChangeToPlan ,
400
383
label : 'Send Back for Corrections' ,
401
384
type : Type . Reject ,
402
- notifiers : [
403
- FinancialApprovers ,
404
-
405
- ] ,
385
+ notifiers : [ FinancialApprovers , Distros . Extension , Distros . Revision ] ,
406
386
} ,
407
387
'Pending Change To Plan Confirmation -> Active Changed Plan' : {
408
388
from : Step . PendingChangeToPlanConfirmation ,
409
389
to : Step . ActiveChangedPlan ,
410
390
label : 'Approve Change to Plan' ,
411
391
type : Type . Approve ,
412
- notifiers : [
413
- FinancialApprovers ,
414
-
415
- ] ,
392
+ notifiers : [ FinancialApprovers , Distros . Extension , Distros . Revision ] ,
416
393
} ,
417
394
'Pending Change To Plan Confirmation -> Back To Active' : {
418
395
from : Step . PendingChangeToPlanConfirmation ,
419
396
to : BackToActive ,
420
397
label : 'Reject Change to Plan' ,
421
398
type : Type . Reject ,
422
- notifiers : [
423
- FinancialApprovers ,
424
-
425
- ] ,
399
+ notifiers : [ FinancialApprovers , Distros . Extension , Distros . Revision ] ,
426
400
} ,
427
401
428
402
// Discussing Suspension
@@ -431,14 +405,14 @@ export const ProjectWorkflow = defineWorkflow({
431
405
to : Step . PendingSuspensionApproval ,
432
406
label : 'Submit for Approval' ,
433
407
type : Type . Neutral ,
434
- notifiers :
EmailDistros ( '[email protected] ' ) ,
408
+ notifiers : Distros . Suspension ,
435
409
} ,
436
410
'Discussing Suspension -> Back To Active' : {
437
411
from : Step . DiscussingSuspension ,
438
412
to : BackToActive ,
439
413
label : 'Will Not Suspend' ,
440
414
type : Type . Neutral ,
441
- notifiers :
EmailDistros ( '[email protected] ' ) ,
415
+ notifiers : Distros . Suspension ,
442
416
} ,
443
417
444
418
// Pending Suspension Approval
@@ -447,21 +421,21 @@ export const ProjectWorkflow = defineWorkflow({
447
421
to : Step . DiscussingSuspension ,
448
422
label : 'Send Back for Corrections' ,
449
423
type : Type . Reject ,
450
- notifiers :
EmailDistros ( '[email protected] ' ) ,
424
+ notifiers : Distros . Suspension ,
451
425
} ,
452
426
'Pending Suspension Approval -> Suspended' : {
453
427
from : Step . PendingSuspensionApproval ,
454
428
to : Step . Suspended ,
455
429
label : 'Approve Suspension' ,
456
430
type : Type . Approve ,
457
- notifiers :
EmailDistros ( '[email protected] ' ) ,
431
+ notifiers : Distros . Suspension ,
458
432
} ,
459
433
'Pending Suspension Approval -> Back To Active' : {
460
434
from : Step . PendingSuspensionApproval ,
461
435
to : BackToActive ,
462
436
label : 'Reject Suspension' ,
463
437
type : Type . Reject ,
464
- notifiers :
EmailDistros ( '[email protected] ' ) ,
438
+ notifiers : Distros . Suspension ,
465
439
} ,
466
440
467
441
// Suspended
@@ -470,14 +444,14 @@ export const ProjectWorkflow = defineWorkflow({
470
444
to : Step . DiscussingReactivation ,
471
445
label : 'Discuss Reactivation' ,
472
446
type : Type . Neutral ,
473
- notifiers :
EmailDistros ( '[email protected] ' ) ,
447
+ notifiers : Distros . Suspension ,
474
448
} ,
475
449
'Suspended & Discussing Reactivation -> Discussing Termination' : {
476
450
from : [ Step . Suspended , Step . DiscussingReactivation ] ,
477
451
to : Step . DiscussingTermination ,
478
452
label : 'Discuss Termination' ,
479
453
type : Type . Neutral ,
480
- notifiers :
EmailDistros ( '[email protected] ' ) ,
454
+ notifiers : Distros . Suspension ,
481
455
} ,
482
456
483
457
// Discussing Reactivation
@@ -486,7 +460,7 @@ export const ProjectWorkflow = defineWorkflow({
486
460
to : Step . PendingReactivationApproval ,
487
461
label : 'Submit for Approval' ,
488
462
type : Type . Approve ,
489
- notifiers :
EmailDistros ( '[email protected] ' ) ,
463
+ notifiers : Distros . Suspension ,
490
464
} ,
491
465
492
466
// Pending Reactivation Approval
@@ -495,21 +469,21 @@ export const ProjectWorkflow = defineWorkflow({
495
469
to : Step . ActiveChangedPlan ,
496
470
label : 'Approve Reactivation' ,
497
471
type : Type . Approve ,
498
- notifiers :
EmailDistros ( '[email protected] ' ) ,
472
+ notifiers : Distros . Suspension ,
499
473
} ,
500
474
'Pending Reactivation Approval -> Discussing Reactivation' : {
501
475
from : Step . PendingReactivationApproval ,
502
476
to : Step . DiscussingReactivation ,
503
477
label : 'Send Back for Corrections' ,
504
478
type : Type . Reject ,
505
- notifiers :
EmailDistros ( '[email protected] ' ) ,
479
+ notifiers : Distros . Suspension ,
506
480
} ,
507
481
'Pending Reactivation Approval -> Discussing Termination' : {
508
482
from : Step . PendingReactivationApproval ,
509
483
to : Step . DiscussingTermination ,
510
484
label : 'Discuss Termination' ,
511
485
type : Type . Neutral ,
512
- notifiers :
EmailDistros ( '[email protected] ' ) ,
486
+ notifiers : Distros . Suspension ,
513
487
} ,
514
488
515
489
// Discussing Termination
@@ -518,7 +492,7 @@ export const ProjectWorkflow = defineWorkflow({
518
492
to : Step . PendingTerminationApproval ,
519
493
label : 'Submit for Approval' ,
520
494
type : Type . Approve ,
521
- notifiers :
EmailDistros ( '[email protected] ' ) ,
495
+ notifiers : Distros . Termination ,
522
496
} ,
523
497
'Discussing Termination -> Back To Most Recent' : {
524
498
from : Step . DiscussingTermination ,
@@ -530,7 +504,7 @@ export const ProjectWorkflow = defineWorkflow({
530
504
) ,
531
505
label : 'Will Not Terminate' ,
532
506
type : Type . Neutral ,
533
- notifiers :
EmailDistros ( '[email protected] ' ) ,
507
+ notifiers : Distros . Termination ,
534
508
} ,
535
509
536
510
// Pending Termination Approval
@@ -539,14 +513,14 @@ export const ProjectWorkflow = defineWorkflow({
539
513
to : Step . Terminated ,
540
514
label : 'Approve Termination' ,
541
515
type : Type . Approve ,
542
- notifiers :
EmailDistros ( '[email protected] ' ) ,
516
+ notifiers : Distros . Termination ,
543
517
} ,
544
518
'Pending Termination Approval -> Discussing Termination' : {
545
519
from : Step . PendingTerminationApproval ,
546
520
to : Step . DiscussingTermination ,
547
521
label : 'Send Back for Corrections' ,
548
522
type : Type . Reject ,
549
- notifiers :
EmailDistros ( '[email protected] ' ) ,
523
+ notifiers : Distros . Termination ,
550
524
} ,
551
525
'Pending Termination Approval -> Back To Most Recent' : {
552
526
from : Step . PendingTerminationApproval ,
@@ -558,7 +532,7 @@ export const ProjectWorkflow = defineWorkflow({
558
532
) ,
559
533
label : 'Will Not Terminate' ,
560
534
type : Type . Neutral ,
561
- notifiers :
EmailDistros ( '[email protected] ' ) ,
535
+ notifiers : Distros . Termination ,
562
536
} ,
563
537
564
538
// Finalizing Completion
@@ -567,14 +541,14 @@ export const ProjectWorkflow = defineWorkflow({
567
541
to : BackToActive ,
568
542
label : 'Still Working' ,
569
543
type : Type . Neutral ,
570
- notifiers :
EmailDistros ( '[email protected] ' ) ,
544
+ notifiers : Distros . Closing ,
571
545
} ,
572
546
'Finalizing Completion -> Completed' : {
573
547
from : Step . FinalizingCompletion ,
574
548
to : Step . Completed ,
575
549
label : 'Complete 🎉' ,
576
550
type : Type . Approve ,
577
551
conditions : RequireOngoingEngagementsToBeFinalizingCompletion ,
578
- notifiers :
EmailDistros ( '[email protected] ' ) ,
552
+ notifiers : Distros . Closing ,
579
553
} ,
580
554
} ) ;
0 commit comments