diff --git a/forge/ee/lib/billing/trialTask.js b/forge/ee/lib/billing/trialTask.js index 6c0e1791ab..93e7ae7a19 100644 --- a/forge/ee/lib/billing/trialTask.js +++ b/forge/ee/lib/billing/trialTask.js @@ -33,6 +33,7 @@ module.exports.init = function (app) { await sendTrialEmail(subscription.Team, 'TrialTeamSuspended', { teamSettingsURL: `${app.config.base_url}/team/${subscription.Team.slug}/billing` }) + await sendTrialSuspendedNotification(subscription.Team, 'TrialTeamEnded') } // We have dealt with this team @@ -113,6 +114,16 @@ module.exports.init = function (app) { } } + async function sendTrialSuspendedNotification (team) { + const owners = await team.getOwners() + for (const user of owners) { + const { id, TeamTypeId, ...teamPayload } = team.toJSON() + app.notifications.send(user, 'team-trial-suspended', { + team: teamPayload + }) + } + } + async function suspendAllProjects (team) { const projects = await team.getProjects() for (const project of projects) { diff --git a/frontend/src/components/notifications/Generic.vue b/frontend/src/components/notifications/Generic.vue index 4756d47da6..c1baef3c48 100644 --- a/frontend/src/components/notifications/Generic.vue +++ b/frontend/src/components/notifications/Generic.vue @@ -20,7 +20,7 @@