refactor: profile menu role

This commit is contained in:
puriphatt 2024-09-03 10:48:00 +07:00
parent eda7dd84f1
commit 5adf80142a

View file

@ -146,7 +146,12 @@ onMounted(async () => {
role !== 'uma_authorization',
)
.map((role) =>
role.replace(/_/g, ' ').replace(/^./, (match) => match.toUpperCase()),
role
.replace(/_/g, ' ')
.toLowerCase()
.split(' ')
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(' '),
);
}
});