Skip to content

Commit

Permalink
HJ-128 - Datamap export should only include the visible columns of th…
Browse files Browse the repository at this point in the history
…e report in the defined order
  • Loading branch information
andres-torres-marroquin committed Nov 29, 2024
1 parent 39f0231 commit dc9b2f1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clients/admin-ui/src/features/datamap/datamap.slice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const datamapApi = baseApi.injectEndpoints({
dataSubjects?: string;
format?: ExportFormat;
report_id?: string;
report?: string;
}
>({
query: ({
Expand All @@ -120,6 +121,7 @@ const datamapApi = baseApi.injectEndpoints({
dataSubjects,
format,
report_id,
report,
}) => {
let queryString = `page=${pageIndex}&size=${pageSize}&group_by=${groupBy}`;
if (dataUses) {
Expand All @@ -137,6 +139,9 @@ const datamapApi = baseApi.injectEndpoints({
if (report_id) {
queryString += `&report_id=${report_id}`;
}
if (report) {
queryString += `&report=${report}`;
}
return {
url: `plus/datamap/minimal/${format}?${queryString}`,
responseHandler: async (response) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,19 @@ export const DatamapReportTable = () => {
...reportQuery,
format: downloadType,
report_id: savedCustomReportId,
report: JSON.stringify({
name: "temporary report",
type: "datamap",
config: {
column_map: columnNameMapOverrides,
table_state: {
groupBy,
filters: selectedFilters,
columnOrder,
columnVisibility,
},
},
}),
}).then(() => {
if (isExportReportSuccess) {
onExportReportClose();
Expand Down

0 comments on commit dc9b2f1

Please sign in to comment.