Checks if metadata is repository level before deleting it on store.

This commit is contained in:
mateuswetah 2022-08-23 11:40:28 -03:00
parent b080a40111
commit 1dc9340b5d
3 changed files with 3 additions and 4 deletions

View File

@ -103,7 +103,7 @@
:class="{'is-loading': runButtonLoading}"
@click.prevent="runExporter()"
:disabled="!formIsValid()"
class="button is-pulled-right is-turquoise5">
class="button is-pulled-right is-success">
{{ $i18n.get('run') }}
</button>
</div>

View File

@ -190,7 +190,7 @@ export default {
}
}
.document-buttons-row {
bottom: -6px;
bottom: -12px;
left: 0.875em;
position: absolute;
}

View File

@ -179,8 +179,7 @@ export const deleteMetadatum = ({commit}, {collectionId, metadatumId, isReposito
axios.tainacan.delete(endpoint)
.then(res => {
const metadatum = res.data;
if (metadatum.metadata_section_id)
if (metadatum.metadata_section_id && !isRepositoryLevel)
commit('deleteMetadatumInsideMetadataSection', metadatum)
else
commit('deleteMetadatum', metadatum);