1354 refactor item-descriptor-popover
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
parent
810f4462f6
commit
83898c9ba7
|
@ -186,8 +186,7 @@
|
|||
</div>
|
||||
</vn-popover>
|
||||
<vn-item-descriptor-popover
|
||||
vn-id="descriptor"
|
||||
quicklinks="$ctrl.quicklinks">
|
||||
vn-id="descriptor">
|
||||
</vn-item-descriptor-popover>
|
||||
<vn-ticket-descriptor-popover
|
||||
vn-id="ticketDescriptor">
|
||||
|
|
|
@ -161,15 +161,6 @@ class Controller {
|
|||
}
|
||||
// Item Descriptor
|
||||
showDescriptor(event, itemFk) {
|
||||
this.quicklinks = {
|
||||
btnThree: {
|
||||
icon: 'icon-transaction',
|
||||
state: `item.card.diary({
|
||||
id: ${itemFk}
|
||||
})`,
|
||||
tooltip: 'Item diary'
|
||||
}
|
||||
};
|
||||
this.$.descriptor.itemFk = itemFk;
|
||||
this.$.descriptor.parent = event.target;
|
||||
this.$.descriptor.show();
|
||||
|
|
|
@ -110,6 +110,5 @@
|
|||
</tpl-body>
|
||||
</vn-dialog>
|
||||
<vn-item-descriptor-popover
|
||||
vn-id="descriptor"
|
||||
quicklinks="$ctrl.quicklinks">
|
||||
vn-id="descriptor">
|
||||
</vn-item-descriptor-popover>
|
|
@ -103,15 +103,6 @@ class Controller {
|
|||
|
||||
// Item Descriptor
|
||||
showDescriptor(event, itemFk) {
|
||||
this.quicklinks = {
|
||||
btnThree: {
|
||||
icon: 'icon-transaction',
|
||||
state: `item.card.diary({
|
||||
id: ${itemFk}
|
||||
})`,
|
||||
tooltip: 'Item diary'
|
||||
}
|
||||
};
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
|
|
|
@ -151,8 +151,7 @@
|
|||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-item-descriptor-popover
|
||||
vn-id="itemDescriptor"
|
||||
quicklinks="$ctrl.quicklinks">
|
||||
vn-id="itemDescriptor">
|
||||
</vn-item-descriptor-popover>
|
||||
<vn-worker-descriptor-popover
|
||||
vn-id="workerDescriptor"
|
||||
|
|
|
@ -18,15 +18,6 @@ class Controller {
|
|||
}
|
||||
|
||||
showItemDescriptor(event, itemFk) {
|
||||
this.quicklinks = {
|
||||
btnThree: {
|
||||
icon: 'icon-transaction',
|
||||
state: `item.card.diary({
|
||||
id: ${itemFk}
|
||||
})`,
|
||||
tooltip: 'Item diary'
|
||||
}
|
||||
};
|
||||
this.$.itemDescriptor.itemFk = itemFk;
|
||||
this.$.itemDescriptor.parent = event.target;
|
||||
this.$.itemDescriptor.show();
|
||||
|
|
|
@ -9,6 +9,7 @@ class Controller extends Component {
|
|||
this.$http = $http;
|
||||
this.$q = $q;
|
||||
this.client = null;
|
||||
this._quicklinks = {};
|
||||
}
|
||||
|
||||
set clientFk(id) {
|
||||
|
@ -28,14 +29,16 @@ class Controller extends Component {
|
|||
return this._client;
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
this._quicklinks = Object.assign(value, this._quicklinks);
|
||||
}
|
||||
|
||||
get quicklinks() {
|
||||
return this._quicklinks;
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
Object.keys(value).forEach(key => {
|
||||
this._quicklinks[key] = value[key];
|
||||
});
|
||||
}
|
||||
|
||||
show() {
|
||||
this.$.popover.parent = this.parent;
|
||||
this.$.popover.show();
|
||||
|
|
|
@ -9,6 +9,7 @@ class Controller extends Component {
|
|||
this.$http = $http;
|
||||
this.$q = $q;
|
||||
this.worker = null;
|
||||
this._quicklinks = {};
|
||||
}
|
||||
|
||||
set invoiceOutId(id) {
|
||||
|
@ -23,14 +24,16 @@ class Controller extends Component {
|
|||
return this._invoiceOutId;
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
this._quicklinks = Object.assign(value, this._quicklinks);
|
||||
}
|
||||
|
||||
get quicklinks() {
|
||||
return this._quicklinks;
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
Object.keys(value).forEach(key => {
|
||||
this._quicklinks[key] = value[key];
|
||||
});
|
||||
}
|
||||
|
||||
show() {
|
||||
this.$.popover.parent = this.parent;
|
||||
this.$.popover.show();
|
||||
|
|
|
@ -9,6 +9,7 @@ class Controller extends Component {
|
|||
this.$http = $http;
|
||||
this.$q = $q;
|
||||
this.item = null;
|
||||
this._quicklinks = {};
|
||||
}
|
||||
|
||||
set itemFk(id) {
|
||||
|
@ -16,6 +17,15 @@ class Controller extends Component {
|
|||
|
||||
this._itemFk = id;
|
||||
this.item = null;
|
||||
this._quicklinks = {
|
||||
btnThree: {
|
||||
icon: 'icon-transaction',
|
||||
state: `item.card.diary({
|
||||
id: ${id},
|
||||
})`,
|
||||
tooltip: 'Item diary'
|
||||
}
|
||||
};
|
||||
this.getCard();
|
||||
}
|
||||
|
||||
|
@ -28,14 +38,16 @@ class Controller extends Component {
|
|||
return this._item;
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
this._quicklinks = Object.assign(value, this._quicklinks);
|
||||
}
|
||||
|
||||
get quicklinks() {
|
||||
return this._quicklinks;
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
Object.keys(value).forEach(key => {
|
||||
this._quicklinks[key] = value[key];
|
||||
});
|
||||
}
|
||||
|
||||
show() {
|
||||
this.$.popover.parent = this.parent;
|
||||
this.$.popover.show();
|
||||
|
|
|
@ -139,8 +139,7 @@
|
|||
question="Do you want to clone this item?"
|
||||
message="All it's properties will be copied">
|
||||
</vn-confirm>
|
||||
<vn-item-descriptor-popover vn-id="itemDescriptor">
|
||||
</vn-item-descriptor-popover>
|
||||
<vn-item-descriptor-popover vn-id="itemDescriptor"></vn-item-descriptor-popover>
|
||||
<vn-worker-descriptor-popover
|
||||
vn-id="workerDescriptor"
|
||||
worker-fk="$ctrl.selectedWorker">
|
||||
|
|
|
@ -53,15 +53,6 @@ class Controller {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
this.quicklinks = {
|
||||
btnThree: {
|
||||
icon: 'icon-transaction',
|
||||
state: `item.card.diary({
|
||||
id: ${itemFk},
|
||||
})`,
|
||||
tooltip: 'Item diary'
|
||||
}
|
||||
};
|
||||
this.$.itemDescriptor.itemFk = itemFk;
|
||||
this.$.itemDescriptor.parent = event.target;
|
||||
this.$.itemDescriptor.show();
|
||||
|
|
|
@ -85,6 +85,5 @@
|
|||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-item-descriptor-popover
|
||||
vn-id="descriptor"
|
||||
quicklinks="$ctrl.quicklinks">
|
||||
vn-id="descriptor">
|
||||
</vn-item-descriptor-popover>
|
||||
|
|
|
@ -31,15 +31,6 @@ class Controller {
|
|||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.quicklinks = {
|
||||
btnThree: {
|
||||
icon: 'icon-transaction',
|
||||
state: `item.card.diary({
|
||||
id: ${itemFk},
|
||||
})`,
|
||||
tooltip: 'Item diary'
|
||||
}
|
||||
};
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
|
|
|
@ -9,6 +9,7 @@ class Controller extends Component {
|
|||
this.$http = $http;
|
||||
this.$q = $q;
|
||||
this.ticket = null;
|
||||
this._quicklinks = {};
|
||||
}
|
||||
|
||||
set ticketFk(id) {
|
||||
|
@ -28,14 +29,16 @@ class Controller extends Component {
|
|||
return this._ticket;
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
this._quicklinks = Object.assign(value, this._quicklinks);
|
||||
}
|
||||
|
||||
get quicklinks() {
|
||||
return this._quicklinks;
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
Object.keys(value).forEach(key => {
|
||||
this._quicklinks[key] = value[key];
|
||||
});
|
||||
}
|
||||
|
||||
show() {
|
||||
this.$.popover.parent = this.parent;
|
||||
this.$.popover.show();
|
||||
|
|
|
@ -9,6 +9,7 @@ class Controller extends Component {
|
|||
this.$http = $http;
|
||||
this.$q = $q;
|
||||
this.worker = null;
|
||||
this._quicklinks = {};
|
||||
}
|
||||
|
||||
set workerFk(workerFk) {
|
||||
|
@ -23,14 +24,16 @@ class Controller extends Component {
|
|||
return this._workerFk;
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
this._quicklinks = Object.assign(value, this._quicklinks);
|
||||
}
|
||||
|
||||
get quicklinks() {
|
||||
return this._quicklinks;
|
||||
}
|
||||
|
||||
set quicklinks(value = {}) {
|
||||
Object.keys(value).forEach(key => {
|
||||
this._quicklinks[key] = value[key];
|
||||
});
|
||||
}
|
||||
|
||||
show() {
|
||||
this.$.popover.parent = this.parent;
|
||||
this.$.popover.show();
|
||||
|
|
Loading…
Reference in New Issue