diff --git a/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte b/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte index cf1ea57d27..f39eff5787 100644 --- a/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/ModelDataTable.svelte @@ -8,7 +8,7 @@ import LinkedRecord from "./LinkedRecord.svelte" import AttachmentList from "./AttachmentList.svelte" import TablePagination from "./TablePagination.svelte" - import { CreateEditRecordModal } from "./modals" + import CreateEditRecordModal from "./popovers/CreateEditRecord.svelte" import RowPopover from "./popovers/Row.svelte" import ColumnPopover from "./popovers/Column.svelte" import ViewPopover from "./popovers/View.svelte" @@ -136,7 +136,6 @@ } thead th { color: var(--ink); - text-transform: capitalize; font-weight: 500; font-size: 14px; text-rendering: optimizeLegibility; diff --git a/packages/builder/src/components/backend/DataTable/Table.svelte b/packages/builder/src/components/backend/DataTable/Table.svelte index db69120a76..c58ea66ac8 100644 --- a/packages/builder/src/components/backend/DataTable/Table.svelte +++ b/packages/builder/src/components/backend/DataTable/Table.svelte @@ -8,7 +8,7 @@ import ActionButton from "components/common/ActionButton.svelte" import AttachmentList from "./AttachmentList.svelte" import TablePagination from "./TablePagination.svelte" - import { CreateEditRecordModal } from "./modals" + import CreateEditRecordModal from "./popovers/CreateEditRecord.svelte" import RowPopover from "./popovers/Row.svelte" import ColumnPopover from "./popovers/Column.svelte" import ViewPopover from "./popovers/View.svelte" diff --git a/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte b/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte index 9b73b7198b..2710fdfc66 100644 --- a/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/ViewDataTable.svelte @@ -9,7 +9,7 @@ import ActionButton from "components/common/ActionButton.svelte" import LinkedRecord from "./LinkedRecord.svelte" import TablePagination from "./TablePagination.svelte" - import { CreateEditRecordModal } from "./modals" + import CreateEditRecordModal from "./popovers/CreateEditRecord.svelte" import RowPopover from "./popovers/Row.svelte" import ColumnPopover from "./popovers/Column.svelte" import ViewPopover from "./popovers/View.svelte" diff --git a/packages/builder/src/components/backend/DataTable/popovers/Calculate.svelte b/packages/builder/src/components/backend/DataTable/popovers/Calculate.svelte index 5497c4d455..08e3ece75c 100644 --- a/packages/builder/src/components/backend/DataTable/popovers/Calculate.svelte +++ b/packages/builder/src/components/backend/DataTable/popovers/Calculate.svelte @@ -9,7 +9,7 @@ } from "@budibase/bbui" import { backendUiStore } from "builderStore" import { notifier } from "builderStore/store/notifications" - import CreateEditRecord from "../modals/CreateEditRecord.svelte" + import CreateEditRecord from "./CreateEditRecord.svelte" const CALCULATIONS = [ { @@ -90,7 +90,7 @@ .input-group-row { display: grid; - grid-template-columns: 50px 1fr 20px 1fr; + grid-template-columns: 30px 1fr 20px 1fr; gap: var(--spacing-s); align-items: center; } diff --git a/packages/builder/src/components/backend/DataTable/popovers/Column.svelte b/packages/builder/src/components/backend/DataTable/popovers/Column.svelte index 2047a9a31b..61d03a2fbb 100644 --- a/packages/builder/src/components/backend/DataTable/popovers/Column.svelte +++ b/packages/builder/src/components/backend/DataTable/popovers/Column.svelte @@ -8,7 +8,7 @@ Select, } from "@budibase/bbui" import { FIELDS } from "constants/backend" - import CreateEditColumn from "../modals/CreateEditColumn.svelte" + import CreateEditColumn from "./CreateEditColumn.svelte" let anchor let dropdown diff --git a/packages/builder/src/components/backend/DataTable/popovers/ColumnHeader.svelte b/packages/builder/src/components/backend/DataTable/popovers/ColumnHeader.svelte index be0f40f6b2..fbe702b277 100644 --- a/packages/builder/src/components/backend/DataTable/popovers/ColumnHeader.svelte +++ b/packages/builder/src/components/backend/DataTable/popovers/ColumnHeader.svelte @@ -2,14 +2,16 @@ import { backendUiStore } from "builderStore" import { DropdownMenu, Button, Icon, Input, Select } from "@budibase/bbui" import { FIELDS } from "constants/backend" - import { CreateEditColumnModal } from "../modals" + import CreateEditColumnModal from "./CreateEditColumn.svelte" + import ConfirmDialog from "components/common/ConfirmDialog.svelte" + import { notifier } from "../../../../builderStore/store/notifications" export let field let anchor let dropdown - let editing + let confirmDeleteDialog $: sortColumn = $backendUiStore.sort && $backendUiStore.sort.column $: sortDirection = $backendUiStore.sort && $backendUiStore.sort.direction @@ -23,8 +25,13 @@ editing = false } - function deleteField() { - backendUiStore.actions.models.deleteField(field) + function deleteColumn() { + if (field.name === $backendUiStore.selectedModel.primaryDisplay) { + notifier.danger("You cannot delete the primary display column") + } else { + backendUiStore.actions.models.deleteField(field) + notifier.success("Column deleted") + } hideEditor() } @@ -38,7 +45,7 @@
Group By
+By