* integration with backend
feature: no-task
This commit is contained in:
@@ -124,7 +124,16 @@ export default {
|
||||
const isFormCorrect = await this.v$.$validate()
|
||||
if (!isFormCorrect) return
|
||||
|
||||
serviceCreateContract(this.id, this.name, this.auftraggeber, this.password)
|
||||
await serviceCreateContract(this.id, this.name, this.auftraggeber, this.password)
|
||||
.then(resp => {
|
||||
//TODO: send also auth token with request
|
||||
this.$router.go()
|
||||
return resp.data
|
||||
})
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
router.push('/error?message=' + error.message + '&code=' + error.code)
|
||||
})
|
||||
this.closeModal()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
tabindex="-1"
|
||||
class="fixed top-0 left-0 right-0 z-50 flex justify-center text-center p-4 overflow-x-hidden overflow-y-auto md:inset-0 h-modal md:h-full">
|
||||
<div class="relative w-full h-full max-w-md md:h-auto">
|
||||
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700" @click="closeModal()">
|
||||
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
|
||||
<button
|
||||
type="button"
|
||||
class="absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"
|
||||
data-modal-hide="popup-modal">
|
||||
data-modal-hide="popup-modal"
|
||||
@click="closeModal()">
|
||||
<svg
|
||||
aria-hidden="true"
|
||||
class="w-5 h-5"
|
||||
|
||||
Reference in New Issue
Block a user