diff --git a/packages/builder/src/components/backend/DataTable/TableDataTable.svelte b/packages/builder/src/components/backend/DataTable/TableDataTable.svelte index e0c653e9d7..2b7cde9201 100644 --- a/packages/builder/src/components/backend/DataTable/TableDataTable.svelte +++ b/packages/builder/src/components/backend/DataTable/TableDataTable.svelte @@ -14,13 +14,14 @@ import GridManageAccessButton from "components/backend/DataTable/buttons/grid/GridManageAccessButton.svelte" import GridRelationshipButton from "components/backend/DataTable/buttons/grid/GridRelationshipButton.svelte" import GridEditColumnModal from "components/backend/DataTable/modals/grid/GridEditColumnModal.svelte" + import GridUsersTableButton from "components/backend/DataTable/modals/grid/GridUsersTableButton.svelte" const userSchemaOverrides = { - firstName: { displayName: "First name", disabled: true }, - lastName: { displayName: "Last name", disabled: true }, - email: { displayName: "Email", disabled: true }, - roleId: { displayName: "Role", disabled: true }, - status: { displayName: "Status", disabled: true }, + firstName: { displayName: "First name" }, + lastName: { displayName: "Last name" }, + email: { displayName: "Email" }, + roleId: { displayName: "Role" }, + status: { displayName: "Status" }, } $: id = $tables.selected?._id @@ -59,22 +60,22 @@ datasource={gridDatasource} canAddRows={!isUsersTable} canDeleteRows={!isUsersTable} + canEditRows={!isUsersTable} + canEditColumns={!isUsersTable} schemaOverrides={isUsersTable ? userSchemaOverrides : null} showAvatars={false} on:updatedatasource={handleGridTableUpdate} > + {#if isUsersTable} + + {/if} - - - - - - - - + {#if !isUsersTable} + + {/if} {#if relationshipsEnabled} @@ -84,7 +85,6 @@ {:else} {/if} - {#if isUsersTable} @@ -92,6 +92,12 @@ {/if} + + + + + + diff --git a/packages/builder/src/components/backend/DataTable/modals/grid/GridUsersTableButton.svelte b/packages/builder/src/components/backend/DataTable/modals/grid/GridUsersTableButton.svelte new file mode 100644 index 0000000000..bf3814a4ff --- /dev/null +++ b/packages/builder/src/components/backend/DataTable/modals/grid/GridUsersTableButton.svelte @@ -0,0 +1,5 @@ + + +Why can't I edit this table? diff --git a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte index 1c264a5aaf..0cc61c69e6 100644 --- a/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte +++ b/packages/builder/src/components/backend/DatasourceNavigator/DatasourceNavigator.svelte @@ -180,7 +180,7 @@
selectTable(TableNames.USERS)}