Back navigation fies
This commit is contained in:
parent
4edbef68ee
commit
206cd0191e
|
|
@ -43,23 +43,21 @@ List<String> dropdownInvoiceSelector(
|
|||
return list;
|
||||
}
|
||||
|
||||
var memoizedFilteredInvoiceList = memo6(
|
||||
var memoizedFilteredInvoiceList = memo5(
|
||||
(BuiltMap<String, InvoiceEntity> invoiceMap,
|
||||
BuiltList<String> invoiceList,
|
||||
BuiltMap<String, ClientEntity> clientMap,
|
||||
BuiltMap<String, PaymentEntity> paymentMap,
|
||||
ListUIState invoiceListState,
|
||||
String selectedId) =>
|
||||
ListUIState invoiceListState,) =>
|
||||
filteredInvoicesSelector(invoiceMap, invoiceList, clientMap, paymentMap,
|
||||
invoiceListState, selectedId));
|
||||
invoiceListState));
|
||||
|
||||
List<String> filteredInvoicesSelector(
|
||||
BuiltMap<String, InvoiceEntity> invoiceMap,
|
||||
BuiltList<String> invoiceList,
|
||||
BuiltMap<String, ClientEntity> clientMap,
|
||||
BuiltMap<String, PaymentEntity> paymentMap,
|
||||
ListUIState invoiceListState,
|
||||
String selectedId) {
|
||||
ListUIState invoiceListState,) {
|
||||
final Map<String, List<String>> invoicePaymentMap = {};
|
||||
|
||||
if (invoiceListState.filterEntityType == EntityType.payment) {
|
||||
|
|
@ -78,10 +76,6 @@ List<String> filteredInvoicesSelector(
|
|||
final client =
|
||||
clientMap[invoice.clientId] ?? ClientEntity(id: invoice.clientId);
|
||||
|
||||
if (invoice.id == selectedId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (invoiceListState.filterEntityType == EntityType.client) {
|
||||
if (!invoiceListState.entityMatchesFilter(client)) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class _HistoryListTileState extends State<HistoryListTile> {
|
|||
} else {
|
||||
entity = state.getEntityMap(history.entityType)[history.id] as BaseEntity;
|
||||
|
||||
if (entity == null) {
|
||||
if (entity == null || !entity.isActive) {
|
||||
return SizedBox();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ class MainScreen extends StatelessWidget {
|
|||
|
||||
final entity = state.getEntityMap(item.entityType)[item.id]
|
||||
as BaseEntity;
|
||||
if (entity == null) {
|
||||
if (entity == null || !entity.isActive) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,6 @@ class InvoiceListVM extends EntityListVM {
|
|||
state.clientState.map,
|
||||
state.paymentState.map,
|
||||
state.invoiceListState,
|
||||
state.invoiceUIState.selectedId,
|
||||
),
|
||||
invoiceMap: state.invoiceState.map,
|
||||
clientMap: state.clientState.map,
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ class InvoiceScreenVM {
|
|||
state.clientState.map,
|
||||
state.paymentState.map,
|
||||
state.invoiceListState,
|
||||
state.invoiceUIState.selectedId,
|
||||
),
|
||||
userCompany: state.userCompany,
|
||||
isInMultiselect: state.invoiceListState.isInMultiselect(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue