git ssb

0+

Piet / ssb-loomio



Tree: 9db352a29a6d5bac4344c081e9228bd03aaeb97c

Files: 9db352a29a6d5bac4344c081e9228bd03aaeb97c / types.js

1235 bytesRaw
1module.exports = {
2 CHOOSE_ONE: 'chooseOne'
3}
4
5// Question: do these need to be different, could we just have 'chooseOne',
6// because we already have:
7// { type: 'poll', pollDetails: { type: 'chooseOne' } }
8// { type: 'position', positionDetails: { type: 'chooseOne' } }
9//
10//
11// to that end, perhaps we could prune these down to
12// { type: 'poll', details: { type: 'chooseOne', choices } }
13// { type: 'position', details: { type: 'chooseOne', choice } }
14
15/// positions need to point at a poll right?
16// 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.
17// { type: 'position', poll, choice }
18//
19//
20// I not that there's also a validation thing where
21// { type: 'position', poll, choice: 9000 }
22//
23// 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_
24

Built with git-ssb-web