Merge branch 'dev' into test
gitea/salix/test This commit looks good
Details
gitea/salix/test This commit looks good
Details
This commit is contained in:
commit
29f6b403da
|
@ -32,9 +32,6 @@
|
||||||
"Sip": {
|
"Sip": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
"Route": {
|
|
||||||
"dataSource": "vn"
|
|
||||||
},
|
|
||||||
"Vehicle": {
|
"Vehicle": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Route",
|
|
||||||
"base": "VnModel",
|
|
||||||
"options": {
|
|
||||||
"mysql": {
|
|
||||||
"table": "route"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"properties": {
|
|
||||||
"id": {
|
|
||||||
"type": "Number",
|
|
||||||
"id": true,
|
|
||||||
"description": "Identifier"
|
|
||||||
},
|
|
||||||
"date": {
|
|
||||||
"type": "date"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -26,7 +26,7 @@ class Icon {
|
||||||
Icon.$inject = ['$attrs'];
|
Icon.$inject = ['$attrs'];
|
||||||
|
|
||||||
ngModule.component('vnIcon', {
|
ngModule.component('vnIcon', {
|
||||||
template: '<i class="{{::$ctrl.iconClass}}">{{::$ctrl.iconContent}}</i>',
|
template: '<i class="{{::$ctrl.iconClass}} unselectable">{{::$ctrl.iconContent}}</i>',
|
||||||
controller: Icon,
|
controller: Icon,
|
||||||
bindings: {
|
bindings: {
|
||||||
icon: '@'
|
icon: '@'
|
||||||
|
|
|
@ -2,6 +2,7 @@ vn-icon {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-size: 18pt;
|
font-size: 18pt;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
outline: 0;
|
||||||
|
|
||||||
& > i,
|
& > i,
|
||||||
& > i.material-icons {
|
& > i.material-icons {
|
||||||
|
|
|
@ -23,28 +23,6 @@ export default class Treeview extends Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hasCheckedChilds(node) {
|
|
||||||
if (!node.childs) return false;
|
|
||||||
|
|
||||||
const childs = node.childs;
|
|
||||||
for (let i = 0; i < childs.length; i++) {
|
|
||||||
if (childs[i].selected || this.hasCheckedChilds(childs[i]))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
hasCheckedParents(node) {
|
|
||||||
if (!node.parent) return false;
|
|
||||||
|
|
||||||
const parent = node.parent;
|
|
||||||
if (parent.selected || this.hasCheckedParents(parent))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
} */
|
|
||||||
|
|
||||||
onSelection(item, value) {
|
onSelection(item, value) {
|
||||||
this.emit('selection', {item, value});
|
this.emit('selection', {item, value});
|
||||||
}
|
}
|
||||||
|
@ -67,12 +45,15 @@ export default class Treeview extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
item.childs = newData.sort((a, b) => {
|
item.childs = newData.sort((a, b) => {
|
||||||
let priority = (b.isIncluded - a.isIncluded) - 1;
|
if (b.isIncluded !== a.isIncluded) {
|
||||||
|
if (a.isIncluded == null)
|
||||||
|
return 1;
|
||||||
|
if (b.isIncluded == null)
|
||||||
|
return -1;
|
||||||
|
return b.isIncluded - a.isIncluded;
|
||||||
|
}
|
||||||
|
|
||||||
if (b.name > a.name)
|
return a.name.localeCompare(b.name);
|
||||||
priority++;
|
|
||||||
|
|
||||||
return priority;
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,16 +116,7 @@ module.exports = Self => {
|
||||||
const parentNodes = nodes.filter(element => {
|
const parentNodes = nodes.filter(element => {
|
||||||
return element.depth === minorDepth;
|
return element.depth === minorDepth;
|
||||||
});
|
});
|
||||||
|
const leaves = Object.assign([], sortNodes(parentNodes));
|
||||||
const sortedLeaves = parentNodes.sort((a, b) => {
|
|
||||||
let priority = (b.isIncluded - a.isIncluded) - 1;
|
|
||||||
|
|
||||||
if (b.name > a.name)
|
|
||||||
priority++;
|
|
||||||
|
|
||||||
return priority;
|
|
||||||
});
|
|
||||||
const leaves = Object.assign([], sortedLeaves);
|
|
||||||
|
|
||||||
nestLeaves(leaves);
|
nestLeaves(leaves);
|
||||||
|
|
||||||
|
@ -143,9 +134,23 @@ module.exports = Self => {
|
||||||
&& element.depth === parent.depth + 1;
|
&& element.depth === parent.depth + 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
return elements;
|
return sortNodes(elements);
|
||||||
}
|
}
|
||||||
|
|
||||||
return leaves;
|
return leaves;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function sortNodes(nodes) {
|
||||||
|
return nodes.sort((a, b) => {
|
||||||
|
if (b.isIncluded !== a.isIncluded) {
|
||||||
|
if (a.isIncluded == null)
|
||||||
|
return 1;
|
||||||
|
if (b.isIncluded == null)
|
||||||
|
return -1;
|
||||||
|
return b.isIncluded - a.isIncluded;
|
||||||
|
}
|
||||||
|
|
||||||
|
return a.name.localeCompare(b.name);
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,7 +4,7 @@ Social name: Razón social
|
||||||
Phone: Teléfono
|
Phone: Teléfono
|
||||||
Mobile: Móvil
|
Mobile: Móvil
|
||||||
Fax: Fax
|
Fax: Fax
|
||||||
Email: Correo electrónico
|
Email: E-mail
|
||||||
Salesperson: Comercial
|
Salesperson: Comercial
|
||||||
Channel: Canal
|
Channel: Canal
|
||||||
You can save multiple emails: >-
|
You can save multiple emails: >-
|
||||||
|
|
|
@ -2,7 +2,7 @@ Name: Nombre
|
||||||
Tax number: NIF/CIF
|
Tax number: NIF/CIF
|
||||||
Business name: Razón social
|
Business name: Razón social
|
||||||
Web user: Usuario Web
|
Web user: Usuario Web
|
||||||
Email: Correo electrónico
|
Email: E-mail
|
||||||
Create and edit: Crear y editar
|
Create and edit: Crear y editar
|
||||||
You can save multiple emails: >-
|
You can save multiple emails: >-
|
||||||
Puede guardar varios correos electrónicos encadenándolos mediante comas
|
Puede guardar varios correos electrónicos encadenándolos mediante comas
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Client id: Id cliente
|
Client id: Id cliente
|
||||||
Phone: Teléfono
|
Phone: Teléfono
|
||||||
Town/City: Ciudad
|
Town/City: Ciudad
|
||||||
Email: Correo electrónico
|
Email: E-mail
|
||||||
View client: Ver cliente
|
View client: Ver cliente
|
|
@ -4,5 +4,5 @@ Name: Nombre
|
||||||
Social name: Razon social
|
Social name: Razon social
|
||||||
Town/City: Ciudad
|
Town/City: Ciudad
|
||||||
Postcode: Código postal
|
Postcode: Código postal
|
||||||
Email: Correo electrónico
|
Email: E-mail
|
||||||
Phone: Teléfono
|
Phone: Teléfono
|
|
@ -36,15 +36,21 @@
|
||||||
<vn-td number>
|
<vn-td number>
|
||||||
<span ng-click="$ctrl.showDescriptor($event, row.itemFk)"
|
<span ng-click="$ctrl.showDescriptor($event, row.itemFk)"
|
||||||
class="link">
|
class="link">
|
||||||
{{row.itemFk | zeroFill:6}}
|
{{::row.itemFk | zeroFill:6}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td expand><vn-fetched-tags max-length="6" item="row.item"/></vn-td>
|
<vn-td expand>
|
||||||
<vn-td>{{row.warehouse.name}}</vn-td>
|
<vn-fetched-tags
|
||||||
<vn-td>{{row.shipped | date: 'dd/MM/yyyy'}}</vn-td>
|
max-length="6"
|
||||||
<vn-td number>{{row.quantity}}</vn-td>
|
item="::row.item"
|
||||||
|
title="::row.item.name">
|
||||||
|
</vn-fetched-tags>
|
||||||
|
</vn-td>
|
||||||
|
<vn-td>{{::row.warehouse.name}}</vn-td>
|
||||||
|
<vn-td>{{::row.shipped | date: 'dd/MM/yyyy'}}</vn-td>
|
||||||
|
<vn-td number>{{::row.quantity}}</vn-td>
|
||||||
<vn-td number>
|
<vn-td number>
|
||||||
{{row.price | currency: 'EUR':2}}
|
{{::row.price | currency: 'EUR':2}}
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td shrink ng-if="!$ctrl.order.isConfirmed">
|
<vn-td shrink ng-if="!$ctrl.order.isConfirmed">
|
||||||
<vn-icon-button
|
<vn-icon-button
|
||||||
|
|
|
@ -65,10 +65,16 @@
|
||||||
<span
|
<span
|
||||||
ng-click="$ctrl.showDescriptor($event, row.itemFk)"
|
ng-click="$ctrl.showDescriptor($event, row.itemFk)"
|
||||||
class="link">
|
class="link">
|
||||||
{{row.itemFk | zeroFill:6}}
|
{{::row.itemFk | zeroFill:6}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td expand><vn-fetched-tags max-length="6" item="row.item"/></vn-td>
|
<vn-td expand>
|
||||||
|
<vn-fetched-tags
|
||||||
|
max-length="6"
|
||||||
|
item="::row.item"
|
||||||
|
title="::row.item.name">
|
||||||
|
</vn-fetched-tags>
|
||||||
|
</vn-td>
|
||||||
<vn-td number>{{::row.quantity}}</vn-td>
|
<vn-td number>{{::row.quantity}}</vn-td>
|
||||||
<vn-td number>{{::row.price | currency: 'EUR':2}}</vn-td>
|
<vn-td number>{{::row.price | currency: 'EUR':2}}</vn-td>
|
||||||
<vn-td number>{{::row.quantity * row.price | currency: 'EUR':2}}</vn-td>
|
<vn-td number>{{::row.quantity * row.price | currency: 'EUR':2}}</vn-td>
|
||||||
|
|
|
@ -38,7 +38,13 @@
|
||||||
{{::row.itemFk}}
|
{{::row.itemFk}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td><vn-fetched-tags max-length="6" item="row.item"/></vn-td>
|
<vn-td expand>
|
||||||
|
<vn-fetched-tags
|
||||||
|
max-length="6"
|
||||||
|
item="::row.item"
|
||||||
|
title="::row.item.name">
|
||||||
|
</vn-fetched-tags>
|
||||||
|
</vn-td>
|
||||||
<vn-td number>{{::row.quantity}}</vn-td>
|
<vn-td number>{{::row.quantity}}</vn-td>
|
||||||
<vn-td number>{{::row.volume | number:3}}</vn-td>
|
<vn-td number>{{::row.volume | number:3}}</vn-td>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
|
|
|
@ -48,7 +48,11 @@
|
||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="{{::sale.components.length + 1}}">
|
<td rowspan="{{::sale.components.length + 1}}">
|
||||||
<vn-fetched-tags max-length="6" item="sale.item"/>
|
<vn-fetched-tags
|
||||||
|
max-length="6"
|
||||||
|
item="::sale.item"
|
||||||
|
title="::sale.concept">
|
||||||
|
</vn-fetched-tags>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan="{{::sale.components.length + 1}}" number>
|
<td rowspan="{{::sale.components.length + 1}}" number>
|
||||||
{{::sale.quantity}}
|
{{::sale.quantity}}
|
||||||
|
|
|
@ -15,7 +15,13 @@
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr ng-repeat="sale in $ctrl.ticket.sale.items track by sale.id">
|
<tr ng-repeat="sale in $ctrl.ticket.sale.items track by sale.id">
|
||||||
<td number>{{("000000"+sale.itemFk).slice(-6)}}</td>
|
<td number>{{("000000"+sale.itemFk).slice(-6)}}</td>
|
||||||
<td><vn-fetched-tags max-length="6" item="sale.item"/></td>
|
<td expand>
|
||||||
|
<vn-fetched-tags
|
||||||
|
max-length="6"
|
||||||
|
item="::sale.item"
|
||||||
|
title="::sale.concept">
|
||||||
|
</vn-fetched-tags>
|
||||||
|
</td>
|
||||||
<td number>{{::sale.quantity}}</td>
|
<td number>{{::sale.quantity}}</td>
|
||||||
<td number>{{::sale.price | currency: 'EUR': 2}}</td>
|
<td number>{{::sale.price | currency: 'EUR': 2}}</td>
|
||||||
<td number>{{::sale.component.newPrice | currency: 'EUR': 2}}</td>
|
<td number>{{::sale.component.newPrice | currency: 'EUR': 2}}</td>
|
||||||
|
|
|
@ -30,10 +30,16 @@
|
||||||
<span
|
<span
|
||||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)"
|
ng-click="$ctrl.showDescriptor($event, sale.itemFk)"
|
||||||
class="link">
|
class="link">
|
||||||
{{sale.itemFk | zeroFill:6}}
|
{{::sale.itemFk | zeroFill:6}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td><vn-fetched-tags max-length="6" item="sale.item"/></vn-td>
|
<vn-td expand>
|
||||||
|
<vn-fetched-tags
|
||||||
|
max-length="6"
|
||||||
|
item="::sale.item"
|
||||||
|
title="::sale.concept">
|
||||||
|
</vn-fetched-tags>
|
||||||
|
</vn-td>
|
||||||
<vn-td number>{{::sale.quantity}}</vn-td>
|
<vn-td number>{{::sale.quantity}}</vn-td>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
</vn-tbody>
|
</vn-tbody>
|
||||||
|
|
|
@ -37,7 +37,13 @@
|
||||||
{{sale.itemFk | zeroFill:6}}
|
{{sale.itemFk | zeroFill:6}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td><vn-fetched-tags max-length="6" item="sale.item"/></vn-td>
|
<vn-td expand>
|
||||||
|
<vn-fetched-tags
|
||||||
|
max-length="6"
|
||||||
|
item="::sale.item"
|
||||||
|
title="::sale.concept">
|
||||||
|
</vn-fetched-tags>
|
||||||
|
</vn-td>
|
||||||
<vn-td>{{::sale.quantity}}</vn-td>
|
<vn-td>{{::sale.quantity}}</vn-td>
|
||||||
<vn-td>{{::sale.originalQuantity}}</vn-td>
|
<vn-td>{{::sale.originalQuantity}}</vn-td>
|
||||||
<vn-td expand>
|
<vn-td expand>
|
||||||
|
|
|
@ -108,7 +108,11 @@
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td expand>
|
<vn-td expand>
|
||||||
<vn-fetched-tags max-length="6" item="sale.tags" title="sale.concept"/>
|
<vn-fetched-tags
|
||||||
|
max-length="6"
|
||||||
|
item="::sale.tags"
|
||||||
|
title="::sale.concept">
|
||||||
|
</vn-fetched-tags>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td ng-if="!$ctrl.isEditable" number>{{sale.quantity}}</vn-td>
|
<vn-td ng-if="!$ctrl.isEditable" number>{{sale.quantity}}</vn-td>
|
||||||
<vn-td ng-if="$ctrl.isEditable" number>
|
<vn-td ng-if="$ctrl.isEditable" number>
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
{{sale.itemFk | zeroFill:6}}
|
{{sale.itemFk | zeroFill:6}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td expand><vn-fetched-tags max-length="6" item="sale.item"/></vn-td>
|
<vn-td expand><vn-fetched-tags max-length="6" item="::sale.item" title="::sale.concept"/></vn-td>
|
||||||
<vn-td number>{{::sale.quantity}}</vn-td>
|
<vn-td number>{{::sale.quantity}}</vn-td>
|
||||||
<vn-td number>{{::sale.volume.m3 | number:3}}</vn-td>
|
<vn-td number>{{::sale.volume.m3 | number:3}}</vn-td>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
|
|
Loading…
Reference in New Issue