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 = {
category: true,
assignee: userSelect,
createdBy: userSelect,
team: { select: { id: true, name: true } },
} satisfies Prisma.RoutineInclude;
@@ -186,6 +187,7 @@ export function toRoutineDto(
reminderMinutesBefore: row.reminderMinutesBefore,
isActive: row.isActive,
createdById: row.createdById,
createdBy: row.createdBy,
recurrenceLabel: describeRecurrence(rule),
executionRate: execution.total ? Math.round((execution.done / execution.total) * 100) : null,
executionTotal: execution.total,
@@ -259,6 +259,7 @@ const teams = computed(() => shell.context.value?.teams ?? []);
<tr>
<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 }}
</span>
</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">{{ toFaDigits(r.timeOfDay) }}</td>
<td>
+1
View File
@@ -6549,6 +6549,7 @@ export interface RoutineDto {
isActive: boolean;
/** سازندهٔ روتین؛ عضو عادی فقط روتین خودش را ویرایش می‌کند */
createdById: string | null;
createdBy: UserSummaryDto | null;
recurrenceLabel: string;
/** درصد اجرا در ۳۰ روز اخیر */
executionRate: number | null;