feat(activities): editable stages with tab and kanban views
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1138,6 +1138,67 @@ export type ActivityStatus = "open" | "done" | "canceled";
|
||||
export type ActivityPriority = "very_low" | "low" | "medium" | "high" | "very_high";
|
||||
export type ActivityFilter = "today" | "overdue" | "upcoming" | "done" | "all";
|
||||
|
||||
export type ActivityStageColor = "green" | "orange" | "purple" | "blue" | "rose" | "slate";
|
||||
|
||||
export const ACTIVITY_STAGE_COLORS: ActivityStageColor[] = [
|
||||
"green",
|
||||
"orange",
|
||||
"purple",
|
||||
"blue",
|
||||
"rose",
|
||||
"slate",
|
||||
];
|
||||
|
||||
export const ACTIVITY_STAGE_COLOR_LABELS: Record<ActivityStageColor, string> = {
|
||||
green: "سبز",
|
||||
orange: "نارنجی",
|
||||
purple: "بنفش",
|
||||
blue: "آبی",
|
||||
rose: "قرمز",
|
||||
slate: "خاکستری",
|
||||
};
|
||||
|
||||
/** نوع مرحله = وضعیتی که فعالیت با رفتن به آن ستون میگیرد */
|
||||
export const ACTIVITY_STAGE_KIND_LABELS: Record<ActivityStatus, string> = {
|
||||
open: "باز (در جریان)",
|
||||
done: "انجامشده",
|
||||
canceled: "لغو شده",
|
||||
};
|
||||
|
||||
export interface ActivityStageDto {
|
||||
id: string;
|
||||
name: string;
|
||||
position: number;
|
||||
color: ActivityStageColor;
|
||||
kind: ActivityStatus;
|
||||
}
|
||||
|
||||
export interface CreateActivityStageRequest {
|
||||
name: string;
|
||||
color?: ActivityStageColor;
|
||||
kind?: ActivityStatus;
|
||||
}
|
||||
|
||||
export interface UpdateActivityStageRequest {
|
||||
name?: string;
|
||||
color?: ActivityStageColor;
|
||||
kind?: ActivityStatus;
|
||||
}
|
||||
|
||||
export interface ReorderActivityStagesRequest {
|
||||
stageIds: string[];
|
||||
}
|
||||
|
||||
export interface MoveActivityStageRequest {
|
||||
stageId: string;
|
||||
}
|
||||
|
||||
/** شمارش فعالیتها به تفکیک مرحله با فیلترهای فعلی */
|
||||
export interface ActivityStageCountsDto {
|
||||
counts: Record<string, number>;
|
||||
total: number;
|
||||
}
|
||||
|
||||
export type CustomFieldEntity = "person" | "company" | "deal";
|
||||
export type CustomFieldType = "text" | "number" | "date" | "boolean" | "select";
|
||||
|
||||
@@ -1204,12 +1265,16 @@ export interface ActivityDto {
|
||||
/** همه مسئولان انجام فعالیت */
|
||||
assignees: UserSummaryDto[];
|
||||
createdBy: UserSummaryDto | null;
|
||||
/** مرحلهٔ مؤثر (ستون کانبان) */
|
||||
stageId?: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface CreateActivityRequest {
|
||||
title: string;
|
||||
/** مرحلهٔ اولیه؛ وضعیت فعالیت از نوع مرحله گرفته میشود */
|
||||
stageId?: string | null;
|
||||
type?: ActivityType;
|
||||
priority?: ActivityPriority;
|
||||
description?: string;
|
||||
|
||||
Reference in New Issue
Block a user