Skip to content

Commit

Permalink
Export bulk results to CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
norrisng-bc committed Jun 18, 2024
1 parent 6909083 commit 648ff5d
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions frontend/src/components/common/BulkPermissionResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ const props = withDefaults(defineProps<Props>(), {
});
const modelValue = defineModel<boolean>({ default: false });
// Exports DataTable results
const batchResults = ref();
const exportCSV = () => {
batchResults.value.exportCSV();
};
</script>
<template>
<Dialog
Expand All @@ -23,9 +30,24 @@ const modelValue = defineModel<boolean>({ default: false });
:modal="true"
>
<DataTable
ref="batchResults"
:export-filename="`${resource.name}_bulk_results`"
:value="props.results"
class="p-datatable-striped"
>
<div class="action-buttons">
<Button
v-tooltip.bottom="'Save results'"
aria-label="Save results"
class="p-button"
@click="exportCSV($event)"
>
<font-awesome-icon
icon="fa-download"
class="pl-1 pr-1 pt-1 pb-1"
/>
</Button>
</div>
<Column
field="email"
header="Email"
Expand Down

0 comments on commit 648ff5d

Please sign in to comment.