Merge branch 'jgallego' into dev

This commit is contained in:
Gerard 2019-02-15 13:42:42 +01:00
commit a806a26042
22 changed files with 32 additions and 65 deletions

View File

@ -107,9 +107,6 @@
</vn-td> </vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="$ctrl.salesToClaim.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-horizontal> </vn-horizontal>
</tpl-body> </tpl-body>

View File

@ -23,9 +23,6 @@
<vn-td>{{::insurance.created | date: 'dd/MM/yyyy'}}</vn-td> <vn-td>{{::insurance.created | date: 'dd/MM/yyyy'}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-vertical> </vn-vertical>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -37,9 +37,6 @@
<vn-td>{{::greuge.greugeType.name}}</vn-td> <vn-td>{{::greuge.greugeType.name}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-vertical> </vn-vertical>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -86,9 +86,6 @@
</vn-td> </vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-vertical> </vn-vertical>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -28,9 +28,6 @@
<vn-td>{{::sample.company.code}}</vn-td> <vn-td>{{::sample.company.code}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-vertical> </vn-vertical>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -47,9 +47,6 @@
</vn-td> </vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-vertical> </vn-vertical>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -26,9 +26,6 @@
<vn-td>{{::itemLog.creationDate | date:'dd/MM/yyyy HH:mm'}}</vn-td> <vn-td>{{::itemLog.creationDate | date:'dd/MM/yyyy HH:mm'}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-vertical> </vn-vertical>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -85,9 +85,6 @@
</vn-td> </vn-td>
</a> </a>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="items.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
<vn-card margin-medium-v> <vn-card margin-medium-v>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -15,7 +15,7 @@ describe('order addToOrder()', () => {
orderFk: 20, orderFk: 20,
items: [{ items: [{
itemFk: 1, itemFk: 1,
quantity: 1, quantity: 10,
warehouseFk: 1 warehouseFk: 1
}] }]
}; };

View File

@ -37,9 +37,9 @@ module.exports = Self => {
let validUpdateParams = [ let validUpdateParams = [
'clientFk', 'clientFk',
'address_id', 'addressFk',
'landed', 'landed',
'agency_id', 'agencyModeFk',
'note', 'note',
]; ];

View File

@ -26,6 +26,20 @@
"columnName": "customer_id" "columnName": "customer_id"
} }
}, },
"addressFk": {
"type": "Number",
"required": true,
"mysql": {
"columnName": "address_id"
}
},
"agencyModeFk": {
"type": "Number",
"required": true,
"mysql": {
"columnName": "agency_id"
}
},
"companyFk": { "companyFk": {
"type": "Number", "type": "Number",
"required": true, "required": true,
@ -75,7 +89,6 @@
}, },
"address": { "address": {
"type": "belongsTo", "type": "belongsTo",
"required": true,
"model": "Address", "model": "Address",
"foreignKey": "address_id" "foreignKey": "address_id"
}, },

View File

@ -34,7 +34,7 @@
search-function="{or: [{id: $search}, {nickname: {like: '%'+$search+'%'}}]}" search-function="{or: [{id: $search}, {nickname: {like: '%'+$search+'%'}}]}"
show-field="nickname" show-field="nickname"
value-field="id" value-field="id"
field="$ctrl.order.address_id"> field="$ctrl.order.addressFk">
<tpl-item>{{::nickname}}</tpl-item> <tpl-item>{{::nickname}}</tpl-item>
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>
@ -52,7 +52,7 @@
search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}" search-function="{or: [{id: $search}, {name: {like: '%'+$search+'%'}}]}"
show-field="name" show-field="name"
value-field="id" value-field="id"
field="$ctrl.order.agency_id"> field="$ctrl.order.agencyModeFk">
<tpl-item>{{::id}}: {{::name}}</tpl-item> <tpl-item>{{::id}}: {{::name}}</tpl-item>
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>

View File

@ -9,12 +9,12 @@ class Controller {
$scope.addressModel.where = {clientFk: newValue.id}; $scope.addressModel.where = {clientFk: newValue.id};
$scope.addressModel.refresh(); $scope.addressModel.refresh();
if (isDirty) if (isDirty)
this.order.address_id = newValue.defaultAddressFk; this.order.addressFk = newValue.defaultAddressFk;
isDirty = true; isDirty = true;
} else { } else {
$scope.addressModel.clear(); $scope.addressModel.clear();
if (isDirty) if (isDirty)
this.order.address_id = null; this.order.addressFk = null;
} }
}); });
} }

View File

@ -16,7 +16,7 @@ describe('Order', () => {
.respond([{id: 2, nickname: 'address 2'}]); .respond([{id: 2, nickname: 'address 2'}]);
$httpBackend.whenGET(/^\/api\/Clients/) $httpBackend.whenGET(/^\/api\/Clients/)
.respond([{id: 1, defaultAddressFk: 1}]); .respond([{id: 1, defaultAddressFk: 1}]);
$scope.order = {clientFk: 1, address_id: 1}; $scope.order = {clientFk: 1, addressFk: 1};
let $element = $compile('<vn-order-basic-data order="order"></vn-order-basic-data>')($scope); let $element = $compile('<vn-order-basic-data order="order"></vn-order-basic-data>')($scope);
$httpBackend.flush(); $httpBackend.flush();
@ -28,7 +28,7 @@ describe('Order', () => {
controller.selection = {id: 2, defaultAddressFk: 2}; controller.selection = {id: 2, defaultAddressFk: 2};
$scope.$digest(); $scope.$digest();
expect(controller.order.address_id).toEqual(2); expect(controller.order.addressFk).toEqual(2);
}); });
}); });
}); });

