mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-04 17:04:59 +03:00
Updated sorted price list in product details
refs https://github.com/TryGhost/Team/issues/641 By default, the prices list for a Product will be now shown sorted based on this order -> Active -> Currency -> Amount.
This commit is contained in:
parent
575f85a8ca
commit
fab98939fd
@ -30,6 +30,12 @@ export default class ProductController extends Controller {
|
||||
...d,
|
||||
amount: d.amount / 100
|
||||
};
|
||||
}).sort((a, b) => {
|
||||
return a.amount - b.amount;
|
||||
}).sort((a, b) => {
|
||||
return a.currency.localeCompare(b.currency, undefined, {ignorePunctuation: true});
|
||||
}).sort((a, b) => {
|
||||
return (a.active === b.active) ? 0 : (a.active ? -1 : 1);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user