Transactions
This commit is contained in:
parent
c7939d1bc9
commit
905e9b7c22
|
|
@ -145,6 +145,7 @@ abstract class CompanyEntity extends Object
|
||||||
clientRegistrationFields: BuiltList<RegistrationFieldEntity>(),
|
clientRegistrationFields: BuiltList<RegistrationFieldEntity>(),
|
||||||
purchaseOrders: BuiltList<InvoiceEntity>(),
|
purchaseOrders: BuiltList<InvoiceEntity>(),
|
||||||
bankAccounts: BuiltList<BankAccountEntity>(),
|
bankAccounts: BuiltList<BankAccountEntity>(),
|
||||||
|
transactions: BuiltList<TransactionEntity>(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -328,6 +329,8 @@ abstract class CompanyEntity extends Object
|
||||||
@BuiltValueField(wireName: 'bank_integrations')
|
@BuiltValueField(wireName: 'bank_integrations')
|
||||||
BuiltList<BankAccountEntity> get bankAccounts;
|
BuiltList<BankAccountEntity> get bankAccounts;
|
||||||
|
|
||||||
|
BuiltList<TransactionEntity> get transactions;
|
||||||
|
|
||||||
BuiltList<TaskEntity> get tasks;
|
BuiltList<TaskEntity> get tasks;
|
||||||
|
|
||||||
BuiltList<ProjectEntity> get projects;
|
BuiltList<ProjectEntity> get projects;
|
||||||
|
|
@ -596,6 +599,7 @@ abstract class CompanyEntity extends Object
|
||||||
..quotes.clear()
|
..quotes.clear()
|
||||||
..purchaseOrders.clear()
|
..purchaseOrders.clear()
|
||||||
..bankAccounts.clear()
|
..bankAccounts.clear()
|
||||||
|
..transactions.clear()
|
||||||
..credits.clear()
|
..credits.clear()
|
||||||
..tasks.clear()
|
..tasks.clear()
|
||||||
..projects.clear()
|
..projects.clear()
|
||||||
|
|
@ -678,7 +682,8 @@ abstract class CompanyEntity extends Object
|
||||||
..recurringExpenses.replace(BuiltList<ExpenseEntity>())
|
..recurringExpenses.replace(BuiltList<ExpenseEntity>())
|
||||||
..clientRegistrationFields.replace(BuiltList<RegistrationFieldEntity>())
|
..clientRegistrationFields.replace(BuiltList<RegistrationFieldEntity>())
|
||||||
..purchaseOrders.replace(BuiltList<InvoiceEntity>())
|
..purchaseOrders.replace(BuiltList<InvoiceEntity>())
|
||||||
..bankAccounts.replace(BuiltList<BankAccountEntity>());
|
..bankAccounts.replace(BuiltList<BankAccountEntity>())
|
||||||
|
..transactions.replace(BuiltList<BankAccountEntity>());
|
||||||
|
|
||||||
static Serializer<CompanyEntity> get serializer => _$companyEntitySerializer;
|
static Serializer<CompanyEntity> get serializer => _$companyEntitySerializer;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,10 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
|
||||||
serializers.serialize(object.bankAccounts,
|
serializers.serialize(object.bankAccounts,
|
||||||
specifiedType: const FullType(
|
specifiedType: const FullType(
|
||||||
BuiltList, const [const FullType(BankAccountEntity)])),
|
BuiltList, const [const FullType(BankAccountEntity)])),
|
||||||
|
'transactions',
|
||||||
|
serializers.serialize(object.transactions,
|
||||||
|
specifiedType: const FullType(
|
||||||
|
BuiltList, const [const FullType(TransactionEntity)])),
|
||||||
'tasks',
|
'tasks',
|
||||||
serializers.serialize(object.tasks,
|
serializers.serialize(object.tasks,
|
||||||
specifiedType:
|
specifiedType:
|
||||||
|
|
@ -675,6 +679,12 @@ class _$CompanyEntitySerializer implements StructuredSerializer<CompanyEntity> {
|
||||||
BuiltList, const [const FullType(BankAccountEntity)]))
|
BuiltList, const [const FullType(BankAccountEntity)]))
|
||||||
as BuiltList<Object>);
|
as BuiltList<Object>);
|
||||||
break;
|
break;
|
||||||
|
case 'transactions':
|
||||||
|
result.transactions.replace(serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(
|
||||||
|
BuiltList, const [const FullType(TransactionEntity)]))
|
||||||
|
as BuiltList<Object>);
|
||||||
|
break;
|
||||||
case 'tasks':
|
case 'tasks':
|
||||||
result.tasks.replace(serializers.deserialize(value,
|
result.tasks.replace(serializers.deserialize(value,
|
||||||
specifiedType: const FullType(
|
specifiedType: const FullType(
|
||||||
|
|
@ -1632,6 +1642,8 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
@override
|
@override
|
||||||
final BuiltList<BankAccountEntity> bankAccounts;
|
final BuiltList<BankAccountEntity> bankAccounts;
|
||||||
@override
|
@override
|
||||||
|
final BuiltList<TransactionEntity> transactions;
|
||||||
|
@override
|
||||||
final BuiltList<TaskEntity> tasks;
|
final BuiltList<TaskEntity> tasks;
|
||||||
@override
|
@override
|
||||||
final BuiltList<ProjectEntity> projects;
|
final BuiltList<ProjectEntity> projects;
|
||||||
|
|
@ -1772,6 +1784,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
this.credits,
|
this.credits,
|
||||||
this.purchaseOrders,
|
this.purchaseOrders,
|
||||||
this.bankAccounts,
|
this.bankAccounts,
|
||||||
|
this.transactions,
|
||||||
this.tasks,
|
this.tasks,
|
||||||
this.projects,
|
this.projects,
|
||||||
this.expenses,
|
this.expenses,
|
||||||
|
|
@ -1924,6 +1937,8 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
purchaseOrders, 'CompanyEntity', 'purchaseOrders');
|
purchaseOrders, 'CompanyEntity', 'purchaseOrders');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
bankAccounts, 'CompanyEntity', 'bankAccounts');
|
bankAccounts, 'CompanyEntity', 'bankAccounts');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
transactions, 'CompanyEntity', 'transactions');
|
||||||
BuiltValueNullFieldError.checkNotNull(tasks, 'CompanyEntity', 'tasks');
|
BuiltValueNullFieldError.checkNotNull(tasks, 'CompanyEntity', 'tasks');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
projects, 'CompanyEntity', 'projects');
|
projects, 'CompanyEntity', 'projects');
|
||||||
|
|
@ -2058,6 +2073,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
credits == other.credits &&
|
credits == other.credits &&
|
||||||
purchaseOrders == other.purchaseOrders &&
|
purchaseOrders == other.purchaseOrders &&
|
||||||
bankAccounts == other.bankAccounts &&
|
bankAccounts == other.bankAccounts &&
|
||||||
|
transactions == other.transactions &&
|
||||||
tasks == other.tasks &&
|
tasks == other.tasks &&
|
||||||
projects == other.projects &&
|
projects == other.projects &&
|
||||||
expenses == other.expenses &&
|
expenses == other.expenses &&
|
||||||
|
|
@ -2119,7 +2135,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
$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($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($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, enableCustomSurchargeTaxes1.hashCode), enableCustomSurchargeTaxes2.hashCode), enableCustomSurchargeTaxes3.hashCode), enableCustomSurchargeTaxes4.hashCode), sizeId.hashCode), industryId.hashCode), subdomain.hashCode), portalMode.hashCode), portalDomain.hashCode), updateProducts.hashCode), convertProductExchangeRate.hashCode), convertRateToClient.hashCode), fillProducts.hashCode), enableProductCost.hashCode), enableProductQuantity.hashCode), enableProductDiscount.hashCode), defaultTaskIsDateBased.hashCode), defaultQuantity.hashCode), showProductDetails.hashCode), clientCanRegister.hashCode), isLarge.hashCode), isDisabled.hashCode), enableShopApi.hashCode), companyKey.hashCode), firstDayOfWeek.hashCode), firstMonthOfYear.hashCode), numberOfInvoiceTaxRates.hashCode), numberOfItemTaxRates.hashCode), numberOfExpenseTaxRates.hashCode), expenseInclusiveTaxes.hashCode), sessionTimeout.hashCode), passwordTimeout.hashCode), oauthPasswordRequired.hashCode), markdownEnabled.hashCode), markdownEmailEnabled.hashCode), useCommaAsDecimalPlace.hashCode), reportIncludeDrafts.hashCode), useQuoteTermsOnConversion.hashCode), enableApplyingPayments.hashCode), trackInventory.hashCode), stockNotificationThreshold.hashCode), stockNotification.hashCode), groups.hashCode), activities.hashCode), taxRates.hashCode), taskStatuses.hashCode), taskStatusMap.hashCode), companyGateways.hashCode), expenseCategories.hashCode), users.hashCode), clients.hashCode), products.hashCode), invoices.hashCode), recurringInvoices.hashCode), recurringExpenses.hashCode), payments.hashCode), quotes.hashCode), credits.hashCode), purchaseOrders.hashCode), bankAccounts.hashCode), tasks.hashCode), projects.hashCode), expenses.hashCode), vendors.hashCode), designs.hashCode), documents.hashCode), tokens.hashCode), webhooks.hashCode), subscriptions.hashCode), paymentTerms.hashCode), systemLogs.hashCode), clientRegistrationFields.hashCode), customFields.hashCode), slackWebhookUrl.hashCode), googleAnalyticsKey.hashCode), markExpensesInvoiceable.hashCode), markExpensesPaid.hashCode), invoiceExpenseDocuments.hashCode), invoiceTaskDocuments.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($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($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, enableCustomSurchargeTaxes1.hashCode), enableCustomSurchargeTaxes2.hashCode), enableCustomSurchargeTaxes3.hashCode), enableCustomSurchargeTaxes4.hashCode), sizeId.hashCode), industryId.hashCode), subdomain.hashCode), portalMode.hashCode), portalDomain.hashCode), updateProducts.hashCode), convertProductExchangeRate.hashCode), convertRateToClient.hashCode), fillProducts.hashCode), enableProductCost.hashCode), enableProductQuantity.hashCode), enableProductDiscount.hashCode), defaultTaskIsDateBased.hashCode), defaultQuantity.hashCode), showProductDetails.hashCode), clientCanRegister.hashCode), isLarge.hashCode), isDisabled.hashCode), enableShopApi.hashCode), companyKey.hashCode), firstDayOfWeek.hashCode), firstMonthOfYear.hashCode), numberOfInvoiceTaxRates.hashCode), numberOfItemTaxRates.hashCode), numberOfExpenseTaxRates.hashCode), expenseInclusiveTaxes.hashCode), sessionTimeout.hashCode), passwordTimeout.hashCode), oauthPasswordRequired.hashCode), markdownEnabled.hashCode), markdownEmailEnabled.hashCode), useCommaAsDecimalPlace.hashCode), reportIncludeDrafts.hashCode), useQuoteTermsOnConversion.hashCode), enableApplyingPayments.hashCode), trackInventory.hashCode), stockNotificationThreshold.hashCode), stockNotification.hashCode), groups.hashCode), activities.hashCode), taxRates.hashCode), taskStatuses.hashCode), taskStatusMap.hashCode), companyGateways.hashCode), expenseCategories.hashCode), users.hashCode), clients.hashCode), products.hashCode), invoices.hashCode), recurringInvoices.hashCode), recurringExpenses.hashCode), payments.hashCode), quotes.hashCode), credits.hashCode), purchaseOrders.hashCode), bankAccounts.hashCode), transactions.hashCode), tasks.hashCode), projects.hashCode), expenses.hashCode), vendors.hashCode), designs.hashCode), documents.hashCode), tokens.hashCode), webhooks.hashCode), subscriptions.hashCode), paymentTerms.hashCode), systemLogs.hashCode), clientRegistrationFields.hashCode), customFields.hashCode), slackWebhookUrl.hashCode), googleAnalyticsKey.hashCode), markExpensesInvoiceable.hashCode), markExpensesPaid.hashCode), invoiceExpenseDocuments.hashCode), invoiceTaskDocuments.hashCode),
|
||||||
invoiceTaskTimelog.hashCode),
|
invoiceTaskTimelog.hashCode),
|
||||||
invoiceTaskDatelog.hashCode),
|
invoiceTaskDatelog.hashCode),
|
||||||
invoiceTaskProject.hashCode),
|
invoiceTaskProject.hashCode),
|
||||||
|
|
@ -2204,6 +2220,7 @@ class _$CompanyEntity extends CompanyEntity {
|
||||||
..add('credits', credits)
|
..add('credits', credits)
|
||||||
..add('purchaseOrders', purchaseOrders)
|
..add('purchaseOrders', purchaseOrders)
|
||||||
..add('bankAccounts', bankAccounts)
|
..add('bankAccounts', bankAccounts)
|
||||||
|
..add('transactions', transactions)
|
||||||
..add('tasks', tasks)
|
..add('tasks', tasks)
|
||||||
..add('projects', projects)
|
..add('projects', projects)
|
||||||
..add('expenses', expenses)
|
..add('expenses', expenses)
|
||||||
|
|
@ -2554,6 +2571,12 @@ class CompanyEntityBuilder
|
||||||
set bankAccounts(ListBuilder<BankAccountEntity> bankAccounts) =>
|
set bankAccounts(ListBuilder<BankAccountEntity> bankAccounts) =>
|
||||||
_$this._bankAccounts = bankAccounts;
|
_$this._bankAccounts = bankAccounts;
|
||||||
|
|
||||||
|
ListBuilder<TransactionEntity> _transactions;
|
||||||
|
ListBuilder<TransactionEntity> get transactions =>
|
||||||
|
_$this._transactions ??= new ListBuilder<TransactionEntity>();
|
||||||
|
set transactions(ListBuilder<TransactionEntity> transactions) =>
|
||||||
|
_$this._transactions = transactions;
|
||||||
|
|
||||||
ListBuilder<TaskEntity> _tasks;
|
ListBuilder<TaskEntity> _tasks;
|
||||||
ListBuilder<TaskEntity> get tasks =>
|
ListBuilder<TaskEntity> get tasks =>
|
||||||
_$this._tasks ??= new ListBuilder<TaskEntity>();
|
_$this._tasks ??= new ListBuilder<TaskEntity>();
|
||||||
|
|
@ -2815,6 +2838,7 @@ class CompanyEntityBuilder
|
||||||
_credits = $v.credits.toBuilder();
|
_credits = $v.credits.toBuilder();
|
||||||
_purchaseOrders = $v.purchaseOrders.toBuilder();
|
_purchaseOrders = $v.purchaseOrders.toBuilder();
|
||||||
_bankAccounts = $v.bankAccounts.toBuilder();
|
_bankAccounts = $v.bankAccounts.toBuilder();
|
||||||
|
_transactions = $v.transactions.toBuilder();
|
||||||
_tasks = $v.tasks.toBuilder();
|
_tasks = $v.tasks.toBuilder();
|
||||||
_projects = $v.projects.toBuilder();
|
_projects = $v.projects.toBuilder();
|
||||||
_expenses = $v.expenses.toBuilder();
|
_expenses = $v.expenses.toBuilder();
|
||||||
|
|
@ -2949,6 +2973,7 @@ class CompanyEntityBuilder
|
||||||
credits: credits.build(),
|
credits: credits.build(),
|
||||||
purchaseOrders: purchaseOrders.build(),
|
purchaseOrders: purchaseOrders.build(),
|
||||||
bankAccounts: bankAccounts.build(),
|
bankAccounts: bankAccounts.build(),
|
||||||
|
transactions: transactions.build(),
|
||||||
tasks: tasks.build(),
|
tasks: tasks.build(),
|
||||||
projects: projects.build(),
|
projects: projects.build(),
|
||||||
expenses: expenses.build(),
|
expenses: expenses.build(),
|
||||||
|
|
@ -3026,6 +3051,8 @@ class CompanyEntityBuilder
|
||||||
purchaseOrders.build();
|
purchaseOrders.build();
|
||||||
_$failedField = 'bankAccounts';
|
_$failedField = 'bankAccounts';
|
||||||
bankAccounts.build();
|
bankAccounts.build();
|
||||||
|
_$failedField = 'transactions';
|
||||||
|
transactions.build();
|
||||||
_$failedField = 'tasks';
|
_$failedField = 'tasks';
|
||||||
tasks.build();
|
tasks.build();
|
||||||
_$failedField = 'projects';
|
_$failedField = 'projects';
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@ class EntityType extends EnumClass {
|
||||||
static const EntityType invoiceItem = _$invoiceItem;
|
static const EntityType invoiceItem = _$invoiceItem;
|
||||||
static const EntityType design = _$design;
|
static const EntityType design = _$design;
|
||||||
// STARTER: entity type - do not remove comment
|
// STARTER: entity type - do not remove comment
|
||||||
|
static const EntityType transaction = _$transaction;
|
||||||
|
|
||||||
static const EntityType bankAccount = _$bankAccount;
|
static const EntityType bankAccount = _$bankAccount;
|
||||||
|
|
||||||
static const EntityType recurringExpense = _$recurringExpense;
|
static const EntityType recurringExpense = _$recurringExpense;
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ const EntityType _$gateway = const EntityType._('gateway');
|
||||||
const EntityType _$gatewayToken = const EntityType._('gatewayToken');
|
const EntityType _$gatewayToken = const EntityType._('gatewayToken');
|
||||||
const EntityType _$invoiceItem = const EntityType._('invoiceItem');
|
const EntityType _$invoiceItem = const EntityType._('invoiceItem');
|
||||||
const EntityType _$design = const EntityType._('design');
|
const EntityType _$design = const EntityType._('design');
|
||||||
|
const EntityType _$transaction = const EntityType._('transaction');
|
||||||
const EntityType _$bankAccount = const EntityType._('bankAccount');
|
const EntityType _$bankAccount = const EntityType._('bankAccount');
|
||||||
const EntityType _$recurringExpense = const EntityType._('recurringExpense');
|
const EntityType _$recurringExpense = const EntityType._('recurringExpense');
|
||||||
const EntityType _$recurringQuote = const EntityType._('recurringQuote');
|
const EntityType _$recurringQuote = const EntityType._('recurringQuote');
|
||||||
|
|
@ -102,6 +103,8 @@ EntityType _$typeValueOf(String name) {
|
||||||
return _$invoiceItem;
|
return _$invoiceItem;
|
||||||
case 'design':
|
case 'design':
|
||||||
return _$design;
|
return _$design;
|
||||||
|
case 'transaction':
|
||||||
|
return _$transaction;
|
||||||
case 'bankAccount':
|
case 'bankAccount':
|
||||||
return _$bankAccount;
|
return _$bankAccount;
|
||||||
case 'recurringExpense':
|
case 'recurringExpense':
|
||||||
|
|
@ -175,6 +178,7 @@ final BuiltSet<EntityType> _$typeValues =
|
||||||
_$gatewayToken,
|
_$gatewayToken,
|
||||||
_$invoiceItem,
|
_$invoiceItem,
|
||||||
_$design,
|
_$design,
|
||||||
|
_$transaction,
|
||||||
_$bankAccount,
|
_$bankAccount,
|
||||||
_$recurringExpense,
|
_$recurringExpense,
|
||||||
_$recurringQuote,
|
_$recurringQuote,
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ export 'package:invoiceninja_flutter/data/models/task_status_model.dart';
|
||||||
export 'package:invoiceninja_flutter/data/models/user_model.dart';
|
export 'package:invoiceninja_flutter/data/models/user_model.dart';
|
||||||
export 'package:invoiceninja_flutter/data/models/vendor_model.dart';
|
export 'package:invoiceninja_flutter/data/models/vendor_model.dart';
|
||||||
export 'package:invoiceninja_flutter/data/models/bank_account_model.dart';
|
export 'package:invoiceninja_flutter/data/models/bank_account_model.dart';
|
||||||
|
export 'package:invoiceninja_flutter/data/models/transaction_model.dart';
|
||||||
// STARTER: export - do not remove comment
|
// STARTER: export - do not remove comment
|
||||||
|
|
||||||
part 'models.g.dart';
|
part 'models.g.dart';
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,9 @@ import 'package:invoiceninja_flutter/redux/ui/ui_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/user/user_state.dart';
|
import 'package:invoiceninja_flutter/redux/user/user_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/vendor/vendor_state.dart';
|
import 'package:invoiceninja_flutter/redux/vendor/vendor_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/webhook/webhook_state.dart';
|
import 'package:invoiceninja_flutter/redux/webhook/webhook_state.dart';
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_state.dart';
|
||||||
// STARTER: import - do not remove comment
|
|
||||||
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_state.dart';
|
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_state.dart';
|
||||||
|
// STARTER: import - do not remove comment
|
||||||
|
|
||||||
part 'serializers.g.dart';
|
part 'serializers.g.dart';
|
||||||
|
|
||||||
|
|
@ -115,6 +115,10 @@ part 'serializers.g.dart';
|
||||||
TaxRateItemResponse,
|
TaxRateItemResponse,
|
||||||
TaxRateListResponse,
|
TaxRateListResponse,
|
||||||
// STARTER: serializers - do not remove comment
|
// STARTER: serializers - do not remove comment
|
||||||
|
TransactionEntity,
|
||||||
|
TransactionListResponse,
|
||||||
|
TransactionItemResponse,
|
||||||
|
|
||||||
BankAccountEntity,
|
BankAccountEntity,
|
||||||
BankAccountListResponse,
|
BankAccountListResponse,
|
||||||
BankAccountItemResponse,
|
BankAccountItemResponse,
|
||||||
|
|
|
||||||
|
|
@ -193,6 +193,11 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
||||||
..add(TokenListResponse.serializer)
|
..add(TokenListResponse.serializer)
|
||||||
..add(TokenState.serializer)
|
..add(TokenState.serializer)
|
||||||
..add(TokenUIState.serializer)
|
..add(TokenUIState.serializer)
|
||||||
|
..add(TransactionEntity.serializer)
|
||||||
|
..add(TransactionItemResponse.serializer)
|
||||||
|
..add(TransactionListResponse.serializer)
|
||||||
|
..add(TransactionState.serializer)
|
||||||
|
..add(TransactionUIState.serializer)
|
||||||
..add(UIState.serializer)
|
..add(UIState.serializer)
|
||||||
..add(UserCompanyEntity.serializer)
|
..add(UserCompanyEntity.serializer)
|
||||||
..add(UserCompanyItemResponse.serializer)
|
..add(UserCompanyItemResponse.serializer)
|
||||||
|
|
@ -420,6 +425,9 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
||||||
..addBuilderFactory(
|
..addBuilderFactory(
|
||||||
const FullType(BuiltList, const [const FullType(BankAccountEntity)]),
|
const FullType(BuiltList, const [const FullType(BankAccountEntity)]),
|
||||||
() => new ListBuilder<BankAccountEntity>())
|
() => new ListBuilder<BankAccountEntity>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(TransactionEntity)]),
|
||||||
|
() => new ListBuilder<TransactionEntity>())
|
||||||
..addBuilderFactory(
|
..addBuilderFactory(
|
||||||
const FullType(BuiltList, const [const FullType(TaskEntity)]),
|
const FullType(BuiltList, const [const FullType(TaskEntity)]),
|
||||||
() => new ListBuilder<TaskEntity>())
|
() => new ListBuilder<TaskEntity>())
|
||||||
|
|
@ -551,6 +559,9 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
||||||
..addBuilderFactory(
|
..addBuilderFactory(
|
||||||
const FullType(BuiltList, const [const FullType(TokenEntity)]),
|
const FullType(BuiltList, const [const FullType(TokenEntity)]),
|
||||||
() => new ListBuilder<TokenEntity>())
|
() => new ListBuilder<TokenEntity>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(TransactionEntity)]),
|
||||||
|
() => new ListBuilder<TransactionEntity>())
|
||||||
..addBuilderFactory(
|
..addBuilderFactory(
|
||||||
const FullType(BuiltList, const [const FullType(UserCompanyEntity)]),
|
const FullType(BuiltList, const [const FullType(UserCompanyEntity)]),
|
||||||
() => new ListBuilder<UserCompanyEntity>())
|
() => new ListBuilder<UserCompanyEntity>())
|
||||||
|
|
@ -891,6 +902,15 @@ Serializers _$serializers = (new Serializers().toBuilder()
|
||||||
..addBuilderFactory(
|
..addBuilderFactory(
|
||||||
const FullType(BuiltList, const [const FullType(String)]),
|
const FullType(BuiltList, const [const FullType(String)]),
|
||||||
() => new ListBuilder<String>())
|
() => new ListBuilder<String>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltMap, const [
|
||||||
|
const FullType(String),
|
||||||
|
const FullType(TransactionEntity)
|
||||||
|
]),
|
||||||
|
() => new MapBuilder<String, TransactionEntity>())
|
||||||
|
..addBuilderFactory(
|
||||||
|
const FullType(BuiltList, const [const FullType(String)]),
|
||||||
|
() => new ListBuilder<String>())
|
||||||
..addBuilderFactory(
|
..addBuilderFactory(
|
||||||
const FullType(BuiltMap,
|
const FullType(BuiltMap,
|
||||||
const [const FullType(String), const FullType(UserEntity)]),
|
const [const FullType(String), const FullType(UserEntity)]),
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,8 @@ import 'package:invoiceninja_flutter/utils/web_stub.dart'
|
||||||
if (dart.library.html) 'package:invoiceninja_flutter/utils/web.dart';
|
if (dart.library.html) 'package:invoiceninja_flutter/utils/web.dart';
|
||||||
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_middleware.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_middleware.dart';
|
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_middleware.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_middleware.dart';
|
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_middleware.dart';
|
||||||
|
|
@ -100,6 +102,7 @@ void main({bool isTesting = false}) async {
|
||||||
..addAll(createStoreSettingsMiddleware())
|
..addAll(createStoreSettingsMiddleware())
|
||||||
..addAll(createStoreReportsMiddleware())
|
..addAll(createStoreReportsMiddleware())
|
||||||
// STARTER: middleware - do not remove comment
|
// STARTER: middleware - do not remove comment
|
||||||
|
..addAll(createStoreTransactionsMiddleware())
|
||||||
..addAll(createStoreBankAccountsMiddleware())
|
..addAll(createStoreBankAccountsMiddleware())
|
||||||
..addAll(createStorePurchaseOrdersMiddleware())
|
..addAll(createStorePurchaseOrdersMiddleware())
|
||||||
..addAll(createStoreRecurringExpensesMiddleware())
|
..addAll(createStoreRecurringExpensesMiddleware())
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,11 @@ import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||||
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
import 'package:invoiceninja_flutter/ui/transaction/transaction_screen.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/transaction/edit/transaction_edit_vm.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/transaction/view/transaction_view_vm.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/transaction/transaction_screen_vm.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/ui/bank_account/bank_account_screen.dart';
|
import 'package:invoiceninja_flutter/ui/bank_account/bank_account_screen.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/bank_account/view/bank_account_view_vm.dart';
|
import 'package:invoiceninja_flutter/ui/bank_account/view/bank_account_view_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/bank_account/bank_account_screen_vm.dart';
|
import 'package:invoiceninja_flutter/ui/bank_account/bank_account_screen_vm.dart';
|
||||||
|
|
@ -507,6 +512,13 @@ class InvoiceNinjaAppState extends State<InvoiceNinjaApp> {
|
||||||
QuoteEmailScreen.route: (context) => QuoteEmailScreen(),
|
QuoteEmailScreen.route: (context) => QuoteEmailScreen(),
|
||||||
QuotePdfScreen.route: (context) => QuotePdfScreen(),
|
QuotePdfScreen.route: (context) => QuotePdfScreen(),
|
||||||
// STARTER: routes - do not remove comment
|
// STARTER: routes - do not remove comment
|
||||||
|
TransactionScreen.route: (context) =>
|
||||||
|
TransactionScreenBuilder(),
|
||||||
|
TransactionViewScreen.route: (context) =>
|
||||||
|
TransactionViewScreen(),
|
||||||
|
TransactionEditScreen.route: (context) =>
|
||||||
|
TransactionEditScreen(),
|
||||||
|
|
||||||
BankAccountScreen.route: (context) =>
|
BankAccountScreen.route: (context) =>
|
||||||
BankAccountScreenBuilder(),
|
BankAccountScreenBuilder(),
|
||||||
BankAccountViewScreen.route: (context) =>
|
BankAccountViewScreen.route: (context) =>
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,8 @@ import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||||
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_actions.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_actions.dart';
|
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_actions.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_actions.dart';
|
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_actions.dart';
|
||||||
|
|
@ -388,6 +390,10 @@ void viewEntitiesByType({
|
||||||
action = ViewGroupList();
|
action = ViewGroupList();
|
||||||
break;
|
break;
|
||||||
// STARTER: view list - do not remove comment
|
// STARTER: view list - do not remove comment
|
||||||
|
case EntityType.transaction:
|
||||||
|
action = ViewTransactionList();
|
||||||
|
break;
|
||||||
|
|
||||||
case EntityType.bankAccount:
|
case EntityType.bankAccount:
|
||||||
action = ViewBankAccountList();
|
action = ViewBankAccountList();
|
||||||
break;
|
break;
|
||||||
|
|
@ -606,6 +612,13 @@ void viewEntityById({
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
// STARTER: view - do not remove comment
|
// STARTER: view - do not remove comment
|
||||||
|
case EntityType.transaction:
|
||||||
|
store.dispatch(ViewTransaction(
|
||||||
|
transactionId: entityId,
|
||||||
|
force: force,
|
||||||
|
));
|
||||||
|
break;
|
||||||
|
|
||||||
case EntityType.bankAccount:
|
case EntityType.bankAccount:
|
||||||
store.dispatch(ViewBankAccount(
|
store.dispatch(ViewBankAccount(
|
||||||
bankAccountId: entityId,
|
bankAccountId: entityId,
|
||||||
|
|
@ -845,6 +858,13 @@ void createEntityByType({
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
// STARTER: create type - do not remove comment
|
// STARTER: create type - do not remove comment
|
||||||
|
case EntityType.transaction:
|
||||||
|
store.dispatch(EditTransaction(
|
||||||
|
force: force,
|
||||||
|
transaction: TransactionEntity(state: state),
|
||||||
|
));
|
||||||
|
break;
|
||||||
|
|
||||||
case EntityType.purchaseOrder:
|
case EntityType.purchaseOrder:
|
||||||
store.dispatch(EditPurchaseOrder(
|
store.dispatch(EditPurchaseOrder(
|
||||||
force: force,
|
force: force,
|
||||||
|
|
@ -1060,6 +1080,14 @@ void createEntity({
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
// STARTER: create - do not remove comment
|
// STARTER: create - do not remove comment
|
||||||
|
case EntityType.transaction:
|
||||||
|
store.dispatch(EditTransaction(
|
||||||
|
transaction: entity,
|
||||||
|
force: force,
|
||||||
|
completer: completer,
|
||||||
|
));
|
||||||
|
break;
|
||||||
|
|
||||||
case EntityType.purchaseOrder:
|
case EntityType.purchaseOrder:
|
||||||
store.dispatch(EditPurchaseOrder(
|
store.dispatch(EditPurchaseOrder(
|
||||||
purchaseOrder: entity,
|
purchaseOrder: entity,
|
||||||
|
|
@ -1253,6 +1281,11 @@ void editEntity({
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
// STARTER: edit - do not remove comment
|
// STARTER: edit - do not remove comment
|
||||||
|
case EntityType.transaction:
|
||||||
|
store.dispatch(
|
||||||
|
EditTransaction(transaction: entity, completer: completer));
|
||||||
|
break;
|
||||||
|
|
||||||
case EntityType.purchaseOrder:
|
case EntityType.purchaseOrder:
|
||||||
store.dispatch(
|
store.dispatch(
|
||||||
EditPurchaseOrder(purchaseOrder: entity, completer: completer));
|
EditPurchaseOrder(purchaseOrder: entity, completer: completer));
|
||||||
|
|
@ -1428,6 +1461,10 @@ void handleEntitiesActions(List<BaseEntity> entities, EntityAction action,
|
||||||
handleDocumentAction(context, entities, action);
|
handleDocumentAction(context, entities, action);
|
||||||
break;
|
break;
|
||||||
// STARTER: actions - do not remove comment
|
// STARTER: actions - do not remove comment
|
||||||
|
case EntityType.transaction:
|
||||||
|
handleTransactionAction(context, entities, action);
|
||||||
|
break;
|
||||||
|
|
||||||
case EntityType.bankAccount:
|
case EntityType.bankAccount:
|
||||||
handleBankAccountAction(context, entities, action);
|
handleBankAccountAction(context, entities, action);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ import 'package:invoiceninja_flutter/redux/vendor/vendor_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/webhook/webhook_actions.dart';
|
import 'package:invoiceninja_flutter/redux/webhook/webhook_actions.dart';
|
||||||
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_actions.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_actions.dart';
|
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_actions.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_actions.dart';
|
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_actions.dart';
|
||||||
|
|
@ -104,6 +106,10 @@ final lastErrorReducer = combineReducers<String>([
|
||||||
return '${action.error}';
|
return '${action.error}';
|
||||||
}),
|
}),
|
||||||
// STARTER: errors - do not remove comment
|
// STARTER: errors - do not remove comment
|
||||||
|
TypedReducer<String, LoadTransactionsFailure>((state, action) {
|
||||||
|
return '${action.error}';
|
||||||
|
}),
|
||||||
|
|
||||||
TypedReducer<String, LoadBankAccountsFailure>((state, action) {
|
TypedReducer<String, LoadBankAccountsFailure>((state, action) {
|
||||||
return '${action.error}';
|
return '${action.error}';
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,10 @@ import 'package:invoiceninja_flutter/utils/colors.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_state.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/transaction/edit/transaction_edit_vm.dart';
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_selectors.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_state.dart';
|
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_state.dart';
|
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_state.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/purchase_order/edit/purchase_order_edit_vm.dart';
|
import 'package:invoiceninja_flutter/ui/purchase_order/edit/purchase_order_edit_vm.dart';
|
||||||
|
|
@ -293,6 +297,9 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
||||||
case EntityType.invoice:
|
case EntityType.invoice:
|
||||||
return invoiceState.map;
|
return invoiceState.map;
|
||||||
// STARTER: states switch map - do not remove comment
|
// STARTER: states switch map - do not remove comment
|
||||||
|
case EntityType.transaction:
|
||||||
|
return transactionState.map;
|
||||||
|
|
||||||
case EntityType.bankAccount:
|
case EntityType.bankAccount:
|
||||||
return bankAccountState.map;
|
return bankAccountState.map;
|
||||||
|
|
||||||
|
|
@ -379,6 +386,9 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
||||||
case EntityType.invoice:
|
case EntityType.invoice:
|
||||||
return invoiceState.list;
|
return invoiceState.list;
|
||||||
// STARTER: states switch list - do not remove comment
|
// STARTER: states switch list - do not remove comment
|
||||||
|
case EntityType.transaction:
|
||||||
|
return transactionState.list;
|
||||||
|
|
||||||
case EntityType.bankAccount:
|
case EntityType.bankAccount:
|
||||||
return bankAccountState.list;
|
return bankAccountState.list;
|
||||||
|
|
||||||
|
|
@ -454,6 +464,9 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
||||||
case EntityType.invoice:
|
case EntityType.invoice:
|
||||||
return invoiceUIState;
|
return invoiceUIState;
|
||||||
// STARTER: states switch - do not remove comment
|
// STARTER: states switch - do not remove comment
|
||||||
|
case EntityType.transaction:
|
||||||
|
return transactionUIState;
|
||||||
|
|
||||||
case EntityType.bankAccount:
|
case EntityType.bankAccount:
|
||||||
return bankAccountUIState;
|
return bankAccountUIState;
|
||||||
|
|
||||||
|
|
@ -530,6 +543,11 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
||||||
ListUIState get invoiceListState => uiState.invoiceUIState.listUIState;
|
ListUIState get invoiceListState => uiState.invoiceUIState.listUIState;
|
||||||
|
|
||||||
// STARTER: state getters - do not remove comment
|
// STARTER: state getters - do not remove comment
|
||||||
|
TransactionState get transactionState => userCompanyState.transactionState;
|
||||||
|
ListUIState get transactionListState =>
|
||||||
|
uiState.transactionUIState.listUIState;
|
||||||
|
TransactionUIState get transactionUIState => uiState.transactionUIState;
|
||||||
|
|
||||||
BankAccountState get bankAccountState => userCompanyState.bankAccountState;
|
BankAccountState get bankAccountState => userCompanyState.bankAccountState;
|
||||||
ListUIState get bankAccountListState =>
|
ListUIState get bankAccountListState =>
|
||||||
uiState.bankAccountUIState.listUIState;
|
uiState.bankAccountUIState.listUIState;
|
||||||
|
|
@ -711,6 +729,10 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
||||||
case CreditEditScreen.route:
|
case CreditEditScreen.route:
|
||||||
return hasCreditChanges(creditUIState.editing, creditState.map);
|
return hasCreditChanges(creditUIState.editing, creditState.map);
|
||||||
// STARTER: has changes - do not remove comment
|
// STARTER: has changes - do not remove comment
|
||||||
|
case TransactionEditScreen.route:
|
||||||
|
return hasTransactionChanges(
|
||||||
|
transactionUIState.editing, transactionState.map);
|
||||||
|
|
||||||
case PurchaseOrderEditScreen.route:
|
case PurchaseOrderEditScreen.route:
|
||||||
return hasPurchaseOrderChanges(
|
return hasPurchaseOrderChanges(
|
||||||
purchaseOrderUIState.editing, purchaseOrderState.map);
|
purchaseOrderUIState.editing, purchaseOrderState.map);
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ import 'package:invoiceninja_flutter/redux/vendor/vendor_reducer.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/webhook/webhook_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/webhook/webhook_reducer.dart';
|
||||||
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_reducer.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_reducer.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_reducer.dart';
|
||||||
|
|
@ -56,6 +58,8 @@ UserCompanyState companyReducer(UserCompanyState state, dynamic action) {
|
||||||
..vendorState.replace(vendorsReducer(state.vendorState, action))
|
..vendorState.replace(vendorsReducer(state.vendorState, action))
|
||||||
..taskState.replace(tasksReducer(state.taskState, action))
|
..taskState.replace(tasksReducer(state.taskState, action))
|
||||||
// STARTER: reducer - do not remove comment
|
// STARTER: reducer - do not remove comment
|
||||||
|
..transactionState
|
||||||
|
.replace(transactionsReducer(state.transactionState, action))
|
||||||
..bankAccountState
|
..bankAccountState
|
||||||
.replace(bankAccountsReducer(state.bankAccountState, action))
|
.replace(bankAccountsReducer(state.bankAccountState, action))
|
||||||
..purchaseOrderState
|
..purchaseOrderState
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,8 @@ import 'package:invoiceninja_flutter/redux/vendor/vendor_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/webhook/webhook_state.dart';
|
import 'package:invoiceninja_flutter/redux/webhook/webhook_state.dart';
|
||||||
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_state.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_state.dart';
|
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_state.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_state.dart';
|
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_state.dart';
|
||||||
|
|
@ -55,6 +57,8 @@ abstract class UserCompanyState
|
||||||
paymentState: PaymentState(),
|
paymentState: PaymentState(),
|
||||||
quoteState: QuoteState(),
|
quoteState: QuoteState(),
|
||||||
// STARTER: constructor - do not remove comment
|
// STARTER: constructor - do not remove comment
|
||||||
|
transactionState: TransactionState(),
|
||||||
|
|
||||||
bankAccountState: BankAccountState(),
|
bankAccountState: BankAccountState(),
|
||||||
|
|
||||||
purchaseOrderState: PurchaseOrderState(),
|
purchaseOrderState: PurchaseOrderState(),
|
||||||
|
|
@ -108,6 +112,8 @@ abstract class UserCompanyState
|
||||||
QuoteState get quoteState;
|
QuoteState get quoteState;
|
||||||
|
|
||||||
// STARTER: fields - do not remove comment
|
// STARTER: fields - do not remove comment
|
||||||
|
TransactionState get transactionState;
|
||||||
|
|
||||||
BankAccountState get bankAccountState;
|
BankAccountState get bankAccountState;
|
||||||
|
|
||||||
PurchaseOrderState get purchaseOrderState;
|
PurchaseOrderState get purchaseOrderState;
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,9 @@ class _$UserCompanyStateSerializer
|
||||||
'quoteState',
|
'quoteState',
|
||||||
serializers.serialize(object.quoteState,
|
serializers.serialize(object.quoteState,
|
||||||
specifiedType: const FullType(QuoteState)),
|
specifiedType: const FullType(QuoteState)),
|
||||||
|
'transactionState',
|
||||||
|
serializers.serialize(object.transactionState,
|
||||||
|
specifiedType: const FullType(TransactionState)),
|
||||||
'bankAccountState',
|
'bankAccountState',
|
||||||
serializers.serialize(object.bankAccountState,
|
serializers.serialize(object.bankAccountState,
|
||||||
specifiedType: const FullType(BankAccountState)),
|
specifiedType: const FullType(BankAccountState)),
|
||||||
|
|
@ -176,6 +179,11 @@ class _$UserCompanyStateSerializer
|
||||||
result.quoteState.replace(serializers.deserialize(value,
|
result.quoteState.replace(serializers.deserialize(value,
|
||||||
specifiedType: const FullType(QuoteState)) as QuoteState);
|
specifiedType: const FullType(QuoteState)) as QuoteState);
|
||||||
break;
|
break;
|
||||||
|
case 'transactionState':
|
||||||
|
result.transactionState.replace(serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(TransactionState))
|
||||||
|
as TransactionState);
|
||||||
|
break;
|
||||||
case 'bankAccountState':
|
case 'bankAccountState':
|
||||||
result.bankAccountState.replace(serializers.deserialize(value,
|
result.bankAccountState.replace(serializers.deserialize(value,
|
||||||
specifiedType: const FullType(BankAccountState))
|
specifiedType: const FullType(BankAccountState))
|
||||||
|
|
@ -433,6 +441,8 @@ class _$UserCompanyState extends UserCompanyState {
|
||||||
@override
|
@override
|
||||||
final QuoteState quoteState;
|
final QuoteState quoteState;
|
||||||
@override
|
@override
|
||||||
|
final TransactionState transactionState;
|
||||||
|
@override
|
||||||
final BankAccountState bankAccountState;
|
final BankAccountState bankAccountState;
|
||||||
@override
|
@override
|
||||||
final PurchaseOrderState purchaseOrderState;
|
final PurchaseOrderState purchaseOrderState;
|
||||||
|
|
@ -482,6 +492,7 @@ class _$UserCompanyState extends UserCompanyState {
|
||||||
this.projectState,
|
this.projectState,
|
||||||
this.paymentState,
|
this.paymentState,
|
||||||
this.quoteState,
|
this.quoteState,
|
||||||
|
this.transactionState,
|
||||||
this.bankAccountState,
|
this.bankAccountState,
|
||||||
this.purchaseOrderState,
|
this.purchaseOrderState,
|
||||||
this.recurringExpenseState,
|
this.recurringExpenseState,
|
||||||
|
|
@ -521,6 +532,8 @@ class _$UserCompanyState extends UserCompanyState {
|
||||||
paymentState, 'UserCompanyState', 'paymentState');
|
paymentState, 'UserCompanyState', 'paymentState');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
quoteState, 'UserCompanyState', 'quoteState');
|
quoteState, 'UserCompanyState', 'quoteState');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
transactionState, 'UserCompanyState', 'transactionState');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
bankAccountState, 'UserCompanyState', 'bankAccountState');
|
bankAccountState, 'UserCompanyState', 'bankAccountState');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
|
@ -579,6 +592,7 @@ class _$UserCompanyState extends UserCompanyState {
|
||||||
projectState == other.projectState &&
|
projectState == other.projectState &&
|
||||||
paymentState == other.paymentState &&
|
paymentState == other.paymentState &&
|
||||||
quoteState == other.quoteState &&
|
quoteState == other.quoteState &&
|
||||||
|
transactionState == other.transactionState &&
|
||||||
bankAccountState == other.bankAccountState &&
|
bankAccountState == other.bankAccountState &&
|
||||||
purchaseOrderState == other.purchaseOrderState &&
|
purchaseOrderState == other.purchaseOrderState &&
|
||||||
recurringExpenseState == other.recurringExpenseState &&
|
recurringExpenseState == other.recurringExpenseState &&
|
||||||
|
|
@ -618,10 +632,10 @@ class _$UserCompanyState extends UserCompanyState {
|
||||||
$jc(
|
$jc(
|
||||||
$jc(
|
$jc(
|
||||||
$jc(
|
$jc(
|
||||||
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, lastUpdated.hashCode), userCompany.hashCode), documentState.hashCode), productState.hashCode), clientState.hashCode), invoiceState.hashCode), expenseState.hashCode), vendorState.hashCode), taskState.hashCode),
|
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, lastUpdated.hashCode), userCompany.hashCode), documentState.hashCode), productState.hashCode), clientState.hashCode), invoiceState.hashCode), expenseState.hashCode), vendorState.hashCode), taskState.hashCode), projectState.hashCode),
|
||||||
projectState.hashCode),
|
|
||||||
paymentState.hashCode),
|
paymentState.hashCode),
|
||||||
quoteState.hashCode),
|
quoteState.hashCode),
|
||||||
|
transactionState.hashCode),
|
||||||
bankAccountState.hashCode),
|
bankAccountState.hashCode),
|
||||||
purchaseOrderState.hashCode),
|
purchaseOrderState.hashCode),
|
||||||
recurringExpenseState.hashCode),
|
recurringExpenseState.hashCode),
|
||||||
|
|
@ -655,6 +669,7 @@ class _$UserCompanyState extends UserCompanyState {
|
||||||
..add('projectState', projectState)
|
..add('projectState', projectState)
|
||||||
..add('paymentState', paymentState)
|
..add('paymentState', paymentState)
|
||||||
..add('quoteState', quoteState)
|
..add('quoteState', quoteState)
|
||||||
|
..add('transactionState', transactionState)
|
||||||
..add('bankAccountState', bankAccountState)
|
..add('bankAccountState', bankAccountState)
|
||||||
..add('purchaseOrderState', purchaseOrderState)
|
..add('purchaseOrderState', purchaseOrderState)
|
||||||
..add('recurringExpenseState', recurringExpenseState)
|
..add('recurringExpenseState', recurringExpenseState)
|
||||||
|
|
@ -748,6 +763,12 @@ class UserCompanyStateBuilder
|
||||||
set quoteState(QuoteStateBuilder quoteState) =>
|
set quoteState(QuoteStateBuilder quoteState) =>
|
||||||
_$this._quoteState = quoteState;
|
_$this._quoteState = quoteState;
|
||||||
|
|
||||||
|
TransactionStateBuilder _transactionState;
|
||||||
|
TransactionStateBuilder get transactionState =>
|
||||||
|
_$this._transactionState ??= new TransactionStateBuilder();
|
||||||
|
set transactionState(TransactionStateBuilder transactionState) =>
|
||||||
|
_$this._transactionState = transactionState;
|
||||||
|
|
||||||
BankAccountStateBuilder _bankAccountState;
|
BankAccountStateBuilder _bankAccountState;
|
||||||
BankAccountStateBuilder get bankAccountState =>
|
BankAccountStateBuilder get bankAccountState =>
|
||||||
_$this._bankAccountState ??= new BankAccountStateBuilder();
|
_$this._bankAccountState ??= new BankAccountStateBuilder();
|
||||||
|
|
@ -862,6 +883,7 @@ class UserCompanyStateBuilder
|
||||||
_projectState = $v.projectState.toBuilder();
|
_projectState = $v.projectState.toBuilder();
|
||||||
_paymentState = $v.paymentState.toBuilder();
|
_paymentState = $v.paymentState.toBuilder();
|
||||||
_quoteState = $v.quoteState.toBuilder();
|
_quoteState = $v.quoteState.toBuilder();
|
||||||
|
_transactionState = $v.transactionState.toBuilder();
|
||||||
_bankAccountState = $v.bankAccountState.toBuilder();
|
_bankAccountState = $v.bankAccountState.toBuilder();
|
||||||
_purchaseOrderState = $v.purchaseOrderState.toBuilder();
|
_purchaseOrderState = $v.purchaseOrderState.toBuilder();
|
||||||
_recurringExpenseState = $v.recurringExpenseState.toBuilder();
|
_recurringExpenseState = $v.recurringExpenseState.toBuilder();
|
||||||
|
|
@ -913,6 +935,7 @@ class UserCompanyStateBuilder
|
||||||
projectState: projectState.build(),
|
projectState: projectState.build(),
|
||||||
paymentState: paymentState.build(),
|
paymentState: paymentState.build(),
|
||||||
quoteState: quoteState.build(),
|
quoteState: quoteState.build(),
|
||||||
|
transactionState: transactionState.build(),
|
||||||
bankAccountState: bankAccountState.build(),
|
bankAccountState: bankAccountState.build(),
|
||||||
purchaseOrderState: purchaseOrderState.build(),
|
purchaseOrderState: purchaseOrderState.build(),
|
||||||
recurringExpenseState: recurringExpenseState.build(),
|
recurringExpenseState: recurringExpenseState.build(),
|
||||||
|
|
@ -954,6 +977,8 @@ class UserCompanyStateBuilder
|
||||||
paymentState.build();
|
paymentState.build();
|
||||||
_$failedField = 'quoteState';
|
_$failedField = 'quoteState';
|
||||||
quoteState.build();
|
quoteState.build();
|
||||||
|
_$failedField = 'transactionState';
|
||||||
|
transactionState.build();
|
||||||
_$failedField = 'bankAccountState';
|
_$failedField = 'bankAccountState';
|
||||||
bankAccountState.build();
|
bankAccountState.build();
|
||||||
_$failedField = 'purchaseOrderState';
|
_$failedField = 'purchaseOrderState';
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,8 @@ import 'package:invoiceninja_flutter/redux/vendor/vendor_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/webhook/webhook_actions.dart';
|
import 'package:invoiceninja_flutter/redux/webhook/webhook_actions.dart';
|
||||||
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_actions.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_actions.dart';
|
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_actions.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_actions.dart';
|
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_actions.dart';
|
||||||
|
|
@ -551,6 +553,17 @@ Reducer<BuiltList<HistoryRecord>> historyReducer = combineReducers([
|
||||||
_addToHistory(historyList,
|
_addToHistory(historyList,
|
||||||
HistoryRecord(id: action.group.id, entityType: EntityType.group))),
|
HistoryRecord(id: action.group.id, entityType: EntityType.group))),
|
||||||
// STARTER: history - do not remove comment
|
// STARTER: history - do not remove comment
|
||||||
|
TypedReducer<BuiltList<HistoryRecord>, ViewTransaction>(
|
||||||
|
(historyList, action) => _addToHistory(
|
||||||
|
historyList,
|
||||||
|
HistoryRecord(
|
||||||
|
id: action.transactionId, entityType: EntityType.transaction))),
|
||||||
|
TypedReducer<BuiltList<HistoryRecord>, EditTransaction>(
|
||||||
|
(historyList, action) => _addToHistory(
|
||||||
|
historyList,
|
||||||
|
HistoryRecord(
|
||||||
|
id: action.transaction.id, entityType: EntityType.transaction))),
|
||||||
|
|
||||||
TypedReducer<BuiltList<HistoryRecord>, ViewBankAccount>(
|
TypedReducer<BuiltList<HistoryRecord>, ViewBankAccount>(
|
||||||
(historyList, action) => _addToHistory(
|
(historyList, action) => _addToHistory(
|
||||||
historyList,
|
historyList,
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,8 @@ import 'package:invoiceninja_flutter/redux/vendor/vendor_reducer.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/webhook/webhook_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/webhook/webhook_reducer.dart';
|
||||||
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_reducer.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_reducer.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_reducer.dart';
|
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_reducer.dart';
|
||||||
|
|
@ -80,6 +82,8 @@ UIState uiReducer(UIState state, dynamic action) {
|
||||||
.replace(dashboardUIReducer(state.dashboardUIState, action))
|
.replace(dashboardUIReducer(state.dashboardUIState, action))
|
||||||
..reportsUIState.replace(reportsUIReducer(state.reportsUIState, action))
|
..reportsUIState.replace(reportsUIReducer(state.reportsUIState, action))
|
||||||
// STARTER: reducer - do not remove comment
|
// STARTER: reducer - do not remove comment
|
||||||
|
..transactionUIState
|
||||||
|
.replace(transactionUIReducer(state.transactionUIState, action))
|
||||||
..bankAccountUIState
|
..bankAccountUIState
|
||||||
.replace(bankAccountUIReducer(state.bankAccountUIState, action))
|
.replace(bankAccountUIReducer(state.bankAccountUIState, action))
|
||||||
..purchaseOrderUIState
|
..purchaseOrderUIState
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,8 @@ import 'package:invoiceninja_flutter/ui/auth/login_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/strings.dart';
|
import 'package:invoiceninja_flutter/utils/strings.dart';
|
||||||
|
|
||||||
// STARTER: import - do not remove comment
|
// STARTER: import - do not remove comment
|
||||||
|
import 'package:invoiceninja_flutter/redux/transaction/transaction_state.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_state.dart';
|
import 'package:invoiceninja_flutter/redux/bank_account/bank_account_state.dart';
|
||||||
|
|
||||||
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_state.dart';
|
import 'package:invoiceninja_flutter/redux/purchase_order/purchase_order_state.dart';
|
||||||
|
|
@ -89,6 +91,9 @@ abstract class UIState implements Built<UIState, UIStateBuilder> {
|
||||||
paymentUIState: PaymentUIState(sortFields[EntityType.payment]),
|
paymentUIState: PaymentUIState(sortFields[EntityType.payment]),
|
||||||
quoteUIState: QuoteUIState(sortFields[EntityType.quote]),
|
quoteUIState: QuoteUIState(sortFields[EntityType.quote]),
|
||||||
// STARTER: constructor - do not remove comment
|
// STARTER: constructor - do not remove comment
|
||||||
|
transactionUIState:
|
||||||
|
TransactionUIState(sortFields[EntityType.transaction]),
|
||||||
|
|
||||||
bankAccountUIState:
|
bankAccountUIState:
|
||||||
BankAccountUIState(sortFields[EntityType.bankAccount]),
|
BankAccountUIState(sortFields[EntityType.bankAccount]),
|
||||||
|
|
||||||
|
|
@ -142,6 +147,8 @@ abstract class UIState implements Built<UIState, UIStateBuilder> {
|
||||||
InvoiceUIState get invoiceUIState;
|
InvoiceUIState get invoiceUIState;
|
||||||
|
|
||||||
// STARTER: properties - do not remove comment
|
// STARTER: properties - do not remove comment
|
||||||
|
TransactionUIState get transactionUIState;
|
||||||
|
|
||||||
BankAccountUIState get bankAccountUIState;
|
BankAccountUIState get bankAccountUIState;
|
||||||
|
|
||||||
PurchaseOrderUIState get purchaseOrderUIState;
|
PurchaseOrderUIState get purchaseOrderUIState;
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,9 @@ class _$UIStateSerializer implements StructuredSerializer<UIState> {
|
||||||
'invoiceUIState',
|
'invoiceUIState',
|
||||||
serializers.serialize(object.invoiceUIState,
|
serializers.serialize(object.invoiceUIState,
|
||||||
specifiedType: const FullType(InvoiceUIState)),
|
specifiedType: const FullType(InvoiceUIState)),
|
||||||
|
'transactionUIState',
|
||||||
|
serializers.serialize(object.transactionUIState,
|
||||||
|
specifiedType: const FullType(TransactionUIState)),
|
||||||
'bankAccountUIState',
|
'bankAccountUIState',
|
||||||
serializers.serialize(object.bankAccountUIState,
|
serializers.serialize(object.bankAccountUIState,
|
||||||
specifiedType: const FullType(BankAccountUIState)),
|
specifiedType: const FullType(BankAccountUIState)),
|
||||||
|
|
@ -215,6 +218,11 @@ class _$UIStateSerializer implements StructuredSerializer<UIState> {
|
||||||
result.invoiceUIState.replace(serializers.deserialize(value,
|
result.invoiceUIState.replace(serializers.deserialize(value,
|
||||||
specifiedType: const FullType(InvoiceUIState)) as InvoiceUIState);
|
specifiedType: const FullType(InvoiceUIState)) as InvoiceUIState);
|
||||||
break;
|
break;
|
||||||
|
case 'transactionUIState':
|
||||||
|
result.transactionUIState.replace(serializers.deserialize(value,
|
||||||
|
specifiedType: const FullType(TransactionUIState))
|
||||||
|
as TransactionUIState);
|
||||||
|
break;
|
||||||
case 'bankAccountUIState':
|
case 'bankAccountUIState':
|
||||||
result.bankAccountUIState.replace(serializers.deserialize(value,
|
result.bankAccountUIState.replace(serializers.deserialize(value,
|
||||||
specifiedType: const FullType(BankAccountUIState))
|
specifiedType: const FullType(BankAccountUIState))
|
||||||
|
|
@ -361,6 +369,8 @@ class _$UIState extends UIState {
|
||||||
@override
|
@override
|
||||||
final InvoiceUIState invoiceUIState;
|
final InvoiceUIState invoiceUIState;
|
||||||
@override
|
@override
|
||||||
|
final TransactionUIState transactionUIState;
|
||||||
|
@override
|
||||||
final BankAccountUIState bankAccountUIState;
|
final BankAccountUIState bankAccountUIState;
|
||||||
@override
|
@override
|
||||||
final PurchaseOrderUIState purchaseOrderUIState;
|
final PurchaseOrderUIState purchaseOrderUIState;
|
||||||
|
|
@ -428,6 +438,7 @@ class _$UIState extends UIState {
|
||||||
this.productUIState,
|
this.productUIState,
|
||||||
this.clientUIState,
|
this.clientUIState,
|
||||||
this.invoiceUIState,
|
this.invoiceUIState,
|
||||||
|
this.transactionUIState,
|
||||||
this.bankAccountUIState,
|
this.bankAccountUIState,
|
||||||
this.purchaseOrderUIState,
|
this.purchaseOrderUIState,
|
||||||
this.recurringExpenseUIState,
|
this.recurringExpenseUIState,
|
||||||
|
|
@ -476,6 +487,8 @@ class _$UIState extends UIState {
|
||||||
clientUIState, 'UIState', 'clientUIState');
|
clientUIState, 'UIState', 'clientUIState');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
invoiceUIState, 'UIState', 'invoiceUIState');
|
invoiceUIState, 'UIState', 'invoiceUIState');
|
||||||
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
transactionUIState, 'UIState', 'transactionUIState');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
bankAccountUIState, 'UIState', 'bankAccountUIState');
|
bankAccountUIState, 'UIState', 'bankAccountUIState');
|
||||||
BuiltValueNullFieldError.checkNotNull(
|
BuiltValueNullFieldError.checkNotNull(
|
||||||
|
|
@ -552,6 +565,7 @@ class _$UIState extends UIState {
|
||||||
productUIState == other.productUIState &&
|
productUIState == other.productUIState &&
|
||||||
clientUIState == other.clientUIState &&
|
clientUIState == other.clientUIState &&
|
||||||
invoiceUIState == other.invoiceUIState &&
|
invoiceUIState == other.invoiceUIState &&
|
||||||
|
transactionUIState == other.transactionUIState &&
|
||||||
bankAccountUIState == other.bankAccountUIState &&
|
bankAccountUIState == other.bankAccountUIState &&
|
||||||
purchaseOrderUIState == other.purchaseOrderUIState &&
|
purchaseOrderUIState == other.purchaseOrderUIState &&
|
||||||
recurringExpenseUIState == other.recurringExpenseUIState &&
|
recurringExpenseUIState == other.recurringExpenseUIState &&
|
||||||
|
|
@ -600,7 +614,7 @@ class _$UIState extends UIState {
|
||||||
$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, selectedCompanyIndex.hashCode), currentRoute.hashCode), previousRoute.hashCode), loadingEntityType.hashCode), previewStack.hashCode), filterStack.hashCode), filter.hashCode), filterClearedAt.hashCode), lastActivityAt.hashCode), dashboardUIState.hashCode), productUIState.hashCode), clientUIState.hashCode), invoiceUIState.hashCode), bankAccountUIState.hashCode), purchaseOrderUIState.hashCode), recurringExpenseUIState.hashCode), subscriptionUIState.hashCode), taskStatusUIState.hashCode), expenseCategoryUIState.hashCode),
|
$jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc($jc(0, selectedCompanyIndex.hashCode), currentRoute.hashCode), previousRoute.hashCode), loadingEntityType.hashCode), previewStack.hashCode), filterStack.hashCode), filter.hashCode), filterClearedAt.hashCode), lastActivityAt.hashCode), dashboardUIState.hashCode), productUIState.hashCode), clientUIState.hashCode), invoiceUIState.hashCode), transactionUIState.hashCode), bankAccountUIState.hashCode), purchaseOrderUIState.hashCode), recurringExpenseUIState.hashCode), subscriptionUIState.hashCode), taskStatusUIState.hashCode), expenseCategoryUIState.hashCode),
|
||||||
recurringInvoiceUIState.hashCode),
|
recurringInvoiceUIState.hashCode),
|
||||||
webhookUIState.hashCode),
|
webhookUIState.hashCode),
|
||||||
tokenUIState.hashCode),
|
tokenUIState.hashCode),
|
||||||
|
|
@ -638,6 +652,7 @@ class _$UIState extends UIState {
|
||||||
..add('productUIState', productUIState)
|
..add('productUIState', productUIState)
|
||||||
..add('clientUIState', clientUIState)
|
..add('clientUIState', clientUIState)
|
||||||
..add('invoiceUIState', invoiceUIState)
|
..add('invoiceUIState', invoiceUIState)
|
||||||
|
..add('transactionUIState', transactionUIState)
|
||||||
..add('bankAccountUIState', bankAccountUIState)
|
..add('bankAccountUIState', bankAccountUIState)
|
||||||
..add('purchaseOrderUIState', purchaseOrderUIState)
|
..add('purchaseOrderUIState', purchaseOrderUIState)
|
||||||
..add('recurringExpenseUIState', recurringExpenseUIState)
|
..add('recurringExpenseUIState', recurringExpenseUIState)
|
||||||
|
|
@ -739,6 +754,12 @@ class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
||||||
set invoiceUIState(InvoiceUIStateBuilder invoiceUIState) =>
|
set invoiceUIState(InvoiceUIStateBuilder invoiceUIState) =>
|
||||||
_$this._invoiceUIState = invoiceUIState;
|
_$this._invoiceUIState = invoiceUIState;
|
||||||
|
|
||||||
|
TransactionUIStateBuilder _transactionUIState;
|
||||||
|
TransactionUIStateBuilder get transactionUIState =>
|
||||||
|
_$this._transactionUIState ??= new TransactionUIStateBuilder();
|
||||||
|
set transactionUIState(TransactionUIStateBuilder transactionUIState) =>
|
||||||
|
_$this._transactionUIState = transactionUIState;
|
||||||
|
|
||||||
BankAccountUIStateBuilder _bankAccountUIState;
|
BankAccountUIStateBuilder _bankAccountUIState;
|
||||||
BankAccountUIStateBuilder get bankAccountUIState =>
|
BankAccountUIStateBuilder get bankAccountUIState =>
|
||||||
_$this._bankAccountUIState ??= new BankAccountUIStateBuilder();
|
_$this._bankAccountUIState ??= new BankAccountUIStateBuilder();
|
||||||
|
|
@ -913,6 +934,7 @@ class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
||||||
_productUIState = $v.productUIState.toBuilder();
|
_productUIState = $v.productUIState.toBuilder();
|
||||||
_clientUIState = $v.clientUIState.toBuilder();
|
_clientUIState = $v.clientUIState.toBuilder();
|
||||||
_invoiceUIState = $v.invoiceUIState.toBuilder();
|
_invoiceUIState = $v.invoiceUIState.toBuilder();
|
||||||
|
_transactionUIState = $v.transactionUIState.toBuilder();
|
||||||
_bankAccountUIState = $v.bankAccountUIState.toBuilder();
|
_bankAccountUIState = $v.bankAccountUIState.toBuilder();
|
||||||
_purchaseOrderUIState = $v.purchaseOrderUIState.toBuilder();
|
_purchaseOrderUIState = $v.purchaseOrderUIState.toBuilder();
|
||||||
_recurringExpenseUIState = $v.recurringExpenseUIState.toBuilder();
|
_recurringExpenseUIState = $v.recurringExpenseUIState.toBuilder();
|
||||||
|
|
@ -978,6 +1000,7 @@ class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
||||||
productUIState: productUIState.build(),
|
productUIState: productUIState.build(),
|
||||||
clientUIState: clientUIState.build(),
|
clientUIState: clientUIState.build(),
|
||||||
invoiceUIState: invoiceUIState.build(),
|
invoiceUIState: invoiceUIState.build(),
|
||||||
|
transactionUIState: transactionUIState.build(),
|
||||||
bankAccountUIState: bankAccountUIState.build(),
|
bankAccountUIState: bankAccountUIState.build(),
|
||||||
purchaseOrderUIState: purchaseOrderUIState.build(),
|
purchaseOrderUIState: purchaseOrderUIState.build(),
|
||||||
recurringExpenseUIState: recurringExpenseUIState.build(),
|
recurringExpenseUIState: recurringExpenseUIState.build(),
|
||||||
|
|
@ -1019,6 +1042,8 @@ class UIStateBuilder implements Builder<UIState, UIStateBuilder> {
|
||||||
clientUIState.build();
|
clientUIState.build();
|
||||||
_$failedField = 'invoiceUIState';
|
_$failedField = 'invoiceUIState';
|
||||||
invoiceUIState.build();
|
invoiceUIState.build();
|
||||||
|
_$failedField = 'transactionUIState';
|
||||||
|
transactionUIState.build();
|
||||||
_$failedField = 'bankAccountUIState';
|
_$failedField = 'bankAccountUIState';
|
||||||
bankAccountUIState.build();
|
bankAccountUIState.build();
|
||||||
_$failedField = 'purchaseOrderUIState';
|
_$failedField = 'purchaseOrderUIState';
|
||||||
|
|
|
||||||
|
|
@ -613,6 +613,13 @@ class _MenuDrawerState extends State<MenuDrawer> {
|
||||||
iconTooltip: localization.newExpense,
|
iconTooltip: localization.newExpense,
|
||||||
),
|
),
|
||||||
// STARTER: menu - do not remove comment
|
// STARTER: menu - do not remove comment
|
||||||
|
DrawerTile(
|
||||||
|
company: company,
|
||||||
|
entityType: EntityType.transaction,
|
||||||
|
icon: getEntityIcon(EntityType.transaction),
|
||||||
|
title: localization.transactions,
|
||||||
|
),
|
||||||
|
|
||||||
DrawerTile(
|
DrawerTile(
|
||||||
company: company,
|
company: company,
|
||||||
entityType: EntityType.recurringExpense,
|
entityType: EntityType.recurringExpense,
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,18 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
static final Map<String, Map<String, String>> _localizedValues = {
|
static final Map<String, Map<String, String>> _localizedValues = {
|
||||||
'en': {
|
'en': {
|
||||||
// STARTER: lang key - do not remove comment
|
// STARTER: lang key - do not remove comment
|
||||||
|
'transaction': 'Transaction',
|
||||||
|
'transactions': 'Transactions',
|
||||||
|
'new_transaction': 'New Transaction',
|
||||||
|
'edit_transaction': 'Edit Transaction',
|
||||||
|
'created_transaction': 'Successfully created transaction',
|
||||||
|
'updated_transaction': 'Successfully updated transaction',
|
||||||
|
'archived_transaction': 'Successfully archived transaction',
|
||||||
|
'deleted_transaction': 'Successfully deleted transaction',
|
||||||
|
'removed_transaction': 'Successfully removed transaction',
|
||||||
|
'restored_transaction': 'Successfully restored transaction',
|
||||||
|
'search_transaction': 'Search Transaction',
|
||||||
|
|
||||||
'bank_account': 'Bank Account',
|
'bank_account': 'Bank Account',
|
||||||
'bank_accounts': 'Bank Accounts',
|
'bank_accounts': 'Bank Accounts',
|
||||||
'archived_bank_account': 'Successfully archived bank account',
|
'archived_bank_account': 'Successfully archived bank account',
|
||||||
|
|
@ -87232,6 +87244,36 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
||||||
_localizedValues['en']['search_bank_account'];
|
_localizedValues['en']['search_bank_account'];
|
||||||
|
|
||||||
// STARTER: lang field - do not remove comment
|
// STARTER: lang field - do not remove comment
|
||||||
|
String get transaction =>
|
||||||
|
_localizedValues[localeCode]['transaction'] ??
|
||||||
|
_localizedValues['en']['transaction'];
|
||||||
|
String get transactions =>
|
||||||
|
_localizedValues[localeCode]['transactions'] ??
|
||||||
|
_localizedValues['en']['transactions'];
|
||||||
|
String get newTransaction =>
|
||||||
|
_localizedValues[localeCode]['new_transaction'] ??
|
||||||
|
_localizedValues['en']['new_transaction'];
|
||||||
|
String get createdTransaction =>
|
||||||
|
_localizedValues[localeCode]['created_transaction'] ??
|
||||||
|
_localizedValues['en']['created_transaction'];
|
||||||
|
String get updatedTransaction =>
|
||||||
|
_localizedValues[localeCode]['updated_transaction'] ??
|
||||||
|
_localizedValues['en']['updated_transaction'];
|
||||||
|
String get archivedTransaction =>
|
||||||
|
_localizedValues[localeCode]['archived_transaction'] ??
|
||||||
|
_localizedValues['en']['archived_transaction'];
|
||||||
|
String get deletedTransaction =>
|
||||||
|
_localizedValues[localeCode]['deleted_transaction'] ??
|
||||||
|
_localizedValues['en']['deleted_transaction'];
|
||||||
|
String get restoredTransaction =>
|
||||||
|
_localizedValues[localeCode]['restored_transaction'] ??
|
||||||
|
_localizedValues['en']['restored_transaction'];
|
||||||
|
String get editTransaction =>
|
||||||
|
_localizedValues[localeCode]['edit_transaction'] ??
|
||||||
|
_localizedValues['en']['edit_transaction'];
|
||||||
|
String get searchTransaction =>
|
||||||
|
_localizedValues[localeCode]['search_transaction'] ??
|
||||||
|
_localizedValues['en']['search_transaction'];
|
||||||
|
|
||||||
String lookup(String key) {
|
String lookup(String key) {
|
||||||
final lookupKey = toSnakeCase(key);
|
final lookupKey = toSnakeCase(key);
|
||||||
|
|
|
||||||
29
starter.sh
29
starter.sh
|
|
@ -188,7 +188,7 @@ else
|
||||||
echo "app_state: import"
|
echo "app_state: import"
|
||||||
comment="STARTER: import - do not remove comment"
|
comment="STARTER: import - do not remove comment"
|
||||||
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_state.dart';import 'package:${package}\/ui\/${module_snake}\/edit\/${module_snake}_edit_vm.dart';import 'package:${package}\/redux\/${module_snake}\/${module_snake}_selectors.dart';${lineBreak}"
|
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_state.dart';import 'package:${package}\/ui\/${module_snake}\/edit\/${module_snake}_edit_vm.dart';import 'package:${package}\/redux\/${module_snake}\/${module_snake}_selectors.dart';${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/redux/app/app_state.dart
|
sed -i -e "s/$comment/$code${lineBreak}$comment/g" ./lib/redux/app/app_state.dart
|
||||||
|
|
||||||
echo "app_state: list"
|
echo "app_state: list"
|
||||||
comment="STARTER: states switch list - do not remove comment"
|
comment="STARTER: states switch list - do not remove comment"
|
||||||
|
|
@ -295,10 +295,6 @@ else
|
||||||
comment="STARTER: sort default - do not remove comment"
|
comment="STARTER: sort default - do not remove comment"
|
||||||
code="return ${module_camel}A.${element}.compareTo(${module_camel}B.${element});${lineBreak}"
|
code="return ${module_camel}A.${element}.compareTo(${module_camel}B.${element});${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" "./lib/data/models/${module_snake}_model.dart"
|
sed -i -e "s/$comment/$comment${lineBreak}$code/g" "./lib/data/models/${module_snake}_model.dart"
|
||||||
|
|
||||||
comment="STARTER: display name - do not remove comment"
|
|
||||||
code="return ${element};${lineBreak}"
|
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" "./lib/data/models/${module_snake}_model.dart"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$idx" -eq 1 ]; then
|
if [ "$idx" -eq 1 ]; then
|
||||||
|
|
@ -312,7 +308,7 @@ else
|
||||||
echo "main: import"
|
echo "main: import"
|
||||||
comment="STARTER: import - do not remove comment"
|
comment="STARTER: import - do not remove comment"
|
||||||
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_middleware.dart';${lineBreak}"
|
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_middleware.dart';${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/main.dart
|
sed -i -e "s/$code/$code${lineBreak}$comment/g" ./lib/main.dart
|
||||||
|
|
||||||
comment="STARTER: middleware - do not remove comment"
|
comment="STARTER: middleware - do not remove comment"
|
||||||
code="..addAll(createStore${Modules}Middleware())${lineBreak}"
|
code="..addAll(createStore${Modules}Middleware())${lineBreak}"
|
||||||
|
|
@ -323,7 +319,7 @@ else
|
||||||
code="${code}import 'package:${package}\/ui\/${module_snake}\/edit\/${module_snake}_edit_vm.dart';${lineBreak}"
|
code="${code}import 'package:${package}\/ui\/${module_snake}\/edit\/${module_snake}_edit_vm.dart';${lineBreak}"
|
||||||
code="${code}import 'package:${package}\/ui\/${module_snake}\/view\/${module_snake}_view_vm.dart';${lineBreak}"
|
code="${code}import 'package:${package}\/ui\/${module_snake}\/view\/${module_snake}_view_vm.dart';${lineBreak}"
|
||||||
code="${code}import 'package:${package}\/ui\/${module_snake}\/${module_snake}_screen_vm.dart';${lineBreak}"
|
code="${code}import 'package:${package}\/ui\/${module_snake}\/${module_snake}_screen_vm.dart';${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/main_app.dart
|
sed -i -e "s/$comment/$code${lineBreak}$comment/g" ./lib/main_app.dart
|
||||||
|
|
||||||
comment="STARTER: routes - do not remove comment"
|
comment="STARTER: routes - do not remove comment"
|
||||||
code="${Module}Screen.route: (context) => ${Module}ScreenBuilder(),${lineBreak}"
|
code="${Module}Screen.route: (context) => ${Module}ScreenBuilder(),${lineBreak}"
|
||||||
|
|
@ -336,9 +332,8 @@ else
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/data/models/models.dart
|
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/data/models/models.dart
|
||||||
|
|
||||||
comment="STARTER: import - do not remove comment"
|
comment="STARTER: import - do not remove comment"
|
||||||
code="import 'package:${package}\/data\/models\/${module_snake}_model.dart';${lineBreak}"
|
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_state.dart';${lineBreak}"
|
||||||
code="${code}import 'package:${package}\/redux\/${module_snake}\/${module_snake}_state.dart';${lineBreak}"
|
sed -i -e "s/$comment/$code${lineBreak}$comment/g" ./lib/data/models/serializers.dart
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/data/models/serializers.dart
|
|
||||||
|
|
||||||
comment="STARTER: serializers - do not remove comment"
|
comment="STARTER: serializers - do not remove comment"
|
||||||
code="${Module}Entity,${lineBreak}${Module}ListResponse,${lineBreak}${Module}ItemResponse,${lineBreak}"
|
code="${Module}Entity,${lineBreak}${Module}ListResponse,${lineBreak}${Module}ItemResponse,${lineBreak}"
|
||||||
|
|
@ -346,7 +341,7 @@ else
|
||||||
|
|
||||||
comment="STARTER: import - do not remove comment"
|
comment="STARTER: import - do not remove comment"
|
||||||
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_state.dart';${lineBreak}"
|
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_state.dart';${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/redux/company/company_state.dart
|
sed -i -e "s/$comment/$code${lineBreak}$comment/g" ./lib/redux/company/company_state.dart
|
||||||
|
|
||||||
comment="STARTER: fields - do not remove comment"
|
comment="STARTER: fields - do not remove comment"
|
||||||
code="${Module}State get ${module_camel}State;${lineBreak}"
|
code="${Module}State get ${module_camel}State;${lineBreak}"
|
||||||
|
|
@ -358,7 +353,7 @@ else
|
||||||
|
|
||||||
comment="STARTER: import - do not remove comment"
|
comment="STARTER: import - do not remove comment"
|
||||||
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_reducer.dart';${lineBreak}"
|
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_reducer.dart';${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/redux/company/company_reducer.dart
|
sed -i -e "s/$comment/$code${lineBreak}$comment/g" ./lib/redux/company/company_reducer.dart
|
||||||
|
|
||||||
comment="STARTER: reducer - do not remove comment"
|
comment="STARTER: reducer - do not remove comment"
|
||||||
code="..${module_camel}State.replace(${modules_camel}Reducer(state.${module_camel}State, action))${lineBreak}"
|
code="..${module_camel}State.replace(${modules_camel}Reducer(state.${module_camel}State, action))${lineBreak}"
|
||||||
|
|
@ -375,7 +370,7 @@ else
|
||||||
|
|
||||||
comment="STARTER: import - do not remove comment"
|
comment="STARTER: import - do not remove comment"
|
||||||
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_state.dart';${lineBreak}"
|
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_state.dart';${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/redux/ui/ui_state.dart
|
sed -i -e "s/$comment/$code${lineBreak}$comment/g" ./lib/redux/ui/ui_state.dart
|
||||||
|
|
||||||
comment="STARTER: properties - do not remove comment"
|
comment="STARTER: properties - do not remove comment"
|
||||||
code="${Module}UIState get ${module_camel}UIState;${lineBreak}"
|
code="${Module}UIState get ${module_camel}UIState;${lineBreak}"
|
||||||
|
|
@ -387,7 +382,7 @@ else
|
||||||
|
|
||||||
comment="STARTER: import - do not remove comment"
|
comment="STARTER: import - do not remove comment"
|
||||||
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_reducer.dart';${lineBreak}"
|
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_reducer.dart';${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/redux/ui/ui_reducer.dart
|
sed -i -e "s/$comment/$code${lineBreak}$comment/g" ./lib/redux/ui/ui_reducer.dart
|
||||||
|
|
||||||
comment="STARTER: reducer - do not remove comment"
|
comment="STARTER: reducer - do not remove comment"
|
||||||
code="..${module_camel}UIState.replace(${module_camel}UIReducer(state.${module_camel}UIState, action))${lineBreak}"
|
code="..${module_camel}UIState.replace(${module_camel}UIReducer(state.${module_camel}UIState, action))${lineBreak}"
|
||||||
|
|
@ -395,7 +390,7 @@ else
|
||||||
|
|
||||||
comment="STARTER: import - do not remove comment"
|
comment="STARTER: import - do not remove comment"
|
||||||
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_actions.dart';${lineBreak}"
|
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_actions.dart';${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/redux/app/app_reducer.dart
|
sed -i -e "s/$comment/$code${lineBreak}$comment/g" ./lib/redux/app/app_reducer.dart
|
||||||
|
|
||||||
comment="STARTER: errors - do not remove comment"
|
comment="STARTER: errors - do not remove comment"
|
||||||
code="TypedReducer<String, Load${Modules}Failure>((state, action) { return '\${action.error}'; }),${lineBreak}"
|
code="TypedReducer<String, Load${Modules}Failure>((state, action) { return '\${action.error}'; }),${lineBreak}"
|
||||||
|
|
@ -407,11 +402,11 @@ else
|
||||||
|
|
||||||
comment="STARTER: import - do not remove comment"
|
comment="STARTER: import - do not remove comment"
|
||||||
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_actions.dart';${lineBreak}"
|
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_actions.dart';${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/redux/ui/pref_reducer.dart
|
sed -i -e "s/$comment/$code${lineBreak}$comment/g" ./lib/redux/ui/pref_reducer.dart
|
||||||
|
|
||||||
comment="STARTER: import - do not remove comment"
|
comment="STARTER: import - do not remove comment"
|
||||||
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_actions.dart';${lineBreak}"
|
code="import 'package:${package}\/redux\/${module_snake}\/${module_snake}_actions.dart';${lineBreak}"
|
||||||
sed -i -e "s/$comment/$comment${lineBreak}$code/g" ./lib/redux/app/app_actions.dart
|
sed -i -e "s/$comment/$code${lineBreak}$comment/g" ./lib/redux/app/app_actions.dart
|
||||||
|
|
||||||
comment="STARTER: view list - do not remove comment"
|
comment="STARTER: view list - do not remove comment"
|
||||||
code="case EntityType.${module_camel}: action = View${Module}List(); break;${lineBreak}"
|
code="case EntityType.${module_camel}: action = View${Module}List(); break;${lineBreak}"
|
||||||
|
|
|
||||||
|
|
@ -73,10 +73,6 @@ abstract class StubEntity extends Object with BaseEntity implements Built<StubEn
|
||||||
@override
|
@override
|
||||||
EntityType get entityType => EntityType.stub;
|
EntityType get entityType => EntityType.stub;
|
||||||
|
|
||||||
String get displayName {
|
|
||||||
// STARTER: display name - do not remove comment
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
List<EntityAction> getActions(
|
List<EntityAction> getActions(
|
||||||
|
|
@ -121,8 +117,7 @@ abstract class StubEntity extends Object with BaseEntity implements Built<StubEn
|
||||||
bool matchesFilter(String filter) {
|
bool matchesFilter(String filter) {
|
||||||
return matchesStrings(
|
return matchesStrings(
|
||||||
haystacks: [
|
haystacks: [
|
||||||
name,
|
//
|
||||||
type,
|
|
||||||
],
|
],
|
||||||
needle: filter,
|
needle: filter,
|
||||||
);
|
);
|
||||||
|
|
@ -132,8 +127,7 @@ abstract class StubEntity extends Object with BaseEntity implements Built<StubEn
|
||||||
String matchesFilterValue(String filter) {
|
String matchesFilterValue(String filter) {
|
||||||
return matchesStringsValue(
|
return matchesStringsValue(
|
||||||
haystacks: [
|
haystacks: [
|
||||||
name,
|
//
|
||||||
type,
|
|
||||||
],
|
],
|
||||||
needle: filter,
|
needle: filter,
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import 'dart:convert';
|
||||||
import 'dart:core';
|
import 'dart:core';
|
||||||
import 'package:built_collection/built_collection.dart';
|
import 'package:built_collection/built_collection.dart';
|
||||||
import 'package:invoiceninja_flutter/constants.dart';
|
import 'package:invoiceninja_flutter/constants.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/stub_model.dart';
|
|
||||||
import 'package:invoiceninja_flutter/data/models/serializers.dart';
|
import 'package:invoiceninja_flutter/data/models/serializers.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,6 @@ import 'package:flutter/widgets.dart';
|
||||||
import 'package:redux/redux.dart';
|
import 'package:redux/redux.dart';
|
||||||
import 'package:invoiceninja_flutter/main_app.dart';
|
import 'package:invoiceninja_flutter/main_app.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_middleware.dart';
|
|
||||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart';
|
import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/stub/stub_screen.dart';
|
import 'package:invoiceninja_flutter/ui/stub/stub_screen.dart';
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import 'package:invoiceninja_flutter/redux/ui/entity_ui_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/stub/stub_actions.dart';
|
import 'package:invoiceninja_flutter/redux/stub/stub_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/ui/list_ui_state.dart';
|
import 'package:invoiceninja_flutter/redux/ui/list_ui_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/stub/stub_state.dart';
|
import 'package:invoiceninja_flutter/redux/stub/stub_state.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
|
||||||
|
|
||||||
EntityUIState stubUIReducer(StubUIState state, dynamic action) {
|
EntityUIState stubUIReducer(StubUIState state, dynamic action) {
|
||||||
return state.rebuild((b) => b
|
return state.rebuild((b) => b
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:invoiceninja_flutter/data/models/stub_model.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/static/static_state.dart';
|
import 'package:invoiceninja_flutter/redux/static/static_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:memoize/memoize.dart';
|
import 'package:memoize/memoize.dart';
|
||||||
|
|
@ -84,7 +83,7 @@ List<String> filteredStubsSelector(
|
||||||
list.sort((stubAId, stubBId) {
|
list.sort((stubAId, stubBId) {
|
||||||
final stubA = stubMap[stubAId];
|
final stubA = stubMap[stubAId];
|
||||||
final stubB = stubMap[stubBId];
|
final stubB = stubMap[stubBId];
|
||||||
return stubAA.compareTo(stubB, stubListState.sortField,
|
return stubA.compareTo(stubB, stubListState.sortField,
|
||||||
stubListState.sortAscending);
|
stubListState.sortAscending);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import 'dart:async';
|
||||||
import 'package:built_value/built_value.dart';
|
import 'package:built_value/built_value.dart';
|
||||||
import 'package:built_value/serializer.dart';
|
import 'package:built_value/serializer.dart';
|
||||||
import 'package:built_collection/built_collection.dart';
|
import 'package:built_collection/built_collection.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/stub_model.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/ui/entity_ui_state.dart';
|
import 'package:invoiceninja_flutter/redux/ui/entity_ui_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/ui/list_ui_state.dart';
|
import 'package:invoiceninja_flutter/redux/ui/list_ui_state.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/edit_scaffold.dart';
|
import 'package:invoiceninja_flutter/ui/app/edit_scaffold.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/form_card.dart';
|
import 'package:invoiceninja_flutter/ui/app/form_card.dart';
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,14 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart';
|
import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
|
||||||
import 'package:redux/redux.dart';
|
import 'package:redux/redux.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/completers.dart';
|
import 'package:invoiceninja_flutter/utils/completers.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/dialogs/error_dialog.dart';
|
import 'package:invoiceninja_flutter/ui/app/dialogs/error_dialog.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/stub/view/stub_view_vm.dart';
|
import 'package:invoiceninja_flutter/ui/stub/view/stub_view_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/stub/stub_actions.dart';
|
import 'package:invoiceninja_flutter/redux/stub/stub_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/stub_model.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/stub/edit/stub_edit.dart';
|
import 'package:invoiceninja_flutter/ui/stub/edit/stub_edit.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
import 'package:flutter_styled_toast/flutter_styled_toast.dart';
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,8 @@
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/stub_model.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/entity_state_label.dart';
|
import 'package:invoiceninja_flutter/ui/app/entity_state_label.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
import 'package:invoiceninja_flutter/utils/formatting.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/dismissible_entity.dart';
|
import 'package:invoiceninja_flutter/ui/app/dismissible_entity.dart';
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:invoiceninja_flutter/data/models/stub_model.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/app/entities/entity_actions_dialog.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/app/tables/entity_list.dart';
|
import 'package:invoiceninja_flutter/ui/app/tables/entity_list.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/stub/stub_list_item.dart';
|
import 'package:invoiceninja_flutter/ui/stub/stub_list_item.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/stub/stub_presenter.dart';
|
import 'package:invoiceninja_flutter/ui/stub/stub_presenter.dart';
|
||||||
import 'package:redux/redux.dart';
|
import 'package:redux/redux.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:built_collection/built_collection.dart';
|
import 'package:built_collection/built_collection.dart';
|
||||||
|
|
@ -88,8 +85,10 @@ class StubListVM {
|
||||||
state: state,
|
state: state,
|
||||||
userCompany: state.userCompany,
|
userCompany: state.userCompany,
|
||||||
listState: state.stubListState,
|
listState: state.stubListState,
|
||||||
stubList: memoizedFilteredStubList(state.stubState.map,
|
stubList: memoizedFilteredStubList(state.getUISelection(EntityType.stub),
|
||||||
state.stubState.list, state.stubListState),
|
state.stubState.map,
|
||||||
|
state.stubState.list,
|
||||||
|
state.stubListState),
|
||||||
stubMap: state.stubState.map,
|
stubMap: state.stubState.map,
|
||||||
isLoading: state.isLoading,
|
isLoading: state.isLoading,
|
||||||
filter: state.stubUIState.listUIState.filter,
|
filter: state.stubUIState.listUIState.filter,
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ class StubScreen extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final store = StoreProvider.of<AppState>(context);
|
final store = StoreProvider.of<AppState>(context);
|
||||||
final state = store.state;
|
final state = store.state;
|
||||||
final company = state.company;
|
|
||||||
final userCompany = state.userCompany;
|
final userCompany = state.userCompany;
|
||||||
final localization = AppLocalization.of(context);
|
final localization = AppLocalization.of(context);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import 'package:built_collection/built_collection.dart';
|
import 'package:built_collection/built_collection.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/scrollable_listview.dart';
|
import 'package:invoiceninja_flutter/ui/app/scrollable_listview.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/stub/view/stub_view_vm.dart';
|
import 'package:invoiceninja_flutter/ui/stub/view/stub_view_vm.dart';
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:flutter/foundation.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/completers.dart';
|
import 'package:invoiceninja_flutter/utils/completers.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:redux/redux.dart';
|
import 'package:redux/redux.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/stub/stub_actions.dart';
|
import 'package:invoiceninja_flutter/redux/stub/stub_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/data/models/stub_model.dart';
|
|
||||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/stub/view/stub_view.dart';
|
import 'package:invoiceninja_flutter/ui/stub/view/stub_view.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue