1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 18:29:23 +00:00

feat: metadata editor(number、single select、collaborator) (#6385)

* feat: metadata editor(number、single select)

* feat: optimize code

* feat: optimize code

* feat: add checkbox editor

* feat: optimzie code

* feat: delete code

* feat: optimzie code

* feat: optimzie eslint

---------

Co-authored-by: 杨国璇 <ygx@Hello-word.local>
This commit is contained in:
杨国璇
2024-07-25 16:42:18 +08:00
committed by GitHub
parent 24ad6cda3e
commit 8a5bcf1c14
79 changed files with 3128 additions and 612 deletions

View File

@@ -91,6 +91,10 @@ class Context {
return true;
};
canModifyColumn = (column) => {
return true;
};
getPermission = () => {
return 'rw';
};
@@ -115,10 +119,24 @@ class Context {
// todo
};
// column
insertColumn = (repoId, name, type, { key, data }) => {
return this.metadataAPI.insertColumn(repoId, name, type, { key, data });
};
deleteColumn = (repoId, columnKey) => {
return this.metadataAPI.deleteColumn(repoId, columnKey);
};
renameColumn = (repoId, columnKey, name) => {
return this.metadataAPI.renameColumn(repoId, columnKey, name);
};
modifyColumnData = (repoId, columnKey, data) => {
return this.metadataAPI.modifyColumnData(repoId, columnKey, data);
};
// record
modifyRecord = (repoId, recordId, columnName, value) => {
return this.metadataAPI.modifyRecord(repoId, recordId, columnName, value);
};
@@ -127,6 +145,7 @@ class Context {
return this.metadataAPI.modifyRecords(repoId, recordsData, isCopyPaste);
};
// view
modifyView = (repoId, viewId, viewData) => {
return this.metadataAPI.modifyView(repoId, viewId, viewData);
};