Improved container and item forms and viewers

This commit is contained in:
Stefan Zermatten
2020-05-31 18:50:00 +02:00
parent a5c42fea19
commit f7ee09470e
8 changed files with 167 additions and 74 deletions

View File

@@ -32,4 +32,16 @@ let ContainerSchema = new SimpleSchema({
},
});
export { ContainerSchema };
const ComputedOnlyContainerSchema = new SimpleSchema({
// Weight of all the contents, zero if `contentsWeightless` is true
contentsWeight:{
type: Number,
optional: true,
},
});
const ComputedContainerSchema = new SimpleSchema()
.extend(ComputedOnlyContainerSchema)
.extend(ContainerSchema);
export { ContainerSchema, ComputedContainerSchema };