Skip to content

Commit 8b8956c

Browse files
committed
Merge branch 'develop'
2 parents 2f70218 + 5b2e3af commit 8b8956c

16 files changed

+212
-206
lines changed

.github/workflows/flatpak.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
draft: false
8787
prerelease: false
8888
title: "Latest Release"
89-
automatic_release_tag: "v5.0.140"
89+
automatic_release_tag: "v5.0.141"
9090
files: |
9191
${{ github.workspace }}/artifacts/Invoice-Ninja-Archive
9292
${{ github.workspace }}/artifacts/Invoice-Ninja-Hash

flatpak/com.invoiceninja.InvoiceNinja.metainfo.xml

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
</screenshots>
5151
<content_rating type="oars-1.1"/>
5252
<releases>
53+
<release version="5.0.141" date="2023-11-17"/>
5354
<release version="5.0.140" date="2023-11-14"/>
5455
<release version="5.0.139" date="2023-11-12"/>
5556
<release version="5.0.138" date="2023-11-03"/>

lib/constants.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Constants {
44
}
55

66
// TODO remove version once #46609 is fixed
7-
const String kClientVersion = '5.0.140';
7+
const String kClientVersion = '5.0.141';
88
const String kMinServerVersion = '5.0.4';
99

1010
const String kAppName = 'Invoice Ninja';

lib/data/models/settings_model.dart

+15
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ abstract class SettingsEntity
3030
clientSettings?.defaultPurchaseOrderDesignId ??
3131
groupSettings?.defaultPurchaseOrderDesignId ??
3232
companySettings?.defaultPurchaseOrderDesignId,
33+
defaultStatementDesignId: clientSettings?.defaultStatementDesignId ??
34+
groupSettings?.defaultStatementDesignId ??
35+
companySettings?.defaultStatementDesignId,
36+
defaultDeliveryNoteDesignId:
37+
clientSettings?.defaultDeliveryNoteDesignId ??
38+
groupSettings?.defaultDeliveryNoteDesignId ??
39+
companySettings?.defaultDeliveryNoteDesignId,
40+
defaultPaymentReceiptDesignId:
41+
clientSettings?.defaultPaymentReceiptDesignId ??
42+
groupSettings?.defaultPaymentReceiptDesignId ??
43+
companySettings?.defaultPaymentReceiptDesignId,
44+
defaultPaymentRefundDesignId:
45+
clientSettings?.defaultPaymentRefundDesignId ??
46+
groupSettings?.defaultPaymentRefundDesignId ??
47+
companySettings?.defaultPaymentRefundDesignId,
3348
defaultInvoiceTerms: clientSettings?.defaultInvoiceTerms ??
3449
groupSettings?.defaultInvoiceTerms ??
3550
companySettings?.defaultInvoiceTerms,

lib/redux/app/app_state.dart

+5
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,11 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
850850
bool get isUpdateAvailable =>
851851
isSelfHosted && account.isUpdateAvailable && userCompany.isAdmin;
852852

853+
bool get isUsingPostmark => [
854+
if (isHosted) SettingsEntity.EMAIL_SENDING_METHOD_DEFAULT,
855+
SettingsEntity.EMAIL_SENDING_METHOD_POSTMARK,
856+
].contains(company.settings.emailSendingMethod);
857+
853858
bool get isUserConfirmed {
854859
if (isSelfHosted) {
855860
return true;

lib/ui/app/entities/entity_list_tile.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class _EntityListTileState extends State<EntityListTile> {
117117
formatDate(entity.date, context);
118118
} else if (entity is ExpenseEntity) {
119119
defaultSubtitle =
120-
formatNumber(entity.amount, context, clientId: entity.clientId)! +
120+
formatNumber(entity.amount, context, currencyId: entity.currencyId)! +
121121
' • ' +
122122
formatDate(entity.date, context);
123123
} else if (entity is TransactionEntity) {

lib/ui/app/portal_links.dart

+1-9
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,9 @@ class PortalLinks extends StatelessWidget {
4343
viewLinkWithHash += '&client_hash=${client!.clientHash}';
4444
}
4545

46-
var copyLinkWithHash = copyLink;
47-
if (!copyLink.contains('?')) {
48-
copyLinkWithHash += '?';
49-
}
50-
if (client != null) {
51-
copyLinkWithHash += '&client_hash=${client!.clientHash}';
52-
}
53-
5446
final viewLinkPressed = () => launchUrl(Uri.parse(viewLinkWithHash));
5547
final copyLinkPressed = () {
56-
Clipboard.setData(ClipboardData(text: copyLinkWithHash));
48+
Clipboard.setData(ClipboardData(text: copyLink));
5749
showToast(localization!.copiedToClipboard.replaceFirst(':value ', ''));
5850
};
5951

lib/ui/auth/login_view.dart

+1
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ class _LoginState extends State<LoginView> {
455455
val.isEmpty || val.trim().isEmpty
456456
? localization.pleaseEnterYourEmail
457457
: null,
458+
autofillHints: [AutofillHints.username],
458459
),
459460
if (_loginType == LOGIN_TYPE_EMAIL &&
460461
!_recoverPassword)

lib/ui/dashboard/dashboard_screen.dart

+26-21
Original file line numberDiff line numberDiff line change
@@ -267,27 +267,32 @@ class _DashboardScreenState extends State<DashboardScreen>
267267
child: IconButton(
268268
tooltip: localization!.enableReactApp,
269269
onPressed: () async {
270-
final credentials = state.credentials;
271-
final account = state.account
272-
.rebuild((b) => b..setReactAsDefaultAP = true);
273-
final url = '${credentials.url}/accounts/${account.id}';
274-
final data = serializers.serializeWith(
275-
AccountEntity.serializer, account);
276-
277-
store.dispatch(StartSaving());
278-
WebClient()
279-
.put(
280-
url,
281-
credentials.token,
282-
data: json.encode(data),
283-
)
284-
.then((dynamic _) {
285-
store.dispatch(StopSaving());
286-
WebUtils.reloadBrowser();
287-
}).catchError((Object error) {
288-
store.dispatch(StopSaving());
289-
showErrorDialog(message: error as String?);
290-
});
270+
confirmCallback(
271+
context: context,
272+
message: localization.enableReactApp,
273+
callback: (_) {
274+
final credentials = state.credentials;
275+
final account = state.account
276+
.rebuild((b) => b..setReactAsDefaultAP = true);
277+
final url = '${credentials.url}/accounts/${account.id}';
278+
final data = serializers.serializeWith(
279+
AccountEntity.serializer, account);
280+
281+
store.dispatch(StartSaving());
282+
WebClient()
283+
.put(
284+
url,
285+
credentials.token,
286+
data: json.encode(data),
287+
)
288+
.then((dynamic _) {
289+
store.dispatch(StopSaving());
290+
WebUtils.reloadBrowser();
291+
}).catchError((Object error) {
292+
store.dispatch(StopSaving());
293+
showErrorDialog(message: error as String?);
294+
});
295+
});
291296
},
292297
icon: Icon(MdiIcons.react),
293298
),

0 commit comments

Comments
 (0)