Update FilamentStock model to conditionally return startingWeight based on object state type
This commit is contained in:
parent
e3c7f24c48
commit
c2f55a5967
@ -84,7 +84,7 @@ export const FilamentStock = {
|
||||
required: true,
|
||||
columnWidth: 300,
|
||||
value: (objectData) => {
|
||||
if (!objectData.currentWeight) {
|
||||
if (objectData?.state?.type === 'unconsumed') {
|
||||
return objectData?.startingWeight
|
||||
} else {
|
||||
return objectData.currentWeight
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user