git ssb

0+

Piet / ssb-loomio



Tree: 2098413236ee6f4dd584c5a606b2036f11f2b177

Files: 2098413236ee6f4dd584c5a606b2036f11f2b177 / types.js

1293 bytesRaw
1module.exports = {
2 chooseOnePollType: 'chooseOnePoll',
3 chooseOnePositionType: 'chooseOnePosition'
4}
5
6// Question: do these need to be different, could we just have 'chooseOne',
7// because we already have:
8// { type: 'poll', pollDetails: { type: 'chooseOne' } }
9// { type: 'position', positionDetails: { type: 'chooseOne' } }
10//
11//
12// to that end, perhaps we could prune these down to
13// { type: 'poll', details: { type: 'chooseOne', choices } }
14// { type: 'position', details: { type: 'chooseOne', choice } }
15
16/// positions need to point at a poll right?
17// I wonder if a position could just be ... but this would mean we would have to have the parent poll, and then based o nthe type there, run a isOneChoicePostion validator... which I wthink could be good? Maybe I don't understandthe complexity of the other types of positions.
18// { type: 'position', poll, choice }
19//
20//
21// I not that there's also a validation thing where
22// { type: 'position', poll, choice: 9000 }
23//
24// is probably invalid, and that the choice should be an integer bound by the parent poll choices. Can probably think about that case later, but making out reducer we're gonna have to put some filtering logic somewhere. Could programatically generate a position schema based on a poll.... _WOAH there EASY MIX_
25

Built with git-ssb-web