make display order consistent (#2705)
This commit is contained in:
parent
e5f30bddc0
commit
c32fc283c3
@ -3,6 +3,8 @@
|
||||
|
||||
package rewards
|
||||
|
||||
import "sort"
|
||||
|
||||
// OrganizedOffers contains a list of offers organized by status.
|
||||
type OrganizedOffers struct {
|
||||
Active Offer
|
||||
@ -78,9 +80,18 @@ func (offers Offers) OrganizeOffersByType() OfferSet {
|
||||
func createPartnerSet() PartnerSet {
|
||||
partners := LoadPartnerInfos()
|
||||
var ps PartnerSet
|
||||
for _, partner := range partners {
|
||||
keys := make([]string, len(partners))
|
||||
i := 0
|
||||
for k := range partners {
|
||||
keys[i] = k
|
||||
i++
|
||||
}
|
||||
|
||||
sort.Strings(keys)
|
||||
|
||||
for _, key := range keys {
|
||||
ps = append(ps, OpenSourcePartner{
|
||||
PartnerInfo: partner,
|
||||
PartnerInfo: partners[key],
|
||||
})
|
||||
}
|
||||
return ps
|
||||
|
@ -37,7 +37,7 @@ See LICENSE for copying information. -->
|
||||
<input type="number" class="form-control" name="InviteeCreditDurationDays" id="InviteeCreditDurationDays" min="1" placeholder="14 days" required>
|
||||
</div>
|
||||
<div class="form-group col-md-2">
|
||||
<label for="AwardCredit">Award Credit</label>
|
||||
<label for="AwardCredit">Get Credit</label>
|
||||
<input type="number" class="form-control" name="AwardCredit" id="AwardCredit" placeholder="$50" min="1" required>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
|
@ -6,7 +6,7 @@ See LICENSE for copying information. -->
|
||||
<div class="row">
|
||||
<div class="col col-heading">Name</div>
|
||||
<div class="col col-heading">Give Credit</div>
|
||||
<div class="col col-heading">Award Credit</div>
|
||||
<div class="col col-heading">Get Credit</div>
|
||||
<div class="col col-heading">Redeemable Capacity</div>
|
||||
<div class="col col-heading">Created</div>
|
||||
<div class="col col-heading">Expiration</div>
|
||||
|
Loading…
Reference in New Issue
Block a user