Skip to content

Instantly share code, notes, and snippets.

@Aldizh Aldizh/charges_refactor
Last active Jan 17, 2018

Embed
What would you like to do?
const clickHandler = (e, charges) => {
const hasCharges = Number(advanceCharges) > 0
switch (type) {
case 'Advance Charges':
hasCharges ? callRelaventFunction(okToPayCharges, toggleAdvanceChargesDialog, showAdvanceCharges, snackbarMessage) : snackbarMessage(locale('There are no advance charges'))
break
case 'Member Charges':
hasCharges ? toggleDialog(!showMemberCharges) : snackbarMessage(locale('There are no member chanrges'))
break
default:
snackbarMessage(locale('There are no chanrges'))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.