mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
client and some admin new
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
* User : task_requirements_updated, task_submissions_closed, task_submissions_reopened, user_task_overdue, user_task_auto_completed, task_reminder, achievement,
|
||||
* course_unlocked, course_completed, certificate_issued, welcome,
|
||||
* nogrp_welcome, assessment_updated, announcement, tier_expired,
|
||||
* tier_plan_archived,
|
||||
* tier_plan_archived, tier_plan_access_revoked, payment_refunded,
|
||||
* task_submission_reviewed, task_assigned, task_completed
|
||||
* Both : broadcast (admin-composed, sent via notification_broadcasts CRUD)
|
||||
*
|
||||
@@ -393,6 +393,40 @@ const NOTIFICATION_REGISTRY = {
|
||||
},
|
||||
},
|
||||
|
||||
// Distinct from tier_plan_archived above — that one explicitly says access
|
||||
// is unaffected, which would be false here, so an admin force-revoke
|
||||
// always fires THIS instead of (never alongside) tier_plan_archived.
|
||||
tier_plan_access_revoked: {
|
||||
type: 'tier_plan_access_revoked',
|
||||
scope: 'user',
|
||||
trigger: 'event',
|
||||
build({ label, planId = null }) {
|
||||
return {
|
||||
type: 'tier_plan_access_revoked',
|
||||
title: 'Subscription Access Revoked',
|
||||
message: `Your access under the "${label}" plan has been revoked by an administrator, effective immediately. This subscription is non-refundable.`,
|
||||
data: { label, planId },
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
// Fired when a user self-serves a refund within their plan's refund window
|
||||
// (controllers/client/tiers.controller.js refundOrder) — distinct from
|
||||
// tier_plan_access_revoked above, which is an admin-initiated, non-refundable cutoff.
|
||||
payment_refunded: {
|
||||
type: 'payment_refunded',
|
||||
scope: 'user',
|
||||
trigger: 'event',
|
||||
build({ label, amount, currency, planId = null }) {
|
||||
return {
|
||||
type: 'payment_refunded',
|
||||
title: 'Refund Processed',
|
||||
message: `Your refund of ${currency} ${amount} for the "${label}" plan has been processed. Your access to this plan has been revoked.`,
|
||||
data: { label, amount, currency, planId },
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
module.exports = { NOTIFICATION_REGISTRY };
|
||||
|
||||
Reference in New Issue
Block a user