• 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

98.05
/src/components/Records/Record/DataProcessesAndConditions.vue
1
<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
2
  <v-card
1✔
3
    v-if="
1✔
4
      Object.keys(getField('metadata')).includes(
5
        'data_processes_and_conditions',
6
      ) ||
7
      (getField('licences') && getField('licences').length) ||
8
      (getField('metadata')['data_access_condition'] &&
9
        Object.keys(getField('metadata')['data_access_condition']).length) ||
10
      (getField('metadata')['data_curation'] &&
11
        Object.keys(getField('metadata')['data_curation']).length) ||
12
      (getField('metadata')['data_deposition_condition'] &&
13
        Object.keys(getField('metadata')['data_deposition_condition'])
14
          .length) ||
15
      (getField('metadata')['data_preservation_policy'] &&
16
        Object.keys(getField('metadata')['data_preservation_policy']).length) ||
17
      (getField('metadata')['certifications_and_community_badges'] &&
18
        getField('metadata')['certifications_and_community_badges'].length)
19
    "
20
    class="pa-4 d-flex flex-column overflow-initial"
1✔
21
    border
1✔
22
    :color="backColor"
1✔
23
    tile
1✔
24
    elevation="3"
1✔
25
  >
26
    <!-- Data Conditions -->
1✔
27
    <SectionTitle title="Data Processes And Conditions" />
1✔
28
    <!--  container  -->
1✔
29
    <div class="d-flex flex-column ml-2 min-height-40">
1✔
30
      <div
1✔
31
        v-if="
1✔
32
          (getField('metadata')['data_processes_and_conditions'] &&
33
            getField('metadata')['data_processes_and_conditions'].length) ||
34
          (getField('licences').length && getField('licences')) ||
35
          (getField('metadata')['certifications_and_community_badges'] &&
36
            getField('metadata')['certifications_and_community_badges'].length >
37
              0)
38
        "
39
      >
40
        <!-- DataProcessAndCondition component -->
1✔
41
        <DataProcessAndCondition />
1✔
42
        <!-- Licences component -->
1✔
43
        <v-card
1✔
44
          v-for="(item, key, index) in generateDataConditions()"
1✔
45
          :key="key + '_' + index"
1✔
46
          class="pa-4 mt-15 d-flex flex-column overflow-initial"
1✔
47
          border
1✔
48
          color="white"
1✔
49
          tile
1✔
50
          elevation="3"
1✔
51
        >
52
          <Icon :item="item.icon" size="20" class="pt-2" />
1✔
53
          <v-card-title class="pa-0 text--primary card-title-customize">
1✔
54
            {{ $filters.capitalize(cleanString(key)) }}
1✔
55
          </v-card-title>
1✔
56
          <v-card-text class="ma-0 pt-8">
1✔
57
            <div v-if="key === 'licences'">
1✔
58
              <p v-if="currentRecord.fairsharingRecord.exhaustiveLicences">
1✔
59
                This is a complete list of licences applicable to the resource.
60
              </p>
1✔
61
              <p v-else>
1✔
62
                This is a subset of licences recommended by the resource or most
63
                commonly used by its users.
64
              </p>
1✔
65
            </div>
1✔
66
            <v-card
1✔
67
              v-for="(subItem, subIndex) in item.data"
1✔
68
              :key="subItem.name + '_' + subIndex"
1✔
69
              class="pa-4 mt-2 d-flex flex-column v-card-hover"
1✔
70
              flat
1✔
71
              border
1✔
72
            >
73
              <div v-if="subItem.url">
1✔
74
                <a :href="subItem.url" target="_blank" class="underline-effect">
1✔
75
                  {{ subItem.name }}
1✔
76
                </a>
1✔
77
                <span v-if="subItem.spdxLink">
1✔
78
                  <a :href="subItem.spdxLink" target="_blank">
1✔
79
                    <img
1✔
80
                      src="/assets/icons/logo_spdx_60.png"
1✔
81
                      alt="Icon for SPDX (System Package Data Exchange)"
1✔
82
                      style="padding-bottom: 7px; padding-left: 3px"
1✔
83
                    />
1✔
84
                  </a>
1✔
85
                </span>
1✔
86
              </div>
1✔
87
              <div v-else class="d-flex flex-column">
1✔
88
                <span>{{ subItem.name }}</span>
1✔
89
                <span
1✔
90
                  v-if="
1✔
91
                    subItem.id &&
92
                    subItem.id !== 'undefined' &&
93
                    getLicenceRelation(subItem.id) !== 'undefined'
