WIP - remove console logs

This commit is contained in:
Francisco Gaona
2025-12-28 07:20:58 +01:00
parent 9aeb6d2b6f
commit 868ce596ba
2 changed files with 0 additions and 16 deletions

View File

@@ -213,8 +213,6 @@ export const useViewState = <T extends { id?: string }>(
const response = await api.get(`${apiEndpoint}/${id}`)
// Handle response - data might be directly in response or in response.data
currentRecord.value = response.data || response
console.log('[fetchRecord] Fetched record:', JSON.stringify(currentRecord.value, null, 2))
console.log('[fetchRecord] Record has id?', currentRecord.value?.id)
} catch (e: any) {
error.value = e.message
// Only log unexpected errors (not authorization failures)

View File

@@ -120,7 +120,6 @@ const detailConfig = computed(() => {
const editConfig = computed(() => {
if (!objectDefinition.value) return null
const config = buildEditViewConfig(objectDefinition.value)
console.log('[PAGE] editConfig computed:', config ? 'EXISTS' : 'NULL')
return config
})
@@ -129,22 +128,9 @@ const editConfig = computed(() => {
const canCreate = computed(() => {
const publicCreate = objectAccess.value?.publicCreate
const result = publicCreate === true || publicCreate === 1
console.log('[PAGE] canCreate computed:', result, '(publicCreate:', publicCreate, 'type:', typeof publicCreate, ')')
return result
})
// Debug current view state
watch([view, recordId, editConfig, currentRecord, loading, dataLoading], ([v, rid, ec, cr, l, dl]) => {
console.log('[PAGE] View state changed:')
console.log(' - view:', v)
console.log(' - recordId:', rid)
console.log(' - editConfig exists?', !!ec)
console.log(' - currentRecord exists?', !!cr)
console.log(' - loading:', l)
console.log(' - dataLoading:', dl)
console.log(' - Should show EditView?', (v === 'edit' || rid === 'new') && !!ec)
}, { immediate: true })
// Fetch object definition
const fetchObjectDefinition = async () => {
try {