Created
February 22, 2019 11:48
-
-
Save yusupova/e2055bfe3242794d5c59577ec79a31af to your computer and use it in GitHub Desktop.
same software check example
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
checkSameReadandWrite = (software) =>{ | |
let { sodtwareList } = this.state | |
const writing = ['ClaroRead','Texthelp Read&Write','WordQ'] | |
let activeSoftNames = softwareList.filter(s => s.isActive).map(s => s.name) | |
if (writing.includes(software.name) && writing.some(s => activeSoftNames.includes(s))) { | |
//then it you show an error | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment