%
const hasPlayer = (typeof player !== 'undefined' && player);
const chartPdgaNumber = hasPlayer ? player.pdgaNumber : pdgaNumber;
%>
<% if (hasPlayer) { %>
- Current rating
- <%= player.rating ?? '—' %>
- Last month
- <%= player.lastMonthRating ?? '—' %>
- Change vs last month
-
<% if (player.ratingChange != null) { %><%- include('delta-pill', { value: player.ratingChange }) %><% } else { %>—<% } %>
- Predicted next update
- <%= player.predictedRating ?? '—' %>
- Gap to predicted
-
<% if (player.deltaPredicted != null) { %><%- include('delta-pill', { value: player.deltaPredicted, extraClass: 'delta-predicted-pill' }) %><% } else { %>—<% } %>
<% } %>
<% if (history && history.length > 0) { %>
<% } else { %>
No rating history available
<% } %>