Add view action
This commit is contained in:
parent
f15bed7f4c
commit
45eb420b96
|
|
@ -320,6 +320,10 @@ abstract class ExpenseEntity extends Object
|
|||
final actions = <EntityAction>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (!multiselect && includePreview) {
|
||||
actions.add(EntityAction.preview);
|
||||
}
|
||||
|
||||
if (includeEdit &&
|
||||
!multiselect &&
|
||||
userCompany.canEditEntity(this) &&
|
||||
|
|
|
|||
|
|
@ -759,6 +759,10 @@ abstract class InvoiceEntity extends Object
|
|||
final actions = <EntityAction>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (includePreview && !multiselect) {
|
||||
actions.add(EntityAction.preview);
|
||||
}
|
||||
|
||||
if (userCompany.canEditEntity(this)) {
|
||||
if (includeEdit && !multiselect) {
|
||||
actions.add(EntityAction.edit);
|
||||
|
|
|
|||
|
|
@ -385,6 +385,10 @@ abstract class PaymentEntity extends Object
|
|||
final actions = <EntityAction>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (includePreview && !multiselect) {
|
||||
actions.add(EntityAction.preview);
|
||||
}
|
||||
|
||||
if (userCompany.canEditEntity(this)) {
|
||||
if (!multiselect) {
|
||||
if (includeEdit) {
|
||||
|
|
|
|||
|
|
@ -304,6 +304,10 @@ abstract class ProductEntity extends Object
|
|||
final actions = <EntityAction>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (includePreview && !multiselect) {
|
||||
actions.add(EntityAction.preview);
|
||||
}
|
||||
|
||||
if (!multiselect &&
|
||||
!multiselect &&
|
||||
includeEdit &&
|
||||
|
|
|
|||
|
|
@ -167,6 +167,10 @@ abstract class ProjectEntity extends Object
|
|||
final actions = <EntityAction>[];
|
||||
|
||||
if (!multiselect) {
|
||||
if (includePreview) {
|
||||
actions.add(EntityAction.preview);
|
||||
}
|
||||
|
||||
if (!isDeleted) {
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
|
|
|
|||
|
|
@ -547,6 +547,10 @@ abstract class TaskEntity extends Object
|
|||
final actions = <EntityAction>[];
|
||||
|
||||
if (!isDeleted) {
|
||||
if (includePreview && !multiselect) {
|
||||
actions.add(EntityAction.preview);
|
||||
}
|
||||
|
||||
if (includeEdit &&
|
||||
userCompany.canEditEntity(this) &&
|
||||
!isDeleted &&
|
||||
|
|
|
|||
|
|
@ -195,6 +195,10 @@ abstract class VendorEntity extends Object
|
|||
final actions = <EntityAction>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includePreview) {
|
||||
actions.add(EntityAction.preview);
|
||||
}
|
||||
|
||||
if (includeEdit && userCompany.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,6 +86,11 @@ abstract class StubEntity extends Object with BaseEntity implements Built<StubEn
|
|||
final actions = <EntityAction>[];
|
||||
|
||||
if (!isDeleted && !multiselect) {
|
||||
if (includePreview) {
|
||||
actions.add(EntityAction.preview);
|
||||
}
|
||||
|
||||
|
||||
if (!multiselect && includeEdit && userCompany.canEditEntity(this)) {
|
||||
actions.add(EntityAction.edit);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue