Skip to content

Commit

Permalink
Fix organization csv export (#1549)
Browse files Browse the repository at this point in the history
  • Loading branch information
joanagmaia authored Sep 26, 2023
1 parent f49be45 commit 317450e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
</transition>

<app-organization-list-toolbar
:pagination="pagination"
@mouseover="onTableMouseover"
@mouseleave="onTableMouseLeft"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ import { DEFAULT_ORGANIZATION_FILTERS } from '@/modules/organization/store/const
import { OrganizationPermissions } from '../../organization-permissions';
import { OrganizationService } from '../../organization-service';
const props = defineProps({
pagination: {
type: Object,
default: () => ({
page: 1,
perPage: 20,
}),
},
});
const { currentUser, currentTenant } = mapGetters('auth');
const organizationStore = useOrganizationStore();
Expand Down Expand Up @@ -185,8 +195,8 @@ const handleDoExport = async () => {
const response = await OrganizationService.query({
filter,
orderBy: `${filters.value.order.prop}_${filters.value.order.order === 'descending' ? 'DESC' : 'ASC'}`,
limit: null,
offset: null,
offset: (props.pagination.page - 1) * props.pagination.perPage || 0,
limit: props.pagination.perPage || 20,
});
Excel.exportAsExcelFile(
Expand Down

0 comments on commit 317450e

Please sign in to comment.