Refactor entity actions
This commit is contained in:
parent
85e57f1133
commit
1df181a6a3
|
|
@ -97,9 +97,15 @@ class ExpenseViewVM {
|
||||||
switch (entityType) {
|
switch (entityType) {
|
||||||
case EntityType.vendor:
|
case EntityType.vendor:
|
||||||
if (longPress) {
|
if (longPress) {
|
||||||
store.dispatch(EditVendor(context: context, vendor: vendor));
|
showEntityActionsDialog(
|
||||||
|
user: user,
|
||||||
|
context: context,
|
||||||
|
entity: vendor,
|
||||||
|
onEntityAction: (BuildContext context, BaseEntity vendor,
|
||||||
|
EntityAction action) =>
|
||||||
|
handleVendorAction(context, vendor, action));
|
||||||
} else {
|
} else {
|
||||||
store.dispatch(ViewVendor(context: context, vendorId: vendor.id));
|
store.dispatch(ViewClient(clientId: client.id, context: context));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case EntityType.client:
|
case EntityType.client:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue