summaryrefslogtreecommitdiffstats
path: root/src/components/OrgChart.vue
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2022-09-23 19:18:00 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2022-09-23 19:18:00 +0200
commit115b9c876ac200bcf143deb49006c5640d50601b (patch)
treee73047bc16f032378d8e74f0aa214b625f848303 /src/components/OrgChart.vue
parentf388856505cb81aa8a28c6e5d09bba5c466e0cbd (diff)
Sort org charts
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'src/components/OrgChart.vue')
-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() {