Added inventory tab
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
<template lang="html">
|
||||
<feature-form
|
||||
:feature="feature"
|
||||
@update="update"
|
||||
:debounce-time="0"
|
||||
:errors="errors"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FeatureForm from '/imports/ui/properties/forms/FeatureForm.vue';
|
||||
import Features, { FeatureSchema } from '/imports/api/properties/Features.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FeatureForm,
|
||||
},
|
||||
data(){ return {
|
||||
feature: {
|
||||
name: 'New Feature',
|
||||
description: null,
|
||||
enabled: true,
|
||||
alwaysEnabled: true,
|
||||
color: '#9E9E9E',
|
||||
},
|
||||
schema: FeatureSchema,
|
||||
errors: {},
|
||||
}},
|
||||
methods: {
|
||||
update(update, ack){
|
||||
for (key in update){
|
||||
this.feature[key] = update[key];
|
||||
}
|
||||
ack();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
</style>
|
||||
@@ -1,29 +0,0 @@
|
||||
<template lang="html">
|
||||
<div>
|
||||
<markdown-text :markdown="feature.computedDescription || feature.description"/>
|
||||
<!--
|
||||
<child-lists
|
||||
:parent="feature"
|
||||
/>
|
||||
-->
|
||||
<feature-form slot="form" :feature="feature" @update="(update, ack) => $emit('update', update, ack)"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FeatureForm from '/imports/ui/properties/forms/FeatureForm.vue';
|
||||
import MarkdownText from '/imports/ui/components/MarkdownText.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FeatureForm,
|
||||
MarkdownText,
|
||||
},
|
||||
props: {
|
||||
feature: Object,
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
</style>
|
||||
@@ -1,42 +0,0 @@
|
||||
<template lang="html">
|
||||
<feature-dialog
|
||||
:feature="feature"
|
||||
@update="update"
|
||||
@remove="remove"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Features, {updateFeature} from '/imports/api/properties/Features.js';
|
||||
import FeatureDialog from '/imports/ui/properties/components/features/FeatureDialog.vue';
|
||||
import {evaluateStringForCharId} from '/imports/ui/utility/evaluate.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
FeatureDialog,
|
||||
},
|
||||
props: {
|
||||
_id: String,
|
||||
},
|
||||
meteor: {
|
||||
feature(){
|
||||
let feature = Features.findOne(this._id);
|
||||
feature.computedDescription = evaluateStringForCharId(
|
||||
feature.description, feature.charId
|
||||
);
|
||||
return feature;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
update(update, ack){
|
||||
updateFeature.call({
|
||||
_id: this._id,
|
||||
update,
|
||||
}, error => ack(error));
|
||||
},
|
||||
remove(){
|
||||
softRemoveProperty({_id: this._id, collection: 'features'});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user