Fix bugs and add features to Znakopis document management

- Fix API endpoint for creating pages (documents/:id/pages)
- Fix sentence deletion functionality
- Add CreateDocumentDialog component for better UX
- Improve document and sentence management UI
- Update seed data and backend routes
- Clean up documentation files (remove videos.md, videosentence.md)
- Add comprehensive bug tracking in fixbugsaddfeatures.md
This commit is contained in:
2026-01-18 15:21:23 +01:00
parent d3c90ea447
commit eab5303c0f
11 changed files with 643 additions and 869 deletions

View File

@@ -85,7 +85,7 @@ export const documentApi = {
// Create a new page in a document
async createPage(documentId: string, title?: string): Promise<DocumentPage> {
const response = await api.post(`/api/${documentId}/pages`, { title });
const response = await api.post(`/api/documents/${documentId}/pages`, { title });
return response.data.page;
},
@@ -96,7 +96,7 @@ export const documentApi = {
data: CreateSentenceData
): Promise<Sentence> {
const response = await api.post(
`/api/${documentId}/pages/${pageIndex}/sentences`,
`/api/documents/${documentId}/pages/${pageIndex}/sentences`,
data
);
return response.data.sentence;