@@ -150,6 +150,7 @@ import axios from 'axios'
150
150
import { byError , emailQueries , orcidQueries } from ' src/error-filtering'
151
151
import { computed , defineComponent } from ' vue'
152
152
import InfoDialog from ' components/InfoDialog.vue'
153
+ import { useQuasar } from ' quasar'
153
154
import { useValidation } from ' src/store/validation'
154
155
155
156
export default defineComponent ({
@@ -192,6 +193,7 @@ export default defineComponent({
192
193
}
193
194
},
194
195
setup (props ) {
196
+ const $q = useQuasar ()
195
197
const { errors } = useValidation ()
196
198
const orcidErrors = computed (() => {
197
199
const orcidErrors = orcidQueries (props .index )
@@ -211,7 +213,7 @@ export default defineComponent({
211
213
},
212
214
watch: {
213
215
// eslint-disable-next-line @typescript-eslint/no-unused-vars
214
- orcid (oldVal , newVal ) {
216
+ orcid (_oldVal , _newVal ) {
215
217
if (this .orcid .length === 37 && this .orcidErrors .length === 0 ) {
216
218
// If a valid orcid is found, look for data in the orcid API (maybe only if we do not have data already)
217
219
const orcidSearchApi = ' https://pub.orcid.org/v3.0/expanded-search/?q=orcid:'
@@ -239,6 +241,17 @@ export default defineComponent({
239
241
resp .config .props .$emit (' update' , ' email' , resp .data [' expanded-result' ][0 ].email [0 ])
240
242
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
241
243
resp .config .props .$emit (' update' , ' affiliation' , resp .data [' expanded-result' ][0 ][' institution-name' ][0 ])
244
+
245
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
246
+ resp .config .props .$q .notify ({
247
+ message: ' Author information fetched from ORCID API!' ,
248
+ color: ' primary' ,
249
+ progress: true ,
250
+ timeout: 800 ,
251
+ actions: [
252
+ { label: ' Dismiss' , color: ' white' }
253
+ ]
254
+ })
242
255
})
243
256
}
244
257
}
0 commit comments