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 untrusted user: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -31,7 +31,8 @@ export default {
computed: { computed: {
type() { type() {
let entityType = (this.value.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('')
}, },
}, },
} }