Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Mar 3, 2023
2 parents 412842c + 9c8f26c commit 76c6d5e
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const String kGitHubDiffUrl =
'https://github.com/invoiceninja/invoiceninja/compare/vVERSION...v5-stable';
const String kGitHubLangUrl =
'https://github.com/invoiceninja/invoiceninja/blob/master/resources/lang/en/texts.php';
const String kStatusCheckUrl = 'https://status.invoiceninja.com/';
const String kStatusCheckUrl = 'https://status.invoiceninja.com';
const String kGoogleAnalyticsUrl =
'https://support.google.com/analytics/answer/1037249?hl=en';

Expand Down
25 changes: 25 additions & 0 deletions lib/ui/client/view/client_view_overview.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Flutter imports:
import 'package:flutter/material.dart';
import 'package:invoiceninja_flutter/redux/client/client_selectors.dart';
import 'package:invoiceninja_flutter/ui/app/portal_links.dart';

// Package imports:
Expand Down Expand Up @@ -118,6 +119,11 @@ class ClientOverview extends StatelessWidget {
value: client.customValue4);
}

final availableCredits =
memoizedGetClientAvailableCredits(client.id, state.creditState.map);
final unappliedPayments =
memoizedGetClientUnappliedPayments(client.id, state.paymentState.map);

return ScrollableListView(
children: <Widget>[
EntityHeader(
Expand All @@ -129,6 +135,25 @@ class ClientOverview extends StatelessWidget {
formatNumber(client.balance, context, clientId: client.id),
),
ListDivider(),
if (availableCredits != 0 || unappliedPayments != 0) ...[
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 12),
child:
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
if (availableCredits != 0)
Text(localization.credit +
': ' +
formatNumber(availableCredits, context,
clientId: client.id)),
if (unappliedPayments != 0)
Text(localization.payments +
': ' +
formatNumber(unappliedPayments, context,
clientId: client.id)),
]),
),
ListDivider(),
],
Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 16),
child: PortalLinks(
Expand Down
11 changes: 8 additions & 3 deletions pubspec.foss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies:
memoize: ^3.0.0
cached_network_image: 3.0.0 # imageRenderMethodForWeb: ImageRenderMethodForWeb.HttpGet,
url_launcher: ^6.0.20
share: ^2.0.4
share_plus: ^6.3.1
intl: ^0.17.0
flutter_slidable: ^2.0.0
charts_flutter: ^0.12.0
Expand All @@ -56,7 +56,7 @@ dependencies:
# flutter_launcher_icons: ^0.9.1
overflow_view: ^0.3.1
flutter_styled_toast: ^2.0.0
permission_handler: 9.1.0
permission_handler: 9.1.0 # Disables Windows support to fix crash
file_picker: ^5.2.5
boardview: ^0.2.2
pointer_interceptor: ^0.9.0
Expand All @@ -69,7 +69,6 @@ dependencies:
git:
url: https://github.com/superlistapp/super_editor.git
path: super_editor
ref: 1601fdce95ebfa34bddf80cab3e58e700b0edec3
html2md: ^1.2.6
printing: ^5.10.1
image_cropper: ^3.0.1
Expand All @@ -82,6 +81,12 @@ dependencies:
# quick_actions: ^0.2.1
# idb_shim: ^1.11.1+1

dependency_overrides:
photo_view:
git:
url: https://github.com/bluefireteam/photo_view
ref: master

dev_dependencies:
flutter_driver:
sdk: flutter
Expand Down
1 change: 0 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ dependencies:
git:
url: https://github.com/superlistapp/super_editor.git
path: super_editor
#ref: 1601fdce95ebfa34bddf80cab3e58e700b0edec3
html2md: ^1.2.6
printing: ^5.10.1
image_cropper: ^3.0.1
Expand Down

0 comments on commit 76c6d5e

Please sign in to comment.