Creature properties now duplicate with up to 50 children

This commit is contained in:
Stefan Zermatten
2021-04-11 14:47:41 +02:00
parent d87524418a
commit bfb860605f
8 changed files with 93 additions and 15 deletions

View File

@@ -53,6 +53,7 @@
embedded
:_id="selected"
@removed="selected = undefined"
@duplicated="id => selected = id"
/>
</template>
</tree-detail-layout>

View File

@@ -158,12 +158,12 @@ export default {
methods: {
getPropertyName,
duplicate(){
duplicateProperty.call({_id: this.currentId}, (error) => {
duplicateProperty.call({_id: this.currentId}, (error, id) => {
if (error) {
console.error(error);
}
if (this.embedded){
this.$emit('duplicated');
this.$emit('duplicated', id);
} else {
this.$store.dispatch('popDialogStack');
}