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