@konfuzio/document-validation-ui 0.1.5-styles-refactor → 0.1.6-multi-ann-set

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 (61) 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/images/DraggableIcon.vue +14 -0
  7. package/src/assets/images/GridIcon.vue +16 -0
  8. package/src/assets/images/MagicWandIcon.vue +16 -0
  9. package/src/assets/images/NotFoundIcon.vue +16 -0
  10. package/src/assets/images/SettingsIcon.vue +14 -0
  11. package/src/assets/images/SplitZigZag.vue +47 -14
  12. package/src/assets/images/StarIcon.vue +16 -0
  13. package/src/assets/scss/ann_set_table_options.scss +26 -0
  14. package/src/assets/scss/annotation_details.scss +85 -73
  15. package/src/assets/scss/document_annotations.scss +54 -57
  16. package/src/assets/scss/document_category.scss +0 -1
  17. package/src/assets/scss/document_dashboard.scss +7 -2
  18. package/src/assets/scss/document_edit.scss +90 -46
  19. package/src/assets/scss/main.scss +108 -49
  20. package/src/assets/scss/multi_ann_table_overlay.scss +44 -0
  21. package/src/assets/scss/splitting_confirmation_modal.scss +41 -0
  22. package/src/assets/scss/variables.scss +2 -0
  23. package/src/components/DocumentAnnotations/AnnotationActionButtons.vue +153 -0
  24. package/src/components/DocumentAnnotations/AnnotationDetails.vue +28 -7
  25. package/src/components/DocumentAnnotations/AnnotationRow.vue +131 -40
  26. package/src/components/DocumentAnnotations/AnnotationSetActionButtons.vue +86 -0
  27. package/src/components/DocumentAnnotations/CategorizeModal.vue +24 -2
  28. package/src/components/DocumentAnnotations/DocumentAnnotations.vue +114 -82
  29. package/src/components/DocumentAnnotations/EmptyAnnotation.vue +16 -3
  30. package/src/components/DocumentAnnotations/ExtractingData.vue +3 -3
  31. package/src/components/DocumentAnnotations/index.js +0 -1
  32. package/src/components/DocumentCategory.vue +13 -5
  33. package/src/components/DocumentDashboard.vue +17 -6
  34. package/src/components/DocumentEdit/DocumentEdit.vue +208 -68
  35. package/src/components/DocumentEdit/EditConfirmationModal.vue +54 -0
  36. package/src/components/DocumentEdit/EditPages.vue +29 -18
  37. package/src/components/DocumentEdit/EditSidebar.vue +92 -45
  38. package/src/components/DocumentEdit/SidebarButtons.vue +53 -0
  39. package/src/components/DocumentEdit/SplitInfoBar.vue +19 -0
  40. package/src/components/DocumentEdit/SplitOverview.vue +4 -5
  41. package/src/components/{DocumentError.vue → DocumentModals/DocumentErrorModal.vue} +3 -4
  42. package/src/components/{NotOptimizedViewportModal.vue → DocumentModals/NotOptimizedViewportModal.vue} +2 -2
  43. package/src/components/DocumentModals/SplittingSuggestionsModal.vue +120 -0
  44. package/src/components/DocumentPage/ActionBar.vue +3 -3
  45. package/src/components/DocumentPage/AnnSetTableOptions.vue +107 -0
  46. package/src/components/DocumentPage/DocumentPage.vue +12 -2
  47. package/src/components/DocumentPage/MultiAnnSelection.vue +89 -1
  48. package/src/components/DocumentPage/MultiAnnotationTableOverlay.vue +274 -0
  49. package/src/components/DocumentPage/MultiAnnotationTablePopup.vue +19 -46
  50. package/src/components/DocumentPage/ScrollingDocument.vue +11 -2
  51. package/src/components/DocumentTopBar/DocumentTopBarButtons.vue +35 -30
  52. package/src/components/DocumentTopBar/KeyboardActionsDescription.vue +3 -1
  53. package/src/locales/de.json +23 -6
  54. package/src/locales/en.json +24 -6
  55. package/src/locales/es.json +23 -6
  56. package/src/store/display.js +44 -0
  57. package/src/store/document.js +171 -23
  58. package/src/store/edit.js +67 -48
  59. package/src/store/project.js +14 -14
  60. package/src/components/DocumentAnnotations/ActionButtons.vue +0 -257
  61. package/src/components/DocumentAnnotations/RejectedLabels.vue +0 -96
