Task item details

This commit is contained in:
Hillel Coren 2023-03-22 16:05:18 +02:00
parent 913432b9ca
commit f2a69a3c95
4 changed files with 85 additions and 19 deletions

View File

@ -971,7 +971,15 @@ abstract class SettingsEntity
@nullable
@BuiltValueField(wireName: 'sync_invoice_quote_columns')
bool get syncInvoiceQuoteColumns;
bool get shareInvoiceQuoteColumns;
@nullable
@BuiltValueField(wireName: 'allow_billable_task_items')
bool get allowBillableTaskItems;
@nullable
@BuiltValueField(wireName: 'show_task_item_description')
bool get showTaskItemDescription;
bool get hasAddress => address1 != null && address1.isNotEmpty;

View File

@ -1485,13 +1485,27 @@ class _$SettingsEntitySerializer
..add(serializers.serialize(value,
specifiedType: const FullType(double)));
}
value = object.syncInvoiceQuoteColumns;
value = object.shareInvoiceQuoteColumns;
if (value != null) {
result
..add('sync_invoice_quote_columns')
..add(
serializers.serialize(value, specifiedType: const FullType(bool)));
}
value = object.allowBillableTaskItems;
if (value != null) {
result
..add('allow_billable_task_items')
..add(
serializers.serialize(value, specifiedType: const FullType(bool)));
}
value = object.showTaskItemDescription;
if (value != null) {
result
..add('show_task_item_description')
..add(
serializers.serialize(value, specifiedType: const FullType(bool)));
}
return result;
}
@ -2357,7 +2371,15 @@ class _$SettingsEntitySerializer
specifiedType: const FullType(double)) as double;
break;
case 'sync_invoice_quote_columns':
result.syncInvoiceQuoteColumns = serializers.deserialize(value,
result.shareInvoiceQuoteColumns = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool;
break;
case 'allow_billable_task_items':
result.allowBillableTaskItems = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool;
break;
case 'show_task_item_description':
result.showTaskItemDescription = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool;
break;
}
@ -2861,7 +2883,11 @@ class _$SettingsEntity extends SettingsEntity {
@override
final double clientInitiatedPaymentsMinimum;
@override
final bool syncInvoiceQuoteColumns;
final bool shareInvoiceQuoteColumns;
@override
final bool allowBillableTaskItems;
@override
final bool showTaskItemDescription;
factory _$SettingsEntity([void Function(SettingsEntityBuilder) updates]) =>
(new SettingsEntityBuilder()..update(updates))._build();
@ -3078,7 +3104,9 @@ class _$SettingsEntity extends SettingsEntity {
this.acceptPurchaseOrderNumber,
this.clientInitiatedPayments,
this.clientInitiatedPaymentsMinimum,
this.syncInvoiceQuoteColumns})
this.shareInvoiceQuoteColumns,
this.allowBillableTaskItems,
this.showTaskItemDescription})
: super._();
@override
@ -3309,7 +3337,9 @@ class _$SettingsEntity extends SettingsEntity {
clientInitiatedPayments == other.clientInitiatedPayments &&
clientInitiatedPaymentsMinimum ==
other.clientInitiatedPaymentsMinimum &&
syncInvoiceQuoteColumns == other.syncInvoiceQuoteColumns;
shareInvoiceQuoteColumns == other.shareInvoiceQuoteColumns &&
allowBillableTaskItems == other.allowBillableTaskItems &&
showTaskItemDescription == other.showTaskItemDescription;
}
int __hashCode;
@ -3528,7 +3558,9 @@ class _$SettingsEntity extends SettingsEntity {
_$hash = $jc(_$hash, acceptPurchaseOrderNumber.hashCode);
_$hash = $jc(_$hash, clientInitiatedPayments.hashCode);
_$hash = $jc(_$hash, clientInitiatedPaymentsMinimum.hashCode);
_$hash = $jc(_$hash, syncInvoiceQuoteColumns.hashCode);
_$hash = $jc(_$hash, shareInvoiceQuoteColumns.hashCode);
_$hash = $jc(_$hash, allowBillableTaskItems.hashCode);
_$hash = $jc(_$hash, showTaskItemDescription.hashCode);
_$hash = $jf(_$hash);
return __hashCode ??= _$hash;
}
@ -3752,7 +3784,9 @@ class _$SettingsEntity extends SettingsEntity {
..add('clientInitiatedPayments', clientInitiatedPayments)
..add(
'clientInitiatedPaymentsMinimum', clientInitiatedPaymentsMinimum)
..add('syncInvoiceQuoteColumns', syncInvoiceQuoteColumns))
..add('shareInvoiceQuoteColumns', shareInvoiceQuoteColumns)
..add('allowBillableTaskItems', allowBillableTaskItems)
..add('showTaskItemDescription', showTaskItemDescription))
.toString();
}
}
@ -4797,10 +4831,20 @@ class SettingsEntityBuilder
set clientInitiatedPaymentsMinimum(double clientInitiatedPaymentsMinimum) =>
_$this._clientInitiatedPaymentsMinimum = clientInitiatedPaymentsMinimum;
bool _syncInvoiceQuoteColumns;
bool get syncInvoiceQuoteColumns => _$this._syncInvoiceQuoteColumns;
set syncInvoiceQuoteColumns(bool syncInvoiceQuoteColumns) =>
_$this._syncInvoiceQuoteColumns = syncInvoiceQuoteColumns;
bool _shareInvoiceQuoteColumns;
bool get shareInvoiceQuoteColumns => _$this._shareInvoiceQuoteColumns;
set shareInvoiceQuoteColumns(bool shareInvoiceQuoteColumns) =>
_$this._shareInvoiceQuoteColumns = shareInvoiceQuoteColumns;
bool _allowBillableTaskItems;
bool get allowBillableTaskItems => _$this._allowBillableTaskItems;
set allowBillableTaskItems(bool allowBillableTaskItems) =>
_$this._allowBillableTaskItems = allowBillableTaskItems;
bool _showTaskItemDescription;
bool get showTaskItemDescription => _$this._showTaskItemDescription;
set showTaskItemDescription(bool showTaskItemDescription) =>
_$this._showTaskItemDescription = showTaskItemDescription;
SettingsEntityBuilder();
@ -5018,7 +5062,9 @@ class SettingsEntityBuilder
_acceptPurchaseOrderNumber = $v.acceptPurchaseOrderNumber;
_clientInitiatedPayments = $v.clientInitiatedPayments;
_clientInitiatedPaymentsMinimum = $v.clientInitiatedPaymentsMinimum;
_syncInvoiceQuoteColumns = $v.syncInvoiceQuoteColumns;
_shareInvoiceQuoteColumns = $v.shareInvoiceQuoteColumns;
_allowBillableTaskItems = $v.allowBillableTaskItems;
_showTaskItemDescription = $v.showTaskItemDescription;
_$v = null;
}
return this;
@ -5255,7 +5301,9 @@ class SettingsEntityBuilder
acceptPurchaseOrderNumber: acceptPurchaseOrderNumber,
clientInitiatedPayments: clientInitiatedPayments,
clientInitiatedPaymentsMinimum: clientInitiatedPaymentsMinimum,
syncInvoiceQuoteColumns: syncInvoiceQuoteColumns);
shareInvoiceQuoteColumns: shareInvoiceQuoteColumns,
allowBillableTaskItems: allowBillableTaskItems,
showTaskItemDescription: showTaskItemDescription);
} catch (_) {
String _$failedField;
try {

View File

@ -89,7 +89,7 @@ class _InvoiceDesignState extends State<InvoiceDesign>
tabs++;
}
if (viewModel.settings.syncInvoiceQuoteColumns == false) {
if (viewModel.settings.shareInvoiceQuoteColumns == false) {
tabs++;
}
@ -189,7 +189,7 @@ class _InvoiceDesignState extends State<InvoiceDesign>
localization.vendorDetails,
if (company.isModuleEnabled(EntityType.purchaseOrder))
localization.purchaseOrderDetails,
if (settings.syncInvoiceQuoteColumns == false) ...[
if (settings.shareInvoiceQuoteColumns == false) ...[
localization.invoiceProductColumns,
localization.quoteProductColumns,
] else
@ -1075,17 +1075,17 @@ class _InvoiceDesignState extends State<InvoiceDesign>
isLast: true,
child: SwitchListTile(
title: Text(localization.shareInvoiceQuoteColumns),
value: settings.syncInvoiceQuoteColumns ?? true,
value: settings.shareInvoiceQuoteColumns ?? true,
activeColor: Theme.of(context).colorScheme.secondary,
onChanged: (value) {
viewModel.onSettingsChanged(settings.rebuild(
(b) => b..syncInvoiceQuoteColumns = value));
(b) => b..shareInvoiceQuoteColumns = value));
},
),
)
],
),
if (settings.syncInvoiceQuoteColumns == false)
if (settings.shareInvoiceQuoteColumns == false)
Expanded(
child: FormCard(
child: MultiSelectList(

View File

@ -16,6 +16,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = {
'en': {
// STARTER: lang key - do not remove comment
'allow_billable_task_items': 'Allow Billable Task Items',
'show_task_item_description': 'Show Task Item Description',
'email_record': 'Email Record',
'invoice_product_columns': 'Invoice Product Columns',
'quote_product_columns': 'Quote Product Columns',
@ -97402,6 +97404,14 @@ mixin LocalizationsProvider on LocaleCodeAware {
_localizedValues[localeCode]['email_record'] ??
_localizedValues['en']['email_record'];
String get allowBillableTaskItems =>
_localizedValues[localeCode]['allow_billable_task_items'] ??
_localizedValues['en']['allow_billable_task_items'];
String get showTaskItemDescription =>
_localizedValues[localeCode]['show_task_item_description'] ??
_localizedValues['en']['show_task_item_description'];
// STARTER: lang field - do not remove comment
String lookup(String key) {