Buyer ACL
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-12-29 07:52:36 +01:00
parent 910caf5689
commit f29840b37b
2 changed files with 6 additions and 0 deletions

View File

@ -7,12 +7,14 @@
<vn-item
id="clone"
ng-click="clone.show()"
ng-show="::$ctrl.isBuyer"
translate>
Clone travel
</vn-item>
<vn-item
id="cloneWithEntries"
ng-click="cloneWithEntries.show()"
ng-show="::$ctrl.isBuyer"
translate>
Clone travel and his entries
</vn-item>

View File

@ -48,6 +48,10 @@ class Controller extends Section {
.then(res => this.travel = res.data);
}
get isBuyer() {
return this.aclService.hasAny(['buyer']);
}
onCloneAccept() {
const params = JSON.stringify({
ref: this.travel.ref,