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

Default Offer

{{$defaultOffer := .ReferralOffers.GetDefaultFromSet}}
{{$defaultOffer.Name}}
${{$defaultOffer.InviteeCredit}}
${{$defaultOffer.AwardCredit}}
{{$defaultOffer.NumRedeemed}}
{{printf "%.10s" $defaultOffer.CreatedAt}}

Current Offer

{{if gt (len .ReferralOffers.Set) 0}} {{$currentOffer := .ReferralOffers.GetCurrentFromSet}}
{{$currentOffer.Name}}
${{$currentOffer.InviteeCredit}}
${{$currentOffer.AwardCredit}}
{{$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}}
${{$offer.InviteeCredit}}
${{$offer.AwardCredit}}
{{.NumRedeemed}}
{{.RedeemableCap}}
{{printf "%.10s" .CreatedAt}}
{{printf "%.10s" .ExpiresAt}}
off

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