Browse Source

refactor: show LTAR column name instead of table name in Lookup/Rollup

re #1811 #1768

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/1875/head
Pranav C 3 years ago
parent
commit
726064ded5
  1. 5
      packages/nc-gui/components/project/spreadsheet/components/editColumn/lookupOptions.vue
  2. 5
      packages/nc-gui/components/project/spreadsheet/components/editColumn/rollupOptions.vue

5
packages/nc-gui/components/project/spreadsheet/components/editColumn/lookupOptions.vue

@ -18,9 +18,9 @@
dense dense
> >
<template #item="{item}"> <template #item="{item}">
<span class="caption"><span class="font-weight-bold"> {{ <span class="caption"><span class="font-weight-bold">{{ item.column.title }}</span> <small>({{ relationNames[item.col.type] }} {{
item.title || item.table_name item.title || item.table_name
}}</span> <small>({{ relationNames[item.col.type] }}) }})
</small></span> </small></span>
</template> </template>
</v-autocomplete> </v-autocomplete>
@ -74,6 +74,7 @@ export default {
c.uidt === UITypes.LinkToAnotherRecord && !c.system c.uidt === UITypes.LinkToAnotherRecord && !c.system
).map(c => ({ ).map(c => ({
col: c.colOptions, col: c.colOptions,
column: c,
...this.tables.find(t => t.id === c.colOptions.fk_related_model_id) ...this.tables.find(t => t.id === c.colOptions.fk_related_model_id)
})) }))

5
packages/nc-gui/components/project/spreadsheet/components/editColumn/rollupOptions.vue

@ -18,9 +18,9 @@
dense dense
> >
<template #item="{item}"> <template #item="{item}">
<span class="caption"><span class="font-weight-bold"> {{ <span class="caption"><span class="font-weight-bold">{{ item.column.title }}</span> <small>({{ relationNames[item.col.type] }} {{
item.title || item.table_name item.title || item.table_name
}}</span> <small>({{ relationNames[item.col.type] }}) }})
</small></span> </small></span>
</template> </template>
</v-autocomplete> </v-autocomplete>
@ -98,6 +98,7 @@ export default {
c.uidt === UITypes.LinkToAnotherRecord && c.colOptions.type !== 'bt' && !c.system c.uidt === UITypes.LinkToAnotherRecord && c.colOptions.type !== 'bt' && !c.system
).map(c => ({ ).map(c => ({
col: c.colOptions, col: c.colOptions,
column: c,
...this.tables.find(t => t.id === c.colOptions.fk_related_model_id) ...this.tables.find(t => t.id === c.colOptions.fk_related_model_id)
})) }))

Loading…
Cancel
Save