Merge branch 'dev' into 3571-refactor-e2e
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
101be86448
|
@ -9,8 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
-
|
-
|
||||||
|
|
||||||
### Changed
|
### 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`;
|
|
@ -73,6 +73,12 @@ export default class Controller extends Section {
|
||||||
this.vnApp.showSuccess(this.$t('Data saved!'));
|
this.vnApp.showSuccess(this.$t('Data saved!'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
itemSearchFunc($search) {
|
||||||
|
return /^\d+$/.test($search)
|
||||||
|
? {id: $search}
|
||||||
|
: {name: {like: '%' + $search + '%'}};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngModule.vnComponent('vnEntryBuyIndex', {
|
ngModule.vnComponent('vnEntryBuyIndex', {
|
||||||
|
|
|
@ -32,9 +32,6 @@
|
||||||
"Sale": {
|
"Sale": {
|
||||||
"dataSource": "vn"
|
"dataSource": "vn"
|
||||||
},
|
},
|
||||||
"SaleChecked": {
|
|
||||||
"dataSource": "vn"
|
|
||||||
},
|
|
||||||
"SaleCloned": {
|
"SaleCloned": {
|
||||||
"dataSource": "vn"
|
"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",
|
"foreignKey": "ticketFk",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
"isChecked": {
|
|
||||||
"type": "hasOne",
|
|
||||||
"model": "SaleChecked",
|
|
||||||
"foreignKey": "saleFk"
|
|
||||||
},
|
|
||||||
"components": {
|
"components": {
|
||||||
"type": "hasMany",
|
"type": "hasMany",
|
||||||
"model": "SaleComponent",
|
"model": "SaleComponent",
|
||||||
|
@ -80,6 +75,6 @@
|
||||||
"type": "hasOne",
|
"type": "hasOne",
|
||||||
"model": "ItemShelvingSale",
|
"model": "ItemShelvingSale",
|
||||||
"foreignKey": "saleFk"
|
"foreignKey": "saleFk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,6 @@ import './package/index';
|
||||||
import './sale';
|
import './sale';
|
||||||
import './tracking/index';
|
import './tracking/index';
|
||||||
import './tracking/edit';
|
import './tracking/edit';
|
||||||
import './sale-checked';
|
|
||||||
import './services';
|
import './services';
|
||||||
import './component';
|
import './component';
|
||||||
import './sale-tracking';
|
import './sale-tracking';
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
{"state": "ticket.card.expedition", "icon": "icon-package"},
|
{"state": "ticket.card.expedition", "icon": "icon-package"},
|
||||||
{"state": "ticket.card.service", "icon": "icon-services"},
|
{"state": "ticket.card.service", "icon": "icon-services"},
|
||||||
{"state": "ticket.card.package", "icon": "icon-bucket"},
|
{"state": "ticket.card.package", "icon": "icon-bucket"},
|
||||||
{"state": "ticket.card.saleChecked", "icon": "assignment"},
|
|
||||||
{"state": "ticket.card.components", "icon": "icon-components"},
|
{"state": "ticket.card.components", "icon": "icon-components"},
|
||||||
{"state": "ticket.card.saleTracking", "icon": "assignment"},
|
{"state": "ticket.card.saleTracking", "icon": "assignment"},
|
||||||
{"state": "ticket.card.dms.index", "icon": "cloud_download"},
|
{"state": "ticket.card.dms.index", "icon": "cloud_download"},
|
||||||
|
@ -159,15 +158,6 @@
|
||||||
},
|
},
|
||||||
"acl": ["production", "administrative", "salesPerson"]
|
"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",
|
"url" : "/components",
|
||||||
"state": "ticket.card.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