@@ -1,10 +1,10 @@
1
1
  <template>
2
2
  <b-tooltip
3
3
  :animated="false"
4
- position="is-bottom"
5
- class="left-aligned annotation-details"
4
+ :position="fromTable ? 'is-top' : 'is-bottom'"
5
+ :class="[!fromTable && 'left-aligned', 'annotation-details']"
6
6
  >
7
- <div class="label-icon">
7
+ <div :class="['label-icon', fromTable && 'is-small']">
8
8
  <div v-if="created(annotation) || edited(annotation)">
9
9
  <div
10
10
  v-if="accepted(annotation)"
@@ -28,7 +28,13 @@
28
28
  </div>
29
29
  </div>
30
30
  <div
31
- v-else-if="notFound(annotation)"
31
+ v-else-if="annotationIsNotFound(annotationSet, label)"
32
+ :class="['annotation-details-icon', animate ? 'animated-ripple' : '']"
33
+ >
34
+ <NotFoundIcon />
35
+ </div>
36
+ <div
37
+ v-else-if="notExtracted(annotation)"
32
38
  :class="[
33
39
  'annotation-details-icon',
34
40
  animate ? 'animated-ripple' : '',
@@ -100,7 +106,7 @@
100
106
  </div>
101
107
  </div>
102
108
  <div
103
- v-else-if="notFound(annotation)"
109
+ v-else-if="notExtracted(annotation)"
104
110
  :class="[
105
111
  'annotation-details-icon',
106
112
  animate ? 'animated-ripple' : '',
@@ -143,6 +149,7 @@ import AcceptedCheckMark from "../../assets/images/AcceptedCheckMark";
143
149
  import QuestionMark from "../../assets/images/QuestionMark";
144
150
  import AcceptedUser from "../../assets/images/AcceptedUser";
145
151
  import UserIcon from "../../assets/images/UserIcon";
152
+ import NotFoundIcon from "../../assets/images/NotFoundIcon";
146
153
 
