Refactor
This commit is contained in:
parent
8cb16a7a0c
commit
c91082bb54
|
|
@ -47,6 +47,7 @@ abstract class ClientUIState extends Object with EntityUIState implements Built<
|
|||
factory ClientUIState() {
|
||||
return _$ClientUIState._(
|
||||
listUIState: ListUIState(ClientFields.name),
|
||||
editing: ClientEntity(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ final editingReducer = combineReducers<InvoiceEntity>([
|
|||
]);
|
||||
|
||||
InvoiceEntity _updateEditing(InvoiceEntity client, action) {
|
||||
return action.client;
|
||||
return action.invoice;
|
||||
}
|
||||
|
||||
final invoiceListReducer = combineReducers<ListUIState>([
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ abstract class InvoiceUIState extends Object with EntityUIState implements Built
|
|||
factory InvoiceUIState() {
|
||||
return _$InvoiceUIState._(
|
||||
listUIState: ListUIState(InvoiceFields.invoiceNumber),
|
||||
editing: InvoiceEntity(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ final editingReducer = combineReducers<ProductEntity>([
|
|||
]);
|
||||
|
||||
ProductEntity _updateEditing(ProductEntity client, action) {
|
||||
return action.client;
|
||||
return action.product;
|
||||
}
|
||||
|
||||
final productListReducer = combineReducers<ListUIState>([
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ abstract class ProductUIState extends Object with EntityUIState implements Built
|
|||
factory ProductUIState() {
|
||||
return _$ProductUIState._(
|
||||
listUIState: ListUIState(ProductFields.productKey),
|
||||
editing: ProductEntity(),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue