Merge pull request #1164 from Budibase/bugs/various-bugs
Various bug fixes
This commit is contained in:
commit
d250afe9c0
|
@ -125,7 +125,12 @@ export default {
|
|||
requestFeedbackOnDeploy,
|
||||
submitFeedback,
|
||||
highlightFeedbackIcon,
|
||||
disabled: ifAnalyticsEnabled(disabled),
|
||||
disabled: () => {
|
||||
if (analyticsEnabled == null) {
|
||||
return true
|
||||
}
|
||||
return ifAnalyticsEnabled(disabled)
|
||||
},
|
||||
optIn: ifAnalyticsEnabled(optIn),
|
||||
optOut: ifAnalyticsEnabled(optOut),
|
||||
}
|
||||
|
|
|
@ -290,7 +290,7 @@ export const getFrontendStore = () => {
|
|||
...extras,
|
||||
}
|
||||
},
|
||||
create: (componentName, presetProps) => {
|
||||
create: async (componentName, presetProps) => {
|
||||
const selected = get(selectedComponent)
|
||||
const asset = get(currentAsset)
|
||||
const state = get(store)
|
||||
|
@ -346,7 +346,7 @@ export const getFrontendStore = () => {
|
|||
parentComponent._children.push(componentInstance)
|
||||
|
||||
// Save components and update UI
|
||||
store.actions.preview.saveSelected()
|
||||
await store.actions.preview.saveSelected()
|
||||
store.update(state => {
|
||||
state.currentView = "component"
|
||||
state.selectedComponentId = componentInstance._id
|
||||
|
@ -360,7 +360,7 @@ export const getFrontendStore = () => {
|
|||
|
||||
return componentInstance
|
||||
},
|
||||
delete: component => {
|
||||
delete: async component => {
|
||||
if (!component) {
|
||||
return
|
||||
}
|
||||
|
@ -375,7 +375,7 @@ export const getFrontendStore = () => {
|
|||
)
|
||||
store.actions.components.select(parent)
|
||||
}
|
||||
store.actions.preview.saveSelected()
|
||||
await store.actions.preview.saveSelected()
|
||||
},
|
||||
copy: (component, cut = false) => {
|
||||
const selectedAsset = get(currentAsset)
|
||||
|
@ -487,7 +487,7 @@ export const getFrontendStore = () => {
|
|||
selected._styles = { normal: {}, hover: {}, active: {} }
|
||||
await store.actions.preview.saveSelected()
|
||||
},
|
||||
updateProp: (name, value) => {
|
||||
updateProp: async (name, value) => {
|
||||
let component = get(selectedComponent)
|
||||
if (!name || !component) {
|
||||
return
|
||||
|
@ -497,7 +497,7 @@ export const getFrontendStore = () => {
|
|||
state.selectedComponentId = component._id
|
||||
return state
|
||||
})
|
||||
store.actions.preview.saveSelected()
|
||||
await store.actions.preview.saveSelected()
|
||||
},
|
||||
links: {
|
||||
save: async (url, title) => {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
import TableLoadingOverlay from "./TableLoadingOverlay"
|
||||
import TableHeader from "./TableHeader"
|
||||
import "@budibase/svelte-ag-grid/dist/index.css"
|
||||
import { TableNames } from "constants"
|
||||
import { TableNames, UNEDITABLE_USER_FIELDS } from "constants"
|
||||
|
||||
export let schema = {}
|
||||
export let data = []
|
||||
|
@ -53,6 +53,7 @@
|
|||
if (isUsersTable) {
|
||||
schema.email.displayFieldName = "Email"
|
||||
schema.roleId.displayFieldName = "Role"
|
||||
schema.status.displayFieldName = "Status"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -83,7 +84,7 @@
|
|||
if (!allowEditing) {
|
||||
return false
|
||||
}
|
||||
return !(isUsersTable && ["email", "roleId"].includes(key))
|
||||
return !(isUsersTable && UNEDITABLE_USER_FIELDS.includes(key))
|
||||
}
|
||||
|
||||
for (let [key, value] of Object.entries(schema || {})) {
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
<Table
|
||||
title={decodeURI(name)}
|
||||
schema={view.schema}
|
||||
tableId={view.tableId}
|
||||
{data}
|
||||
{loading}
|
||||
bind:hideAutocolumns>
|
||||
|
|
|
@ -168,7 +168,9 @@
|
|||
</div>
|
||||
{/if}
|
||||
<div class="footer">
|
||||
<Button text on:click={addFilter}>Add Filter</Button>
|
||||
<div class="add-filter">
|
||||
<Button text on:click={addFilter}>Add Filter</Button>
|
||||
</div>
|
||||
<div class="buttons">
|
||||
<Button secondary on:click={onClosed}>Cancel</Button>
|
||||
<Button primary on:click={saveView}>Save</Button>
|
||||
|
@ -213,4 +215,8 @@
|
|||
margin: 0;
|
||||
font-size: var(--font-size-xs);
|
||||
}
|
||||
|
||||
.add-filter {
|
||||
margin-right: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -23,7 +23,10 @@
|
|||
})
|
||||
</script>
|
||||
|
||||
<ModalContent title="Webhook Endpoints" confirmText="OK" showCancelButton={false}>
|
||||
<ModalContent
|
||||
title="Webhook Endpoints"
|
||||
confirmText="OK"
|
||||
showCancelButton={false}>
|
||||
<p>See below the list of deployed webhook URLs.</p>
|
||||
{#each webhookUrls as webhookUrl}
|
||||
<div>
|
||||
|
|
|
@ -39,14 +39,14 @@
|
|||
return enrichedStructure
|
||||
}
|
||||
|
||||
const onItemChosen = (item, idx) => {
|
||||
const onItemChosen = async (item, idx) => {
|
||||
if (item.isCategory) {
|
||||
// Select and open this category
|
||||
selectedIndex = idx
|
||||
popover.show()
|
||||
} else {
|
||||
// Add this component
|
||||
store.actions.components.create(item.component)
|
||||
await store.actions.components.create(item.component)
|
||||
popover.hide()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,8 +64,8 @@
|
|||
pasteComponent("below")
|
||||
}
|
||||
|
||||
const deleteComponent = () => {
|
||||
store.actions.components.delete(component)
|
||||
const deleteComponent = async () => {
|
||||
await store.actions.components.delete(component)
|
||||
}
|
||||
|
||||
const storeComponentForCopy = (cut = false) => {
|
||||
|
|
|
@ -10,7 +10,7 @@ export const FrontendTypes = {
|
|||
}
|
||||
|
||||
// fields on the user table that cannot be edited
|
||||
export const UNEDITABLE_USER_FIELDS = ["email", "password", "roleId"]
|
||||
export const UNEDITABLE_USER_FIELDS = ["email", "password", "roleId", "status"]
|
||||
|
||||
export const LAYOUT_NAMES = {
|
||||
MASTER: {
|
||||
|
|
Loading…
Reference in New Issue