diff --git a/components/report_cards/target/ActivityCharts/ActivityTable.vue b/components/report_cards/target/ActivityCharts/ActivityTable.vue index 6a9a9fc2478ed8faef415f1ee40d4ab58ee9ae64..f4b9f2595dcba09afcce2c11c8b15ea3108518c8 100644 --- a/components/report_cards/target/ActivityCharts/ActivityTable.vue +++ b/components/report_cards/target/ActivityCharts/ActivityTable.vue @@ -46,7 +46,6 @@ export default { computed: { starterParams() { const starterParams = TargetActivities.getReportCardStarterParams( - EntityNames.EubopenActivity.entityID, this.chemblID, this.propertiesGroups ) diff --git a/components/report_cards/target/ProbesAndChemogenomicCompounds.vue b/components/report_cards/target/ProbesAndChemogenomicCompounds.vue index 6d996c2e6a058f08940d4592fab1128286b6141b..5a62ecb1f06c2321075edf1e0146e5a8a1be3c46 100644 --- a/components/report_cards/target/ProbesAndChemogenomicCompounds.vue +++ b/components/report_cards/target/ProbesAndChemogenomicCompounds.vue @@ -1,16 +1,57 @@ <template> <v-card outlined> - <v-card-text class="yellow lighten-4"> - Coming soon, see this issue - <a href="https://gitlab.ebi.ac.uk/chembl/eubopen/eubopen-web/-/issues/16"> - #16 </a - >. + <v-card-text> + <v-skeleton-loader + v-if="loadingInitialParams" + type="card" + ></v-skeleton-loader> + <ProbesAndChemogenomicCompoundsTable v-else :chembl-i-d="chemblID" /> </v-card-text> </v-card> </template> <script> -export default {} +import RequestNotifications from '@/web-components-submodule/utils/RequestNotifications.js' +import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js' +import IndexNames from '~/web-components-submodule/standardisation/IndexNames.js' +import ESProxyService from '~/web-components-submodule/services/ESProxyService.js' +import ProbesAndChemogenomicCompoundsTable from '~/components/report_cards/target/ProbesAndChemogenomicCompounds/ProbesAndChemogenomicCompoundsTable.vue' + +export default { + components: { + ProbesAndChemogenomicCompoundsTable, + }, + props: { + itemID: { + type: String, + default: () => undefined, + }, + }, + data() { + return { + loadingInitialParams: true, + chemblID: undefined, + } + }, + mounted() { + const entityID = EntityNames.EubopenTarget.entityID + const docSource = ['target_chembl_id'] + const indexName = IndexNames.getIndexNameFromEntityID(entityID) + + ESProxyService.getESDocument(indexName, this.itemID, docSource) + .then((response) => { + this.chemblID = response.data._source.target_chembl_id + this.loadingInitialParams = false + }) + .catch((error) => { + RequestNotifications.dispatchRequestErrorNotification( + error, + this.$store.dispatch, + `There was an error while loading the probes and chemogenomic compounds initial params for target ${this.itemID}` + ) + }) + }, +} </script> <style></style> diff --git a/components/report_cards/target/ProbesAndChemogenomicCompounds/ProbesAndChemogenomicCompoundsTable.vue b/components/report_cards/target/ProbesAndChemogenomicCompounds/ProbesAndChemogenomicCompoundsTable.vue new file mode 100644 index 0000000000000000000000000000000000000000..dd68b2c2a79b17d67055dff4ff367524ad8074a7 --- /dev/null +++ b/components/report_cards/target/ProbesAndChemogenomicCompounds/ProbesAndChemogenomicCompoundsTable.vue @@ -0,0 +1,58 @@ +<template> + <ChEMBLDataTable + :dataset-state="datasetState" + :store-module-name="storeModuleName" + :outlined-card="true" + /> +</template> + +<script> +import { datasetMixin } from '~/web-components-submodule/mixins/datasets/datasetMixin.js' +import ChEMBLDataTable from '~/web-components-submodule/components/common/dataSets/data_table/ChEMBLDataTable.vue' +import EntityNames from '~/web-components-submodule/standardisation/EntityNames.js' +import ProbesAndChemogenomicCompounds from '~/web-components-submodule/store/datasets/generators/eubopen/target/ProbesAndChemogenomicCompounds.js' + +export default { + components: { + ChEMBLDataTable, + }, + mixins: [datasetMixin], + props: { + chemblID: { + type: String, + default: () => undefined, + }, + storeModuleName: { + type: String, + default: () => `target_probes_anc_chemogenomic_compounds`, + }, + }, + data() { + return { + propertiesGroups: { + 1: { + id: 'probes_and_chemogenomic_compounds', + selected: true, + allHeaders: [], + }, + }, + entityID: EntityNames.EubopenMechanismOfAction.entityID, + customDataRepresentationParams: { + possiblePageSizes: [5, 10], + itemsPerPage: 5, + }, + } + }, + computed: { + starterParams() { + const starterParams = ProbesAndChemogenomicCompounds.getReportCardStarterParams( + this.chemblID, + this.propertiesGroups + ) + return starterParams + }, + }, +} +</script> + +<style></style> diff --git a/web-components-submodule b/web-components-submodule index 6401cd346375327d414c9d20a0b16e4dd0db555f..5542fe72316234d4b098f3cfb8f6000223672eaf 160000 --- a/web-components-submodule +++ b/web-components-submodule @@ -1 +1 @@ -Subproject commit 6401cd346375327d414c9d20a0b16e4dd0db555f +Subproject commit 5542fe72316234d4b098f3cfb8f6000223672eaf