mirror of
https://github.com/docmost/docmost.git
synced 2026-08-30 02:25:01 +08:00
fix(base): sync client SYSTEM_PROPERTY_TYPES with server (add formula)
This commit is contained in:
@@ -27,7 +27,15 @@ const MIN_COLUMN_WIDTH = 80;
|
|||||||
const MAX_COLUMN_WIDTH = 600;
|
const MAX_COLUMN_WIDTH = 600;
|
||||||
const ROW_NUMBER_COLUMN_WIDTH = 64;
|
const ROW_NUMBER_COLUMN_WIDTH = 64;
|
||||||
|
|
||||||
export const SYSTEM_PROPERTY_TYPES = new Set(["createdAt", "lastEditedAt", "lastEditedBy"]);
|
// Keep in sync with the server's SYSTEM_PROPERTY_TYPES in
|
||||||
|
// apps/server/src/core/base/base.schemas.ts. Both sets must include
|
||||||
|
// formula so the property menu treats formula columns as read-only.
|
||||||
|
export const SYSTEM_PROPERTY_TYPES = new Set([
|
||||||
|
"createdAt",
|
||||||
|
"lastEditedAt",
|
||||||
|
"lastEditedBy",
|
||||||
|
"formula",
|
||||||
|
]);
|
||||||
|
|
||||||
export function isSystemPropertyType(type: string): boolean {
|
export function isSystemPropertyType(type: string): boolean {
|
||||||
return SYSTEM_PROPERTY_TYPES.has(type);
|
return SYSTEM_PROPERTY_TYPES.has(type);
|
||||||
|
|||||||
Reference in New Issue
Block a user