diff --git a/app/imports/api/properties/Containers.js b/app/imports/api/properties/Containers.js index 45f1ecef..94b36000 100644 --- a/app/imports/api/properties/Containers.js +++ b/app/imports/api/properties/Containers.js @@ -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 }; diff --git a/app/imports/ui/properties/forms/ContainerForm.vue b/app/imports/ui/properties/forms/ContainerForm.vue index f8d4183f..3601d81a 100644 --- a/app/imports/ui/properties/forms/ContainerForm.vue +++ b/app/imports/ui/properties/forms/ContainerForm.vue @@ -1,11 +1,22 @@ diff --git a/app/imports/ui/properties/forms/ItemForm.vue b/app/imports/ui/properties/forms/ItemForm.vue index 13082de6..8540208a 100644 --- a/app/imports/ui/properties/forms/ItemForm.vue +++ b/app/imports/ui/properties/forms/ItemForm.vue @@ -41,17 +41,19 @@ hint="The value of the item in gold pieces, using decimals for values less than 1 gp" class="mx-1" style="flex-basis: 300px;" + prepend-inner-icon="$vuetify.icons.two_coins" :value="model.value" :error-messages="errors.value" @change="change('value', ...arguments)" />
- -
- Not carried + +
+
+ + + $vuetify.icons.two_coins + + + +
+
+ + + {{ model.weight }} lb + + + $vuetify.icons.weight + + +
-
- Contents are weightless -
- - diff --git a/app/imports/ui/properties/viewers/ItemViewer.vue b/app/imports/ui/properties/viewers/ItemViewer.vue index 1c91b3f9..ba69bc05 100644 --- a/app/imports/ui/properties/viewers/ItemViewer.vue +++ b/app/imports/ui/properties/viewers/ItemViewer.vue @@ -1,14 +1,9 @@