This commit is contained in:
Hillel Coren 2019-12-15 23:51:40 +02:00
parent 75951bae10
commit 84ef755832
14 changed files with 576 additions and 84 deletions

View File

@ -342,6 +342,14 @@ abstract class ClientEntity extends Object
.where((contact) => contact.matchesFilter(filter)) .where((contact) => contact.matchesFilter(filter))
.isNotEmpty) { .isNotEmpty) {
return true; return true;
} else if (customValue1.toLowerCase().contains(filter)) {
return true;
} else if (customValue2.toLowerCase().contains(filter)) {
return true;
} else if (customValue3.toLowerCase().contains(filter)) {
return true;
} else if (customValue4.toLowerCase().contains(filter)) {
return true;
} }
return false; return false;
@ -373,6 +381,14 @@ abstract class ClientEntity extends Object
} else if (contact != null) { } else if (contact != null) {
final match = contact.matchesFilterValue(filter); final match = contact.matchesFilterValue(filter);
return match == displayName ? null : match; return match == displayName ? null : match;
} else if (customValue1.toLowerCase().contains(filter)) {
return customValue1;
} else if (customValue2.toLowerCase().contains(filter)) {
return customValue2;
} else if (customValue3.toLowerCase().contains(filter)) {
return customValue3;
} else if (customValue4.toLowerCase().contains(filter)) {
return customValue4;
} }
return null; return null;
@ -540,7 +556,6 @@ abstract class ContactEntity extends Object
@BuiltValueField(wireName: 'custom_value4') @BuiltValueField(wireName: 'custom_value4')
String get customValue4; String get customValue4;
String get fullName { String get fullName {
return (firstName + ' ' + lastName).trim(); return (firstName + ' ' + lastName).trim();
} }

View File

