Merge branch 'develop'

This commit is contained in:
Hillel Coren 2023-12-03 11:16:34 +02:00
commit f8ab5f1d8e
9 changed files with 41 additions and 13 deletions

View File

@ -86,7 +86,7 @@ jobs:
draft: false draft: false
prerelease: false prerelease: false
title: "Latest Release" title: "Latest Release"
automatic_release_tag: "v5.0.144" automatic_release_tag: "v5.0.145"
files: | files: |
${{ github.workspace }}/artifacts/Invoice-Ninja-Archive ${{ github.workspace }}/artifacts/Invoice-Ninja-Archive
${{ github.workspace }}/artifacts/Invoice-Ninja-Hash ${{ github.workspace }}/artifacts/Invoice-Ninja-Hash

View File

@ -50,6 +50,7 @@
</screenshots> </screenshots>
<content_rating type="oars-1.1"/> <content_rating type="oars-1.1"/>
<releases> <releases>
<release version="5.0.145" date="2023-12-03"/>
<release version="5.0.144" date="2023-12-01"/> <release version="5.0.144" date="2023-12-01"/>
<release version="5.0.143" date="2023-11-30"/> <release version="5.0.143" date="2023-11-30"/>
<release version="5.0.142" date="2023-11-28"/> <release version="5.0.142" date="2023-11-28"/>

View File

@ -4,7 +4,7 @@ class Constants {
} }
// TODO remove version once #46609 is fixed // TODO remove version once #46609 is fixed
const String kClientVersion = '5.0.144'; const String kClientVersion = '5.0.145';
const String kMinServerVersion = '5.0.4'; const String kMinServerVersion = '5.0.4';
const String kAppName = 'Invoice Ninja'; const String kAppName = 'Invoice Ninja';
@ -487,6 +487,7 @@ const String kGatewayStripe = 'd14dd26a37cecc30fdd65700bfb55b23';
const String kGatewayStripeConnect = 'd14dd26a47cecc30fdd65700bfb67b34'; const String kGatewayStripeConnect = 'd14dd26a47cecc30fdd65700bfb67b34';
const String kGatewayAuthorizeNet = '3b6621f970ab18887c4f6dca78d3f8bb'; const String kGatewayAuthorizeNet = '3b6621f970ab18887c4f6dca78d3f8bb';
const String kGatewayCheckoutCom = '3758e7f7c6f4cecf0f4f348b9a00f456'; const String kGatewayCheckoutCom = '3758e7f7c6f4cecf0f4f348b9a00f456';
const String kGatewayPayPalREST = '80af24a6a691230bbec33e930ab40665';
const String kGatewayPayPalExpress = '38f2c48af60c7dd69e04248cbb24c36e'; const String kGatewayPayPalExpress = '38f2c48af60c7dd69e04248cbb24c36e';
const String kGatewayPayPalPlatform = '80af24a6a691230bbec33e930ab40666'; const String kGatewayPayPalPlatform = '80af24a6a691230bbec33e930ab40666';
const String kGatewayWePay = '8fdeed552015b3c7b44ed6c8ebd9e992'; const String kGatewayWePay = '8fdeed552015b3c7b44ed6c8ebd9e992';

View File

@ -1,5 +1,6 @@
// Package imports: // Package imports:
import 'package:built_collection/built_collection.dart'; import 'package:built_collection/built_collection.dart';
import 'package:invoiceninja_flutter/constants.dart';
import 'package:memoize/memoize.dart'; import 'package:memoize/memoize.dart';
// Project imports: // Project imports:
@ -127,13 +128,36 @@ List<String?> sizeList(BuiltMap<String, SizeEntity> sizeMap) {
return list; return list;
} }
var memoizedGatewayList = memo1( var memoizedGatewayList = memo2(
(BuiltMap<String, GatewayEntity> gatewayMap) => gatewayList(gatewayMap)); (BuiltMap<String, GatewayEntity> gatewayMap, bool isHosted) =>
gatewayList(gatewayMap, isHosted));
List<String?> gatewayList(BuiltMap<String, GatewayEntity> gatewayMap) { List<String?> gatewayList(
final list = gatewayMap.keys BuiltMap<String, GatewayEntity> gatewayMap, bool isHosted) {
.where((gatewayId) => gatewayMap[gatewayId]!.isVisible) final list = gatewayMap.keys.where((gatewayId) {
.toList(); final gateway = gatewayMap[gatewayId]!;
if (!gateway.isVisible) {
return false;
}
if (isHosted) {
if ([
kGatewayPayPalExpress,
kGatewayPayPalREST,
].contains(gateway.id)) {
return false;
}
} else {
if ([
kGatewayPayPalPlatform,
].contains(gateway.id)) {
return false;
}
}
return true;
}).toList();
list.sort((idA, idB) => list.sort((idA, idB) =>
gatewayMap[idA]!.sortOrder.compareTo(gatewayMap[idB]!.sortOrder)); gatewayMap[idA]!.sortOrder.compareTo(gatewayMap[idB]!.sortOrder));

View File

@ -152,8 +152,8 @@ class _CompanyGatewayEditState extends State<CompanyGatewayEdit>
EntityDropdown( EntityDropdown(
autofocus: true, autofocus: true,
entityType: EntityType.gateway, entityType: EntityType.gateway,
entityList: entityList: memoizedGatewayList(
memoizedGatewayList(state.staticState.gatewayMap), state.staticState.gatewayMap, state.isHosted),
labelText: localization.provider, labelText: localization.provider,
entityId: companyGateway.gatewayId, entityId: companyGateway.gatewayId,
onSelected: (SelectableEntity? gateway) { onSelected: (SelectableEntity? gateway) {

View File

@ -18,6 +18,8 @@ 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
'payment_type_credit': 'Payment Type Credit',
'payment_type_debit': 'Payment Type Debit',
'send_emails_to': 'Send Emails To', 'send_emails_to': 'Send Emails To',
'primary_contact': 'Primary Contact', 'primary_contact': 'Primary Contact',
'all_contacts': 'All Contacts', 'all_contacts': 'All Contacts',

View File

@ -1,6 +1,6 @@
name: invoiceninja_flutter name: invoiceninja_flutter
description: Client for Invoice Ninja description: Client for Invoice Ninja
version: 5.0.144+144 version: 5.0.145+145
homepage: https://invoiceninja.com homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io documentation: https://invoiceninja.github.io
publish_to: none publish_to: none

View File

@ -1,6 +1,6 @@
name: invoiceninja_flutter name: invoiceninja_flutter
description: Client for Invoice Ninja description: Client for Invoice Ninja
version: 5.0.144+144 version: 5.0.145+145
homepage: https://invoiceninja.com homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io documentation: https://invoiceninja.github.io
publish_to: none publish_to: none

View File

@ -1,5 +1,5 @@
name: invoiceninja name: invoiceninja
version: '5.0.144' version: '5.0.145'
summary: Create invoices, accept payments, track expenses & time tasks summary: Create invoices, accept payments, track expenses & time tasks
description: "### Note: if the app fails to run using `snap run invoiceninja` it may help to run `/snap/invoiceninja/current/bin/invoiceninja` instead description: "### Note: if the app fails to run using `snap run invoiceninja` it may help to run `/snap/invoiceninja/current/bin/invoiceninja` instead