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}}">
</vn-label-value>
</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 ng-transclude="btnOne">
<vn-quick-link

View File

@ -22,17 +22,18 @@ class Controller extends Descriptor {
set excluded(value) {
this.entity.excluded = value;
this.$rootScope.$apply();
}
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}`);
this.excluded = data.data;
}
async setExcluded() {
await this.$http.get(`Workers/workerExcludeFromDisable/${this.entity.id}/${this.entity.excluded}`);
this.canBeExcluded();
this.excluded = !this.entity.excluded;
}
loadData() {