This commit is contained in:
@@ -457,7 +457,9 @@ Subcontractor / tech limited modifications
|
||||
|
||||
|
||||
|
||||
|
||||
TODO: Outside Service repair COST is still showing for restricted and other users
|
||||
should it?
|
||||
|
||||
todo: units on work order are not limited to customer on work order??
|
||||
todo: looks like wont' need subrights system, need to disentangle and remove it from workorder
|
||||
todo: Status on work order doesn't seem to be preventing "Who can select" by role properly
|
||||
|
||||
@@ -953,10 +953,18 @@ export default {
|
||||
return this.pvm.rights.change && this.pvm.subRights.labors.create;
|
||||
},
|
||||
canDelete: function() {
|
||||
return this.activeItemIndex != null && this.canDeleteAll;
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.labors.delete
|
||||
);
|
||||
},
|
||||
canDeleteAll: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.labors.delete;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.labors.delete &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
}
|
||||
//----
|
||||
}
|
||||
|
||||
@@ -821,13 +821,25 @@ export default {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.loans.create;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.loans.create &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDelete: function() {
|
||||
return this.activeItemIndex != null && this.canDeleteAll;
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.canDeleteAll &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDeleteAll: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.loans.delete;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.loans.delete &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
}
|
||||
|
||||
//----
|
||||
|
||||
@@ -1080,15 +1080,23 @@ export default {
|
||||
},
|
||||
canAdd: function() {
|
||||
return (
|
||||
this.pvm.rights.change && this.pvm.subRights.outsideServices.create
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.outsideServices.create &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDelete: function() {
|
||||
return this.activeItemIndex != null && this.canDeleteAll;
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.canDeleteAll &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDeleteAll: function() {
|
||||
return (
|
||||
this.pvm.rights.change && this.pvm.subRights.outsideServices.delete
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.outsideServices.delete &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -373,13 +373,21 @@ export default {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
// canAdd: function() {
|
||||
// return this.pvm.rights.change && this.pvm.subRights.partRequests.create;
|
||||
// return this.pvm.rights.change && this.pvm.subRights.partRequests.create && !this.value.userIsRestrictedType;
|
||||
// },
|
||||
canDelete: function() {
|
||||
return this.activeItemIndex != null && this.canDeleteAll;
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.canDeleteAll &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDeleteAll: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.partRequests.delete;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.partRequests.delete &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
}
|
||||
|
||||
//----
|
||||
|
||||
@@ -1071,13 +1071,25 @@ export default {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.parts.create;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.parts.create &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDelete: function() {
|
||||
return this.activeItemIndex != null && this.canDeleteAll;
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.canDeleteAll &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDeleteAll: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.parts.delete;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.parts.delete &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
}
|
||||
|
||||
//----
|
||||
|
||||
@@ -664,13 +664,25 @@ export default {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.scheduledUsers.create;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.scheduledUsers.create &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDelete: function() {
|
||||
return this.activeItemIndex != null && this.canDeleteAll;
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.canDeleteAll &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDeleteAll: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.scheduledUsers.delete;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.scheduledUsers.delete &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -625,13 +625,25 @@ export default {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.tasks.create;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.tasks.create &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDelete: function() {
|
||||
return this.activeItemIndex != null && this.canDeleteAll;
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.canDeleteAll &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDeleteAll: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.tasks.delete;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.tasks.delete &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -931,10 +931,18 @@ export default {
|
||||
return this.pvm.rights.change && this.pvm.subRights.travels.create;
|
||||
},
|
||||
canDelete: function() {
|
||||
return this.activeItemIndex != null && this.canDeleteAll;
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.travels.delete
|
||||
);
|
||||
},
|
||||
canDeleteAll: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.travels.delete;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.travels.delete &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
}
|
||||
|
||||
//----
|
||||
|
||||
@@ -758,13 +758,25 @@ export default {
|
||||
return this.activeItemIndex != null;
|
||||
},
|
||||
canAdd: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.units.create;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.units.create &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDelete: function() {
|
||||
return this.activeItemIndex != null && this.canDeleteAll;
|
||||
return (
|
||||
this.activeItemIndex != null &&
|
||||
this.canDeleteAll &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
},
|
||||
canDeleteAll: function() {
|
||||
return this.pvm.rights.change && this.pvm.subRights.units.delete;
|
||||
return (
|
||||
this.pvm.rights.change &&
|
||||
this.pvm.subRights.units.delete &&
|
||||
!this.value.userIsRestrictedType
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user