Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/contacts.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreta <gretadoci@gmail.com>2022-09-26 12:52:10 +0300
committerGitHub <noreply@github.com>2022-09-26 12:52:10 +0300
commit761a0164eb3d73a295d585589d09249683ee70b8 (patch)
tree06c41638f6cb8398bcbe05f2edbfd91d5af2fdbc
parent3959008d90ba78822b5712bd94c8c2be494c7505 (diff)
parent115b9c876ac200bcf143deb49006c5640d50601b (diff)
Merge pull request #2973 from nextcloud/fix/sort-org-charts
Sort org charts
-rw-r--r--src/components/OrgChart.vue7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/components/OrgChart.vue b/src/components/OrgChart.vue
index 646cf296..d9a6a6cf 100644
--- a/src/components/OrgChart.vue
+++ b/src/components/OrgChart.vue
@@ -23,6 +23,7 @@
<script>
import * as d3 from 'd3'
import ChartTemplate from './ChartTemplate.vue'
+import { getLocale } from '@nextcloud/l10n'
import Multiselect from '@nextcloud/vue/dist/Components/NcMultiselect'
import { OrgChart } from 'd3-org-chart'
import router from './../router'
@@ -53,6 +54,12 @@ export default {
id: index,
label: head.org ? `${head.org} (${head.fullName})` : head.fullName,
}
+ }).sort((a, b) => {
+ return a.label.localeCompare(
+ b.label,
+ getLocale().replace('_', '-'),
+ { sensitivity: 'base' },
+ )
})
},
placeholder() {