0
0
Fork 1
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:
Angus McLeod 2022-05-13 12:04:53 +02:00
Ursprung 45ab9b1b80
Commit 45f52d56c0

Datei anzeigen

@ -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;
}
}); });
}, },