@konfuzio/document-validation-ui 0.1.5-styles-refactor → 0.1.6-pre-release-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/app.css +1 -1
- package/dist/index.html +1 -1
- package/dist/js/app.js +1 -1
- package/dist/js/app.js.map +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/assets/images/MagicWandIcon.vue +16 -0
- package/src/assets/images/NotFoundIcon.vue +16 -0
- package/src/assets/images/SplitZigZag.vue +47 -14
- package/src/assets/images/StarIcon.vue +16 -0
- package/src/assets/scss/document_annotations.scss +9 -59
- package/src/assets/scss/document_category.scss +0 -1
- package/src/assets/scss/document_dashboard.scss +6 -0
- package/src/assets/scss/document_edit.scss +90 -46
- package/src/assets/scss/main.scss +67 -44
- package/src/assets/scss/splitting_confirmation_modal.scss +41 -0
- package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +153 -0
- package/src/components/DocumentAnnotations/AnnotationDetails.vue +21 -4
- package/src/components/DocumentAnnotations/AnnotationRow.vue +97 -34
- package/src/components/DocumentAnnotations/AnnotationSetActionButtons.vue +86 -0
- package/src/components/DocumentAnnotations/CategorizeModal.vue +24 -2
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +77 -81
- package/src/components/DocumentAnnotations/EmptyAnnotation.vue +16 -3
- package/src/components/DocumentAnnotations/ExtractingData.vue +3 -3
- package/src/components/DocumentAnnotations/index.js +0 -1
- package/src/components/DocumentCategory.vue +13 -5
- package/src/components/DocumentDashboard.vue +17 -6
- package/src/components/DocumentEdit/DocumentEdit.vue +208 -68
- package/src/components/DocumentEdit/EditConfirmationModal.vue +54 -0
- package/src/components/DocumentEdit/EditPages.vue +29 -18
- package/src/components/DocumentEdit/EditSidebar.vue +92 -45
- package/src/components/DocumentEdit/SidebarButtons.vue +53 -0
- package/src/components/DocumentEdit/SplitInfoBar.vue +19 -0
- package/src/components/DocumentEdit/SplitOverview.vue +4 -5
- package/src/components/{DocumentError.vue → DocumentModals/DocumentErrorModal.vue} +3 -4
- package/src/components/{NotOptimizedViewportModal.vue → DocumentModals/NotOptimizedViewportModal.vue} +2 -2
- package/src/components/DocumentModals/SplittingSuggestionsModal.vue +120 -0
- package/src/components/DocumentPage/ActionBar.vue +3 -3
- package/src/components/DocumentPage/ScrollingDocument.vue +7 -3
- package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +35 -30
- package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +3 -1
- package/src/locales/de.json +19 -6
- package/src/locales/en.json +20 -6
- package/src/locales/es.json +19 -6
- package/src/store/document.js +81 -17
- package/src/store/edit.js +67 -48
- package/src/store/project.js +14 -14
- package/src/components/DocumentAnnotations/ActionButtons.vue +0 -257
- package/src/components/DocumentAnnotations/RejectedLabels.vue +0 -96
|
@@ -1,75 +1,104 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="edit-sidebar">
|
|
3
|
-
<div class="sidebar-header">
|
|
4
|
-
<h3 class="sidebar-title">
|
|
5
|
-
{{ $t("edit_document") }}
|
|
6
|
-
</h3>
|
|
7
|
-
<p class="description">
|
|
8
|
-
{{ $t("edit_early_access") }}
|
|
9
|
-
</p>
|
|
10
|
-
<p class="description">
|
|
11
|
-
{{ $t("select_pages") }}
|
|
12
|
-
</p>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
3
|
<div class="buttons-container">
|
|
16
|
-
<div class="rotate-selected
|
|
4
|
+
<div class="rotate-selected edit-buttons">
|
|
5
|
+
<SidebarButtons
|
|
6
|
+
:show-rotate-button="true"
|
|
7
|
+
:button-disabled="buttonDisabled"
|
|
8
|
+
:button-text="$t('rotate_selected')"
|
|
9
|
+
:icon="'arrow-rotate-left'"
|
|
10
|
+
@rotate="rotateLeft"
|
|
11
|
+
/>
|
|
12
|
+
|
|
13
|
+
<SidebarButtons
|
|
14
|
+
:show-rotate-button="true"
|
|
15
|
+
:button-disabled="buttonDisabled"
|
|
16
|
+
:button-text="$t('rotate_selected')"
|
|
17
|
+
:icon="'arrow-rotate-right'"
|
|
18
|
+
@rotate="rotateRight"
|
|
19
|
+
/>
|
|
20
|
+
|
|
17
21
|
<p :class="['pages-selected', buttonDisabled && 'disabled']">
|
|
18
22
|
{{ selectedPages.length }} {{ $t("selected") }}
|
|
19
23
|
</p>
|
|
20
|
-
<b-button
|
|
21
|
-
class="rotate-button primary-button"
|
|
22
|
-
:disabled="buttonDisabled"
|
|
23
|
-
@click="rotateLeft"
|
|
24
|
-
>
|
|
25
|
-
<div class="button-content">
|
|
26
|
-
<b-icon icon="arrow-rotate-left" class="is-small" />
|
|
27
|
-
<span class="button-text">{{ $t("rotate_selected") }}</span>
|
|
28
|
-
</div>
|
|
29
|
-
</b-button>
|
|
30
|
-
<b-button
|
|
31
|
-
class="rotate-button primary-button"
|
|
32
|
-
:disabled="buttonDisabled"
|
|
33
|
-
@click="rotateRight"
|
|
34
|
-
>
|
|
35
|
-
<div class="button-content">
|
|
36
|
-
<b-icon icon="arrow-rotate-right" class="is-small" />
|
|
37
|
-
<span class="button-text">{{ $t("rotate_selected") }}</span>
|
|
38
|
-
</div>
|
|
39
|
-
</b-button>
|
|
40
24
|
</div>
|
|
41
25
|
|
|
42
|
-
<div class="rotate-all
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
26
|
+
<div class="rotate-all edit-buttons">
|
|
27
|
+
<SidebarButtons
|
|
28
|
+
:show-rotate-button="true"
|
|
29
|
+
:button-disabled="false"
|
|
30
|
+
:button-text="$t('rotate_all')"
|
|
31
|
+
:icon="'arrow-rotate-left'"
|
|
32
|
+
@rotate="rotateAllLeft"
|
|
33
|
+
/>
|
|
34
|
+
|
|
35
|
+
<SidebarButtons
|
|
36
|
+
:show-rotate-button="true"
|
|
37
|
+
:button-disabled="false"
|
|
38
|
+
:button-text="$t('rotate_all')"
|
|
39
|
+
:icon="'arrow-rotate-right'"
|
|
40
|
+
@rotate="rotateAllRight"
|
|
41
|
+
/>
|
|
51
42
|
</div>
|
|
52
43
|
</div>
|
|
44
|
+
<div class="split smart-split">
|
|
45
|
+
<b-tooltip
|
|
46
|
+
multilined
|
|
47
|
+
:active="!documentHasProposedSplit(selectedDocument)"
|
|
48
|
+
position="is-bottom"
|
|
49
|
+
class="bottom-aligned"
|
|
50
|
+
:label="tooltipInfo"
|
|
51
|
+
>
|
|
52
|
+
<b-field>
|
|
53
|
+
<b-switch
|
|
54
|
+
:value="true"
|
|
55
|
+
size="is-small"
|
|
56
|
+
v-model="switchStatus"
|
|
57
|
+
:disabled="!documentHasProposedSplit(selectedDocument)"
|
|
58
|
+
>
|
|
59
|
+
<span class="switch-text">{{ $t("smart_split") }}</span>
|
|
60
|
+
<span
|
|
61
|
+
v-if="documentHasProposedSplit(selectedDocument)"
|
|
62
|
+
class="new-badge"
|
|
63
|
+
>{{ newText }}</span
|
|
64
|
+
>
|
|
65
|
+
</b-switch>
|
|
66
|
+
</b-field>
|
|
67
|
+
</b-tooltip>
|
|
68
|
+
</div>
|
|
53
69
|
</div>
|
|
54
70
|
</template>
|
|
55
71
|
|
|
56
72
|
<script>
|
|
73
|
+
import { mapState, mapGetters } from "vuex";
|
|
74
|
+
import SidebarButtons from "./SidebarButtons";
|
|
75
|
+
|
|
57
76
|
/**
|
|
58
77
|
* This component renders buttons to rotate single pages or all pages
|
|
59
78
|
* in edit mode
|
|
60
79
|
* */
|
|
61
|
-
|
|
62
|
-
import { mapState } from "vuex";
|
|
63
|
-
|
|
64
80
|
export default {
|
|
65
81
|
name: "EditSidebar",
|
|
82
|
+
components: {
|
|
83
|
+
SidebarButtons,
|
|
84
|
+
},
|
|
66
85
|
data() {
|
|
67
86
|
return {
|
|
68
87
|
buttonDisabled: true,
|
|
88
|
+
tooltipInfo: null,
|
|
89
|
+
newText: this.$t("new"),
|
|
90
|
+
switchStatus: true,
|
|
69
91
|
};
|
|
70
92
|
},
|
|
93
|
+
props: {
|
|
94
|
+
splitSuggestionsEnabled: {
|
|
95
|
+
type: Boolean,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
71
98
|
computed: {
|
|
72
99
|
...mapState("edit", ["selectedPages"]),
|
|
100
|
+
...mapState("document", ["splittingSuggestions", "selectedDocument"]),
|
|
101
|
+
...mapGetters("document", ["documentHasProposedSplit"]),
|
|
73
102
|
},
|
|
74
103
|
watch: {
|
|
75
104
|
selectedPages(newValue) {
|
|
@@ -79,6 +108,24 @@ export default {
|
|
|
79
108
|
this.buttonDisabled = true;
|
|
80
109
|
}
|
|
81
110
|
},
|
|
111
|
+
switchStatus(newValue) {
|
|
112
|
+
if (this.splittingSuggestions && this.splittingSuggestions.length > 0)
|
|
113
|
+
this.$emit("handle-splitting-suggestions", newValue);
|
|
114
|
+
},
|
|
115
|
+
splitSuggestionsEnabled(newValue) {
|
|
116
|
+
if (!newValue) {
|
|
117
|
+
this.switchStatus = false;
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
mounted() {
|
|
122
|
+
this.$nextTick(() => {
|
|
123
|
+
this.switchStatus = this.splitSuggestionsEnabled;
|
|
124
|
+
this.tooltipInfo = this.$t("no_splitting_suggestions");
|
|
125
|
+
if (this.newText) {
|
|
126
|
+
this.newText = this.$t("new").toUpperCase();
|
|
127
|
+
}
|
|
128
|
+
});
|
|
82
129
|
},
|
|
83
130
|
methods: {
|
|
84
131
|
rotateLeft() {
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sidebar-buttons">
|
|
3
|
+
<!-- Rotate buttons -->
|
|
4
|
+
<div v-if="showRotateButton" class="rotate-button-container">
|
|
5
|
+
<b-button
|
|
6
|
+
class="rotate-button edit-mode-btn primary-button"
|
|
7
|
+
:disabled="buttonDisabled"
|
|
8
|
+
@click="rotateButton"
|
|
9
|
+
>
|
|
10
|
+
<div class="button-content">
|
|
11
|
+
<b-icon :icon="icon" class="is-small" />
|
|
12
|
+
<span class="button-text">{{ buttonText }}</span>
|
|
13
|
+
</div>
|
|
14
|
+
</b-button>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
export default {
|
|
21
|
+
name: "SidebarButtons",
|
|
22
|
+
props: {
|
|
23
|
+
showRotateButton: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: false,
|
|
26
|
+
},
|
|
27
|
+
buttonDisabled: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: true,
|
|
30
|
+
},
|
|
31
|
+
buttonText: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: null,
|
|
34
|
+
},
|
|
35
|
+
icon: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: null,
|
|
38
|
+
},
|
|
39
|
+
tooltipInfo: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: null,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
methods: {
|
|
46
|
+
rotateButton() {
|
|
47
|
+
this.$emit("rotate");
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<style scoped lang="scss" src="../../assets/scss/document_edit.scss"></style>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="split-info-bar">
|
|
3
|
+
<StarIcon />
|
|
4
|
+
<span> {{ $t("smart_split_suggestions") }}</span>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<script>
|
|
9
|
+
import StarIcon from "../../assets/images/StarIcon";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
name: "SplitInfoBar",
|
|
13
|
+
components: {
|
|
14
|
+
StarIcon,
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<style scoped lang="scss" src="../../assets/scss/document_edit.scss"></style>
|
|
@@ -112,7 +112,7 @@ export default {
|
|
|
112
112
|
},
|
|
113
113
|
computed: {
|
|
114
114
|
...mapState("document", ["selectedDocument", "pages"]),
|
|
115
|
-
...mapState("edit", ["updatedDocument", "
|
|
115
|
+
...mapState("edit", ["updatedDocument", "pagesForPostprocess"]),
|
|
116
116
|
},
|
|
117
117
|
methods: {
|
|
118
118
|
handleBackButton() {
|
|
@@ -162,11 +162,11 @@ export default {
|
|
|
162
162
|
return name.split(".").slice(0, -1).join(".");
|
|
163
163
|
},
|
|
164
164
|
getImageUrl(page) {
|
|
165
|
-
if (!this.
|
|
165
|
+
if (!this.pagesForPostprocess || !this.pages || !page) return;
|
|
166
166
|
|
|
167
167
|
// returns the first thumbnail in the pages array
|
|
168
168
|
// for each new document
|
|
169
|
-
const image = this.
|
|
169
|
+
const image = this.pagesForPostprocess.find(
|
|
170
170
|
(p) => p.number === page.pages[0].number
|
|
171
171
|
);
|
|
172
172
|
|
|
@@ -174,8 +174,7 @@ export default {
|
|
|
174
174
|
},
|
|
175
175
|
getRotation(pageId) {
|
|
176
176
|
// rotate page
|
|
177
|
-
return this.
|
|
178
|
-
?.angle;
|
|
177
|
+
return this.pagesForPostprocess?.find((p) => p.id === pageId)?.angle;
|
|
179
178
|
},
|
|
180
179
|
},
|
|
181
180
|
};
|
|
@@ -29,11 +29,10 @@
|
|
|
29
29
|
</template>
|
|
30
30
|
|
|
31
31
|
<script>
|
|
32
|
-
import
|
|
33
|
-
import ErrorIcon from "../assets/images/ErrorIcon";
|
|
32
|
+
import ErrorIcon from "../../assets/images/ErrorIcon";
|
|
34
33
|
|
|
35
34
|
export default {
|
|
36
|
-
name: "
|
|
35
|
+
name: "DocumentErrorModal",
|
|
37
36
|
components: {
|
|
38
37
|
ErrorIcon,
|
|
39
38
|
},
|
|
@@ -54,4 +53,4 @@ export default {
|
|
|
54
53
|
};
|
|
55
54
|
</script>
|
|
56
55
|
|
|
57
|
-
<style scoped lang="scss" src="
|
|
56
|
+
<style scoped lang="scss" src="../../assets/scss/document_error.scss"></style>
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</template>
|
|
25
25
|
|
|
26
26
|
<script>
|
|
27
|
-
import Illustration from "
|
|
27
|
+
import Illustration from "../../assets/images/NotOptimizedIllustration";
|
|
28
28
|
|
|
29
29
|
export default {
|
|
30
30
|
name: "NotOptimizedViewportModal",
|
|
@@ -47,5 +47,5 @@ export default {
|
|
|
47
47
|
<style
|
|
48
48
|
scoped
|
|
49
49
|
lang="scss"
|
|
50
|
-
src="
|
|
50
|
+
src="../../assets/scss/document_viewport_modal.scss"
|
|
51
51
|
></style>
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<section ref="splittingModal" class="splitting-confirmation-modal">
|
|
3
|
+
<b-modal
|
|
4
|
+
v-model="isModalActive"
|
|
5
|
+
class="modal-400"
|
|
6
|
+
:width="500"
|
|
7
|
+
:can-cancel="[]"
|
|
8
|
+
>
|
|
9
|
+
<section class="modal-card-body split-modal">
|
|
10
|
+
<div class="header">
|
|
11
|
+
<StarIcon />
|
|
12
|
+
<p class="modal-title">
|
|
13
|
+
{{
|
|
14
|
+
splittingSuggestions && splittingSuggestions.length > 0
|
|
15
|
+
? $t("split_modal_title")
|
|
16
|
+
: $t("prepare_document")
|
|
17
|
+
}}
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
<div ref="bodyText" class="content"></div>
|
|
21
|
+
</section>
|
|
22
|
+
<footer class="modal-card-foot">
|
|
23
|
+
<b-button @click="closeModal">
|
|
24
|
+
{{ $t("do_it_later") }}
|
|
25
|
+
</b-button>
|
|
26
|
+
<b-button type="is-primary" @click="handleReviewNow">
|
|
27
|
+
{{ $t("review_now") }}
|
|
28
|
+
<span class="recommended">{{ recommended }}</span>
|
|
29
|
+
</b-button>
|
|
30
|
+
</footer>
|
|
31
|
+
</b-modal>
|
|
32
|
+
</section>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import { mapGetters, mapState } from "vuex";
|
|
37
|
+
import StarIcon from "../../assets/images/StarIcon";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* This component shows a modal to inform the user about auto-splitting suggestions
|
|
41
|
+
*/
|
|
42
|
+
export default {
|
|
43
|
+
name: "SplittingSuggestionsModal",
|
|
44
|
+
components: {
|
|
45
|
+
StarIcon,
|
|
46
|
+
},
|
|
47
|
+
data() {
|
|
48
|
+
return {
|
|
49
|
+
isModalActive: false,
|
|
50
|
+
recommended: this.$t("recommended"),
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
computed: {
|
|
54
|
+
...mapState("document", ["splittingSuggestions", "selectedDocument"]),
|
|
55
|
+
...mapGetters("document", ["waitingForSplittingConfirmation"]),
|
|
56
|
+
},
|
|
57
|
+
watch: {
|
|
58
|
+
splittingSuggestions(newValue) {
|
|
59
|
+
if (newValue) {
|
|
60
|
+
this.isModalActive = true;
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
isModalActive(newValue) {
|
|
64
|
+
if (newValue) {
|
|
65
|
+
this.$nextTick(() => {
|
|
66
|
+
if (
|
|
67
|
+
this.splittingSuggestions &&
|
|
68
|
+
this.splittingSuggestions.length > 0
|
|
69
|
+
) {
|
|
70
|
+
this.$refs.bodyText.innerHTML = this.$t("split_modal_body", {
|
|
71
|
+
number_of_split_documents: this.splittingSuggestions.length,
|
|
72
|
+
});
|
|
73
|
+
} else {
|
|
74
|
+
this.$refs.bodyText.innerHTML = this.$t(
|
|
75
|
+
"split_modal_no_suggestions"
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
mounted() {
|
|
83
|
+
if (this.splittingSuggestions) {
|
|
84
|
+
this.isModalActive = true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
this.$nextTick(() => {
|
|
88
|
+
if (this.recommended) {
|
|
89
|
+
this.recommended = this.recommended.toUpperCase();
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
},
|
|
93
|
+
methods: {
|
|
94
|
+
closeModal() {
|
|
95
|
+
const updatedDocument = [
|
|
96
|
+
{
|
|
97
|
+
name: this.selectedDocument.data_file_name,
|
|
98
|
+
category: this.selectedDocument.category,
|
|
99
|
+
pages: this.selectedDocument.pages,
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
|
|
103
|
+
this.$store.dispatch("edit/editDocument", updatedDocument);
|
|
104
|
+
|
|
105
|
+
this.$store.dispatch("display/setCategorizeModalIsActive", false);
|
|
106
|
+
this.isModalActive = false;
|
|
107
|
+
},
|
|
108
|
+
handleReviewNow() {
|
|
109
|
+
this.$store.dispatch("edit/enableEditMode");
|
|
110
|
+
this.isModalActive = false;
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
</script>
|
|
115
|
+
|
|
116
|
+
<style
|
|
117
|
+
scoped
|
|
118
|
+
lang="scss"
|
|
119
|
+
src="../../assets/scss/splitting_confirmation_modal.scss"
|
|
120
|
+
></style>
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
{{ documentActionBar.text }}
|
|
9
9
|
</div>
|
|
10
10
|
<div v-if="documentActionBar.action" class="action-button">
|
|
11
|
-
<
|
|
11
|
+
<AnnotationActionButtons
|
|
12
12
|
:save-btn="documentActionBar.action !== null"
|
|
13
13
|
:is-loading="documentActionBar.loading"
|
|
14
14
|
:action-bar="true"
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
|
|
22
22
|
<script>
|
|
23
23
|
import { mapState } from "vuex";
|
|
24
|
-
import
|
|
24
|
+
import AnnotationActionButtons from "../DocumentAnnotations/AnnotationActionButtons";
|
|
25
25
|
import ActionIcon from "../../assets/images/ActionIcon";
|
|
26
26
|
|
|
27
27
|
export default {
|
|
28
28
|
name: "ActionBar",
|
|
29
29
|
components: {
|
|
30
30
|
ActionIcon,
|
|
31
|
-
|
|
31
|
+
AnnotationActionButtons,
|
|
32
32
|
},
|
|
33
33
|
computed: {
|
|
34
34
|
...mapState("display", ["documentActionBar"]),
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"
|
|
12
12
|
>
|
|
13
13
|
<ScrollingPage
|
|
14
|
-
v-for="page in editMode ?
|
|
14
|
+
v-for="page in editMode ? pagesForPostprocess : pages"
|
|
15
15
|
:key="page.number"
|
|
16
|
-
ref="scrollingPage"
|
|
17
16
|
:page="page"
|
|
18
17
|
:client-height="clientHeight"
|
|
19
18
|
:scroll-top="scrollTop"
|
|
19
|
+
ref="scrollingPage"
|
|
20
20
|
class="scrolling-page"
|
|
21
21
|
@page-jump="onPageJump"
|
|
22
22
|
/>
|
|
@@ -61,7 +61,11 @@ export default {
|
|
|
61
61
|
"selectedDocument",
|
|
62
62
|
"loading",
|
|
63
63
|
]),
|
|
64
|
-
...mapState("edit", [
|
|
64
|
+
...mapState("edit", [
|
|
65
|
+
"editMode",
|
|
66
|
+
"documentPagesListForEditMode",
|
|
67
|
+
"pagesForPostprocess",
|
|
68
|
+
]),
|
|
65
69
|
...mapState("display", [
|
|
66
70
|
"scale",
|
|
67
71
|
"documentActionBar",
|
|
@@ -27,28 +27,47 @@
|
|
|
27
27
|
v-if="!editMode && !selectedDocument.is_reviewed && !publicView"
|
|
28
28
|
class="finish-review-button-container"
|
|
29
29
|
>
|
|
30
|
-
<
|
|
31
|
-
:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
<b-tooltip
|
|
31
|
+
:active="finishDisabled"
|
|
32
|
+
position="is-bottom"
|
|
33
|
+
multilined
|
|
34
|
+
class="right-aligned finish-review"
|
|
35
|
+
>
|
|
36
|
+
<b-button
|
|
37
|
+
:class="['finish-review-btn', 'text-btn', 'primary-button']"
|
|
38
|
+
type="is-primary"
|
|
39
|
+
:disabled="finishDisabled"
|
|
40
|
+
@click.stop="handleFinishReview"
|
|
41
|
+
>
|
|
42
|
+
<span v-if="!isLoading">
|
|
43
|
+
{{ $t("finish_review") }}
|
|
44
|
+
</span>
|
|
45
|
+
|
|
46
|
+
<div v-else>
|
|
47
|
+
<b-notification :closable="false" :class="['loading-background']">
|
|
48
|
+
<b-loading :active="isLoading" :is-full-page="loadingOnFullPage">
|
|
49
|
+
<b-icon
|
|
50
|
+
icon="spinner"
|
|
51
|
+
class="fa-spin loading-icon-size spinner"
|
|
52
|
+
/>
|
|
53
|
+
</b-loading>
|
|
54
|
+
</b-notification>
|
|
55
|
+
</div>
|
|
56
|
+
</b-button>
|
|
57
|
+
|
|
58
|
+
<template #content> {{ $t("disabled_finish_review") }} </template>
|
|
59
|
+
</b-tooltip>
|
|
36
60
|
</div>
|
|
37
61
|
</div>
|
|
38
62
|
</template>
|
|
39
63
|
|
|
40
64
|
<script>
|
|
41
65
|
import { mapState } from "vuex";
|
|
42
|
-
import ActionButtons from "../DocumentAnnotations/ActionButtons";
|
|
43
66
|
|
|
44
67
|
export default {
|
|
45
68
|
name: "DocumentTopBarButtons",
|
|
46
|
-
components: {
|
|
47
|
-
ActionButtons,
|
|
48
|
-
},
|
|
49
69
|
data() {
|
|
50
70
|
return {
|
|
51
|
-
finishReviewBtn: true,
|
|
52
71
|
finishDisabled: true,
|
|
53
72
|
emptyLabels: null,
|
|
54
73
|
isLoading: false,
|
|
@@ -83,7 +102,6 @@ export default {
|
|
|
83
102
|
this.finishDisabled = !this.finishedReview;
|
|
84
103
|
},
|
|
85
104
|
methods: {
|
|
86
|
-
/** EDIT MODE */
|
|
87
105
|
closeEditMode() {
|
|
88
106
|
this.$store.dispatch("edit/disableEditMode");
|
|
89
107
|
this.$store.dispatch("edit/setSplitOverview", false);
|
|
@@ -105,24 +123,11 @@ export default {
|
|
|
105
123
|
// Enable the "next" button to go to the overview
|
|
106
124
|
this.$store.dispatch("edit/setSplitOverview", true);
|
|
107
125
|
this.$store.dispatch("edit/setSelectedPages", null);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
// Send update request to the backend
|
|
114
|
-
this.$store
|
|
115
|
-
.dispatch("edit/editDocument", this.updatedDocument)
|
|
116
|
-
.catch((error) => {
|
|
117
|
-
this.$store.dispatch("document/createErrorMessage", {
|
|
118
|
-
error,
|
|
119
|
-
serverErrorMessage: this.$t("server_error"),
|
|
120
|
-
defaultErrorMessage: this.$t("edit_error"),
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
// Close edit mode
|
|
125
|
-
this.closeEditMode();
|
|
126
|
+
} else {
|
|
127
|
+
// If we are in the overview (so more than 1 doc)
|
|
128
|
+
// or in the edit mode (only 1 doc)
|
|
129
|
+
// Show confirmation modal to user
|
|
130
|
+
this.$store.dispatch("edit/setShowEditConfirmationModal", true);
|
|
126
131
|
}
|
|
127
132
|
},
|
|
128
133
|
handleFinishReview() {
|
package/src/locales/de.json
CHANGED
|
@@ -49,8 +49,7 @@
|
|
|
49
49
|
"data_being_extracted": "Neue Daten werden extrahiert",
|
|
50
50
|
"analysing_document": "Wir analysieren Ihr Dokument.",
|
|
51
51
|
"few_minutes": "Dies könnte ein paar Minuten dauern.",
|
|
52
|
-
"
|
|
53
|
-
"rejected": "Abgelehnt",
|
|
52
|
+
"missing_annotation": "Als fehlend markieren",
|
|
54
53
|
"ann_exists": "Eine Annotation für dieses Label und Label-Set existiert bereits.",
|
|
55
54
|
"lite_mode": "Schreibgeschützt",
|
|
56
55
|
"limited_functionalities": "Sie verwenden die schreibgeschützte Version mit begrenzten Funktionalitäten.",
|
|
@@ -88,14 +87,13 @@
|
|
|
88
87
|
"categorize_document_no_category_description": "Bitten Sie den Projektmanager, eine Beschreibung dieser Kategorie hinzuzufügen, um mehr über diese Kategorie zu erfahren.",
|
|
89
88
|
"annotations_pending": "Ausstehende Annotationen",
|
|
90
89
|
"annotations_accepted": "Akzeptierte Annotationen",
|
|
91
|
-
"
|
|
90
|
+
"mark_all_missing": "Alle leeren als fehlend markieren",
|
|
92
91
|
"no_labels_to_choose": "Keine Labels",
|
|
93
92
|
"accept_group": "Alle akzeptieren",
|
|
94
93
|
"use_your_keyboard": "Benutze deine Tastatur",
|
|
95
94
|
"arrow_keys": "Navigieren",
|
|
96
95
|
"esc_key": "Exit",
|
|
97
96
|
"enter_key": "Akzeptieren oder Speichern",
|
|
98
|
-
"delete_key": "Ablehnen",
|
|
99
97
|
"decline": "Decline",
|
|
100
98
|
"server_error": "Wir haben derzeit ein Serverproblem. Bitte versuchen Sie es später noch einmal oder",
|
|
101
99
|
"get_support": "Hole dir Unterstützung",
|
|
@@ -110,8 +108,23 @@
|
|
|
110
108
|
"new_multi_ann_description": "Wählen Sie ein Datenmodell aus den vorhandenen aus und deaktivieren Sie dann die Labels, die in diesem Dokument nicht vorhanden sind.",
|
|
111
109
|
"drag_drop_columns_multi_ann": "Drag and Drop, um die Reihenfolge der Labels zu ändern",
|
|
112
110
|
"error_creating_multi_ann": "Nicht alle Annotationen wurden erfolgreich erstellt.",
|
|
113
|
-
"disabled_finish_review": "Der Abschluss der Dokumentenprüfung ist erst möglich, nachdem alle Annotationen überarbeitet wurden, unabhängig davon, ob sie akzeptiert oder abgelehnt wurden.",
|
|
114
111
|
"no_multi_ann_labelset_model": "Es gibt keine verfügbaren Label Sets, die mehrfach in diesem Dokument zu finden sind. Weitere Informationen finden Sie unter <a href='https://help.konfuzio.com/tutorials/advanced-document-extraction/index.html#multiple-annotation-sets' target='_blank'>diesem Link</a>.",
|
|
115
112
|
"single_category_in_project": "Das aktuelle Projekt hat nur eine Kategorie. Um sie ändern zu können, sollte die neue zuerst dem Projekt hinzugefügt werden. Einzelheiten dazu finden Sie unter <a href='https://help.konfuzio.com/modules/categories/index.html#add-a-category' target='_blank'>diesem Link</a>.",
|
|
116
|
-
"approved_annotations": "Die Kategorie kann nicht geändert werden, da bereits akzeptierte Annotationen oder manuell erstellte Annotationen zu diesem Dokument vorhanden sind."
|
|
113
|
+
"approved_annotations": "Die Kategorie kann nicht geändert werden, da bereits akzeptierte Annotationen oder manuell erstellte Annotationen zu diesem Dokument vorhanden sind.",
|
|
114
|
+
"restore": "Restore",
|
|
115
|
+
"disabled_finish_review": "Das Beenden der Dokumentenprüfung ist erst möglich, nachdem alle Annotationen überarbeitet wurden, unabhängig davon, ob sie akzeptiert oder als fehlend markiert wurden.",
|
|
116
|
+
"split_modal_title": "Dokument aufteilen",
|
|
117
|
+
"split_modal_body": "Wir haben Ihre Datei gescannt und <strong>{number_of_split_documents}</strong> verschiedene Dokumente gefunde. <strong>Wir empfehlen dringend,</strong> sie zu diesem Zeitpunkt aufzuteilen, da sonst alle Fortschritte, die Sie gemacht haben, aufgrund der erneuten Extraktion der Dokumentdaten verloren gehen.",
|
|
118
|
+
"do_it_later": "Ich werde es später machen",
|
|
119
|
+
"review_now": "Jetzt reviewen",
|
|
120
|
+
"recommended": "Empfohlen",
|
|
121
|
+
"smart_split": "Smart Split",
|
|
122
|
+
"smart_split_suggestions": "Unsere Smart Split-Vorschläge sind grün hervorgehoben",
|
|
123
|
+
"no_splitting_suggestions": "Dieses Dokument enthält keine Split-Vorschläge",
|
|
124
|
+
"confirm_splitting": "Sind Sie sicher, dass Sie die Änderungen bestätigen möchten?",
|
|
125
|
+
"splitting_warning": "Beachten Sie bitte, dass alle Annotationen, die Sie in diesem Dokument gemacht haben, nicht gespeichert werden, wenn Sie fortfahren.",
|
|
126
|
+
"no": "Nein",
|
|
127
|
+
"yes": "Ja",
|
|
128
|
+
"split_modal_no_suggestions": "Do you need to split the document? <strong>We strongly recommend</strong> splitting it at this stage, otherwise all the progress you’ve made will be lost in the future.",
|
|
129
|
+
"missing_from_document": "Fehlt im Dokument"
|
|
117
130
|
}
|