2020-03-09 08:00:03 +00:00
|
|
|
<vn-descriptor-content
|
|
|
|
module="account"
|
|
|
|
description="$ctrl.user.nickname">
|
|
|
|
<slot-menu>
|
|
|
|
<vn-item
|
|
|
|
ng-click="deleteUser.show()"
|
|
|
|
name="deleteUser"
|
2021-11-25 06:43:32 +00:00
|
|
|
vn-acl="it"
|
|
|
|
vn-acl-action="remove"
|
2020-03-09 08:00:03 +00:00
|
|
|
translate>
|
|
|
|
Delete
|
|
|
|
</vn-item>
|
|
|
|
<vn-item
|
|
|
|
ng-click="$ctrl.onChangeRole()"
|
|
|
|
name="changeRole"
|
2021-11-25 06:43:32 +00:00
|
|
|
vn-acl="hr"
|
|
|
|
vn-acl-action="remove"
|
2020-03-09 08:00:03 +00:00
|
|
|
translate>
|
|
|
|
Change role
|
|
|
|
</vn-item>
|
|
|
|
<vn-item
|
|
|
|
ng-if="::$root.user.id == $ctrl.id"
|
|
|
|
ng-click="$ctrl.onChangePassClick(true)"
|
|
|
|
name="changePassword"
|
2021-11-25 06:43:32 +00:00
|
|
|
vn-acl="hr"
|
|
|
|
vn-acl-action="remove"
|
2020-03-09 08:00:03 +00:00
|
|
|
translate>
|
|
|
|
Change password
|
|
|
|
</vn-item>
|
|
|
|
<vn-item
|
|
|
|
ng-click="$ctrl.onChangePassClick(false)"
|
|
|
|
name="setPassword"
|
2021-11-25 06:43:32 +00:00
|
|
|
vn-acl="hr"
|
|
|
|
vn-acl-action="remove"
|
2020-03-09 08:00:03 +00:00
|
|
|
translate>
|
|
|
|
Set password
|
|
|
|
</vn-item>
|
|
|
|
<vn-item
|
|
|
|
ng-if="!$ctrl.hasAccount"
|
|
|
|
ng-click="enableAccount.show()"
|
|
|
|
name="enableAccount"
|
2021-11-25 06:43:32 +00:00
|
|
|
vn-acl="it"
|
|
|
|
vn-acl-action="remove"
|
2020-03-09 08:00:03 +00:00
|
|
|
translate>
|
|
|
|
Enable account
|
|
|
|
</vn-item>
|
|
|
|
<vn-item
|
|
|
|
ng-if="$ctrl.hasAccount"
|
|
|
|
ng-click="disableAccount.show()"
|
|
|
|
name="disableAccount"
|
2021-11-25 06:43:32 +00:00
|
|
|
vn-acl="it"
|
|
|
|
vn-acl-action="remove"
|
2020-03-09 08:00:03 +00:00
|
|
|
translate>
|
|
|
|
Disable account
|
|
|
|
</vn-item>
|
|
|
|
<vn-item
|
|
|
|
ng-if="!$ctrl.user.active"
|
|
|
|
ng-click="activateUser.show()"
|
|
|
|
name="activateUser"
|
2021-11-25 06:43:32 +00:00
|
|
|
vn-acl="hr"
|
|
|
|
vn-acl-action="remove"
|
2020-03-09 08:00:03 +00:00
|
|
|
translate>
|
|
|
|
Activate user
|
|
|
|
</vn-item>
|
|
|
|
<vn-item
|
|
|
|
ng-if="$ctrl.user.active"
|
|
|
|
ng-click="deactivateUser.show()"
|
|
|
|
name="deactivateUser"
|
2021-11-25 06:43:32 +00:00
|
|
|
vn-acl="hr"
|
|
|
|
vn-acl-action="remove"
|
2020-03-09 08:00:03 +00:00
|
|
|
translate>
|
|
|
|
Deactivate user
|
|
|
|
</vn-item>
|
|
|
|
</slot-menu>
|
|
|
|
<slot-body>
|
|
|
|
<div class="attributes">
|
|
|
|
<vn-label-value
|
|
|
|
label="User"
|
|
|
|
value="{{$ctrl.user.name}}">
|
|
|
|
</vn-label-value>
|
|
|
|
<vn-label-value
|
|
|
|
label="Role"
|
|
|
|
value="{{$ctrl.user.role.name}}">
|
|
|
|
</vn-label-value>
|
|
|
|
</div>
|
|
|
|
<div class="icons">
|
|
|
|
<vn-icon
|
|
|
|
vn-tooltip="User deactivated"
|
|
|
|
icon="icon-disabled"
|
2020-12-04 12:40:58 +00:00
|
|
|
ng-if="!$ctrl.user.active">
|
2020-03-09 08:00:03 +00:00
|
|
|
</vn-icon>
|
|
|
|
<vn-icon
|
|
|
|
vn-tooltip="Account enabled"
|
|
|
|
icon="contact_mail"
|
2020-12-04 12:40:58 +00:00
|
|
|
ng-if="$ctrl.hasAccount">
|
2020-03-09 08:00:03 +00:00
|
|
|
</vn-icon>
|
|
|
|
</div>
|
|
|
|
</slot-body>
|
|
|
|
</vn-descriptor-content>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="deleteUser"
|
|
|
|
on-accept="$ctrl.onDelete()"
|
|
|
|
question="Are you sure you want to continue?"
|
|
|
|
message="User will be removed">
|
|
|
|
</vn-confirm>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="enableAccount"
|
|
|
|
on-accept="$ctrl.onEnableAccount()"
|
|
|
|
question="Are you sure you want to continue?"
|
|
|
|
message="Account will be enabled">
|
|
|
|
</vn-confirm>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="disableAccount"
|
|
|
|
on-accept="$ctrl.onDisableAccount()"
|
|
|
|
question="Are you sure you want to continue?"
|
|
|
|
message="Account will be disabled">
|
|
|
|
</vn-confirm>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="activateUser"
|
|
|
|
on-accept="$ctrl.onSetActive(true)"
|
|
|
|
question="Are you sure you want to continue?"
|
|
|
|
message="User will activated">
|
|
|
|
</vn-confirm>
|
|
|
|
<vn-confirm
|
|
|
|
vn-id="deactivateUser"
|
|
|
|
on-accept="$ctrl.onSetActive(false)"
|
|
|
|
question="Are you sure you want to continue?"
|
|
|
|
message="User will be deactivated">
|
|
|
|
</vn-confirm>
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="changeRole"
|
|
|
|
on-accept="$ctrl.onChangeRoleAccept()">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-autocomplete
|
|
|
|
label="Role"
|
|
|
|
ng-model="$ctrl.newRole"
|
|
|
|
url="Roles"
|
|
|
|
vn-focus>
|
|
|
|
</vn-autocomplete>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Accept</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="changePass"
|
|
|
|
on-accept="$ctrl.onPassChange()"
|
|
|
|
on-close="$ctrl.onPassClose()">
|
|
|
|
<tpl-body>
|
|
|
|
<vn-textfield
|
|
|
|
ng-if="$ctrl.askOldPass"
|
|
|
|
label="Old password"
|
|
|
|
ng-model="$ctrl.oldPassword"
|
2020-11-07 13:05:48 +00:00
|
|
|
type="password"
|
|
|
|
vn-focus>
|
2020-03-09 08:00:03 +00:00
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
label="New password"
|
|
|
|
ng-model="$ctrl.newPassword"
|
|
|
|
type="password"
|
2020-11-07 13:05:48 +00:00
|
|
|
info="{{'Password requirements' | translate:$ctrl.passRequirements}}"
|
|
|
|
vn-focus>
|
2020-03-09 08:00:03 +00:00
|
|
|
</vn-textfield>
|
|
|
|
<vn-textfield
|
|
|
|
label="Repeat password"
|
|
|
|
ng-model="$ctrl.repeatPassword"
|
|
|
|
type="password">
|
|
|
|
</vn-textfield>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Change password</button>
|
|
|
|
</tpl-buttons>
|
|
|
|
</vn-dialog>
|