Added file functionality.
This commit is contained in:
parent
1b86b0917c
commit
6bb4943d0c
@ -97,11 +97,38 @@ export const GCodeFile = {
|
|||||||
objectType: 'filament',
|
objectType: 'filament',
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: 'filament._id',
|
||||||
|
label: 'Filament ID',
|
||||||
|
type: 'id',
|
||||||
|
value: null,
|
||||||
|
objectType: 'filament',
|
||||||
|
showHyperlink: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'file',
|
||||||
|
label: 'File',
|
||||||
|
type: 'file',
|
||||||
|
value: null,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'file._id',
|
||||||
|
label: 'File ID',
|
||||||
|
type: 'id',
|
||||||
|
value: null,
|
||||||
|
objectType: 'file',
|
||||||
|
showHyperlink: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'cost',
|
name: 'cost',
|
||||||
label: 'Cost',
|
label: 'Cost',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
value: null,
|
value: (objectData) => {
|
||||||
|
return (
|
||||||
|
objectData?.file?.metaData?.filamentUsedG * objectData?.filament?.cost
|
||||||
|
)
|
||||||
|
},
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
prefix: '£'
|
prefix: '£'
|
||||||
},
|
},
|
||||||
|
|||||||
@ -137,6 +137,21 @@ export const Part = {
|
|||||||
prefix: '£',
|
prefix: '£',
|
||||||
min: 0,
|
min: 0,
|
||||||
step: 0.1
|
step: 0.1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'file',
|
||||||
|
label: 'File',
|
||||||
|
type: 'file',
|
||||||
|
value: null,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'file._id',
|
||||||
|
label: 'File ID',
|
||||||
|
type: 'id',
|
||||||
|
value: null,
|
||||||
|
objectType: 'file',
|
||||||
|
showHyperlink: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,6 +77,14 @@ export const User = {
|
|||||||
label: 'Email',
|
label: 'Email',
|
||||||
columnWidth: 300,
|
columnWidth: 300,
|
||||||
type: 'email'
|
type: 'email'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'profileImage',
|
||||||
|
label: 'Profile Image',
|
||||||
|
type: 'file',
|
||||||
|
fileType: 'image',
|
||||||
|
previewOpen: true,
|
||||||
|
showPreview: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user