Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Nov 30, 2023
2 parents cd9634e + 78f50d3 commit b403b7e
Show file tree
Hide file tree
Showing 24 changed files with 180 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
draft: false
prerelease: false
title: "Latest Release"
automatic_release_tag: "v5.0.142"
automatic_release_tag: "v5.0.143"
files: |
${{ github.workspace }}/artifacts/Invoice-Ninja-Archive
${{ github.workspace }}/artifacts/Invoice-Ninja-Hash
Expand Down
1 change: 1 addition & 0 deletions flatpak/com.invoiceninja.InvoiceNinja.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
</screenshots>
<content_rating type="oars-1.1"/>
<releases>
<release version="5.0.143" date="2023-11-30"/>
<release version="5.0.142" date="2023-11-28"/>
<release version="5.0.141" date="2023-11-17"/>
<release version="5.0.140" date="2023-11-14"/>
Expand Down
2 changes: 2 additions & 0 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,7 @@
<true/>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>FLTEnableImpeller</key>
<false/>
</dict>
</plist>
3 changes: 2 additions & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Constants {
}

// TODO remove version once #46609 is fixed
const String kClientVersion = '5.0.142';
const String kClientVersion = '5.0.143';
const String kMinServerVersion = '5.0.4';

const String kAppName = 'Invoice Ninja';
Expand Down Expand Up @@ -488,6 +488,7 @@ const String kGatewayStripeConnect = 'd14dd26a47cecc30fdd65700bfb67b34';
const String kGatewayAuthorizeNet = '3b6621f970ab18887c4f6dca78d3f8bb';
const String kGatewayCheckoutCom = '3758e7f7c6f4cecf0f4f348b9a00f456';
const String kGatewayPayPalExpress = '38f2c48af60c7dd69e04248cbb24c36e';
const String kGatewayPayPalPlatform = '80af24a6a691230bbec33e930ab40666';
const String kGatewayWePay = '8fdeed552015b3c7b44ed6c8ebd9e992';
const String kGatewayCustom = '54faab2ab6e3223dbe848b1686490baa';

