Fix change detection

This commit is contained in:
Hillel Coren 2019-09-24 23:05:23 +03:00
parent 0362f00fb8
commit 7edbfa7f1d
42 changed files with 450 additions and 174 deletions

View File

@ -57,6 +57,7 @@ abstract class ClientEntity extends Object
factory ClientEntity({String id}) {
return _$ClientEntity._(
id: id ?? BaseEntity.nextId,
isChanged: false,
name: '',
displayName: '',
balance: 0.0,
@ -459,6 +460,7 @@ abstract class ContactEntity extends Object
factory ContactEntity() {
return _$ContactEntity._(
id: BaseEntity.nextId,
isChanged: false,
firstName: '',
lastName: '',
email: '',

View File

@ -900,6 +900,8 @@ class _$ClientEntity extends ClientEntity {
@override
final BuiltList<ActivityEntity> activities;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -954,6 +956,7 @@ class _$ClientEntity extends ClientEntity {
this.customValue2,
this.contacts,
this.activities,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -1073,6 +1076,9 @@ class _$ClientEntity extends ClientEntity {
if (activities == null) {
throw new BuiltValueNullFieldError('ClientEntity', 'activities');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('ClientEntity', 'isChanged');
}
}
@override
@ -1124,6 +1130,7 @@ class _$ClientEntity extends ClientEntity {
customValue2 == other.customValue2 &&
contacts == other.contacts &&
activities == other.activities &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -1152,8 +1159,7 @@ class _$ClientEntity extends ClientEntity {
$jc(
$jc(
$jc(
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, lastUpdatedActivities.hashCode), name.hashCode), displayName.hashCode), balance.hashCode), paidToDate.hashCode), address1.hashCode), address2.hashCode), city.hashCode), state.hashCode), postalCode.hashCode), countryId.hashCode), workPhone.hashCode), privateNotes.hashCode), publicNotes.hashCode), website.hashCode), industryId.hashCode), sizeId.hashCode), paymentTerms.hashCode), vatNumber.hashCode), idNumber.hashCode), languageId.hashCode), currencyId.hashCode), invoiceNumberCounter.hashCode), quoteNumberCounter.hashCode), taskRate.hashCode),
shippingAddress1.hashCode),
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, lastUpdatedActivities.hashCode), name.hashCode), displayName.hashCode), balance.hashCode), paidToDate.hashCode), address1.hashCode), address2.hashCode), city.hashCode), state.hashCode), postalCode.hashCode), countryId.hashCode), workPhone.hashCode), privateNotes.hashCode), publicNotes.hashCode), website.hashCode), industryId.hashCode), sizeId.hashCode), paymentTerms.hashCode), vatNumber.hashCode), idNumber.hashCode), languageId.hashCode), currencyId.hashCode), invoiceNumberCounter.hashCode), quoteNumberCounter.hashCode), taskRate.hashCode), shippingAddress1.hashCode),
shippingAddress2.hashCode),
shippingCity.hashCode),
shippingState.hashCode),
@ -1166,6 +1172,7 @@ class _$ClientEntity extends ClientEntity {
customValue2.hashCode),
contacts.hashCode),
activities.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -1215,6 +1222,7 @@ class _$ClientEntity extends ClientEntity {
..add('customValue2', customValue2)
..add('contacts', contacts)
..add('activities', activities)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -1396,6 +1404,10 @@ class ClientEntityBuilder
set activities(ListBuilder<ActivityEntity> activities) =>
_$this._activities = activities;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -1462,6 +1474,7 @@ class ClientEntityBuilder
_customValue2 = _$v.customValue2;
_contacts = _$v.contacts?.toBuilder();
_activities = _$v.activities?.toBuilder();
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -1530,6 +1543,7 @@ class ClientEntityBuilder
customValue2: customValue2,
contacts: contacts.build(),
activities: activities.build(),
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,
@ -1576,6 +1590,8 @@ class _$ContactEntity extends ContactEntity {
@override
final String customValue2;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -1602,6 +1618,7 @@ class _$ContactEntity extends ContactEntity {
this.sendInvoice,
this.customValue1,
this.customValue2,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -1636,6 +1653,9 @@ class _$ContactEntity extends ContactEntity {
if (customValue2 == null) {
throw new BuiltValueNullFieldError('ContactEntity', 'customValue2');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('ContactEntity', 'isChanged');
}
}
@override
@ -1659,6 +1679,7 @@ class _$ContactEntity extends ContactEntity {
sendInvoice == other.sendInvoice &&
customValue1 == other.customValue1 &&
customValue2 == other.customValue2 &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -1683,6 +1704,7 @@ class _$ContactEntity extends ContactEntity {
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
0,
@ -1698,6 +1720,7 @@ class _$ContactEntity extends ContactEntity {
sendInvoice.hashCode),
customValue1.hashCode),
customValue2.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -1719,6 +1742,7 @@ class _$ContactEntity extends ContactEntity {
..add('sendInvoice', sendInvoice)
..add('customValue1', customValue1)
..add('customValue2', customValue2)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -1773,6 +1797,10 @@ class ContactEntityBuilder
String get customValue2 => _$this._customValue2;
set customValue2(String customValue2) => _$this._customValue2 = customValue2;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -1811,6 +1839,7 @@ class ContactEntityBuilder
_sendInvoice = _$v.sendInvoice;
_customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -1849,6 +1878,7 @@ class ContactEntityBuilder
sendInvoice: sendInvoice,
customValue1: customValue1,
customValue2: customValue2,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,

View File

@ -53,6 +53,7 @@ abstract class CreditEntity extends Object
factory CreditEntity() {
return _$CreditEntity._(
id: BaseEntity.nextId,
isChanged: false,
amount: 0.0,
balance: 0.0,
creditDate: '',

View File

@ -446,6 +446,8 @@ class _$CreditEntity extends CreditEntity {
@override
final int clientId;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -469,6 +471,7 @@ class _$CreditEntity extends CreditEntity {
this.privateNotes,
this.publicNotes,
this.clientId,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -497,6 +500,9 @@ class _$CreditEntity extends CreditEntity {
if (clientId == null) {
throw new BuiltValueNullFieldError('CreditEntity', 'clientId');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('CreditEntity', 'isChanged');
}
}
@override
@ -517,6 +523,7 @@ class _$CreditEntity extends CreditEntity {
privateNotes == other.privateNotes &&
publicNotes == other.publicNotes &&
clientId == other.clientId &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -536,6 +543,7 @@ class _$CreditEntity extends CreditEntity {
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc($jc(0, amount.hashCode),
@ -545,6 +553,7 @@ class _$CreditEntity extends CreditEntity {
privateNotes.hashCode),
publicNotes.hashCode),
clientId.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -563,6 +572,7 @@ class _$CreditEntity extends CreditEntity {
..add('privateNotes', privateNotes)
..add('publicNotes', publicNotes)
..add('clientId', clientId)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -605,6 +615,10 @@ class CreditEntityBuilder
int get clientId => _$this._clientId;
set clientId(int clientId) => _$this._clientId = clientId;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -640,6 +654,7 @@ class CreditEntityBuilder
_privateNotes = _$v.privateNotes;
_publicNotes = _$v.publicNotes;
_clientId = _$v.clientId;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -675,6 +690,7 @@ class CreditEntityBuilder
privateNotes: privateNotes,
publicNotes: publicNotes,
clientId: clientId,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,

View File

@ -48,6 +48,7 @@ abstract class DocumentEntity extends Object
factory DocumentEntity({String id}) {
return _$DocumentEntity._(
id: id ?? BaseEntity.nextId,
isChanged: false,
name: '',
path: '',
type: '',

View File

@ -484,6 +484,8 @@ class _$DocumentEntity extends DocumentEntity {
@override
final bool isDefault;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -510,6 +512,7 @@ class _$DocumentEntity extends DocumentEntity {
this.invoiceId,
this.expenseId,
this.isDefault,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -541,6 +544,9 @@ class _$DocumentEntity extends DocumentEntity {
if (isDefault == null) {
throw new BuiltValueNullFieldError('DocumentEntity', 'isDefault');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('DocumentEntity', 'isChanged');
}
}
@override
@ -565,6 +571,7 @@ class _$DocumentEntity extends DocumentEntity {
invoiceId == other.invoiceId &&
expenseId == other.expenseId &&
isDefault == other.isDefault &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -588,6 +595,7 @@ class _$DocumentEntity extends DocumentEntity {
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(0,
@ -601,6 +609,7 @@ class _$DocumentEntity extends DocumentEntity {
invoiceId.hashCode),
expenseId.hashCode),
isDefault.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -622,6 +631,7 @@ class _$DocumentEntity extends DocumentEntity {
..add('invoiceId', invoiceId)
..add('expenseId', expenseId)
..add('isDefault', isDefault)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -676,6 +686,10 @@ class DocumentEntityBuilder
bool get isDefault => _$this._isDefault;
set isDefault(bool isDefault) => _$this._isDefault = isDefault;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -714,6 +728,7 @@ class DocumentEntityBuilder
_invoiceId = _$v.invoiceId;
_expenseId = _$v.expenseId;
_isDefault = _$v.isDefault;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -752,6 +767,7 @@ class DocumentEntityBuilder
invoiceId: invoiceId,
expenseId: expenseId,
isDefault: isDefault,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,

View File

@ -115,6 +115,9 @@ abstract class BaseEntity implements SelectableEntity {
static String get nextId => '${--counter}';
@BuiltValueField(serialize: false)
bool get isChanged;
@nullable
@BuiltValueField(wireName: 'created_at')
int get createdAt;

View File

@ -75,6 +75,7 @@ abstract class ExpenseEntity extends Object
ClientEntity client}) {
return _$ExpenseEntity._(
id: id ?? BaseEntity.nextId,
isChanged: false,
privateNotes: '',
publicNotes: '',
shouldBeInvoiced: false,
@ -383,6 +384,7 @@ abstract class ExpenseCategoryEntity extends Object
factory ExpenseCategoryEntity() {
return _$ExpenseCategoryEntity._(
id: BaseEntity.nextId,
isChanged: false,
name: '',
isDeleted: false,
);

View File

@ -779,6 +779,8 @@ class _$ExpenseEntity extends ExpenseEntity {
@override
final String customValue2;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -819,6 +821,7 @@ class _$ExpenseEntity extends ExpenseEntity {
this.vendorId,
this.customValue1,
this.customValue2,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -887,6 +890,9 @@ class _$ExpenseEntity extends ExpenseEntity {
if (customValue2 == null) {
throw new BuiltValueNullFieldError('ExpenseEntity', 'customValue2');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('ExpenseEntity', 'isChanged');
}
}
@override
@ -924,6 +930,7 @@ class _$ExpenseEntity extends ExpenseEntity {
vendorId == other.vendorId &&
customValue1 == other.customValue1 &&
customValue2 == other.customValue2 &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -952,8 +959,7 @@ class _$ExpenseEntity extends ExpenseEntity {
$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),
$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),
@ -966,6 +972,7 @@ class _$ExpenseEntity extends ExpenseEntity {
vendorId.hashCode),
customValue1.hashCode),
customValue2.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -1001,6 +1008,7 @@ class _$ExpenseEntity extends ExpenseEntity {
..add('vendorId', vendorId)
..add('customValue1', customValue1)
..add('customValue2', customValue2)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -1118,6 +1126,10 @@ class ExpenseEntityBuilder
String get customValue2 => _$this._customValue2;
set customValue2(String customValue2) => _$this._customValue2 = customValue2;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -1170,6 +1182,7 @@ class ExpenseEntityBuilder
_vendorId = _$v.vendorId;
_customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -1222,6 +1235,7 @@ class ExpenseEntityBuilder
vendorId: vendorId,
customValue1: customValue1,
customValue2: customValue2,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,
@ -1237,6 +1251,8 @@ class _$ExpenseCategoryEntity extends ExpenseCategoryEntity {
@override
final String name;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -1255,6 +1271,7 @@ class _$ExpenseCategoryEntity extends ExpenseCategoryEntity {
_$ExpenseCategoryEntity._(
{this.name,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -1265,6 +1282,9 @@ class _$ExpenseCategoryEntity extends ExpenseCategoryEntity {
if (name == null) {
throw new BuiltValueNullFieldError('ExpenseCategoryEntity', 'name');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('ExpenseCategoryEntity', 'isChanged');
}
}
@override
@ -1281,6 +1301,7 @@ class _$ExpenseCategoryEntity extends ExpenseCategoryEntity {
if (identical(other, this)) return true;
return other is ExpenseCategoryEntity &&
name == other.name &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -1295,7 +1316,9 @@ class _$ExpenseCategoryEntity extends ExpenseCategoryEntity {
$jc(
$jc(
$jc(
$jc($jc($jc(0, name.hashCode), createdAt.hashCode),
$jc(
$jc($jc($jc(0, name.hashCode), isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
isDeleted.hashCode),
@ -1307,6 +1330,7 @@ class _$ExpenseCategoryEntity extends ExpenseCategoryEntity {
String toString() {
return (newBuiltValueToStringHelper('ExpenseCategoryEntity')
..add('name', name)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -1325,6 +1349,10 @@ class ExpenseCategoryEntityBuilder
String get name => _$this._name;
set name(String name) => _$this._name = name;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -1354,6 +1382,7 @@ class ExpenseCategoryEntityBuilder
ExpenseCategoryEntityBuilder get _$this {
if (_$v != null) {
_name = _$v.name;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -1383,6 +1412,7 @@ class ExpenseCategoryEntityBuilder
final _$result = _$v ??
new _$ExpenseCategoryEntity._(
name: name,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,

View File

@ -90,6 +90,7 @@ abstract class InvoiceEntity extends Object
{String id, bool isQuote = false, CompanyEntity company}) {
return _$InvoiceEntity._(
id: id ?? BaseEntity.nextId,
isChanged: false,
amount: 0.0,
balance: 0.0,
clientId: '',
@ -533,6 +534,7 @@ abstract class InvoiceItemEntity extends Object
factory InvoiceItemEntity() {
return _$InvoiceItemEntity._(
id: BaseEntity.nextId,
isChanged: false,
productKey: '',
notes: '',
cost: 0.0,
@ -664,6 +666,7 @@ abstract class InvitationEntity extends Object
factory InvitationEntity() {
return _$InvitationEntity._(
id: BaseEntity.nextId,
isChanged: false,
key: '',
link: '',
sentDate: '',

View File

@ -1108,6 +1108,8 @@ class _$InvoiceEntity extends InvoiceEntity {
@override
final String designId;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -1167,6 +1169,7 @@ class _$InvoiceEntity extends InvoiceEntity {
this.invoiceItems,
this.invitations,
this.designId,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -1300,6 +1303,9 @@ class _$InvoiceEntity extends InvoiceEntity {
if (invitations == null) {
throw new BuiltValueNullFieldError('InvoiceEntity', 'invitations');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('InvoiceEntity', 'isChanged');
}
}
@override
@ -1356,6 +1362,7 @@ class _$InvoiceEntity extends InvoiceEntity {
invoiceItems == other.invoiceItems &&
invitations == other.invitations &&
designId == other.designId &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -1384,8 +1391,7 @@ class _$InvoiceEntity extends InvoiceEntity {
$jc(
$jc(
$jc(
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, amount.hashCode), balance.hashCode), isQuote.hashCode), clientId.hashCode), invoiceStatusId.hashCode), invoiceNumber.hashCode), discount.hashCode), poNumber.hashCode), invoiceDate.hashCode), dueDate.hashCode), terms.hashCode), publicNotes.hashCode), privateNotes.hashCode), invoiceTypeId.hashCode), isRecurring.hashCode), frequencyId.hashCode), startDate.hashCode), endDate.hashCode), lastSentDate.hashCode), recurringInvoiceId.hashCode), taxName1.hashCode), taxRate1.hashCode), taxName2.hashCode), taxRate2.hashCode), isAmountDiscount.hashCode), invoiceFooter.hashCode), partial.hashCode), partialDueDate.hashCode), hasTasks.hashCode), autoBill.hashCode),
customValue1.hashCode),
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, amount.hashCode), balance.hashCode), isQuote.hashCode), clientId.hashCode), invoiceStatusId.hashCode), invoiceNumber.hashCode), discount.hashCode), poNumber.hashCode), invoiceDate.hashCode), dueDate.hashCode), terms.hashCode), publicNotes.hashCode), privateNotes.hashCode), invoiceTypeId.hashCode), isRecurring.hashCode), frequencyId.hashCode), startDate.hashCode), endDate.hashCode), lastSentDate.hashCode), recurringInvoiceId.hashCode), taxName1.hashCode), taxRate1.hashCode), taxName2.hashCode), taxRate2.hashCode), isAmountDiscount.hashCode), invoiceFooter.hashCode), partial.hashCode), partialDueDate.hashCode), hasTasks.hashCode), autoBill.hashCode), customValue1.hashCode),
customValue2.hashCode),
customTaxes1.hashCode),
customTaxes2.hashCode),
@ -1398,6 +1404,7 @@ class _$InvoiceEntity extends InvoiceEntity {
invoiceItems.hashCode),
invitations.hashCode),
designId.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -1452,6 +1459,7 @@ class _$InvoiceEntity extends InvoiceEntity {
..add('invoiceItems', invoiceItems)
..add('invitations', invitations)
..add('designId', designId)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -1651,6 +1659,10 @@ class InvoiceEntityBuilder
String get designId => _$this._designId;
set designId(String designId) => _$this._designId = designId;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -1722,6 +1734,7 @@ class InvoiceEntityBuilder
_invoiceItems = _$v.invoiceItems?.toBuilder();
_invitations = _$v.invitations?.toBuilder();
_designId = _$v.designId;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -1795,6 +1808,7 @@ class InvoiceEntityBuilder
invoiceItems: invoiceItems.build(),
invitations: invitations.build(),
designId: designId,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,
@ -1849,6 +1863,8 @@ class _$InvoiceItemEntity extends InvoiceItemEntity {
@override
final String expenseId;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -1880,6 +1896,7 @@ class _$InvoiceItemEntity extends InvoiceItemEntity {
this.discount,
this.taskId,
this.expenseId,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -1924,6 +1941,9 @@ class _$InvoiceItemEntity extends InvoiceItemEntity {
if (discount == null) {
throw new BuiltValueNullFieldError('InvoiceItemEntity', 'discount');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('InvoiceItemEntity', 'isChanged');
}
}
@override
@ -1952,6 +1972,7 @@ class _$InvoiceItemEntity extends InvoiceItemEntity {
discount == other.discount &&
taskId == other.taskId &&
expenseId == other.expenseId &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -1980,8 +2001,7 @@ class _$InvoiceItemEntity extends InvoiceItemEntity {
$jc(
$jc(
$jc(
$jc($jc(0, productKey.hashCode),
notes.hashCode),
$jc($jc($jc(0, productKey.hashCode), notes.hashCode),
cost.hashCode),
qty.hashCode),
taxName1.hashCode),
@ -1994,6 +2014,7 @@ class _$InvoiceItemEntity extends InvoiceItemEntity {
discount.hashCode),
taskId.hashCode),
expenseId.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -2019,6 +2040,7 @@ class _$InvoiceItemEntity extends InvoiceItemEntity {
..add('discount', discount)
..add('taskId', taskId)
..add('expenseId', expenseId)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -2090,6 +2112,10 @@ class InvoiceItemEntityBuilder
String get expenseId => _$this._expenseId;
set expenseId(String expenseId) => _$this._expenseId = expenseId;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -2132,6 +2158,7 @@ class InvoiceItemEntityBuilder
_discount = _$v.discount;
_taskId = _$v.taskId;
_expenseId = _$v.expenseId;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -2174,6 +2201,7 @@ class InvoiceItemEntityBuilder
discount: discount,
taskId: taskId,
expenseId: expenseId,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,
@ -2195,6 +2223,8 @@ class _$InvitationEntity extends InvitationEntity {
@override
final String viewedDate;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -2216,6 +2246,7 @@ class _$InvitationEntity extends InvitationEntity {
this.link,
this.sentDate,
this.viewedDate,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -2235,6 +2266,9 @@ class _$InvitationEntity extends InvitationEntity {
if (viewedDate == null) {
throw new BuiltValueNullFieldError('InvitationEntity', 'viewedDate');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('InvitationEntity', 'isChanged');
}
}
@override
@ -2253,6 +2287,7 @@ class _$InvitationEntity extends InvitationEntity {
link == other.link &&
sentDate == other.sentDate &&
viewedDate == other.viewedDate &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -2270,9 +2305,13 @@ class _$InvitationEntity extends InvitationEntity {
$jc(
$jc(
$jc(
$jc($jc($jc(0, key.hashCode), link.hashCode),
$jc(
$jc(
$jc($jc(0, key.hashCode),
link.hashCode),
sentDate.hashCode),
viewedDate.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -2288,6 +2327,7 @@ class _$InvitationEntity extends InvitationEntity {
..add('link', link)
..add('sentDate', sentDate)
..add('viewedDate', viewedDate)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -2318,6 +2358,10 @@ class InvitationEntityBuilder
String get viewedDate => _$this._viewedDate;
set viewedDate(String viewedDate) => _$this._viewedDate = viewedDate;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -2350,6 +2394,7 @@ class InvitationEntityBuilder
_link = _$v.link;
_sentDate = _$v.sentDate;
_viewedDate = _$v.viewedDate;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -2382,6 +2427,7 @@ class InvitationEntityBuilder
link: link,
sentDate: sentDate,
viewedDate: viewedDate,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,

View File

@ -57,6 +57,7 @@ abstract class PaymentEntity extends Object
factory PaymentEntity({String id, CompanyEntity company}) {
return _$PaymentEntity._(
id: id ?? BaseEntity.nextId,
isChanged: false,
amount: 0.0,
transactionReference: '',
paymentDate: convertDateTimeToSqlDate(),

View File

@ -503,6 +503,8 @@ class _$PaymentEntity extends PaymentEntity {
@override
final String exchangeCurrencyId;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -531,6 +533,7 @@ class _$PaymentEntity extends PaymentEntity {
this.privateNotes,
this.exchangeRate,
this.exchangeCurrencyId,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -572,6 +575,9 @@ class _$PaymentEntity extends PaymentEntity {
if (exchangeCurrencyId == null) {
throw new BuiltValueNullFieldError('PaymentEntity', 'exchangeCurrencyId');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('PaymentEntity', 'isChanged');
}
}
@override
@ -597,6 +603,7 @@ class _$PaymentEntity extends PaymentEntity {
privateNotes == other.privateNotes &&
exchangeRate == other.exchangeRate &&
exchangeCurrencyId == other.exchangeCurrencyId &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -623,6 +630,7 @@ class _$PaymentEntity extends PaymentEntity {
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
0,
@ -636,13 +644,15 @@ class _$PaymentEntity extends PaymentEntity {
.hashCode),
paymentDate
.hashCode),
paymentTypeId.hashCode),
paymentTypeId
.hashCode),
invoiceId.hashCode),
clientId.hashCode),
invoiceNumber.hashCode),
privateNotes.hashCode),
exchangeRate.hashCode),
exchangeCurrencyId.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -666,6 +676,7 @@ class _$PaymentEntity extends PaymentEntity {
..add('privateNotes', privateNotes)
..add('exchangeRate', exchangeRate)
..add('exchangeCurrencyId', exchangeCurrencyId)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -733,6 +744,10 @@ class PaymentEntityBuilder
set exchangeCurrencyId(String exchangeCurrencyId) =>
_$this._exchangeCurrencyId = exchangeCurrencyId;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -773,6 +788,7 @@ class PaymentEntityBuilder
_privateNotes = _$v.privateNotes;
_exchangeRate = _$v.exchangeRate;
_exchangeCurrencyId = _$v.exchangeCurrencyId;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -813,6 +829,7 @@ class PaymentEntityBuilder
privateNotes: privateNotes,
exchangeRate: exchangeRate,
exchangeCurrencyId: exchangeCurrencyId,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,

View File

@ -50,6 +50,7 @@ abstract class ProductEntity extends Object
factory ProductEntity({String id}) {
return _$ProductEntity._(
id: id ?? BaseEntity.nextId,
isChanged: false,
productKey: '',
notes: '',
cost: 0,

View File

@ -481,6 +481,8 @@ class _$ProductEntity extends ProductEntity {
@override
final String customValue2;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -507,6 +509,7 @@ class _$ProductEntity extends ProductEntity {
this.taxRate2,
this.customValue1,
this.customValue2,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -544,6 +547,9 @@ class _$ProductEntity extends ProductEntity {
if (customValue2 == null) {
throw new BuiltValueNullFieldError('ProductEntity', 'customValue2');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('ProductEntity', 'isChanged');
}
}
@override
@ -567,6 +573,7 @@ class _$ProductEntity extends ProductEntity {
taxRate2 == other.taxRate2 &&
customValue1 == other.customValue1 &&
customValue2 == other.customValue2 &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -591,12 +598,14 @@ class _$ProductEntity extends ProductEntity {
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
0,
productKey
.hashCode),
notes.hashCode),
notes
.hashCode),
cost.hashCode),
quantity.hashCode),
taxName1.hashCode),
@ -605,6 +614,7 @@ class _$ProductEntity extends ProductEntity {
taxRate2.hashCode),
customValue1.hashCode),
customValue2.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -626,6 +636,7 @@ class _$ProductEntity extends ProductEntity {
..add('taxRate2', taxRate2)
..add('customValue1', customValue1)
..add('customValue2', customValue2)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -680,6 +691,10 @@ class ProductEntityBuilder
String get customValue2 => _$this._customValue2;
set customValue2(String customValue2) => _$this._customValue2 = customValue2;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -718,6 +733,7 @@ class ProductEntityBuilder
_taxRate2 = _$v.taxRate2;
_customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -756,6 +772,7 @@ class ProductEntityBuilder
taxRate2: taxRate2,
customValue1: customValue1,
customValue2: customValue2,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,

View File

@ -54,6 +54,7 @@ abstract class ProjectEntity extends Object
factory ProjectEntity({String id}) {
return _$ProjectEntity._(
id: id ?? BaseEntity.nextId,
isChanged: false,
name: '',
clientId: '',
taskRate: 0.0,

View File

@ -463,6 +463,8 @@ class _$ProjectEntity extends ProjectEntity {
@override
final String customValue2;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -487,6 +489,7 @@ class _$ProjectEntity extends ProjectEntity {
this.budgetedHours,
this.customValue1,
this.customValue2,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -518,6 +521,9 @@ class _$ProjectEntity extends ProjectEntity {
if (customValue2 == null) {
throw new BuiltValueNullFieldError('ProjectEntity', 'customValue2');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('ProjectEntity', 'isChanged');
}
}
@override
@ -539,6 +545,7 @@ class _$ProjectEntity extends ProjectEntity {
budgetedHours == other.budgetedHours &&
customValue1 == other.customValue1 &&
customValue2 == other.customValue2 &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -561,7 +568,10 @@ class _$ProjectEntity extends ProjectEntity {
$jc(
$jc(
$jc(
$jc($jc(0, name.hashCode),
$jc(
$jc(
$jc(0,
name.hashCode),
clientId.hashCode),
taskRate.hashCode),
dueDate.hashCode),
@ -569,6 +579,7 @@ class _$ProjectEntity extends ProjectEntity {
budgetedHours.hashCode),
customValue1.hashCode),
customValue2.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -588,6 +599,7 @@ class _$ProjectEntity extends ProjectEntity {
..add('budgetedHours', budgetedHours)
..add('customValue1', customValue1)
..add('customValue2', customValue2)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -635,6 +647,10 @@ class ProjectEntityBuilder
String get customValue2 => _$this._customValue2;
set customValue2(String customValue2) => _$this._customValue2 = customValue2;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -671,6 +687,7 @@ class ProjectEntityBuilder
_budgetedHours = _$v.budgetedHours;
_customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -707,6 +724,7 @@ class ProjectEntityBuilder
budgetedHours: budgetedHours,
customValue1: customValue1,
customValue2: customValue2,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,

View File

@ -130,6 +130,7 @@ abstract class TaskEntity extends Object
factory TaskEntity({String id, bool isRunning = false}) {
return _$TaskEntity._(
id: id ?? BaseEntity.nextId,
isChanged: false,
description: '',
duration: 0,
invoiceId: null,

View File

@ -686,6 +686,8 @@ class _$TaskEntity extends TaskEntity {
@override
final int taskStatusSortOrder;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -713,6 +715,7 @@ class _$TaskEntity extends TaskEntity {
this.customValue2,
this.taskStatusId,
this.taskStatusSortOrder,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -738,6 +741,9 @@ class _$TaskEntity extends TaskEntity {
if (customValue2 == null) {
throw new BuiltValueNullFieldError('TaskEntity', 'customValue2');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('TaskEntity', 'isChanged');
}
}
@override
@ -762,6 +768,7 @@ class _$TaskEntity extends TaskEntity {
customValue2 == other.customValue2 &&
taskStatusId == other.taskStatusId &&
taskStatusSortOrder == other.taskStatusSortOrder &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -787,6 +794,7 @@ class _$TaskEntity extends TaskEntity {
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
0,
@ -796,7 +804,8 @@ class _$TaskEntity extends TaskEntity {
.hashCode),
invoiceId
.hashCode),
clientId.hashCode),
clientId
.hashCode),
projectId.hashCode),
timeLog.hashCode),
isRunning.hashCode),
@ -804,6 +813,7 @@ class _$TaskEntity extends TaskEntity {
customValue2.hashCode),
taskStatusId.hashCode),
taskStatusSortOrder.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -826,6 +836,7 @@ class _$TaskEntity extends TaskEntity {
..add('customValue2', customValue2)
..add('taskStatusId', taskStatusId)
..add('taskStatusSortOrder', taskStatusSortOrder)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -884,6 +895,10 @@ class TaskEntityBuilder implements Builder<TaskEntity, TaskEntityBuilder> {
set taskStatusSortOrder(int taskStatusSortOrder) =>
_$this._taskStatusSortOrder = taskStatusSortOrder;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -923,6 +938,7 @@ class TaskEntityBuilder implements Builder<TaskEntity, TaskEntityBuilder> {
_customValue2 = _$v.customValue2;
_taskStatusId = _$v.taskStatusId;
_taskStatusSortOrder = _$v.taskStatusSortOrder;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -962,6 +978,7 @@ class TaskEntityBuilder implements Builder<TaskEntity, TaskEntityBuilder> {
customValue2: customValue2,
taskStatusId: taskStatusId,
taskStatusSortOrder: taskStatusSortOrder,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,

View File

@ -64,6 +64,7 @@ abstract class VendorEntity extends Object
factory VendorEntity({String id}) {
return _$VendorEntity._(
id: id ?? BaseEntity.nextId,
isChanged: false,
name: '',
balance: 0.0,
paidToDate: 0.0,
@ -282,6 +283,7 @@ abstract class VendorContactEntity extends Object
factory VendorContactEntity() {
return _$VendorContactEntity._(
id: BaseEntity.nextId,
isChanged: false,
firstName: '',
lastName: '',
email: '',

View File

@ -690,6 +690,8 @@ class _$VendorEntity extends VendorEntity {
@override
final BuiltList<VendorContactEntity> contacts;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -725,6 +727,7 @@ class _$VendorEntity extends VendorEntity {
this.customValue1,
this.customValue2,
this.contacts,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -789,6 +792,9 @@ class _$VendorEntity extends VendorEntity {
if (contacts == null) {
throw new BuiltValueNullFieldError('VendorEntity', 'contacts');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('VendorEntity', 'isChanged');
}
}
@override
@ -821,6 +827,7 @@ class _$VendorEntity extends VendorEntity {
customValue1 == other.customValue1 &&
customValue2 == other.customValue2 &&
contacts == other.contacts &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -849,8 +856,7 @@ class _$VendorEntity extends VendorEntity {
$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),
$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),
@ -863,6 +869,7 @@ class _$VendorEntity extends VendorEntity {
customValue1.hashCode),
customValue2.hashCode),
contacts.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -893,6 +900,7 @@ class _$VendorEntity extends VendorEntity {
..add('customValue1', customValue1)
..add('customValue2', customValue2)
..add('contacts', contacts)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -985,6 +993,10 @@ class VendorEntityBuilder
set contacts(ListBuilder<VendorContactEntity> contacts) =>
_$this._contacts = contacts;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -1032,6 +1044,7 @@ class VendorEntityBuilder
_customValue1 = _$v.customValue1;
_customValue2 = _$v.customValue2;
_contacts = _$v.contacts?.toBuilder();
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -1081,6 +1094,7 @@ class VendorEntityBuilder
customValue1: customValue1,
customValue2: customValue2,
contacts: contacts.build(),
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,
@ -1115,6 +1129,8 @@ class _$VendorContactEntity extends VendorContactEntity {
@override
final String phone;
@override
final bool isChanged;
@override
final int createdAt;
@override
final int updatedAt;
@ -1137,6 +1153,7 @@ class _$VendorContactEntity extends VendorContactEntity {
this.email,
this.isPrimary,
this.phone,
this.isChanged,
this.createdAt,
this.updatedAt,
this.archivedAt,
@ -1159,6 +1176,9 @@ class _$VendorContactEntity extends VendorContactEntity {
if (phone == null) {
throw new BuiltValueNullFieldError('VendorContactEntity', 'phone');
}
if (isChanged == null) {
throw new BuiltValueNullFieldError('VendorContactEntity', 'isChanged');
}
}
@override
@ -1179,6 +1199,7 @@ class _$VendorContactEntity extends VendorContactEntity {
email == other.email &&
isPrimary == other.isPrimary &&
phone == other.phone &&
isChanged == other.isChanged &&
createdAt == other.createdAt &&
updatedAt == other.updatedAt &&
archivedAt == other.archivedAt &&
@ -1196,6 +1217,7 @@ class _$VendorContactEntity extends VendorContactEntity {
$jc(
$jc(
$jc(
$jc(
$jc(
$jc(
$jc($jc(0, firstName.hashCode),
@ -1203,6 +1225,7 @@ class _$VendorContactEntity extends VendorContactEntity {
email.hashCode),
isPrimary.hashCode),
phone.hashCode),
isChanged.hashCode),
createdAt.hashCode),
updatedAt.hashCode),
archivedAt.hashCode),
@ -1219,6 +1242,7 @@ class _$VendorContactEntity extends VendorContactEntity {
..add('email', email)
..add('isPrimary', isPrimary)
..add('phone', phone)
..add('isChanged', isChanged)
..add('createdAt', createdAt)
..add('updatedAt', updatedAt)
..add('archivedAt', archivedAt)
@ -1253,6 +1277,10 @@ class VendorContactEntityBuilder
String get phone => _$this._phone;
set phone(String phone) => _$this._phone = phone;
bool _isChanged;
bool get isChanged => _$this._isChanged;
set isChanged(bool isChanged) => _$this._isChanged = isChanged;
int _createdAt;
int get createdAt => _$this._createdAt;
set createdAt(int createdAt) => _$this._createdAt = createdAt;
@ -1286,6 +1314,7 @@ class VendorContactEntityBuilder
_email = _$v.email;
_isPrimary = _$v.isPrimary;
_phone = _$v.phone;
_isChanged = _$v.isChanged;
_createdAt = _$v.createdAt;
_updatedAt = _$v.updatedAt;
_archivedAt = _$v.archivedAt;
@ -1319,6 +1348,7 @@ class VendorContactEntityBuilder
email: email,
isPrimary: isPrimary,
phone: phone,
isChanged: isChanged,
createdAt: createdAt,
updatedAt: updatedAt,
archivedAt: archivedAt,

View File

@ -68,7 +68,7 @@ final editingReducer = combineReducers<ClientEntity>([
return action.client;
}),
TypedReducer<ClientEntity, UpdateClient>((client, action) {
return action.client;
return action.client.rebuild((b) => b..isChanged = true);
}),
TypedReducer<ClientEntity, AddContact>((client, action) {
return client

View File

@ -56,4 +56,4 @@ List<String> filteredClientsSelector(BuiltMap<String, ClientEntity> clientMap,
bool hasClientChanges(
ClientEntity client, BuiltMap<String, ClientEntity> clientMap) =>
client.isNew || client != clientMap[client.id];
client.isNew ? client.isChanged : client != clientMap[client.id];

View File

@ -26,7 +26,9 @@ final editingReducer = combineReducers<DocumentEntity>([
TypedReducer<DocumentEntity, ArchiveDocumentSuccess>(_updateEditing),
TypedReducer<DocumentEntity, DeleteDocumentSuccess>(_updateEditing),
TypedReducer<DocumentEntity, EditDocument>(_updateEditing),
TypedReducer<DocumentEntity, UpdateDocument>(_updateEditing),
TypedReducer<DocumentEntity, UpdateDocument>((document, action) {
return action.document.rebuild((b) => b..isChanged = true);
}),
TypedReducer<DocumentEntity, SelectCompany>(_clearEditing),
]);

View File

@ -28,7 +28,9 @@ final editingReducer = combineReducers<ExpenseEntity>([
TypedReducer<ExpenseEntity, ArchiveExpenseSuccess>(_updateEditing),
TypedReducer<ExpenseEntity, DeleteExpenseSuccess>(_updateEditing),
TypedReducer<ExpenseEntity, EditExpense>(_updateEditing),
TypedReducer<ExpenseEntity, UpdateExpense>(_updateEditing),
TypedReducer<ExpenseEntity, UpdateExpense>((expense, action) {
return action.expense.rebuild((b) => b..isChanged = true);
}),
TypedReducer<ExpenseEntity, SelectCompany>(_clearEditing),
]);

View File

@ -208,4 +208,4 @@ List<String> clientExpenseList(
bool hasExpenseChanges(
ExpenseEntity expense, BuiltMap<String, ExpenseEntity> expenseMap) =>
expense.isNew || expense != expenseMap[expense.id];
expense.isNew ? expense.isChanged : expense != expenseMap[expense.id];

View File

@ -48,7 +48,9 @@ final editingReducer = combineReducers<InvoiceEntity>([
TypedReducer<InvoiceEntity, SaveInvoiceSuccess>(_updateEditing),
TypedReducer<InvoiceEntity, AddInvoiceSuccess>(_updateEditing),
TypedReducer<InvoiceEntity, EditInvoice>(_updateEditing),
TypedReducer<InvoiceEntity, UpdateInvoice>(_updateEditing),
TypedReducer<InvoiceEntity, UpdateInvoice>((invoice, action) {
return action.invoice.rebuild((b) => b..isChanged = true);
}),
TypedReducer<InvoiceEntity, RestoreInvoiceSuccess>(_updateEditing),
TypedReducer<InvoiceEntity, ArchiveInvoiceSuccess>(_updateEditing),
TypedReducer<InvoiceEntity, DeleteInvoiceSuccess>(_updateEditing),

View File

@ -132,4 +132,4 @@ String invoiceStatsForClient(
bool hasInvoiceChanges(
InvoiceEntity invoice, BuiltMap<String, InvoiceEntity> invoiceMap) =>
invoice.isNew || invoice != invoiceMap[invoice.id];
invoice.isNew ? invoice.isChanged : invoice != invoiceMap[invoice.id];

View File

@ -28,7 +28,9 @@ final editingReducer = combineReducers<PaymentEntity>([
TypedReducer<PaymentEntity, ArchivePaymentSuccess>(_updateEditing),
TypedReducer<PaymentEntity, DeletePaymentSuccess>(_updateEditing),
TypedReducer<PaymentEntity, EditPayment>(_updateEditing),
TypedReducer<PaymentEntity, UpdatePayment>(_updateEditing),
TypedReducer<PaymentEntity, UpdatePayment>((payment, action) {
return action.payment.rebuild((b) => b..isChanged = true);
}),
TypedReducer<PaymentEntity, SelectCompany>(_clearEditing),
]);

View File

@ -143,4 +143,4 @@ String invoiceStatsForClient(
bool hasPaymentChanges(
PaymentEntity payment, BuiltMap<String, PaymentEntity> paymentMap) =>
payment.isNew || payment != paymentMap[payment.id];
payment.isNew ? payment.isChanged : payment != paymentMap[payment.id];

View File

@ -26,7 +26,9 @@ final editingReducer = combineReducers<ProductEntity>([
TypedReducer<ProductEntity, SaveProductSuccess>(_updateEditing),
TypedReducer<ProductEntity, AddProductSuccess>(_updateEditing),
TypedReducer<ProductEntity, EditProduct>(_updateEditing),
TypedReducer<ProductEntity, UpdateProduct>(_updateEditing),
TypedReducer<ProductEntity, UpdateProduct>((product, action) {
return action.product.rebuild((b) => b..isChanged = true);
}),
TypedReducer<ProductEntity, RestoreProductSuccess>(_updateEditing),
TypedReducer<ProductEntity, ArchiveProductSuccess>(_updateEditing),
TypedReducer<ProductEntity, DeleteProductSuccess>(_updateEditing),

View File

@ -74,4 +74,4 @@ List<String> filteredProductsSelector(
bool hasProductChanges(
ProductEntity product, BuiltMap<String, ProductEntity> productMap) =>
product.isNew || product != productMap[product.id];
product.isNew ? product.isChanged : product != productMap[product.id];

View File

@ -43,7 +43,9 @@ final editingReducer = combineReducers<ProjectEntity>([
TypedReducer<ProjectEntity, RestoreProjectSuccess>(_updateEditing),
TypedReducer<ProjectEntity, ArchiveProjectSuccess>(_updateEditing),
TypedReducer<ProjectEntity, DeleteProjectSuccess>(_updateEditing),
TypedReducer<ProjectEntity, EditProject>(_updateEditing),
TypedReducer<ProjectEntity, EditProject>((project, action) {
return action.project.rebuild((b) => b..isChanged = true);
}),
TypedReducer<ProjectEntity, UpdateProject>(_updateEditing),
TypedReducer<ProjectEntity, SelectCompany>(_clearEditing),
]);

View File

@ -170,4 +170,4 @@ String projectStatsForClient(
bool hasProjectChanges(
ProjectEntity project, BuiltMap<String, ProjectEntity> projectMap) =>
project.isNew || project != projectMap[project.id];
project.isNew ? project.isChanged : project != projectMap[project.id];

View File

@ -46,7 +46,9 @@ final editingReducer = combineReducers<InvoiceEntity>([
TypedReducer<InvoiceEntity, SaveQuoteSuccess>(_updateEditing),
TypedReducer<InvoiceEntity, AddQuoteSuccess>(_updateEditing),
TypedReducer<InvoiceEntity, EditQuote>(_updateEditing),
TypedReducer<InvoiceEntity, UpdateQuote>(_updateEditing),
TypedReducer<InvoiceEntity, UpdateQuote>((quote, action) {
return action.quote.rebuild((b) => b..isChanged = true);
}),
TypedReducer<InvoiceEntity, RestoreQuoteSuccess>(_updateEditing),
TypedReducer<InvoiceEntity, ArchiveQuoteSuccess>(_updateEditing),
TypedReducer<InvoiceEntity, DeleteQuoteSuccess>(_updateEditing),

View File

@ -100,4 +100,4 @@ String quoteStatsForClient(
bool hasQuoteChanges(
InvoiceEntity quote, BuiltMap<String, InvoiceEntity> quoteMap) =>
quote.isNew || quote != quoteMap[quote.id];
quote.isNew ? quote.isChanged : quote != quoteMap[quote.id];

View File

@ -37,7 +37,9 @@ final editingReducer = combineReducers<TaskEntity>([
TypedReducer<TaskEntity, ArchiveTaskSuccess>(_updateEditing),
TypedReducer<TaskEntity, DeleteTaskSuccess>(_updateEditing),
TypedReducer<TaskEntity, EditTask>(_updateEditing),
TypedReducer<TaskEntity, UpdateTask>(_updateEditing),
TypedReducer<TaskEntity, UpdateTask>((task, action) {
return action.task.rebuild((b) => b..isChanged = true);
}),
TypedReducer<TaskEntity, AddTaskTime>(_addTaskTime),
TypedReducer<TaskEntity, DeleteTaskTime>(_removeTaskTime),
TypedReducer<TaskEntity, UpdateTaskTime>(_updateTaskTime),

View File

@ -227,4 +227,4 @@ String taskStatsForProject(
}
bool hasTaskChanges(TaskEntity task, BuiltMap<String, TaskEntity> taskMap) =>
task.isNew || task != taskMap[task.id];
task.isNew ? task.isChanged : task != taskMap[task.id];

View File

@ -56,7 +56,9 @@ final editingReducer = combineReducers<VendorEntity>([
TypedReducer<VendorEntity, ArchiveVendorSuccess>(_updateEditing),
TypedReducer<VendorEntity, DeleteVendorSuccess>(_updateEditing),
TypedReducer<VendorEntity, EditVendor>(_updateEditing),
TypedReducer<VendorEntity, UpdateVendor>(_updateEditing),
TypedReducer<VendorEntity, UpdateVendor>((vendor, action) {
return action.vendor.rebuild((b) => b..isChanged = true);
}),
TypedReducer<VendorEntity, AddVendorContact>(_addContact),
TypedReducer<VendorEntity, DeleteVendorContact>(_removeContact),
TypedReducer<VendorEntity, UpdateVendorContact>(_updateContact),

View File

@ -84,4 +84,4 @@ double calculateVendorBalance(String vendorId, String currencyId,
bool hasVendorChanges(
VendorEntity vendor, BuiltMap<String, VendorEntity> vendorMap) =>
vendor.isNew || vendor != vendorMap[vendor.id];
vendor.isNew ? vendor.isChanged : vendor != vendorMap[vendor.id];

View File

@ -42,7 +42,8 @@ abstract class StubEntity extends Object with BaseEntity implements Built<StubEn
factory StubEntity() {
return _$StubEntity._(
id: 0,
id: BaseEntity.nextId,
isChanged: false,
// STARTER: constructor - do not remove comment
);
}

View File

@ -28,7 +28,9 @@ final editingReducer = combineReducers<StubEntity>([
TypedReducer<StubEntity, ArchiveStubSuccess>(_updateEditing),
TypedReducer<StubEntity, DeleteStubSuccess>(_updateEditing),
TypedReducer<StubEntity, EditStub>(_updateEditing),
TypedReducer<StubEntity, UpdateStub>(_updateEditing),
TypedReducer<StubEntity, UpdateStub>((stub, action) {
return action.stub.rebuild((b) => b..isChanged = true);
}),
TypedReducer<StubEntity, SelectCompany>(_clearEditing),
]);