@ -102,6 +102,8 @@ abstract class ExpenseEntity extends Object
categoryId: '', categoryId: '',
customValue1: '', customValue1: '',
customValue2: '', customValue2: '',
customValue3: '',
customValue4: '',
isDeleted: false, isDeleted: false,
); );
} }
@ -205,6 +207,14 @@ abstract class ExpenseEntity extends Object
@BuiltValueField(wireName: 'custom_value2') @BuiltValueField(wireName: 'custom_value2')
String get customValue2; String get customValue2;
@nullable
@BuiltValueField(wireName: 'custom_value3')
String get customValue3;
@nullable
@BuiltValueField(wireName: 'custom_value4')
String get customValue4;
@override @override
List<EntityAction> getActions( List<EntityAction> getActions(
{UserCompanyEntity userCompany, {UserCompanyEntity userCompany,
@ -270,9 +280,19 @@ abstract class ExpenseEntity extends Object
if (publicNotes.toLowerCase().contains(filter)) { if (publicNotes.toLowerCase().contains(filter)) {
return true; return true;
} } else if (privateNotes.toLowerCase().contains(filter)) {
return true;
if (privateNotes.toLowerCase().contains(filter)) { } else if (customValue1.isNotEmpty &&
customValue1.toLowerCase().contains(filter)) {
return true;
} else if (customValue2.isNotEmpty &&
customValue2.toLowerCase().contains(filter)) {
return true;
} else if (customValue3.isNotEmpty &&
customValue3.toLowerCase().contains(filter)) {
return true;
} else if (customValue4.isNotEmpty &&
customValue4.toLowerCase().contains(filter)) {
return true; return true;
} }
@ -301,6 +321,18 @@ abstract class ExpenseEntity extends Object
return transactionReference; return transactionReference;
} else if (transactionReference.toLowerCase().contains(filter)) { } else if (transactionReference.toLowerCase().contains(filter)) {
return transactionReference; return transactionReference;
} else if (customValue1.isNotEmpty &&
customValue1.toLowerCase().contains(filter)) {
return customValue1;
} else if (customValue2.isNotEmpty &&
customValue2.toLowerCase().contains(filter)) {
return customValue2;
} else if (customValue3.isNotEmpty &&
customValue3.toLowerCase().contains(filter)) {
return customValue3;
} else if (customValue4.isNotEmpty &&
customValue4.toLowerCase().contains(filter)) {
return customValue4;
} }
return null; return null;

View File

@ -213,6 +213,18 @@ class _$ExpenseEntitySerializer implements StructuredSerializer<ExpenseEntity> {
..add(serializers.serialize(object.vendorId, ..add(serializers.serialize(object.vendorId,
specifiedType: const FullType(String))); specifiedType: const FullType(String)));
} }
if (object.customValue3 != null) {
result
..add('custom_value3')
..add(serializers.serialize(object.customValue3,
specifiedType: const FullType(String)));
}
if (object.customValue4 != null) {
result
..add('custom_value4')
..add(serializers.serialize(object.customValue4,
specifiedType: const FullType(String)));
}
if (object.isChanged != null) { if (object.isChanged != null) {
result result
..add('isChanged') ..add('isChanged')
@ -380,6 +392,14 @@ class _$ExpenseEntitySerializer implements StructuredSerializer<ExpenseEntity> {
result.customValue2 = serializers.deserialize(value, result.customValue2 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
break; break;
case 'custom_value3':
result.customValue3 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'custom_value4':
result.customValue4 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'isChanged': case 'isChanged':
result.isChanged = serializers.deserialize(value, result.isChanged = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool; specifiedType: const FullType(bool)) as bool;
@ -837,6 +857,10 @@ class _$ExpenseEntity extends ExpenseEntity {
@override @override
final String customValue2; final String customValue2;
@override @override
final String customValue3;
@override
final String customValue4;
@override
final bool isChanged; final bool isChanged;
@override @override
final int createdAt; final int createdAt;
@ -883,6 +907,8 @@ class _$ExpenseEntity extends ExpenseEntity {
this.vendorId, this.vendorId,
this.customValue1, this.customValue1,
this.customValue2, this.customValue2,
this.customValue3,
this.customValue4,
this.isChanged, this.isChanged,
this.createdAt, this.createdAt,
this.updatedAt, this.updatedAt,
@ -998,6 +1024,8 @@ class _$ExpenseEntity extends ExpenseEntity {
vendorId == other.vendorId && vendorId == other.vendorId &&
customValue1 == other.customValue1 && customValue1 == other.customValue1 &&
customValue2 == other.customValue2 && customValue2 == other.customValue2 &&
customValue3 == other.customValue3 &&
customValue4 == other.customValue4 &&
isChanged == other.isChanged && isChanged == other.isChanged &&
createdAt == other.createdAt && createdAt == other.createdAt &&
updatedAt == other.updatedAt && updatedAt == other.updatedAt &&
@ -1028,18 +1056,18 @@ class _$ExpenseEntity extends ExpenseEntity {
$jc( $jc(
$jc( $jc(
$jc( $jc(
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, privateNotes.hashCode), publicNotes.hashCode), shouldBeInvoiced.hashCode), invoiceDocuments.hashCode), transactionId.hashCode), transactionReference.hashCode), bankId.hashCode), expenseCurrencyId.hashCode), categoryId.hashCode), amount.hashCode), expenseDate.hashCode), paymentDate.hashCode), exchangeRate.hashCode), invoiceCurrencyId.hashCode), paymentTypeId.hashCode), $jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, privateNotes.hashCode), publicNotes.hashCode), shouldBeInvoiced.hashCode), invoiceDocuments.hashCode), transactionId.hashCode), transactionReference.hashCode), bankId.hashCode), expenseCurrencyId.hashCode), categoryId.hashCode), amount.hashCode), expenseDate.hashCode), paymentDate.hashCode), exchangeRate.hashCode), invoiceCurrencyId.hashCode), paymentTypeId.hashCode), taxName1.hashCode), taxName2.hashCode),
taxName1.hashCode), taxRate1.hashCode),
taxName2.hashCode), taxRate2.hashCode),
taxRate1.hashCode), taxName3.hashCode),
taxRate2.hashCode), taxRate3.hashCode),
taxName3.hashCode), clientId.hashCode),
taxRate3.hashCode), invoiceId.hashCode),
clientId.hashCode), vendorId.hashCode),
invoiceId.hashCode), customValue1.hashCode),
vendorId.hashCode), customValue2.hashCode),
customValue1.hashCode), customValue3.hashCode),
customValue2.hashCode), customValue4.hashCode),
isChanged.hashCode), isChanged.hashCode),
createdAt.hashCode), createdAt.hashCode),
updatedAt.hashCode), updatedAt.hashCode),
@ -1079,6 +1107,8 @@ class _$ExpenseEntity extends ExpenseEntity {
..add('vendorId', vendorId) ..add('vendorId', vendorId)
..add('customValue1', customValue1) ..add('customValue1', customValue1)
..add('customValue2', customValue2) ..add('customValue2', customValue2)
..add('customValue3', customValue3)
..add('customValue4', customValue4)
..add('isChanged', isChanged) ..add('isChanged', isChanged)
..add('createdAt', createdAt) ..add('createdAt', createdAt)
..add('updatedAt', updatedAt) ..add('updatedAt', updatedAt)
@ -1206,6 +1236,14 @@ class ExpenseEntityBuilder
String get customValue2 => _$this._customValue2; String get customValue2 => _$this._customValue2;
set customValue2(String customValue2) => _$this._customValue2 = customValue2; set customValue2(String customValue2) => _$this._customValue2 = customValue2;
String _customValue3;
String get customValue3 => _$this._customValue3;
set customValue3(String customValue3) => _$this._customValue3 = customValue3;
String _customValue4;
String get customValue4 => _$this._customValue4;
set customValue4(String customValue4) => _$this._customValue4 = customValue4;
bool _isChanged; bool _isChanged;
bool get isChanged => _$this._isChanged; bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged; set isChanged(bool isChanged) => _$this._isChanged = isChanged;
@ -1270,6 +1308,8 @@ class ExpenseEntityBuilder
_vendorId = _$v.vendorId; _vendorId = _$v.vendorId;
_customValue1 = _$v.customValue1; _customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2; _customValue2 = _$v.customValue2;
_customValue3 = _$v.customValue3;
_customValue4 = _$v.customValue4;
_isChanged = _$v.isChanged; _isChanged = _$v.isChanged;
_createdAt = _$v.createdAt; _createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt; _updatedAt = _$v.updatedAt;
@ -1326,6 +1366,8 @@ class ExpenseEntityBuilder
vendorId: vendorId, vendorId: vendorId,
customValue1: customValue1, customValue1: customValue1,
customValue2: customValue2, customValue2: customValue2,
customValue3: customValue3,
customValue4: customValue4,
isChanged: isChanged, isChanged: isChanged,
createdAt: createdAt, createdAt: createdAt,
updatedAt: updatedAt, updatedAt: updatedAt,

View File

@ -376,6 +376,12 @@ abstract class InvoiceEntity extends Object
} else if (customValue2.isNotEmpty && } else if (customValue2.isNotEmpty &&
customValue2.toLowerCase().contains(filter)) { customValue2.toLowerCase().contains(filter)) {
return true; return true;
} else if (customValue3.isNotEmpty &&
customValue3.toLowerCase().contains(filter)) {
return true;
} else if (customValue4.isNotEmpty &&
customValue4.toLowerCase().contains(filter)) {
return true;
} }
return false; return false;
@ -394,6 +400,12 @@ abstract class InvoiceEntity extends Object
} else if (customValue2.isNotEmpty && } else if (customValue2.isNotEmpty &&
customValue2.toLowerCase().contains(filter)) { customValue2.toLowerCase().contains(filter)) {
return customValue2; return customValue2;
} else if (customValue3.isNotEmpty &&
customValue3.toLowerCase().contains(filter)) {
return customValue3;
} else if (customValue4.isNotEmpty &&
customValue4.toLowerCase().contains(filter)) {
return customValue4;
} }
return null; return null;
} }
@ -630,6 +642,7 @@ abstract class InvoiceItemEntity
quantity == 0 && quantity == 0 &&
customValue1.isEmpty && customValue1.isEmpty &&
customValue2.isEmpty; customValue2.isEmpty;
// TODO add custom 3 and 4 // TODO add custom 3 and 4
InvoiceItemEntity applyTax(TaxRateEntity taxRate, InvoiceItemEntity applyTax(TaxRateEntity taxRate,

View File

@ -76,6 +76,10 @@ abstract class PaymentEntity extends Object
updatedAt: 0, updatedAt: 0,
archivedAt: 0, archivedAt: 0,
isDeleted: false, isDeleted: false,
customValue1: '',
customValue2: '',
customValue3: '',
customValue4: '',
); );
} }
@ -120,6 +124,22 @@ abstract class PaymentEntity extends Object
@BuiltValueField(wireName: 'private_notes') @BuiltValueField(wireName: 'private_notes')
String get privateNotes; String get privateNotes;
@nullable
@BuiltValueField(wireName: 'custom_value1')
String get customValue1;
@nullable
@BuiltValueField(wireName: 'custom_value2')
String get customValue2;
@nullable
@BuiltValueField(wireName: 'custom_value3')
String get customValue3;
@nullable
@BuiltValueField(wireName: 'custom_value4')
String get customValue4;
@nullable @nullable
@BuiltValueField(wireName: 'exchange_rate') @BuiltValueField(wireName: 'exchange_rate')
double get exchangeRate; double get exchangeRate;
@ -162,7 +182,25 @@ abstract class PaymentEntity extends Object
return true; return true;
} else if (privateNotes.toLowerCase().contains(filter)) { } else if (privateNotes.toLowerCase().contains(filter)) {
return true; return true;
} else if (customValue1.isNotEmpty &&
customValue1.toLowerCase().contains(filter)) {
return true;
} else if (customValue2.isNotEmpty &&
customValue2.toLowerCase().contains(filter)) {
return true;
} else if (customValue3.isNotEmpty &&
customValue3.toLowerCase().contains(filter)) {
return true;
} else if (customValue4.isNotEmpty &&
customValue4.toLowerCase().contains(filter)) {
return true;
} }
/*
} else if (customValue1.isNotEmpty &&
customValue2.toLowerCase().contains(filter)) {
return customValue2;
}
*/
return false; return false;
} }
@ -179,6 +217,18 @@ abstract class PaymentEntity extends Object
return transactionReference; return transactionReference;
} else if (privateNotes.toLowerCase().contains(filter)) { } else if (privateNotes.toLowerCase().contains(filter)) {
return privateNotes; return privateNotes;
} else if (customValue1.isNotEmpty &&
customValue1.toLowerCase().contains(filter)) {
return customValue1;
} else if (customValue2.isNotEmpty &&
customValue2.toLowerCase().contains(filter)) {
return customValue2;
} else if (customValue3.isNotEmpty &&
customValue3.toLowerCase().contains(filter)) {
return customValue3;
} else if (customValue4.isNotEmpty &&
customValue4.toLowerCase().contains(filter)) {
return customValue4;
} }
return null; return null;

