Update table deletion to properly delete screens
This commit is contained in:
parent
09ad3e73ae
commit
22f34d83ee
|
@ -35,7 +35,7 @@
|
|||
screen => screen.autoTableId === table._id
|
||||
)
|
||||
willBeDeleted = ["All table data"].concat(
|
||||
templateScreens.map(screen => `Screen ${screen.props._instanceName}`)
|
||||
templateScreens.map(screen => `Screen ${screen.routing?.route || ""}`)
|
||||
)
|
||||
confirmDeleteDialog.show()
|
||||
}
|
||||
|
|
|
@ -131,8 +131,7 @@
|
|||
const completeDatasourceScreenCreation = async () => {
|
||||
const screens = selectedTemplates.map(template => {
|
||||
let screenTemplate = template.create()
|
||||
screenTemplate.datasource = template.datasource
|
||||
screenTemplate.autoTableId = template.table
|
||||
screenTemplate.autoTableId = template.resourceId
|
||||
return screenTemplate
|
||||
})
|
||||
await createScreens({ screens, screenAccessRole })
|
||||
|
|
|
@ -72,7 +72,9 @@
|
|||
</div>
|
||||
<!-- List all tables -->
|
||||
{#each entities.filter(table => table._id !== "ta_users") as table}
|
||||
{@const views = Object.values(table.views || {})}
|
||||
{@const views = Object.values(table.views || {}).filter(
|
||||
view => view.version === 2
|
||||
)}
|
||||
{@const datasource = {
|
||||
...table,
|
||||
// Legacy properties
|
||||
|
@ -84,7 +86,7 @@
|
|||
type: "table",
|
||||
}}
|
||||
{@const selected = selectedScreens.find(
|
||||
x => x.resourceId === datasource.resourceId
|
||||
screen => screen.resourceId === datasource.resourceId
|
||||
)}
|
||||
<DatasourceTemplateRow
|
||||
on:click={() => toggleSelection(datasource)}
|
||||
|
|
Loading…
Reference in New Issue