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