Iterated on XP system

This commit is contained in:
Stefan Zermatten
2020-06-05 21:48:28 +02:00
parent d1e7eb2fa0
commit db1ae5db3d
7 changed files with 163 additions and 60 deletions

View File

@@ -8,12 +8,6 @@
@push="push"
@pull="pull"
/>
<p
v-if="error"
class="error"
>
{{ error }}
</p>
<div
slot="actions"
class="layout row justify-end"
@@ -21,7 +15,6 @@
<v-btn
flat
:disabled="!valid"
:loading="loading"
@click="insertExperience"
>
Insert
@@ -67,26 +60,20 @@ export default {
schema: schema,
validationContext: schema.newContext(),
debounceTime: 0,
loading: false,
error: undefined,
};
},
methods:{
insertExperience(){
this.loading = true;
let experience = this.schema.clean(this.model);
insertExperience.call({
let id = insertExperience.call({
experience,
creatureIds: this.creatureIds,
}, (error) => {
this.loading = false;
if (error){
this.error = error.message || error;
console.error(error);
} else {
this.$store.dispatch('popDialogStack');
}
});
this.$store.dispatch('popDialogStack', id);
}
}
}