WIP - related lists and look up field

This commit is contained in:
Francisco Gaona
2025-12-23 23:59:04 +01:00
parent 0275b96014
commit fc1bec4de7
11 changed files with 774 additions and 12 deletions

View File

@@ -81,6 +81,20 @@ const handleDelete = async (rows: any[]) => {
}
}
// Handle navigation to related records
const handleNavigate = (objectApiName: string, recordId: string) => {
router.push(`/central/${objectApiName}/${recordId}/detail`)
}
// Handle creating related records
const handleCreateRelated = (objectApiName: string, parentId: string) => {
// Navigate to create page with parent context
router.push({
path: `/central/${objectApiName}/new`,
query: { tenantId: parentId }
})
}
const handleSaveRecord = async (data: any) => {
try {
const savedRecord = await handleSave(data)
@@ -137,6 +151,8 @@ onMounted(async () => {
@edit="handleEdit"
@delete="() => handleDelete([currentRecord])"
@back="handleBack"
@navigate="handleNavigate"
@create-related="handleCreateRelated"
/>
<!-- Edit View -->