2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-28 19:46:46 +00:00

Fix image upload for company page (#8120)

- Fixes https://github.com/inventree/InvenTree/issues/8111
This commit is contained in:
Oliver 2024-09-13 11:34:15 +10:00 committed by GitHub
parent ddda71124f
commit d4e67c0f03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -41,6 +41,7 @@ import {
useEditApiFormModal useEditApiFormModal
} from '../../hooks/UseForm'; } from '../../hooks/UseForm';
import { useInstance } from '../../hooks/UseInstance'; import { useInstance } from '../../hooks/UseInstance';
import { apiUrl } from '../../states/ApiState';
import { useUserState } from '../../states/UserState'; import { useUserState } from '../../states/UserState';
import { AddressTable } from '../../tables/company/AddressTable'; import { AddressTable } from '../../tables/company/AddressTable';
import { ContactTable } from '../../tables/company/ContactTable'; import { ContactTable } from '../../tables/company/ContactTable';
@ -145,7 +146,7 @@ export default function CompanyDetail(props: Readonly<CompanyDetailProps>) {
<Grid.Col span={4}> <Grid.Col span={4}>
<DetailsImage <DetailsImage
appRole={UserRoles.purchase_order} appRole={UserRoles.purchase_order}
apiPath={ApiEndpoints.company_list} apiPath={apiUrl(ApiEndpoints.company_list, company.pk)}
src={company.image} src={company.image}
pk={company.pk} pk={company.pk}
refresh={refreshInstance} refresh={refreshInstance}