147
154
  export default {
148
155
  name: "AnnotationDetails",
@@ -152,6 +159,7 @@ export default {
152
159
  AcceptedCheckMark,
153
160
  AcceptedUser,
154
161
  UserIcon,
162
+ NotFoundIcon,
155
163
  },
156
164
  props: {
157
165
  description: {
@@ -163,6 +171,18 @@ export default {
163
171
  type: Object,
164
172
  default: null,
165
173
  },
174
+ annotationSet: {
175
+ type: Object,
176
+ default: null,
177
+ },
178
+ label: {
179
+ type: Object,
180
+ default: null,
181
+ },
182
+ fromTable: {
183
+ type: Boolean,
184
+ default: false,
185
+ },
166
186
  },
167
187
  data() {
168
188
  return {
@@ -172,11 +192,12 @@ export default {
172
192
  computed: {
173
193
  ...mapGetters("document", [
174
194
  "confidence",
175
- "notFound",
195
+ "notExtracted",
176
196
  "created",
177
197
  "edited",
178
198
  "accepted",
179
199
  "getUser",
200
+ "annotationIsNotFound",
180
201
  ]),
181
202
  },
182
203
  watch: {
@@ -200,7 +221,7 @@ export default {
200
221
  },
201
222
  methods: {
202
223
  getText() {
203
- if (this.notFound(this.annotation)) {
224
+ if (this.notExtracted(this.annotation)) {
204
225
  return this.$t("not_found_in_document");
205
226
  } else if (this.created(this.annotation)) {
206
227
  return this.getUser(this.annotation)
@@ -3,19 +3,10 @@
3
3
  :class="[
4
4
  'annotation-row',
5
5
  isSelected && 'selected',
6
+ hoverEmptyLabelRows && 'hovered-empty-labels',
7
+ hoverPendingAnnotationRows && 'hovered-pending-annotations',
8
+ annotationIsNotFound(annotationSet, label) && 'missing',
6
9
  isAnnotationInEditMode(annotationId()) && 'editing',
7
- hoveredAnnotationSet &&
8
- hoveredAnnotationSet.type == 'reject' &&
9
- annotationSet.id === hoveredAnnotationSet.annotationSet.id &&
10
- annotationSet.label_set.id ===
11
- hoveredAnnotationSet.annotationSet.label_set.id &&
12
- hoveredEmptyLabels() === label.id &&
13
- 'hovered-empty-labels',
14
- hoveredAnnotationSet &&
15
- hoveredAnnotationSet.type == 'accept' &&
16
- annotation &&
17
- hoveredPendingAnnotations() === annotation.id &&
18
- 'hovered-pending-annotations',
19
10
  ]"
20
11
  @click="onAnnotationClick"
21
12
  @mouseover="hoveredAnnotation = annotationId()"
@@ -26,11 +17,23 @@
26
17
  @mouseenter="onAnnotationHoverEnter(defaultSpan)"
27
18
  @mouseleave="onAnnotationHoverLeave"
28
19
  >
29
- <AnnotationDetails
30
- :description="label.description"
31
- :annotation="annotation"
32
- />
33
- <div class="label-name">
20
+ <div class="annotation-icon">
21
+ <AnnotationDetails
22
+ :description="label.description"
23
+ :annotation="annotation"
24
+ :annotation-set="annotationSet"
25
+ :label="label"
26
+ :from-table="fromTable"
27
+ />
28
+ </div>
29
+
30
+ <div
31
+ v-if="showLabel"
32
+ :class="[
33
+ 'label-name',
34
+ annotationIsNotFound(annotationSet, label) && 'not-found-text',
35
+ ]"
36
+ >
34
37
  <span>{{ label.name }} </span>
35
38
  </div>
36
39
  </div>
@@ -81,19 +84,21 @@
81
84
  />
82
85
  </div>
83
86
  </div>
84
- <div class="buttons-container">
85
- <ActionButtons
87
+ <div v-if="showButtons" class="buttons-container">
88
+ <AnnotationActionButtons
86
89
  :cancel-btn="showCancelButton()"
87
- :accept-btn="showAcceptAndDeclineButtons()"
88
- :decline-btn="showAcceptAndDeclineButtons()"
89
- :show-reject="showRejectButton()"
90
+ :accept-btn="showAcceptButton()"
91
+ :decline-btn="showDeclineButton()"
92
+ :show-missing-btn="showMissingButton()"
90
93
  :save-btn="showSaveButton()"
94
+ :restore-btn="showRestoreButton()"
91
95
  :is-loading="isLoading"
92
- @reject="handleReject()"
96
+ @mark-as-missing="handleMissingAnnotation()"
93
97
  @save="handleSaveChanges()"
94
98
  @accept="handleSaveChanges()"
95
99
  @decline="handleSaveChanges(true)"
96
100
  @cancel="handleCancelButton()"
101
+ @restore="handleRestore()"
97
102
  />
98
103
  </div>
99
104
  </div>
@@ -104,7 +109,7 @@ import { mapGetters, mapState } from "vuex";
104
109
  import AnnotationDetails from "./AnnotationDetails";
105
110
  import AnnotationContent from "./AnnotationContent";
106
111
  import EmptyAnnotation from "./EmptyAnnotation";
107
- import ActionButtons from "./ActionButtons";
112
+ import AnnotationActionButtons from "./AnnotationActionButtons";
108
113
 
109
114
  export default {
110
115
  name: "AnnotationRow",
@@ -112,7 +117,7 @@ export default {
112
117
  AnnotationDetails,
113
118
  AnnotationContent,
114
119
  EmptyAnnotation,
115
- ActionButtons,
120
+ AnnotationActionButtons,
116
121
  },
117
122
  props: {
118
123
  annotationSet: {
@@ -127,6 +132,26 @@ export default {
127
132
  type: Object,
128
133
  default: null,
129
134
  },
135
+ showLabel: {
136
+ type: Boolean,
137
+ default: true,
138
+ },
139
+ showButtons: {
140
+ type: Boolean,
141
+ default: true,
142
+ },
143
+ isSmall: {
144
+ type: Boolean,
145
+ default: false,
146
+ },
147
+ showHover: {
148
+ type: Boolean,
149
+ default: true,
150
+ },
151
+ fromTable: {
152
+ type: Boolean,
153
+ default: false,
154
+ },
130
155
  },
131
156
  data() {
132
157
  return {
@@ -147,12 +172,16 @@ export default {
147
172
  "publicView",
148
173
  "selectedEntities",
149
174
  "newAcceptedAnnotations",
150
- "rejectedMissingAnnotations",
175
+ "annotationsMarkedAsMissing",
151
176
  "documentId",
152
177
  "showActionError",
178
+ "missingAnnotations",
153
179
  ]),
154
180
  ...mapState("selection", ["spanSelection", "elementSelected"]),
155
- ...mapGetters("document", ["isAnnotationInEditMode"]),
181
+ ...mapGetters("document", [
182
+ "isAnnotationInEditMode",
183
+ "annotationIsNotFound",
184
+ ]),
156
185
  ...mapGetters("selection", ["isValueArray"]),
157
186
  defaultSpan() {
158
187
  if (
@@ -185,6 +214,25 @@ export default {
185
214
  )
186
215
  );
187
216
  },
217
+ hoverEmptyLabelRows() {
218
+ return (
219
+ this.hoveredAnnotationSet &&
220
+ this.hoveredAnnotationSet.type == "missing" &&
221
+ !this.annotationIsNotFound(this.annotationSet, this.label) &&
222
+ this.annotationSet.id === this.hoveredAnnotationSet.annotationSet.id &&
223
+ this.annotationSet.label_set.id ===
224
+ this.hoveredAnnotationSet.annotationSet.label_set.id &&
225
+ this.hoveredEmptyLabels() === this.label.id
226
+ );
227
+ },
228
+ hoverPendingAnnotationRows() {
229
+ return (
230
+ this.hoveredAnnotationSet &&
231
+ this.hoveredAnnotationSet.type == "accept" &&
232
+ this.annotation &&
233
+ this.hoveredPendingAnnotations() === this.annotation.id
234
+ );
235
+ },
188
236
  },
189
237
  watch: {
190
238
  sidebarAnnotationSelected(newSidebarAnnotationSelected) {
@@ -224,7 +272,7 @@ export default {
224
272
  this.isLoading = false;
225
273
  }
226
274
  },
227
- rejectedMissingAnnotations(newValue) {
275
+ annotationsMarkedAsMissing(newValue) {
228
276
  if (newValue) {
229
277
  this.enableLoading();
230
278
  } else {
@@ -256,7 +304,7 @@ export default {
256
304
  if (span) {
257
305
  this.$store.dispatch("document/setDocumentAnnotationSelected", {
258
306
  annotation: this.annotation,
259
- label: this.label,
307
+ label: this.fromTable ? null : this.label,
260
308
  span,
261
309
  scrollTo: false,
262
310
  });
@@ -266,11 +314,14 @@ export default {
266
314
  this.$store.dispatch("document/disableDocumentAnnotationSelected");
267
315
  },
268
316
  onAnnotationClick() {
317
+ if (!this.fromTable) {
318
+ this.$store.dispatch("display/showAnnSetTable", null);
319
+ }
269
320
  this.$store.dispatch("document/scrollToDocumentAnnotationSelected");
270
321
  },
271
322
  hoveredEmptyLabels() {
272
323
  // This method will change the style of the Empty Annotations in the same Label Set
273
- // when the "Reject all" button is hovered
324
+ // when the "mark all as missing" button is hovered
274
325
  if (!this.hoveredAnnotationSet) return;
275
326
 
276
327
  const labels = this.hoveredAnnotationSet.annotationSet.labels.map(
@@ -309,7 +360,7 @@ export default {
309
360
  return null;
310
361
  }
311
362
  },
312
- showAcceptAndDeclineButtons() {
363
+ showAcceptButton() {
313
364
  return (
314
365
  !this.isAnnotationInEditMode(this.annotationId()) &&
315
366
  this.annotation &&
@@ -317,11 +368,26 @@ export default {
317
368
  this.hoveredAnnotation === this.annotation.id
318
369
  );
319
370
  },
320
- showRejectButton() {
371
+ showDeclineButton() {
372
+ return (
373
+ !this.isAnnotationInEditMode(this.annotationId()) &&
374
+ this.annotation &&
375
+ this.hoveredAnnotation === this.annotation.id
376
+ );
377
+ },
378
+ showMissingButton() {
321
379
  return (
322
380
  this.hoveredAnnotation &&
323
381
  !this.isAnnotationInEditMode(this.annotationId()) &&
324
- !this.annotation
382
+ !this.annotation &&
383
+ !this.annotationIsNotFound(this.annotationSet, this.label)
384
+ );
385
+ },
386
+ showRestoreButton() {
387
+ return (
388
+ this.hoveredAnnotation &&
389
+ !this.isAnnotationInEditMode(this.annotationId()) &&
390
+ this.annotationIsNotFound(this.annotationSet, this.label)
325
391
  );
326
392
  },
327
393
  showCancelButton() {
@@ -353,13 +419,13 @@ export default {
353
419
  }
354
420
  }
355
421
  },
356
- handleReject() {
422
+ handleMissingAnnotation() {
357
423
  if (!this.label || !this.annotationSet) return;
358
424
 
359
425
  // will emit to the DocumentAnnotations component, where the method is handled
360
426
  // & dispatched to the store
361
427
  this.$parent.$emit(
362
- "handle-reject",
428
+ "handle-missing-annotation",
363
429
  this.label.id,
364
430
  this.annotationSet.label_set.id,
365
431
  this.annotationSet.id,
@@ -370,7 +436,8 @@ export default {
370
436
  if (this.publicView) return;
371
437
 
372
438
  if (
373
- this.showAcceptAndDeclineButtons() ||
439
+ this.showAcceptButton() ||
440
+ this.showDeclineButton() ||
374
441
  this.isAnnotationInEditMode(
375
442
  this.annotationId(),
376
443
  this.editAnnotation.index
@@ -389,6 +456,30 @@ export default {
389
456
  this.saveEmptyAnnotationChanges();
390
457
  }
391
458
  },
459
+ handleRestore() {
460
+ this.isLoading = true;
461
+
462
+ const foundItem = this.missingAnnotations.find(
463
+ (item) =>
464
+ item.annotation_set === this.annotationSet.id &&
465
+ item.label === this.label.id &&
466
+ item.label_set === this.annotationSet.label_set.id
467
+ );
468
+
469
+ this.$store
470
+ .dispatch("document/deleteMissingAnnotation", foundItem.id)
471
+ .catch((error) => {
472
+ this.$store.dispatch("document/createErrorMessage", {
473
+ error,
474
+ serverErrorMessage: this.$t("server_error"),
475
+ defaultErrorMessage: this.$t("edit_error"),
476
+ });
477
+ })
478
+ .finally(() => {
479
+ this.isLoading = false;
480
+ this.closedTag = null;
481
+ });
482
+ },
392
483
  handleSaveAnnotationChanges(
393
484
  annotation,
394
485
  spanIndex,
@@ -575,15 +666,15 @@ export default {
575
666
 
576
667
  // Check for what empty annotations we want to show the loading
577
668
  // while waiting for it to be removed from the row
578
- if (!this.rejectedMissingAnnotations) {
669
+ if (!this.annotationsMarkedAsMissing) {
579
670
  this.isLoading = false;
580
671
  this.saveChanges = false;
581
672
  return;
582
673
  }
583
674
 
584
- if (this.rejectedMissingAnnotations.length > 0) {
585
- this.rejectedMissingAnnotations.map((annotation) => {
586
- // Check if the annotation set and label are rejected
675
+ if (this.annotationsMarkedAsMissing.length > 0) {
676
+ this.annotationsMarkedAsMissing.map((annotation) => {
677
+ // Check if the annotation set and label are marked as missing
587
678
  if (
588
679
  annotation.label_set === this.annotationSet.label_set.id &&
589
680
  annotation.annotation_set === this.annotationSet.id &&
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <div class="action-buttons">
3
+ <!-- mark all empty labels as missing -->
4
+ <div
5
+ v-if="!publicView"
6
+ class="missing-decline-button-container all-missing"
7
+ @mouseenter="mouseenterAnnotationSet('missing')"
8
+ @mouseleave="mouseleaveAnnotationSet"
9
+ >
10
+ <b-button
11
+ type="is-ghost"
12
+ class="missing-decline-btn missing-btn all-missing-btn"
13
+ :disabled="numberOfEmptyLabelsInAnnotationSet === 0"
14
+ @click.stop="markAllAsMissing"
15
+ >
16
+ {{ $t("mark_all_missing") }} ({{ numberOfEmptyLabelsInAnnotationSet }})
17
+ </b-button>
18
+ </div>
19
+
20
+ <!-- accept all pending annotations -->
21
+ <div
22
+ v-if="!publicView"
23
+ class="accept-all"
24
+ @mouseenter="mouseenterAnnotationSet('accept')"
25
+ @mouseleave="mouseleaveAnnotationSet"
26
+ >
27
+ <b-button
28
+ type="is-primary"
29
+ class="accept-all-btn"
30
+ :disabled="numberOfPendingAnnotationsInAnnotationSet === 0"
31
+ @click.stop="acceptAllPending"
32
+ >
33
+ {{ $t("accept_group") }} ({{
34
+ numberOfPendingAnnotationsInAnnotationSet
35
+ }})
36
+ </b-button>
37
+ </div>
38
+ </div>
39
+ </template>
40
+ <script>
41
+ /* Component for showing actions for each Annotation Set */
42
+
43
+ import { mapState } from "vuex";
44
+
45
+ export default {
46
+ name: "AnnotationSetActionButtons",
47
+ props: {
48
+ numberOfEmptyLabelsInAnnotationSet: {
49
+ type: Number,
50
+ },
51
+ numberOfPendingAnnotationsInAnnotationSet: {
52
+ type: Number,
53
+ },
54
+ },
55
+ computed: {
56
+ ...mapState("document", ["publicView"]),
57
+ },
58
+ methods: {
59
+ mouseenterAnnotationSet(type) {
60
+ if (type == "missing") {
61
+ this.$emit("hover-annotation-set-to-mark-missing");
62
+ }
63
+
64
+ if (type == "accept") {
65
+ this.$emit("hover-annotation-set-to-accept");
66
+ }
67
+ },
68
+ mouseleaveAnnotationSet() {
69
+ this.$emit("leave-annotation-set-to-accept");
70
+ this.$emit("leave-annotation-set-to-mark-missing");
71
+ },
72
+ markAllAsMissing() {
73
+ this.$emit("mark-all-empty-missing");
74
+ },
75
+ acceptAllPending() {
76
+ this.$emit("accept-all-pending-annotations");
77
+ },
78
+ },
79
+ };
80
+ </script>
81
+
82
+ <style
83
+ scoped
84
+ lang="scss"
85
+ src="../../assets/scss/document_annotations.scss"
86
+ ></style>
@@ -105,9 +105,18 @@ export default {
105
105
  },
106
106
  computed: {
107
107
  ...mapState("category", ["categories"]),
108
- ...mapState("document", ["selectedDocument"]),
108
+ ...mapState("document", [
109
+ "selectedDocument",
110
+ "categorizeModalIsActive",
111
+ "splittingSuggestions",
112
+ ]),
109
113
  ...mapGetters("category", ["category", "projectHasSingleCategory"]),
110
114
  ...mapGetters("document", ["categorizationIsConfirmed"]),
115
+
116
+ singleCategoryInProject() {
117
+ // if only 1 category in the project, we don't enable the dropdown
118
+ return this.categories && this.categories.length === 1;
119
+ },
111
120
  },
112
121
  watch: {
113
122
  selectedDocument(newValue) {
@@ -127,6 +136,13 @@ export default {
127
136
  show(newValue) {
128
137
  this.$store.dispatch("display/setCategorizeModalIsActive", newValue);
129
138
  },
139
+ categorizeModalIsActive(newValue) {
140
+ // Show modal after split suggestion modal
141
+ // if no category confirmed
142
+ if (newValue) {
143
+ this.show = newValue && !this.categorizationIsConfirmed;
144
+ }
145
+ },
130
146
  },
131
147
  mounted() {
132
148
  this.setDocumentValues();
@@ -159,7 +175,13 @@ export default {
159
175
  }
160
176
 
161
177
  this.selectedCategory = category;
162
- this.show = !this.categorizationIsConfirmed;
178
+ this.documentCategory = category;
179
+
180
+ // By default, if the document has no category, the categorize modal is shown
181
+ // But if there is a category, we also need to check if there are splitting suggestions or not
182
+ this.show =
183
+ (!category || (category && !this.splittingSuggestions)) &&
184
+ !this.categorizationIsConfirmed;
163
185
  }
164
186
  },
165
187
  canCloseModal() {