Merge branch 'dev' of https://git.verdnatura.es/salix into dev

This commit is contained in:
gerard 2018-05-17 13:19:44 +02:00
commit 595d878f93
19 changed files with 44 additions and 21 deletions

View File

@ -196,7 +196,7 @@ export default class DropDown extends Component {
}
let where = {};
where[this.showField] = {regexp: search};
where[this.showField] = {like: `%${search}%`};
return where;
}

View File

@ -54,7 +54,7 @@
"description": "Tax",
"icon": "icon-tax"
},
"acl": ["administrative","salesAssistant"]
"acl": ["administrative","buyer"]
}, {
"url" : "/history",
"state": "item.card.history",

View File

@ -51,6 +51,7 @@
field="$ctrl.item.expenceFk"
initial-data="$ctrl.item.expence">
</vn-autocomplete>
<vn-textfield vn-one label="Reference" field="$ctrl.item.description"></vn-textfield>
</vn-horizontal>
</vn-card>
<vn-button-bar>

View File

@ -0,0 +1 @@
Reference: Referencia

View File

@ -1,4 +1,4 @@
{
/* {
"module": "locator",
"name": "Locator",
"icon": "add_location",
@ -11,4 +11,4 @@
"acl": ["developer"]
}
]
}
} */

View File

@ -2,9 +2,9 @@ auth: []
client: []
core: []
item: []
locator: []
production: []
#locator: []
#production: []
salix: []
route: []
#route: []
ticket: [item]
order: []

View File

@ -1,4 +1,4 @@
{
/* {
"module": "production",
"name": "Production",
"icon": "local_florist",
@ -11,4 +11,4 @@
"acl": ["developer"]
}
]
}
} */

View File

@ -1,4 +1,4 @@
{
/* {
"module": "route",
"name": "Routes",
"icon" : "local_shipping",
@ -65,4 +65,4 @@
}
}
]
}
} */

View File

@ -3,20 +3,21 @@
<vn-title>Basic data</vn-title>
<vn-horizontal>
<vn-autocomplete vn-one
vn-id="client"
url="/api/Clients"
label="Client"
show-field="name"
value-field="id"
field="$ctrl.ticket.clientFk"
initial-data="$ctrl.ticket.clientFk">
initial-data="$ctrl.ticket.clientFk"
on-change="$ctrl.onChange()">
</vn-autocomplete>
<vn-autocomplete vn-one
url="/api/Addresses"
url="{{$ctrl.getAddresses()}}"
label="Address"
show-field="nickname"
value-field="id"
field="$ctrl.ticket.addressFk"
initial-data="$ctrl.ticket.addressFk">
value-field="id"
field="$ctrl.ticket.addressFk">
</vn-autocomplete>
<vn-autocomplete vn-one
url="/api/AgencyModes"

View File

@ -1,9 +1,10 @@
import ngModule from '../../module';
class Controller {
constructor($scope, $http, $translate, vnApp) {
constructor($scope, $http, $element, $translate, vnApp) {
this.$scope = $scope;
this.$http = $http;
this.$element = $element;
this.$translate = $translate;
this.vnApp = vnApp;
}
@ -12,6 +13,16 @@ class Controller {
this.data.registerChild(this);
}
onChange() {
if(this.ticket)
this.ticket.addressFk = null;
}
getAddresses() {
if (this.ticket)
return `/api/Clients/${this.ticket.clientFk}/addresses`;
}
async onStepChange(state) {
if (this.isFormInvalid())
return this.vnApp.showError(
@ -44,7 +55,7 @@ class Controller {
}
}
Controller.$inject = ['$scope', '$http', '$translate', 'vnApp'];
Controller.$inject = ['$scope', '$http', '$element', '$translate', 'vnApp'];
ngModule.component('vnTicketDataStepOne', {
template: require('./step-one.html'),

View File

@ -234,7 +234,7 @@ export default {
itemBarcodes: {
barcodeButton: `${components.vnMenuItem}[ui-sref="item.card.itemBarcode"]`,
addBarcodeButton: `${components.vnIcon}[icon="add_circle"]`,
thirdCodeInput: `vn-horizontal:nth-child(4) > ${components.vnTextfield}`,
thirdCodeInput: `vn-item-barcode vn-horizontal:nth-child(4) > ${components.vnTextfield}`,
submitBarcodesButton: `${components.vnSubmit}`,
firstCodeRemoveButton: `vn-horizontal:nth-child(2) > ${components.vnIcon}[icon="remove_circle_outline"]`
},

View File

@ -0,0 +1,5 @@
UPDATE `salix`.`ACL` SET `accessType`='READ' WHERE `id`='20';
UPDATE `salix`.`ACL` SET `principalId`='production' WHERE `id`='67';
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('78', 'TicketTracking', '*', 'WRITE', 'ALLOW', 'ROLE', 'production');
INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `permission`, `principalType`, `principalId`) VALUES ('79', 'TicketTracking', 'changeState', 'ALLOW', 'ROLE', 'employe');

View File

@ -37,6 +37,7 @@ module.exports = Self => {
delete copy.id;
delete copy.itemTag;
delete copy.description;
let newItem = await Self.create(copy);
let promises = [];

View File

@ -12,7 +12,8 @@
"nodemailer": "^4.0.1",
"path": "^0.12.7",
"request": "^2.83.0",
"require-yaml": "0.0.1"
"require-yaml": "0.0.1",
"fs-extra": "^5.0.0"
},
"repository": {
"type": "git",

View File

@ -10,7 +10,9 @@
"inline-css": "^2.2.2",
"mustache": "^2.3.0",
"mysql": "^2.13.0",
"path": "^0.12.7"
"path": "^0.12.7",
"require-yaml": "0.0.1",
"fs-extra": "^5.0.0"
},
"repository": {
"type": "git",