* apply and misapply by open contracts + modals

feature: #8
This commit is contained in:
2023-01-08 00:30:41 +01:00
parent 1872097882
commit 1f9db78a4f
12 changed files with 411 additions and 83 deletions

View File

@@ -45,3 +45,32 @@ export async function getContractById(identifier) {
router.push('/error?message=' + error.message + '&code=' + error.code)
})
}
export async function applyContract(contractID, prefRole) {
return HttpClient.post('/contract/apply', {
id: contractID,
role: prefRole
})
.then(resp => {
//TODO: send also auth token with request
return resp.data
})
.catch(error => {
console.error(error)
router.push('/error?message=' + error.message + '&code=' + error.code)
})
}
export async function misapply(contractID) {
return HttpClient.post('/contract/misapply', {
id: contractID
})
.then(resp => {
//TODO: send also auth token with request
return resp.data
})
.catch(error => {
console.error(error)
router.push('/error?message=' + error.message + '&code=' + error.code)
})
}