Not able to create invoice for project in sidebar filter
This commit is contained in:
parent
34d6281666
commit
d71c333f8f
|
|
@ -272,6 +272,12 @@ void handleProjectAction(
|
|||
..projectId = project.id
|
||||
..clientId = project.clientId));
|
||||
break;
|
||||
case EntityAction.newInvoice:
|
||||
createEntity(
|
||||
context: context,
|
||||
entity: InvoiceEntity(state: state, client: client)
|
||||
.rebuild((b) => b..projectId = project.id));
|
||||
break;
|
||||
case EntityAction.invoiceProject:
|
||||
String lastClientId = '';
|
||||
bool hasMultipleClients = false;
|
||||
|
|
@ -373,6 +379,8 @@ void handleProjectAction(
|
|||
),
|
||||
);
|
||||
break;
|
||||
default:
|
||||
print('## Error: action $action not handled in project_actions');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -181,10 +181,12 @@ class _EntitiesListTileState extends State<EntitiesListTile> {
|
|||
final store = StoreProvider.of<AppState>(context);
|
||||
final uiState = store.state.uiState;
|
||||
final entity = widget.entity;
|
||||
|
||||
if (uiState.filterEntityId != entity.id ||
|
||||
uiState.filterEntityType != entity.entityType) {
|
||||
store.dispatch(FilterByEntity(entity: entity));
|
||||
}
|
||||
|
||||
handleEntityAction(entity, EntityAction.newEntityType(widget.entityType));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,6 @@ class _ProjectOverviewState extends State<ProjectOverview> {
|
|||
subtitle: memoizedInvoiceStatsForProject(
|
||||
project.id, state.invoiceState.map)
|
||||
.present(localization.active, localization.archived),
|
||||
hideNew: true,
|
||||
),
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue