Add import Wekan board feature

This commit is contained in:
Ghassen Rjab 2017-07-08 13:23:33 +01:00
parent 61b2c91ffe
commit 3f4c285551
11 changed files with 1096 additions and 529 deletions

View file

@ -0,0 +1,14 @@
export function getMembersToMap(data) {
// we will work on the list itself (an ordered array of objects) when a
// mapping is done, we add a 'wekan' field to the object representing the
// imported member
const membersToMap = data.members;
// auto-map based on username
membersToMap.forEach((importedMember) => {
const wekanUser = Users.findOne({ username: importedMember.username });
if (wekanUser) {
importedMember.wekanId = wekanUser._id;
}
});
return membersToMap;
}