@@ -115,3 +115,23 @@ export async function moveToNextStep(contractId) {
|
||||
id: contractId
|
||||
})
|
||||
}
|
||||
|
||||
export async function getStatuses(contractId) {
|
||||
return HttpClient.get('/statuses')
|
||||
.then(resp => {
|
||||
//TODO: send also auth token with request
|
||||
return resp.data.statuses
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
router.push('/error?message=' + error.message + '&code=' + error.code)
|
||||
})
|
||||
}
|
||||
|
||||
export async function changeStatus(contractId, newStatus) {
|
||||
//TODO: send also auth token with request
|
||||
return HttpClient.post('/contract/status', {
|
||||
id: contractId,
|
||||
status: newStatus
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user