Feat - Sort inboxes alphabetically (#4383)
This commit is contained in:
@@ -85,14 +85,20 @@ export default {
|
|||||||
toState: frontendURL(`accounts/${this.accountId}/settings/inboxes/new`),
|
toState: frontendURL(`accounts/${this.accountId}/settings/inboxes/new`),
|
||||||
toStateName: 'settings_inbox_new',
|
toStateName: 'settings_inbox_new',
|
||||||
newLinkRouteName: 'settings_inbox_new',
|
newLinkRouteName: 'settings_inbox_new',
|
||||||
children: this.inboxes.map(inbox => ({
|
children: this.inboxes
|
||||||
|
.map(inbox => ({
|
||||||
id: inbox.id,
|
id: inbox.id,
|
||||||
label: inbox.name,
|
label: inbox.name,
|
||||||
truncateLabel: true,
|
truncateLabel: true,
|
||||||
toState: frontendURL(`accounts/${this.accountId}/inbox/${inbox.id}`),
|
toState: frontendURL(
|
||||||
|
`accounts/${this.accountId}/inbox/${inbox.id}`
|
||||||
|
),
|
||||||
type: inbox.channel_type,
|
type: inbox.channel_type,
|
||||||
phoneNumber: inbox.phone_number,
|
phoneNumber: inbox.phone_number,
|
||||||
})),
|
}))
|
||||||
|
.sort((a, b) =>
|
||||||
|
a.label.toLowerCase() > b.label.toLowerCase() ? 1 : -1
|
||||||
|
),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
labelSection() {
|
labelSection() {
|
||||||
|
|||||||
Reference in New Issue
Block a user