Removing the ability to delete a table.
This commit is contained in:
parent
9cc93b62a7
commit
b0ebd7d741
|
@ -1,16 +1,8 @@
|
||||||
<script>
|
<script>
|
||||||
import { goto } from "@roxi/routify"
|
import {goto} from "@roxi/routify"
|
||||||
import { store, allScreens } from "builderStore"
|
import {allScreens, store} from "builderStore"
|
||||||
import { tables } from "stores/backend"
|
import {tables} from "stores/backend"
|
||||||
import { notifications } from "@budibase/bbui"
|
import {ActionMenu, Icon, Input, MenuItem, Modal, ModalContent, notifications} from "@budibase/bbui"
|
||||||
import {
|
|
||||||
ActionMenu,
|
|
||||||
MenuItem,
|
|
||||||
Icon,
|
|
||||||
Modal,
|
|
||||||
ModalContent,
|
|
||||||
Input,
|
|
||||||
} from "@budibase/bbui"
|
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
|
|
||||||
export let table
|
export let table
|
||||||
|
@ -22,9 +14,10 @@
|
||||||
let templateScreens
|
let templateScreens
|
||||||
let willBeDeleted
|
let willBeDeleted
|
||||||
|
|
||||||
|
$: external = table?.type === "external"
|
||||||
|
|
||||||
function showDeleteModal() {
|
function showDeleteModal() {
|
||||||
const screens = $allScreens
|
templateScreens = $allScreens.filter(screen => screen.autoTableId === table._id)
|
||||||
templateScreens = screens.filter(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.props._instanceName}`)
|
||||||
)
|
)
|
||||||
|
@ -61,7 +54,9 @@
|
||||||
<Icon s hoverable name="MoreSmallList" />
|
<Icon s hoverable name="MoreSmallList" />
|
||||||
</div>
|
</div>
|
||||||
<MenuItem icon="Edit" on:click={editorModal.show}>Edit</MenuItem>
|
<MenuItem icon="Edit" on:click={editorModal.show}>Edit</MenuItem>
|
||||||
<MenuItem icon="Delete" on:click={showDeleteModal}>Delete</MenuItem>
|
{#if !external}
|
||||||
|
<MenuItem icon="Delete" on:click={showDeleteModal}>Delete</MenuItem>
|
||||||
|
{/if}
|
||||||
</ActionMenu>
|
</ActionMenu>
|
||||||
|
|
||||||
<Modal bind:this={editorModal}>
|
<Modal bind:this={editorModal}>
|
||||||
|
|
Loading…
Reference in New Issue