|
|
@ -434,27 +434,26 @@ const [useProvideViewColumns, useViewColumns] = useInjectionState( |
|
|
|
scope: defineViewScope({ view: view.value }), |
|
|
|
scope: defineViewScope({ view: view.value }), |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
// sync with server if allowed
|
|
|
|
// sync with server if allowed
|
|
|
|
if (!isPublic.value && isUIAllowed('viewFieldEdit') && gridViewCols.value[id]?.id) { |
|
|
|
if (!isPublic.value && isUIAllowed('viewFieldEdit') && gridViewCols.value[id]?.id) { |
|
|
|
await $api.dbView.gridColumnUpdate(gridViewCols.value[id].id as string, { |
|
|
|
await $api.dbView.gridColumnUpdate(gridViewCols.value[id].id as string, { |
|
|
|
...props, |
|
|
|
...props, |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (gridViewCols.value?.[id]) { |
|
|
|
|
|
|
|
Object.assign(gridViewCols.value[id], { |
|
|
|
|
|
|
|
...gridViewCols.value[id], |
|
|
|
|
|
|
|
...props, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// fallback to reload
|
|
|
|
|
|
|
|
await loadViewColumns() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}catch (e) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (gridViewCols.value?.[id]) { |
|
|
|
|
|
|
|
Object.assign(gridViewCols.value[id], { |
|
|
|
|
|
|
|
...gridViewCols.value[id], |
|
|
|
|
|
|
|
...props, |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
// fallback to reload
|
|
|
|
|
|
|
|
await loadViewColumns() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} catch (e) { |
|
|
|
|
|
|
|
console.error(e) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
watch( |
|
|
|
watch( |
|
|
|