Remove readonly

This commit is contained in:
Adria Navarro 2024-05-29 16:01:11 +02:00
parent 151ff27351
commit 06549149b6
1 changed files with 1 additions and 8 deletions

View File

@ -13,9 +13,8 @@
const toggleColumn = async (column, permission) => {
const visible = permission !== PERMISSION_OPTIONS.HIDDEN
const readonly = permission === PERMISSION_OPTIONS.READONLY
datasource.actions.addSchemaMutation(column.name, { visible, readonly })
datasource.actions.addSchemaMutation(column.name, { visible })
await datasource.actions.saveSchemaMutations()
dispatch(visible ? "show-column" : "hide-column")
}
@ -27,13 +26,11 @@
const PERMISSION_OPTIONS = {
WRITABLE: "writable",
READONLY: "readonly",
HIDDEN: "hidden",
}
const options = [
{ icon: "Edit", value: PERMISSION_OPTIONS.WRITABLE },
{ icon: "Visibility", value: PERMISSION_OPTIONS.READONLY },
{ icon: "VisibilityOff", value: PERMISSION_OPTIONS.HIDDEN },
]
@ -42,10 +39,6 @@
return PERMISSION_OPTIONS.HIDDEN
}
if (column.readonly) {
return PERMISSION_OPTIONS.READONLY
}
return PERMISSION_OPTIONS.WRITABLE
}
</script>