if (notifications.breakingNews) { ?>
Breaking News
if (notifications.breakingNews.imageUrl) { ?>
} else { ?>
} ?>
= notifications.breakingNews.title || 'Company News' ?>
= (notifications.breakingNews.preview || notifications.breakingNews.content || '').substring(0,180) ?>
= (notifications.breakingNews.preview || notifications.breakingNews.content || '').length > 180 ? '…' : '' ?>
} ?>
var hasTodayNotifications =
notifications.today.birthdays.length ||
notifications.today.newEmployees.length ||
notifications.today.anniversaries.length ||
notifications.today.events.length;
?>
if (hasTodayNotifications) { ?>
Today at Prowinch
notifications.today.birthdays.forEach(function(person){ ?>
var notificationBirthdayEmployee = findEmployeeForPerson_(person); ?>
var notificationBirthdayPhoto = employeePhotoFor_(person, notificationBirthdayEmployee); ?>
🎂 Happy Birthday!
= person.name || '' ?>= person.office ? ' · ' + person.office : '' ?>
}); ?>
notifications.today.newEmployees.forEach(function(person){ ?>
var notificationNewEmployee = findEmployeeForPerson_(person); ?>
var notificationNewEmployeePhoto = employeePhotoFor_(person, notificationNewEmployee); ?>
👋 Welcome to Prowinch!
= person.name || '' ?>= person.role ? ' · ' + person.role : '' ?>= person.office ? ' · ' + person.office : '' ?>
}); ?>
notifications.today.anniversaries.forEach(function(person){ ?>
var notificationAnniversaryEmployee = findEmployeeForPerson_(person); ?>
var notificationAnniversaryPhoto = employeePhotoFor_(person, notificationAnniversaryEmployee); ?>
🏆 Work Anniversary
= person.name || '' ?> · = person.years || 0 ?> = Number(person.years) === 1 ? 'year' : 'years' ?>
}); ?>
notifications.today.events.forEach(function(event){ ?>
= event.Title || 'Company Event' ?>
Today
if (event.Time) { ?> · = event.Time ?> } ?>
if (event.Location) { ?> · = event.Location ?> } ?>
}); ?>
} ?>
if (notifications.alerts.length) { ?>
Important Alerts
notifications.alerts.slice(0,3).forEach(function(alert){ ?>
Important Announcement
= alert ?>
}); ?>
} ?>
if (notifications.events.length) { ?>
Upcoming Events
notifications.events.slice(0,4).forEach(function(event){ ?>
= event.Title || 'Company Event' ?>
= event.Date || '' ?>
if (event.Time) { ?> · = event.Time ?> } ?>
if (event.Location) { ?> · = event.Location ?> } ?>
}); ?>
} ?>
if (notifications.upcomingBirthdays.length) { ?>
Upcoming Birthdays · Next 2 Weeks
notifications.upcomingBirthdays.slice(0,4).forEach(function(person){ ?>
var upcomingBirthdayEmployee = findEmployeeForPerson_(person); ?>
var upcomingBirthdayPhoto = employeePhotoFor_(person, upcomingBirthdayEmployee); ?>
= person.name || '' ?>
= person.date || '' ?>
if (person.office) { ?> · = person.office ?> } ?>
if (Number(person.daysUntil) === 0) { ?> · Today 🎉 } else { ?> · In = person.daysUntil ?> days } ?>
}); ?>
} ?>
if (notifications.recentEmployees.length) { ?>
New Employees
Highlighted for their first 3 weeks.
notifications.recentEmployees.slice(0,4).forEach(function(person){ ?>
var recentNotificationEmployee = findEmployeeForPerson_(person); ?>
var recentNotificationPhoto = employeePhotoFor_(person, recentNotificationEmployee); ?>
= person.name || '' ?>
= person.role || 'Prowinch Team' ?>
if (person.office) { ?> · = person.office ?> } ?>
if (person.startDate) { ?> · Started = person.startDate ?> } ?>
}); ?>
} ?>
if (notifications.monthlyAnniversaries.length) { ?>
Work Anniversaries · This Month
notifications.monthlyAnniversaries.slice(0,4).forEach(function(person){ ?>
var monthlyAnniversaryEmployee = findEmployeeForPerson_(person); ?>
var monthlyAnniversaryPhoto = employeePhotoFor_(person, monthlyAnniversaryEmployee); ?>
= person.name || '' ?>
= person.years || 0 ?> = Number(person.years) === 1 ? 'year' : 'years' ?> at Prowinch
if (person.office) { ?> · = person.office ?> } ?>
}); ?>
} ?>
if (
!notifications.breakingNews &&
!hasTodayNotifications &&
!notifications.alerts.length &&
!notifications.events.length &&
!notifications.upcomingBirthdays.length &&
!notifications.recentEmployees.length &&
!notifications.monthlyAnniversaries.length
) { ?>
You're all caught up
There are no new notifications at this time.
} ?>
Comments