Skip to content

Commit 821ce50

Browse files
committed
fixing bugs for general information tab in edit record
1 parent 3293e59 commit 821ce50

6 files changed

Lines changed: 79 additions & 66 deletions

File tree

src/components/Editor/GeneralInformation/BaseFields.vue

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<template #prepend>
6161
<v-tooltip location="bottom">
6262
<template #activator="{ props }">
63-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
63+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
6464
</template>
6565
{{ tooltips["name"] }}
6666
</v-tooltip>
@@ -75,7 +75,7 @@
7575
<template #prepend>
7676
<v-tooltip class="text-justify" location="bottom" max-width="300px">
7777
<template #activator="{ props }">
78-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
78+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
7979
</template>
8080
{{ tooltips["abbreviation"] }}
8181
</v-tooltip>
@@ -91,7 +91,7 @@
9191
<template #prepend>
9292
<v-tooltip class="text-justify" location="bottom" max-width="300px">
9393
<template #activator="{ props }">
94-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
94+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
9595
</template>
9696
{{ tooltips["homepage"] }}
9797
</v-tooltip>
@@ -162,7 +162,7 @@
162162
<template #prepend>
163163
<v-tooltip class="text-justify" location="bottom" max-width="300px">
164164
<template #activator="{ props }">
165-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
165+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
166166
</template>
167167
{{ tooltips["year"] }}
168168
</v-tooltip>
@@ -183,7 +183,7 @@
183183
<template #prepend>
184184
<v-tooltip class="text-justify" location="bottom" max-width="300px">
185185
<template #activator="{ props }">
186-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
186+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
187187
</template>
188188
{{ tooltips["countries"] }}
189189
</v-tooltip>
@@ -237,11 +237,11 @@
237237
<!-- Item selected -->
238238
<template #chip="data">
239239
<v-chip
240-
v-if="data.item.raw.name"
240+
v-if="data.item.title"
241241
class="bg-blue text-white text-capitalize"
242242
closable
243243
>
244-
{{ data.item.raw.name.replace(/_/g, " ") }}
244+
{{ data.item.title.replace(/_/g, " ") }}
245245
</v-chip>
246246
</template>
247247
<!-- select list data -->
@@ -363,7 +363,7 @@
363363
<template #prepend>
364364
<v-tooltip class="text-justify" location="bottom" max-width="300px">
365365
<template #activator="{ props }">
366-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
366+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
367367
</template>
368368
{{ tooltips["internal_identifiers"] }}
369369
</v-tooltip>
@@ -389,7 +389,7 @@
389389
max-width="300px"
390390
>
391391
<template #activator="{ props }">
392-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
392+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
393393
</template>
394394
{{ tooltips["globally_unique"] }}
395395
</v-tooltip>
@@ -420,7 +420,7 @@
420420
max-width="300px"
421421
>
422422
<template #activator="{ props }">
423-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
423+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
424424
</template>
425425
{{ tooltips["persistent"] }}
426426
</v-tooltip>
@@ -451,7 +451,7 @@
451451
max-width="300px"
452452
>
453453
<template #activator="{ props }">
454-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
454+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
455455
</template>
456456
{{ tooltips["resolvable"] }}
457457
</v-tooltip>
@@ -487,7 +487,7 @@
487487
max-width="300px"
488488
>
489489
<template #activator="{ props }">
490-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
490+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
491491
</template>
492492
{{ tooltips["deprecation_reason"] }}
493493
</v-tooltip>
@@ -507,7 +507,7 @@
507507
<template #prepend>
508508
<v-tooltip class="text-justify" location="bottom" max-width="300px">
509509
<template #activator="{ props }">
510-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
510+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
511511
</template>
512512
{{ tooltips["description"] }}
513513
</v-tooltip>
@@ -531,7 +531,7 @@
531531
max-width="300px"
532532
>
533533
<template #activator="{ props }">
534-
<v-icon v-bind="props"> fas fa-question-circle </v-icon>
534+
<v-icon v-bind="props"> fas fa-question-circle</v-icon>
535535
</template>
536536
{{ tooltips["curator_notes"] }}
537537
</v-tooltip>
@@ -661,8 +661,7 @@ export default {
661661
// submits with no image uploaded.
662662
if (_module.currentRecord.fairsharingRecord.urlForLogo) {
663663
_module.fields.delete("logo");
664-
}
665-
else {
664+
} else {
666665
_module.fields.logo = {};
667666
}
668667
return;
@@ -730,8 +729,7 @@ export default {
730729
if (_module.possibleDuplicates.length > 0) {
731730
if (_module.submitRecord) {
732731
return false;
733-
}
734-
else {
732+
} else {
735733
return true;
736734
}
737735
}
@@ -770,27 +768,34 @@ export default {
770768
.registryList {
771769
max-width: 780px;
772770
}
771+
773772
.removeStyle button {
774773
color: white !important;
775774
margin-left: 12px !important;
776775
}
776+
777777
:deep(.v-list-item-title) {
778778
display: none;
779779
}
780+
780781
:deep .v-list-subheader {
781782
&__text {
782783
width: 100%;
783784
}
784785
}
786+
785787
.checkboxes {
786788
text-align: center;
787789
}
790+
788791
.checkboxes input {
789792
margin: 0px 0px 0px 0px;
790793
}
794+
791795
.checkboxes label {
792796
margin: 0px 20px 0px 3px;
793797
}
798+
794799
.editFormSelect :deep(.v-field__input) {
795800
padding: 0 0 0 6px;
796801
}

src/components/Editor/GeneralInformation/Contact.vue

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@
1010
<v-chip
1111
v-for="(contact, index) in contacts"
1212
:key="'contact_' + index"
13-
class="pr-3 my-1 mr-2 ml-0"
1413
:class="[
1514
!isNew(contact) ? 'text-white blue' : 'text-blue white borderBlue',
1615
]"
17-
variant="flat"
16+
class="pr-3 my-1 mr-2 ml-0"
1817
color="blue"
18+
variant="flat"
1919
>
2020
<div>
2121
<v-tooltip location="top">
2222
<template #activator="{ props }">
2323
<v-icon
24-
size="small"
2524
class="mr-2 text-white"
25+
size="small"
2626
v-bind="props"
2727
@click="editContact(contact, index)"
2828
>
@@ -58,7 +58,7 @@
5858
class="bg-green text-white pr-5 shadowChip"
5959
@click="createNewContact()"
6060
>
61-
<v-icon size="small" class="mr-3 text-white">
61+
<v-icon class="mr-3 text-white" size="small">
6262
fas fa-plus-circle
6363
</v-icon>
6464
Add a new contact point
@@ -76,34 +76,34 @@
7676
<v-card-text class="pt-4">
7777
<v-text-field
7878
v-model="menu.content['contact_name']"
79-
label="Contact Name"
8079
:rules="[rules.isRequired()]"
80+
label="Contact Name"
8181
variant="outlined"
8282
/>
8383
<v-text-field
8484
v-model="menu.content['contact_email']"
85-
label="Contact Email"
8685
:rules="[rules.isRequired(), rules.isEmail()]"
86+
label="Contact Email"
8787
variant="outlined"
8888
/>
8989
<v-text-field
9090
v-model="menu.content['contact_orcid']"
91-
label="Contact ORCID"
9291
:rules="[rules.isOrcid(false)]"
92+
label="Contact ORCID"
9393
placeholder="0000-0000-0000-0000"
9494
variant="outlined"
9595
/>
9696
</v-card-text>
9797
<v-card-actions>
9898
<v-btn
99-
class="bg-success"
10099
:disabled="!formValid"
100+
class="bg-success"
101101
type="submit"
102102
@click="addItem()"
103103
>
104104
{{ menu.label }}
105105
</v-btn>
106-
<v-btn class="bg-error" @click="menu.show = false"> Cancel </v-btn>
106+
<v-btn class="bg-error" @click="menu.show = false"> Cancel</v-btn>
107107
</v-card-actions>
108108
</v-card>
109109
</v-overlay>
@@ -189,9 +189,9 @@ export default {
189189
addItem() {
190190
if (this.formValid && !this.submitted) {
191191
if (this.menu.index || this.menu.index === 0) {
192-
this.$set(this.contacts, this.menu.index, this.menu.content);
192+
this.contacts[this.menu.index] = this.menu.content;
193193
} else {
194-
this.$set(this.contacts, this.contacts.length, this.menu.content);
194+
this.contacts[this.contacts.length] = this.menu.content;
195195
}
196196
this.menu.show = false;
197197
this.submitted = true;
@@ -208,14 +208,17 @@ export default {
208208
#editContact .v-overlay__content {
209209
min-width: 700px;
210210
}
211+
211212
#editContact .borderBlue {
212213
border: 1px solid #2a9af4 !important;
213214
background-color: white !important;
214215
border-color: #2a9af4 !important;
215216
}
217+
216218
#editContact .v-chip.white {
217219
border-color: #2a9af4 !important;
218220
}
221+
219222
#editContact .borderBlue * {
220223
color: #2a9af4 !important;
221224
}

0 commit comments

Comments
 (0)