Propert snake case -> camel case conversion for backend entities -> frontend components

This commit is contained in:
Fabio Manganiello 2022-11-04 22:53:24 +01:00
parent 0f19104512
commit 6454f9d018
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ export default {
computed: {
type() {
let entityType = (this.value.type || '')
return entityType.charAt(0).toUpperCase() + entityType.slice(1)
return entityType.split('_').
map((s) => s.charAt(0).toUpperCase() + s.slice(1)).join('')
},
},
}