{{define "referralOffers"}}
Name
Give Credit
Award Credit
Referrals Used
Redeemable Capacity
Created
Expiration
Status

default offer

{{$defaultOffer := .ReferralOffers.GetDefaultFromSet}}
{{$defaultOffer.Name}}
${{ToDollars $defaultOffer.InviteeCreditInCents}}
${{ToDollars $defaultOffer.AwardCreditInCents}}
{{$defaultOffer.NumRedeemed}}
{{printf "%.10s" $defaultOffer.CreatedAt}}

current offer

{{if gt (len .ReferralOffers.Set) 0}} {{$currentOffer := .ReferralOffers.GetCurrentFromSet}}
{{$currentOffer.Name}}
${{ToDollars $currentOffer.InviteeCreditInCents}}
${{ToDollars $currentOffer.AwardCreditInCents}}
{{$currentOffer.NumRedeemed}}
{{$currentOffer.RedeemableCap}}
{{printf "%.10s" $currentOffer.CreatedAt}}
{{printf "%.10s" $currentOffer.ExpiresAt}}
Live ·

{{end}}

other offers

{{if gt (len .ReferralOffers.Set) 0}} {{range .ReferralOffers.Set}} {{$offer := .}} {{if $offer.IsDone}}
{{$offer.Name}}
${{ToDollars $offer.InviteeCreditInCents}}
${{ToDollars $offer.AwardCreditInCents}}
{{.NumRedeemed}}
{{.RedeemableCap}}
{{printf "%.10s" .CreatedAt}}
{{printf "%.10s" .ExpiresAt}}
off

{{end}} {{end}} {{end}}
{{end}}