View File

@ -167,6 +167,30 @@ class _$PaymentEntitySerializer implements StructuredSerializer<PaymentEntity> {
..add(serializers.serialize(object.privateNotes, ..add(serializers.serialize(object.privateNotes,
specifiedType: const FullType(String))); specifiedType: const FullType(String)));
} }
if (object.customValue1 != null) {
result
..add('custom_value1')
..add(serializers.serialize(object.customValue1,
specifiedType: const FullType(String)));
}
if (object.customValue2 != null) {
result
..add('custom_value2')
..add(serializers.serialize(object.customValue2,
specifiedType: const FullType(String)));
}
if (object.customValue3 != null) {
result
..add('custom_value3')
..add(serializers.serialize(object.customValue3,
specifiedType: const FullType(String)));
}
if (object.customValue4 != null) {
result
..add('custom_value4')
..add(serializers.serialize(object.customValue4,
specifiedType: const FullType(String)));
}
if (object.exchangeRate != null) { if (object.exchangeRate != null) {
result result
..add('exchange_rate') ..add('exchange_rate')
@ -282,6 +306,22 @@ class _$PaymentEntitySerializer implements StructuredSerializer<PaymentEntity> {
result.privateNotes = serializers.deserialize(value, result.privateNotes = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
break; break;
case 'custom_value1':
result.customValue1 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'custom_value2':
result.customValue2 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'custom_value3':
result.customValue3 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'custom_value4':
result.customValue4 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'exchange_rate': case 'exchange_rate':
result.exchangeRate = serializers.deserialize(value, result.exchangeRate = serializers.deserialize(value,
specifiedType: const FullType(double)) as double; specifiedType: const FullType(double)) as double;
@ -540,6 +580,14 @@ class _$PaymentEntity extends PaymentEntity {
@override @override
final String privateNotes; final String privateNotes;
@override @override
final String customValue1;
@override
final String customValue2;
@override
final String customValue3;
@override
final String customValue4;
@override
final double exchangeRate; final double exchangeRate;
@override @override
final String exchangeCurrencyId; final String exchangeCurrencyId;
@ -574,6 +622,10 @@ class _$PaymentEntity extends PaymentEntity {
this.paymentTypeId, this.paymentTypeId,
this.invoiceId, this.invoiceId,
this.privateNotes, this.privateNotes,
this.customValue1,
this.customValue2,
this.customValue3,
this.customValue4,
this.exchangeRate, this.exchangeRate,
this.exchangeCurrencyId, this.exchangeCurrencyId,
this.isChanged, this.isChanged,
@ -621,6 +673,10 @@ class _$PaymentEntity extends PaymentEntity {
paymentTypeId == other.paymentTypeId && paymentTypeId == other.paymentTypeId &&
invoiceId == other.invoiceId && invoiceId == other.invoiceId &&
privateNotes == other.privateNotes && privateNotes == other.privateNotes &&
customValue1 == other.customValue1 &&
customValue2 == other.customValue2 &&
customValue3 == other.customValue3 &&
customValue4 == other.customValue4 &&
exchangeRate == other.exchangeRate && exchangeRate == other.exchangeRate &&
exchangeCurrencyId == other.exchangeCurrencyId && exchangeCurrencyId == other.exchangeCurrencyId &&
isChanged == other.isChanged && isChanged == other.isChanged &&
@ -653,26 +709,16 @@ class _$PaymentEntity extends PaymentEntity {
$jc( $jc(
$jc( $jc(
$jc( $jc(
$jc( $jc($jc($jc($jc($jc($jc(0, amount.hashCode), refunded.hashCode), number.hashCode), clientId.hashCode), paymentStatusId.hashCode),
$jc( transactionReference.hashCode),
0, paymentDate.hashCode),
amount paymentTypeId.hashCode),
.hashCode), invoiceId.hashCode),
refunded privateNotes.hashCode),
.hashCode), customValue1.hashCode),
number customValue2.hashCode),
.hashCode), customValue3.hashCode),
clientId customValue4.hashCode),
.hashCode),
paymentStatusId
.hashCode),
transactionReference
.hashCode),
paymentDate
.hashCode),
paymentTypeId.hashCode),
invoiceId.hashCode),
privateNotes.hashCode),
exchangeRate.hashCode), exchangeRate.hashCode),
exchangeCurrencyId.hashCode), exchangeCurrencyId.hashCode),
isChanged.hashCode), isChanged.hashCode),
@ -698,6 +744,10 @@ class _$PaymentEntity extends PaymentEntity {
..add('paymentTypeId', paymentTypeId) ..add('paymentTypeId', paymentTypeId)
..add('invoiceId', invoiceId) ..add('invoiceId', invoiceId)
..add('privateNotes', privateNotes) ..add('privateNotes', privateNotes)
..add('customValue1', customValue1)
..add('customValue2', customValue2)
..add('customValue3', customValue3)
..add('customValue4', customValue4)
..add('exchangeRate', exchangeRate) ..add('exchangeRate', exchangeRate)
..add('exchangeCurrencyId', exchangeCurrencyId) ..add('exchangeCurrencyId', exchangeCurrencyId)
..add('isChanged', isChanged) ..add('isChanged', isChanged)
@ -759,6 +809,22 @@ class PaymentEntityBuilder
String get privateNotes => _$this._privateNotes; String get privateNotes => _$this._privateNotes;
set privateNotes(String privateNotes) => _$this._privateNotes = privateNotes; set privateNotes(String privateNotes) => _$this._privateNotes = privateNotes;
String _customValue1;
String get customValue1 => _$this._customValue1;
set customValue1(String customValue1) => _$this._customValue1 = customValue1;
String _customValue2;
String get customValue2 => _$this._customValue2;
set customValue2(String customValue2) => _$this._customValue2 = customValue2;
String _customValue3;
String get customValue3 => _$this._customValue3;
set customValue3(String customValue3) => _$this._customValue3 = customValue3;
String _customValue4;
String get customValue4 => _$this._customValue4;
set customValue4(String customValue4) => _$this._customValue4 = customValue4;
double _exchangeRate; double _exchangeRate;
double get exchangeRate => _$this._exchangeRate; double get exchangeRate => _$this._exchangeRate;
set exchangeRate(double exchangeRate) => _$this._exchangeRate = exchangeRate; set exchangeRate(double exchangeRate) => _$this._exchangeRate = exchangeRate;
@ -816,6 +882,10 @@ class PaymentEntityBuilder
_paymentTypeId = _$v.paymentTypeId; _paymentTypeId = _$v.paymentTypeId;
_invoiceId = _$v.invoiceId; _invoiceId = _$v.invoiceId;
_privateNotes = _$v.privateNotes; _privateNotes = _$v.privateNotes;
_customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2;
_customValue3 = _$v.customValue3;
_customValue4 = _$v.customValue4;
_exchangeRate = _$v.exchangeRate; _exchangeRate = _$v.exchangeRate;
_exchangeCurrencyId = _$v.exchangeCurrencyId; _exchangeCurrencyId = _$v.exchangeCurrencyId;
_isChanged = _$v.isChanged; _isChanged = _$v.isChanged;
@ -858,6 +928,10 @@ class PaymentEntityBuilder
paymentTypeId: paymentTypeId, paymentTypeId: paymentTypeId,
invoiceId: invoiceId, invoiceId: invoiceId,
privateNotes: privateNotes, privateNotes: privateNotes,
customValue1: customValue1,
customValue2: customValue2,
customValue3: customValue3,
customValue4: customValue4,
exchangeRate: exchangeRate, exchangeRate: exchangeRate,
exchangeCurrencyId: exchangeCurrencyId, exchangeCurrencyId: exchangeCurrencyId,
isChanged: isChanged, isChanged: isChanged,

View File

@ -67,6 +67,8 @@ abstract class ProductEntity extends Object
taxRate3: 0, taxRate3: 0,
customValue1: '', customValue1: '',
customValue2: '', customValue2: '',
customValue3: '',
customValue4: '',
updatedAt: 0, updatedAt: 0,
archivedAt: 0, archivedAt: 0,
isDeleted: false, isDeleted: false,
@ -120,6 +122,14 @@ abstract class ProductEntity extends Object
@BuiltValueField(wireName: 'custom_value2') @BuiltValueField(wireName: 'custom_value2')
String get customValue2; String get customValue2;
@nullable
@BuiltValueField(wireName: 'custom_value3')
String get customValue3;
@nullable
@BuiltValueField(wireName: 'custom_value4')
String get customValue4;
@override @override
String get listDisplayName { String get listDisplayName {
return productKey; return productKey;
@ -173,6 +183,12 @@ abstract class ProductEntity extends Object
} else if (customValue2.isNotEmpty && } else if (customValue2.isNotEmpty &&
customValue2.toLowerCase().contains(filter)) { customValue2.toLowerCase().contains(filter)) {
return true; return true;
} else if (customValue3.isNotEmpty &&
customValue3.toLowerCase().contains(filter)) {
return true;
} else if (customValue4.isNotEmpty &&
customValue4.toLowerCase().contains(filter)) {
return true;
} }
return false; return false;
@ -193,6 +209,12 @@ abstract class ProductEntity extends Object
} else if (customValue2.isNotEmpty && } else if (customValue2.isNotEmpty &&
customValue2.toLowerCase().contains(filter)) { customValue2.toLowerCase().contains(filter)) {
return customValue2; return customValue2;
} else if (customValue3.isNotEmpty &&
customValue3.toLowerCase().contains(filter)) {
return customValue1;
} else if (customValue3.isNotEmpty &&
customValue3.toLowerCase().contains(filter)) {
return customValue2;
} }
return null; return null;
} }

