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