@konfuzio/document-validation-ui 0.1.26-dev.2 → 0.1.26-dev.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/package.json
CHANGED
package/src/components/App.vue
CHANGED
|
@@ -78,6 +78,12 @@ export default {
|
|
|
78
78
|
required: false,
|
|
79
79
|
default: "",
|
|
80
80
|
},
|
|
81
|
+
// eslint-disable-next-line vue/prop-name-casing
|
|
82
|
+
review_filter: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
required: false,
|
|
85
|
+
default: false,
|
|
86
|
+
},
|
|
81
87
|
},
|
|
82
88
|
computed: {
|
|
83
89
|
documentId() {
|
|
@@ -130,6 +136,15 @@ export default {
|
|
|
130
136
|
return null;
|
|
131
137
|
}
|
|
132
138
|
},
|
|
139
|
+
reviewFilter() {
|
|
140
|
+
if (process.env.VUE_APP_DOCUMENTS_LIST_REVIEW_FILTER) {
|
|
141
|
+
return process.env.VUE_APP_DOCUMENTS_LIST_REVIEW_FILTER;
|
|
142
|
+
} else if (this.review_filter) {
|
|
143
|
+
return this.review_filter;
|
|
144
|
+
} else {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
},
|
|
133
148
|
},
|
|
134
149
|
created() {
|
|
135
150
|
// Sentry config
|
|
@@ -172,6 +187,7 @@ export default {
|
|
|
172
187
|
// document and project config
|
|
173
188
|
Promise.all([
|
|
174
189
|
this.$store.dispatch("display/setDetailsUrl", this.detailsUrl),
|
|
190
|
+
this.$store.dispatch("display/setReviewFilter", this.reviewFilter),
|
|
175
191
|
this.$store.dispatch("document/setDocId", this.documentId),
|
|
176
192
|
this.$store.dispatch("document/setPublicView", this.isPublicView),
|
|
177
193
|
this.$store.dispatch(
|
|
@@ -123,6 +123,7 @@ export default {
|
|
|
123
123
|
"loading",
|
|
124
124
|
"recalculatingAnnotations",
|
|
125
125
|
]),
|
|
126
|
+
...mapState("display", ["reviewFilter"]),
|
|
126
127
|
...mapState("category", ["categories"]),
|
|
127
128
|
...mapState("edit", ["editMode"]),
|
|
128
129
|
...mapState("project", ["documentsInProject"]),
|
|
@@ -163,7 +164,7 @@ export default {
|
|
|
163
164
|
// Only consider documents who have a status of "ready"
|
|
164
165
|
const filteredDocuments = this.documentsInProject.filter(
|
|
165
166
|
(document) =>
|
|
166
|
-
this.isDocumentReadyToBeReviewed(document) ||
|
|
167
|
+
(this.reviewFilter && this.isDocumentReadyToBeReviewed(document)) ||
|
|
167
168
|
this.waitingForSplittingConfirmation(document)
|
|
168
169
|
);
|
|
169
170
|
|
package/src/store/display.js
CHANGED
|
@@ -41,6 +41,7 @@ const state = {
|
|
|
41
41
|
searchLoading: false,
|
|
42
42
|
currentSearchResult: null,
|
|
43
43
|
detailsUrl: null,
|
|
44
|
+
reviewFilter: false,
|
|
44
45
|
};
|
|
45
46
|
|
|
46
47
|
const getters = {
|
|
@@ -296,6 +297,10 @@ const actions = {
|
|
|
296
297
|
commit("SET_DETAILS_URL", value);
|
|
297
298
|
},
|
|
298
299
|
|
|
300
|
+
setReviewFilter: ({ commit }, value) => {
|
|
301
|
+
commit("SET_REVIEW_FILTER", value);
|
|
302
|
+
},
|
|
303
|
+
|
|
299
304
|
debounceSearch: debounce(({ commit, dispatch }, query) => {
|
|
300
305
|
dispatch("search", query);
|
|
301
306
|
}, 300),
|
|
@@ -417,6 +422,9 @@ const mutations = {
|
|
|
417
422
|
SET_DETAILS_URL: (state, value) => {
|
|
418
423
|
state.detailsUrl = value;
|
|
419
424
|
},
|
|
425
|
+
SET_REVIEW_FILTER: (state, value) => {
|
|
426
|
+
state.reviewFilter = value;
|
|
427
|
+
},
|
|
420
428
|
};
|
|
421
429
|
|
|
422
430
|
export default {
|