Added custom sheet events
Made rest buttons optional
This commit is contained in:
46
app/imports/ui/components/ResetSelector.vue
Normal file
46
app/imports/ui/components/ResetSelector.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<template>
|
||||
<smart-select
|
||||
label="Reset"
|
||||
clearable
|
||||
style="flex-basis: 300px;"
|
||||
:hint="hint"
|
||||
:items="resetOptions"
|
||||
:value="value"
|
||||
:error-messages="errorMessages"
|
||||
:menu-props="{auto: true, lazy: true}"
|
||||
@change="(value, ack) => $emit('change', value, ack)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="js">
|
||||
import createListOfProperties from '/imports/ui/properties/forms/shared/lists/createListOfProperties.js';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
value: [String, Number, Date, Array, Object, Boolean],
|
||||
errorMessages: [String, Array],
|
||||
hint: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
}
|
||||
},
|
||||
meteor: {
|
||||
resetOptions() {
|
||||
const eventActions = createListOfProperties({
|
||||
type: 'action',
|
||||
actionType: 'event',
|
||||
}, true);
|
||||
const defaultEvents = [
|
||||
{
|
||||
text: 'Short rest',
|
||||
value: 'shortRest',
|
||||
}, {
|
||||
text: 'Long rest',
|
||||
value: 'longRest',
|
||||
}
|
||||
];
|
||||
return [...defaultEvents, ...eventActions];
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user