5887-mailAlias_refactor #1659
|
@ -11,6 +11,8 @@ module.exports = function(Self) {
|
||||||
require('../methods/vn-user/validate-token')(Self);
|
require('../methods/vn-user/validate-token')(Self);
|
||||||
require('../methods/vn-user/privileges')(Self);
|
require('../methods/vn-user/privileges')(Self);
|
||||||
require('../methods/vn-user/renew-token')(Self);
|
require('../methods/vn-user/renew-token')(Self);
|
||||||
|
require('../methods/vn-user/addAlias')(Self);
|
||||||
|
require('../methods/vn-user/removeAlias')(Self);
|
||||||
|
|
||||||
Self.definition.settings.acls = Self.definition.settings.acls.filter(acl => acl.property !== 'create');
|
Self.definition.settings.acls = Self.definition.settings.acls.filter(acl => acl.property !== 'create');
|
||||||
|
|
||||||
|
|
|
@ -296,7 +296,8 @@
|
||||||
"Fecha fuera de rango": "Fecha fuera de rango",
|
"Fecha fuera de rango": "Fecha fuera de rango",
|
||||||
"Error while generating PDF": "Error al generar PDF",
|
"Error while generating PDF": "Error al generar PDF",
|
||||||
"Error when sending mail to client": "Error al enviar el correo al cliente",
|
"Error when sending mail to client": "Error al enviar el correo al cliente",
|
||||||
"Mail not sent": "Se ha producido un fallo al enviar la factura al cliente [{{clientId}}]({{{clientUrl}}}), por favor revisa la dirección de correo electrónico",
|
"Mail not sent": "Se ha producido un fallo al enviar la factura al cliente [{{clientId}}]({{{clientUrl}}}), por favor revisa la dirección de correo electrónico",
|
||||||
"The renew period has not been exceeded": "El periodo de renovación no ha sido superado",
|
"The renew period has not been exceeded": "El periodo de renovación no ha sido superado",
|
||||||
"Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}"
|
"Negative basis of tickets": "Base negativa para los tickets: {{ticketsIds}}",
|
||||||
|
"You don't have the alias assigned and you can't assign it to another user": "No tienes el alias asignado y no puedes asignarlo a otro usuario"
|
||||||
vicent marked this conversation as resolved
Outdated
|
|||||||
}
|
}
|
||||||
|
|
|
@ -17,9 +17,7 @@
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
icon="delete"
|
icon="delete"
|
||||||
translate-attr="{title: 'Unsubscribe'}"
|
translate-attr="{title: 'Unsubscribe'}"
|
||||||
ng-click="removeConfirm.show(row)"
|
ng-click="removeConfirm.show(row)">
|
||||||
vn-acl="itManagement"
|
|
||||||
vn-acl-action="remove">
|
|
||||||
</vn-icon-button>
|
</vn-icon-button>
|
||||||
</vn-item-section>
|
</vn-item-section>
|
||||||
</vn-item>
|
</vn-item>
|
||||||
|
@ -32,9 +30,7 @@
|
||||||
translate-attr="{title: 'Add'}"
|
translate-attr="{title: 'Add'}"
|
||||||
vn-bind="+"
|
vn-bind="+"
|
||||||
ng-click="$ctrl.onAddClick()"
|
ng-click="$ctrl.onAddClick()"
|
||||||
fixed-bottom-right
|
fixed-bottom-right>
|
||||||
vn-acl="itManagement"
|
|
||||||
vn-acl-action="remove">
|
|
||||||
</vn-float-button>
|
</vn-float-button>
|
||||||
<vn-dialog
|
<vn-dialog
|
||||||
vn-id="dialog"
|
vn-id="dialog"
|
||||||
|
|
|
@ -21,12 +21,11 @@ export default class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddClick() {
|
onAddClick() {
|
||||||
this.addData = {account: this.$params.id};
|
|
||||||
this.$.dialog.show();
|
this.$.dialog.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
onAddSave() {
|
onAddSave() {
|
||||||
return this.$http.post(`MailAliasAccounts`, this.addData)
|
return this.$http.post(`VnUsers/${this.$params.id}/addAlias`, this.addData)
|
||||||
.then(() => this.refresh())
|
.then(() => this.refresh())
|
||||||
.then(() => this.vnApp.showSuccess(
|
.then(() => this.vnApp.showSuccess(
|
||||||
this.$t('Subscribed to alias!'))
|
this.$t('Subscribed to alias!'))
|
||||||
|
@ -34,11 +33,14 @@ export default class Controller extends Section {
|
||||||
}
|
}
|
||||||
|
|
||||||
onRemove(row) {
|
onRemove(row) {
|
||||||
return this.$http.delete(`MailAliasAccounts/${row.id}`)
|
const params = {
|
||||||
.then(() => {
|
mailAlias: row.mailAlias
|
||||||
this.$.data.splice(this.$.data.indexOf(row), 1);
|
};
|
||||||
this.vnApp.showSuccess(this.$t('Unsubscribed from alias!'));
|
return this.$http.post(`VnUsers/${this.$params.id}/removeAlias`, params)
|
||||||
});
|
.then(() => this.refresh())
|
||||||
|
.then(() => this.vnApp.showSuccess(
|
||||||
|
this.$t('Subscribed to alias!'))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
"You cannot assign an alias that you are not assigned to": "No puedes asignar un alias que no tienes asignado"