Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hillelcoren committed Jan 29, 2024
2 parents ee52f16 + aab3d2c commit eafe0d6
Show file tree
Hide file tree
Showing 16 changed files with 93 additions and 25 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.152"
automatic_release_tag: "v5.0.153"
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.153" date="2024-01-29"/>
<release version="5.0.152" date="2024-01-24"/>
<release version="5.0.151" date="2024-01-23"/>
<release version="5.0.150" date="2024-01-18"/>
Expand Down
8 changes: 4 additions & 4 deletions 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.152';
const String kClientVersion = '5.0.153';
const String kMinServerVersion = '5.0.4';

const String kAppName = 'Invoice Ninja';
Expand Down Expand Up @@ -704,9 +704,9 @@ final kReportMap = {
kReportQuoteItem: ExportType.quote_items,
kReportRecurringExpense: null,
kReportRecurringInvoice: ExportType.recurring_invoices,
kReportPurchaseOrder: null,
kReportPurchaseOrderItem: null,
kReportVendor: null,
kReportPurchaseOrder: ExportType.purchase_order,
kReportPurchaseOrderItem: ExportType.purchase_order_item,
kReportVendor: ExportType.vendor,
kReportTransaction: null,
};

Expand Down
3 changes: 3 additions & 0 deletions lib/data/models/import_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ class ExportType extends EnumClass {
static const ExportType products = _$products;
static const ExportType tasks = _$tasks;
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_summary = _$ar_summary;
static const ExportType client_balance = _$client_balance;
Expand Down
13 changes: 13 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 @@ -815,6 +815,9 @@ abstract class SettingsEntity
@BuiltValueField(wireName: 'payment_email_all_contacts')
bool? get paymentEmailAllContacts;

@BuiltValueField(wireName: 'show_pdfhtml_on_mobile')
bool? get showPdfhtmlOnMobile;

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.

7 changes: 4 additions & 3 deletions lib/ui/settings/email_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,10 @@ class _EmailSettingsState extends State<EmailSettings> {
DropdownMenuItem(
child: Text(localization.defaultWord),
value: SettingsEntity.EMAIL_SENDING_METHOD_DEFAULT),
DropdownMenuItem(
child: Text('SMTP'),
value: SettingsEntity.EMAIL_SENDING_METHOD_SMTP),
if (!kReleaseMode)
DropdownMenuItem(
child: Text('SMTP'),
value: SettingsEntity.EMAIL_SENDING_METHOD_SMTP),
if (viewModel.state.isHosted) ...[
DropdownMenuItem(
child: Text('Gmail'),
Expand Down
8 changes: 8 additions & 0 deletions lib/ui/settings/invoice_design.dart
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,14 @@ class _InvoiceDesignState extends State<InvoiceDesign>
settings
.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(
Expand Down
1 change: 1 addition & 0 deletions lib/ui/settings/settings_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ class SettingsSearch extends StatelessWidget {
'show_shipping_address#2023-01-29',
'share_invoice_quote_columns#2023-03-20',
'invoice_embed_documents#2023-10-27',
'mobile_version#2024-01-29',
if (supportsDesignTemplates()) ...[
'delivery_note_design#2023-11-06',
'statement_design#2023-11-06',
Expand Down
17 changes: 13 additions & 4 deletions lib/ui/task/edit/task_edit_times.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,27 @@ class _TaskEditTimesState extends State<TaskEditTimes> {
TaskTime? selectedTaskTime;

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>(
barrierDismissible: false,
context: context,
builder: (BuildContext context) {
final viewModel = widget.viewModel;
final task = viewModel.task!;
final taskTimes = task.getTaskTimes();
return TimeEditDetails(
viewModel: viewModel,
taskTime: taskTime,
index: taskTimes.indexOf(
taskTimes.firstWhere((time) => time.equalTo(taskTime!))),
taskTimes.firstWhere((time) => time.equalTo(taskTime))),
);
});
}
Expand Down
5 changes: 5 additions & 0 deletions lib/utils/i18n.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = {
'en': {
// STARTER: lang key - do not remove comment
'mobile_version': 'Mobile Version',
'venmo': 'Venmo',
'mercado_pago': 'Mercado Pago',
'my_bank': 'MyBank',
Expand Down Expand Up @@ -114268,6 +114269,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
_localizedValues[localeCode]!['email_report'] ??
_localizedValues['en']!['email_report']!;

String get mobileVersion =>
_localizedValues[localeCode]!['mobile_version'] ??
_localizedValues['en']!['mobile_version']!;

// STARTER: lang field - do not remove comment

String lookup(String? key) {
Expand Down
4 changes: 2 additions & 2 deletions 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.152+152
version: 5.0.153+153
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down Expand Up @@ -44,7 +44,7 @@ dependencies:
git:
url: https://github.com/theyakka/qr.flutter.git
local_auth: ^2.1.5
sentry_flutter: ^7.12.0
sentry_flutter: ^7.15.0
image_picker: ^1.0.4
flutter_colorpicker: ^1.0.3
flutter_json_viewer: ^1.0.1
Expand Down
8 changes: 4 additions & 4 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1302,18 +1302,18 @@ packages:
dependency: transitive
description:
name: sentry
sha256: e7ded42974bac5f69e4ca4ddc57d30499dd79381838f24b7e8fd9aa4139e7b79
sha256: "5686ed515bb620dc52b4ae99a6586fe720d443591183cf1f620ec5d1f0eec100"
url: "https://pub.dev"
source: hosted
version: "7.13.2"
version: "7.15.0"
sentry_flutter:
dependency: "direct main"
description:
name: sentry_flutter
sha256: d6f55ec7a1f681784165021f749007712a72ff57eadf91e963331b6ae326f089
sha256: "505dec3b6810562785d2c34ae871c73ff2cba6cf436c32c188f0464df226ba8f"
url: "https://pub.dev"
source: hosted
version: "7.13.2"
version: "7.15.0"
share_plus:
dependency: "direct main"
description:
Expand Down
4 changes: 2 additions & 2 deletions 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.152+152
version: 5.0.153+153
homepage: https://invoiceninja.com
documentation: https://invoiceninja.github.io
publish_to: none
Expand Down Expand Up @@ -49,7 +49,7 @@ dependencies:
git:
url: https://github.com/theyakka/qr.flutter.git
local_auth: ^2.1.5
sentry_flutter: ^7.12.0
sentry_flutter: ^7.15.0
image_picker: ^1.0.4
flutter_colorpicker: ^1.0.3
flutter_json_viewer: ^1.0.1
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.152'
version: '5.0.153'
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 eafe0d6

Please sign in to comment.