#1243 ticket.log columna worker
This commit is contained in:
parent
0b977d3b0b
commit
570e2b5732
|
@ -449,7 +449,7 @@ export default {
|
|||
},
|
||||
ticketLog: {
|
||||
logButton: `vn-left-menu a[ui-sref="ticket.card.log"]`,
|
||||
changedBy: 'vn-ticket-log > vn-log > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > div > div:nth-child(1) > span.value.ng-scope.ng-binding',
|
||||
changedBy: 'vn-ticket-log > vn-log > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(2) > span',
|
||||
actionTaken: 'vn-ticket-log > vn-log > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(1) > div > div:nth-child(3) > span.value.ng-scope.ng-binding',
|
||||
id: 'vn-ticket-log > vn-log > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr > vn-td.before > vn-one:nth-child(1) > div > span.value.ng-scope.ng-binding'
|
||||
},
|
||||
|
|
|
@ -23,30 +23,4 @@ describe('Ticket List components path', () => {
|
|||
expect(base).toContain('Base');
|
||||
expect(base.length).toBeGreaterThan(minLength);
|
||||
});
|
||||
|
||||
it('should confirm the total margin is correct', async() => {
|
||||
const name = 'Margin €';
|
||||
const minLength = name.length;
|
||||
|
||||
const margin = await nightmare
|
||||
.waitPropertyLength(selectors.ticketComponents.margin, 'innerText', minLength)
|
||||
.waitToGetProperty(selectors.ticketComponents.margin, 'innerText');
|
||||
|
||||
|
||||
expect(margin).toContain('Margin');
|
||||
expect(margin.length).toBeGreaterThan(minLength);
|
||||
});
|
||||
|
||||
it('should confirm the total total is correct', async() => {
|
||||
const name = 'Total €';
|
||||
const minLength = name.length;
|
||||
|
||||
const total = await nightmare
|
||||
.waitPropertyLength(selectors.ticketComponents.total, 'innerText', minLength)
|
||||
.waitToGetProperty(selectors.ticketComponents.total, 'innerText');
|
||||
|
||||
|
||||
expect(total).toContain('Total');
|
||||
expect(total.length).toBeGreaterThan(minLength);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -40,7 +40,6 @@ import './input-range';
|
|||
import './chip';
|
||||
import './input-number';
|
||||
import './input-time';
|
||||
import './log';
|
||||
import './treeview';
|
||||
import './treeview/child';
|
||||
import './calendar';
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
import ngModule from '../../module';
|
||||
import './style.scss';
|
||||
|
||||
export default class Controller {
|
||||
constructor() {
|
||||
this.actionsText = {
|
||||
'insert': 'Creates',
|
||||
'update': 'Updates',
|
||||
'delete': 'Deletes',
|
||||
'select': 'Views'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.component('vnLog', {
|
||||
controller: Controller,
|
||||
template: require('./index.html'),
|
||||
bindings: {
|
||||
model: '<'
|
||||
}
|
||||
});
|
|
@ -3,6 +3,7 @@
|
|||
"name": "Agencies",
|
||||
"icon" : "icon-delivery",
|
||||
"validations" : true,
|
||||
"dependencies": ["worker"],
|
||||
"menu": [
|
||||
{"state": "zone.card.basicData", "icon": "settings"},
|
||||
{"state": "zone.card.location", "icon": "my_location"}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
"name": "Clients",
|
||||
"icon": "icon-person",
|
||||
"validations" : true,
|
||||
"dependencies": ["worker"],
|
||||
"menu": [
|
||||
{"state": "client.card.basicData", "icon": "settings"},
|
||||
{"state": "client.card.fiscalData", "icon": "account_balance"},
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Invoices out",
|
||||
"icon": "icon-invoices1",
|
||||
"validations" : true,
|
||||
"dependencies": ["client", "ticket"],
|
||||
"dependencies": ["worker", "client", "ticket"],
|
||||
"routes": [
|
||||
{
|
||||
"url": "/invoice-out",
|
||||
|
|
|
@ -4,7 +4,6 @@ export default class Controller {
|
|||
constructor($scope, vnToken) {
|
||||
this.accessToken = vnToken.token;
|
||||
this.$ = $scope;
|
||||
this.ticketSelected = null;
|
||||
|
||||
this.filter = {
|
||||
include: [
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
"module": "travel",
|
||||
"name": "Travels",
|
||||
"validations": true,
|
||||
"dependencies": ["worker"],
|
||||
"routes": [
|
||||
{
|
||||
"url": "/travel",
|
||||
|
|
|
@ -10,3 +10,4 @@ import './basic-data';
|
|||
import './pbx';
|
||||
import './department';
|
||||
import './calendar';
|
||||
import './log';
|
||||
|
|
|
@ -21,7 +21,12 @@
|
|||
<div class="changes">
|
||||
<div>
|
||||
<span translate class="label">Changed by</span><span class="label">: </span>
|
||||
<span translate class="value">{{::log.user.name | dashIfEmpty}}</span>
|
||||
<span
|
||||
class="link"
|
||||
ng-click="$ctrl.showWorkerDescriptor($event, log.user.id)"
|
||||
translate
|
||||
class="value">{{::log.user.name | dashIfEmpty}}
|
||||
</span>
|
||||
</div>
|
||||
<div>
|
||||
<span translate class="label">Model</span><span class="label">: </span>
|
||||
|
@ -38,7 +43,12 @@
|
|||
</div>
|
||||
</vn-td>
|
||||
<vn-td class="expendable">
|
||||
{{::log.user.name}}
|
||||
<span
|
||||
class="link"
|
||||
ng-click="$ctrl.showWorkerDescriptor($event, log.user.id)"
|
||||
translate
|
||||
class="value">{{::log.user.name | dashIfEmpty}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td class="expendable">
|
||||
{{::log.changedModel}}
|
||||
|
@ -82,3 +92,7 @@
|
|||
<vn-pagination model="$ctrl.model"></vn-pagination>
|
||||
</vn-card>
|
||||
</vn-vertical>
|
||||
<vn-worker-descriptor-popover
|
||||
vn-id="workerDescriptor"
|
||||
user-id="$ctrl.selectedWorker">
|
||||
</vn-worker-descriptor-popover>
|
|
@ -0,0 +1,35 @@
|
|||
import ngModule from '../module';
|
||||
import './style.scss';
|
||||
|
||||
export default class Controller {
|
||||
constructor($scope) {
|
||||
this.$ = $scope;
|
||||
this.actionsText = {
|
||||
'insert': 'Creates',
|
||||
'update': 'Updates',
|
||||
'delete': 'Deletes',
|
||||
'select': 'Views'
|
||||
};
|
||||
}
|
||||
|
||||
showWorkerDescriptor(event, userId) {
|
||||
if (event.defaultPrevented) return;
|
||||
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
this.selectedWorker = userId;
|
||||
this.$.workerDescriptor.parent = event.target;
|
||||
this.$.workerDescriptor.show();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope'];
|
||||
|
||||
ngModule.component('vnLog', {
|
||||
controller: Controller,
|
||||
template: require('./index.html'),
|
||||
bindings: {
|
||||
model: '<'
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue