forked from 4minitz/4minitz
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Convert more modules to ESM
- Loading branch information
1 parent
1e9d09a
commit 668db57
Showing
5 changed files
with
64 additions
and
70 deletions.
There are no files selected for viewing
52 changes: 24 additions & 28 deletions
52
client/templates/meetingseries/helpers/tabFilterDatabaseOperations.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,30 @@ | ||
import { Label } from "/imports/label"; | ||
import { Meteor } from "meteor/meteor"; | ||
|
||
module.exports = { | ||
createLabelIdsReceiver(parentMeetingSeriesId) { | ||
return function getLabelIdsByName(labelName, caseSensitive) { | ||
const label = Label.findLabelsContainingSubstring( | ||
parentMeetingSeriesId, | ||
labelName, | ||
caseSensitive, | ||
); | ||
if (label !== null) { | ||
return label.map((label) => { | ||
return label._id; | ||
}); | ||
} | ||
return null; | ||
}; | ||
}, | ||
|
||
createUserIdsReceiver(userName) { | ||
const users = | ||
userName === "me" | ||
? [Meteor.user()] | ||
: Meteor.users.find({ username: { $regex: userName } }).fetch(); | ||
if (users) { | ||
return users.map((user) => { | ||
return user._id; | ||
export function createLabelIdsReceiver(parentMeetingSeriesId) { | ||
return function getLabelIdsByName(labelName, caseSensitive) { | ||
const label = Label.findLabelsContainingSubstring( | ||
parentMeetingSeriesId, | ||
labelName, | ||
caseSensitive | ||
); | ||
if (label !== null) { | ||
return label.map((label) => { | ||
return label._id; | ||
}); | ||
} | ||
return null; | ||
}; | ||
} | ||
export function createUserIdsReceiver(userName) { | ||
const users = userName === "me" | ||
? [Meteor.user()] | ||
: Meteor.users.find({ username: { $regex: userName } }).fetch(); | ||
if (users) { | ||
return users.map((user) => { | ||
return user._id; | ||
}); | ||
} | ||
|
||
return []; | ||
}, | ||
}; | ||
return []; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters