Merge pull request 'fixes #4957 saleChecked kkear' (!1231) from 4957-saleChecked-kkear into dev
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
Reviewed-on: #1231 Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
commit
33fbe8cc7b
|
@ -13,4 +13,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Changed
|
||||
|
||||
-
|
||||
- Se ha eliminado la sección "Control clientes" dentro de Ticket
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
DELETE FROM `salix`.`ACL` WHERE model="SaleChecked";
|
||||
DROP TABLE IF EXISTS `vn`.`saleChecked`;
|
|
@ -32,9 +32,6 @@
|
|||
"Sale": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"SaleChecked": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"SaleCloned": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"name": "SaleChecked",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "saleChecked"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"isChecked": {
|
||||
"type": "number"
|
||||
},
|
||||
"saleFk": {
|
||||
"id": true
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"sale": {
|
||||
"type": "belongsTo",
|
||||
"model": "Sale",
|
||||
"foreignKey": "saleFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -56,11 +56,6 @@
|
|||
"foreignKey": "ticketFk",
|
||||
"required": true
|
||||
},
|
||||
"isChecked": {
|
||||
"type": "hasOne",
|
||||
"model": "SaleChecked",
|
||||
"foreignKey": "saleFk"
|
||||
},
|
||||
"components": {
|
||||
"type": "hasMany",
|
||||
"model": "SaleComponent",
|
||||
|
|
|
@ -20,7 +20,6 @@ import './package/index';
|
|||
import './sale';
|
||||
import './tracking/index';
|
||||
import './tracking/edit';
|
||||
import './sale-checked';
|
||||
import './services';
|
||||
import './component';
|
||||
import './sale-tracking';
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
{"state": "ticket.card.expedition", "icon": "icon-package"},
|
||||
{"state": "ticket.card.service", "icon": "icon-services"},
|
||||
{"state": "ticket.card.package", "icon": "icon-bucket"},
|
||||
{"state": "ticket.card.saleChecked", "icon": "assignment"},
|
||||
{"state": "ticket.card.components", "icon": "icon-components"},
|
||||
{"state": "ticket.card.saleTracking", "icon": "assignment"},
|
||||
{"state": "ticket.card.dms.index", "icon": "cloud_download"},
|
||||
|
@ -159,15 +158,6 @@
|
|||
},
|
||||
"acl": ["production", "administrative", "salesPerson"]
|
||||
},
|
||||
{
|
||||
"url" : "/sale-checked",
|
||||
"state": "ticket.card.saleChecked",
|
||||
"component": "vn-ticket-sale-checked",
|
||||
"description": "Sale checked",
|
||||
"params": {
|
||||
"ticket": "$ctrl.ticket"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url" : "/components",
|
||||
"state": "ticket.card.components",
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="sales"
|
||||
filter="::$ctrl.filter"
|
||||
link="{ticketFk: $ctrl.$params.id}"
|
||||
limit="20"
|
||||
data="sales"
|
||||
order="concept ASC"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<vn-data-viewer model="model">
|
||||
<vn-card class="vn-w-lg">
|
||||
<vn-table model="model">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th field="isChecked" center>Is checked</vn-th>
|
||||
<vn-th field="itemFk" number>Item</vn-th>
|
||||
<vn-th field="concept">Description</vn-th>
|
||||
<vn-th field="quantity" number>Quantity</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="sale in sales">
|
||||
<vn-td center shrink>
|
||||
<vn-check
|
||||
vn-one ng-model="sale.isChecked.isChecked"
|
||||
disabled="true">
|
||||
</vn-check>
|
||||
</vn-td>
|
||||
<vn-td number>
|
||||
<span
|
||||
ng-click="$ctrl.showItemDescriptor($event, sale)"
|
||||
class="link">
|
||||
{{::sale.itemFk | zeroFill:6}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td vn-fetched-tags>
|
||||
<div>
|
||||
<vn-one title="{{::sale.item.name}}">{{::sale.item.name}}</vn-one>
|
||||
<vn-one ng-if="::sale.item.subName">
|
||||
<h3 title="{{::sale.item.subName}}">{{::sale.item.subName}}</h3>
|
||||
</vn-one>
|
||||
</div>
|
||||
<vn-fetched-tags
|
||||
max-length="6"
|
||||
item="::sale.item"
|
||||
tabindex="-1">
|
||||
</vn-fetched-tags>
|
||||
</vn-td>
|
||||
<vn-td number>{{::sale.quantity}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-card>
|
||||
</vn-data-viewer>
|
||||
<vn-item-descriptor-popover
|
||||
vn-id="item-descriptor"
|
||||
warehouse-fk="$ctrl.ticket.warehouseFk"
|
||||
ticket-fk="$ctrl.ticket.id">
|
||||
</vn-item-descriptor-popover>
|
|
@ -1,42 +0,0 @@
|
|||
import ngModule from '../module';
|
||||
import Section from 'salix/components/section';
|
||||
|
||||
class Controller extends Section {
|
||||
constructor($element, $) {
|
||||
super($element, $);
|
||||
this.filter = {
|
||||
include: [
|
||||
{
|
||||
relation: 'item'
|
||||
}, {
|
||||
relation: 'isChecked',
|
||||
scope: {
|
||||
fields: ['isChecked']
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
showItemDescriptor(event, sale) {
|
||||
this.quicklinks = {
|
||||
btnThree: {
|
||||
icon: 'icon-transaction',
|
||||
state: `item.card.diary({
|
||||
id: ${sale.itemFk},
|
||||
warehouseFk: ${this.ticket.warehouseFk},
|
||||
lineFk: ${sale.id}
|
||||
})`,
|
||||
tooltip: 'Item diary'
|
||||
}
|
||||
};
|
||||
this.$.itemDescriptor.show(event.target, sale.itemFk);
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.vnComponent('vnTicketSaleChecked', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller,
|
||||
bindings: {
|
||||
ticket: '<'
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue