Skip to content

Commit

Permalink
FEAT(#508): Adding functionality to remove distribution after whyis d…
Browse files Browse the repository at this point in the history
…ataset delete
  • Loading branch information
tholulomo committed Oct 27, 2024
1 parent 603080d commit 546e907
Show file tree
Hide file tree
Showing 4 changed files with 259 additions and 202 deletions.
10 changes: 7 additions & 3 deletions app/src/pages/explorer/curate/sdd/SddForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<div>
<div>
<div>
<CurateNavBar active="Direct Upload with SDD" :navRoutes="navRoutes" />
<CurateNavBar
:active="`Direct Upload with SDD > ${generatedUUID}`"
:navRoutes="navRoutes"
/>
</div>
<div class="curate">
<div>
Expand Down Expand Up @@ -829,7 +832,6 @@ import {
} from '@/modules/whyis-dataset';
import { mapGetters, mapMutations } from 'vuex';
const { v4: uuidv4 } = require('uuid');
const datasetUuid = uuidv4();
const distrFn = useFileList();
// Move to a separate file
Expand Down Expand Up @@ -883,7 +885,6 @@ export default {
second: null,
orcid: false
},
generatedUUID: datasetUuid,
doi: '',
orcidId: null,
searchKeywordOrg: '',
Expand Down Expand Up @@ -927,6 +928,9 @@ export default {
firstName: this.$store.getters['auth/user'].givenName,
lastName: this.$store.getters['auth/user'].surName
};
},
generatedUUID() {
return uuidv4();
}
},
watch: {
Expand Down
4 changes: 4 additions & 0 deletions app/src/pages/explorer/dataset/DatasetGallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,10 @@ export default {
identifier: dataset.identifier,
type: 'datasets'
});
await this.$store.dispatch('explorer/curation/deleteEntityFiles', {
distribution: dataset?.distribution ?? null,
thumbnail: dataset?.thumbnail ?? null
});
this.toggleDialogBox();
this.dialogLoading = false;
await this.loadItems();
Expand Down
Loading

0 comments on commit 546e907

Please sign in to comment.