Workflow completion fixes
This commit is contained in:
@@ -377,6 +377,11 @@ const Admin = (props) => {
|
||||
}
|
||||
|
||||
const handleGetOrg = (orgId) => {
|
||||
if (orgId.length === 0) {
|
||||
alert.error("Organization ID not defined. Please contact us on https://shuffler.io if this persists logout.")
|
||||
return
|
||||
}
|
||||
|
||||
// Just use this one?
|
||||
var baseurl = globalUrl
|
||||
const url = baseurl + '/api/v1/orgs/'+orgId
|
||||
@@ -870,7 +875,8 @@ const Admin = (props) => {
|
||||
})
|
||||
.then((response) => {
|
||||
if (response.status !== 200) {
|
||||
window.location.pathname = "/workflows"
|
||||
// Ahh, this happens because they're not admin
|
||||
// window.location.pathname = "/workflows"
|
||||
return
|
||||
}
|
||||
|
||||
@@ -1359,14 +1365,14 @@ const Admin = (props) => {
|
||||
|
||||
const cancelSubscriptions = (subscription_id) => {
|
||||
console.log(selectedOrganization)
|
||||
const orgId = selectedOrganization.id
|
||||
const data = {
|
||||
"subscription_id": subscription_id,
|
||||
"action": "cancel",
|
||||
"org_id": selectedOrganization.id,
|
||||
}
|
||||
|
||||
|
||||
const url = globalUrl + `/api/v1/orgs/${selectedOrganization.id}`;
|
||||
const url = globalUrl + `/api/v1/orgs/${orgId}`;
|
||||
fetch(url, {
|
||||
mode: 'cors',
|
||||
method: 'POST',
|
||||
|
||||
@@ -382,6 +382,12 @@ const AngularWorkflow = (props) => {
|
||||
if (execution !== null && execution !== undefined) {
|
||||
setExecutionData(execution)
|
||||
setExecutionModalView(1)
|
||||
start()
|
||||
|
||||
setExecutionRequest({
|
||||
"execution_id": execution.execution_id,
|
||||
"authorization": execution.authorization,
|
||||
})
|
||||
|
||||
const newitem = removeParam("execution_id", cursearch)
|
||||
props.history.push(curpath+newitem)
|
||||
|
||||
Reference in New Issue
Block a user