Settings
This commit is contained in:
parent
263c053c86
commit
41beedaa7b
|
|
@ -50,6 +50,7 @@ abstract class CompanyGatewayEntity extends Object
|
|||
return _$CompanyGatewayEntity._(
|
||||
id: id ?? BaseEntity.nextId,
|
||||
isChanged: false,
|
||||
isDeleted: false,
|
||||
gateway: GatewayEntity(),
|
||||
gatewayId: null,
|
||||
showBillingAddress: true,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class CompanyGatewayRepository {
|
|||
Future<CompanyGatewayEntity> loadItem(
|
||||
Credentials credentials, String entityId) async {
|
||||
final dynamic response = await webClient.get(
|
||||
'${credentials.url}/company_gateways/$entityId', credentials.token);
|
||||
'${credentials.url}/company_gateways/$entityId?include=gateway', credentials.token);
|
||||
|
||||
final CompanyGatewayItemResponse companyGatewayResponse = serializers
|
||||
.deserializeWith(CompanyGatewayItemResponse.serializer, response);
|
||||
|
|
@ -29,7 +29,7 @@ class CompanyGatewayRepository {
|
|||
|
||||
Future<BuiltList<CompanyGatewayEntity>> loadList(
|
||||
Credentials credentials, int updatedAt) async {
|
||||
String url = credentials.url + '/company_gateways?';
|
||||
String url = credentials.url + '/company_gateways?include=gateway';
|
||||
|
||||
if (updatedAt > 0) {
|
||||
url += '&updated_at=${updatedAt - kUpdatedAtBufferSeconds}';
|
||||
|
|
@ -52,11 +52,11 @@ class CompanyGatewayRepository {
|
|||
|
||||
if (companyGateway.isNew) {
|
||||
response = await webClient.post(
|
||||
credentials.url + '/company_gateways', credentials.token,
|
||||
credentials.url + '/company_gateways?include=gateway', credentials.token,
|
||||
data: json.encode(data));
|
||||
} else {
|
||||
var url =
|
||||
credentials.url + '/company_gateways/' + companyGateway.id.toString();
|
||||
credentials.url + '/company_gateways/${companyGateway.id}?include=gateway';
|
||||
if (action != null) {
|
||||
url += '?action=' + action.toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import 'package:invoiceninja_flutter/data/models/company_gateway_model.dart';
|
||||
import 'package:invoiceninja_flutter/redux/group/group_state.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/company/company_actions.dart';
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class _CompanyGatewayViewState extends State<CompanyGatewayView> {
|
|||
actions: [
|
||||
userCompany.canEditEntity(companyGateway)
|
||||
? EditIconButton(
|
||||
isVisible: !companyGateway.isDeleted,
|
||||
isVisible: !(companyGateway.isDeleted ?? false),
|
||||
onPressed: () => viewModel.onEditPressed(context),
|
||||
)
|
||||
: Container(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue