Changeset View
Changeset View
Standalone View
Standalone View
assets/src/bundles/add_forge/request-dashboard.js
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | const nextStatusesFor = { | ||||
'SCHEDULED': [ | 'SCHEDULED': [ | ||||
'FIRST_LISTING_DONE', | 'FIRST_LISTING_DONE', | ||||
'FIRST_ORIGIN_LOADED' | 'FIRST_ORIGIN_LOADED' | ||||
], | ], | ||||
'FIRST_LISTING_DONE': ['FIRST_ORIGIN_LOADED'], | 'FIRST_LISTING_DONE': ['FIRST_ORIGIN_LOADED'], | ||||
'FIRST_ORIGIN_LOADED': [], | 'FIRST_ORIGIN_LOADED': [], | ||||
'REJECTED': [], | 'REJECTED': [], | ||||
'SUSPENDED': ['PENDING'], | 'SUSPENDED': ['PENDING'], | ||||
'DENIED': [] | 'UNSUCCESSFUL': [] | ||||
}; | }; | ||||
// Determine the possible next status out of the current one | // Determine the possible next status out of the current one | ||||
const nextStatuses = nextStatusesFor[currentStatus]; | const nextStatuses = nextStatusesFor[currentStatus]; | ||||
function addStatusOption(status, index) { | function addStatusOption(status, index) { | ||||
// Push the next possible status options | // Push the next possible status options | ||||
const label = swh.add_forge.formatRequestStatusName(status); | const label = swh.add_forge.formatRequestStatusName(status); | ||||
Show All 22 Lines |