feat: suspension trigger

This commit is contained in:
Taranto 2020-10-02 16:56:41 +01:00 committed by Josh Harvey
parent 118852a433
commit e0581fc39b
4 changed files with 31 additions and 6 deletions

View file

@ -10,4 +10,8 @@ function hasSanctions (triggers) {
return _.some(_.matches({ requirement: 'sanctions' }))(triggers)
}
module.exports = { getBackwardsCompatibleTriggers, hasSanctions }
function maxDaysThreshold (triggers) {
return _.max(_.map('thresholdDays')(triggers))
}
module.exports = { getBackwardsCompatibleTriggers, hasSanctions, maxDaysThreshold }