Created
April 29, 2019 01:15
-
-
Save iaindooley/e5b043147c78a06157aaec67eb289dfe to your computer and use it in GitHub Desktop.
Update member count
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
function updateMemberCountWhenAdded(notification) | |
{ | |
var notif = new Notification(notification); | |
notif.addedMemberToCard(); | |
updateMemberCountOnCard(notif.card()); | |
} | |
function updateMemberCountWhenRemoved(notification) | |
{ | |
var notif = new Notification(notification); | |
notif.removedMemberFromCard(); | |
updateMemberCountOnCard(notif.card()); | |
} | |
function updateMemberCountOnCard(card) | |
{ | |
if(card.currentList().name() == "Signup sheets") | |
{ | |
card.setName("Signed up: "+card.members().length()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment