Feat - Sort inboxes alphabetically (#4383)
This commit is contained in:
parent
5b490bc8cc
commit
8482ecc1b1
1 changed files with 14 additions and 8 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue