feat(knowledge): add noteType field to Note model, api, repository, provider
This commit is contained in:
@@ -17,10 +17,14 @@ class NotesNotifier extends AsyncNotifier<List<Note>> {
|
||||
String body, {
|
||||
List<String> tags = const [],
|
||||
int? projectId,
|
||||
String noteType = 'note',
|
||||
}) async {
|
||||
final note = await ref
|
||||
.read(notesRepositoryProvider)
|
||||
.create(title, body, tags: tags, projectId: projectId);
|
||||
final note = await ref.read(notesRepositoryProvider).create(
|
||||
title, body,
|
||||
tags: tags,
|
||||
projectId: projectId,
|
||||
noteType: noteType,
|
||||
);
|
||||
state = AsyncData([...state.value ?? [], note]);
|
||||
return note;
|
||||
}
|
||||
@@ -32,6 +36,7 @@ class NotesNotifier extends AsyncNotifier<List<Note>> {
|
||||
List<String> tags = const [],
|
||||
int? projectId,
|
||||
bool clearProject = false,
|
||||
String noteType = 'note',
|
||||
}) async {
|
||||
final updated = await ref.read(notesRepositoryProvider).update(
|
||||
id,
|
||||
@@ -40,6 +45,7 @@ class NotesNotifier extends AsyncNotifier<List<Note>> {
|
||||
tags: tags,
|
||||
projectId: projectId,
|
||||
clearProject: clearProject,
|
||||
noteType: noteType,
|
||||
);
|
||||
state = AsyncData([
|
||||
for (final n in state.value ?? [])
|
||||
|
||||
Reference in New Issue
Block a user