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:
@@ -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[];
|
||||
|
||||
Reference in New Issue
Block a user