Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewind the rules table UI prototype (#3079)
- Loading branch information
1 parent
40ffba5
commit 341f643
Showing
8 changed files
with
316 additions
and
86 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// This utility builds the string shown in the | ||
// info alert when no rules match the selected filters | ||
export default (productChannelQueries, rewindDate, onlyScheduledChanges) => { | ||
let info = 'No rules found '; | ||
const rewindDateStr = `on ${rewindDate}.`; | ||
const scheduledChangesStr = 'with scheduled changes.'; | ||
|
||
if (!productChannelQueries) { | ||
if (rewindDate) { | ||
info += rewindDateStr; | ||
} else if (onlyScheduledChanges) { | ||
info += scheduledChangesStr; | ||
} | ||
} else if (productChannelQueries[1]) { | ||
info += `for the ${productChannelQueries[0]} ${productChannelQueries[1]} channel `; | ||
|
||
if (rewindDate) { | ||
info += rewindDateStr; | ||
} else if (onlyScheduledChanges) { | ||
info += scheduledChangesStr; | ||
} | ||
} else { | ||
info += `for the ${productChannelQueries[0]} channel `; | ||
|
||
if (rewindDate) { | ||
info += rewindDateStr; | ||
} else if (onlyScheduledChanges) { | ||
info += scheduledChangesStr; | ||
} | ||
} | ||
|
||
return info; | ||
}; |
Oops, something went wrong.