Removes 'Clear value' option of bulk edition for author metadata #354.

This commit is contained in:
mateuswetah 2020-04-09 11:18:06 -03:00
parent 89cb4f32bd
commit 82183fd486
2 changed files with 9 additions and 4 deletions

View File

@ -34,7 +34,7 @@
</template> </template>
<script> <script>
import { mapActions, mapGetters } from 'vuex'; import { mapActions } from 'vuex';
export default { export default {
props: { props: {
@ -75,7 +75,7 @@ export default {
.catch(() => this.isLoadingCurrentUser = false ); .catch(() => this.isLoadingCurrentUser = false );
}, },
loadUsers: _.debounce(function (search) { loadUsers: _.debounce(function (search) {
console.log(search)
// String update // String update
if (search != this.usersSearchQuery) { if (search != this.usersSearchQuery) {
this.usersSearchQuery = search; this.usersSearchQuery = search;

View File

@ -533,7 +533,12 @@
let validEditionActions = {}; let validEditionActions = {};
for (let [actionKey, action] of Object.entries(isMultiple ? this.editionActionsForMultiple : this.editionActionsForNotMultiple)) { for (let [actionKey, action] of Object.entries(isMultiple ? this.editionActionsForMultiple : this.editionActionsForNotMultiple)) {
if ((metadatumID != 'status' && metadatumID != 'comments') || actionKey != 'clear') if ( (metadatumID != 'status' &&
metadatumID != 'comments' &&
(this.getMetadataByID(metadatumID) && this.getMetadataByID(metadatumID).metadata_type_object && this.getMetadataByID(metadatumID).metadata_type_object.component !== 'tainacan-author')
) ||
actionKey != 'clear'
)
validEditionActions[actionKey] = action; validEditionActions[actionKey] = action;
} }