Skip to content

Commit 77138ee

Browse files
committed
Merge branch 'vue3-migration-2492' of https://github.com/FAIRsharing/fairsharing.github.io into vue3-migration-2492
2 parents 3cf3391 + 08a44e5 commit 77138ee

13 files changed

Lines changed: 277 additions & 328 deletions

documentation/html/components_Records_Record_Collections.vue.html

Lines changed: 77 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -93,121 +93,121 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
9393
<pre
9494
class="sunlight-highlight-javascript linenums">&lt;template>
9595
&lt;v-card
96-
v-if="!tabsDataExist"
97-
:color="backColor"
98-
border
99-
class="pa-4 d-flex flex-column overflow-initial"
100-
elevation="3"
101-
tile
96+
v-if="!tabsDataExist"
97+
:color="backColor"
98+
border
99+
class="pa-4 d-flex flex-column overflow-initial"
100+
elevation="3"
101+
tile
102102
>
103-
&lt;SectionTitle title="Collections &amp;amp; Recommendations"/>
103+
&lt;SectionTitle title="Collections &amp;amp; Recommendations" />
104104
&lt;div class="d-flex flex-column ml-2 min-height-40">
105105
&lt;div class="d-flex flex-wrap mt-5">
106106
&lt;!-- search autocomplete -->
107107
&lt;v-autocomplete
108-
v-if="!tabsDataExist"
109-
v-model="selectedValues"
110-
:disabled="
108+
v-if="!tabsDataExist"
109+
v-model="selectedValues"
110+
:disabled="
111111
tabsData.tabs[Object.keys(tabsData.tabs)[tabsData.selectedTab]].data
112112
.length &lt; 5
113113
"
114-
:items="getValues"
115-
:menu-props="{ attach: true }"
116-
:placeholder="`Search through ${cleanString(Object.keys(tabsData.tabs)[tabsData.selectedTab])}`"
117-
clearable
118-
density="compact"
119-
item-title="name"
120-
item-value="name"
121-
prepend-inner-icon="fas fa-search"
122-
style="z-index: 2"
123-
variant="solo"
114+
:items="getValues"
115+
:menu-props="{ attach: true }"
116+
:placeholder="`Search through ${cleanString(Object.keys(tabsData.tabs)[tabsData.selectedTab])}`"
117+
clearable
118+
density="compact"
119+
item-title="name"
120+
item-value="name"
121+
prepend-inner-icon="fas fa-search"
122+
style="z-index: 2"
123+
variant="solo"
124124
>
125125
&lt;template #item="{ props, item }">
126126
&lt;v-list class="cursor-pointer pl-5 item-name">
127127
&lt;div v-bind="props">
128-
&lt;span>
129-
{{ item.raw.name }}
130-
&lt;/span>
128+
&lt;span>
129+
{{ item.raw.name }}
130+
&lt;/span>
131131
&lt;/div>
132132
&lt;/v-list>
133133
&lt;/template>
134134
&lt;/v-autocomplete>
135135
&lt;/div>
136136
&lt;!-- tabs -->
137137
&lt;v-tabs
138-
v-if="!tabsDataExist"
139-
v-model="tabsData.selectedTab"
140-
:hide-slider="
138+
v-if="!tabsDataExist"
139+
v-model="tabsData.selectedTab"
140+
:hide-slider="
141141
tabsData.tabs[Object.keys(tabsData.tabs)[tabsData.selectedTab]]
142142
.type === 'conforming_resources'
143143
? !currentRecord['fairsharingRecord'].savedSearches.length
144144
: tabsData.tabs[Object.keys(tabsData.tabs)[tabsData.selectedTab]]
145145
.data.length === 0
146146
"
147-
:show-arrows="$vuetify.display.mdAndDown"
148-
bg-color="transparent"
149-
class="mb-5"
150-
color="accent3"
151-
grow
152-
slider-color="accent3"
147+
:show-arrows="$vuetify.display.mdAndDown"
148+
bg-color="transparent"
149+
class="mb-5"
150+
color="accent3"
151+
grow
152+
slider-color="accent3"
153153
>
154154
&lt;v-tab
155-
v-for="(tabName, tabIndex) in Object.keys(tabsData.tabs)"
156-
:key="tabName + '_' + tabIndex"
157-
:disabled="
155+
v-for="(tabName, tabIndex) in Object.keys(tabsData.tabs)"
156+
:key="tabName + '_' + tabIndex"
157+
:disabled="
158158
tabName === 'conforming_resources'
159159
? !currentRecord['fairsharingRecord'].savedSearches.length
160160
: tabsData.tabs[tabName].data.length === 0
161161
"
162-
@group:selected="selectedValues = null"
162+
@group:selected="selectedValues = null"
163163
>
164164
{{ cleanString(tabName) }} ({{
165165
tabName === "conforming_resources"
166-
? currentRecord["fairsharingRecord"].savedSearches.length
167-
: tabsData.tabs[tabName].count
166+
? currentRecord["fairsharingRecord"].savedSearches.length
167+
: tabsData.tabs[tabName].count
168168
}})
169169
&lt;/v-tab>
170170
&lt;/v-tabs>
171171
&lt;!-- tab content -->
172172
&lt;v-tabs-window
173-
v-if="!tabsDataExist"
174-
v-model="tabsData.selectedTab"
175-
:class="['transparent', tabsDataExist]"
173+
v-if="!tabsDataExist"
174+
v-model="tabsData.selectedTab"
175+
:class="['transparent', tabsDataExist]"
176176
>
177177
&lt;v-tabs-window-item
178-
v-for="(tabItem, tabItemIndex) in filterList"
179-
:key="tabItem + '_' + tabItemIndex"
178+
v-for="(tabItem, tabItemIndex) in filterList"
179+
:key="tabItem + '_' + tabItemIndex"
180180
>
181-
&lt;SavedSearches v-if="tabItem.type === 'conforming_resources'"/>
181+
&lt;SavedSearches v-if="tabItem.type === 'conforming_resources'" />
182182

