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,
|
required: true,
|
||||||
columnWidth: 300,
|
columnWidth: 300,
|
||||||
value: (objectData) => {
|
value: (objectData) => {
|
||||||
if (!objectData.currentWeight) {
|
if (objectData?.state?.type === 'unconsumed') {
|
||||||
return objectData?.startingWeight
|
return objectData?.startingWeight
|
||||||
} else {
|
} else {
|
||||||
return objectData.currentWeight
|
return objectData.currentWeight
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user