Geburtstag-Management-Modal mit Reset + Send + Auto-Flag
Neuer Cake-Button neben dem Geburtsdatum in den Stammdaten öffnet ein Modal mit drei Funktionen: 1. **Gruß-Marker zurücksetzen** (lastBirthdayGreetingYear → null) - Für Debugging oder als Fallback, wenn der Kunde den Gruß erneut sehen soll - Mit Bestätigungsdialog 2. **Geburtstagsgruß jetzt senden** (Email / WhatsApp / Telegram / Signal) - Email: direkt via System-SMTP mit HTML-Template (Du/Sie-abhängig) - WhatsApp/Telegram/Signal: öffnet vorbefülltes Fenster mit Gruß-Text - Text beachtet Du/Sie-Verhältnis (pronomen, possessiv, etc.) - Mit Bestätigungsdialog 3. **Automatisch senden** – neue Einstellung am Customer - autoBirthdayGreeting (Boolean) + autoBirthdayChannel (String) - Für späteren Cron-basierten Automatik-Versand vorbereitet Backend: - birthday.service.ts: resetBirthdayGreeting, buildBirthdayGreetingText, getBirthdayGreetingData - birthday.controller.ts: resetBirthdayGreeting, sendBirthdayGreeting - Routes: POST /birthdays/:customerId/reset + /send - Audit-Log bei beiden Aktionen Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1620,6 +1620,17 @@ export const birthdayApi = {
|
||||
const res = await api.post<ApiResponse<void>>('/birthdays/my-birthday/acknowledge');
|
||||
return res.data;
|
||||
},
|
||||
resetGreeting: async (customerId: number) => {
|
||||
const res = await api.post<ApiResponse<void>>(`/birthdays/${customerId}/reset`);
|
||||
return res.data;
|
||||
},
|
||||
sendGreeting: async (customerId: number, channel: 'email' | 'whatsapp' | 'telegram' | 'signal') => {
|
||||
const res = await api.post<ApiResponse<{ channel: string; messageText: string }>>(
|
||||
`/birthdays/${customerId}/send`,
|
||||
{ channel },
|
||||
);
|
||||
return res.data;
|
||||
},
|
||||
};
|
||||
|
||||
export default api;
|
||||
|
||||
Reference in New Issue
Block a user