2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-13 08:21:26 +00:00

Api tweaks (#5690)

* Improvements to API handling on react UI

- Do not force "/api/" prefix to the base URL of the server
- We will need to fetch media files from the server (at /media/)
- Extend API URL helper functions

* Update some more hard-coded URLs

* Fix search API endpoint

* Fix div for panel tab

* Fix debug msg
This commit is contained in:
Oliver
2023-10-12 23:25:17 +11:00
committed by GitHub
parent 0c519c6b98
commit 814322e512
30 changed files with 114 additions and 70 deletions

View File

@ -7,7 +7,7 @@ import { editPart } from '../../../functions/forms/PartForms';
import { notYetImplemented } from '../../../functions/notifications';
import { shortenString } from '../../../functions/tables';
import { useTableRefresh } from '../../../hooks/TableRefresh';
import { ApiPaths, url } from '../../../states/ApiState';
import { ApiPaths, apiUrl } from '../../../states/ApiState';
import { TableColumn } from '../Column';
import { TableFilter } from '../Filter';
import { InvenTreeTable, InvenTreeTableProps } from '../InvenTreeTable';
@ -221,7 +221,7 @@ export function PartListTable({ props }: { props: InvenTreeTableProps }) {
return (
<InvenTreeTable
url={url(ApiPaths.part_list)}
url={apiUrl(ApiPaths.part_list)}
tableKey={tableKey}
columns={tableColumns}
props={{