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
|
// Entity hook
|
||||||
const {
|
const {
|
||||||
items: links,
|
positionDocuments: links,
|
||||||
attributes,
|
attributes,
|
||||||
permissions,
|
permissions,
|
||||||
pagination,
|
pagination,
|
||||||
|
|
@ -30,10 +30,9 @@ export const TrusteePositionDocumentsView: React.FC = () => {
|
||||||
|
|
||||||
// Operations hook
|
// Operations hook
|
||||||
const {
|
const {
|
||||||
handleDelete,
|
handlePositionDocumentDelete: handleDelete,
|
||||||
handleCreate,
|
handlePositionDocumentCreate: handleCreate,
|
||||||
handleUpdate,
|
deletingPositionDocuments: deletingItems,
|
||||||
deletingItems,
|
|
||||||
} = useTrusteePositionDocumentOperations();
|
} = useTrusteePositionDocumentOperations();
|
||||||
|
|
||||||
// Modal state
|
// Modal state
|
||||||
|
|
@ -106,14 +105,10 @@ export const TrusteePositionDocumentsView: React.FC = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handle edit form submit
|
// Handle edit form submit (position-document links are typically deleted + re-created, not updated)
|
||||||
const handleEditSubmit = async (data: Partial<TrusteePositionDocument>) => {
|
const handleEditSubmit = async (_data: Partial<TrusteePositionDocument>) => {
|
||||||
if (!editingLink) return;
|
|
||||||
const result = await handleUpdate(editingLink.id, data);
|
|
||||||
if (result.success) {
|
|
||||||
setEditingLink(null);
|
setEditingLink(null);
|
||||||
refetch();
|
refetch();
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handle delete (confirmation handled by DeleteActionButton)
|
// Handle delete (confirmation handled by DeleteActionButton)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue