• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FAIRsharing / fairsharing.github.io / 24769584990

22 Apr 2026 08:57AM UTC coverage: 95.892% (-4.1%) from 100.0%
24769584990

push

github

web-flow
Merge pull request #2746 from FAIRsharing/dev

Dev

3653 of 3813 branches covered (95.8%)

Branch coverage included in aggregate %.

17344 of 18229 new or added lines in 282 files covered. (95.15%)

766 existing lines in 50 files now uncovered.

38617 of 40268 relevant lines covered (95.9%)

5.48 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.17
/src/components/Records/Record/DataProcessesAndConditions/OtherDataProcesses.vue
1
<template>
2
  <v-card
1✔
3
    v-if="allowedFields.properties"
1✔
4
    class="pa-4 mt-15 d-flex flex-column overflow-initial"
1✔
5
    elevation="3"
1✔
6
    border
1✔
7
    color="white"
1✔
8
    tile
1✔
9
  >
10
    <Icon item="createdAt" size="20" class="pt-2" />
1✔
11
    <v-card-title class="pa-0 text--primary card-title-customize">
1✔
12
      Attributes and Conditions
13
    </v-card-title>
1✔
14
    <div class="mt-0 pt-8">
1✔
15
      <OtherDatasetArray
1✔
16
        v-for="(item, key, index) in finalData"
1✔
17
        :key="item.name + '_' + index + '_' + key"
1✔
18
        :title="key"
1✔
19
        :current-item="finalData[key]"
1✔
20
        :current-key="key"
1✔
21
      />
1✔
22
      <!--  dataset_versioning  -->
1✔
23
      <DatasetBoolean field-name="data_versioning" />
1✔
24
      <!--  dataset_contacts  -->
1✔
25
      <DatasetBoolean field-name="data_contact_information" />
1✔
26
      <!--  dataset_citation  -->
1✔
27
      <DatasetBoolean field-name="citation_to_related_publications" />
1✔
28
      <!--  dataset_versioning  -->
1✔
29
      <DatasetBoolean field-name="data_access_for_pre_publication_review" />
1✔
30
    </div>
1✔
31
  </v-card>
1✔
32
</template>
33

34
<script>
35
import { isArray } from "lodash";
1✔
36
import { mapActions, mapGetters, mapState } from "vuex";
1✔
37

38
import Icon from "@/components/Icon";
1✔
39
import DatasetBoolean from "@/components/Records/Record/AdditionalInfo/DatasetBoolean";
1✔
40
import OtherDatasetArray from "@/components/Records/Record/DataProcessesAndConditions/OtherDatasetArray";
1✔
41
import clearString from "@/utils/stringUtils";
1✔
42

43
export default {
1✔
44
  name: "OtherDataProcesses",
1✔
45
  components: {
1✔
46
    OtherDatasetArray,
1✔
47
    DatasetBoolean,
1✔
48
    Icon,
1✔
49
  },
1✔
50
  mixins: [clearString],
1✔
51

52
  data: () => {
1✔
53
    return {
2✔
54
      otherDataConditions: {},
2✔
55
      finalData: {},
2✔
56
    };
2✔
57
  },
1✔
58
  computed: {
1✔
59
    ...mapState("editor", ["allowedFields"]),
1✔
60
    ...mapGetters("record", ["getField", "getRecordType"]),
1✔
61
  },
1✔
62
  async mounted() {
1✔
63
    await this.getAllowedFields({
2✔
64
      type: this.getRecordType,
2✔
65
    });
2✔
66
    await this.getOtherData();
2✔
67
    this.finalData = this.otherDataConditions;
2✔
68
  },
1✔
69
  methods: {
1✔
70
    ...mapActions("editor", ["getAllowedFields"]),
1✔
71

72
    async getOtherData() {
1✔
73
      const other_data_info = [
2✔
74
        "data_access_condition",
2✔
75
        "data_curation",
2✔
76
        "resource_sustainability",
2✔
77
        "data_deposition_condition",
2✔
78
        "data_preservation_policy",
2✔
79
      ];
2✔
80
      // adding data access condition if available
2✔
81
      if (this.allowedFields.properties !== undefined) {
2✔
82
        const otherDataTypes = Object.keys(
2✔
83
          this.allowedFields.properties,
2✔
84
        ).filter((key) => other_data_info.includes(key));
2✔
85

86
        for (const key of otherDataTypes) {
2!
NEW
87
          if (
×
NEW
88
            Object.prototype.hasOwnProperty.call(this.getField("metadata"), key)
×
NEW
89
          ) {
×
NEW
90
            if (Object.keys(this.getField("metadata")[key]).length) {
×
NEW
91
              this.setAvailableData(this.getField("metadata")[key], key);
×
UNCOV
92
            }
×
UNCOV
93
          }
×
UNCOV
94
        }
×
95
      }
2✔
96
    },
1✔
97

98
    setAvailableData(selectedNode, key) {
1✔
99
      // if received node is not an array
4✔
100
      if (!isArray(selectedNode)) {
4✔
101
        this.otherDataConditions[key] = { ...selectedNode };
1✔
102
      }
1✔
103
      // if received node is an array
4✔
104
      Object.keys(selectedNode).forEach((item) => {
4✔
105
        if (Object.keys(selectedNode[item]).length) {
5✔
106
          if (Object.keys(this.otherDataConditions).includes(key)) {
3✔
107
            this.otherDataConditions[key][item] = selectedNode[item];
2✔
108
          } else {
3✔
109
            this.otherDataConditions[key] = {};
1✔
110
            this.otherDataConditions[key][item] = selectedNode[item];
1✔
111
          }
1✔
112
        }
3✔
113
      });
4✔
114
    },
1✔
115
  },
1✔
116
};
1✔
117
</script>
118

119
<style scoped>
120
.data-holder {
121
  border: 1px lightgrey solid;
122
}
123
</style>
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc