Skip to content

Commit 4308901

Browse files
committed
Merge branch 'develop'
2 parents 42220ef + 02b7268 commit 4308901

30 files changed

+151
-115
lines changed

bump_version.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,11 @@ sed -i -e "s/version: 5.0.$current_version+$current_version/version: 5.0.$new_ve
1111
sed -i -e "s/v5.0.$current_version/v5.0.$new_vesion/g" ./.github/workflows/flatpak.yml
1212
sed -i -e 's/<releases>/<releases>\n <release version="5.0.'$new_vesion'" date="'$date_today'"\/>/g' ./flatpak/com.invoiceninja.InvoiceNinja.metainfo.xml
1313
sed -i -e "s/kClientVersion = '5.0.$current_version'/kClientVersion = '5.0.$new_vesion'/g" ./lib/constants.dart
14-
sed -i -e "s/version: '5.0.$current_version'/version: '5.0.$new_vesion'/g" ./snap/snapcraft.yaml
14+
sed -i -e "s/version: '5.0.$current_version'/version: '5.0.$new_vesion'/g" ./snap/snapcraft.yaml
15+
16+
rm lib/flutter_version.dart
17+
echo "const FLUTTER_VERSION = const <String, String>" > lib/flutter_version.dart
18+
flutter --version --machine >> lib/flutter_version.dart
19+
echo ";" >> lib/flutter_version.dart
20+
sed -i "y/\"/'/" lib/flutter_version.dart
21+
dart dartfmt lib

lib/data/repositories/bank_account_repository.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class BankAccountRepository {
2626
}
2727

