Skip to content

Commit e20aad4

Browse files
committed
Addressing feedback from Abel
1 parent bd7f6bb commit e20aad4

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

src/components/AuthorCardEditing.vue

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146

147147
<script lang="ts">
148148
import axios from 'axios'
149+
// eslint-disable-next-line sort-imports
149150
import { byError, emailQueries, orcidQueries } from 'src/error-filtering'
150151
import { computed, defineComponent } from 'vue'
151152
import InfoDialog from 'components/InfoDialog.vue'
@@ -209,18 +210,19 @@ export default defineComponent({
209210
}
210211
},
211212
watch: {
212-
orcid(oldVal, newVal) {
213+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
214+
orcid (oldVal, newVal) {
213215
if (this.orcid.length === 37 && this.orcidErrors.length === 0) {
214216
// If a valid orcid is found, look for data in the orcid API (maybe only if we do not have data already)
215-
const orcidSearchApi = 'https://pub.orcid.org/v3.0/expanded-search/?q=orcid:';
216-
const orcidEndpoint = this.orcid.replace('https://orcid.org/', orcidSearchApi) + '&rows=1';
217+
const orcidSearchApi = 'https://pub.orcid.org/v3.0/expanded-search/?q=orcid:'
218+
const orcidEndpoint = this.orcid.replace('https://orcid.org/', orcidSearchApi) + '&rows=1'
217219
// This is a test endpoint on Zenodo sandbox.
218220
// const orcidEndpoint = 'https://pub.sandbox.orcid.org/v3.0/expanded-search/?q=orcid:0000-0001-8555-849X&rows=1';
219221
220222
axios.interceptors.request.use((config) => {
221-
config.props = this;
222-
return config;
223-
});
223+
config.props = this
224+
return config
225+
})
224226
225227
void axios.get(orcidEndpoint,
226228
{
@@ -229,10 +231,14 @@ export default defineComponent({
229231
accept: 'application/vnd.orcid+json'
230232
}
231233
}).then(resp => {
232-
resp.config.props.$emit('update', 'givenNames', resp.data['expanded-result'][0]['given-names']);
233-
resp.config.props.$emit('update', 'familyNames', resp.data['expanded-result'][0]['family-names']);
234-
resp.config.props.$emit('update', 'email', resp.data['expanded-result'][0].email[0]);
235-
resp.config.props.$emit('update', 'affiliation', resp.data['expanded-result'][0]['institution-name'][0]);
234+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
235+
resp.config.props.$emit('update', 'givenNames', resp.data['expanded-result'][0]['given-names'])
236+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
237+
resp.config.props.$emit('update', 'familyNames', resp.data['expanded-result'][0]['family-names'])
238+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
239+
resp.config.props.$emit('update', 'email', resp.data['expanded-result'][0].email[0])
240+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
241+
resp.config.props.$emit('update', 'affiliation', resp.data['expanded-result'][0]['institution-name'][0])
236242
})
237243
}
238244
}

src/store/help-data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export const helpData = {
130130
link: 'https://github.com/citation-file-format/citation-file-format/blob/1.2.0/schema-guide.md#how-to-deal-with-unknown-individual-authors'
131131
}
132132
],
133-
description: 'The authors of a software or dataset.',
133+
description: 'The authors of a software or dataset. TIP: you can use the ORCID of the author to autocomplete author information.',
134134
examples: [
135135
' given-names: Jane\n family-names: Doe',
136136
' name: "The Research Software project"',

0 commit comments

Comments
 (0)