Merge branch 'develop'

This commit is contained in:
Hillel Coren 2024-01-29 18:10:38 +02:00
commit eafe0d67a1
16 changed files with 93 additions and 25 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.152" automatic_release_tag: "v5.0.153"
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.153" date="2024-01-29"/>
<release version="5.0.152" date="2024-01-24"/> <release version="5.0.152" date="2024-01-24"/>
<release version="5.0.151" date="2024-01-23"/> <release version="5.0.151" date="2024-01-23"/>
<release version="5.0.150" date="2024-01-18"/> <release version="5.0.150" date="2024-01-18"/>

View File

@ -6,7 +6,7 @@ class Constants {
} }
// TODO remove version once #46609 is fixed // TODO remove version once #46609 is fixed
const String kClientVersion = '5.0.152'; const String kClientVersion = '5.0.153';
const String kMinServerVersion = '5.0.4'; const String kMinServerVersion = '5.0.4';
const String kAppName = 'Invoice Ninja'; const String kAppName = 'Invoice Ninja';
@ -704,9 +704,9 @@ final kReportMap = {
kReportQuoteItem: ExportType.quote_items, kReportQuoteItem: ExportType.quote_items,
kReportRecurringExpense: null, kReportRecurringExpense: null,
kReportRecurringInvoice: ExportType.recurring_invoices, kReportRecurringInvoice: ExportType.recurring_invoices,
kReportPurchaseOrder: null, kReportPurchaseOrder: ExportType.purchase_order,
kReportPurchaseOrderItem: null, kReportPurchaseOrderItem: ExportType.purchase_order_item,
kReportVendor: null, kReportVendor: ExportType.vendor,
kReportTransaction: null, kReportTransaction: null,
}; };

View File

