Skip to content

Instantly share code, notes, and snippets.

@yusupova
Created February 22, 2019 11:48
Show Gist options
  • Save yusupova/e2055bfe3242794d5c59577ec79a31af to your computer and use it in GitHub Desktop.
Save yusupova/e2055bfe3242794d5c59577ec79a31af to your computer and use it in GitHub Desktop.
same software check example
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