2 Commits

Author SHA1 Message Date
Francisco Gaona
352f83fec6 WIP 2025-12-23 09:07:53 +01:00
Francisco Gaona
7b849f1615 WIP - quick fix to page layout grid 2025-12-23 05:56:28 +01:00
2 changed files with 5 additions and 23 deletions

View File

@@ -1,15 +1,14 @@
<template>
<div class="page-layout-renderer">
<div class="page-layout-renderer w-full">
<div
v-if="layout && layout.fields.length > 0"
class="grid gap-4"
:style="gridStyle"
class="grid grid-cols-6 gap-4 auto-rows-[80px]"
>
<div
v-for="fieldItem in sortedFields"
:key="fieldItem.fieldId"
:style="getFieldStyle(fieldItem)"
class="field-container"
class="flex flex-col min-h-[60px]"
>
<FieldRenderer
v-if="fieldItem.field"
@@ -26,7 +25,7 @@
<div
v-for="field in fields"
:key="field.id"
class="field-container"
class="flex flex-col min-h-[60px]"
>
<FieldRenderer
:field="field"
@@ -57,14 +56,6 @@ const emit = defineEmits<{
'update:modelValue': [value: Record<string, any>]
}>()
// Grid configuration for 6 columns
const GRID_COLUMNS = 6
const gridStyle = computed(() => ({
display: 'grid',
gridTemplateColumns: `repeat(${GRID_COLUMNS}, 1fr)`,
gap: '1rem',
}))
// Map field IDs to field objects and sort by position
const sortedFields = computed(() => {
if (!props.layout || !props.layout.fields) return []
@@ -106,13 +97,5 @@ const handleFieldUpdate = (fieldName: string, value: any) => {
</script>
<style scoped>
.page-layout-renderer {
width: 100%;
}
.field-container {
min-height: 60px;
display: flex;
flex-direction: column;
}
/* Additional styles if needed */
</style>

View File

@@ -297,7 +297,6 @@ onMounted(async () => {
<style scoped>
.object-view-container {
min-height: 100vh;
padding: 2rem;
}
</style>