2828
Future<BuiltList<BankAccountEntity>> loadList(Credentials credentials) async {
29-
final String url = credentials.url+ '/bank_integrations?';
29+
final String url = credentials.url + '/bank_integrations?';
3030
final dynamic response = await webClient.get(url, credentials.token);
3131

3232
final BankAccountListResponse bankAccountResponse = serializers
@@ -41,7 +41,7 @@ class BankAccountRepository {
4141
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
4242
}
4343

44-
final url = credentials.url+
44+
final url = credentials.url +
4545
'/bank_integrations/bulk?per_page=$kMaxEntitiesPerBulkAction';
4646
final dynamic response = await webClient.post(url, credentials.token,
4747
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
@@ -60,7 +60,7 @@ class BankAccountRepository {
6060

6161
if (bankAccount.isNew) {
6262
response = await webClient.post(
63-
credentials.url+ '/bank_integrations', credentials.token,
63+
credentials.url + '/bank_integrations', credentials.token,
6464
data: json.encode(data));
6565
} else {
6666
final url = '${credentials.url}/bank_integrations/${bankAccount.id}';

lib/data/repositories/client_repository.dart

+6-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ClientRepository {
4141
Future<BuiltList<ClientEntity>> loadList(
4242
Credentials credentials, int page) async {
4343
final String url =
44-
credentials.url+ '/clients?per_page=$kMaxRecordsPerPage&page=$page';
44+
credentials.url + '/clients?per_page=$kMaxRecordsPerPage&page=$page';
4545

4646
final dynamic response = await webClient.get(url, credentials.token);
4747

@@ -60,7 +60,7 @@ class ClientRepository {
6060
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
6161
}
6262

63-
final url = credentials.url+
63+
final url = credentials.url +
6464
'/clients/bulk?per_page=$kMaxEntitiesPerBulkAction&include=gateway_tokens,activities,ledger,system_logs,documents';
6565
final dynamic response = await webClient.post(url, credentials.token,
6666
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
@@ -77,7 +77,7 @@ class ClientRepository {
7777
required String? password,
7878
required String? idToken,
7979
}) async {
80-
final url = credentials.url+ '/clients/$clientId/purge';
80+
final url = credentials.url + '/clients/$clientId/purge';
8181

8282
await webClient.post(url, credentials.token,
8383
password: password, idToken: idToken);
@@ -92,8 +92,7 @@ class ClientRepository {
9292
required String? password,
9393
required String? idToken,
9494
}) async {
95-
final url =
96-
credentials.url+ '/clients/$mergeIntoClientId/$clientId/merge';
95+
final url = credentials.url + '/clients/$mergeIntoClientId/$clientId/merge';
9796

9897
final dynamic response = await webClient.post(url, credentials.token,
9998
password: password, idToken: idToken);
@@ -112,12 +111,12 @@ class ClientRepository {
112111

113112
if (client.isNew) {
114113
response = await webClient.post(
115-
credentials.url+
114+
credentials.url +
116115
'/clients?include=gateway_tokens,activities,ledger,system_logs,documents',
117116
credentials.token,
118117
data: json.encode(data));
119118
} else {
120-
final url = credentials.url+
119+
final url = credentials.url +
121120
'/clients/${client.id}?include=gateway_tokens,activities,ledger,system_logs,documents';
122121
response =
123122
await webClient.put(url, credentials.token, data: json.encode(data));

lib/data/repositories/company_gateway_repository.dart

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class CompanyGatewayRepository {
3535

3636
Future<BuiltList<CompanyGatewayEntity>> loadList(
3737
Credentials credentials) async {
38-
final url = credentials.url+ '/company_gateways';
38+
final url = credentials.url + '/company_gateways';
3939

4040
final dynamic response = await webClient.get(url, credentials.token);
4141

@@ -51,7 +51,7 @@ class CompanyGatewayRepository {
5151
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
5252
}
5353

54-
final url = credentials.url+
54+
final url = credentials.url +
5555
'/company_gateways/bulk?per_page=$kMaxEntitiesPerBulkAction';
5656
final dynamic response = await webClient.post(url, credentials.token,
5757
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
@@ -64,7 +64,7 @@ class CompanyGatewayRepository {
6464

6565
Future<void> disconnect(Credentials credentials, String id, String? password,
6666
String? idToken) async {
67-
final url = credentials.url+ '/stripe/disconnect/$id';
67+
final url = credentials.url + '/stripe/disconnect/$id';
6868
await webClient.post(
6969
url,
7070
credentials.token,
@@ -81,10 +81,10 @@ class CompanyGatewayRepository {
8181

8282
if (companyGateway.isNew) {
8383
response = await webClient.post(
84-
credentials.url+ '/company_gateways', credentials.token,
84+
credentials.url + '/company_gateways', credentials.token,
8585
data: json.encode(data));
8686
} else {
87-
final url = credentials.url+ '/company_gateways/${companyGateway.id}';
87+
final url = credentials.url + '/company_gateways/${companyGateway.id}';
8888
response =
8989
await webClient.put(url, credentials.token, data: json.encode(data));
9090
}

lib/data/repositories/design_repository.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class DesignRepository {
3131
}
3232

3333
Future<BuiltList<DesignEntity>> loadList(Credentials credentials) async {
34-
final url = credentials.url+ '/designs?';
34+
final url = credentials.url + '/designs?';
3535

3636
final dynamic response = await webClient.get(url, credentials.token);
3737

@@ -48,7 +48,7 @@ class DesignRepository {
4848
}
4949

5050
final url =
51-
credentials.url+ '/designs/bulk?per_page=$kMaxEntitiesPerBulkAction';
51+
credentials.url + '/designs/bulk?per_page=$kMaxEntitiesPerBulkAction';
5252
final dynamic response = await webClient.post(url, credentials.token,
5353
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
5454

@@ -65,10 +65,10 @@ class DesignRepository {
6565

6666
if (design.isNew) {
6767
response = await webClient.post(
68-
credentials.url+ '/designs', credentials.token,
68+
credentials.url + '/designs', credentials.token,
6969
data: json.encode(data));
7070
} else {
71-
final url = credentials.url+ '/designs/${design.id}';
71+
final url = credentials.url + '/designs/${design.id}';
7272
response =
7373
await webClient.put(url, credentials.token, data: json.encode(data));
7474
}

lib/data/repositories/document_repository.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class DocumentRepository {
4242
}
4343

4444
Future<BuiltList<DocumentEntity>> loadList(Credentials credentials) async {
45-
final url = credentials.url+ '/documents?';
45+
final url = credentials.url + '/documents?';
4646

4747
final dynamic response = await webClient.get(url, credentials.token);
4848

@@ -57,7 +57,7 @@ class DocumentRepository {
5757
final data = serializers.serializeWith(DocumentEntity.serializer, document);
5858
dynamic response;
5959

60-
final url = credentials.url+ '/documents/${document.id}';
60+
final url = credentials.url + '/documents/${document.id}';
6161

6262
response =
6363
await webClient.put(url, credentials.token, data: json.encode(data));
@@ -74,8 +74,8 @@ class DocumentRepository {
7474
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
7575
}
7676

77-
final url = credentials.url+
78-
'/documents/bulk?per_page=$kMaxEntitiesPerBulkAction';
77+
final url =
78+
credentials.url + '/documents/bulk?per_page=$kMaxEntitiesPerBulkAction';
7979
final dynamic response = await webClient.post(url, credentials.token,
8080
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
8181

lib/data/repositories/expense_category_repository.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ExpenseCategoryRepository {
3232

3333
Future<BuiltList<ExpenseCategoryEntity>> loadList(
3434
Credentials credentials) async {
35-
final String url = credentials.url+ '/expense_categories?';
35+
final String url = credentials.url + '/expense_categories?';
3636
final dynamic response = await webClient.get(url, credentials.token);
3737

3838
final ExpenseCategoryListResponse expenseCategoryResponse = serializers
@@ -47,7 +47,7 @@ class ExpenseCategoryRepository {
4747
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
4848
}
4949

50-
final url = credentials.url+
50+
final url = credentials.url +
5151
'/expense_categories/bulk?per_page=$kMaxEntitiesPerBulkAction';
5252
final dynamic response = await webClient.post(url, credentials.token,
5353
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
@@ -66,7 +66,7 @@ class ExpenseCategoryRepository {
6666

6767
if (expenseCategory.isNew) {
6868
response = await webClient.post(
69-
credentials.url+ '/expense_categories', credentials.token,
69+
credentials.url + '/expense_categories', credentials.token,
7070
data: json.encode(data));
7171
} else {
7272
final url = '${credentials.url}/expense_categories/${expenseCategory.id}';

lib/data/repositories/expense_repository.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ExpenseRepository {
3838

3939
Future<BuiltList<ExpenseEntity>> loadList(Credentials credentials, int page,
4040
int createdAt, bool filterDeleted) async {
41-
final url = credentials.url+
41+
final url = credentials.url +
4242
'/expenses?per_page=$kMaxRecordsPerPage&page=$page&created_at=$createdAt';
4343

4444
/* Server is incorrect if client isn't set
@@ -63,7 +63,7 @@ class ExpenseRepository {
6363
}
6464

6565
final url =
66-
credentials.url+ '/expenses/bulk?per_page=$kMaxEntitiesPerBulkAction';
66+
credentials.url + '/expenses/bulk?per_page=$kMaxEntitiesPerBulkAction';
6767
final dynamic response = await webClient.post(url, credentials.token,
6868
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
6969

@@ -80,10 +80,10 @@ class ExpenseRepository {
8080

8181
if (expense.isNew) {
8282
response = await webClient.post(
83-
credentials.url+ '/expenses', credentials.token,
83+
credentials.url + '/expenses', credentials.token,
8484
data: json.encode(data));
8585
} else {
86-
final url = credentials.url+ '/expenses/${expense.id}';
86+
final url = credentials.url + '/expenses/${expense.id}';
8787
response =
8888
await webClient.put(url, credentials.token, data: json.encode(data));
8989
}

lib/data/repositories/group_repository.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class GroupRepository {
3333
}
3434

3535
Future<BuiltList<GroupEntity>> loadList(Credentials credentials) async {
36-
final url = credentials.url+ '/group_settings?';
36+
final url = credentials.url + '/group_settings?';
3737

3838
final dynamic response = await webClient.get(url, credentials.token);
3939

@@ -49,7 +49,7 @@ class GroupRepository {
4949
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
5050
}
5151

52-
final url = credentials.url+
52+
final url = credentials.url +
5353
'/group_settings/bulk?per_page=$kMaxEntitiesPerBulkAction';
5454
final dynamic response = await webClient.post(url, credentials.token,
5555
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
@@ -67,10 +67,10 @@ class GroupRepository {
6767

6868
if (group.isNew) {
6969
response = await webClient.post(
70-
credentials.url+ '/group_settings', credentials.token,
70+
credentials.url + '/group_settings', credentials.token,
7171
data: json.encode(data));
7272
} else {
73-
final url = credentials.url+ '/group_settings/${group.id}';
73+
final url = credentials.url + '/group_settings/${group.id}';
7474
response =
7575
await webClient.put(url, credentials.token, data: json.encode(data));
7676
}

lib/data/repositories/payment_term_repository.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class PaymentTermRepository {
3232
}
3333

3434
Future<BuiltList<PaymentTermEntity>> loadList(Credentials credentials) async {
35-
final url = credentials.url+ '/payment_terms?';
35+
final url = credentials.url + '/payment_terms?';
3636

3737
final dynamic response = await webClient.get(url, credentials.token);
3838

@@ -48,7 +48,7 @@ class PaymentTermRepository {
4848
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
4949
}
5050

51-
final url = credentials.url+
51+
final url = credentials.url +
5252
'/payment_terms/bulk?per_page=$kMaxEntitiesPerBulkAction';
5353
final dynamic response = await webClient.post(url, credentials.token,
5454
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
@@ -67,7 +67,7 @@ class PaymentTermRepository {
6767

6868
if (paymentTerm.isNew) {
6969
response = await webClient.post(
70-
credentials.url+ '/payment_terms', credentials.token,
70+
credentials.url + '/payment_terms', credentials.token,
7171
data: json.encode(data));
7272
} else {
7373
final url = '${credentials.url}/payment_terms/${paymentTerm.id}';

lib/data/repositories/product_repository.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class ProductRepository {
4040
Future<BuiltList<ProductEntity>> loadList(
4141
Credentials credentials, int page) async {
4242
final url =
43-
credentials.url+ '/products?per_page=$kMaxRecordsPerPage&page=$page';
43+
credentials.url + '/products?per_page=$kMaxRecordsPerPage&page=$page';
4444

4545
final dynamic response = await webClient.get(url, credentials.token);
4646

@@ -62,7 +62,7 @@ class ProductRepository {
6262
}
6363

6464
final url =
65-
credentials.url+ '/products/bulk?per_page=$kMaxEntitiesPerBulkAction';
65+
credentials.url + '/products/bulk?per_page=$kMaxEntitiesPerBulkAction';
6666
final dynamic response = await webClient.post(
6767
url,
6868
credentials.token,
@@ -89,10 +89,10 @@ class ProductRepository {
8989

9090
if (product.isNew) {
9191
response = await webClient.post(
92-
credentials.url+ '/products', credentials.token,
92+
credentials.url + '/products', credentials.token,
9393
data: json.encode(data));
9494
} else {
95-
var url = credentials.url+ '/products/${product.id}';
95+
var url = credentials.url + '/products/${product.id}';
9696
if (changedStock) {
9797
url += '?update_in_stock_quantity=true';
9898
}

lib/data/repositories/recurring_expense_repository.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class RecurringExpenseRepository {
3333
}
3434

3535
Future<BuiltList<ExpenseEntity>> loadList(Credentials credentials) async {
36-
final String url = credentials.url+ '/recurring_expenses?';
36+
final String url = credentials.url + '/recurring_expenses?';
3737
final dynamic response = await webClient.get(url, credentials.token);
3838

3939
final ExpenseListResponse recurringExpenseResponse =
@@ -48,7 +48,7 @@ class RecurringExpenseRepository {
4848
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
4949
}
5050

51-
final url = credentials.url+
51+
final url = credentials.url +
5252
'/recurring_expenses/bulk?per_page=$kMaxEntitiesPerBulkAction';
5353
final dynamic response = await webClient.post(url, credentials.token,
5454
data: json.encode({'ids': ids, 'action': action.toApiParam()}));
@@ -68,7 +68,7 @@ class RecurringExpenseRepository {
6868
String url;
6969

7070
if (recurringExpense.isNew) {
71-
url = credentials.url+ '/recurring_expenses?show_dates=true';
71+
url = credentials.url + '/recurring_expenses?show_dates=true';
7272
} else {
7373
url =
7474
'${credentials.url}/recurring_expenses/${recurringExpense.id}?show_dates=true';

lib/data/repositories/recurring_invoice_repository.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class RecurringInvoiceRepository {
3434

3535
Future<BuiltList<InvoiceEntity>> loadList(
3636
Credentials credentials, int page, bool filterDeleted) async {
37-
String url = credentials.url+
37+
String url = credentials.url +
3838
'/recurring_invoices?per_page=$kMaxRecordsPerPage&page=$page';
3939

4040
if (filterDeleted) {
@@ -56,7 +56,7 @@ class RecurringInvoiceRepository {
5656
ids = ids.sublist(0, kMaxEntitiesPerBulkAction);
5757
}
5858

59-
final url = credentials.url+
59+
final url = credentials.url +
6060
'/recurring_invoices/bulk?per_page=$kMaxEntitiesPerBulkAction';
6161
final params = {'ids': ids, 'action': action.toApiParam()};
6262
if (data != null) {
@@ -83,7 +83,7 @@ class RecurringInvoiceRepository {
8383
String url;
8484

8585
if (recurringInvoice.isNew) {
86-
url = credentials.url+
86+
url = credentials.url +
8787
'/recurring_invoices?include=activities,history&show_dates=true';
8888
} else {
8989
url =

0 commit comments

Comments
 (0)