fixed unit edit not showing plural input

This commit is contained in:
vabene1111 2024-02-19 08:08:17 +01:00
parent 3a349b1bd2
commit 47c508831c

View File

@ -119,7 +119,6 @@ export default {
show_split: false, show_split: false,
paginated: false, paginated: false,
header_component_name: undefined, header_component_name: undefined,
use_plural: false,
} }
}, },
computed: { computed: {
@ -145,17 +144,6 @@ export default {
} }
}) })
this.$i18n.locale = window.CUSTOM_LOCALE this.$i18n.locale = window.CUSTOM_LOCALE
let apiClient = new ApiApiFactory()
apiClient.retrieveSpace(window.ACTIVE_SPACE_ID).then(r => {
this.use_plural = r.data.use_plural
if (!this.use_plural && this.this_model !== null && this.this_model.create.params[0] !== null && this.this_model.create.params[0].includes('plural_name')) {
let index = this.this_model.create.params[0].indexOf('plural_name')
if (index > -1){
this.this_model.create.params[0].splice(index, 1)
}
delete this.this_model.create.form.plural_name
}
})
}, },
methods: { methods: {
// this.genericAPI inherited from ApiMixin // this.genericAPI inherited from ApiMixin