Expand Down
8 changes: 8 additions & 0 deletions lib/data/models/import_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ class ExportType extends EnumClass {
static const ExportType products = _$products;
static const ExportType tasks = _$tasks;
static const ExportType profitloss = _$profitloss;
static const ExportType aged_receivable_detailed_report =
_$aged_receivable_detailed_report;
static const ExportType aged_receivable_summary_report =
_$aged_receivable_summary_report;
static const ExportType client_balance_report = _$client_balance_report;
static const ExportType client_sales_report = _$client_sales_report;
static const ExportType tax_summary_report = _$tax_summary_report;
static const ExportType user_sales_report = _$user_sales_report;

static BuiltSet<ExportType> get values => _$exportValues;

Expand Down
29 changes: 29 additions & 0 deletions lib/data/models/import_model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions lib/data/models/settings_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -811,6 +811,9 @@ abstract class SettingsEntity

String? get classification;

@BuiltValueField(wireName: 'payment_email_all_contacts')
bool? get paymentEmailAllContacts;

bool get hasAddress => address1 != null && address1!.isNotEmpty;

bool get hasLogo => companyLogo != null && companyLogo!.isNotEmpty;
Expand Down
32 changes: 28 additions & 4 deletions lib/data/models/settings_model.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion lib/redux/invoice/invoice_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,13 @@ class RemoveInvoiceContact implements PersistUI {
}

class AddInvoiceItem implements PersistUI {
AddInvoiceItem({this.invoiceItem});
AddInvoiceItem({
this.invoiceItem,
this.index,
});

final InvoiceItemEntity? invoiceItem;
final int? index;
}

class MoveInvoiceItem implements PersistUI {
Expand Down
6 changes: 5 additions & 1 deletion lib/redux/invoice/invoice_reducer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ InvoiceEntity _updateEditing(InvoiceEntity? invoice, dynamic action) {

InvoiceEntity _addInvoiceItem(InvoiceEntity? invoice, AddInvoiceItem action) {
final item = action.invoiceItem ?? InvoiceItemEntity();
return invoice!.rebuild((b) => b..lineItems.add(item));
if (action.index == null) {
return invoice!.rebuild((b) => b..lineItems.add(item));
} else {
return invoice!.rebuild((b) => b..lineItems.insert(action.index!, item));
}
}

InvoiceEntity _addInvoiceItems(InvoiceEntity? invoice, AddInvoiceItems action) {
Expand Down
17 changes: 7 additions & 10 deletions lib/ui/app/app_bottom_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
if (closeBottomSheet() == kFilterStatePanel) {
return;
}
_filterStateController =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) {
_filterStateController = Scaffold.of(context).showBottomSheet((context) {
return StoreConnector<AppState, BuiltList<EntityState>>(
converter: (Store<AppState> store) =>
store.state.getListState(widget.entityType).stateFilters,
Expand Down Expand Up @@ -185,8 +184,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
return;
}

_filterStatusController =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) {
_filterStatusController = Scaffold.of(context).showBottomSheet((context) {
return StoreConnector<AppState, BuiltList<EntityStatus>>(
converter: (Store<AppState> store) =>
store.state.getListState(widget.entityType).statusFilters,
Expand Down Expand Up @@ -226,8 +224,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
return;
}

_sortController =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) {
_sortController = Scaffold.of(context).showBottomSheet((context) {
return StoreConnector<AppState, ListUIState>(
//distinct: true,
converter: (Store<AppState> store) =>
Expand Down Expand Up @@ -284,7 +281,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
}

_filterCustom1Controller =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) {
Scaffold.of(context).showBottomSheet((context) {
return CustomFieldSelector(
customNumber: 1,
entityType: widget.entityType,
Expand All @@ -304,7 +301,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
return;
}
_filterCustom2Controller =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) {
Scaffold.of(context).showBottomSheet((context) {
return CustomFieldSelector(
customNumber: 2,
entityType: widget.entityType,
Expand All @@ -325,7 +322,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
}

_filterCustom3Controller =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) {
Scaffold.of(context).showBottomSheet((context) {
return CustomFieldSelector(
customNumber: 3,
entityType: widget.entityType,
Expand All @@ -346,7 +343,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
}

_filterCustom4Controller =
Scaffold.of(context).showBottomSheet<StoreConnector>((context) {
Scaffold.of(context).showBottomSheet((context) {
return CustomFieldSelector(
customNumber: 4,
entityType: widget.entityType,
Expand Down
42 changes: 20 additions & 22 deletions lib/ui/app/edit_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -433,30 +433,28 @@ class EditScaffold extends StatelessWidget {
//size: iconSize,
//color: color,
),
itemBuilder: (BuildContext context) =>
<PopupMenuEntry<EntityAction>>[
itemBuilder: (BuildContext context) => [
...actions!
.map((action) => action == null
? PopupMenuDivider()
: PopupMenuItem<EntityAction>(
child: Row(
children: <Widget>[
Icon(
getEntityActionIcon(action),
color: Theme.of(context)
.colorScheme
.secondary,
),
SizedBox(width: 16.0),
Text(AppLocalization.of(
context)!
.lookup(action.toString())),
],
.map((action) => action == null
? PopupMenuDivider()
: PopupMenuItem<EntityAction>(
child: Row(
children: <Widget>[
Icon(
getEntityActionIcon(action),
color: Theme.of(context)
.colorScheme
.secondary,
),
value: action,
))
.toList()
as Iterable<PopupMenuEntry<EntityAction>>
SizedBox(width: 16.0),
Text(AppLocalization.of(context)!
.lookup(action.toString())),
],
),
value: action,
))
.whereType<PopupMenuEntry<EntityAction>>()
.toList()
],
onSelected: (action) =>
onActionPressed!(context, action),
Expand Down
1 change: 1 addition & 0 deletions lib/ui/company_gateway/edit/company_gateway_edit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class _CompanyGatewayEditState extends State<CompanyGatewayEdit>
final connectGateways = [
kGatewayStripeConnect,
kGatewayWePay,
kGatewayPayPalPlatform,
];

final disableSave = (connectGateways.contains(companyGateway.gatewayId) &&
Expand Down
4 changes: 4 additions & 0 deletions lib/ui/company_gateway/edit/company_gateway_edit_vm.dart
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ class CompanyGatewayEditVM {
launchUrl(Uri.parse(
'${cleanApiUrl(credentials.url)}/wepay/signup/${response['hash']}'));
break;
case kGatewayPayPalPlatform:
launchUrl(Uri.parse(
'${cleanApiUrl(credentials.url)}/paypal/signup/${response['hash']}'));
break;
}
}).catchError((dynamic error) {
store.dispatch(StopSaving());
Expand Down
Loading

0 comments on commit b403b7e

Please sign in to comment.