View File

@ -157,6 +157,18 @@ class _$ProductEntitySerializer implements StructuredSerializer<ProductEntity> {
serializers.serialize(object.customValue2, serializers.serialize(object.customValue2,
specifiedType: const FullType(String)), specifiedType: const FullType(String)),
]; ];
if (object.customValue3 != null) {
result
..add('custom_value3')
..add(serializers.serialize(object.customValue3,
specifiedType: const FullType(String)));
}
if (object.customValue4 != null) {
result
..add('custom_value4')
..add(serializers.serialize(object.customValue4,
specifiedType: const FullType(String)));
}
if (object.isChanged != null) { if (object.isChanged != null) {
result result
..add('isChanged') ..add('isChanged')
@ -272,6 +284,14 @@ class _$ProductEntitySerializer implements StructuredSerializer<ProductEntity> {
result.customValue2 = serializers.deserialize(value, result.customValue2 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
break; break;
case 'custom_value3':
result.customValue3 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'custom_value4':
result.customValue4 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'isChanged': case 'isChanged':
result.isChanged = serializers.deserialize(value, result.isChanged = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool; specifiedType: const FullType(bool)) as bool;
@ -528,6 +548,10 @@ class _$ProductEntity extends ProductEntity {
@override @override
final String customValue2; final String customValue2;
@override @override
final String customValue3;
@override
final String customValue4;
@override
final bool isChanged; final bool isChanged;
@override @override
final int createdAt; final int createdAt;
@ -561,6 +585,8 @@ class _$ProductEntity extends ProductEntity {
this.taxRate3, this.taxRate3,
this.customValue1, this.customValue1,
this.customValue2, this.customValue2,
this.customValue3,
this.customValue4,
this.isChanged, this.isChanged,
this.createdAt, this.createdAt,
this.updatedAt, this.updatedAt,
@ -635,6 +661,8 @@ class _$ProductEntity extends ProductEntity {
taxRate3 == other.taxRate3 && taxRate3 == other.taxRate3 &&
customValue1 == other.customValue1 && customValue1 == other.customValue1 &&
customValue2 == other.customValue2 && customValue2 == other.customValue2 &&
customValue3 == other.customValue3 &&
customValue4 == other.customValue4 &&
isChanged == other.isChanged && isChanged == other.isChanged &&
createdAt == other.createdAt && createdAt == other.createdAt &&
updatedAt == other.updatedAt && updatedAt == other.updatedAt &&
@ -665,18 +693,18 @@ class _$ProductEntity extends ProductEntity {
$jc( $jc(
$jc( $jc(
$jc( $jc(
$jc($jc($jc(0, productKey.hashCode), notes.hashCode), $jc($jc($jc($jc($jc(0, productKey.hashCode), notes.hashCode), cost.hashCode), price.hashCode),
cost.hashCode), quantity.hashCode),
price.hashCode), taxName1.hashCode),
quantity.hashCode), taxRate1.hashCode),
taxName1.hashCode), taxName2.hashCode),
taxRate1.hashCode), taxRate2.hashCode),
taxName2.hashCode), taxName3.hashCode),
taxRate2.hashCode), taxRate3.hashCode),
taxName3.hashCode), customValue1.hashCode),
taxRate3.hashCode), customValue2.hashCode),
customValue1.hashCode), customValue3.hashCode),
customValue2.hashCode), customValue4.hashCode),
isChanged.hashCode), isChanged.hashCode),
createdAt.hashCode), createdAt.hashCode),
updatedAt.hashCode), updatedAt.hashCode),
@ -703,6 +731,8 @@ class _$ProductEntity extends ProductEntity {
..add('taxRate3', taxRate3) ..add('taxRate3', taxRate3)
..add('customValue1', customValue1) ..add('customValue1', customValue1)
..add('customValue2', customValue2) ..add('customValue2', customValue2)
..add('customValue3', customValue3)
..add('customValue4', customValue4)
..add('isChanged', isChanged) ..add('isChanged', isChanged)
..add('createdAt', createdAt) ..add('createdAt', createdAt)
..add('updatedAt', updatedAt) ..add('updatedAt', updatedAt)
@ -771,6 +801,14 @@ class ProductEntityBuilder
String get customValue2 => _$this._customValue2; String get customValue2 => _$this._customValue2;
set customValue2(String customValue2) => _$this._customValue2 = customValue2; set customValue2(String customValue2) => _$this._customValue2 = customValue2;
String _customValue3;
String get customValue3 => _$this._customValue3;
set customValue3(String customValue3) => _$this._customValue3 = customValue3;
String _customValue4;
String get customValue4 => _$this._customValue4;
set customValue4(String customValue4) => _$this._customValue4 = customValue4;
bool _isChanged; bool _isChanged;
bool get isChanged => _$this._isChanged; bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged; set isChanged(bool isChanged) => _$this._isChanged = isChanged;
@ -822,6 +860,8 @@ class ProductEntityBuilder
_taxRate3 = _$v.taxRate3; _taxRate3 = _$v.taxRate3;
_customValue1 = _$v.customValue1; _customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2; _customValue2 = _$v.customValue2;
_customValue3 = _$v.customValue3;
_customValue4 = _$v.customValue4;
_isChanged = _$v.isChanged; _isChanged = _$v.isChanged;
_createdAt = _$v.createdAt; _createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt; _updatedAt = _$v.updatedAt;
@ -865,6 +905,8 @@ class ProductEntityBuilder
taxRate3: taxRate3, taxRate3: taxRate3,
customValue1: customValue1, customValue1: customValue1,
customValue2: customValue2, customValue2: customValue2,
customValue3: customValue3,
customValue4: customValue4,
isChanged: isChanged, isChanged: isChanged,
createdAt: createdAt, createdAt: createdAt,
updatedAt: updatedAt, updatedAt: updatedAt,

View File

@ -64,6 +64,8 @@ abstract class ProjectEntity extends Object
budgetedHours: 0.0, budgetedHours: 0.0,
customValue1: '', customValue1: '',
customValue2: '', customValue2: '',
customValue3: '',
customValue4: '',
updatedAt: 0, updatedAt: 0,
archivedAt: 0, archivedAt: 0,
isDeleted: false, isDeleted: false,
@ -105,6 +107,12 @@ abstract class ProjectEntity extends Object
@BuiltValueField(wireName: 'custom_value2') @BuiltValueField(wireName: 'custom_value2')
String get customValue2; String get customValue2;
@BuiltValueField(wireName: 'custom_value3')
String get customValue3;
@BuiltValueField(wireName: 'custom_value4')
String get customValue4;
@override @override
List<EntityAction> getActions( List<EntityAction> getActions(
{UserCompanyEntity userCompany, {UserCompanyEntity userCompany,
@ -159,8 +167,19 @@ abstract class ProjectEntity extends Object
bool matchesFilter(String filter) { bool matchesFilter(String filter) {
if (filter == null || filter.isEmpty) { if (filter == null || filter.isEmpty) {
return true; return true;
} else if (customValue1.toLowerCase().contains(filter)) {
return true;
} else if (customValue2.toLowerCase().contains(filter)) {
return true;
} else if (customValue3.toLowerCase().contains(filter)) {
return true;
} else if (customValue4.toLowerCase().contains(filter)) {
return true;
} }
return name.toLowerCase().contains(filter); return name.toLowerCase().contains(filter);
} }
@ -168,6 +187,14 @@ abstract class ProjectEntity extends Object
String matchesFilterValue(String filter) { String matchesFilterValue(String filter) {
if (filter == null || filter.isEmpty) { if (filter == null || filter.isEmpty) {
return null; return null;
} else if (customValue1.toLowerCase().contains(filter)) {
return customValue1;
} else if (customValue2.toLowerCase().contains(filter)) {
return customValue2;
} else if (customValue3.toLowerCase().contains(filter)) {
return customValue3;
} else if (customValue4.toLowerCase().contains(filter)) {
return customValue4;
} }
return null; return null;

View File

@ -141,6 +141,12 @@ class _$ProjectEntitySerializer implements StructuredSerializer<ProjectEntity> {
'custom_value2', 'custom_value2',
serializers.serialize(object.customValue2, serializers.serialize(object.customValue2,
specifiedType: const FullType(String)), specifiedType: const FullType(String)),
'custom_value3',
serializers.serialize(object.customValue3,
specifiedType: const FullType(String)),
'custom_value4',
serializers.serialize(object.customValue4,
specifiedType: const FullType(String)),
]; ];
if (object.isChanged != null) { if (object.isChanged != null) {
result result
@ -237,6 +243,14 @@ class _$ProjectEntitySerializer implements StructuredSerializer<ProjectEntity> {
result.customValue2 = serializers.deserialize(value, result.customValue2 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
break; break;
case 'custom_value3':
result.customValue3 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'custom_value4':
result.customValue4 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'isChanged': case 'isChanged':
result.isChanged = serializers.deserialize(value, result.isChanged = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool; specifiedType: const FullType(bool)) as bool;
@ -483,6 +497,10 @@ class _$ProjectEntity extends ProjectEntity {
@override @override
final String customValue2; final String customValue2;
@override @override
final String customValue3;
@override
final String customValue4;
@override
final bool isChanged; final bool isChanged;
@override @override
final int createdAt; final int createdAt;
@ -511,6 +529,8 @@ class _$ProjectEntity extends ProjectEntity {
this.budgetedHours, this.budgetedHours,
this.customValue1, this.customValue1,
this.customValue2, this.customValue2,
this.customValue3,
this.customValue4,
this.isChanged, this.isChanged,
this.createdAt, this.createdAt,
this.updatedAt, this.updatedAt,
@ -544,6 +564,12 @@ class _$ProjectEntity extends ProjectEntity {
if (customValue2 == null) { if (customValue2 == null) {
throw new BuiltValueNullFieldError('ProjectEntity', 'customValue2'); throw new BuiltValueNullFieldError('ProjectEntity', 'customValue2');
} }
if (customValue3 == null) {
throw new BuiltValueNullFieldError('ProjectEntity', 'customValue3');
}
if (customValue4 == null) {
throw new BuiltValueNullFieldError('ProjectEntity', 'customValue4');
}
} }
@override @override
@ -565,6 +591,8 @@ class _$ProjectEntity extends ProjectEntity {
budgetedHours == other.budgetedHours && budgetedHours == other.budgetedHours &&
customValue1 == other.customValue1 && customValue1 == other.customValue1 &&
customValue2 == other.customValue2 && customValue2 == other.customValue2 &&
customValue3 == other.customValue3 &&
customValue4 == other.customValue4 &&
isChanged == other.isChanged && isChanged == other.isChanged &&
createdAt == other.createdAt && createdAt == other.createdAt &&
updatedAt == other.updatedAt && updatedAt == other.updatedAt &&
@ -593,17 +621,24 @@ class _$ProjectEntity extends ProjectEntity {
$jc( $jc(
$jc( $jc(
$jc( $jc(
0, $jc(
name $jc(
0,
name
.hashCode),
clientId
.hashCode),
taskRate
.hashCode), .hashCode),
clientId dueDate
.hashCode), .hashCode),
taskRate.hashCode), privateNotes
dueDate.hashCode), .hashCode),
privateNotes.hashCode), budgetedHours.hashCode),
budgetedHours.hashCode), customValue1.hashCode),
customValue1.hashCode), customValue2.hashCode),
customValue2.hashCode), customValue3.hashCode),
customValue4.hashCode),
isChanged.hashCode), isChanged.hashCode),
createdAt.hashCode), createdAt.hashCode),
updatedAt.hashCode), updatedAt.hashCode),
@ -625,6 +660,8 @@ class _$ProjectEntity extends ProjectEntity {
..add('budgetedHours', budgetedHours) ..add('budgetedHours', budgetedHours)
..add('customValue1', customValue1) ..add('customValue1', customValue1)
..add('customValue2', customValue2) ..add('customValue2', customValue2)
..add('customValue3', customValue3)
..add('customValue4', customValue4)
..add('isChanged', isChanged) ..add('isChanged', isChanged)
..add('createdAt', createdAt) ..add('createdAt', createdAt)
..add('updatedAt', updatedAt) ..add('updatedAt', updatedAt)
@ -674,6 +711,14 @@ class ProjectEntityBuilder
String get customValue2 => _$this._customValue2; String get customValue2 => _$this._customValue2;
set customValue2(String customValue2) => _$this._customValue2 = customValue2; set customValue2(String customValue2) => _$this._customValue2 = customValue2;
String _customValue3;
String get customValue3 => _$this._customValue3;
set customValue3(String customValue3) => _$this._customValue3 = customValue3;
String _customValue4;
String get customValue4 => _$this._customValue4;
set customValue4(String customValue4) => _$this._customValue4 = customValue4;
bool _isChanged; bool _isChanged;
bool get isChanged => _$this._isChanged; bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged; set isChanged(bool isChanged) => _$this._isChanged = isChanged;
@ -720,6 +765,8 @@ class ProjectEntityBuilder
_budgetedHours = _$v.budgetedHours; _budgetedHours = _$v.budgetedHours;
_customValue1 = _$v.customValue1; _customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2; _customValue2 = _$v.customValue2;
_customValue3 = _$v.customValue3;
_customValue4 = _$v.customValue4;
_isChanged = _$v.isChanged; _isChanged = _$v.isChanged;
_createdAt = _$v.createdAt; _createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt; _updatedAt = _$v.updatedAt;
@ -758,6 +805,8 @@ class ProjectEntityBuilder
budgetedHours: budgetedHours, budgetedHours: budgetedHours,
customValue1: customValue1, customValue1: customValue1,
customValue2: customValue2, customValue2: customValue2,
customValue3: customValue3,
customValue4: customValue4,
isChanged: isChanged, isChanged: isChanged,
createdAt: createdAt, createdAt: createdAt,
updatedAt: updatedAt, updatedAt: updatedAt,

View File

@ -144,6 +144,8 @@ abstract class TaskEntity extends Object
isRunning: isRunning, isRunning: isRunning,
customValue1: '', customValue1: '',
customValue2: '', customValue2: '',
customValue3: '',
customValue4: '',
updatedAt: 0, updatedAt: 0,
archivedAt: 0, archivedAt: 0,
isDeleted: false, isDeleted: false,
@ -348,6 +350,14 @@ abstract class TaskEntity extends Object
@BuiltValueField(wireName: 'custom_value2') @BuiltValueField(wireName: 'custom_value2')
String get customValue2; String get customValue2;
@nullable
@BuiltValueField(wireName: 'custom_value3')
String get customValue3;
@nullable
@BuiltValueField(wireName: 'custom_value4')
String get customValue4;
@nullable @nullable
@BuiltValueField(wireName: 'task_status_id') @BuiltValueField(wireName: 'task_status_id')
String get taskStatusId; String get taskStatusId;
@ -420,6 +430,14 @@ abstract class TaskEntity extends Object
bool matchesFilter(String filter) { bool matchesFilter(String filter) {
if (filter == null || filter.isEmpty) { if (filter == null || filter.isEmpty) {
return true; return true;
} else if (customValue1.toLowerCase().contains(filter)) {
return true;
} else if (customValue2.toLowerCase().contains(filter)) {
return true;
} else if (customValue3.toLowerCase().contains(filter)) {
return true;
} else if (customValue4.toLowerCase().contains(filter)) {
return true;
} }
return description.toLowerCase().contains(filter); return description.toLowerCase().contains(filter);
@ -448,6 +466,14 @@ abstract class TaskEntity extends Object
String matchesFilterValue(String filter) { String matchesFilterValue(String filter) {
if (filter == null || filter.isEmpty) { if (filter == null || filter.isEmpty) {
return null; return null;
} else if (customValue1.toLowerCase().contains(filter)) {
return customValue1;
} else if (customValue2.toLowerCase().contains(filter)) {
return customValue2;
} else if (customValue3.toLowerCase().contains(filter)) {
return customValue3;
} else if (customValue4.toLowerCase().contains(filter)) {
return customValue4;
} }
return null; return null;

View File

@ -198,6 +198,18 @@ class _$TaskEntitySerializer implements StructuredSerializer<TaskEntity> {
..add(serializers.serialize(object.projectId, ..add(serializers.serialize(object.projectId,
specifiedType: const FullType(String))); specifiedType: const FullType(String)));
} }
if (object.customValue3 != null) {
result
..add('custom_value3')
..add(serializers.serialize(object.customValue3,
specifiedType: const FullType(String)));
}
if (object.customValue4 != null) {
result
..add('custom_value4')
..add(serializers.serialize(object.customValue4,
specifiedType: const FullType(String)));
}
if (object.taskStatusId != null) { if (object.taskStatusId != null) {
result result
..add('task_status_id') ..add('task_status_id')
@ -308,6 +320,14 @@ class _$TaskEntitySerializer implements StructuredSerializer<TaskEntity> {
result.customValue2 = serializers.deserialize(value, result.customValue2 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
break; break;
case 'custom_value3':
result.customValue3 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'custom_value4':
result.customValue4 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'task_status_id': case 'task_status_id':
result.taskStatusId = serializers.deserialize(value, result.taskStatusId = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
@ -702,6 +722,10 @@ class _$TaskEntity extends TaskEntity {
@override @override
final String customValue2; final String customValue2;
@override @override
final String customValue3;
@override
final String customValue4;
@override
final String taskStatusId; final String taskStatusId;
@override @override
final int taskStatusSortOrder; final int taskStatusSortOrder;
@ -735,6 +759,8 @@ class _$TaskEntity extends TaskEntity {
this.isRunning, this.isRunning,
this.customValue1, this.customValue1,
this.customValue2, this.customValue2,
this.customValue3,
this.customValue4,
this.taskStatusId, this.taskStatusId,
this.taskStatusSortOrder, this.taskStatusSortOrder,
this.isChanged, this.isChanged,
@ -786,6 +812,8 @@ class _$TaskEntity extends TaskEntity {
isRunning == other.isRunning && isRunning == other.isRunning &&
customValue1 == other.customValue1 && customValue1 == other.customValue1 &&
customValue2 == other.customValue2 && customValue2 == other.customValue2 &&
customValue3 == other.customValue3 &&
customValue4 == other.customValue4 &&
taskStatusId == other.taskStatusId && taskStatusId == other.taskStatusId &&
taskStatusSortOrder == other.taskStatusSortOrder && taskStatusSortOrder == other.taskStatusSortOrder &&
isChanged == other.isChanged && isChanged == other.isChanged &&
@ -818,22 +846,16 @@ class _$TaskEntity extends TaskEntity {
$jc( $jc(
$jc( $jc(
$jc( $jc(
$jc( $jc($jc($jc(0, description.hashCode), duration.hashCode),
0, invoiceId.hashCode),
description clientId.hashCode),
.hashCode), projectId.hashCode),
duration timeLog.hashCode),
.hashCode), isRunning.hashCode),
invoiceId customValue1.hashCode),
.hashCode), customValue2.hashCode),
clientId customValue3.hashCode),
.hashCode), customValue4.hashCode),
projectId
.hashCode),
timeLog.hashCode),
isRunning.hashCode),
customValue1.hashCode),
customValue2.hashCode),
taskStatusId.hashCode), taskStatusId.hashCode),
taskStatusSortOrder.hashCode), taskStatusSortOrder.hashCode),
isChanged.hashCode), isChanged.hashCode),
@ -858,6 +880,8 @@ class _$TaskEntity extends TaskEntity {
..add('isRunning', isRunning) ..add('isRunning', isRunning)
..add('customValue1', customValue1) ..add('customValue1', customValue1)
..add('customValue2', customValue2) ..add('customValue2', customValue2)
..add('customValue3', customValue3)
..add('customValue4', customValue4)
..add('taskStatusId', taskStatusId) ..add('taskStatusId', taskStatusId)
..add('taskStatusSortOrder', taskStatusSortOrder) ..add('taskStatusSortOrder', taskStatusSortOrder)
..add('isChanged', isChanged) ..add('isChanged', isChanged)
@ -911,6 +935,14 @@ class TaskEntityBuilder implements Builder<TaskEntity, TaskEntityBuilder> {
String get customValue2 => _$this._customValue2; String get customValue2 => _$this._customValue2;
set customValue2(String customValue2) => _$this._customValue2 = customValue2; set customValue2(String customValue2) => _$this._customValue2 = customValue2;
String _customValue3;
String get customValue3 => _$this._customValue3;
set customValue3(String customValue3) => _$this._customValue3 = customValue3;
String _customValue4;
String get customValue4 => _$this._customValue4;
set customValue4(String customValue4) => _$this._customValue4 = customValue4;
String _taskStatusId; String _taskStatusId;
String get taskStatusId => _$this._taskStatusId; String get taskStatusId => _$this._taskStatusId;
set taskStatusId(String taskStatusId) => _$this._taskStatusId = taskStatusId; set taskStatusId(String taskStatusId) => _$this._taskStatusId = taskStatusId;
@ -967,6 +999,8 @@ class TaskEntityBuilder implements Builder<TaskEntity, TaskEntityBuilder> {
_isRunning = _$v.isRunning; _isRunning = _$v.isRunning;
_customValue1 = _$v.customValue1; _customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2; _customValue2 = _$v.customValue2;
_customValue3 = _$v.customValue3;
_customValue4 = _$v.customValue4;
_taskStatusId = _$v.taskStatusId; _taskStatusId = _$v.taskStatusId;
_taskStatusSortOrder = _$v.taskStatusSortOrder; _taskStatusSortOrder = _$v.taskStatusSortOrder;
_isChanged = _$v.isChanged; _isChanged = _$v.isChanged;
@ -1008,6 +1042,8 @@ class TaskEntityBuilder implements Builder<TaskEntity, TaskEntityBuilder> {
isRunning: isRunning, isRunning: isRunning,
customValue1: customValue1, customValue1: customValue1,
customValue2: customValue2, customValue2: customValue2,
customValue3: customValue3,
customValue4: customValue4,
taskStatusId: taskStatusId, taskStatusId: taskStatusId,
taskStatusSortOrder: taskStatusSortOrder, taskStatusSortOrder: taskStatusSortOrder,
isChanged: isChanged, isChanged: isChanged,

View File

@ -154,6 +154,12 @@ abstract class VendorEntity extends Object
@BuiltValueField(wireName: 'custom_value2') @BuiltValueField(wireName: 'custom_value2')
String get customValue2; String get customValue2;
@BuiltValueField(wireName: 'custom_value3')
String get customValue3;
@BuiltValueField(wireName: 'custom_value4')
String get customValue4;
@BuiltValueField(wireName: 'vendor_contacts') @BuiltValueField(wireName: 'vendor_contacts')
BuiltList<VendorContactEntity> get contacts; BuiltList<VendorContactEntity> get contacts;
@ -223,6 +229,14 @@ abstract class VendorEntity extends Object
.where((contact) => contact.matchesFilter(filter)) .where((contact) => contact.matchesFilter(filter))
.isNotEmpty) { .isNotEmpty) {
return true; return true;
} else if (customValue1.toLowerCase().contains(filter)) {
return true;
} else if (customValue2.toLowerCase().contains(filter)) {
return true;
} else if (customValue3.toLowerCase().contains(filter)) {
return true;
} else if (customValue4.toLowerCase().contains(filter)) {
return true;
} }
return false; return false;
@ -252,6 +266,14 @@ abstract class VendorEntity extends Object
} else if (contact != null) { } else if (contact != null) {
final match = contact.matchesFilterValue(filter); final match = contact.matchesFilterValue(filter);
return match == name ? null : match; return match == name ? null : match;
} else if (customValue1.toLowerCase().contains(filter)) {
return customValue1;
} else if (customValue2.toLowerCase().contains(filter)) {
return customValue2;
} else if (customValue3.toLowerCase().contains(filter)) {
return customValue3;
} else if (customValue4.toLowerCase().contains(filter)) {
return customValue4;
} }
return null; return null;

