display comment status on item single

This commit is contained in:
Jacson Passold 2018-08-21 01:48:52 -03:00
parent 497f919c50
commit df51fd0be2
1 changed files with 21 additions and 2 deletions

View File

@ -83,6 +83,19 @@
<p v-if="attachmentsList.length <= 0"><br>{{ $i18n.get('info_no_attachments_on_item_yet') }}</p>
</div>
</div>
<!-- Comment Status ------------------------ -->
<b-field
:addons="false"
:label="$i18n.get('label_comment_status')"
v-if="collectionCommentStatus == 'open'">
<b-switch
id="tainacan-checkbox-comment-status"
size="is-small"
true-value="open"
false-value="closed"
v-model="item.comment_status"
disabled />
</b-field>
<!-- Exposers --------------------------------------------- -->
<div>
<b-loading :active.sync="isLoadingMetadatumMappers"/>
@ -257,7 +270,8 @@
open: false,
collectionName: '',
thumbPlaceholderPath: tainacan_plugin.base_url + '/admin/images/placeholder_square.png',
urls_open: false
urls_open: false,
collectionCommentStatus: ''
}
},
components: {
@ -270,7 +284,8 @@
'fetchMetadata',
]),
...mapActions('collection', [
'fetchCollectionName'
'fetchCollectionName',
'fetchCollectionCommentStatus'
]),
...mapGetters('item', [
'getItem',
@ -354,6 +369,10 @@
// Get attachments
this.fetchAttachments(this.itemId);
// Obtains collection Comment Status
this.fetchCollectionCommentStatus(this.collectionId).then((collectionCommentStatus) => {
this.collectionCommentStatus = collectionCommentStatus;
});
}
}