View File

@ -60,9 +60,6 @@
</vn-td> </vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
<vn-empty-rows ng-if="model.data === null" translate> <vn-empty-rows ng-if="model.data === null" translate>
Enter a new search Enter a new search
</vn-empty-rows> </vn-empty-rows>

View File

@ -43,9 +43,6 @@
<vn-td number>{{::row.volume | number:3}}</vn-td> <vn-td number>{{::row.volume | number:3}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-vertical> </vn-vertical>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -37,9 +37,6 @@
<vn-td number>{{::sale.quantity}}</vn-td> <vn-td number>{{::sale.quantity}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-vertical> </vn-vertical>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -48,9 +48,6 @@
<vn-td>{{::sale.created | date: 'dd/MM/yyyy HH:mm'}}</vn-td> <vn-td>{{::sale.created | date: 'dd/MM/yyyy HH:mm'}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-vertical> </vn-vertical>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -26,9 +26,6 @@
<vn-td>{{::tracking.created | date:'dd/MM/yyyy HH:mm'}}</vn-td> <vn-td>{{::tracking.created | date:'dd/MM/yyyy HH:mm'}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-vertical> </vn-vertical>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -56,9 +56,6 @@
</vn-td> </vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table> </vn-table>
</vn-card> </vn-card>
<vn-pagination model="model"></vn-pagination> <vn-pagination model="model"></vn-pagination>

View File

@ -48,10 +48,6 @@
</vn-horizontal> </vn-horizontal>
</vn-horizontal> </vn-horizontal>
</a> </a>
<vn-empty-rows class="vn-list-item" style="text-align: center"
ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
<vn-empty-rows class="vn-list-item" style="text-align: center" <vn-empty-rows class="vn-list-item" style="text-align: center"
ng-if="model.data === null" translate> ng-if="model.data === null" translate>
Enter a new search Enter a new search

18
package-lock.json generated
View File

@ -3762,7 +3762,7 @@
"dot-prop": { "dot-prop": {
"version": "4.2.0", "version": "4.2.0",
"resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz",
"integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", "integrity": "sha1-HxngwuGqDjJ5fEl5nyg3rGr2nFc=",
"dev": true, "dev": true,
"requires": { "requires": {
"is-obj": "^1.0.0" "is-obj": "^1.0.0"
@ -3935,7 +3935,7 @@
}, },
"jsonfile": { "jsonfile": {
"version": "2.4.0", "version": "2.4.0",
"resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -7863,7 +7863,7 @@
"karma-chrome-launcher": { "karma-chrome-launcher": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz", "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-2.2.0.tgz",
"integrity": "sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w==", "integrity": "sha1-zxudBxNswY/iOTJ9JGVMPbw2is8=",
"dev": true, "dev": true,
"requires": { "requires": {
"fs-access": "^1.0.0", "fs-access": "^1.0.0",
@ -9671,7 +9671,7 @@
"dependencies": { "dependencies": {
"commander": { "commander": {
"version": "1.0.4", "version": "1.0.4",
"resolved": "http://registry.npmjs.org/commander/-/commander-1.0.4.tgz", "resolved": "https://registry.npmjs.org/commander/-/commander-1.0.4.tgz",
"integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=", "integrity": "sha1-Xt6xruI8T7VBprcNaSq+8ZZpotM=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -11638,7 +11638,7 @@
}, },
"readable-stream": { "readable-stream": {
"version": "1.1.14", "version": "1.1.14",
"resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -11650,7 +11650,7 @@
}, },
"string_decoder": { "string_decoder": {
"version": "0.10.31", "version": "0.10.31",
"resolved": "http://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
"dev": true "dev": true
}, },
@ -12901,7 +12901,7 @@
}, },
"string-width": { "string-width": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "http://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"dev": true, "dev": true,
"requires": { "requires": {
@ -14368,7 +14368,7 @@
"touch": { "touch": {
"version": "3.1.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz",
"integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", "integrity": "sha1-/jZfX3XsntTlaCXgu3bSSrdK+Ds=",
"dev": true, "dev": true,
"requires": { "requires": {
"nopt": "~1.0.10" "nopt": "~1.0.10"
@ -15966,7 +15966,7 @@
"write-file-atomic": { "write-file-atomic": {
"version": "2.3.0", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz",
"integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", "integrity": "sha1-H/YVdcLipOjlENb6TiQ8zhg5mas=",
"dev": true, "dev": true,
"requires": { "requires": {
"graceful-fs": "^4.1.11", "graceful-fs": "^4.1.11",