forked from Lumina-eX/TaskChain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplates.ts
More file actions
24 lines (23 loc) · 1.23 KB
/
Copy pathtemplates.ts
File metadata and controls
24 lines (23 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { NotificationType, NotificationTemplate } from './types';
export const templates: Record<NotificationType, (data: any) => NotificationTemplate> = {
milestone_submitted: (data: { jobTitle: string; freelancerName: string }) => ({
title: 'Milestone Submitted',
message: `${data.freelancerName} has submitted a milestone for "${data.jobTitle}".`,
}),
funds_released: (data: { jobTitle: string; amount: string; currency: string }) => ({
title: 'Funds Released',
message: `Payment of ${data.amount} ${data.currency} for "${data.jobTitle}" has been released to your wallet.`,
}),
dispute_opened: (data: { jobTitle: string; reason: string }) => ({
title: 'Dispute Opened',
message: `A dispute has been opened for "${data.jobTitle}". Reason: ${data.reason}`,
}),
wallet_activity: (data: { action: string; amount: string; currency: string }) => ({
title: 'Wallet Activity',
message: `New activity detected: ${data.action} of ${data.amount} ${data.currency}.`,
}),
funds_received: (data: { jobTitle: string; amount: string; currency: string }) => ({
title: 'Funds Received in Escrow',
message: `A deposit of ${data.amount} ${data.currency} for "${data.jobTitle}" has been confirmed in escrow.`,
}),
};