diff options
author | dartcafe <github@dartcafe.de> | 2021-03-25 11:52:22 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2021-03-25 11:52:22 +0300 |
commit | b863a1d447a71f2e8cfec3e722e42c6c25b944f1 (patch) | |
tree | b401ff3f26c8f1a6a92afa7abac45c80f3c82da7 /src/js/store/modules/poll.js | |
parent | 2073d6286b2f458dd4e5ebf7f5804221b793386c (diff) |
some optimizations
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/store/modules/poll.js')
-rw-r--r-- | src/js/store/modules/poll.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/js/store/modules/poll.js b/src/js/store/modules/poll.js index 8b14a98e..62fa9eb7 100644 --- a/src/js/store/modules/poll.js +++ b/src/js/store/modules/poll.js @@ -95,6 +95,18 @@ const getters = { } }, + proposalsAllowed: (state) => { + return (state.allowProposals === 'allow' || state.allowProposals === 'review') + }, + + proposalsOptions: () => { + return [ + { value: 'disallow', label: t('polls', 'Disallow Proposals') }, + { value: 'allow', label: t('polls', 'Allow Proposals') }, + { value: 'review', label: t('polls', 'Allow with review') }, + ] + }, + closed: (state) => { return (state.expire > 0 && moment.unix(state.expire).diff() < 0) }, |