Correct actiivty labels
This commit is contained in:
parent
e6f5605f88
commit
ccc6c5c59b
|
|
@ -673,6 +673,7 @@ abstract class ActivityEntity
|
||||||
kActivityEmailReminder2,
|
kActivityEmailReminder2,
|
||||||
kActivityEmailReminder3,
|
kActivityEmailReminder3,
|
||||||
kActivityEmailReminderEndless,
|
kActivityEmailReminderEndless,
|
||||||
|
kActivityEmailInvoiceFailed,
|
||||||
].contains(activityTypeId)) {
|
].contains(activityTypeId)) {
|
||||||
return EntityType.invoice;
|
return EntityType.invoice;
|
||||||
} else if ([
|
} else if ([
|
||||||
|
|
@ -763,7 +764,8 @@ abstract class ActivityEntity
|
||||||
}
|
}
|
||||||
|
|
||||||
String getDescription(
|
String getDescription(
|
||||||
String activity, {
|
String activity,
|
||||||
|
String systemString, {
|
||||||
UserEntity user,
|
UserEntity user,
|
||||||
ClientEntity client,
|
ClientEntity client,
|
||||||
InvoiceEntity invoice,
|
InvoiceEntity invoice,
|
||||||
|
|
@ -781,7 +783,8 @@ abstract class ActivityEntity
|
||||||
.firstWhere((contact) => contact.id == contactId, orElse: () => null);
|
.firstWhere((contact) => contact.id == contactId, orElse: () => null);
|
||||||
}
|
}
|
||||||
|
|
||||||
activity = activity.replaceFirst(':user', user?.listDisplayName ?? '');
|
activity =
|
||||||
|
activity.replaceFirst(':user', user?.listDisplayName ?? systemString);
|
||||||
activity = activity.replaceFirst(':client', client?.displayName ?? '');
|
activity = activity.replaceFirst(':client', client?.displayName ?? '');
|
||||||
activity = activity.replaceFirst(':invoice', invoice?.number ?? '');
|
activity = activity.replaceFirst(':invoice', invoice?.number ?? '');
|
||||||
activity =
|
activity =
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ class ActivityListTile extends StatelessWidget {
|
||||||
String title = localization.lookup('activity_${activity.activityTypeId}');
|
String title = localization.lookup('activity_${activity.activityTypeId}');
|
||||||
title = activity.getDescription(
|
title = activity.getDescription(
|
||||||
title,
|
title,
|
||||||
|
localization.system,
|
||||||
user: user,
|
user: user,
|
||||||
client: client,
|
client: client,
|
||||||
invoice: invoice,
|
invoice: invoice,
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
static final Map<String, Map<String, String>> _localizedValues = {
|
static final Map<String, Map<String, String>> _localizedValues = {
|
||||||
'en': {
|
'en': {
|
||||||
// STARTER: lang key - do not remove comment
|
// STARTER: lang key - do not remove comment
|
||||||
|
'system': 'System',
|
||||||
'set_default_company': 'Set Default Company',
|
'set_default_company': 'Set Default Company',
|
||||||
'updated_company': 'Successfully updated company',
|
'updated_company': 'Successfully updated company',
|
||||||
'kbc': 'KBC',
|
'kbc': 'KBC',
|
||||||
|
|
@ -62660,6 +62661,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
_localizedValues[localeCode]['set_default_company'] ??
|
_localizedValues[localeCode]['set_default_company'] ??
|
||||||
_localizedValues['en']['set_default_company'];
|
_localizedValues['en']['set_default_company'];
|
||||||
|
|
||||||
|
String get system =>
|
||||||
|
_localizedValues[localeCode]['system'] ??
|
||||||
|
_localizedValues['en']['system'];
|
||||||
|
|
||||||
// STARTER: lang field - do not remove comment
|
// STARTER: lang field - do not remove comment
|
||||||
|
|
||||||
String lookup(String key) {
|
String lookup(String key) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue