diff --git a/lib/data/repositories/company_gateway_repository.dart b/lib/data/repositories/company_gateway_repository.dart index 74941aa11..8e2126a5f 100644 --- a/lib/data/repositories/company_gateway_repository.dart +++ b/lib/data/repositories/company_gateway_repository.dart @@ -75,7 +75,7 @@ class CompanyGatewayRepository { var url = credentials.url + '/company_gateways/${companyGateway.id}?include=gateway'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=' + action.toString(); } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/credit_repository.dart b/lib/data/repositories/credit_repository.dart index 8d0b266fe..ac46444b4 100644 --- a/lib/data/repositories/credit_repository.dart +++ b/lib/data/repositories/credit_repository.dart @@ -69,7 +69,7 @@ class CreditRepository { } else { var url = '${credentials.url}/credits/${credit.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=$action'; } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/design_repository.dart b/lib/data/repositories/design_repository.dart index eda086ae6..9e38deb98 100644 --- a/lib/data/repositories/design_repository.dart +++ b/lib/data/repositories/design_repository.dart @@ -67,9 +67,9 @@ class DesignRepository { credentials.url + '/designs', credentials.token, data: json.encode(data)); } else { - var url = credentials.url + '/designs/' + design.id.toString(); + var url = credentials.url + '/designs/${design.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=' + action.toString(); } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/document_repository.dart b/lib/data/repositories/document_repository.dart index 89c2866cc..3fc516fc8 100644 --- a/lib/data/repositories/document_repository.dart +++ b/lib/data/repositories/document_repository.dart @@ -76,12 +76,12 @@ class DocumentRepository { } else { final data = serializers.serializeWith(DocumentEntity.serializer, document); - var url = '${credentials.url}/documents/${document.id}'; + var url = '${credentials.url}/documents/${document.id}?'; if (action == EntityAction.delete) { response = await webClient.delete(url, credentials.token); } else { if (action != null) { - url += '?action=' + action.toString(); + url += '&action=$action'; } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/expense_repository.dart b/lib/data/repositories/expense_repository.dart index 6d21ec384..f693b4b38 100644 --- a/lib/data/repositories/expense_repository.dart +++ b/lib/data/repositories/expense_repository.dart @@ -67,9 +67,9 @@ class ExpenseRepository { credentials.url + '/expenses', credentials.token, data: json.encode(data)); } else { - var url = credentials.url + '/expenses/' + expense.id.toString(); + var url = credentials.url + '/expenses/${expense.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=' + action.toString(); } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/group_repository.dart b/lib/data/repositories/group_repository.dart index 0e7392f8d..fbce3c5e9 100644 --- a/lib/data/repositories/group_repository.dart +++ b/lib/data/repositories/group_repository.dart @@ -67,9 +67,9 @@ class GroupRepository { credentials.url + '/group_settings', credentials.token, data: json.encode(data)); } else { - var url = credentials.url + '/group_settings/' + group.id.toString(); + var url = credentials.url + '/group_settings/${group.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=$action'; } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/invoice_repository.dart b/lib/data/repositories/invoice_repository.dart index 40e726ed9..5ba89a8a6 100644 --- a/lib/data/repositories/invoice_repository.dart +++ b/lib/data/repositories/invoice_repository.dart @@ -46,7 +46,7 @@ class InvoiceRepository { Credentials credentials, List ids, EntityAction action) async { var url = credentials.url + '/invoices/bulk?'; if (action != null) { - url += '&action=' + action.toString(); + url += 'action=' + action.toString(); } final dynamic response = await webClient.post(url, credentials.token, data: json.encode({'ids': ids})); diff --git a/lib/data/repositories/product_repository.dart b/lib/data/repositories/product_repository.dart index 90c0880fd..c58913834 100644 --- a/lib/data/repositories/product_repository.dart +++ b/lib/data/repositories/product_repository.dart @@ -56,9 +56,9 @@ class ProductRepository { credentials.url + '/products', credentials.token, data: json.encode(data)); } else { - var url = credentials.url + '/products/' + product.id.toString(); + var url = credentials.url + '/products/${product.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=' + action.toString(); } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/project_repository.dart b/lib/data/repositories/project_repository.dart index 8c9149389..aaabb89b7 100644 --- a/lib/data/repositories/project_repository.dart +++ b/lib/data/repositories/project_repository.dart @@ -67,9 +67,9 @@ class ProjectRepository { credentials.url + '/projects', credentials.token, data: json.encode(data)); } else { - var url = credentials.url + '/projects/' + project.id.toString(); + var url = credentials.url + '/projects/${project.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=' + action.toString(); } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/quote_repository.dart b/lib/data/repositories/quote_repository.dart index 2381f21a8..7ab795788 100644 --- a/lib/data/repositories/quote_repository.dart +++ b/lib/data/repositories/quote_repository.dart @@ -69,7 +69,7 @@ class QuoteRepository { } else { var url = '${credentials.url}/quotes/${quote.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=' + action.toString(); } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/task_repository.dart b/lib/data/repositories/task_repository.dart index 7e9092fe9..584d16cbd 100644 --- a/lib/data/repositories/task_repository.dart +++ b/lib/data/repositories/task_repository.dart @@ -72,9 +72,9 @@ class TaskRepository { credentials.url + '/tasks', credentials.token, data: json.encode(data)); } else { - var url = credentials.url + '/tasks/' + task.id.toString(); + var url = credentials.url + '/tasks/${task.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=' + action.toString(); } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/tax_rate_repository.dart b/lib/data/repositories/tax_rate_repository.dart index 19fd73f82..71596993d 100644 --- a/lib/data/repositories/tax_rate_repository.dart +++ b/lib/data/repositories/tax_rate_repository.dart @@ -67,9 +67,9 @@ class TaxRateRepository { credentials.url + '/tax_rates', credentials.token, data: json.encode(data)); } else { - var url = credentials.url + '/tax_rates/' + taxRate.id.toString(); + var url = credentials.url + '/tax_rates/${taxRate.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=$action'; } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/data/repositories/user_repository.dart b/lib/data/repositories/user_repository.dart index ee92f9eb4..8c73a3a91 100644 --- a/lib/data/repositories/user_repository.dart +++ b/lib/data/repositories/user_repository.dart @@ -83,9 +83,9 @@ class UserRepository { ); } else { var url = credentials.url + - '/users/${user.id}?include=company_user&password=$password'; + '/users/${user.id}?include=company_user'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=$action'; } response = await webClient.put( url, diff --git a/lib/data/repositories/vendor_repository.dart b/lib/data/repositories/vendor_repository.dart index d05385183..35d3ba364 100644 --- a/lib/data/repositories/vendor_repository.dart +++ b/lib/data/repositories/vendor_repository.dart @@ -67,9 +67,9 @@ class VendorRepository { credentials.url + '/vendors', credentials.token, data: json.encode(data)); } else { - var url = credentials.url + '/vendors/' + vendor.id.toString(); + var url = credentials.url + '/vendors/${vendor.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=' + action.toString(); } response = await webClient.put(url, credentials.token, data: json.encode(data)); diff --git a/lib/redux/app/app_state.dart b/lib/redux/app/app_state.dart index ed2341a01..6419b15d2 100644 --- a/lib/redux/app/app_state.dart +++ b/lib/redux/app/app_state.dart @@ -503,7 +503,7 @@ abstract class AppState implements Built { //return 'Currency Map: ${staticState.currencyMap}'; //return 'History: $historyList'; //return 'Use inclusive: ${invoiceUIState.editing.usesInclusiveTaxes}'; - //return 'Invitations: ${invoiceUIState.editing.invitations}'; + return 'Invitations: ${invoiceUIState.editing.invitations}'; //return 'Token: ${userCompanyStates.map((state) => state.token.token).where((name) => name.isNotEmpty).toList().join(', ')}'; //return 'Settings: ${company.settings.companyLogo}'; //return 'Designs: ${company.designs}'; diff --git a/stubs/data/repositories/stub_repository b/stubs/data/repositories/stub_repository index a5c7cdd4c..480fc4ea7 100644 --- a/stubs/data/repositories/stub_repository +++ b/stubs/data/repositories/stub_repository @@ -72,9 +72,9 @@ class StubRepository { credentials.token, data: json.encode(data)); } else { - var url = credentials.url + '/stubs/' + stub.id.toString(); + var url = '${credentials.url}/stubs/${stub.id}?'; if (action != null) { - url += '?action=' + action.toString(); + url += '&action=$action'; } response = await webClient.put(url, credentials.token, data: json.encode(data)); }