@konfuzio/document-validation-ui 0.1.49-dev.2 → 0.1.50-dev.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konfuzio/document-validation-ui",
3
- "version": "0.1.49-dev.2",
3
+ "version": "0.1.50-dev.0",
4
4
  "repository": "git://github.com:konfuzio-ai/document-validation-ui.git",
5
5
  "main": "dist/app.js",
6
6
  "scripts": {
package/src/api.js CHANGED
@@ -5,6 +5,9 @@ let HTTP, FILE_REQUEST, authToken, appLocale, isKeycloakAuth;
5
5
  const DEFAULT_URL = "https://app.konfuzio.com";
6
6
  const FILE_URL = process.env.VUE_APP_IMAGE_URL;
7
7
 
8
+ axios.defaults.xsrfCookieName = "csrftoken";
9
+ axios.defaults.xsrfHeaderName = "X-CSRFToken";
10
+
8
11
  HTTP = axios.create({
9
12
  baseURL: process.env.VUE_APP_API_URL || `${DEFAULT_URL}/api/v3/`,
10
13
  });
@@ -682,7 +682,7 @@ export default {
682
682
  label: this.label.id,
683
683
  annotation_set: this.annotationSet.id,
684
684
  is_correct: true,
685
- revised: true,
685
+ revised: false,
686
686
  };
687
687
  } else {
688
688
  // if annotation set id is null
@@ -692,7 +692,7 @@ export default {
692
692
  label: this.label.id,
693
693
  label_set: this.labelSet.id,
694
694
  is_correct: true,
695
- revised: true,
695
+ revised: false,
696
696
  };
697
697
  }
698
698
  this.isLoading = true;
@@ -19,7 +19,7 @@
19
19
  </div>
20
20
  <div class="bottom-part">
21
21
  {{
22
- `#${numberOfDocumentInSet(selectedDocument.id)} ${categoryName(
22
+ `${numberOfDocumentInSet(selectedDocument.id)} ${categoryName(
23
23
  selectedDocument.category
24
24
  )}`
25
25
  }}
@@ -41,7 +41,7 @@
41
41
  >
42
42
  <span>
43
43
  {{
44
- `#${numberOfDocumentInSet(doc.id)} ${categoryName(doc.category)}`
44
+ `${numberOfDocumentInSet(doc.id)} ${categoryName(doc.category)}`
45
45
  }}</span
46
46
  >
47
47
  </b-dropdown-item>
@@ -484,7 +484,7 @@ const getters = {
484
484
  /* Returns the number of accepted annotations in a label */
485
485
  numberOfAcceptedAnnotationsInLabel: (_) => (label) => {
486
486
  const annotations = label.annotations.filter((annotation) => {
487
- return annotation.revised && annotation.is_correct;
487
+ return annotation.is_correct;
488
488
  });
489
489
  return annotations.length;
490
490
  },
@@ -524,6 +524,7 @@ const getters = {
524
524
  * Checks the number of current document in the document set
525
525
  */
526
526
  numberOfDocumentInSet: (state) => (documentId) => {
527
+ return "";
527
528
  let index = -1;
528
529
  if (state.documentSet && state.documentSet.documents) {
529
530
  state.documentSet.documents.forEach((docTemp, indexTemp) => {