Add support for syncing tool settings with lastUpdate and improve consistency
- Introduced `lastUpdate` field in `book_tools` for tracking changes. - Refactored tool enablement logic in `CharacterComponent`, `WorldSetting`, and `LocationComponent` for consistency. - Updated database schema and migration scripts for `book_tools` table. - Enhanced synchronization workflows to support new `lastUpdate` logic. - Adjusted related models, repositories, and IPC handlers for streamlined management. - Improved type safety and robustness in tool-related methods with additional checks.
This commit is contained in:
@@ -156,16 +156,16 @@ export const bookTypes: SelectBoxProps[] = [
|
||||
export default class Book {
|
||||
constructor() {
|
||||
}
|
||||
|
||||
|
||||
static booksToSelectBox(books: SyncedBook[]): SelectBoxProps[] {
|
||||
return books.map((book: SyncedBook):SelectBoxProps => {
|
||||
return books.map((book: SyncedBook): SelectBoxProps => {
|
||||
return {
|
||||
label: book.title,
|
||||
value: book.id,
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
static getBookTypeLabel(value: string): string {
|
||||
switch (value) {
|
||||
case 'short':
|
||||
|
||||
Reference in New Issue
Block a user