Show routine creator in the manage list so managers can see who defined each routine.

EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-14 20:07:41 +03:30
co-authored by Cursor
parent 717a41e94b
commit 54d360ded8
3 changed files with 11 additions and 0 deletions
+2
View File
@@ -41,6 +41,7 @@ export type RoutineTaskRow = Prisma.RoutineTaskGetPayload<{
export const routineInclude = { export const routineInclude = {
category: true, category: true,
assignee: userSelect, assignee: userSelect,
createdBy: userSelect,
team: { select: { id: true, name: true } }, team: { select: { id: true, name: true } },
} satisfies Prisma.RoutineInclude; } satisfies Prisma.RoutineInclude;
@@ -186,6 +187,7 @@ export function toRoutineDto(
reminderMinutesBefore: row.reminderMinutesBefore, reminderMinutesBefore: row.reminderMinutesBefore,
isActive: row.isActive, isActive: row.isActive,
createdById: row.createdById, createdById: row.createdById,
createdBy: row.createdBy,
recurrenceLabel: describeRecurrence(rule), recurrenceLabel: describeRecurrence(rule),
executionRate: execution.total ? Math.round((execution.done / execution.total) * 100) : null, executionRate: execution.total ? Math.round((execution.done / execution.total) * 100) : null,
executionTotal: execution.total, executionTotal: execution.total,
@@ -259,6 +259,7 @@ const teams = computed(() => shell.context.value?.teams ?? []);
<tr> <tr>
<th>عنوان</th> <th>عنوان</th>
<th>مسئول</th> <th>مسئول</th>
<th>سازنده</th>
<th>تکرار</th> <th>تکرار</th>
<th>ساعت</th> <th>ساعت</th>
<th>وضعیت</th> <th>وضعیت</th>
@@ -288,6 +289,13 @@ const teams = computed(() => shell.context.value?.teams ?? []);
{{ r.assignee.fullName }} {{ r.assignee.fullName }}
</span> </span>
</td> </td>
<td>
<span v-if="r.createdBy" class="who-cell">
<UserAvatar :name="r.createdBy.fullName" :user-id="r.createdBy.id" :size="24" />
{{ r.createdBy.fullName }}
</span>
<span v-else>—</span>
</td>
<td class="nowrap">{{ r.recurrenceLabel }}</td> <td class="nowrap">{{ r.recurrenceLabel }}</td>
<td class="nowrap">{{ toFaDigits(r.timeOfDay) }}</td> <td class="nowrap">{{ toFaDigits(r.timeOfDay) }}</td>
<td> <td>
+1
View File
@@ -6549,6 +6549,7 @@ export interface RoutineDto {
isActive: boolean; isActive: boolean;
/** سازندهٔ روتین؛ عضو عادی فقط روتین خودش را ویرایش می‌کند */ /** سازندهٔ روتین؛ عضو عادی فقط روتین خودش را ویرایش می‌کند */
createdById: string | null; createdById: string | null;
createdBy: UserSummaryDto | null;
recurrenceLabel: string; recurrenceLabel: string;
/** درصد اجرا در ۳۰ روز اخیر */ /** درصد اجرا در ۳۰ روز اخیر */
executionRate: number | null; executionRate: number | null;