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