View File

@ -164,6 +164,12 @@ class _$VendorEntitySerializer implements StructuredSerializer<VendorEntity> {
'custom_value2', 'custom_value2',
serializers.serialize(object.customValue2, serializers.serialize(object.customValue2,
specifiedType: const FullType(String)), specifiedType: const FullType(String)),
'custom_value3',
serializers.serialize(object.customValue3,
specifiedType: const FullType(String)),
'custom_value4',
serializers.serialize(object.customValue4,
specifiedType: const FullType(String)),
'vendor_contacts', 'vendor_contacts',
serializers.serialize(object.contacts, serializers.serialize(object.contacts,
specifiedType: const FullType( specifiedType: const FullType(
@ -303,6 +309,14 @@ class _$VendorEntitySerializer implements StructuredSerializer<VendorEntity> {
result.customValue2 = serializers.deserialize(value, result.customValue2 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String; specifiedType: const FullType(String)) as String;
break; break;
case 'custom_value3':
result.customValue3 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'custom_value4':
result.customValue4 = serializers.deserialize(value,
specifiedType: const FullType(String)) as String;
break;
case 'vendor_contacts': case 'vendor_contacts':
result.contacts.replace(serializers.deserialize(value, result.contacts.replace(serializers.deserialize(value,
specifiedType: const FullType( specifiedType: const FullType(
@ -728,6 +742,10 @@ class _$VendorEntity extends VendorEntity {
@override @override
final String customValue2; final String customValue2;
@override @override
final String customValue3;
@override
final String customValue4;
@override
final BuiltList<VendorContactEntity> contacts; final BuiltList<VendorContactEntity> contacts;
@override @override
final bool isChanged; final bool isChanged;
@ -768,6 +786,8 @@ class _$VendorEntity extends VendorEntity {
this.currencyId, this.currencyId,
this.customValue1, this.customValue1,
this.customValue2, this.customValue2,
this.customValue3,
this.customValue4,
this.contacts, this.contacts,
this.isChanged, this.isChanged,
this.createdAt, this.createdAt,
@ -832,6 +852,12 @@ class _$VendorEntity extends VendorEntity {
if (customValue2 == null) { if (customValue2 == null) {
throw new BuiltValueNullFieldError('VendorEntity', 'customValue2'); throw new BuiltValueNullFieldError('VendorEntity', 'customValue2');
} }
if (customValue3 == null) {
throw new BuiltValueNullFieldError('VendorEntity', 'customValue3');
}
if (customValue4 == null) {
throw new BuiltValueNullFieldError('VendorEntity', 'customValue4');
}
if (contacts == null) { if (contacts == null) {
throw new BuiltValueNullFieldError('VendorEntity', 'contacts'); throw new BuiltValueNullFieldError('VendorEntity', 'contacts');
} }
@ -866,6 +892,8 @@ class _$VendorEntity extends VendorEntity {
currencyId == other.currencyId && currencyId == other.currencyId &&
customValue1 == other.customValue1 && customValue1 == other.customValue1 &&
customValue2 == other.customValue2 && customValue2 == other.customValue2 &&
customValue3 == other.customValue3 &&
customValue4 == other.customValue4 &&
contacts == other.contacts && contacts == other.contacts &&
isChanged == other.isChanged && isChanged == other.isChanged &&
createdAt == other.createdAt && createdAt == other.createdAt &&
@ -897,17 +925,17 @@ class _$VendorEntity extends VendorEntity {
$jc( $jc(
$jc( $jc(
$jc( $jc(
$jc($jc($jc($jc($jc($jc($jc($jc($jc(0, name.hashCode), balance.hashCode), paidToDate.hashCode), address1.hashCode), address2.hashCode), city.hashCode), state.hashCode), postalCode.hashCode), $jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, name.hashCode), balance.hashCode), paidToDate.hashCode), address1.hashCode), address2.hashCode), city.hashCode), state.hashCode), postalCode.hashCode), countryId.hashCode), workPhone.hashCode),
countryId.hashCode), privateNotes.hashCode),
workPhone.hashCode), lastLogin.hashCode),
privateNotes.hashCode), website.hashCode),
lastLogin.hashCode), vatNumber.hashCode),
website.hashCode), idNumber.hashCode),
vatNumber.hashCode), currencyId.hashCode),
idNumber.hashCode), customValue1.hashCode),
currencyId.hashCode), customValue2.hashCode),
customValue1.hashCode), customValue3.hashCode),
customValue2.hashCode), customValue4.hashCode),
contacts.hashCode), contacts.hashCode),
isChanged.hashCode), isChanged.hashCode),
createdAt.hashCode), createdAt.hashCode),
@ -940,6 +968,8 @@ class _$VendorEntity extends VendorEntity {
..add('currencyId', currencyId) ..add('currencyId', currencyId)
..add('customValue1', customValue1) ..add('customValue1', customValue1)
..add('customValue2', customValue2) ..add('customValue2', customValue2)
..add('customValue3', customValue3)
..add('customValue4', customValue4)
..add('contacts', contacts) ..add('contacts', contacts)
..add('isChanged', isChanged) ..add('isChanged', isChanged)
..add('createdAt', createdAt) ..add('createdAt', createdAt)
@ -1029,6 +1059,14 @@ class VendorEntityBuilder
String get customValue2 => _$this._customValue2; String get customValue2 => _$this._customValue2;
set customValue2(String customValue2) => _$this._customValue2 = customValue2; set customValue2(String customValue2) => _$this._customValue2 = customValue2;
String _customValue3;
String get customValue3 => _$this._customValue3;
set customValue3(String customValue3) => _$this._customValue3 = customValue3;
String _customValue4;
String get customValue4 => _$this._customValue4;
set customValue4(String customValue4) => _$this._customValue4 = customValue4;
ListBuilder<VendorContactEntity> _contacts; ListBuilder<VendorContactEntity> _contacts;
ListBuilder<VendorContactEntity> get contacts => ListBuilder<VendorContactEntity> get contacts =>
_$this._contacts ??= new ListBuilder<VendorContactEntity>(); _$this._contacts ??= new ListBuilder<VendorContactEntity>();
@ -1091,6 +1129,8 @@ class VendorEntityBuilder
_currencyId = _$v.currencyId; _currencyId = _$v.currencyId;
_customValue1 = _$v.customValue1; _customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2; _customValue2 = _$v.customValue2;
_customValue3 = _$v.customValue3;
_customValue4 = _$v.customValue4;
_contacts = _$v.contacts?.toBuilder(); _contacts = _$v.contacts?.toBuilder();
_isChanged = _$v.isChanged; _isChanged = _$v.isChanged;
_createdAt = _$v.createdAt; _createdAt = _$v.createdAt;
@ -1142,6 +1182,8 @@ class VendorEntityBuilder
currencyId: currencyId, currencyId: currencyId,
customValue1: customValue1, customValue1: customValue1,
customValue2: customValue2, customValue2: customValue2,
customValue3: customValue3,
customValue4: customValue4,
contacts: contacts.build(), contacts: contacts.build(),
isChanged: isChanged, isChanged: isChanged,
createdAt: createdAt, createdAt: createdAt,