@konfuzio/document-validation-ui 0.1.8-pre-release-1 → 0.1.8-pre-release-3
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/css/chunk-vendors.css +5 -0
- package/dist/index.html +1 -1
- package/dist/js/app.js +1 -1
- package/dist/js/app.js.map +1 -1
- package/dist/js/chunk-vendors.js +1 -1
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/api.js +0 -10
- package/src/assets/scss/categorize_modal.scss +1 -1
- package/src/assets/scss/choose_label_set_modal.scss +1 -1
- package/src/assets/scss/document_category.scss +11 -6
- package/src/assets/scss/document_edit.scss +1 -1
- package/src/assets/scss/{theme.scss → main.scss} +28 -30
- package/src/assets/scss/variables.scss +11 -1
- package/src/components/App.vue +2 -55
- package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +9 -12
- package/src/components/DocumentAnnotations/AnnotationContent.vue +5 -5
- package/src/components/DocumentAnnotations/AnnotationRow.vue +2 -2
- package/src/components/DocumentAnnotations/AnnotationSetActionButtons.vue +7 -4
- package/src/components/DocumentAnnotations/CategorizeModal.vue +5 -3
- package/src/components/DocumentAnnotations/DocumentAnnotations.vue +4 -4
- package/src/components/DocumentAnnotations/EmptyAnnotation.vue +5 -5
- package/src/components/DocumentAnnotations/MultiAnnotationTableOverlay.vue +42 -10
- package/src/components/DocumentCategory.vue +5 -1
- package/src/components/DocumentEdit/DocumentEdit.vue +4 -10
- package/src/components/DocumentModals/SplittingSuggestionsModal.vue +15 -3
- package/src/components/DocumentPage/DocumentPage.vue +6 -6
- package/src/components/DocumentPage/DocumentToolbar.vue +16 -14
- package/src/components/DocumentPage/MultiAnnSelection.vue +4 -2
- package/src/components/DocumentTopBar/DocumentName.vue +3 -3
- package/src/components/DocumentTopBar/DocumentTopBar.vue +8 -8
- package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +10 -25
- package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +4 -7
- package/src/main.js +1 -0
- package/src/store/document.js +6 -26
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
@columndragleave="columndragleave"
|
|
22
22
|
>
|
|
23
23
|
<b-table-column
|
|
24
|
-
v-for="(item, index) in columns"
|
|
24
|
+
v-for="(item, index) in isLoading ? [columns[0]] : columns"
|
|
25
25
|
:key="index"
|
|
26
26
|
:field="item.field"
|
|
27
27
|
:label="item.label.name"
|
|
@@ -31,14 +31,17 @@
|
|
|
31
31
|
:ref="getDropdownReference(item)"
|
|
32
32
|
aria-role="list"
|
|
33
33
|
class="header-dropdown"
|
|
34
|
-
position="is-top-
|
|
34
|
+
position="is-top-right"
|
|
35
35
|
:close-on-click="false"
|
|
36
36
|
@active-change="(e) => onDropdownChange(item, e)"
|
|
37
37
|
>
|
|
38
38
|
<template #trigger="{ active }">
|
|
39
|
-
<DraggableIcon class="draggable" />
|
|
40
|
-
<span :class="active ? 'active' : ''"
|
|
39
|
+
<DraggableIcon v-if="!isLoading" class="draggable" />
|
|
40
|
+
<span v-if="!isLoading" :class="active ? 'active' : ''"
|
|
41
|
+
>{{ column.label }}
|
|
42
|
+
</span>
|
|
41
43
|
<b-icon
|
|
44
|
+
v-if="!isLoading"
|
|
42
45
|
:icon="active ? 'angle-up' : 'angle-down'"
|
|
43
46
|
size="is-small"
|
|
44
47
|
class="arrow"
|
|
@@ -63,7 +66,7 @@
|
|
|
63
66
|
:key="label.id"
|
|
64
67
|
aria-role="listitem"
|
|
65
68
|
:disabled="label.disabled"
|
|
66
|
-
><span @click="changeLabel(item, label)">{{
|
|
69
|
+
><span @click="!label.disabled && changeLabel(item, label)">{{
|
|
67
70
|
label.name
|
|
68
71
|
}}</span></b-dropdown-item
|
|
69
72
|
>
|
|
@@ -73,7 +76,9 @@
|
|
|
73
76
|
|
|
74
77
|
<template #default="props">
|
|
75
78
|
<div class="annotations-table">
|
|
79
|
+
<b-skeleton v-if="isLoading" width="98%" height="90%" />
|
|
76
80
|
<AnnotationRow
|
|
81
|
+
v-if="!isLoading"
|
|
77
82
|
:annotation="props.row[item.field]"
|
|
78
83
|
:label="item.label"
|
|
79
84
|
:annotation-set="item.annotationSet"
|
|
@@ -120,6 +125,7 @@ export default {
|
|
|
120
125
|
editingLabels: [],
|
|
121
126
|
openDropdown: null,
|
|
122
127
|
draggingColumnIndex: null,
|
|
128
|
+
isLoading: false,
|
|
123
129
|
};
|
|
124
130
|
},
|
|
125
131
|
computed: {
|
|
@@ -136,6 +142,13 @@ export default {
|
|
|
136
142
|
this.handleColumns();
|
|
137
143
|
this.handleRows();
|
|
138
144
|
},
|
|
145
|
+
columns(columns) {
|
|
146
|
+
if (!columns || (columns && columns.length === 0)) {
|
|
147
|
+
this.$store.dispatch("selection/disableSelection");
|
|
148
|
+
this.$store.dispatch("document/resetEditAnnotation");
|
|
149
|
+
this.$store.dispatch("display/showAnnSetTable", null);
|
|
150
|
+
}
|
|
151
|
+
},
|
|
139
152
|
},
|
|
140
153
|
mounted() {
|
|
141
154
|
this.handleColumns();
|
|
@@ -212,6 +225,8 @@ export default {
|
|
|
212
225
|
},
|
|
213
226
|
|
|
214
227
|
async changeLabel(column, label) {
|
|
228
|
+
this.isLoading = true;
|
|
229
|
+
this.closeDropdown(column);
|
|
215
230
|
for (let i = 0; i < this.rows.length; i++) {
|
|
216
231
|
const annotationToUpdate = this.rows[i][column.label.id];
|
|
217
232
|
await this.$store
|
|
@@ -227,12 +242,22 @@ export default {
|
|
|
227
242
|
});
|
|
228
243
|
});
|
|
229
244
|
}
|
|
230
|
-
this.
|
|
245
|
+
this.isLoading = false;
|
|
231
246
|
},
|
|
232
247
|
|
|
233
248
|
async deleteColumn(column) {
|
|
249
|
+
this.isLoading = true;
|
|
250
|
+
this.closeDropdown(column);
|
|
251
|
+
|
|
252
|
+
const annotationsToDelete = [];
|
|
234
253
|
for (let i = 0; i < this.rows.length; i++) {
|
|
235
254
|
const annotationToDelete = this.rows[i][column.label.id];
|
|
255
|
+
if (annotationToDelete && annotationToDelete.id) {
|
|
256
|
+
annotationsToDelete.push(annotationToDelete);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
annotationsToDelete.forEach(async (annotationToDelete) => {
|
|
236
261
|
await this.$store
|
|
237
262
|
.dispatch("document/deleteAnnotation", {
|
|
238
263
|
annotationId: annotationToDelete.id,
|
|
@@ -244,8 +269,9 @@ export default {
|
|
|
244
269
|
defaultErrorMessage: this.$t("edit_error"),
|
|
245
270
|
});
|
|
246
271
|
});
|
|
247
|
-
}
|
|
248
|
-
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
this.isLoading = false;
|
|
249
275
|
},
|
|
250
276
|
|
|
251
277
|
onDropdownChange(column, open) {
|
|
@@ -253,7 +279,10 @@ export default {
|
|
|
253
279
|
this.$store.dispatch("selection/disableSelection");
|
|
254
280
|
this.$store.dispatch("document/resetEditAnnotation");
|
|
255
281
|
if (open) {
|
|
256
|
-
if (
|
|
282
|
+
if (
|
|
283
|
+
this.openDropdown &&
|
|
284
|
+
this.$refs[this.getDropdownReference(column)].length > 0
|
|
285
|
+
) {
|
|
257
286
|
this.$refs[this.openDropdown][0].toggle();
|
|
258
287
|
}
|
|
259
288
|
this.openDropdown = this.getDropdownReference(column);
|
|
@@ -265,7 +294,10 @@ export default {
|
|
|
265
294
|
},
|
|
266
295
|
|
|
267
296
|
closeDropdown(column) {
|
|
268
|
-
if (
|
|
297
|
+
if (
|
|
298
|
+
this.openDropdown &&
|
|
299
|
+
this.$refs[this.getDropdownReference(column)].length > 0
|
|
300
|
+
) {
|
|
269
301
|
this.$refs[this.getDropdownReference(column)][0].toggle();
|
|
270
302
|
this.openDropdown = null;
|
|
271
303
|
}
|
|
@@ -4,7 +4,11 @@
|
|
|
4
4
|
:active="tooltipIsShown || dropdownIsDisabled"
|
|
5
5
|
size="is-large"
|
|
6
6
|
position="is-bottom"
|
|
7
|
-
:class="[
|
|
7
|
+
:class="[
|
|
8
|
+
editMode
|
|
9
|
+
? 'right-aligned full-height-tooltip'
|
|
10
|
+
: 'left-aligned full-height-tooltip',
|
|
11
|
+
]"
|
|
8
12
|
:close-delay="tooltipCloseDelay"
|
|
9
13
|
>
|
|
10
14
|
<template #content>
|
|
@@ -184,17 +184,11 @@ export default {
|
|
|
184
184
|
if (!this.splittingSuggestions) return;
|
|
185
185
|
|
|
186
186
|
this.splittingSuggestions.map((item) => {
|
|
187
|
-
const
|
|
188
|
-
(page) => page.id === item.pages[
|
|
187
|
+
const lastPage = this.selectedDocument.pages.find(
|
|
188
|
+
(page) => page.id === item.pages[item.pages.length - 1].id
|
|
189
189
|
);
|
|
190
190
|
|
|
191
|
-
|
|
192
|
-
// only add the active splitting line from the 1st page of the second document
|
|
193
|
-
// since it's the first splitting point
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
this.handleSplittingLines(firstPage.number, "AI");
|
|
191
|
+
this.handleSplittingLines(lastPage.number, "AI");
|
|
198
192
|
});
|
|
199
193
|
},
|
|
200
194
|
applySplittingSuggestions(value) {
|
|
@@ -342,7 +336,7 @@ export default {
|
|
|
342
336
|
);
|
|
343
337
|
|
|
344
338
|
const singleSplittingSuggestion = this.splittingSuggestions.find(
|
|
345
|
-
(item) => item.pages[
|
|
339
|
+
(item) => item.pages[item.pages.length - 1].id === foundPage.id
|
|
346
340
|
);
|
|
347
341
|
|
|
348
342
|
return this.splittingSuggestions.indexOf(singleSplittingSuggestion);
|
|
@@ -52,6 +52,7 @@ export default {
|
|
|
52
52
|
},
|
|
53
53
|
computed: {
|
|
54
54
|
...mapState("document", ["splittingSuggestions", "selectedDocument"]),
|
|
55
|
+
...mapState("edit", ["editMode"]),
|
|
55
56
|
...mapGetters("document", ["waitingForSplittingConfirmation"]),
|
|
56
57
|
},
|
|
57
58
|
watch: {
|
|
@@ -60,6 +61,11 @@ export default {
|
|
|
60
61
|
this.isModalActive = true;
|
|
61
62
|
}
|
|
62
63
|
},
|
|
64
|
+
editMode(newValue) {
|
|
65
|
+
if (!newValue) {
|
|
66
|
+
this.showModal();
|
|
67
|
+
}
|
|
68
|
+
},
|
|
63
69
|
isModalActive(newValue) {
|
|
64
70
|
if (newValue) {
|
|
65
71
|
this.$nextTick(() => {
|
|
@@ -80,9 +86,7 @@ export default {
|
|
|
80
86
|
},
|
|
81
87
|
},
|
|
82
88
|
mounted() {
|
|
83
|
-
|
|
84
|
-
this.isModalActive = true;
|
|
85
|
-
}
|
|
89
|
+
this.showModal();
|
|
86
90
|
|
|
87
91
|
this.$nextTick(() => {
|
|
88
92
|
if (this.recommended) {
|
|
@@ -91,6 +95,14 @@ export default {
|
|
|
91
95
|
});
|
|
92
96
|
},
|
|
93
97
|
methods: {
|
|
98
|
+
showModal() {
|
|
99
|
+
if (
|
|
100
|
+
this.splittingSuggestions &&
|
|
101
|
+
this.waitingForSplittingConfirmation(this.selectedDocument)
|
|
102
|
+
) {
|
|
103
|
+
this.isModalActive = true;
|
|
104
|
+
}
|
|
105
|
+
},
|
|
94
106
|
closeModal() {
|
|
95
107
|
const updatedDocument = [
|
|
96
108
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
(categorizeModalIsActive ||
|
|
7
7
|
editMode ||
|
|
8
8
|
publicView ||
|
|
9
|
-
|
|
9
|
+
isDocumentReviewed) &&
|
|
10
10
|
'default-cursor',
|
|
11
11
|
page.number === currentPage && 'current-page',
|
|
12
12
|
]"
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}"
|
|
49
49
|
/>
|
|
50
50
|
<template v-if="pageInVisibleRange && !editMode">
|
|
51
|
-
<v-group v-if="!publicView || !
|
|
51
|
+
<v-group v-if="!publicView || !isDocumentReviewed" ref="entities">
|
|
52
52
|
<v-rect
|
|
53
53
|
v-for="(entity, index) in scaledEntities"
|
|
54
54
|
:key="index"
|
|
@@ -272,7 +272,6 @@ export default {
|
|
|
272
272
|
"selectedDocument",
|
|
273
273
|
"publicView",
|
|
274
274
|
"selectedEntities",
|
|
275
|
-
"documentIsReviewed",
|
|
276
275
|
]),
|
|
277
276
|
...mapState("edit", ["editMode"]),
|
|
278
277
|
...mapGetters("display", ["visiblePageRange", "bboxToRect"]),
|
|
@@ -281,6 +280,7 @@ export default {
|
|
|
281
280
|
"isAnnotationInEditMode",
|
|
282
281
|
"isDocumentReadyToBeReviewed",
|
|
283
282
|
"entitiesOnSelection",
|
|
283
|
+
"isDocumentReviewed",
|
|
284
284
|
]),
|
|
285
285
|
},
|
|
286
286
|
watch: {
|
|
@@ -330,7 +330,7 @@ export default {
|
|
|
330
330
|
this.categorizeModalIsActive ||
|
|
331
331
|
this.editMode ||
|
|
332
332
|
this.publicView ||
|
|
333
|
-
this.
|
|
333
|
+
this.isDocumentReviewed
|
|
334
334
|
)
|
|
335
335
|
return;
|
|
336
336
|
|
|
@@ -401,7 +401,7 @@ export default {
|
|
|
401
401
|
!entity ||
|
|
402
402
|
this.categorizeModalIsActive ||
|
|
403
403
|
this.publicView ||
|
|
404
|
-
this.
|
|
404
|
+
this.isDocumentReviewed
|
|
405
405
|
)
|
|
406
406
|
return;
|
|
407
407
|
|
|
@@ -445,7 +445,7 @@ export default {
|
|
|
445
445
|
!this.categorizeModalIsActive &&
|
|
446
446
|
!this.publicView &&
|
|
447
447
|
!this.editMode &&
|
|
448
|
-
!this.
|
|
448
|
+
!this.isDocumentReviewed
|
|
449
449
|
) {
|
|
450
450
|
this.$refs.stage.$el.style.cursor = "pointer";
|
|
451
451
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
class="top-aligned"
|
|
10
10
|
>
|
|
11
11
|
<div
|
|
12
|
-
v-if="!editMode && !publicView && !
|
|
12
|
+
v-if="!editMode && !publicView && !isDocumentReviewed"
|
|
13
13
|
:class="[
|
|
14
14
|
'icons icons-left',
|
|
15
15
|
editModeDisabled && 'edit-mode-disabled',
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
</b-tooltip>
|
|
25
25
|
<div
|
|
26
|
-
v-if="!editMode && !publicView && !
|
|
26
|
+
v-if="!editMode && !publicView && !isDocumentReviewed"
|
|
27
27
|
class="toolbar-divider"
|
|
28
28
|
/>
|
|
29
29
|
<div class="icons icons-right">
|
|
@@ -36,7 +36,10 @@
|
|
|
36
36
|
>
|
|
37
37
|
<PlusIcon />
|
|
38
38
|
</div>
|
|
39
|
-
<div
|
|
39
|
+
<div
|
|
40
|
+
:class="['zoom-out icon', isZoomOutExceeding && 'zoom-disabled']"
|
|
41
|
+
@click.prevent.stop="zoomOut"
|
|
42
|
+
>
|
|
40
43
|
<MinusIcon />
|
|
41
44
|
</div>
|
|
42
45
|
<div class="percentage">
|
|
@@ -81,14 +84,13 @@ export default {
|
|
|
81
84
|
"selectedDocument",
|
|
82
85
|
"recalculatingAnnotations",
|
|
83
86
|
"publicView",
|
|
84
|
-
"documentIsReviewed",
|
|
85
87
|
]),
|
|
86
|
-
...mapGetters("document", ["documentCannotBeEdited"]),
|
|
88
|
+
...mapGetters("document", ["documentCannotBeEdited", "isDocumentReviewed"]),
|
|
87
89
|
isZoomInExceeding() {
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
return this.currentPercentage === this.maxPercentage;
|
|
91
|
+
},
|
|
92
|
+
isZoomOutExceeding() {
|
|
93
|
+
return this.currentPercentage === this.defaultPercentage * 100;
|
|
92
94
|
},
|
|
93
95
|
},
|
|
94
96
|
watch: {
|
|
@@ -120,13 +122,13 @@ export default {
|
|
|
120
122
|
this.$store.dispatch("edit/enableEditMode");
|
|
121
123
|
},
|
|
122
124
|
zoomIn() {
|
|
123
|
-
if (this.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
if (this.currentPercentage === this.maxPercentage) return;
|
|
126
|
+
|
|
127
|
+
this.currentPercentage += this.defaultPercentage * 100;
|
|
128
|
+
this.updateScale((this.defaultScale * this.currentPercentage) / 100);
|
|
127
129
|
},
|
|
128
130
|
zoomOut() {
|
|
129
|
-
if (this.currentPercentage ===
|
|
131
|
+
if (this.currentPercentage === this.defaultPercentage * 100) {
|
|
130
132
|
return;
|
|
131
133
|
}
|
|
132
134
|
|
|
@@ -106,10 +106,12 @@ export default {
|
|
|
106
106
|
if (y < this.selection.start.y) {
|
|
107
107
|
y = this.selection.start.y;
|
|
108
108
|
}
|
|
109
|
+
x = x - this.buttonWidth;
|
|
110
|
+
y = y + marginTop;
|
|
109
111
|
|
|
110
112
|
return {
|
|
111
|
-
x: x
|
|
112
|
-
y: y
|
|
113
|
+
x: x > 0 ? x : 0,
|
|
114
|
+
y: y > 0 ? y : 0,
|
|
113
115
|
height: this.buttonHeight,
|
|
114
116
|
width: this.buttonWidth,
|
|
115
117
|
};
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<div
|
|
23
23
|
v-if="
|
|
24
24
|
!publicView &&
|
|
25
|
-
!
|
|
25
|
+
!isDocumentReviewed &&
|
|
26
26
|
showEditBtn &&
|
|
27
27
|
!editMode &&
|
|
28
28
|
!recalculatingAnnotations
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
import ServerImage from "../../assets/images/ServerImage";
|
|
62
62
|
import FileNameSaved from "../../assets/images/FileNameSavedImage";
|
|
63
63
|
import FileNameNotSaved from "../../assets/images/FileNameNotSavedImage";
|
|
64
|
-
import { mapState } from "vuex";
|
|
64
|
+
import { mapGetters, mapState } from "vuex";
|
|
65
65
|
|
|
66
66
|
export default {
|
|
67
67
|
name: "DocumentName",
|
|
@@ -95,10 +95,10 @@ export default {
|
|
|
95
95
|
"selectedDocument",
|
|
96
96
|
"publicView",
|
|
97
97
|
"recalculatingAnnotations",
|
|
98
|
-
"documentIsReviewed",
|
|
99
98
|
]),
|
|
100
99
|
...mapState("display", ["optimalResolution"]),
|
|
101
100
|
...mapState("edit", ["editMode"]),
|
|
101
|
+
...mapGetters("document", ["isDocumentReviewed"]),
|
|
102
102
|
textContent() {
|
|
103
103
|
if (this.isEditable) {
|
|
104
104
|
return this.oldFileName;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
>
|
|
7
7
|
<div v-if="!recalculatingAnnotations" class="left-bar-components">
|
|
8
8
|
<DocumentCategory
|
|
9
|
-
v-if="categories && !editMode && !publicView && !
|
|
9
|
+
v-if="categories && !editMode && !publicView && !isDocumentReviewed"
|
|
10
10
|
/>
|
|
11
11
|
</div>
|
|
12
12
|
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
|
|
15
15
|
<div v-if="!recalculatingAnnotations" class="right-bar-components">
|
|
16
16
|
<div
|
|
17
|
-
v-if="!editMode && (!publicView || !
|
|
17
|
+
v-if="!editMode && (!publicView || !isDocumentReviewed)"
|
|
18
18
|
class="keyboard-actions-info"
|
|
19
19
|
>
|
|
20
20
|
<KeyboardActionsDescription />
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<div
|
|
24
|
-
v-if="!editMode && (publicView ||
|
|
24
|
+
v-if="!editMode && (publicView || isDocumentReviewed)"
|
|
25
25
|
class="read-only-info"
|
|
26
26
|
>
|
|
27
27
|
<b-tooltip
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
position="is-bottom"
|
|
30
30
|
class="right-aligned width-184"
|
|
31
31
|
>
|
|
32
|
-
<span v-if="publicView && !
|
|
32
|
+
<span v-if="publicView && !isDocumentReviewed">
|
|
33
33
|
{{ $t("lite_mode") }}
|
|
34
34
|
</span>
|
|
35
35
|
<span v-else class="doc-reviewed">
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
<b-icon
|
|
39
39
|
:class="[
|
|
40
40
|
'info-icon is-small',
|
|
41
|
-
|
|
41
|
+
isDocumentReviewed && 'info-reviewed',
|
|
42
42
|
]"
|
|
43
43
|
icon="circle-info"
|
|
44
44
|
/>
|
|
45
45
|
<template #content>
|
|
46
|
-
<div v-if="!
|
|
46
|
+
<div v-if="!isDocumentReviewed" class="read-only-details">
|
|
47
47
|
{{ $t("limited_functionalities") }}
|
|
48
48
|
</div>
|
|
49
49
|
<div v-else class="read-only-details">
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
</template>
|
|
66
66
|
|
|
67
67
|
<script>
|
|
68
|
-
import { mapState } from "vuex";
|
|
68
|
+
import { mapGetters, mapState } from "vuex";
|
|
69
69
|
import DocumentCategory from "../../components/DocumentCategory";
|
|
70
70
|
import DocumentName from "./DocumentName";
|
|
71
71
|
import DocumentTopBarButtons from "./DocumentTopBarButtons";
|
|
@@ -95,10 +95,10 @@ export default {
|
|
|
95
95
|
"publicView",
|
|
96
96
|
"loading",
|
|
97
97
|
"recalculatingAnnotations",
|
|
98
|
-
"documentIsReviewed",
|
|
99
98
|
]),
|
|
100
99
|
...mapState("category", ["categories"]),
|
|
101
100
|
...mapState("edit", ["editMode"]),
|
|
101
|
+
...mapGetters("document", ["isDocumentReviewed"]),
|
|
102
102
|
},
|
|
103
103
|
created() {
|
|
104
104
|
window.addEventListener("resize", this.handleResize);
|
|
@@ -17,18 +17,17 @@
|
|
|
17
17
|
: $t('submit')
|
|
18
18
|
"
|
|
19
19
|
type="is-primary"
|
|
20
|
-
:disabled="false"
|
|
21
20
|
class="button-next primary-button"
|
|
22
21
|
@click="handleButton"
|
|
23
22
|
/>
|
|
24
23
|
</div>
|
|
25
24
|
|
|
26
25
|
<div
|
|
27
|
-
v-if="!editMode && !
|
|
26
|
+
v-if="!editMode && !isDocumentReviewed && !publicView"
|
|
28
27
|
class="finish-review-button-container"
|
|
29
28
|
>
|
|
30
29
|
<b-tooltip
|
|
31
|
-
:active="
|
|
30
|
+
:active="!isReviewButtonActive"
|
|
32
31
|
position="is-bottom"
|
|
33
32
|
multilined
|
|
34
33
|
class="right-aligned finish-review"
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
<b-button
|
|
37
36
|
:class="['finish-review-btn', 'text-btn', 'primary-button']"
|
|
38
37
|
type="is-primary"
|
|
39
|
-
:disabled="
|
|
38
|
+
:disabled="!isReviewButtonActive"
|
|
40
39
|
@click.stop="handleFinishReview"
|
|
41
40
|
>
|
|
42
41
|
<span v-if="!isLoading">
|
|
@@ -62,13 +61,12 @@
|
|
|
62
61
|
</template>
|
|
63
62
|
|
|
64
63
|
<script>
|
|
65
|
-
import { mapState } from "vuex";
|
|
64
|
+
import { mapGetters, mapState } from "vuex";
|
|
66
65
|
|
|
67
66
|
export default {
|
|
68
67
|
name: "DocumentTopBarButtons",
|
|
69
68
|
data() {
|
|
70
69
|
return {
|
|
71
|
-
finishDisabled: true,
|
|
72
70
|
emptyLabels: null,
|
|
73
71
|
isLoading: false,
|
|
74
72
|
};
|
|
@@ -78,30 +76,17 @@ export default {
|
|
|
78
76
|
...mapState("document", [
|
|
79
77
|
"selectedDocument",
|
|
80
78
|
"publicView",
|
|
81
|
-
"finishedReview",
|
|
82
79
|
"annotationSets",
|
|
83
|
-
"documentIsReviewed",
|
|
84
80
|
]),
|
|
85
81
|
...mapState("edit", ["editMode", "splitOverview", "updatedDocument"]),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
} else {
|
|
93
|
-
this.finishDisabled = true;
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
documentIsReviewed(newValue) {
|
|
97
|
-
if (newValue) {
|
|
98
|
-
this.finishDisabled = true;
|
|
99
|
-
}
|
|
82
|
+
...mapGetters("document", [
|
|
83
|
+
"isDocumentReadyToFinishReview",
|
|
84
|
+
"isDocumentReviewed",
|
|
85
|
+
]),
|
|
86
|
+
isReviewButtonActive() {
|
|
87
|
+
return this.isDocumentReadyToFinishReview;
|
|
100
88
|
},
|
|
101
89
|
},
|
|
102
|
-
mounted() {
|
|
103
|
-
this.finishDisabled = !this.finishedReview;
|
|
104
|
-
},
|
|
105
90
|
methods: {
|
|
106
91
|
closeEditMode() {
|
|
107
92
|
this.$store.dispatch("edit/disableEditMode");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
v-if="!publicView && !
|
|
3
|
+
v-if="!publicView && !isDocumentReviewed && !editMode"
|
|
4
4
|
class="keyboard-actions-description"
|
|
5
5
|
>
|
|
6
6
|
<section class="b-tooltips">
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
</template>
|
|
52
52
|
|
|
53
53
|
<script>
|
|
54
|
-
import { mapState } from "vuex";
|
|
54
|
+
import { mapGetters, mapState } from "vuex";
|
|
55
55
|
import KeyboardIcon from "../../assets/images/KeyboardIcon";
|
|
56
56
|
import ArrowUpKey from "../../assets/images/ArrowUpKey";
|
|
57
57
|
import ArrowDownKey from "../../assets/images/ArrowDownKey";
|
|
@@ -65,11 +65,8 @@ export default {
|
|
|
65
65
|
},
|
|
66
66
|
computed: {
|
|
67
67
|
...mapState("edit", ["editMode"]),
|
|
68
|
-
...mapState("document", [
|
|
69
|
-
|
|
70
|
-
"publicView",
|
|
71
|
-
"documentIsReviewed",
|
|
72
|
-
]),
|
|
68
|
+
...mapState("document", ["selectedDocument", "publicView"]),
|
|
69
|
+
...mapGetters("document", ["isDocumentReviewed"]),
|
|
73
70
|
},
|
|
74
71
|
};
|
|
75
72
|
</script>
|