feat: activity assignment + team view for owner/admin
db: activities.assigneeId column (string, optional) activity-actions: assigneeId saved on create (default: self), cleared on update validation: assigneeId added to activitySchema schema: assigneeId field on Activity type activity-form-sheet: Atanan Kişi dropdown for owner/admin with member list activity-team-view: new component — activities grouped by assignee, completion/edit/delete actions, overdue indicator, member avatars activities-client: Ekip tab (owner/admin only), members + currentUserId props activities page: fetches team memberships + user details, passes to client activity-email-actions: filter by assigneeId ?? createdBy for both me/team modes
This commit is contained in:
@@ -53,7 +53,9 @@ export async function sendDailySummaryAction(
|
||||
});
|
||||
|
||||
if (target === "me") {
|
||||
const mine = todayActivities.filter((a) => a.createdBy === ctx.user.id);
|
||||
const mine = todayActivities.filter(
|
||||
(a) => (a.assigneeId ?? a.createdBy) === ctx.user.id,
|
||||
);
|
||||
if (mine.length === 0) {
|
||||
return { ok: false, error: "Bugün için planlanmış aktiviteniz bulunmuyor." };
|
||||
}
|
||||
@@ -75,7 +77,9 @@ export async function sendDailySummaryAction(
|
||||
for (const m of membershipsResult.memberships) {
|
||||
if (!m.userId || !m.confirm) continue;
|
||||
|
||||
const memberActivities = todayActivities.filter((a) => a.createdBy === m.userId);
|
||||
const memberActivities = todayActivities.filter(
|
||||
(a) => (a.assigneeId ?? a.createdBy) === m.userId,
|
||||
);
|
||||
if (memberActivities.length === 0) continue;
|
||||
|
||||
const member = await users.get(m.userId).catch(() => null);
|
||||
|
||||
Reference in New Issue
Block a user