@konfuzio/document-validation-ui 0.1.6-multi-ann-set → 0.1.6-multi-ann-set-2

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.
Files changed (28) hide show
  1. package/dist/css/app.css +1 -1
  2. package/dist/index.html +1 -1
  3. package/dist/js/app.js +1 -1
  4. package/dist/js/app.js.map +1 -1
  5. package/package.json +1 -1
  6. package/src/assets/scss/main.scss +1 -1
  7. package/src/assets/scss/multi_ann_table_overlay.scss +1 -7
  8. package/src/components/App.vue +7 -2
  9. package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +31 -13
  10. package/src/components/DocumentAnnotations/AnnotationContent.vue +5 -3
  11. package/src/components/DocumentAnnotations/AnnotationRow.vue +2 -1
  12. package/src/components/DocumentAnnotations/AnnotationSetActionButtons.vue +3 -3
  13. package/src/components/DocumentAnnotations/CategorizeModal.vue +5 -1
  14. package/src/components/DocumentAnnotations/DocumentAnnotations.vue +8 -16
  15. package/src/components/DocumentAnnotations/EmptyAnnotation.vue +5 -2
  16. package/src/components/DocumentPage/DocumentPage.vue +27 -8
  17. package/src/components/DocumentPage/DocumentToolbar.vue +6 -2
  18. package/src/components/DocumentPage/MultiAnnSelection.vue +1 -1
  19. package/src/components/DocumentPage/NewAnnotation.vue +1 -1
  20. package/src/components/DocumentTopBar/DocumentName.vue +6 -1
  21. package/src/components/DocumentTopBar/DocumentTopBar.vue +9 -9
  22. package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +4 -3
  23. package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +6 -2
  24. package/src/components/DocumentsList/DocumentsList.vue +11 -2
  25. package/src/store/category.js +1 -1
  26. package/src/store/document.js +10 -1
  27. package/src/store/edit.js +6 -2
  28. package/src/utils/utils.js +13 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konfuzio/document-validation-ui",
3
- "version": "0.1.6-multi-ann-set",
3
+ "version": "0.1.6-multi-ann-set-2",
4
4
  "repository": "git://github.com:konfuzio-ai/document-validation-ui.git",
5
5
  "main": "dist/app.js",
6
6
  "scripts": {
@@ -409,7 +409,7 @@ body {
409
409
  }
410
410
  }
411
411
 
