Add personal/team note visibility and edit history.

Notes can be marked personal or team, with revision snapshots and restore from the notes UI.
This commit is contained in:
2026-09-27 13:19:08 +03:30
parent 55a287563d
commit 00f8b91d78
12 changed files with 655 additions and 22 deletions
+27
View File
@@ -991,6 +991,8 @@ export interface NoteDto {
title: string | null;
body: string;
noteType: NoteType | string;
/** team = تیمی | personal = فقط نویسنده */
visibility: NoteVisibility;
pinned: boolean;
color: string | null;
tags: string[];
@@ -1004,14 +1006,38 @@ export interface NoteDto {
activity: { id: string; title: string } | null;
author: UserSummaryDto | null;
attachments: NoteAttachmentDto[];
/** تعداد نسخه‌های قبلی (برای نمایش دکمه تاریخچه) */
revisionCount?: number;
createdAt: string;
updatedAt: string;
}
export type NoteVisibility = "team" | "personal";
export const NOTE_VISIBILITIES: NoteVisibility[] = ["team", "personal"];
export const NOTE_VISIBILITY_LABELS: Record<NoteVisibility, string> = {
team: "تیمی",
personal: "شخصی (فقط من)",
};
export interface NoteRevisionDto {
id: string;
title: string | null;
body: string;
noteType: string;
visibility: NoteVisibility;
tags: string[];
checklist: NoteChecklistItemDto[];
editor: UserSummaryDto | null;
createdAt: string;
}
export interface CreateNoteRequest {
title?: string;
body: string;
noteType?: NoteType | string;
visibility?: NoteVisibility;
pinned?: boolean;
color?: string;
tags?: string[];
@@ -1029,6 +1055,7 @@ export interface UpdateNoteRequest {
title?: string | null;
body?: string;
noteType?: NoteType | string;
visibility?: NoteVisibility;
pinned?: boolean;
color?: string | null;
tags?: string[];