94
                  "
95
                >
1✔
96
                  relationship:
97
                  <strong
1✔
98
                    >({{ cleanString(getLicenceRelation(subItem.id)) }})</strong
1✔
99
                  >
1✔
100
                </span>
1✔
101
                <span v-if="subItem.spdxLink">
1✔
102
                  <a :href="subItem.spdxLink" target="_blank">
1✔
103
                    <img
1✔
104
                      src="/assets/icons/logo_spdx_60.png"
1✔
105
                      alt="Icon for SPDX (System Package Data Exchange)"
1✔
106
                      style="padding-bottom: 7px; padding-left: 3px"
1✔
107
                    />
1✔
108
                  </a>
1✔
109
                </span>
1✔
110
              </div>
1✔
111
            </v-card>
1✔
112
          </v-card-text>
1✔
113
        </v-card>
1✔
114
      </div>
1✔
115
      <!-- Other data items component -->
1✔
116
      <div
1✔
117
        v-if="
1✔
118
          (getField('metadata')['data_access_condition'] &&
119
            Object.keys(getField('metadata')['data_access_condition'])
120
              .length) ||
121
          (getField('metadata')['data_curation'] &&
122
            Object.keys(getField('metadata')['data_curation']).length) ||
123
          (getField('metadata')['data_deposition_condition'] &&
124
            Object.keys(getField('metadata')['data_deposition_condition'])
125
              .length) ||
126
          (getField('metadata')['data_preservation_policy'] &&
127
            Object.keys(getField('metadata')['data_preservation_policy'])
128
              .length)
129
        "
130
      >
131
        <OtherDataProcesses />
1✔
132
      </div>
1✔
133
    </div>
1✔
134
    <section />
1✔
135
  </v-card>
1✔
136
</template>
137

138
<script>
139
import { mapGetters, mapState } from "vuex";
1✔
140

141
import Icon from "@/components/Icon";
1✔
142
import DataProcessAndCondition from "@/components/Records/Record/DataProcessesAndConditions/DataProcessAndCondition";
1✔
143
import OtherDataProcesses from "@/components/Records/Record/DataProcessesAndConditions/OtherDataProcesses";
1✔
144
import SectionTitle from "@/components/Records/Record/SectionTitle";
1✔
145
import clearString from "@/utils/stringUtils";
1✔
146

147
export default {
1✔
148
  name: "DataProcessesAndConditions",
1✔
149
  components: {
1✔
150
    SectionTitle,
1✔
151
    Icon,
1✔
152
    OtherDataProcesses,
1✔
153
    DataProcessAndCondition,
1✔
154
  },
1✔
155
  mixins: [clearString],
1✔
156
  props: {
1✔
157
    backColor: {
1✔
158
      default: null,
1✔
159
      type: String,
1✔
160
    },
1✔
161
  },
1✔
162
  computed: {
1✔
163
    ...mapGetters("record", ["getField"]),
1✔
164
    ...mapState("record", ["currentRecord"]),
1✔
165
  },
1✔
166
  methods: {
1✔
167
    generateDataConditions: function () {
1✔
168
      let processedData = {};
3✔
169
      const community_badges =
3✔
170
        this.getField("metadata")["certifications_and_community_badges"];
3✔
171
      const licences = this.getField("licences");
3✔
172

173
      // // adding community badges if available
3✔
174
      if (community_badges && community_badges.length > 0) {
3✔
175
        processedData["certifications_and_community_badges"] = {
1✔
176
          data: [],
1✔
177
          icon: "certificate",
1✔
178
        };
1✔
179
        community_badges.forEach((community_badge) => {
1✔
180
          processedData["certifications_and_community_badges"].data.push(
1✔
181
            community_badge,
1✔
182
          );
1✔
183
        });
1✔
184
      }
1✔
185

186
      //adding licenses if available
3✔
187
      if (licences.length) {
3✔
188
        processedData["licences"] = {
1✔
189
          data: [],
1✔
190
          icon: "licences",
1✔
191
        };
1✔
192
        licences.forEach((licence) => {
1✔
193
          processedData["licences"].data.push(licence);
1✔
194
        });
1✔
195
      }
1✔
196
      return processedData;
3✔
197
    },
1✔
198
    getLicenceRelation(licenceId) {
1✔
UNCOV
199
      return this.getField("licenceLinks").find(
×
NEW
200
        (obj) => obj.licence.id === licenceId,
×
UNCOV
201
      ).relation;
×
202
    },
1✔
203
  },
1✔
204
};
1✔
205
</script>
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