Sequence edition now begins with every metadata collapsed.

This commit is contained in:
Mateus Machado Luna 2019-07-05 08:59:48 -03:00
parent b1e83b5574
commit 1635b3e603
1 changed files with 7 additions and 1 deletions

View File

@ -908,11 +908,17 @@ export default {
loadMetadata() {
// Obtains Item Metadatum
this.fetchMetadata(this.itemId).then((metadata) => {
this.metadataCollapses = [];
if (this.isOnSequenceEdit && this.$route.query.collapses) {
this.metadataCollapses = [];
for (let i = 0; i < metadata.length; i++) {
this.metadataCollapses.push(this.$route.query.collapses[i] != undefined ? this.$route.query.collapses[i] : true);
}
} else if (this.isOnSequenceEdit && !this.$route.query.collapses) {
for (let i = 0; i < metadata.length; i++) {
this.metadataCollapses.push(true);
this.metadataCollapses[i] = false;
}
} else {
for (let i = 0; i < metadata.length; i++) {
this.metadataCollapses.push(false);