refactor(api): finalize report query utility split
This commit is contained in:
@@ -19,7 +19,6 @@ import {
|
||||
buildWhere,
|
||||
csvEscape,
|
||||
type EntityKey,
|
||||
FilterSchema,
|
||||
flattenRow,
|
||||
getValidScalarField,
|
||||
reportEntitySchema,
|
||||
@@ -28,7 +27,7 @@ import {
|
||||
type ReportQueryResult,
|
||||
validateReportInput,
|
||||
} from "./report-query-config.js";
|
||||
import { COLUMN_MAP, type ColumnDef, RESOURCE_MONTH_COLUMNS } from "./report-columns.js";
|
||||
import { COLUMN_MAP, RESOURCE_MONTH_COLUMNS } from "./report-columns.js";
|
||||
import {
|
||||
buildReportGroups,
|
||||
matchesInMemoryFilter,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ColumnDef } from "./report-columns.js";
|
||||
import type { FilterInput, ReportGroupSummary } from "./report-query-config.js";
|
||||
import type { ColumnDef } from "./report-columns.js";
|
||||
|
||||
function parseFilterValue(def: ColumnDef | undefined, value: string): unknown {
|
||||
if (!def) {
|
||||
@@ -71,7 +71,6 @@ export function sortInMemoryRows(
|
||||
if (!groupBy && !sortBy) {
|
||||
return rows;
|
||||
}
|
||||
|
||||
return [...rows].sort((left, right) => {
|
||||
if (groupBy) {
|
||||
const groupDef = columns.find((column) => column.key === groupBy);
|
||||
|
||||
Reference in New Issue
Block a user