Split categories and bookmarks forms into separate files. Added visibility functionality to categories and bookmarks

This commit is contained in:
Paweł Malak
2021-11-09 23:40:58 +01:00
parent f127a354ef
commit d83e3056c6
16 changed files with 484 additions and 369 deletions

View File

@@ -11,7 +11,7 @@ export const appTemplate: App = {
...newAppTemplate,
isPinned: false,
orderId: 0,
id: 0,
id: -1,
createdAt: new Date(),
updatedAt: new Date(),
};

View File

@@ -0,0 +1,16 @@
import { Bookmark, NewBookmark } from '../../interfaces';
export const newBookmarkTemplate: NewBookmark = {
name: '',
url: '',
categoryId: -1,
icon: '',
isPublic: true,
};
export const bookmarkTemplate: Bookmark = {
...newBookmarkTemplate,
id: -1,
createdAt: new Date(),
updatedAt: new Date(),
};

View File

@@ -0,0 +1,16 @@
import { Category, NewCategory } from '../../interfaces';
export const newCategoryTemplate: NewCategory = {
name: '',
isPublic: true,
};
export const categoryTemplate: Category = {
...newCategoryTemplate,
id: -1,
isPinned: false,
orderId: 0,
bookmarks: [],
createdAt: new Date(),
updatedAt: new Date(),
};

View File

@@ -1,3 +1,5 @@
export * from './configTemplate';
export * from './settingsTemplate';
export * from './appTemplate';
export * from './categoryTemplate';
export * from './bookmarkTemplate';