#72 epic refactoring
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<v-tab value="game">
|
||||
<v-icon icon="mdi-pencil"></v-icon> {{ id == 'add' ? l.createGame : l.editGame }}
|
||||
</v-tab>
|
||||
<v-tab value="gameDesigner" v-if="object.scenario">
|
||||
<v-tab value="gameDesigner" v-if="this.id != 'add'">
|
||||
<v-icon icon="mdi-movie-open-outline"></v-icon> {{ l.gameDesigner }}
|
||||
</v-tab>
|
||||
</v-tabs>
|
||||
@@ -13,7 +13,7 @@
|
||||
<v-form class="pa-4" v-model="valid">
|
||||
<v-text-field :label="l.name" v-model="object.name" :rules="[rules.required]"></v-text-field>
|
||||
<v-textarea :label="l.description" v-model="object.description"></v-textarea>
|
||||
<v-select :label="l.scenario" :items="scenarios" v-model="object.scenario" item-title="name" item-value="id"></v-select>
|
||||
<v-select :label="l.scenario" :items="scenarios" :disabled="this.id != 'add'" v-model="object.scenario" item-title="name" item-value="id"></v-select>
|
||||
</v-form>
|
||||
</v-tabs-window-item>
|
||||
<v-tabs-window-item value="gameDesigner">
|
||||
@@ -62,9 +62,8 @@ export default {
|
||||
async save(params) {
|
||||
this.loading = true;
|
||||
try {
|
||||
console.log('saving', this.object)
|
||||
this.debug('saving', this.object)
|
||||
let result = await this.$api.game.save(this.object);
|
||||
//Object.assign(this.object, result.data.object);
|
||||
this.object.id = result.data.object.id;
|
||||
if (this.id == 'add') {
|
||||
this.$router.replace({ params: { id: this.object.id } });
|
||||
|
||||
Reference in New Issue
Block a user