mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Fix lint errors in lint error fix.
Thanks to xet7 !
This commit is contained in:
parent
e7603298d7
commit
9e95c06415
9 changed files with 47 additions and 49 deletions
|
@ -7,7 +7,7 @@ BlazeComponent.extendComponent({
|
|||
return Boards.find(
|
||||
{ archived: true },
|
||||
{
|
||||
sort: { sort: 1 /* boards default sorting */ }
|
||||
sort: { sort: 1 /* boards default sorting */ },
|
||||
},
|
||||
);
|
||||
},
|
||||
|
|
|
@ -86,7 +86,9 @@ BlazeComponent.extendComponent({
|
|||
query['members.userId'] = Meteor.userId();
|
||||
else query.permission = 'public';
|
||||
|
||||
return Boards.find(query, { sort: { sort: 1 /* boards default sorting */ } });
|
||||
return Boards.find(query, {
|
||||
sort: { sort: 1 /* boards default sorting */ },
|
||||
});
|
||||
},
|
||||
isStarred() {
|
||||
const user = Meteor.user();
|
||||
|
|
|
@ -56,9 +56,8 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
votePublic() {
|
||||
const card = this.currentData();
|
||||
if (card.vote)
|
||||
return card.vote.public
|
||||
return null
|
||||
if (card.vote) return card.vote.public;
|
||||
return null;
|
||||
},
|
||||
voteCountPositive() {
|
||||
const card = this.currentData();
|
||||
|
@ -380,7 +379,7 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
},
|
||||
'click .js-go-to-linked-card'() {
|
||||
Utils.goCardId(this.data().linkedId)
|
||||
Utils.goCardId(this.data().linkedId);
|
||||
},
|
||||
'click .js-member': Popup.open('cardMember'),
|
||||
'click .js-add-members': Popup.open('cardMembers'),
|
||||
|
|
|
@ -215,17 +215,16 @@ Template.boardMenuPopup.events({
|
|||
'click .js-card-settings': Popup.open('boardCardSettings'),
|
||||
});
|
||||
|
||||
|
||||
Template.boardMenuPopup.onCreated(function() {
|
||||
this.apiEnabled = new ReactiveVar(false);
|
||||
Meteor.call('_isApiEnabled', (e, result) => {
|
||||
this.apiEnabled.set(result)
|
||||
})
|
||||
})
|
||||
this.apiEnabled.set(result);
|
||||
});
|
||||
});
|
||||
|
||||
Template.boardMenuPopup.helpers({
|
||||
withApi() {
|
||||
return Template.instance().apiEnabled.get()
|
||||
return Template.instance().apiEnabled.get();
|
||||
},
|
||||
exportUrl() {
|
||||
const params = {
|
||||
|
|
|
@ -1297,7 +1297,10 @@ if (Meteor.isServer) {
|
|||
|
||||
// Insert new board at last position in sort order.
|
||||
Boards.before.insert((userId, doc) => {
|
||||
const lastBoard = Boards.findOne({ sort: { $exists: true } }, { sort: { sort: -1 } });
|
||||
const lastBoard = Boards.findOne(
|
||||
{ sort: { $exists: true } },
|
||||
{ sort: { sort: -1 } },
|
||||
);
|
||||
if (lastBoard && typeof lastBoard.sort !== 'undefined') {
|
||||
doc.sort = lastBoard.sort + 1;
|
||||
}
|
||||
|
|
|
@ -1050,13 +1050,13 @@ Cards.helpers({
|
|||
|
||||
voteMemberPositive() {
|
||||
if (this.vote && this.vote.positive)
|
||||
return Users.find({ _id: { $in: this.vote.positive } })
|
||||
return []
|
||||
return Users.find({ _id: { $in: this.vote.positive } });
|
||||
return [];
|
||||
},
|
||||
voteMemberNegative() {
|
||||
if (this.vote && this.vote.negative)
|
||||
return Users.find({ _id: { $in: this.vote.negative } })
|
||||
return []
|
||||
return Users.find({ _id: { $in: this.vote.negative } });
|
||||
return [];
|
||||
},
|
||||
|
||||
getId() {
|
||||
|
@ -1475,12 +1475,12 @@ Cards.mutations({
|
|||
},
|
||||
};
|
||||
},
|
||||
setVoteQuestion(question, public_) {
|
||||
setVoteQuestion(question, public) {
|
||||
return {
|
||||
$set: {
|
||||
vote: {
|
||||
question,
|
||||
public_,
|
||||
public,
|
||||
positive: [],
|
||||
negative: [],
|
||||
},
|
||||
|
|
|
@ -338,7 +338,6 @@ if (Meteor.isServer) {
|
|||
isPasswordLoginDisabled() {
|
||||
return process.env.PASSWORD_LOGIN_ENABLED === 'false';
|
||||
},
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -299,13 +299,13 @@ export class TrelloCreator {
|
|||
}
|
||||
}
|
||||
return true;
|
||||
})
|
||||
});
|
||||
if (positiveVotes.length > 0) {
|
||||
cardToCreate.vote = {
|
||||
question: cardToCreate.title,
|
||||
public: true,
|
||||
positive: positiveVotes,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1037,11 +1037,7 @@ Migrations.add('add-description-text-allowed', () => {
|
|||
Migrations.add('add-sort-field-to-boards', () => {
|
||||
Boards.find().forEach((board, index) => {
|
||||
if (!board.hasOwnProperty('sort')) {
|
||||
Boards.direct.update(
|
||||
board._id,
|
||||
{ $set: { sort: index } },
|
||||
noValidate
|
||||
);
|
||||
Boards.direct.update(board._id, { $set: { sort: index } }, noValidate);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue