Skip to content

Commit 3f9a0c6

Browse files
authored
Merge pull request #1 from annahileta/remove-old-scenarios
Removed old scenarios
2 parents 0a41f32 + 253d048 commit 3f9a0c6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+218
-2147
lines changed

client/src/App.jsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import { useEffect } from 'react';
22
import { Route, Routes, useLocation, useNavigate } from 'react-router-dom';
33
import { useDispatch } from 'react-redux';
44
import Hero from './pages/Hero/Hero.jsx';
5-
import HomeAuthenticated from './pages/Home/Home.jsx';
6-
import ManageWorkflowAuthenticated from './pages/ManageWorkflow/ManageWorkflow.jsx';
75
import TriggerWorkflowAuthenticated from './pages/TriggerWorkflow/TriggerWorkflow.jsx';
86
import TriggerWorkflowFormAuthenticated from './pages/TriggerWorkflowForm/TriggerWorkflowForm.jsx';
97
import { LoginStatus, ROUTE } from './constants.js';
@@ -32,7 +30,7 @@ function App() {
3230

3331
const { data: userInfo } = await api.acg.callbackExecute(code);
3432
dispatch(authorizeUser(LoginStatus.ACG, userInfo.name, userInfo.email));
35-
navigate(ROUTE.HOME);
33+
navigate(ROUTE.TRIGGER);
3634
dispatch(closePopupWindow());
3735
dispatch(closeLoadingCircleInPopup());
3836
};
@@ -43,9 +41,7 @@ function App() {
4341
return (
4442
<Routes>
4543
<Route path={ROUTE.ROOT} element={<Hero />} />
46-
<Route path={ROUTE.HOME} element={<HomeAuthenticated />} />
4744
<Route path={ROUTE.TRIGGER} element={<TriggerWorkflowAuthenticated />} />
48-
<Route path={ROUTE.MANAGE} element={<ManageWorkflowAuthenticated />} />
4945
<Route path={`${ROUTE.TRIGGERFORM}/:workflowId`} element={<TriggerWorkflowFormAuthenticated />} />
5046
</Routes>
5147
);

client/src/api/index.js

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -68,50 +68,6 @@ export const api = Object.freeze({
6868
},
6969
},
7070
workflows: {
71-
createWorkflowDefinition: async templateType => {
72-
try {
73-
const response = await instance.post('/workflows/create', { templateType: templateType });
74-
return response;
75-
} catch (error) {
76-
if (error.response && error.response.status === 400) {
77-
return error.response;
78-
}
79-
throw error;
80-
}
81-
},
82-
cancelWorkflowInstance: async workflow => {
83-
try {
84-
const response = await instance.put(`/workflows/${workflow.id}/instances/${workflow.instanceId}/cancel`);
85-
return response;
86-
} catch (error) {
87-
return error.response;
88-
}
89-
},
90-
publishWorkflow: async workflowId => {
91-
try {
92-
const response = await instance.post('/workflows/publish', { workflowId });
93-
94-
if (response.status === 210) {
95-
try {
96-
window.open(response.data, 'newTab', 'width=600,height=400');
97-
await new Promise(r => setTimeout(r, 3000));
98-
99-
const published = await instance.post('/workflows/publish', { workflowId });
100-
return published;
101-
} catch (error) {
102-
console.log(error);
103-
return error.response;
104-
}
105-
}
106-
107-
return response;
108-
} catch (error) {
109-
if (error.response && error.response.status >= 400) {
110-
return error.response;
111-
}
112-
throw error;
113-
}
114-
},
11571
triggerWorkflow: async (workflowId, templateType, body) => {
11672
try {
11773
const response = await instance.put(`/workflows/${workflowId}/trigger?type=${templateType}`, body);
@@ -124,27 +80,12 @@ export const api = Object.freeze({
12480
const response = await instance.get(`/workflows/definitions`);
12581
return response;
12682
},
127-
getWorkflowInstance: async workflow => {
128-
const response = await instance.get(`/workflows/${workflow.id}/instances/${workflow.instanceId}`);
129-
return response;
130-
},
131-
getWorkflowInstances: async workflowId => {
132-
const response = await instance.get(`/workflows/${workflowId}/instances`);
133-
return response;
134-
},
135-
downloadWorkflowTemplate: async templateName => {
83+
getWorkflowTriggerRequirements: async workflowId => {
13684
try {
137-
const response = await fetch(`${apiUrl}/workflows/download/${templateName}`);
138-
const blob = await response.blob();
139-
const url = window.URL.createObjectURL(blob);
140-
const a = document.createElement('a');
141-
a.href = url;
142-
a.download = templateName;
143-
document.body.appendChild(a);
144-
a.click();
145-
document.body.removeChild(a);
85+
const response = await instance.get(`/workflows/${workflowId}/requirements`);
86+
return response;
14687
} catch (error) {
147-
console.log(error);
88+
return error.response;
14889
}
14990
},
15091
},

client/src/assets/img/workflow-create.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

client/src/assets/img/workflow-manage.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.

client/src/assets/text.json

Lines changed: 4 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
},
2121
"triggerForm": {
2222
"formTitle": "Fill in details",
23+
"formTitleWithoutInputs": "This workflow does not require additional fields",
2324
"formName": "Participant Information",
2425
"fieldsI9": {
2526
"field1": "Preparer name",
@@ -39,20 +40,6 @@
3940
"field2": "HR manager email"
4041
}
4142
},
42-
"home": {
43-
"card1": {
44-
"title": "Create a workflow",
45-
"description": "Create a new workflow definition"
46-
},
47-
"card2": {
48-
"title": "Trigger a workflow",
49-
"description": "Get a list of workflow definitions and trigger a workflow instance"
50-
},
51-
"card3": {
52-
"title": "Manage workflows",
53-
"description": "Get the status of existing workflow instances and cancel instances"
54-
}
55-
},
5643
"loader": {
5744
"title": "Waiting for log in"
5845
},
@@ -67,26 +54,16 @@
6754
"descriptions": {
6855
"codeDescription": "See the source code: "
6956
},
70-
"createWorkflow": {
71-
"mainDescription": "This scenario creates a new workflow definition in the user's account. These workflows depend on eSignature templates that need to exist in the user's account before the workflows can be created. If the necessary templates do not exist in the user's account, the sample app will prompt them to download the relevant template definitions and create them in their account.",
72-
"step1Description": "The WorkflowManagement: createWorkflowDefinition method is used to create a new workflow definition in the user's account. The steps for this workflow are defined in the sample app's source code.",
73-
"step2Description": "After the new workflow definition has been created it needs to be published using the WorkflowManagement: publishOrUnPublishWorkflow method. Once the workflow has been published, new instances of that workflow can be triggered through the Trigger a workflow scenario."
74-
},
7557
"triggerWorkflow": {
7658
"mainDescription": "This scenario gets a list of published workflow definitions, gets the status of the last workflow instance triggered from each workflow definition, and triggers a new workflow instance.",
7759
"step1Description": "Display all of the workflow definitions in the user's account by calling the WorkflowManagment: getWorkflowDefinitions endpoint. Each row on this page represents a workflow definition.",
7860
"step2Description": "After the user chooses a workflow to trigger, the next step is to get the workflow definition by calling the WorkflowMangement: getWorkflowDefinition endpoint. The response for this API call includes a triggerURL property that will be used in the next step.",
79-
"step3Description": "Finally, call the WorkflowTrigger: triggerWorkflow endpoint to trigger the workflow instance. The response of this call includes the workflowInstanceUrl where the workflow participant can complete the workflow steps."
80-
},
81-
"manageWorkflow": {
82-
"mainDescription": "This scenario displays a list of workflow instances, the status of those instances, and the option to cancel them.",
83-
"step1Description": "The WorkflowInstanceManagement: getWorkflowInstances endpoint is called to get a list of the workflow instances that have been triggered by the sample app.",
84-
"step2Description": "To get the status of a given workflow instance, the WorkflowInstanceManagement: getWorkflowInstance method is called.",
85-
"step3Description": "If a user chooses to cancel a workflow instance, the WorkflowInstanceManagement: cancelWorkflowInstance method is called."
61+
"step3Description": "Finally, call the WorkflowTrigger: triggerWorkflow endpoint to trigger the workflow instance. The response of this call includes the workflowInstanceUrl where the workflow participant can complete the workflow steps."
8662
}
8763
},
8864
"workflowList": {
8965
"doNotHaveWorkflow": "You do not have any workflows in your account",
66+
"pleaseCreateWorkflow": "Please <a href=''>manually create a workflow</a> in your account before using the sample app.",
9067
"columns": {
9168
"lastRunStatus": "Status of last run",
9269
"workflowName": "Workflow name",
@@ -101,20 +78,6 @@
10178
"workflowTriggered": {
10279
"title": "Workflow triggered",
10380
"description": "To complete the workflow steps, select Continue"
104-
},
105-
"workflowDefinitionCreated": {
106-
"publish": {
107-
"description": "To publish the workflow, proceed with the Publish button",
108-
"button": "Publish"
109-
},
110-
"published": {
111-
"title": "Done",
112-
"description": "Workflow successfully published"
113-
},
114-
"error": {
115-
"title": "Workflow creation was unsuccessful",
116-
"button": "Download the template"
117-
}
11881
}
11982
},
12083
"buttons": {
@@ -123,11 +86,8 @@
12386
"behindTheScenes": "Behind the scenes",
12487
"continue": "Continue",
12588
"cancel": "Cancel",
126-
"createWorkflow": "Create new workflow ->",
12789
"triggerWorkflow": "Trigger workflow",
12890
"triggerNewWorkflow": "Trigger new workflow ->",
129-
"updateWorkflow": "Update workflow status",
130-
"cancelWorkflow": "Cancel workflow",
13191
"getStarted": "Get started",
13292
"moreInfo": "More info",
13393
"backHome": "← Back to home"
@@ -137,4 +97,4 @@
13797
"createsandbox": "https://go.docusign.com/o/sandbox/",
13898
"learnmore": "https://developers.docusign.com/docs/maestro-api/"
13999
}
140-
}
100+
}

client/src/components/Card/Card.jsx

Lines changed: 0 additions & 51 deletions
This file was deleted.

client/src/components/Card/Card.module.css

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)