* setup application for contract

This commit is contained in:
2023-01-16 17:29:26 +01:00
parent 0b3a261ecf
commit 7d03a8563a
7 changed files with 39 additions and 27 deletions

View File

@@ -74,6 +74,7 @@ export default {
deregister() {
misapply(this.selectedContract)
this.closeModal()
this.$router.go()
}
}
}

View File

@@ -60,12 +60,15 @@ export default {
},
methods: {
...mapActions(['closeModal']),
apply(role) {
async apply(role) {
const id = this.selectedContract
if (id === null) {
router.push('/error?message=' + 'Contract not found' + '&code=404')
}
applyContract(id, role)
//contractID, prefRole, userName, userPhone, userEmail
await applyContract(id, role, this.$store.state.keycloak.keycloak.tokenParsed.name, '', this.$store.state.keycloak.keycloak.tokenParsed.email)
this.closeModal()
this.$router.go()
}
}
}

View File

@@ -73,7 +73,7 @@
<td class="text align-top text-xl pl-4 max-sm:text-base py-2">Mitarbeiter:</td>
<td class="w-full pl-2 text-lg max-sm:text-base py-2">
<ul class="list-disc pl-4">
<li v-for="person in contract.mitarbeiter" :key="person.name">
<li v-for="person in contract.employees" :key="person.name">
{{ person.name }}({{ person.role }}) {{ person.phone }}
<a :href="'mailto:' + person.email">
<font-awesome-icon class="pl-1 h-5 mt-1" icon="fa-solid fa-envelope" />