@@ -158,7 +158,17 @@
|
||||
"name": "Get Open Contracts",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": []
|
||||
"header": [],
|
||||
"url": {
|
||||
"raw": "{{url}}/contracts/open",
|
||||
"host": [
|
||||
"{{url}}"
|
||||
],
|
||||
"path": [
|
||||
"contracts",
|
||||
"open"
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": [
|
||||
{
|
||||
@@ -167,13 +177,13 @@
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": {
|
||||
"raw": "{{url}}/contracts/register",
|
||||
"raw": "{{url}}/contracts/open",
|
||||
"host": [
|
||||
"{{url}}"
|
||||
],
|
||||
"path": [
|
||||
"contracts",
|
||||
"register"
|
||||
"open"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -73,8 +73,8 @@ const router = createRouter({
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/contracts/register',
|
||||
name: 'contractRegistration',
|
||||
path: '/contracts/open',
|
||||
name: 'openContracts',
|
||||
component: () => import('../views/OpenContractsView.vue'),
|
||||
meta: {
|
||||
requiresAuth: true
|
||||
|
||||
@@ -20,7 +20,7 @@ export async function getContracts() {
|
||||
//Auth: provide auth token in request
|
||||
//OnError: redirect to page /error?message=somemessage&code=404
|
||||
export async function getOpenContracts() {
|
||||
return HttpClient.get('contracts/register') //TODO: provide here auth header
|
||||
return HttpClient.get('contracts/open') //TODO: provide here auth header
|
||||
.then(resp => {
|
||||
return resp.data.openContracts
|
||||
})
|
||||
|
||||
@@ -21,7 +21,7 @@ import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||
Create Auftrag
|
||||
</button>
|
||||
</RouterLink>
|
||||
<RouterLink v-if="isEmployee" to="/contracts/register">
|
||||
<RouterLink v-if="isEmployee" to="/contracts/open">
|
||||
<button
|
||||
class="bg-emerald-500 text-white active:bg-emerald-600 font-bold uppercase text-xs px-4 py-2 rounded shadow hover:shadow-md outline-none focus:outline-none mr-1 mb-1 ease-linear transition-all duration-150"
|
||||
type="button">
|
||||
|
||||
Reference in New Issue
Block a user