1
0
Fork 0
Dieser Commit ist enthalten in:
Angus McLeod 2022-05-13 12:06:38 +02:00
Ursprung 45f52d56c0
Commit 1c9d52bcfc

Datei anzeigen

@ -52,7 +52,8 @@ export default SingleSelectComponent.extend(Subscription, {
@discourseComputed("feature", "attribute") @discourseComputed("feature", "attribute")
content(feature, attribute) { content(feature, attribute) {
return wizardSchema[feature][attribute].map((value) => { return wizardSchema[feature][attribute]
.map((value) => {
let requiredSubscriptionType = this.requiredSubscriptionType( let requiredSubscriptionType = this.requiredSubscriptionType(
feature, feature,
attribute, attribute,
@ -67,17 +68,20 @@ export default SingleSelectComponent.extend(Subscription, {
requiredSubscriptionType requiredSubscriptionType
), ),
}; };
}).sort(function(a, b) { })
.sort(function (a, b) {
if (a.subscriptionType && !b.subscriptionType) { if (a.subscriptionType && !b.subscriptionType) {
return 1; return 1;
} }
if (!a.subscriptionType && b.subscriptionType) { if (!a.subscriptionType && b.subscriptionType) {
return -1; return -1;
} }
if (a.subscriptionType == b.subscriptionType) { if (a.subscriptionType === b.subscriptionType) {
return a.subscriptionType ? a.subscriptionType.localeCompare(b.subscriptionType) : 0; return a.subscriptionType
? a.subscriptionType.localeCompare(b.subscriptionType)
: 0;
} else { } else {
return a.subscriptionType === 'standard' ? -1 : 0; return a.subscriptionType === "standard" ? -1 : 0;
} }
}); });
}, },