Skip to content

Commit 5993af6

Browse files
committed
Engagement Status not Step
1 parent d96b4dd commit 5993af6

File tree

1 file changed

+42
-42
lines changed

1 file changed

+42
-42
lines changed

src/components/engagement/workflow/engagement-workflow.ts

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { defineContext, defineWorkflow } from '../../workflow/define-workflow';
22
import { TransitionType as Type } from '../../workflow/dto';
3-
import { EngagementStatus as Step } from '../dto';
3+
import { EngagementStatus as Status } from '../dto';
44
import { EngagementWorkflowEvent } from './dto';
55
import {
66
BackTo,
@@ -14,126 +14,126 @@ import {
1414
export const EngagementWorkflow = defineWorkflow({
1515
id: '0d0a59f6-c5f0-4c1d-bd5f-7b2814c76812',
1616
name: 'Engagement',
17-
states: Step,
17+
states: Status,
1818
event: EngagementWorkflowEvent,
1919
context: defineContext<ResolveEngagementParams>,
2020
})({
2121
Reject: {
22-
from: Step.InDevelopment,
23-
to: Step.Rejected,
22+
from: Status.InDevelopment,
23+
to: Status.Rejected,
2424
label: 'Reject',
2525
type: Type.Reject,
2626
},
2727
'End Development': {
28-
from: Step.InDevelopment,
29-
to: Step.DidNotDevelop,
28+
from: Status.InDevelopment,
29+
to: Status.DidNotDevelop,
3030
label: 'End Development',
3131
type: Type.Reject,
3232
},
3333
'Approve to Active': {
34-
from: Step.InDevelopment,
35-
to: Step.Active,
34+
from: Status.InDevelopment,
35+
to: Status.Active,
3636
label: 'Approve',
3737
type: Type.Approve,
3838
},
3939
'Discuss Change To Plan': {
40-
from: [Step.Active, Step.ActiveChangedPlan],
41-
to: Step.DiscussingChangeToPlan,
40+
from: [Status.Active, Status.ActiveChangedPlan],
41+
to: Status.DiscussingChangeToPlan,
4242
label: 'Discuss Change to Plan',
4343
type: Type.Neutral,
4444
},
4545
'Discuss Suspension': {
46-
from: [Step.Active, Step.ActiveChangedPlan],
47-
to: Step.DiscussingSuspension,
46+
from: [Status.Active, Status.ActiveChangedPlan],
47+
to: Status.DiscussingSuspension,
4848
label: 'Discuss Susupension',
4949
type: Type.Neutral,
5050
},
5151
'Discuss Termination': {
5252
from: [
53-
Step.Active,
54-
Step.ActiveChangedPlan,
55-
Step.DiscussingSuspension,
56-
Step.Suspended,
57-
Step.DiscussingReactivation,
53+
Status.Active,
54+
Status.ActiveChangedPlan,
55+
Status.DiscussingSuspension,
56+
Status.Suspended,
57+
Status.DiscussingReactivation,
5858
],
59-
to: Step.DiscussingTermination,
59+
to: Status.DiscussingTermination,
6060
label: 'Discuss Termination',
6161
type: Type.Neutral,
6262
},
6363
'Finalize Completion': {
64-
from: [Step.Active, Step.ActiveChangedPlan],
65-
to: Step.FinalizingCompletion,
64+
from: [Status.Active, Status.ActiveChangedPlan],
65+
to: Status.FinalizingCompletion,
6666
label: 'Finalize Completion',
6767
type: Type.Approve,
6868
},
6969
'Approve Change to Plan': {
70-
from: Step.DiscussingChangeToPlan,
71-
to: Step.ActiveChangedPlan,
70+
from: Status.DiscussingChangeToPlan,
71+
to: Status.ActiveChangedPlan,
7272
label: 'Approve Change to Plan',
7373
type: Type.Approve,
7474
},
7575
'Will Not Change Plan': {
76-
from: Step.DiscussingChangeToPlan,
76+
from: Status.DiscussingChangeToPlan,
7777
to: BackToActive,
7878
label: 'Will Not Change Plan',
7979
type: Type.Neutral,
8080
},
8181
'Discussing Change to Plan -> Discussing Suspension': {
82-
from: [Step.DiscussingChangeToPlan],
83-
to: Step.DiscussingSuspension,
82+
from: [Status.DiscussingChangeToPlan],
83+
to: Status.DiscussingSuspension,
8484
label: 'Discuss Susupension',
8585
type: Type.Neutral,
8686
},
8787
'Approve Suspension': {
88-
from: Step.DiscussingSuspension,
89-
to: Step.Suspended,
88+
from: Status.DiscussingSuspension,
89+
to: Status.Suspended,
9090
label: 'Approve Suspension',
9191
type: Type.Approve,
9292
},
9393
'Will Not Suspend': {
94-
from: Step.DiscussingSuspension,
94+
from: Status.DiscussingSuspension,
9595
to: BackToActive,
9696
label: 'Will Not Suspend',
9797
type: Type.Neutral,
9898
},
9999
'Discuss Reactivation': {
100-
from: Step.Suspended,
101-
to: Step.DiscussingReactivation,
100+
from: Status.Suspended,
101+
to: Status.DiscussingReactivation,
102102
label: 'Discuss Reactivation',
103103
type: Type.Neutral,
104104
},
105105
'Approve Reactivation': {
106-
from: Step.DiscussingReactivation,
107-
to: Step.ActiveChangedPlan,
106+
from: Status.DiscussingReactivation,
107+
to: Status.ActiveChangedPlan,
108108
label: 'Approve Reactivation',
109109
type: Type.Approve,
110110
},
111111
'End Termination Discussion': {
112-
from: Step.DiscussingTermination,
112+
from: Status.DiscussingTermination,
113113
to: BackTo(
114-
Step.Active,
115-
Step.ActiveChangedPlan,
116-
Step.DiscussingReactivation,
117-
Step.Suspended,
114+
Status.Active,
115+
Status.ActiveChangedPlan,
116+
Status.DiscussingReactivation,
117+
Status.Suspended,
118118
),
119119
label: 'Will Not Terminate',
120120
type: Type.Neutral,
121121
},
122122
'Approve Termination': {
123-
from: Step.DiscussingTermination,
124-
to: Step.Terminated,
123+
from: Status.DiscussingTermination,
124+
to: Status.Terminated,
125125
label: 'Approve Termination',
126126
type: Type.Approve,
127127
},
128128
'Not Ready for Completion': {
129-
from: Step.FinalizingCompletion,
129+
from: Status.FinalizingCompletion,
130130
to: BackToActive,
131131
label: 'Still Working',
132132
type: Type.Neutral,
133133
},
134134
Complete: {
135-
from: Step.FinalizingCompletion,
136-
to: Step.Completed,
135+
from: Status.FinalizingCompletion,
136+
to: Status.Completed,
137137
label: 'Complete 🎉',
138138
type: Type.Approve,
139139
},

0 commit comments

Comments
 (0)