* change status as admin

feature: #13
This commit is contained in:
2023-01-13 20:56:26 +01:00
parent 155b9f56cd
commit b633c2795b
4 changed files with 116 additions and 2 deletions

View File

@@ -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
})
}