fix translations in helper libraries models.js and utils.js

This commit is contained in:
smilerz
2022-02-25 13:16:34 -06:00
parent 90d477a0fd
commit dae49ec5f3
6 changed files with 171 additions and 119 deletions

View File

@ -67,6 +67,9 @@ export default {
this.field = this.form?.field ?? "You Forgot To Set Field Name"
this.label = this.form?.label ?? ""
this.sticky_options = this.form?.sticky_options ?? []
this.sticky_options = this.sticky_options.map((x) => {
return { ...x, name: this.$t(x.name) }
})
this.list_label = this.form?.list_label ?? undefined
if (this.list_label?.includes("::")) {
this.list_label = this.list_label.split("::")[1]
@ -74,7 +77,7 @@ export default {
},
computed: {
modelName() {
return this?.model?.name ?? this.$t("Search")
return this.$t(this?.model?.name) ?? this.$t("Search")
},
useMultiple() {
return this.form?.multiple || this.form?.ordered || false