create user stuff
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<v-dialog title="Gebiet erstellen" v-model="showDialog" width="500" @close="closeDialog"
|
||||
<v-dialog v-model="showDialog" width="500" @close="closeDialog"
|
||||
@click:outside="closeDialog">
|
||||
<v-card class="pa-6 white">
|
||||
<div class="headline text-center mb-6">Gebiet erstellen
|
||||
<div class="headline text-center mb-6">
|
||||
{{ selectedArea.id ? 'Gebiet bearbeiten' : 'Gebiet erstellen' }}
|
||||
</div>
|
||||
<v-card-text>
|
||||
<v-form class="d-flex flex-column">
|
||||
<v-row class="d-flex flex-column">
|
||||
<v-text-field hide-details outlined placeholder="Gebietsname" name="name" data-vv-as="Gebietsname"
|
||||
<v-text-field hide-details outlined placeholder="Gebietsname" name="name"
|
||||
data-vv-as="Gebietsname"
|
||||
v-validate="'required'"
|
||||
v-model="selectedArea.name"/>
|
||||
<span class="input-error text-center">{{ errors.first('name') }}</span>
|
||||
@@ -40,14 +42,14 @@
|
||||
@Prop({default: false})
|
||||
private showDialog?: boolean;
|
||||
|
||||
@Prop({default: () => new Area(null)})
|
||||
@Prop({default: () => new Area({})})
|
||||
public selectedArea?: Area;
|
||||
|
||||
@AreaStore.Action('createAreaAction')
|
||||
private createAreaAction!: (areaData: any) => Promise<Area[]>;
|
||||
|
||||
@AreaStore.Action('editAreaAction')
|
||||
private editAreaAction!: (areaData: any) => Promise<Area[]>;
|
||||
private editAreaAction!: (areaData: any) => Promise<Area>;
|
||||
|
||||
private closeDialog() {
|
||||
this.$emit('closeDialog');
|
||||
@@ -62,7 +64,7 @@
|
||||
await this.createAreaAction(this.selectedArea);
|
||||
}
|
||||
} else {
|
||||
|
||||
// TODO: Show error message
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user