optimize order of values of access fields (closes #8945)

This commit is contained in:
Martin Raifer
2022-02-03 18:46:42 +01:00
parent bafa72c9e3
commit fcd8a2b2e7
2 changed files with 20 additions and 8 deletions
+16 -8
View File
@@ -79,15 +79,23 @@ export function uiFieldAccess(field, context) {
access.options = function(type) {
var options = ['no', 'permissive', 'private', 'permit', 'destination', 'customers', 'unknown'];
var options = [
'yes',
'no',
'designated',
'permissive',
'destination',
'customers',
'private',
'permit',
'unknown'
];
if (type !== 'access') {
options.unshift('yes');
options.push('designated');
if (type === 'bicycle') {
options.push('dismount');
}
if (type === 'access') {
options = options.filter(v => v !== 'yes' && v !== 'designated');
}
if (type === 'bicycle') {
options.splice(options.length - 4, 0, 'dismount');
}
return options.map(function(option) {