mirror of https://github.com/doccano/doccano.git
Prab Dhaliwal
4 years ago
10 changed files with 157 additions and 13 deletions
Split View
Diff Options
-
11app/api/views.py
-
41frontend/components/containers/annotation/ClearAnnotationsButton.vue
-
25frontend/components/containers/annotation/EntityItemBox.vue
-
51frontend/components/containers/documents/DocumentBulkDeletionButton.vue
-
1frontend/i18n/en/generic.js
-
2frontend/i18n/en/projects/dataset.js
-
5frontend/pages/projects/_id/dataset/index.vue
-
4frontend/services/annotation.service.js
-
4frontend/services/document.service.js
-
26frontend/store/documents.js
@ -0,0 +1,41 @@ |
|||
<template> |
|||
<div> |
|||
<v-btn |
|||
:disabled="false" |
|||
class="text-capitalize" |
|||
outlined |
|||
@click="handleClear()" |
|||
> |
|||
{{ "Clear Annotations" }} |
|||
</v-btn> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapState, mapActions } from 'vuex' |
|||
|
|||
export default { |
|||
components: { |
|||
|
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
dialog: false |
|||
} |
|||
}, |
|||
|
|||
computed: { |
|||
...mapState('documents', ['selected']) |
|||
}, |
|||
|
|||
methods: { |
|||
...mapActions('documents', ['clearAnnotations']), |
|||
|
|||
handleClear() { |
|||
const projectId = this.$route.params.id |
|||
this.clearAnnotations(projectId) |
|||
} |
|||
} |
|||
} |
|||
</script> |
@ -0,0 +1,51 @@ |
|||
<template> |
|||
<div> |
|||
<v-btn |
|||
:disabled="!total" |
|||
class="text-capitalize" |
|||
outlined |
|||
@click="dialog=true" |
|||
> |
|||
{{ $t('generic.deleteAll') }} |
|||
</v-btn> |
|||
<v-dialog |
|||
v-model="dialog" |
|||
width="800" |
|||
> |
|||
<confirm-form |
|||
:title="$t('dataset.deleteBulkDocumentsTitle')" |
|||
:message="$t('dataset.deleteBulkDocumentsMessage')" |
|||
:button-true-text="$t('generic.yes')" |
|||
:button-false-text="$t('generic.cancel')" |
|||
item-key="text" |
|||
@ok="deleteAllDocuments($route.params.id);dialog=false" |
|||
@cancel="dialog=false" |
|||
/> |
|||
</v-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapState, mapActions } from 'vuex' |
|||
import ConfirmForm from '@/components/organisms/utils/ConfirmForm' |
|||
|
|||
export default { |
|||
components: { |
|||
ConfirmForm |
|||
}, |
|||
|
|||
data() { |
|||
return { |
|||
dialog: false |
|||
} |
|||
}, |
|||
|
|||
computed: { |
|||
...mapState('documents', ['total']) |
|||
}, |
|||
|
|||
methods: { |
|||
...mapActions('documents', ['deleteAllDocuments']) |
|||
} |
|||
} |
|||
</script> |
Write
Preview
Loading…
Cancel
Save