Custom designs
This commit is contained in:
parent
ce77a5cd2d
commit
c150751f1b
|
|
@ -89,6 +89,7 @@ class EntityHeader extends StatelessWidget {
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Expanded(child: _value1()),
|
||||
if ((secondValue ?? '').isNotEmpty) ...[
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import 'package:invoiceninja_flutter/ui/app/view_scaffold.dart';
|
|||
import 'package:invoiceninja_flutter/ui/design/view/design_view_vm.dart';
|
||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
import 'package:timeago/timeago.dart' as timeago;
|
||||
|
||||
class DesignView extends StatefulWidget {
|
||||
const DesignView({
|
||||
|
|
@ -69,12 +70,9 @@ class _DesignViewState extends State<DesignView> {
|
|||
entity: design,
|
||||
value: '$count',
|
||||
label: localization.count,
|
||||
secondLabel: localization.updatedAt,
|
||||
secondValue: formatDate(
|
||||
convertTimestampToDateString(design.updatedAt),
|
||||
context,
|
||||
showTime: true,
|
||||
),
|
||||
secondLabel: localization.lastUpdated,
|
||||
secondValue:
|
||||
timeago.format(convertTimestampToDate(design.updatedAt)),
|
||||
),
|
||||
ListDivider(),
|
||||
if (company.isModuleEnabled(EntityType.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
|
||||
'last_updated': 'Last Updated',
|
||||
'invoice_item': 'Invoice Item',
|
||||
'quote_item': 'Quote Item',
|
||||
'contact_first_name': 'Contact First Name',
|
||||
|
|
@ -60277,6 +60278,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
_localizedValues[localeCode]['quote_item'] ??
|
||||
_localizedValues['en']['quote_item'];
|
||||
|
||||
String get lastUpdated =>
|
||||
_localizedValues[localeCode]['last_updated'] ??
|
||||
_localizedValues['en']['last_updated'];
|
||||
|
||||
String lookup(String key) {
|
||||
final lookupKey = toSnakeCase(key);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue