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 12, 2024
2 parents a0fcc6b + ce13a35 commit 2b3e248
Show file tree
Hide file tree
Showing 18 changed files with 270 additions and 126 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.148"
automatic_release_tag: "v5.0.149"
files: |
${{ github.workspace }}/artifacts/Invoice-Ninja-Archive
${{ github.workspace }}/artifacts/Invoice-Ninja-Hash
Expand Down
1 change: 1 addition & 0 deletions codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ workflows:
#- flutter build linux --release
#- export SNAPCRAFT_STORE_CREDENTIALS=$(echo $SNAPCRAFT_LOGIN_CREDENTIALS)
- snapcraft whoami
- sudo snap refresh snapcraft --channel=7.x/stable
- snapcraft snap --output invoiceninja.snap
- snapcraft upload invoiceninja.snap --release stable
artifacts:
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.149" date="2024-01-12"/>
<release version="5.0.148" date="2024-01-08"/>
<release version="5.0.147" date="2024-01-02"/>
<release version="5.0.146" date="2023-12-20"/>
Expand Down
8 changes: 5 additions & 3 deletions lib/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class Constants {
}

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

const String kAppName = 'Invoice Ninja';
Expand Down Expand Up @@ -76,9 +76,11 @@ const String kDocsEmailVariablesUrl =
'$kDocsUrl/email-customization/#payment-email-customization';
const String kDocsStripeConnectUrl = '$kDocsUrl/hosted-stripe';

const String kPHPDateFormatsUrl =
'https://www.php.net/manual/en/datetime.format.php#refsect1-datetime.format-parameters';
const String kForumUrl = 'https://forum.invoiceninja.com';
const String kApiDocsURL = 'https://api-docs.invoicing.co';
const String kZapierURL = 'https://zapier.com/apps/invoice-ninja';
const String kApiDocsUrl = 'https://api-docs.invoicing.co';
const String kZapierUrl = 'https://zapier.com/apps/invoice-ninja';
const String kGatewayFeeHelpURL =
'https://support.stripe.com/questions/passing-the-stripe-fee-on-to-customers';

Expand Down
1 change: 1 addition & 0 deletions lib/data/models/transaction_model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class TransactionFields {
static const String status = 'status';
static const String accountType = 'account_type';
static const String defaultCategory = 'default_category';
static const String participantName = 'participant_name';
}

