Add user notifications

This commit is contained in:
Hillel Coren 2021-04-28 20:34:47 +03:00
parent 9ecc015d2d
commit cdf5ff2ce3
2 changed files with 21 additions and 0 deletions

View File

@ -233,9 +233,12 @@ const String kNotificationsAll = 'all_notifications';
const String kNotificationsAllUser = 'all_user_notifications';
const String kNotificationsPaymentSuccess = 'payment_success';
const String kNotificationsPaymentFailure = 'payment_failure';
const String kNotificationsInvoiceCreated = 'invoice_created';
const String kNotificationsInvoiceSent = 'invoice_sent';
const String kNotificationsInvoiceLate = 'invoice_late';
const String kNotificationsQuoteCreated = 'quote_created';
const String kNotificationsQuoteSent = 'quote_sent';
const String kNotificationsCreditCreated = 'credit_created';
const String kNotificationsCreditSent = 'credit_sent';
const String kNotificationsQuoteViewed = 'quote_viewed';
const String kNotificationsQuoteExpired = 'quote_expired';
@ -244,15 +247,18 @@ const String kNotificationsCreditViewed = 'credit_viewed';
const String kNotificationsQuoteApproved = 'quote_approved';
const kNotificationEvents = [
kNotificationsInvoiceCreated,
kNotificationsInvoiceSent,
kNotificationsInvoiceViewed,
kNotificationsInvoiceLate,
kNotificationsPaymentSuccess,
kNotificationsPaymentFailure,
kNotificationsQuoteCreated,
kNotificationsQuoteSent,
kNotificationsQuoteViewed,
kNotificationsQuoteApproved,
kNotificationsQuoteExpired,
kNotificationsCreditCreated,
kNotificationsCreditSent,
kNotificationsCreditViewed,
];

View File

@ -15,6 +15,9 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = {
'en': {
// STARTER: lang key - do not remove comment
'invoice_created': 'Invoice Created',
'quote_created': 'Quote Created',
'credit_created': 'Credit Created',
'pro': 'Pro',
'enterprise': 'Enterprise',
'last_updated': 'Last Updated',
@ -60291,6 +60294,18 @@ mixin LocalizationsProvider on LocaleCodeAware {
_localizedValues[localeCode]['enterprise'] ??
_localizedValues['en']['enterprise'];
String get invoiceCreated =>
_localizedValues[localeCode]['invoice_created'] ??
_localizedValues['en']['invoice_created'];
String get quoteCreated =>
_localizedValues[localeCode]['quote_created'] ??
_localizedValues['en']['quote_created'];
String get creditCreated =>
_localizedValues[localeCode]['credit_created'] ??
_localizedValues['en']['credit_created'];
String lookup(String key) {
final lookupKey = toSnakeCase(key);