Fixed descriptor quicklinks

This commit is contained in:
Joan Sanchez 2018-08-02 10:06:11 +02:00
parent ff0f0436af
commit 25187b955f
4 changed files with 25 additions and 14 deletions

View File

@ -9,7 +9,7 @@ class Controller extends Component {
this.$timeout = $timeout;
this.isTooltip = true;
this.client = {};
this.links = {};
this._quicklinks = {};
}
set clientFk(value) {
@ -20,7 +20,7 @@ class Controller extends Component {
}
set quicklinks(value = {}) {
this._quicklinks = Object.assign(value, this.links);
this._quicklinks = Object.assign(value, this._quicklinks);
}
get quicklinks() {

View File

@ -4,25 +4,36 @@ class Controller {
constructor($http, $state) {
this.$state = $state;
this.$http = $http;
this.links = {
}
set clientFk(value) {
if (!value) return;
this._getClient(value);
this._getClientDebt(value);
}
set client(value) {
this._client = value;
if (!value) return;
this._quicklinks = {
btnOne: {
icon: 'icon-ticket',
state: 'ticket.index',
params: {q: `{"clientFk": ${$state.params.id}}`},
params: {q: `{"clientFk": 1}`},
tooltip: 'Client ticket list'
}
};
}
set clientFk(value) {
if (value) {
this._getClient(value);
this._getClientDebt(value);
}
get client() {
return this._client;
}
set quicklinks(value = {}) {
this._quicklinks = Object.assign(value, this.links);
this._quicklinks = Object.assign(value, this._quicklinks);
}
get quicklinks() {

View File

@ -7,13 +7,13 @@ class Controller extends Component {
super($element, $scope);
this.$http = $http;
this.$timeout = $timeout;
this.links = {};
this._quicklinks = {};
this.isTooltip = true;
this.clear();
}
set quicklinks(value = {}) {
this._quicklinks = Object.assign(value, this.links);
this._quicklinks = Object.assign(value, this._quicklinks);
}
get quicklinks() {

View File

@ -4,11 +4,11 @@ import './style.scss';
class Controller {
constructor($state) {
this.$state = $state;
this.links = {};
this._quicklinks = {};
}
set quicklinks(value = {}) {
this._quicklinks = Object.assign(value, this.links);
this._quicklinks = Object.assign(value, this._quicklinks);
}
get quicklinks() {