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": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Route": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Vehicle": {
|
||||
"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'];
|
||||
|
||||
ngModule.component('vnIcon', {
|
||||
template: '<i class="{{::$ctrl.iconClass}}">{{::$ctrl.iconContent}}</i>',
|
||||
template: '<i class="{{::$ctrl.iconClass}} unselectable">{{::$ctrl.iconContent}}</i>',
|
||||
controller: Icon,
|
||||
bindings: {
|
||||
icon: '@'
|
||||
|
|
|
@ -2,6 +2,7 @@ vn-icon {
|
|||
display: inline-block;
|
||||
font-size: 18pt;
|
||||
text-align: center;
|
||||
outline: 0;
|
||||
|
||||
& > i,
|
||||
& > 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) {
|
||||
this.emit('selection', {item, value});
|
||||
}
|
||||
|
@ -67,12 +45,15 @@ export default class Treeview extends Component {
|
|||
}
|
||||
|
||||
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)
|
||||
priority++;
|
||||
|
||||
return priority;
|
||||
return a.name.localeCompare(b.name);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -116,16 +116,7 @@ module.exports = Self => {
|
|||
const parentNodes = nodes.filter(element => {
|
||||
return element.depth === minorDepth;
|
||||
});
|
||||
|
||||
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);
|
||||
const leaves = Object.assign([], sortNodes(parentNodes));
|
||||
|
||||
nestLeaves(leaves);
|
||||
|
||||
|
@ -143,9 +134,23 @@ module.exports = Self => {
|
|||
&& element.depth === parent.depth + 1;
|
||||
});
|
||||
|
||||
return elements;
|
||||
return sortNodes(elements);
|
||||
}
|
||||
|
||||
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
|
||||
Mobile: Móvil
|
||||
Fax: Fax
|
||||
Email: Correo electrónico
|
||||
Email: E-mail
|
||||
Salesperson: Comercial
|
||||
Channel: Canal
|
||||
You can save multiple emails: >-
|
||||
|
|
|
@ -2,7 +2,7 @@ Name: Nombre
|
|||
Tax number: NIF/CIF
|
||||
Business name: Razón social
|
||||
Web user: Usuario Web
|
||||
Email: Correo electrónico
|
||||
Email: E-mail
|
||||
Create and edit: Crear y editar
|
||||
You can save multiple emails: >-
|
||||
Puede guardar varios correos electrónicos encadenándolos mediante comas
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Client id: Id cliente
|
||||
Phone: Teléfono
|
||||
Town/City: Ciudad
|
||||
Email: Correo electrónico
|
||||
Email: E-mail
|
||||
View client: Ver cliente
|
|
@ -4,5 +4,5 @@ Name: Nombre
|
|||
Social name: Razon social
|
||||
Town/City: Ciudad
|
||||
Postcode: Código postal
|
||||
Email: Correo electrónico
|
||||
Email: E-mail
|
||||
Phone: Teléfono
|
|
@ -36,15 +36,21 @@
|
|||
<vn-td number>
|
||||
<span ng-click="$ctrl.showDescriptor($event, row.itemFk)"
|
||||
class="link">
|
||||
{{row.itemFk | zeroFill:6}}
|
||||
{{::row.itemFk | zeroFill:6}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td expand><vn-fetched-tags max-length="6" item="row.item"/></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 expand>
|
||||
<vn-fetched-tags
|
||||
max-length="6"
|
||||
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>
|
||||
{{row.price | currency: 'EUR':2}}
|
||||
{{::row.price | currency: 'EUR':2}}
|
||||
</vn-td>
|
||||
<vn-td shrink ng-if="!$ctrl.order.isConfirmed">
|
||||
<vn-icon-button
|
||||
|
|
|
@ -65,10 +65,16 @@
|
|||
<span
|
||||
ng-click="$ctrl.showDescriptor($event, row.itemFk)"
|
||||
class="link">
|
||||
{{row.itemFk | zeroFill:6}}
|
||||
{{::row.itemFk | zeroFill:6}}
|
||||
</span>
|
||||
</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.price | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td number>{{::row.quantity * row.price | currency: 'EUR':2}}</vn-td>
|
||||
|
|
|
@ -38,7 +38,13 @@
|
|||
{{::row.itemFk}}
|
||||
</span>
|
||||
</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.volume | number:3}}</vn-td>
|
||||
</vn-tr>
|
||||
|
|
|
@ -48,7 +48,11 @@
|
|||
</span>
|
||||
</td>
|
||||
<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 rowspan="{{::sale.components.length + 1}}" number>
|
||||
{{::sale.quantity}}
|
||||
|
|
|
@ -15,7 +15,13 @@
|
|||
<tbody>
|
||||
<tr ng-repeat="sale in $ctrl.ticket.sale.items track by sale.id">
|
||||
<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.price | currency: 'EUR': 2}}</td>
|
||||
<td number>{{::sale.component.newPrice | currency: 'EUR': 2}}</td>
|
||||
|
|
|
@ -30,10 +30,16 @@
|
|||
<span
|
||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)"
|
||||
class="link">
|
||||
{{sale.itemFk | zeroFill:6}}
|
||||
{{::sale.itemFk | zeroFill:6}}
|
||||
</span>
|
||||
</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-tr>
|
||||
</vn-tbody>
|
||||
|
|
|
@ -37,7 +37,13 @@
|
|||
{{sale.itemFk | zeroFill:6}}
|
||||
</span>
|
||||
</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.originalQuantity}}</vn-td>
|
||||
<vn-td expand>
|
||||
|
|
|
@ -108,7 +108,11 @@
|
|||
</span>
|
||||
</vn-td>
|
||||
<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 ng-if="!$ctrl.isEditable" number>{{sale.quantity}}</vn-td>
|
||||
<vn-td ng-if="$ctrl.isEditable" number>
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
{{sale.itemFk | zeroFill:6}}
|
||||
</span>
|
||||
</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.volume.m3 | number:3}}</vn-td>
|
||||
</vn-tr>
|
||||
|
|
Loading…
Reference in New Issue