2020-07-10 19:51:36 +02:00
|
|
|
<template>
|
|
|
|
<BaseContextMenu
|
|
|
|
:context-event="contextEvent"
|
2020-08-12 18:11:48 +02:00
|
|
|
@close-context="closeContext"
|
2020-07-10 19:51:36 +02:00
|
|
|
>
|
2021-02-28 21:45:38 +01:00
|
|
|
<div
|
|
|
|
v-if="selectedRows.length === 1"
|
|
|
|
class="context-element"
|
|
|
|
@click="setNull"
|
|
|
|
>
|
|
|
|
<span class="d-flex">
|
|
|
|
<i class="mdi mdi-18px mdi-null text-light pr-1" /> {{ $t('message.setNull') }}
|
|
|
|
</span>
|
|
|
|
</div>
|
2020-07-10 19:51:36 +02:00
|
|
|
<div class="context-element" @click="showConfirmModal">
|
2021-02-28 21:45:38 +01:00
|
|
|
<span class="d-flex">
|
|
|
|
<i class="mdi mdi-18px mdi-delete text-light pr-1" /> {{ $tc('message.deleteRows', selectedRows.length) }}
|
|
|
|
</span>
|
2020-07-10 19:51:36 +02:00
|
|
|
</div>
|
|
|
|
</BaseContextMenu>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import BaseContextMenu from '@/components/BaseContextMenu';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'WorkspaceQueryTableContext',
|
|
|
|
components: {
|
2021-04-20 16:30:10 +02:00
|
|
|
BaseContextMenu
|
2020-07-10 19:51:36 +02:00
|
|
|
},
|
|
|
|
props: {
|
2020-07-22 18:30:52 +02:00
|
|
|
contextEvent: MouseEvent,
|
|
|
|
selectedRows: Array
|
2020-07-10 19:51:36 +02:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
showConfirmModal () {
|
2021-04-20 16:30:10 +02:00
|
|
|
this.$emit('show-delete-modal');
|
2020-07-23 19:10:14 +02:00
|
|
|
},
|
|
|
|
closeContext () {
|
2020-08-12 18:11:48 +02:00
|
|
|
this.$emit('close-context');
|
2020-07-23 19:10:14 +02:00
|
|
|
},
|
2021-02-28 21:45:38 +01:00
|
|
|
setNull () {
|
|
|
|
this.$emit('set-null');
|
|
|
|
this.closeContext();
|
2020-07-10 19:51:36 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|