@konfuzio/document-validation-ui 0.1.10-dev.4 → 0.1.10-dev.6
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/assets/scss/document_edit.scss +27 -7
- package/src/assets/scss/document_name.scss +1 -1
- package/src/assets/scss/document_top_bar.scss +4 -0
- package/src/assets/scss/main.scss +1 -1
- package/src/assets/scss/variables.scss +1 -0
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +0 -11
- package/src/components/DocumentCategory.vue +2 -2
- package/src/components/DocumentDashboard.vue +3 -15
- package/src/components/DocumentEdit/DocumentEdit.vue +80 -25
- package/src/components/DocumentEdit/EditPages.vue +5 -3
- package/src/components/DocumentEdit/{SplitOverview.vue → RenameAndCategorize.vue} +9 -8
- package/src/components/DocumentEdit/index.js +1 -1
- package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +66 -30
- package/src/locales/de.json +5 -5
- package/src/locales/en.json +5 -5
- package/src/locales/es.json +18 -18
- package/src/store/document.js +14 -12
- package/src/store/edit.js +30 -14
- package/src/assets/scss/categorize_modal.scss +0 -45
- package/src/assets/scss/splitting_confirmation_modal.scss +0 -41
- package/src/components/DocumentAnnotations/CategorizeModal.vue +0 -247
- package/src/components/DocumentModals/SplittingSuggestionsModal.vue +0 -132
|
@@ -1,132 +0,0 @@
|
|
|
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
|
-
...mapState("edit", ["editMode"]),
|
|
56
|
-
...mapGetters("document", ["waitingForSplittingConfirmation"]),
|
|
57
|
-
},
|
|
58
|
-
watch: {
|
|
59
|
-
splittingSuggestions(newValue) {
|
|
60
|
-
if (newValue) {
|
|
61
|
-
this.isModalActive = true;
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
editMode(newValue) {
|
|
65
|
-
if (!newValue) {
|
|
66
|
-
this.showModal();
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
isModalActive(newValue) {
|
|
70
|
-
if (newValue) {
|
|
71
|
-
this.$nextTick(() => {
|
|
72
|
-
if (
|
|
73
|
-
this.splittingSuggestions &&
|
|
74
|
-
this.splittingSuggestions.length > 0
|
|
75
|
-
) {
|
|
76
|
-
this.$refs.bodyText.innerHTML = this.$t("split_modal_body", {
|
|
77
|
-
number_of_split_documents: this.splittingSuggestions.length,
|
|
78
|
-
});
|
|
79
|
-
} else {
|
|
80
|
-
this.$refs.bodyText.innerHTML = this.$t(
|
|
81
|
-
"split_modal_no_suggestions"
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
mounted() {
|
|
89
|
-
this.showModal();
|
|
90
|
-
|
|
91
|
-
this.$nextTick(() => {
|
|
92
|
-
if (this.recommended) {
|
|
93
|
-
this.recommended = this.recommended.toUpperCase();
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
},
|
|
97
|
-
methods: {
|
|
98
|
-
showModal() {
|
|
99
|
-
if (
|
|
100
|
-
this.splittingSuggestions &&
|
|
101
|
-
this.waitingForSplittingConfirmation(this.selectedDocument)
|
|
102
|
-
) {
|
|
103
|
-
this.isModalActive = true;
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
closeModal() {
|
|
107
|
-
const updatedDocument = [
|
|
108
|
-
{
|
|
109
|
-
name: this.selectedDocument.data_file_name,
|
|
110
|
-
category: this.selectedDocument.category,
|
|
111
|
-
pages: this.selectedDocument.pages,
|
|
112
|
-
},
|
|
113
|
-
];
|
|
114
|
-
|
|
115
|
-
this.$store.dispatch("edit/editDocument", updatedDocument);
|
|
116
|
-
|
|
117
|
-
this.$store.dispatch("display/setCategorizeModalIsActive", false);
|
|
118
|
-
this.isModalActive = false;
|
|
119
|
-
},
|
|
120
|
-
handleReviewNow() {
|
|
121
|
-
this.$store.dispatch("edit/enableEditMode");
|
|
122
|
-
this.isModalActive = false;
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
</script>
|
|
127
|
-
|
|
128
|
-
<style
|
|
129
|
-
scoped
|
|
130
|
-
lang="scss"
|
|
131
|
-
src="../../assets/scss/splitting_confirmation_modal.scss"
|
|
132
|
-
></style>
|