Newer
Older
<ChemicalProbeReportCard :item-i-d="itemID" />
</template>
<script>
import ChemicalProbeReportCard from '~/components/report_cards/chemical_probe/ChemicalProbeReportCard.vue'
import MetadataLoader from '~/web-components-submodule/metadata/MetadataLoader.js'
import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js'
export default {
components: {
ChemicalProbeReportCard,
},
layout: 'default',
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
async asyncData({ $axios, error, params }) {
try {
const docSource = ['pref_name']
const result = await MetadataLoader.getMetadataForEntity(
EntityNames.EubopenCompound.entityID,
params.id,
docSource
)
return {
rawMetadata: result.data._source,
}
} catch (e) {
error({
statusCode: 404,
message: `No ${EntityNames.EubopenCompound.singularEntityName} found with id ${params.id}`,
})
}
},
head() {
return {
title: `${EntityNames.EubopenCompound.singularEntityName} ${this.itemID}`,
meta: [
{
hid: 'description',
name: 'description',
content: `${this.rawMetadata.pref_name}`,
},
],
}
},
computed: {
itemID() {
return this.$route.params.id
},
},
}
</script>
<style></style>