Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Sep 1, 2024
2 parents 4d5d184 + adf9e59 commit d00a1d5
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 10 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.163"
automatic_release_tag: "v5.0.164"
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.164" date="2024-09-01"/>
<release version="5.0.163" date="2024-08-28"/>
<release version="5.0.162" date="2024-08-21"/>
<release version="5.0.161" date="2024-06-27"/>
Expand Down
5 changes: 4 additions & 1 deletion lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Constants {
}

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

const String kAppName = 'Invoice Ninja';
Expand Down Expand Up @@ -1140,3 +1140,6 @@ const String kActivityExpenseNotificationSent = '139';
const String kActivityStatementSent = '140';
const String kActivityComment = '141';
const String kActivityQuoteEmailReminder1 = '142';
const String kActivityAutoBillSuccess = '143';
const String kActivityAutoBillFailure = '144';
const String kActivityEInvoiceSuccess = '145';
4 changes: 4 additions & 0 deletions lib/data/models/entities.dart
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ class EmailTemplate extends EnumClass {
static const EmailTemplate quote = _$quote_email;
static const EmailTemplate payment = _$payment_email;
static const EmailTemplate payment_partial = _$payment_partial_email;
static const EmailTemplate payment_failed = _$payment_failed_email;
static const EmailTemplate credit = _$credit_email;
static const EmailTemplate purchase_order = _$purchase_order;
static const EmailTemplate statement = _$statement_email;
Expand Down Expand Up @@ -826,6 +827,9 @@ abstract class ActivityEntity
kActivityEmailReminder3,
kActivityEmailReminderEndless,
kActivityEmailInvoiceFailed,
kActivityAutoBillSuccess,
kActivityAutoBillFailure,
kActivityEInvoiceSuccess,
].contains(activityTypeId)) {
return EntityType.invoice;
} else if ([
Expand Down
5 changes: 5 additions & 0 deletions lib/data/models/entities.g.dart

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

10 changes: 10 additions & 0 deletions lib/data/models/settings_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,12 @@ abstract class SettingsEntity
@BuiltValueField(wireName: 'payment_flow')
String? get paymentFlow;

@BuiltValueField(wireName: 'email_subject_payment_failed')
String? get emailSubjectPaymentFailed;

@BuiltValueField(wireName: 'email_template_payment_failed')
String? get emailBodyPaymentFailed;

bool? get taskRoundingEnabled =>
taskRoundToNearest == null ? null : taskRoundToNearest != 1;

Expand Down Expand Up @@ -970,6 +976,8 @@ abstract class SettingsEntity
return emailSubjectPayment;
case EmailTemplate.payment_partial:
return emailSubjectPaymentPartial;
case EmailTemplate.payment_failed:
return emailSubjectPaymentFailed;
case EmailTemplate.reminder1:
return emailSubjectReminder1;
case EmailTemplate.reminder2:
Expand Down Expand Up @@ -1007,6 +1015,8 @@ abstract class SettingsEntity
return emailBodyPayment;
case EmailTemplate.payment_partial:
return emailBodyPaymentPartial;
case EmailTemplate.payment_failed:
return emailBodyPaymentFailed;
case EmailTemplate.reminder1:
return emailBodyReminder1;
case EmailTemplate.reminder2:
Expand Down
56 changes: 52 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.

3 changes: 2 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,12 @@ class MyHttpOverrides extends HttpOverrides {
}

void main({bool isTesting = false}) async {
WidgetsFlutterBinding.ensureInitialized();

final prefs = await SharedPreferences.getInstance();
HttpOverrides.global =
MyHttpOverrides(prefs.getString(kSharedPrefHostOverride) ?? '');

WidgetsFlutterBinding.ensureInitialized();
_registerErrorHandlers();

final ConnectionStatusSingleton connectionStatus =
Expand Down
6 changes: 6 additions & 0 deletions lib/ui/settings/templates_and_reminders.dart
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ class _TemplatesAndRemindersState extends State<TemplatesAndReminders>
settings = settings.rebuild((b) => b
..emailBodyPaymentPartial = body
..emailSubjectPaymentPartial = subject);
} else if (_selectedTemplate == EmailTemplate.payment_failed) {
settings = settings.rebuild((b) => b
..emailBodyPaymentFailed = body
..emailSubjectPaymentFailed = subject);
} else if (_selectedTemplate == EmailTemplate.reminder1) {
settings = settings.rebuild((b) => b
..emailBodyReminder1 = body
Expand Down Expand Up @@ -373,6 +377,7 @@ class _TemplatesAndRemindersState extends State<TemplatesAndReminders>
EmailTemplate.statement,
EmailTemplate.payment,
EmailTemplate.payment_partial,
EmailTemplate.payment_failed,
].contains(value) &&
!company.isModuleEnabled(EntityType.invoice)) {
return false;
Expand Down Expand Up @@ -564,6 +569,7 @@ class _TemplatesAndRemindersState extends State<TemplatesAndReminders>
showInvoiceAsInvoices: [
EmailTemplate.payment,
EmailTemplate.payment_partial,
EmailTemplate.payment_partial,
].contains(template),
),
SizedBox(height: 16),
Expand Down
6 changes: 6 additions & 0 deletions lib/utils/i18n.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = {
'en': {
// STARTER: lang key - do not remove comment
'payment_failed': 'Payment Failed',
'activity_141': 'User :user entered note :notes',
'activity_142': 'Quote :number reminder 1 sent',
'activity_143': 'Auto Bill succeeded for invoice :invoice',
'activity_144': 'Auto Bill failed for invoice :invoice. :notes',
'activity_145': 'EInvoice :invoice for :client was e-delivered. :notes',
'ssl_host_override': 'SSL Host Override',
'upload_logo_short': 'Upload Logo',
'show_pdfhtml_on_mobile_help':
Expand Down
2 changes: 1 addition & 1 deletion pubspec.foss.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: invoiceninja_flutter
description: Client for Invoice Ninja
version: 5.0.163+163
version: 5.0.164+164
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: invoiceninja_flutter
description: Client for Invoice Ninja
version: 5.0.163+163
version: 5.0.164+164
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: invoiceninja
version: '5.0.163'
version: '5.0.164'
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
Expand Down

0 comments on commit d00a1d5

Please sign in to comment.