Fix lint errors.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2019-04-06 09:00:13 +03:00
parent 972b9b6e91
commit ebfc8e5a1b
5 changed files with 26 additions and 27 deletions

View file

@ -67,7 +67,7 @@ BlazeComponent.extendComponent({
Utils.goBoardId(res); Utils.goBoardId(res);
} }
} }
); );
evt.preventDefault(); evt.preventDefault();
}, },
'click .js-accept-invite'() { 'click .js-accept-invite'() {

View file

@ -30,7 +30,7 @@ if (Meteor.isServer) {
} }
const exporter = new Exporter(boardId); const exporter = new Exporter(boardId);
if (true||exporter.canExport(user)) { if (exporter.canExport(user)) {
JsonRoutes.sendResult(res, { JsonRoutes.sendResult(res, {
code: 200, code: 200,
data: exporter.build(), data: exporter.build(),

View file

@ -31,18 +31,17 @@ Meteor.methods({
}); });
Meteor.methods({ Meteor.methods({
cloneBoard(sourceBoardId,currentBoardId) { cloneBoard(sourceBoardId, currentBoardId) {
check(sourceBoardId, String); check(sourceBoardId, String);
check(currentBoardId, Match.Maybe(String)); check(currentBoardId, Match.Maybe(String));
const exporter = new Exporter(sourceBoardId); const exporter = new Exporter(sourceBoardId);
let data = exporter.build(); const data = exporter.build();
let addData = {}; const addData = {};
addData.membersMapping = wekanMembersMapper.getMembersToMap(data); addData.membersMapping = wekanMembersMapper.getMembersToMap(data);
const creator = new WekanCreator(addData); const creator = new WekanCreator(addData);
data.title = data.title + " - " + TAPi18n.__('copy-tag'); data.title = `${data.title } - ${ TAPi18n.__('copy-tag')}`;
return creator.create(data, currentBoardId); return creator.create(data, currentBoardId);
}, },
}); });

View file

@ -173,25 +173,25 @@ export class WekanCreator {
// we will work on the list itself (an ordered array of objects) when a // 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 // mapping is done, we add a 'wekan' field to the object representing the
// imported member // imported member
const membersToMap = data.members; const membersToMap = data.members;
const users = data.users; const users = data.users;
// auto-map based on username // auto-map based on username
membersToMap.forEach((importedMember) => { membersToMap.forEach((importedMember) => {
importedMember.id = importedMember.userId; importedMember.id = importedMember.userId;
delete importedMember.userId; delete importedMember.userId;
const user = users.filter((user) => { const user = users.filter((user) => {
return user._id === importedMember.id; return user._id === importedMember.id;
})[0]; })[0];
if (user.profile && user.profile.fullname) { if (user.profile && user.profile.fullname) {
importedMember.fullName = user.profile.fullname; importedMember.fullName = user.profile.fullname;
} }
importedMember.username = user.username; importedMember.username = user.username;
const wekanUser = Users.findOne({ username: importedMember.username }); const wekanUser = Users.findOne({ username: importedMember.username });
if (wekanUser) { if (wekanUser) {
importedMember.wekanId = wekanUser._id; importedMember.wekanId = wekanUser._id;
} }
}); });
return membersToMap; return membersToMap;
} }
checkActions(wekanActions) { checkActions(wekanActions) {

View file

@ -141,7 +141,7 @@ RulesHelper = {
Swimlanes.insert({ Swimlanes.insert({
title: action.swimlaneName, title: action.swimlaneName,
boardId, boardId,
sort: 0 sort: 0,
}); });
} }
if(action.actionType === 'addChecklistWithItems'){ if(action.actionType === 'addChecklistWithItems'){