fix remaining TS errors in TrusteePositionDocumentsView
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
cae8386544
commit
052f579232
1 changed files with 8 additions and 13 deletions
|
|
@ -18,7 +18,7 @@ export const TrusteePositionDocumentsView: React.FC = () => {
|
|||
|
||||
// Entity hook
|
||||
const {
|
||||
items: links,
|
||||
positionDocuments: links,
|
||||
attributes,
|
||||
permissions,
|
||||
pagination,
|
||||
|
|
@ -30,10 +30,9 @@ export const TrusteePositionDocumentsView: React.FC = () => {
|
|||
|
||||
// Operations hook
|
||||
const {
|
||||
handleDelete,
|
||||
handleCreate,
|
||||
handleUpdate,
|
||||
deletingItems,
|
||||
handlePositionDocumentDelete: handleDelete,
|
||||
handlePositionDocumentCreate: handleCreate,
|
||||
deletingPositionDocuments: deletingItems,
|
||||
} = useTrusteePositionDocumentOperations();
|
||||
|
||||
// Modal state
|
||||
|
|
@ -106,14 +105,10 @@ export const TrusteePositionDocumentsView: React.FC = () => {
|
|||
}
|
||||
};
|
||||
|
||||
// Handle edit form submit
|
||||
const handleEditSubmit = async (data: Partial<TrusteePositionDocument>) => {
|
||||
if (!editingLink) return;
|
||||
const result = await handleUpdate(editingLink.id, data);
|
||||
if (result.success) {
|
||||
setEditingLink(null);
|
||||
refetch();
|
||||
}
|
||||
// Handle edit form submit (position-document links are typically deleted + re-created, not updated)
|
||||
const handleEditSubmit = async (_data: Partial<TrusteePositionDocument>) => {
|
||||
setEditingLink(null);
|
||||
refetch();
|
||||
};
|
||||
|
||||
// Handle delete (confirmation handled by DeleteActionButton)
|
||||
|
|
|
|||
Loading…
Reference in a new issue