@ -202,6 +202,9 @@ class ExportType extends EnumClass {
static const ExportType products = _$products; static const ExportType products = _$products;
static const ExportType tasks = _$tasks; static const ExportType tasks = _$tasks;
static const ExportType profitloss = _$profitloss; static const ExportType profitloss = _$profitloss;
static const ExportType vendor = _$vendor;
static const ExportType purchase_order = _$purchase_order;
static const ExportType purchase_order_item = _$purchase_order_item;
static const ExportType ar_detailed = _$ar_detailed; static const ExportType ar_detailed = _$ar_detailed;
static const ExportType ar_summary = _$ar_summary; static const ExportType ar_summary = _$ar_summary;
static const ExportType client_balance = _$client_balance; static const ExportType client_balance = _$client_balance;

View File

@ -62,6 +62,10 @@ const ExportType _$payments = const ExportType._('payments');
const ExportType _$products = const ExportType._('products'); const ExportType _$products = const ExportType._('products');
const ExportType _$tasks = const ExportType._('tasks'); const ExportType _$tasks = const ExportType._('tasks');
const ExportType _$profitloss = const ExportType._('profitloss'); const ExportType _$profitloss = const ExportType._('profitloss');
const ExportType _$vendor = const ExportType._('vendor');
const ExportType _$purchase_order = const ExportType._('purchase_order');
const ExportType _$purchase_order_item =
const ExportType._('purchase_order_item');
const ExportType _$ar_detailed = const ExportType._('ar_detailed'); const ExportType _$ar_detailed = const ExportType._('ar_detailed');
const ExportType _$ar_summary = const ExportType._('ar_summary'); const ExportType _$ar_summary = const ExportType._('ar_summary');
const ExportType _$client_balance = const ExportType._('client_balance'); const ExportType _$client_balance = const ExportType._('client_balance');
@ -101,6 +105,12 @@ ExportType _$exportValueOf(String name) {
return _$tasks; return _$tasks;
case 'profitloss': case 'profitloss':
return _$profitloss; return _$profitloss;
case 'vendor':
return _$vendor;
case 'purchase_order':
return _$purchase_order;
case 'purchase_order_item':
return _$purchase_order_item;
case 'ar_detailed': case 'ar_detailed':
return _$ar_detailed; return _$ar_detailed;
case 'ar_summary': case 'ar_summary':
@ -135,6 +145,9 @@ final BuiltSet<ExportType> _$exportValues =
_$products, _$products,
_$tasks, _$tasks,
_$profitloss, _$profitloss,
_$vendor,
_$purchase_order,
_$purchase_order_item,
_$ar_detailed, _$ar_detailed,
_$ar_summary, _$ar_summary,
_$client_balance, _$client_balance,

View File

@ -815,6 +815,9 @@ abstract class SettingsEntity
@BuiltValueField(wireName: 'payment_email_all_contacts') @BuiltValueField(wireName: 'payment_email_all_contacts')
bool? get paymentEmailAllContacts; bool? get paymentEmailAllContacts;
@BuiltValueField(wireName: 'show_pdfhtml_on_mobile')
bool? get showPdfhtmlOnMobile;
bool get hasAddress => address1 != null && address1!.isNotEmpty; bool get hasAddress => address1 != null && address1!.isNotEmpty;
bool get hasLogo => companyLogo != null && companyLogo!.isNotEmpty; bool get hasLogo => companyLogo != null && companyLogo!.isNotEmpty;

View File

@ -1578,6 +1578,13 @@ class _$SettingsEntitySerializer
..add( ..add(
serializers.serialize(value, specifiedType: const FullType(bool))); serializers.serialize(value, specifiedType: const FullType(bool)));
} }
value = object.showPdfhtmlOnMobile;
if (value != null) {
result
..add('show_pdfhtml_on_mobile')
..add(
serializers.serialize(value, specifiedType: const FullType(bool)));
}
return result; return result;
} }
@ -2496,6 +2503,10 @@ class _$SettingsEntitySerializer
result.paymentEmailAllContacts = serializers.deserialize(value, result.paymentEmailAllContacts = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool?; specifiedType: const FullType(bool)) as bool?;
break; break;
case 'show_pdfhtml_on_mobile':
result.showPdfhtmlOnMobile = serializers.deserialize(value,
specifiedType: const FullType(bool)) as bool?;
break;
} }
} }
@ -3023,6 +3034,8 @@ class _$SettingsEntity extends SettingsEntity {
final String? classification; final String? classification;
@override @override
final bool? paymentEmailAllContacts; final bool? paymentEmailAllContacts;
@override
final bool? showPdfhtmlOnMobile;
factory _$SettingsEntity([void Function(SettingsEntityBuilder)? updates]) => factory _$SettingsEntity([void Function(SettingsEntityBuilder)? updates]) =>
(new SettingsEntityBuilder()..update(updates))._build(); (new SettingsEntityBuilder()..update(updates))._build();
@ -3251,7 +3264,8 @@ class _$SettingsEntity extends SettingsEntity {
this.eInvoiceType, this.eInvoiceType,
this.defaultExpensePaymentTypeId, this.defaultExpensePaymentTypeId,
this.classification, this.classification,
this.paymentEmailAllContacts}) this.paymentEmailAllContacts,
this.showPdfhtmlOnMobile})
: super._(); : super._();
@override @override
@ -3494,7 +3508,8 @@ class _$SettingsEntity extends SettingsEntity {
eInvoiceType == other.eInvoiceType && eInvoiceType == other.eInvoiceType &&
defaultExpensePaymentTypeId == other.defaultExpensePaymentTypeId && defaultExpensePaymentTypeId == other.defaultExpensePaymentTypeId &&
classification == other.classification && classification == other.classification &&
paymentEmailAllContacts == other.paymentEmailAllContacts; paymentEmailAllContacts == other.paymentEmailAllContacts &&
showPdfhtmlOnMobile == other.showPdfhtmlOnMobile;
} }
int? __hashCode; int? __hashCode;
@ -3726,6 +3741,7 @@ class _$SettingsEntity extends SettingsEntity {
_$hash = $jc(_$hash, defaultExpensePaymentTypeId.hashCode); _$hash = $jc(_$hash, defaultExpensePaymentTypeId.hashCode);
_$hash = $jc(_$hash, classification.hashCode); _$hash = $jc(_$hash, classification.hashCode);
_$hash = $jc(_$hash, paymentEmailAllContacts.hashCode); _$hash = $jc(_$hash, paymentEmailAllContacts.hashCode);
_$hash = $jc(_$hash, showPdfhtmlOnMobile.hashCode);
_$hash = $jf(_$hash); _$hash = $jf(_$hash);
return __hashCode ??= _$hash; return __hashCode ??= _$hash;
} }
@ -3961,7 +3977,8 @@ class _$SettingsEntity extends SettingsEntity {
..add('eInvoiceType', eInvoiceType) ..add('eInvoiceType', eInvoiceType)
..add('defaultExpensePaymentTypeId', defaultExpensePaymentTypeId) ..add('defaultExpensePaymentTypeId', defaultExpensePaymentTypeId)
..add('classification', classification) ..add('classification', classification)
..add('paymentEmailAllContacts', paymentEmailAllContacts)) ..add('paymentEmailAllContacts', paymentEmailAllContacts)
..add('showPdfhtmlOnMobile', showPdfhtmlOnMobile))
.toString(); .toString();
} }
} }
@ -5077,6 +5094,11 @@ class SettingsEntityBuilder
set paymentEmailAllContacts(bool? paymentEmailAllContacts) => set paymentEmailAllContacts(bool? paymentEmailAllContacts) =>
_$this._paymentEmailAllContacts = paymentEmailAllContacts; _$this._paymentEmailAllContacts = paymentEmailAllContacts;
bool? _showPdfhtmlOnMobile;
bool? get showPdfhtmlOnMobile => _$this._showPdfhtmlOnMobile;
set showPdfhtmlOnMobile(bool? showPdfhtmlOnMobile) =>
_$this._showPdfhtmlOnMobile = showPdfhtmlOnMobile;
SettingsEntityBuilder(); SettingsEntityBuilder();
SettingsEntityBuilder get _$this { SettingsEntityBuilder get _$this {
@ -5306,6 +5328,7 @@ class SettingsEntityBuilder
_defaultExpensePaymentTypeId = $v.defaultExpensePaymentTypeId; _defaultExpensePaymentTypeId = $v.defaultExpensePaymentTypeId;
_classification = $v.classification; _classification = $v.classification;
_paymentEmailAllContacts = $v.paymentEmailAllContacts; _paymentEmailAllContacts = $v.paymentEmailAllContacts;
_showPdfhtmlOnMobile = $v.showPdfhtmlOnMobile;
_$v = null; _$v = null;
} }
return this; return this;
@ -5554,7 +5577,8 @@ class SettingsEntityBuilder
eInvoiceType: eInvoiceType, eInvoiceType: eInvoiceType,
defaultExpensePaymentTypeId: defaultExpensePaymentTypeId, defaultExpensePaymentTypeId: defaultExpensePaymentTypeId,
classification: classification, classification: classification,
paymentEmailAllContacts: paymentEmailAllContacts); paymentEmailAllContacts: paymentEmailAllContacts,
showPdfhtmlOnMobile: showPdfhtmlOnMobile);
} catch (_) { } catch (_) {
late String _$failedField; late String _$failedField;
try { try {

View File

@ -235,6 +235,7 @@ class _EmailSettingsState extends State<EmailSettings> {
DropdownMenuItem( DropdownMenuItem(
child: Text(localization.defaultWord), child: Text(localization.defaultWord),
value: SettingsEntity.EMAIL_SENDING_METHOD_DEFAULT), value: SettingsEntity.EMAIL_SENDING_METHOD_DEFAULT),
if (!kReleaseMode)
DropdownMenuItem( DropdownMenuItem(
child: Text('SMTP'), child: Text('SMTP'),
value: SettingsEntity.EMAIL_SENDING_METHOD_SMTP), value: SettingsEntity.EMAIL_SENDING_METHOD_SMTP),

View File

@ -622,6 +622,14 @@ class _InvoiceDesignState extends State<InvoiceDesign>
settings settings
.rebuild((b) => b..embedDocuments = value)), .rebuild((b) => b..embedDocuments = value)),
), ),
BoolDropdownButton(
label: localization.mobileVersion,
value: settings.showPdfhtmlOnMobile ?? true,
iconData: Icons.mobile_friendly,
onChanged: (value) => viewModel.onSettingsChanged(
settings.rebuild(
(b) => b..showPdfhtmlOnMobile = value)),
),
], ],
), ),
FormCard( FormCard(

View File

@ -553,6 +553,7 @@ class SettingsSearch extends StatelessWidget {
'show_shipping_address#2023-01-29', 'show_shipping_address#2023-01-29',
'share_invoice_quote_columns#2023-03-20', 'share_invoice_quote_columns#2023-03-20',
'invoice_embed_documents#2023-10-27', 'invoice_embed_documents#2023-10-27',
'mobile_version#2024-01-29',
if (supportsDesignTemplates()) ...[ if (supportsDesignTemplates()) ...[
'delivery_note_design#2023-11-06', 'delivery_note_design#2023-11-06',
'statement_design#2023-11-06', 'statement_design#2023-11-06',

View File

@ -31,18 +31,27 @@ class _TaskEditTimesState extends State<TaskEditTimes> {
TaskTime? selectedTaskTime; TaskTime? selectedTaskTime;
void _showTaskTimeEditor(TaskTime? taskTime, BuildContext context) { void _showTaskTimeEditor(TaskTime? taskTime, BuildContext context) {
if (taskTime == null) {
return;
}
final viewModel = widget.viewModel;
final task = viewModel.task!;
final taskTimes = task.getTaskTimes();
if (taskTimes.where((time) => time.equalTo(taskTime)).isEmpty) {
return;
}
showDialog<ResponsivePadding>( showDialog<ResponsivePadding>(
barrierDismissible: false, barrierDismissible: false,
context: context, context: context,
builder: (BuildContext context) { builder: (BuildContext context) {
final viewModel = widget.viewModel;
final task = viewModel.task!;
final taskTimes = task.getTaskTimes();
return TimeEditDetails( return TimeEditDetails(
viewModel: viewModel, viewModel: viewModel,
taskTime: taskTime, taskTime: taskTime,
index: taskTimes.indexOf( index: taskTimes.indexOf(
taskTimes.firstWhere((time) => time.equalTo(taskTime!))), taskTimes.firstWhere((time) => time.equalTo(taskTime))),
); );
}); });
} }

View File

@ -18,6 +18,7 @@ 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
'mobile_version': 'Mobile Version',
'venmo': 'Venmo', 'venmo': 'Venmo',
'mercado_pago': 'Mercado Pago', 'mercado_pago': 'Mercado Pago',
'my_bank': 'MyBank', 'my_bank': 'MyBank',
@ -114268,6 +114269,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
_localizedValues[localeCode]!['email_report'] ?? _localizedValues[localeCode]!['email_report'] ??
_localizedValues['en']!['email_report']!; _localizedValues['en']!['email_report']!;
String get mobileVersion =>
_localizedValues[localeCode]!['mobile_version'] ??
_localizedValues['en']!['mobile_version']!;
// STARTER: lang field - do not remove comment // STARTER: lang field - do not remove comment
String lookup(String? key) { String lookup(String? key) {

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.152+152 version: 5.0.153+153
homepage: https://invoiceninja.com homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io documentation: https://invoiceninja.github.io
publish_to: none publish_to: none
@ -44,7 +44,7 @@ dependencies:
git: git:
url: https://github.com/theyakka/qr.flutter.git url: https://github.com/theyakka/qr.flutter.git
local_auth: ^2.1.5 local_auth: ^2.1.5
sentry_flutter: ^7.12.0 sentry_flutter: ^7.15.0
image_picker: ^1.0.4 image_picker: ^1.0.4
flutter_colorpicker: ^1.0.3 flutter_colorpicker: ^1.0.3
flutter_json_viewer: ^1.0.1 flutter_json_viewer: ^1.0.1

View File

@ -1302,18 +1302,18 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: sentry name: sentry
sha256: e7ded42974bac5f69e4ca4ddc57d30499dd79381838f24b7e8fd9aa4139e7b79 sha256: "5686ed515bb620dc52b4ae99a6586fe720d443591183cf1f620ec5d1f0eec100"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.13.2" version: "7.15.0"
sentry_flutter: sentry_flutter:
dependency: "direct main" dependency: "direct main"
description: description:
name: sentry_flutter name: sentry_flutter
sha256: d6f55ec7a1f681784165021f749007712a72ff57eadf91e963331b6ae326f089 sha256: "505dec3b6810562785d2c34ae871c73ff2cba6cf436c32c188f0464df226ba8f"
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "7.13.2" version: "7.15.0"
share_plus: share_plus:
dependency: "direct main" dependency: "direct main"
description: description:

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.152+152 version: 5.0.153+153
homepage: https://invoiceninja.com homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io documentation: https://invoiceninja.github.io
publish_to: none publish_to: none
@ -49,7 +49,7 @@ dependencies:
git: git:
url: https://github.com/theyakka/qr.flutter.git url: https://github.com/theyakka/qr.flutter.git
local_auth: ^2.1.5 local_auth: ^2.1.5
sentry_flutter: ^7.12.0 sentry_flutter: ^7.15.0
image_picker: ^1.0.4 image_picker: ^1.0.4
flutter_colorpicker: ^1.0.3 flutter_colorpicker: ^1.0.3
flutter_json_viewer: ^1.0.1 flutter_json_viewer: ^1.0.1

View File

@ -1,5 +1,5 @@
name: invoiceninja name: invoiceninja
version: '5.0.152' version: '5.0.153'
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