feat: check if uses mana
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2022-10-21 08:55:05 +02:00
parent e7261573d7
commit 2d0cb60b50
2 changed files with 20 additions and 2 deletions

View File

@ -264,6 +264,16 @@
</div>
</div>
</div>
<vn-horizontal >
<vn-button
label="Cancel"
ng-click="$ctrl.cancel()">
</vn-button>
<vn-button
label="Save"
ng-click="$ctrl.save()">
</vn-button>
</vn-horizontal>
</div>
</vn-popover>
@ -278,7 +288,7 @@
</vn-spinner>
<div ng-if="$ctrl.edit.mana != null">
<section class="header vn-pa-md">
<h5>Mana: {{::$ctrl.edit.mana | currency: 'EUR':0}}</h5>
<h5>MANÁ: {{::$ctrl.edit.mana | currency: 'EUR': 0}}</h5>
</section>
<div class="vn-pa-md">
<vn-input-number
@ -288,7 +298,7 @@
clear-disabled="true"
suffix="%">
</vn-input-number>
<vn-vertical ng-if="$ctrl.currentWorkerMana != 0">
<vn-vertical ng-if="$ctrl.usesMana && $ctrl.currentWorkerMana != 0">
<vn-radio
label="Promotion mana"
val="mana"

View File

@ -75,6 +75,7 @@ class Controller extends Section {
this.$.editPricePopover.relocate();
});
});
this.getUsesMana();
this.getCurrentWorkerMana();
}
@ -85,6 +86,13 @@ class Controller extends Section {
});
}
getUsesMana() {
this.$http.get(`Sales/usesMana`)
.then(res => {
this.useMana = res.data;
});
}
/**
* Returns checked instances
*