abstract class TransactionEntity extends Object
Expand Down
10 changes: 5 additions & 5 deletions lib/data/repositories/credit_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class CreditRepository {

Future<BuiltList<InvoiceEntity>> loadList(
Credentials credentials, int createdAt, bool filterDeleted) async {
String url = credentials.url+ '/credits?created_at=$createdAt';
String url = credentials.url + '/credits?created_at=$createdAt';

if (filterDeleted) {
url += '&filter_deleted_clients=true';
Expand All @@ -62,7 +62,7 @@ class CreditRepository {
}

final url =
credentials.url+ '/credits/bulk?per_page=$kMaxEntitiesPerBulkAction';
credentials.url + '/credits/bulk?per_page=$kMaxEntitiesPerBulkAction';
final dynamic response = await webClient.post(url, credentials.token,
data: json.encode({
'ids': ids,
Expand All @@ -87,7 +87,7 @@ class CreditRepository {
dynamic response;

if (credit.isNew) {
url = credentials.url+ '/credits?include=activities.history';
url = credentials.url + '/credits?include=activities.history';
} else {
url =
'${credentials.url}/credits/${credit.id}?include=activities.history';
Expand Down Expand Up @@ -122,7 +122,7 @@ class CreditRepository {
String ccEmail,
) async {
final data = {
'entity': '${credit.entityType}',
'entity': '${EntityType.credit.apiValue}',
'entity_id': credit.id,
'template': 'email_template_$template',
'body': body,
Expand All @@ -131,7 +131,7 @@ class CreditRepository {
};

final dynamic response = await webClient.post(
credentials.url+ '/emails', credentials.token,
credentials.url + '/emails', credentials.token,
data: json.encode(data));

final InvoiceItemResponse invoiceResponse =
Expand Down
10 changes: 5 additions & 5 deletions lib/data/repositories/invoice_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class InvoiceRepository {

Future<BuiltList<InvoiceEntity>> loadList(Credentials credentials, int page,
int createdAt, bool filterDeleted) async {
String url = credentials.url+
String url = credentials.url +
'/invoices?per_page=$kMaxRecordsPerPage&page=$page&created_at=$createdAt';

if (filterDeleted) {
Expand All @@ -63,7 +63,7 @@ class InvoiceRepository {
}

final url =
credentials.url+ '/invoices/bulk?per_page=$kMaxEntitiesPerBulkAction';
credentials.url + '/invoices/bulk?per_page=$kMaxEntitiesPerBulkAction';
final dynamic response = await webClient.post(url, credentials.token,
data: json.encode({
'ids': ids,
Expand All @@ -88,7 +88,7 @@ class InvoiceRepository {
String url;

if (invoice.isNew) {
url = credentials.url+ '/invoices?include=activities.history';
url = credentials.url + '/invoices?include=activities.history';
} else {
url =
'${credentials.url}/invoices/${invoice.id}?include=activities.history';
Expand Down Expand Up @@ -134,7 +134,7 @@ class InvoiceRepository {
String ccEmail,
) async {
final data = {
'entity': '${invoice.entityType}',
'entity': '${EntityType.invoice.apiValue}',
'entity_id': invoice.id,
'template': 'email_template_$template',
'body': body,
Expand All @@ -143,7 +143,7 @@ class InvoiceRepository {
};

final dynamic response = await webClient.post(
credentials.url+ '/emails', credentials.token,
credentials.url + '/emails', credentials.token,
data: json.encode(data));

final InvoiceItemResponse invoiceResponse =
Expand Down
10 changes: 5 additions & 5 deletions lib/data/repositories/purchase_order_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PurchaseOrderRepository {
int createdAt,
//bool filterDeleted,
) async {
final url = credentials.url+
final url = credentials.url +
'/purchase_orders?per_page=$kMaxRecordsPerPage&page=$page&created_at=$createdAt';

/*
Expand All @@ -57,7 +57,7 @@ class PurchaseOrderRepository {
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
}

final url = credentials.url+
final url = credentials.url +
'/purchase_orders/bulk?per_page=$kMaxEntitiesPerBulkAction';
final dynamic response = await webClient.post(url, credentials.token,
data: json.encode({
Expand Down Expand Up @@ -87,7 +87,7 @@ class PurchaseOrderRepository {
dynamic response;

if (purchaseOrder.isNew) {
url = credentials.url+ '/purchase_orders?include=activities.history';
url = credentials.url + '/purchase_orders?include=activities.history';
} else {
url =
'${credentials.url}/purchase_orders/${purchaseOrder.id}?include=activities.history';
Expand Down Expand Up @@ -129,7 +129,7 @@ class PurchaseOrderRepository {
String ccEmail,
) async {
final data = {
'entity': '${purchaseOrder.entityType}',
'entity': '${EntityType.purchaseOrder.apiValue}',
'entity_id': purchaseOrder.id,
'template': 'email_template_$template',
'body': body,
Expand All @@ -138,7 +138,7 @@ class PurchaseOrderRepository {
};

final dynamic response = await webClient.post(
credentials.url+ '/emails', credentials.token,
credentials.url + '/emails', credentials.token,
data: json.encode(data));

final InvoiceItemResponse invoiceResponse =
Expand Down
10 changes: 5 additions & 5 deletions lib/data/repositories/quote_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class QuoteRepository {

Future<BuiltList<InvoiceEntity>> loadList(Credentials credentials, int page,
int createdAt, bool filterDeleted) async {
String url = credentials.url+
String url = credentials.url +
'/quotes?per_page=$kMaxRecordsPerPage&page=$page&created_at=$createdAt';

if (filterDeleted) {
Expand All @@ -63,7 +63,7 @@ class QuoteRepository {
}

final url =
credentials.url+ '/quotes/bulk?per_page=$kMaxEntitiesPerBulkAction';
credentials.url + '/quotes/bulk?per_page=$kMaxEntitiesPerBulkAction';
final dynamic response = await webClient.post(url, credentials.token,
data: json.encode({
'ids': ids,
Expand All @@ -88,7 +88,7 @@ class QuoteRepository {
dynamic response;

if (quote.isNew) {
url = credentials.url+ '/quotes?include=activities.history';
url = credentials.url + '/quotes?include=activities.history';
} else {
url = '${credentials.url}/quotes/${quote.id}?include=activities.history';
}
Expand Down Expand Up @@ -131,7 +131,7 @@ class QuoteRepository {
String ccEmail,
) async {
final data = {
'entity': '${quote.entityType}',
'entity': '${EntityType.quote.apiValue}',
'entity_id': quote.id,
'template': 'email_template_$template',
'body': body,
Expand All @@ -140,7 +140,7 @@ class QuoteRepository {
};

final dynamic response = await webClient.post(
credentials.url+ '/emails', credentials.token,
credentials.url + '/emails', credentials.token,
data: json.encode(data));

final InvoiceItemResponse invoiceResponse =
Expand Down
6 changes: 4 additions & 2 deletions lib/ui/app/list_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,11 @@ class ListScaffold extends StatelessWidget {
);

return PopScope(
canPop: false,
canPop: !isSettings,
onPopInvoked: (_) {
store.dispatch(ViewDashboard());
if (!isSettings) {
store.dispatch(ViewDashboard());
}
},
child: FocusTraversalGroup(
child: Scaffold(
Expand Down
5 changes: 5 additions & 0 deletions lib/ui/reports/transaction_report.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ enum TransactionReportFields {
created_at,
updated_at,
record_state,
participant_name,
}

var memoizedTransactionReport = memo10((
Expand Down Expand Up @@ -178,6 +179,10 @@ ReportResult transactionReport(
case TransactionReportFields.record_state:
value = AppLocalization.of(navigatorKey.currentContext!)!
.lookup(transaction.entityState);
break;
case TransactionReportFields.participant_name:
value = transaction.participantName;
break;
}

if (!ReportResult.matchField(
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/settings/account_management.dart
Original file line number Diff line number Diff line change
Expand Up @@ -561,15 +561,15 @@ class _AccountOverview extends StatelessWidget {
child: AppButton(
label: localization.apiDocs.toUpperCase(),
iconData: isMobile(context) ? null : MdiIcons.bookshelf,
onPressed: () => launchUrl(Uri.parse(kApiDocsURL)),
onPressed: () => launchUrl(Uri.parse(kApiDocsUrl)),
),
),
SizedBox(width: kGutterWidth),
Expanded(
child: AppButton(
label: 'Zapier',
iconData: isMobile(context) ? null : MdiIcons.cloud,
onPressed: () => launchUrl(Uri.parse(kZapierURL)),
onPressed: () => launchUrl(Uri.parse(kZapierUrl)),
),
),
])),
Expand Down
8 changes: 5 additions & 3 deletions lib/ui/settings/generated_numbers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -557,9 +557,11 @@ class _EntityNumberSettingsState extends State<EntityNumberSettings> {
padding:
const EdgeInsets.only(left: 16, top: 20, right: 16, bottom: 8),
child: OutlinedButton(
child: Text(localization.viewDateFormats.toUpperCase()),
onPressed: () => launchUrl(
Uri.parse('https://www.php.net/manual/en/datetime.format.php')),
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Text(localization.viewDateFormats.toUpperCase()),
),
onPressed: () => launchUrl(Uri.parse(kPHPDateFormatsUrl)),
),
),
HelpPanel(
Expand Down
3 changes: 3 additions & 0 deletions lib/ui/transaction/transaction_presenter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class TransactionPresenter extends EntityPresenter {
TransactionFields.category,
TransactionFields.payment,
TransactionFields.defaultCategory,
TransactionFields.participantName,
];
}

Expand Down Expand Up @@ -76,6 +77,8 @@ class TransactionPresenter extends EntityPresenter {
);
case TransactionFields.description:
return Text(transaction!.description);
case TransactionFields.participantName:
return Text(transaction!.participantName);
case TransactionFields.accountType:
final bankAccount =
state.bankAccountState.get(transaction!.bankAccountId);
Expand Down
Loading

0 comments on commit 2b3e248

Please sign in to comment.