mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
[PUI] Update template tables (#7781)
- Allow template files to be downloaded
This commit is contained in:
parent
8708028bcc
commit
21511c74ff
@ -11,6 +11,7 @@ import {
|
||||
TemplateEditor
|
||||
} from '../../components/editors/TemplateEditor';
|
||||
import { ApiFormFieldSet } from '../../components/forms/fields/ApiFormField';
|
||||
import { AttachmentLink } from '../../components/items/AttachmentLink';
|
||||
import { DetailDrawer } from '../../components/nav/DetailDrawer';
|
||||
import { ApiEndpoints } from '../../enums/ApiEndpoints';
|
||||
import { ModelType } from '../../enums/ModelType';
|
||||
@ -134,7 +135,11 @@ export function TemplateTable({
|
||||
sortable: false,
|
||||
switchable: true,
|
||||
render: (record: any) => {
|
||||
return record.template?.split('/')?.pop() ?? '-';
|
||||
if (!record.template) {
|
||||
return '-';
|
||||
}
|
||||
|
||||
return <AttachmentLink attachment={record.template} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user