| 1 |
import { get } from "../../api"; |
| 2 |
import type { Document } from "../../entries"; |
| 3 |
import { _ } from "../../i18n"; |
| 4 |
import { getURLFilters } from "../../stores/filters"; |
| 5 |
import { Route } from "../route"; |
| 6 |
import Documents from "./Documents.svelte"; |
| 7 |
|
| 8 |
export interface DocumentsReportProps { |
| 9 |
documents: Document[]; |
| 10 |
} |
| 11 |
|
| 12 |
export const documents = new Route( |
| 13 |
"documents", |
| 14 |
Documents, |
| 15 |
async (url: URL) => |
| 16 |
get("documents", getURLFilters(url)).then((data) => ({ |
| 17 |
documents: data, |
| 18 |
})), |
| 19 |
() => _("Documents"), |
| 20 |
); |