/** * Source-of-truth: time-entry-approved email template. * * Uses the shared email layout wrapper. Body content is built from * per-language translated strings so that only text differs between locales. */ const { wrapEmailLayout } = require('../../_shared/emailLayout.cjs'); const { BRAND_PRIMARY } = require('../../_shared/constants.cjs'); const TEMPLATE_NAME = 'time-entry-approved'; const SUBTYPE_NAME = 'Time Entry Approved'; const SUBJECTS = { en: 'Time Entry Approved', fr: 'Saisie de temps approuv\u00e9e', es: 'Registro de tiempo aprobado', de: 'Zeiteintrag genehmigt', nl: 'Tijdregistratie goedgekeurd', it: 'Voce di tempo approvata', pl: 'Wpis czasu zatwierdzony', }; /* eslint-disable max-len */ const COPY = { en: { headerLabel: 'Time Entry Approved', intro: 'Your time entry has been approved.', date: 'Date', duration: 'Duration', project: 'Project', task: 'Task', approvedBy: 'Approved By', viewButton: 'View Time Entry', footer: 'Powered by Alga PSA · Keeping teams aligned', textHeader: 'Time Entry Approved', textIntro: 'Your time entry has been approved:', textView: 'View time entry at', }, fr: { headerLabel: 'Saisie de temps approuv\u00e9e', intro: 'Votre saisie de temps a \u00e9t\u00e9 approuv\u00e9e.', date: 'Date', duration: 'Dur\u00e9e', project: 'Projet', task: 'T\u00e2che', approvedBy: 'Approuv\u00e9e par', viewButton: 'Voir la saisie', footer: 'Powered by Alga PSA · Gardons les \u00e9quipes align\u00e9es', textHeader: 'Saisie de temps approuv\u00e9e', textIntro: 'Votre saisie de temps a \u00e9t\u00e9 approuv\u00e9e :', textView: 'Voir la saisie sur', }, es: { headerLabel: 'Registro de tiempo aprobado', intro: 'Su registro de tiempo ha sido aprobado.', date: 'Fecha', duration: 'Duraci\u00f3n', project: 'Proyecto', task: 'Tarea', approvedBy: 'Aprobado por', viewButton: 'Ver registro', footer: 'Powered by Alga PSA · Manteniendo a los equipos alineados', textHeader: 'Registro de tiempo aprobado', textIntro: 'Su registro de tiempo ha sido aprobado:', textView: 'Ver registro en', }, de: { headerLabel: 'Zeiteintrag genehmigt', intro: 'Ihr Zeiteintrag wurde genehmigt.', date: 'Datum', duration: 'Dauer', project: 'Projekt', task: 'Aufgabe', approvedBy: 'Genehmigt von', viewButton: 'Zeiteintrag anzeigen', footer: 'Powered by Alga PSA · Teams auf Kurs halten', textHeader: 'Zeiteintrag genehmigt', textIntro: 'Ihr Zeiteintrag wurde genehmigt:', textView: 'Zeiteintrag anzeigen unter', }, nl: { headerLabel: 'Tijdregistratie goedgekeurd', intro: 'Uw tijdregistratie is goedgekeurd.', date: 'Datum', duration: 'Duur', project: 'Project', task: 'Taak', approvedBy: 'Goedgekeurd door', viewButton: 'Tijdregistratie bekijken', footer: 'Powered by Alga PSA · Teams op \u00e9\u00e9n lijn houden', textHeader: 'Tijdregistratie goedgekeurd', textIntro: 'Uw tijdregistratie is goedgekeurd:', textView: 'Tijdregistratie bekijken op', }, it: { headerLabel: 'Voce di tempo approvata', intro: 'La Sua voce di tempo \u00e8 stata approvata.', date: 'Data', duration: 'Durata', project: 'Progetto', task: 'Attivit\u00e0', approvedBy: 'Approvata da', viewButton: 'Visualizza voce di tempo', footer: 'Powered by Alga PSA · Manteniamo i team allineati', textHeader: 'Voce di tempo approvata', textIntro: 'La Sua voce di tempo \u00e8 stata approvata:', textView: 'Visualizza la voce di tempo su', }, pl: { headerLabel: 'Wpis czasu zatwierdzony', intro: 'Twój wpis czasu zosta\u0142 zatwierdzony.', date: 'Data', duration: 'Czas trwania', project: 'Projekt', task: 'Zadanie', approvedBy: 'Zatwierdzi\u0142(a)', viewButton: 'Zobacz wpis czasu', footer: 'Powered by Alga PSA', textHeader: 'Wpis czasu zatwierdzony', textIntro: 'Twój wpis czasu zosta\u0142 zatwierdzony:', textView: 'Zobacz wpis czasu na', }, }; /* eslint-enable max-len */ function buildBodyHtml(c) { return `
${c.intro}
| ${c.date} | {{timeEntry.date}} |
| ${c.duration} | {{timeEntry.duration}} |
| ${c.project} | {{timeEntry.project}} |
| ${c.task} | {{timeEntry.task}} |
| ${c.approvedBy} | {{timeEntry.approvedBy}} |