inventaire / inventaire

a libre collaborative resource mapper powered by open-knowledge, starting with books! :books:
https://inventaire.io
441 stars 28 forks source link

Multiple positions for user #133

Open jum-s opened 7 years ago

jum-s commented 7 years ago

On my user profile, i can only set one position, although i am a movable being. If I work 30km from home or more generally if im routinely somewhere and sleep somewhere else, I would like other people to see where they can make a transaction with me.

feedback from @Gui11aume

to start :

maxlath commented 7 years ago

That make sense, and it doesn't look that complex from a data perspective: only the user model is affected. We could replace the current: [ lat, lng ] array, by an array of objects to include (optional) labels or other data. If for some reason, something needs to access only one position, the first one in the array can plays that role (so the user interface should give the possibility to re-order them)

[
 { label: 'home', coordinates: [ lat, lng ] },
 { label: 'work', coordinates: [ lat, lng ] }
]

The server currently only have to handle an update operation, which works for

We could re-use the same approach by requesting the whole serialized list of positions for each updates, to keep it simple (instead of having to handle add/update/remove for each localization)

The associated feature we should have in mind is the possibility to associate a subset of the user inventory per-localization, which could be a feature of books list

niccokunzmann commented 6 years ago

I would add, that I have book shelves in different locations. I would like to share their books but I am not always there and certainly do not take the books with me. So, a location would be attached to a book.

maxlath commented 4 years ago

now that we have shelves (#371, https://github.com/inventaire/inventaire-client/pull/224), that should be much easier to implement