183183
&lt;v-virtual-scroll
184-
v-else
185-
:items="tabItem.data"
186-
class="ma-4 overflow-x-hidden"
187-
height="400"
188-
item-height="130"
184+
v-else
185+
:items="tabItem.data"
186+
class="ma-4 overflow-x-hidden"
187+
height="400"
188+
item-height="130"
189189
>
190190
&lt;template #default="{ item, index }">
191191
&lt;router-link
192-
:to="'/' + item.id"
193-
@click="() => $scrollTo('body', 0, {})"
192+
:to="'/' + item.id"
193+
@click="() => $scrollTo('body', 0, {})"
194194
>
195195
&lt;v-card
196-
:key="item.id + '_' + index"
197-
border
198-
class="pa-4 d-flex flex-column v-card-hover mx-2 height-120"
199-
flat
196+
:key="item.id + '_' + index"
197+
border
198+
class="pa-4 d-flex flex-column v-card-hover mx-2 height-120"
199+
flat
200200
>
201201
&lt;div class="d-flex align-center">
202-
&lt;record-status :record="item" :show-status="false"/>
202+
&lt;record-status :record="item" :show-status="false" />
203203
&lt;div
204-
class="ml-10 underline-effect text-ellipses-height-2lines line-height-20"
204+
class="ml-10 underline-effect text-ellipses-height-2lines line-height-20"
205205
>
206206
{{ item.name }}
207207
&lt;/div>
208208
&lt;/div>
209209
&lt;p
210-
class="text-grey relation-style text-ellipses-height-2lines line-height-14 pr-5"
210+
class="text-grey relation-style text-ellipses-height-2lines line-height-14 pr-5"
211211
>
212212
{{ item.object }}
213213
&lt;v-tooltip location="top">
@@ -217,8 +217,8 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
217217
&lt;/span>
218218
&lt;/template>
219219
&lt;span>{{
220-
relationDefinition[item.recordAssociationLabel]
221-
}}&lt;/span>
220+
relationDefinition[item.recordAssociationLabel]
221+
}}&lt;/span>
222222
&lt;/v-tooltip>
223223
{{ item.subject }}
224224
&lt;/p>
@@ -233,7 +233,7 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
233233
&lt;/template>
234234

235235
&lt;script>
236-
import {mapState} from "vuex";
236+
import { mapState } from "vuex";
237237

