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