@konfuzio/document-validation-ui 0.1.18-dev.0 → 0.1.18-dev.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.
@@ -21,6 +21,16 @@ const getters = {
21
21
  return "";
22
22
  },
23
23
 
24
+ categoryConfidence: () => (confidence) => {
25
+ if (!confidence) {
26
+ if (confidence === 0) return confidence.toFixed(2);
27
+
28
+ return;
29
+ }
30
+
31
+ return (confidence * 100).toFixed(2);
32
+ },
33
+
24
34
  /**
25
35
  * Get the category for a given category ID
26
36
  */
@@ -106,9 +116,9 @@ const actions = {
106
116
  if (
107
117
  poll &&
108
118
  rootState.project.documentsInProject.length !==
109
- state.documentsAvailableToReview.length &&
119
+ state.documentsAvailableToReview.length &&
110
120
  state.documentsAvailableToReview.length + errors !==
111
- rootState.project.documentsInProject.length
121
+ rootState.project.documentsInProject.length
112
122
  ) {
113
123
  if (count >= 10) return true;
114
124
 
@@ -126,7 +136,7 @@ const actions = {
126
136
  if (
127
137
  rootState.project.documentsInProject.length === 0 ||
128
138
  rootState.project.documentsInProject.length !==
129
- state.documentsAvailableToReview.length
139
+ state.documentsAvailableToReview.length
130
140
  ) {
131
141
  let duration;
132
142
  if (count <= 5) {