238238
import SavedSearches from "@/components/Records/Record/GeneralInfo/SavedSearches";
239239
import SectionTitle from "@/components/Records/Record/SectionTitle";
@@ -263,7 +263,7 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
263263
tabsData: {
264264
selectedTab: 0,
265265
tabs: {
266-
in_collections: {relation: "collects", data: [], count: 0},
266+
in_collections: { relation: "collects", data: [], count: 0 },
267267
},
268268
},
269269
};
@@ -278,7 +278,7 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
278278
//Update the count of the conforming resources after unlinking saved search
279279
if (tabName === "conforming_resources") {
280280
_module.tabsData.tabs[tabName].count =
281-
_module.currentRecord["fairsharingRecord"].savedSearches.length;
281+
_module.currentRecord["fairsharingRecord"].savedSearches.length;
282282
}
283283
//If no saved search is available in conforming resources tab
284284
if (!_module.currentRecord["fairsharingRecord"].savedSearches.length) {
@@ -319,8 +319,7 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
319319
count: 0,
320320
type: "conforming_resources",
321321
};
322-
}
323-
else {
322+
} else {
324323
_module.tabsData.tabs.in_policies = {
325324
relation: "recommends",
326325
data: [],
@@ -331,9 +330,9 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
331330
Object.keys(_module.currentRecord["fairsharingRecord"]).includes(
332331
"recordAssociations",
333332
) ||
334-
Object.keys(_module.currentRecord["fairsharingRecord"]).includes(
335-
"reverseRecordAssociations",
336-
)
333+
Object.keys(_module.currentRecord["fairsharingRecord"]).includes(
334+
"reverseRecordAssociations",
335+
)
337336
) {
338337
/*
339338
* In this case the related_policies tab could have relations going either way.
@@ -355,15 +354,15 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
355354
)
356355
.filter((item) => item.recordAssociationLabel !== "collects");
357356
_module.tabsData.tabs[tabName].count =
358-
_module.tabsData.tabs[tabName].data.length;
357+
_module.tabsData.tabs[tabName].data.length;
359358
}
360359
//Save searches for the policy
361360
else if (tabName === "conforming_resources") {
362361
_module.tabsData.tabs[tabName].data =
363-
_module.currentRecord["fairsharingRecord"].savedSearches;
362+
_module.currentRecord["fairsharingRecord"].savedSearches;
364363

365364
_module.tabsData.tabs[tabName].count =
366-
_module.currentRecord["fairsharingRecord"].savedSearches.length;
365+
_module.currentRecord["fairsharingRecord"].savedSearches.length;
367366
}
368367
// All incoming collections.
369368
else {
@@ -377,14 +376,13 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
377376
.filter(
378377
(item) =>
379378
item.recordAssociationLabel ===
380-
_module.tabsData.tabs[tabName].relation,
379+
_module.tabsData.tabs[tabName].relation,
381380
);
382381
_module.tabsData.tabs[tabName].count =
383-
_module.tabsData.tabs[tabName].data.length;
382+
_module.tabsData.tabs[tabName].data.length;
384383
}
385384
});
386-
}
387-
else {
385+
} else {
388386
/*
389387
* Here, only incoming recommends or collects relations are expected.
390388
*/
@@ -399,14 +397,13 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
399397
.filter(
400398
(item) =>
401399
item.recordAssociationLabel ===
402-
_module.tabsData.tabs[tabName].relation,
400+
_module.tabsData.tabs[tabName].relation,
403401
);
404402
_module.tabsData.tabs[tabName].count =
405-
_module.tabsData.tabs[tabName].data.length;
403+
_module.tabsData.tabs[tabName].data.length;
406404
});
407405
}
408-
}
409-
else {
406+
} else {
410407
return false;
411408
}
412409
},
@@ -416,7 +413,7 @@ <h1 class="page-title">Source: components/Records/Record/Collections.vue</h1>
416413
&lt;style lang="scss" scoped>
417414
.item-name {
418415
&amp;:hover {
419-
background-color: #00000008
416+
background-color: #00000008;
420417
}
421418
}
422419
&lt;/style>

0 commit comments

Comments
 (0)