Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
Fix linting
Dieser Commit ist enthalten in:
Ursprung
45f52d56c0
Commit
1c9d52bcfc
1 geänderte Dateien mit 32 neuen und 28 gelöschten Zeilen
|
@ -52,34 +52,38 @@ 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]
|
||||||
let requiredSubscriptionType = this.requiredSubscriptionType(
|
.map((value) => {
|
||||||
feature,
|
let requiredSubscriptionType = this.requiredSubscriptionType(
|
||||||
attribute,
|
feature,
|
||||||
value
|
attribute,
|
||||||
);
|
value
|
||||||
return {
|
);
|
||||||
id: value,
|
return {
|
||||||
name: I18n.t(nameKey(feature, attribute, value)),
|
id: value,
|
||||||
subscriptionType: requiredSubscriptionType,
|
name: I18n.t(nameKey(feature, attribute, value)),
|
||||||
disabled: !subscriptionTypeSufficient(
|
subscriptionType: requiredSubscriptionType,
|
||||||
this.subscriptionType,
|
disabled: !subscriptionTypeSufficient(
|
||||||
requiredSubscriptionType
|
this.subscriptionType,
|
||||||
),
|
requiredSubscriptionType
|
||||||
};
|
),
|
||||||
}).sort(function(a, b) {
|
};
|
||||||
if (a.subscriptionType && !b.subscriptionType) {
|
})
|
||||||
return 1;
|
.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 a.subscriptionType ? a.subscriptionType.localeCompare(b.subscriptionType) : 0;
|
}
|
||||||
} else {
|
if (a.subscriptionType === b.subscriptionType) {
|
||||||
return a.subscriptionType === 'standard' ? -1 : 0;
|
return a.subscriptionType
|
||||||
}
|
? a.subscriptionType.localeCompare(b.subscriptionType)
|
||||||
});
|
: 0;
|
||||||
|
} else {
|
||||||
|
return a.subscriptionType === "standard" ? -1 : 0;
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
modifyComponentForRow() {
|
modifyComponentForRow() {
|
||||||
|
|
Laden …
In neuem Issue referenzieren