diff --git a/apps/frontend/src/lib/components/blocks/field-control/field-control.svelte b/apps/frontend/src/lib/components/blocks/field-control/field-control.svelte index 519aadb9c..34eedab83 100644 --- a/apps/frontend/src/lib/components/blocks/field-control/field-control.svelte +++ b/apps/frontend/src/lib/components/blocks/field-control/field-control.svelte @@ -12,8 +12,8 @@ import AttachmentControl from "./attachment-control.svelte" import JsonControl from "./json-control.svelte" import CheckboxControl from "./checkbox-control.svelte" - import RollupControl from "./rollup-control.svelte" import UrlControl from "./url-control.svelte" + import RollupField from "../field-value/rollup-field.svelte" export let readonly = false export let field: NoneSystemField @@ -36,7 +36,7 @@ string: StringControl, number: NumberControl, reference: ReferenceControl, - rollup: RollupControl, + rollup: RollupField, select: SelectControl, rating: RatingControl, email: EmailControl, diff --git a/apps/frontend/src/lib/components/blocks/field-control/rollup-control.svelte b/apps/frontend/src/lib/components/blocks/field-control/rollup-control.svelte deleted file mode 100644 index 027d1a858..000000000 --- a/apps/frontend/src/lib/components/blocks/field-control/rollup-control.svelte +++ /dev/null @@ -1,30 +0,0 @@ - - -
-{#if Array.isArray(value)} - {#each value as item} - {#if item !== null} - - {item} - - {:else} - - Unamed - - {/if} - {/each} -{:else} - - {value} - -{/if} diff --git a/apps/frontend/src/lib/components/blocks/field-value/rollup-field.svelte b/apps/frontend/src/lib/components/blocks/field-value/rollup-field.svelte index 7e38e853c..f419d3b70 100644 --- a/apps/frontend/src/lib/components/blocks/field-value/rollup-field.svelte +++ b/apps/frontend/src/lib/components/blocks/field-value/rollup-field.svelte @@ -2,18 +2,18 @@ import type { RollupField } from "@undb/table" import { isNumber } from "radash" - export let value: string | Array