Some minor fixes, right padding wasn't the same as left padding and fixing 404 when deleting a view.
This commit is contained in:
parent
68549c2d0b
commit
c2a7510d19
|
@ -1,5 +1,6 @@
|
||||||
<script>
|
<script>
|
||||||
import api from "builderStore/api"
|
import api from "builderStore/api"
|
||||||
|
import { backendUiStore } from "builderStore"
|
||||||
import Table from "./Table.svelte"
|
import Table from "./Table.svelte"
|
||||||
import CalculateButton from "./buttons/CalculateButton.svelte"
|
import CalculateButton from "./buttons/CalculateButton.svelte"
|
||||||
import GroupByButton from "./buttons/GroupByButton.svelte"
|
import GroupByButton from "./buttons/GroupByButton.svelte"
|
||||||
|
@ -22,6 +23,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchViewData(name, field, groupBy, calculation) {
|
async function fetchViewData(name, field, groupBy, calculation) {
|
||||||
|
const tables = $backendUiStore.tables
|
||||||
|
const allTableViews = tables.map(table => table.views)
|
||||||
|
const thisView = allTableViews.filter(
|
||||||
|
views => views != null && views[name] != null
|
||||||
|
)[0]
|
||||||
|
// don't fetch view data if the view no longer exists
|
||||||
|
if (!thisView) {
|
||||||
|
return
|
||||||
|
}
|
||||||
const params = new URLSearchParams()
|
const params = new URLSearchParams()
|
||||||
if (calculation) {
|
if (calculation) {
|
||||||
params.set("field", field)
|
params.set("field", field)
|
||||||
|
|
|
@ -135,6 +135,8 @@ export const margin = [
|
||||||
{ label: "20px", value: "20px" },
|
{ label: "20px", value: "20px" },
|
||||||
{ label: "32px", value: "32px" },
|
{ label: "32px", value: "32px" },
|
||||||
{ label: "64px", value: "64px" },
|
{ label: "64px", value: "64px" },
|
||||||
|
{ label: "128px", value: "128px" },
|
||||||
|
{ label: "256px", value: "256px" },
|
||||||
{ label: "Auto", value: "auto" },
|
{ label: "Auto", value: "auto" },
|
||||||
{ label: "100%", value: "100%" },
|
{ label: "100%", value: "100%" },
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue