Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-25 10:40:28 +01:00
Sort actions by subscription type
Dieser Commit ist enthalten in:
Ursprung
45ab9b1b80
Commit
45f52d56c0
1 geänderte Dateien mit 12 neuen und 0 gelöschten Zeilen
|
@ -67,6 +67,18 @@ export default SingleSelectComponent.extend(Subscription, {
|
||||||
requiredSubscriptionType
|
requiredSubscriptionType
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
}).sort(function(a, b) {
|
||||||
|
if (a.subscriptionType && !b.subscriptionType) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (!a.subscriptionType && b.subscriptionType) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (a.subscriptionType == b.subscriptionType) {
|
||||||
|
return a.subscriptionType ? a.subscriptionType.localeCompare(b.subscriptionType) : 0;
|
||||||
|
} else {
|
||||||
|
return a.subscriptionType === 'standard' ? -1 : 0;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren