Added user icon and fixed icon not updating
gitea/salix/pipeline/head This commit is unstable Details

This commit is contained in:
Pau 2022-10-06 11:54:14 +02:00
parent 1165e050eb
commit 3376293d1a
2 changed files with 10 additions and 2 deletions

View File

@ -52,6 +52,13 @@
value="{{$ctrl.worker.sip.extension}}"> value="{{$ctrl.worker.sip.extension}}">
</vn-label-value> </vn-label-value>
</div> </div>
<div class="icons">
<vn-icon
vn-tooltip="Fijado para no deshabilitar"
icon="person"
ng-if="$ctrl.worker.excluded">
</vn-icon>
</div>
<div class="quicklinks"> <div class="quicklinks">
<div ng-transclude="btnOne"> <div ng-transclude="btnOne">
<vn-quick-link <vn-quick-link

View File

@ -22,17 +22,18 @@ class Controller extends Descriptor {
set excluded(value) { set excluded(value) {
this.entity.excluded = value; this.entity.excluded = value;
this.$rootScope.$apply();
} }
async canBeExcluded() { async canBeExcluded() {
await new Promise(r => setTimeout(r, 1000)); await new Promise(r => setTimeout(r, 500));
let data = await this.$http.get(`Workers/workerDisableExcluded/${this.entity.id}`); let data = await this.$http.get(`Workers/workerDisableExcluded/${this.entity.id}`);
this.excluded = data.data; this.excluded = data.data;
} }
async setExcluded() { async setExcluded() {
await this.$http.get(`Workers/workerExcludeFromDisable/${this.entity.id}/${this.entity.excluded}`); await this.$http.get(`Workers/workerExcludeFromDisable/${this.entity.id}/${this.entity.excluded}`);
this.canBeExcluded(); this.excluded = !this.entity.excluded;
} }
loadData() { loadData() {