feat: add translation of vue types when added (#946)

This commit is contained in:
CamilleLegeron
2024-05-17 20:55:24 +02:00
committed by GitHub
parent 418ae03475
commit 6443c9f914
5 changed files with 32 additions and 17 deletions

View File

@@ -460,7 +460,9 @@ export function createViewSectionRec(this: ViewSectionRec, docModel: DocModel):
// - Widget type description (if not grid)
// All concatenated separated by space.
this.defaultWidgetTitle = this.autoDispose(ko.pureComputed(() => {
const widgetTypeDesc = this.parentKey() !== 'record' ? `${getWidgetTypes(this.parentKey.peek() as any).label}` : '';
const widgetTypeDesc = this.parentKey() !== 'record'
? `${getWidgetTypes(this.parentKey.peek() as any).getLabel()}`
: '';
const table = this.table();
return [
table.tableNameDef()?.toUpperCase(), // Due to ACL this can be null.