412
- .invisible-parent-modal {
412
+ &.invisible-parent-modal {
413
413
  background-color: transparent;
414
414
 
415
415
  .modal-content {
@@ -15,9 +15,6 @@
15
15
  overflow: visible;
16
16
  .header-dropdown {
17
17
  cursor: pointer;
18
- overflow: visible;
19
- white-space: nowrap;
20
- text-overflow: ellipsis;
21
18
 
22
19
  .icon.arrow {
23
20
  margin-left: 4px;
@@ -33,11 +30,8 @@
33
30
  }
34
31
 
35
32
  .annotations-table {
36
- height: 22px;
33
+ min-height: 22px;
37
34
  display: flex;
38
- white-space: nowrap;
39
- text-overflow: ellipsis;
40
- overflow: visible;
41
35
  }
42
36
  }
43
37
  }
@@ -1,13 +1,13 @@
1
1
  <template>
2
2
  <div class="dv-ui-app-container dv-ui-theme">
3
- <DocumentsList />
3
+ <DocumentsList v-if="showDocumentsList" />
4
4
  <DocumentDashboard />
5
5
  </div>
6
6
  </template>
7
7
  <script>
8
8
  import DocumentDashboard from "./DocumentDashboard";
9
9
  import { DocumentsList } from "./DocumentsList";
10
- import { getURLQueryParam } from "../utils/utils";
10
+ import { getURLQueryParam, getURLPath } from "../utils/utils";
11
11
  import API from "../api";
12
12
 
13
13
  export default {
@@ -49,6 +49,8 @@ export default {
49
49
  documentId() {
50
50
  if (getURLQueryParam("document")) {
51
51
  return getURLQueryParam("document");
52
+ } else if (getURLPath("docs")) {
53
+ return getURLPath("docs");
52
54
  } else if (process.env.VUE_APP_DOCUMENT_ID) {
53
55
  return process.env.VUE_APP_DOCUMENT_ID;
54
56
  } else if (this.document) {
@@ -86,6 +88,9 @@ export default {
86
88
  return true;
87
89
  }
88
90
  },
91
+ showDocumentsList() {
92
+ return process.env.VUE_APP_SHOW_DOCUMENTS_LIST;
93
+ },
89
94
  },
90
95
  created() {
91
96
  // locale config
@@ -3,7 +3,7 @@
3
3
  <!-- loading -->
4
4
  <div v-if="isLoading">
5
5
  <b-notification :closable="false" class="loading-background">
6
- <b-loading :active="isLoading" :is-full-page="loadingOnFullPage">
6
+ <b-loading :active="isLoading" :is-full-page="false">
7
7
  <b-icon icon="spinner" class="fa-spin loading-icon-size spinner" />
8
8
  </b-loading>
9
9
  </b-notification>
@@ -11,7 +11,7 @@
11
11
 
12
12
  <!-- save button -->
13
13
  <b-button
14
- v-if="saveBtn && !isLoading && !publicView"
14
+ v-if="saveBtn && !isLoading && !publicView && !documentIsReviewed"
15
15
  :class="[
16
16
  'annotation-save-btn text-btn',
17
17
  actionBar && 'action-bar-save-btn',
@@ -25,7 +25,7 @@
25
25
 
26
26
  <!-- cancel button -->
27
27
  <b-button
28
- v-if="cancelBtn && !isLoading"
28
+ v-if="cancelBtn && !isLoading && !documentIsReviewed"
29
29
  class="is-small annotation-cancel-btn"
30
30
  icon-left="xmark"
31
31
  @click.stop="cancel"
@@ -33,7 +33,14 @@
33
33
 
34
34
  <!-- decline button -->
35
35
  <div
36
- v-if="declineBtn && !isLoading && !saveBtn && !cancelBtn && !publicView"
36
+ v-if="
37
+ declineBtn &&
38
+ !isLoading &&
39
+ !saveBtn &&
40
+ !cancelBtn &&
41
+ !publicView &&
42
+ !documentIsReviewed
43
+ "
37
44
  class="missing-decline-button-container"
38
45
  >
39
46
  <b-button
@@ -47,7 +54,14 @@
47
54
 
48
55
  <!-- accept button -->
49
56
  <b-button
50
- v-if="acceptBtn && !isLoading && !saveBtn && !cancelBtn && !publicView"
57
+ v-if="
58
+ acceptBtn &&
59
+ !isLoading &&
60
+ !saveBtn &&
61
+ !cancelBtn &&
62
+ !publicView &&
63
+ !documentIsReviewed
64
+ "
51
65
  class="annotation-accept-btn primary-button"
52
66
  type="is-primary"
53
67
  @click.stop="accept"
@@ -58,7 +72,12 @@
58
72
  <!-- missing button -->
59
73
  <div
60
74
  v-if="
61
- showMissingBtn && !isLoading && !cancelBtn && !saveBtn && !publicView
75
+ showMissingBtn &&
76
+ !isLoading &&
77
+ !cancelBtn &&
78
+ !saveBtn &&
79
+ !publicView &&
80
+ !documentIsReviewed
62
81
  "
63
82
  class="missing-decline-button-container"
64
83
  >
@@ -73,7 +92,7 @@
73
92
 
74
93
  <!-- Restore not found annotations -->
75
94
  <b-button
76
- v-if="restoreBtn && !isLoading && !publicView"
95
+ v-if="restoreBtn && !isLoading && !publicView && !documentIsReviewed"
77
96
  class="restore-btn"
78
97
  type="is-primary"
79
98
  @click.stop="restore"
@@ -115,13 +134,12 @@ export default {
115
134
  required: false,
116
135
  },
117
136
  },
118
- data() {
119
- return {
120
- loadingOnFullPage: false,
121
- };
122
- },
123
137
  computed: {
124
- ...mapState("document", ["publicView", "missingAnnotations"]),
138
+ ...mapState("document", [
139
+ "publicView",
140
+ "missingAnnotations",
141
+ "documentIsReviewed",
142
+ ]),
125
143
  },
126
144
  methods: {
127
145
  save() {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div :id="annotation.id" ref="annotation" class="annotation">
3
3
  <span
4
- v-if="!publicView"
4
+ v-if="!publicView || !documentIsReviewed"
5
5
  :id="annotation.id"
6
6
  ref="contentEditable"
7
7
  :class="[
@@ -82,6 +82,7 @@ export default {
82
82
  "newAcceptedAnnotations",
83
83
  "selectedEntities",
84
84
  "showActionError",
85
+ "documentIsReviewed",
85
86
  ]),
86
87
  annotationText() {
87
88
  if (this.isAnnotationBeingEdited) {
@@ -155,7 +156,7 @@ export default {
155
156
  this.$refs.contentEditable.textContent = text;
156
157
  },
157
158
  handleEditAnnotation(event) {
158
- if (this.publicView) return;
159
+ if (this.publicView || this.documentIsReviewed) return;
159
160
 
160
161
  if (event) {
161
162
  event.preventDefault();
@@ -163,6 +164,7 @@ export default {
163
164
 
164
165
  if (
165
166
  !this.publicView &&
167
+ !this.documentIsReviewed &&
166
168
  !this.isAnnotationBeingEdited &&
167
169
  !this.isLoading
168
170
  ) {
@@ -226,7 +228,7 @@ export default {
226
228
  event.preventDefault();
227
229
  },
228
230
  saveAnnotationChanges(event) {
229
- if (this.publicView) return;
231
+ if (this.publicView || this.documentIsReviewed) return;
230
232
 
231
233
  if (event) {
232
234
  event.preventDefault();
@@ -176,6 +176,7 @@ export default {
176
176
  "documentId",
177
177
  "showActionError",
178
178
  "missingAnnotations",
179
+ "documentIsReviewed",
179
180
  ]),
180
181
  ...mapState("selection", ["spanSelection", "elementSelected"]),
181
182
  ...mapGetters("document", [
@@ -433,7 +434,7 @@ export default {
433
434
  );
434
435
  },
435
436
  handleSaveChanges(decline) {
436
- if (this.publicView) return;
437
+ if (this.publicView || this.documentIsReviewed) return;
437
438
 
438
439
  if (
439
440
  this.showAcceptButton() ||
@@ -2,7 +2,7 @@
2
2
  <div class="action-buttons">
3
3
  <!-- mark all empty labels as missing -->
4
4
  <div
5
- v-if="!publicView"
5
+ v-if="!publicView && !documentIsReviewed"
6
6
  class="missing-decline-button-container all-missing"
7
7
  @mouseenter="mouseenterAnnotationSet('missing')"
8
8
  @mouseleave="mouseleaveAnnotationSet"
@@ -19,7 +19,7 @@
19
19
 
20
20
  <!-- accept all pending annotations -->
21
21
  <div
22
- v-if="!publicView"
22
+ v-if="!publicView && !documentIsReviewed"
23
23
  class="accept-all"
24
24
  @mouseenter="mouseenterAnnotationSet('accept')"
25
25
  @mouseleave="mouseleaveAnnotationSet"
@@ -53,7 +53,7 @@ export default {
53
53
  },
54
54
  },
55
55
  computed: {
56
- ...mapState("document", ["publicView"]),
56
+ ...mapState("document", ["publicView", "documentIsReviewed"]),
57
57
  },
58
58
  methods: {
59
59
  mouseenterAnnotationSet(type) {
@@ -109,6 +109,8 @@ export default {
109
109
  "selectedDocument",
110
110
  "categorizeModalIsActive",
111
111
  "splittingSuggestions",
112
+ "publicView",
113
+ "documentIsReviewed",
112
114
  ]),
113
115
  ...mapGetters("category", ["category", "projectHasSingleCategory"]),
114
116
  ...mapGetters("document", ["categorizationIsConfirmed"]),
@@ -181,7 +183,9 @@ export default {
181
183
  // But if there is a category, we also need to check if there are splitting suggestions or not
182
184
  this.show =
183
185
  (!category || (category && !this.splittingSuggestions)) &&
184
- !this.categorizationIsConfirmed;
186
+ !this.categorizationIsConfirmed &&
187
+ !this.publicView &&
188
+ !this.documentIsReviewed;
185
189
  }
186
190
  },
187
191
  canCloseModal() {
@@ -15,13 +15,17 @@
15
15
  <!-- When there's no annotations in the label -->
16
16
  <div v-else-if="annotationSets.length === 0">
17
17
  <CategorizeModal
18
- v-if="!publicView && !waitingForSplittingConfirmation(selectedDocument)"
18
+ v-if="
19
+ !publicView &&
20
+ !documentIsReviewed &&
21
+ !waitingForSplittingConfirmation(selectedDocument)
22
+ "
19
23
  />
20
24
  <EmptyState />
21
25
  </div>
22
26
 
23
27
  <div v-else :class="['annotation-set-list']">
24
- <CategorizeModal v-if="!publicView" />
28
+ <CategorizeModal v-if="!publicView || !documentIsReviewed" />
25
29
  <div
26
30
  v-if="Object.entries(annotationSetsInTable()).length > 0"
27
31
  class="annotation-set-group"
@@ -144,6 +148,7 @@ export default {
144
148
  "labels",
145
149
  "selectedDocument",
146
150
  "splittingSuggestions",
151
+ "documentIsReviewed",
147
152
  ]),
148
153
  ...mapGetters("category", ["category"]),
149
154
  ...mapGetters("document", [
@@ -179,19 +184,6 @@ export default {
179
184
  window.removeEventListener("keydown", this.keyDownHandler);
180
185
  },
181
186
  methods: {
182
- showMissingAnnotations() {
183
- if (
184
- (this.publicView &&
185
- this.selectedDocument &&
186
- this.selectedDocument.is_reviewed) ||
187
- !this.publicView
188
- ) {
189
- return true;
190
- } else {
191
- return false;
192
- }
193
- },
194
-
195
187
  focusOnNextAnnotation() {
196
188
  const annotations = Array.from(
197
189
  document.getElementsByClassName("annotation-value")
@@ -239,7 +231,7 @@ export default {
239
231
 
240
232
  keyDownHandler(event) {
241
233
  // only allow keyboard navigation if we are not in public view mode
242
- if (this.publicView) return;
234
+ if (this.publicView || this.documentIsReviewed) return;
243
235
 
244
236
  // get out of edit mode and navigation
245
237
  if (event.key === "Escape") {
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="empty-annotation">
3
3
  <span
4
- v-if="!publicView"
4
+ v-if="!publicView && !documentIsReviewed"
5
5
  :id="emptyAnnotationId()"
6
6
  ref="emptyAnnotation"
7
7
  :class="[
@@ -84,6 +84,7 @@ export default {
84
84
  "publicView",
85
85
  "selectedEntities",
86
86
  "showActionError",
87
+ "documentIsReviewed",
87
88
  ]),
88
89
  },
89
90
  watch: {
@@ -158,12 +159,14 @@ export default {
158
159
  handleEditEmptyAnnotation() {
159
160
  if (
160
161
  this.publicView ||
162
+ this.documentIsReviewed ||
161
163
  this.annotationIsNotFound(this.annotationSet, this.label)
162
164
  )
163
165
  return;
164
166
 
165
167
  if (
166
168
  !this.publicView &&
169
+ !this.documentIsReviewed &&
167
170
  !this.isLoading &&
168
171
  this.elementSelected !== this.emptyAnnotationId()
169
172
  ) {
@@ -218,7 +221,7 @@ export default {
218
221
  }
219
222
  },
220
223
  saveEmptyAnnotationChanges(event) {
221
- if (this.publicView) return;
224
+ if (this.publicView || this.documentIsReviewed) return;
222
225
 
223
226
  if (event) {
224
227
  event.preventDefault();
@@ -3,7 +3,11 @@
3
3
  ref="pdfContainer"
4
4
  :class="[
5
5
  'pdf-page-container',
6
- (categorizeModalIsActive || editMode || publicView) && 'default-cursor',
6
+ (categorizeModalIsActive ||
7
+ editMode ||
8
+ publicView ||
9
+ documentIsReviewed) &&
10
+ 'default-cursor',
7
11
  page.number === currentPage && 'current-page',
8
12
  ]"
9
13
  >
@@ -44,7 +48,7 @@
44
48
  }"
45
49
  />
46
50
  <template v-if="pageInVisibleRange && !editMode">
47
- <v-group v-if="!publicView" ref="entities">
51
+ <v-group v-if="!publicView || !documentIsReviewed" ref="entities">
48
52
  <v-rect
49
53
  v-for="(entity, index) in scaledEntities"
50
54
  :key="index"
@@ -268,6 +272,7 @@ export default {
268
272
  "selectedDocument",
269
273
  "publicView",
270
274
  "selectedEntities",
275
+ "documentIsReviewed",
271
276
  ]),
272
277
  ...mapState("edit", ["editMode"]),
273
278
  ...mapGetters("display", ["visiblePageRange", "bboxToRect"]),
@@ -321,7 +326,13 @@ export default {
321
326
  },
322
327
 
323
328
  onMouseDown(event) {
324
- if (this.categorizeModalIsActive || this.editMode) return;
329
+ if (
330
+ this.categorizeModalIsActive ||
331
+ this.editMode ||
332
+ this.publicView ||
333
+ this.documentIsReviewed
334
+ )
335
+ return;
325
336
 
326
337
  this.closePopups();
327
338
 
@@ -339,9 +350,6 @@ export default {
339
350
  ) {
340
351
  return;
341
352
  }
342
- if (this.publicView) {
343
- return;
344
- }
345
353
 
346
354
  // anything else, we start selecting
347
355
 
@@ -389,7 +397,13 @@ export default {
389
397
  },
390
398
 
391
399
  handleClickedEntity(entity) {
392
- if (!entity || this.categorizeModalIsActive) return;
400
+ if (
401
+ !entity ||
402
+ this.categorizeModalIsActive ||
403
+ this.publicView ||
404
+ this.documentIsReviewed
405
+ )
406
+ return;
393
407
 
394
408
  // Check if we are creating a new Annotation
395
409
  // or if we are editing an existing or empty one
@@ -427,7 +441,12 @@ export default {
427
441
  },
428
442
 
429
443
  onElementEnter() {
430
- if (!this.categorizeModalIsActive) {
444
+ if (
445
+ !this.categorizeModalIsActive &&
446
+ !this.publicView &&
447
+ !this.editMode &&
448
+ !this.documentIsReviewed
449
+ ) {
431
450
  this.$refs.stage.$el.style.cursor = "pointer";
432
451
  }
433
452
  },
@@ -9,7 +9,7 @@
9
9
  class="top-aligned"
10
10
  >
11
11
  <div
12
- v-if="!editMode && !publicView"
12
+ v-if="!editMode && !publicView && !documentIsReviewed"
13
13
  :class="[
14
14
  'icons icons-left',
15
15
  editModeDisabled && 'edit-mode-disabled',
@@ -22,7 +22,10 @@
22
22
  <span class="edit-text">{{ $t("edit") }}</span>
23
23
  </div>
24
24
  </b-tooltip>
25
- <div v-if="!editMode && !publicView" class="toolbar-divider" />
25
+ <div
26
+ v-if="!editMode && !publicView && !documentIsReviewed"
27
+ class="toolbar-divider"
28
+ />
26
29
  <div class="icons icons-right">
27
30
  <div class="fit-zoom icon" @click.prevent.stop="fitAuto">
28
31
  <FitZoomIcon />
@@ -74,6 +77,7 @@ export default {
74
77
  "selectedDocument",
75
78
  "recalculatingAnnotations",
76
79
  "publicView",
80
+ "documentIsReviewed",
77
81
  ]),
78
82
  ...mapGetters("document", ["documentCannotBeEdited"]),
79
83
  },
@@ -136,7 +136,7 @@ export default {
136
136
  hasModalCard: true,
137
137
  trapFocus: true,
138
138
  canCancel: false,
139
- customClass: "invisible-parent-modal",
139
+ customClass: "dv-ui-theme invisible-parent-modal",
140
140
  props: { isMultipleAnnotations: true },
141
141
  events: {
142
142
  labelSet: this.submitAnnotations,
@@ -274,7 +274,7 @@ export default {
274
274
  trapFocus: true,
275
275
  canCancel: false,
276
276
  onCancel: this.disableLabelSetModalShowing,
277
- customClass: "invisible-parent-modal",
277
+ customClass: "dv-ui-theme invisible-parent-modal",
278
278
  events: {
279
279
  labelSet: this.chooseLabelSet,
280
280
  close: this.disableLabelSetModalShowing,
@@ -21,7 +21,11 @@
21
21
  </span>
22
22
  <div
23
23
  v-if="
24
- !publicView && showEditBtn && !editMode && !recalculatingAnnotations
24
+ !publicView &&
25
+ !documentIsReviewed &&
26
+ showEditBtn &&
27
+ !editMode &&
28
+ !recalculatingAnnotations
25
29
  "
26
30
  class="edit-btn btn"
27
31
  @click="handleEdit"
@@ -91,6 +95,7 @@ export default {
91
95
  "selectedDocument",
92
96
  "publicView",
93
97
  "recalculatingAnnotations",
98
+ "documentIsReviewed",
94
99
  ]),
95
100
  ...mapState("display", ["optimalResolution"]),
96
101
  ...mapState("edit", ["editMode"]),
@@ -5,21 +5,23 @@
5
5
  class="document-top-bar"
6
6
  >
7
7
  <div v-if="!recalculatingAnnotations" class="left-bar-components">
8
- <DocumentCategory v-if="categories && !editMode && !publicView" />
8
+ <DocumentCategory
9
+ v-if="categories && !editMode && !publicView && !documentIsReviewed"
10
+ />
9
11
  </div>
10
12
 
11
13
  <DocumentName :data-file-name="selectedDocument.data_file_name" />
12
14
 
13
15
  <div v-if="!recalculatingAnnotations" class="right-bar-components">
14
16
  <div
15
- v-if="!editMode && (!publicView || !selectedDocument.is_reviewed)"
17
+ v-if="!editMode && (!publicView || !documentIsReviewed)"
16
18
  class="keyboard-actions-info"
17
19
  >
18
20
  <KeyboardActionsDescription />
19
21
  </div>
20
22
 
21
23
  <div
22
- v-if="!editMode && (publicView || selectedDocument.is_reviewed)"
24
+ v-if="!editMode && (publicView || documentIsReviewed)"
23
25
  class="read-only-info"
24
26
  >
25
27
  <b-tooltip
@@ -27,7 +29,7 @@
27
29
  position="is-bottom"
28
30
  class="right-aligned width-184"
29
31
  >
30
- <span v-if="publicView && !selectedDocument.is_reviewed">
32
+ <span v-if="publicView && !documentIsReviewed">
31
33
  {{ $t("lite_mode") }}
32
34
  </span>
33
35
  <span v-else class="doc-reviewed">
@@ -36,15 +38,12 @@
36
38
  <b-icon
37
39
  :class="[
38
40
  'info-icon is-small',
39
- selectedDocument.is_reviewed && 'info-reviewed',
41
+ documentIsReviewed && 'info-reviewed',
40
42
  ]"
41
43
  icon="circle-info"
42
44
  />
43
45
  <template #content>
44
- <div
45
- v-if="!selectedDocument.is_reviewed"
46
- class="read-only-details"
47
- >
46
+ <div v-if="!documentIsReviewed" class="read-only-details">
48
47
  {{ $t("limited_functionalities") }}
49
48
  </div>
50
49
  <div v-else class="read-only-details">
@@ -96,6 +95,7 @@ export default {
96
95
  "publicView",
97
96
  "loading",
98
97
  "recalculatingAnnotations",
98
+ "documentIsReviewed",
99
99
  ]),
100
100
  ...mapState("category", ["categories"]),
101
101
  ...mapState("edit", ["editMode"]),
@@ -24,7 +24,7 @@
24
24
  </div>
25
25
 
26
26
  <div
27
- v-if="!editMode && !selectedDocument.is_reviewed && !publicView"
27
+ v-if="!editMode && !documentIsReviewed && !publicView"
28
28
  class="finish-review-button-container"
29
29
  >
30
30
  <b-tooltip
@@ -45,7 +45,7 @@
45
45
 
46
46
  <div v-else>
47
47
  <b-notification :closable="false" :class="['loading-background']">
48
- <b-loading :active="isLoading" :is-full-page="loadingOnFullPage">
48
+ <b-loading :active="isLoading" :is-full-page="false">
49
49
  <b-icon
50
50
  icon="spinner"
51
51
  class="fa-spin loading-icon-size spinner"
@@ -80,6 +80,7 @@ export default {
80
80
  "publicView",
81
81
  "finishedReview",
82
82
  "annotationSets",
83
+ "documentIsReviewed",
83
84
  ]),
84
85
  ...mapState("edit", ["editMode", "splitOverview", "updatedDocument"]),
85
86
  },
@@ -92,7 +93,7 @@ export default {
92
93
  this.finishDisabled = true;
93
94
  }
94
95
  },
95
- publicView(newValue) {
96
+ documentIsReviewed(newValue) {
96
97
  if (newValue) {
97
98
  this.finishDisabled = true;
98
99
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- v-if="!publicView && !selectedDocument.is_reviewed && !editMode"
3
+ v-if="!publicView && !documentIsReviewed && !editMode"
4
4
  class="keyboard-actions-description"
5
5
  >
6
6
  <section class="b-tooltips">
@@ -65,7 +65,11 @@ export default {
65
65
  },
66
66
  computed: {
67
67
  ...mapState("edit", ["editMode"]),
68
- ...mapState("document", ["selectedDocument", "publicView"]),
68
+ ...mapState("document", [
69
+ "selectedDocument",
70
+ "publicView",
71
+ "documentIsReviewed",
72
+ ]),
69
73
  },
70
74
  };
71
75
  </script>
@@ -71,6 +71,11 @@
71
71
  import { mapGetters, mapState } from "vuex";
72
72
  import ServerImage from "../../assets/images/ServerImage";
73
73
  import ErrorIcon from "../../assets/images/ErrorIcon";
74
+ import {
75
+ getURLQueryParam,
76
+ navigateToNewDocumentURL,
77
+ getURLPath,
78
+ } from "../../utils/utils";
74
79
 
75
80
  /**
76
81
  * This component creates a horizontal list of documents
@@ -105,8 +110,12 @@ export default {
105
110
  },
106
111
  methods: {
107
112
  changeDocument(documentId) {
108
- this.$store.dispatch("document/setDocId", documentId);
109
- this.$store.dispatch("document/fetchDocument");
113
+ if (getURLQueryParam("document") || getURLPath("docs")) {
114
+ navigateToNewDocumentURL(this.selectedDocument.id, documentId);
115
+ } else {
116
+ this.$store.dispatch("document/setDocId", documentId);
117
+ this.$store.dispatch("document/fetchDocument");
118
+ }
110
119
  },
111
120
  requestTrialAccess() {
112
121
  window.open("https://konfuzio.com", "_blank");