fix: worker.basic-data el boton guardar estava activo al hacer F5
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
4a7cfe9122
commit
4f183d1c6a
|
@ -0,0 +1,4 @@
|
||||||
|
INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId)
|
||||||
|
VALUES
|
||||||
|
('WorkerDisableExcluded', '*', 'READ', 'ALLOW', 'ROLE', 'itManagement'),
|
||||||
|
('WorkerDisableExcluded', '*', 'WRITE', 'ALLOW', 'ROLE', 'itManagement');
|
|
@ -5,8 +5,8 @@
|
||||||
<slot-before>
|
<slot-before>
|
||||||
<div class="photo" text-center>
|
<div class="photo" text-center>
|
||||||
<img vn-id="photo"
|
<img vn-id="photo"
|
||||||
ng-src="{{$root.imagePath('user', '520x520', $ctrl.worker.id)}}"
|
ng-src="{{$root.imagePath('user', '520x520', $ctrl.worker.id)}}"
|
||||||
zoom-image="{{$root.imagePath('user', '1600x1600', $ctrl.worker.id)}}"
|
zoom-image="{{$root.imagePath('user', '1600x1600', $ctrl.worker.id)}}"
|
||||||
on-error-src/>
|
on-error-src/>
|
||||||
<vn-float-button ng-click="uploadPhoto.show('user', $ctrl.worker.id)"
|
<vn-float-button ng-click="uploadPhoto.show('user', $ctrl.worker.id)"
|
||||||
icon="edit"
|
icon="edit"
|
||||||
|
@ -15,39 +15,32 @@
|
||||||
</div>
|
</div>
|
||||||
</slot-before>
|
</slot-before>
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item
|
<vn-item ng-click="$ctrl.handleExcluded()" translate>
|
||||||
ng-click="$ctrl.handleExcluded()"
|
{{$ctrl.workerExcluded
|
||||||
translate
|
? 'Click to allow the user to be disabled'
|
||||||
ng-if="!$ctrl.excluded">
|
: 'Click to exclude the user from getting disabled'}}
|
||||||
Click to exclude the user from getting disabled
|
</vn-item>
|
||||||
</vn-item>
|
|
||||||
<vn-item
|
|
||||||
ng-click="$ctrl.handleExcluded()"
|
|
||||||
translate
|
|
||||||
ng-if="$ctrl.excluded">
|
|
||||||
Click to allow the user to be disabled
|
|
||||||
</vn-item>
|
|
||||||
</slot-menu>
|
</slot-menu>
|
||||||
<slot-body>
|
<slot-body>
|
||||||
<div class="attributes">
|
<div class="attributes">
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="User"
|
label="User"
|
||||||
value="{{$ctrl.worker.user.name}}">
|
value="{{$ctrl.worker.user.name}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Email"
|
label="Email"
|
||||||
value="{{$ctrl.worker.user.emailUser.email}}">
|
value="{{$ctrl.worker.user.emailUser.email}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Department"
|
label="Department"
|
||||||
value="{{$ctrl.worker.department.department.name}}">
|
value="{{$ctrl.worker.department.department.name}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Phone"
|
label="Phone"
|
||||||
value="{{$ctrl.worker.phone}}">
|
value="{{$ctrl.worker.phone}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
<vn-label-value
|
<vn-label-value
|
||||||
label="Extension"
|
label="Extension"
|
||||||
value="{{$ctrl.worker.sip.extension}}">
|
value="{{$ctrl.worker.sip.extension}}">
|
||||||
</vn-label-value>
|
</vn-label-value>
|
||||||
</div>
|
</div>
|
||||||
|
@ -84,7 +77,7 @@
|
||||||
</vn-popup>
|
</vn-popup>
|
||||||
|
|
||||||
<!-- Upload photo dialog -->
|
<!-- Upload photo dialog -->
|
||||||
<vn-upload-photo
|
<vn-upload-photo
|
||||||
vn-id="uploadPhoto"
|
vn-id="uploadPhoto"
|
||||||
on-response="$ctrl.onUploadResponse()">
|
on-response="$ctrl.onUploadResponse()">
|
||||||
</vn-upload-photo>
|
</vn-upload-photo>
|
||||||
|
|
|
@ -18,28 +18,19 @@ class Controller extends Descriptor {
|
||||||
this.getIsExcluded();
|
this.getIsExcluded();
|
||||||
}
|
}
|
||||||
|
|
||||||
get excluded() {
|
|
||||||
return this.entity.excluded;
|
|
||||||
}
|
|
||||||
|
|
||||||
set excluded(value) {
|
|
||||||
this.entity.excluded = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
getIsExcluded() {
|
getIsExcluded() {
|
||||||
this.$http.get(`workerDisableExcludeds/${this.entity.id}/exists`).then(data => {
|
this.$http.get(`WorkerDisableExcludeds/${this.entity.id}/exists`).then(data => {
|
||||||
this.excluded = data.data.exists;
|
this.workerExcluded = data.data.exists;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
handleExcluded() {
|
handleExcluded() {
|
||||||
if (this.excluded) {
|
if (this.workerExcluded)
|
||||||
this.$http.delete(`workerDisableExcludeds/${this.entity.id}`);
|
this.$http.delete(`WorkerDisableExcludeds/${this.entity.id}`);
|
||||||
this.excluded = false;
|
else
|
||||||
} else {
|
this.$http.post(`WorkerDisableExcludeds`, {workerFk: this.entity.id, dated: new Date});
|
||||||
this.$http.post(`workerDisableExcludeds`, {workerFk: this.entity.id, dated: new Date});
|
|
||||||
this.excluded = true;
|
this.workerExcluded = !this.workerExcluded;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
loadData() {
|
loadData() {
|
||||||
|
|
Loading…
Reference in New Issue