You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There should be a central place/file that contains all necessary functionalities (i.e. CRUD support). This should/could be similar to the implementations within the other BEXIS2 UI projects. In general, each of those projects contain several Service.ts files which contain/implement that functions. Please check out some of that projects to get an idea of "how to implement it...".
BEXIS2 Web Shell UI Services - within the directory, you will find services related to settings and versions (for different website parts - database, workspace, site).
In your case, the service class should implement all necessary functions related to entries and notes. Also, it makes much more sense to get started with the creation and continue with retrieval and deletion. Otherwise, you would need to mock existing entries to get/retrieve them. But in general, the services need to contain/support the following methods/functions:
Entry
get (all) entries
get an entry by its identifier
add/create an entry
update an entry
delete/remove an entry
Note
get (all) notes
get (all) notes that belong to a specific entry (get notes by its entry identifier)
add a note
update a note
delete/remove a note
e.g., messageStore.update((storedMessages: Message[]) => [...storedMessages, newMessage]); -> move to central file
In addition, please choose and use appropriate parameters for the different implementations. E.g., there could be support of primitive parameters (int, string,...) or complex objects.
The text was updated successfully, but these errors were encountered:
…ing its functionality for both users and curators. Notable changes include the ability to create, retrieve, update, and delete chat entries using a backend API. Local data storage has been implemented to handle scenarios where the API is inaccessible, ensuring a seamless experience for users.
#16
1. **API Integration:**
- The `ChatService` module now supports creating, retrieving, updating, and deleting chat entries through API calls.
- The `fetchEntryById` function has been added to fetch entry details by ID.
2. **EntryService Updates:**
- The `EntryService` module includes functions for creating, retrieving, updating, and deleting entries, offering a comprehensive set of operations.
- The `createEntry` function now accepts `userId` and `curatorId` as parameters, associating them with the created entry.
3. **User and Curator Chat Components:**
- Both the UserChat and CuratorChat Svelte components have been updated to showcase the new functionality.
- The UserChat component demonstrates creating a new message and fetching an entry by ID.
- The CuratorChat component illustrates updating an existing entry after fetching its details.
4. **Local Data Storage:**
- A `LocalStorageService` has been introduced to handle local data storage operations.
- When the API is unreachable, the `createEntry` function stores data locally, ensuring a smooth user experience.
5. **EntryModel Updates:**
- The `EntryModel` in entryModels.ts now includes `userId` and `curatorId` properties.
6. **Code Internationalization:**
- All code files, including entryModels.ts, EntryService.ts, ChatService.ts, and LocalStorageService.ts, now contain English comments to facilitate international understanding.
7. **Testing:**
- The changes have been thoroughly tested to ensure proper functionality and error handling.
There should be a central place/file that contains all necessary functionalities (i.e. CRUD support). This should/could be similar to the implementations within the other BEXIS2 UI projects. In general, each of those projects contain several Service.ts files which contain/implement that functions. Please check out some of that projects to get an idea of "how to implement it...".
BEXIS2 Web Shell UI Services - within the directory, you will find services related to settings and versions (for different website parts - database, workspace, site).
In your case, the service class should implement all necessary functions related to entries and notes. Also, it makes much more sense to get started with the creation and continue with retrieval and deletion. Otherwise, you would need to mock existing entries to get/retrieve them. But in general, the services need to contain/support the following methods/functions:
Entry
Note
e.g., messageStore.update((storedMessages: Message[]) => [...storedMessages, newMessage]); -> move to central file
In addition, please choose and use appropriate parameters for the different implementations. E.g., there could be support of primitive parameters (int, string,...) or complex objects.
The text was updated successfully, but these errors were encountered: