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
|
screen => screen.autoTableId === table._id
|
||||||
)
|
)
|
||||||
willBeDeleted = ["All table data"].concat(
|
willBeDeleted = ["All table data"].concat(
|
||||||
templateScreens.map(screen => `Screen ${screen.props._instanceName}`)
|
templateScreens.map(screen => `Screen ${screen.routing?.route || ""}`)
|
||||||
)
|
)
|
||||||
confirmDeleteDialog.show()
|
confirmDeleteDialog.show()
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,8 +131,7 @@
|
||||||
const completeDatasourceScreenCreation = async () => {
|
const completeDatasourceScreenCreation = async () => {
|
||||||
const screens = selectedTemplates.map(template => {
|
const screens = selectedTemplates.map(template => {
|
||||||
let screenTemplate = template.create()
|
let screenTemplate = template.create()
|
||||||
screenTemplate.datasource = template.datasource
|
screenTemplate.autoTableId = template.resourceId
|
||||||
screenTemplate.autoTableId = template.table
|
|
||||||
return screenTemplate
|
return screenTemplate
|
||||||
})
|
})
|
||||||
await createScreens({ screens, screenAccessRole })
|
await createScreens({ screens, screenAccessRole })
|
||||||
|
|
|
@ -72,7 +72,9 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- List all tables -->
|
<!-- List all tables -->
|
||||||
{#each entities.filter(table => table._id !== "ta_users") as table}
|
{#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 = {
|
{@const datasource = {
|
||||||
...table,
|
...table,
|
||||||
// Legacy properties
|
// Legacy properties
|
||||||
|
@ -84,7 +86,7 @@
|
||||||
type: "table",
|
type: "table",
|
||||||
}}
|
}}
|
||||||
{@const selected = selectedScreens.find(
|
{@const selected = selectedScreens.find(
|
||||||
x => x.resourceId === datasource.resourceId
|
screen => screen.resourceId === datasource.resourceId
|
||||||
)}
|
)}
|
||||||
<DatasourceTemplateRow
|
<DatasourceTemplateRow
|
||||||
on:click={() => toggleSelection(datasource)}
|
on:click={() => toggleSelection(datasource)}
|
||||||
|
|
Loading…
Reference in New Issue