Merge branch 'dev' into 5192-db_export
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
3d8add4d6f
|
@ -101,7 +101,8 @@ module.exports = Self => {
|
||||||
width: bmpData.width,
|
width: bmpData.width,
|
||||||
height: bmpData.height,
|
height: bmpData.height,
|
||||||
channels: 4
|
channels: 4
|
||||||
}
|
},
|
||||||
|
failOn: 'none'
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,25 @@ class Controller extends ModuleCard {
|
||||||
reload() {
|
reload() {
|
||||||
this.$http.get(`Items/${this.$params.id}/getCard`)
|
this.$http.get(`Items/${this.$params.id}/getCard`)
|
||||||
.then(res => this.item = res.data);
|
.then(res => this.item = res.data);
|
||||||
|
|
||||||
|
this.$http.get('ItemConfigs/findOne')
|
||||||
|
.then(res => {
|
||||||
|
if (this.$state.getCurrentPath()[4].state.name === 'item.card.diary') return;
|
||||||
|
this.warehouseFk = res.data.warehouseFk;
|
||||||
|
this.getWarehouseName(res.data.warehouseFk);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getWarehouseName(warehouseFk) {
|
||||||
|
const filter = {
|
||||||
|
where: {id: warehouseFk}
|
||||||
|
};
|
||||||
|
this.$http.get('Warehouses/findOne', {filter})
|
||||||
|
.then(res => {
|
||||||
|
this.warehouseText = this.$t('WarehouseFk', {
|
||||||
|
warehouseName: res.data.name
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,12 +4,15 @@ describe('Item', () => {
|
||||||
describe('Component vnItemCard', () => {
|
describe('Component vnItemCard', () => {
|
||||||
let controller;
|
let controller;
|
||||||
let $httpBackend;
|
let $httpBackend;
|
||||||
|
let $state;
|
||||||
let data = {id: 1, name: 'fooName'};
|
let data = {id: 1, name: 'fooName'};
|
||||||
|
|
||||||
beforeEach(ngModule('item'));
|
beforeEach(ngModule('item'));
|
||||||
|
|
||||||
beforeEach(inject(($componentController, _$httpBackend_, $stateParams) => {
|
beforeEach(inject(($componentController, _$httpBackend_, $stateParams, _$state_) => {
|
||||||
$httpBackend = _$httpBackend_;
|
$httpBackend = _$httpBackend_;
|
||||||
|
$state = _$state_;
|
||||||
|
$state.getCurrentPath = () => [null, null, null, null, {state: {name: 'item.card.diary'}}];
|
||||||
|
|
||||||
let $element = angular.element('<div></div>');
|
let $element = angular.element('<div></div>');
|
||||||
controller = $componentController('vnItemCard', {$element});
|
controller = $componentController('vnItemCard', {$element});
|
||||||
|
@ -19,6 +22,7 @@ describe('Item', () => {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should request data and set it on the controller', () => {
|
it('should request data and set it on the controller', () => {
|
||||||
|
$httpBackend.expect('GET', `ItemConfigs/findOne`).respond({});
|
||||||
controller.reload();
|
controller.reload();
|
||||||
$httpBackend.flush();
|
$httpBackend.flush();
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,10 @@ class Controller extends Section {
|
||||||
|
|
||||||
this.$[descriptor].show(event.target, sale.origin);
|
this.$[descriptor].show(event.target, sale.origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$onDestroy() {
|
||||||
|
this.card.reload();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.$inject = ['$element', '$scope', '$anchorScroll', '$location'];
|
Controller.$inject = ['$element', '$scope', '$anchorScroll', '$location'];
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "salix-back",
|
"name": "salix-back",
|
||||||
"version": "23.02.03",
|
"version": "23.04.01",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "salix-back",
|
"name": "salix-back",
|
||||||
"version": "23.02.03",
|
"version": "23.04.01",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.2.2",
|
"axios": "^1.2.2",
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
"puppeteer": "^18.0.5",
|
"puppeteer": "^18.0.5",
|
||||||
"read-chunk": "^3.2.0",
|
"read-chunk": "^3.2.0",
|
||||||
"require-yaml": "0.0.1",
|
"require-yaml": "0.0.1",
|
||||||
"sharp": "^0.31.2",
|
"sharp": "^0.31.3",
|
||||||
"smbhash": "0.0.1",
|
"smbhash": "0.0.1",
|
||||||
"strong-error-handler": "^2.3.2",
|
"strong-error-handler": "^2.3.2",
|
||||||
"uuid": "^3.3.3",
|
"uuid": "^3.3.3",
|
||||||
|
@ -19715,9 +19715,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/sharp": {
|
"node_modules/sharp": {
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.2.tgz",
|
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.3.tgz",
|
||||||
"integrity": "sha512-DUdNVEXgS5A97cTagSLIIp8dUZ/lZtk78iNVZgHdHbx1qnQR7JAHY0BnXnwwH39Iw+VKhO08CTYhIg0p98vQ5Q==",
|
"integrity": "sha512-XcR4+FCLBFKw1bdB+GEhnUNXNXvnt0tDo4WsBsraKymuo/IAuPuCBVAL2wIkUw2r/dwFW5Q5+g66Kwl2dgDFVg==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"color": "^4.2.3",
|
"color": "^4.2.3",
|
||||||
|
@ -39863,9 +39863,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sharp": {
|
"sharp": {
|
||||||
"version": "0.31.2",
|
"version": "0.31.3",
|
||||||
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.2.tgz",
|
"resolved": "https://registry.npmjs.org/sharp/-/sharp-0.31.3.tgz",
|
||||||
"integrity": "sha512-DUdNVEXgS5A97cTagSLIIp8dUZ/lZtk78iNVZgHdHbx1qnQR7JAHY0BnXnwwH39Iw+VKhO08CTYhIg0p98vQ5Q==",
|
"integrity": "sha512-XcR4+FCLBFKw1bdB+GEhnUNXNXvnt0tDo4WsBsraKymuo/IAuPuCBVAL2wIkUw2r/dwFW5Q5+g66Kwl2dgDFVg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"color": "^4.2.3",
|
"color": "^4.2.3",
|
||||||
"detect-libc": "^2.0.1",
|
"detect-libc": "^2.0.1",
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
"puppeteer": "^18.0.5",
|
"puppeteer": "^18.0.5",
|
||||||
"read-chunk": "^3.2.0",
|
"read-chunk": "^3.2.0",
|
||||||
"require-yaml": "0.0.1",
|
"require-yaml": "0.0.1",
|
||||||
"sharp": "^0.31.2",
|
"sharp": "^0.31.3",
|
||||||
"smbhash": "0.0.1",
|
"smbhash": "0.0.1",
|
||||||
"strong-error-handler": "^2.3.2",
|
"strong-error-handler": "^2.3.2",
|
||||||
"uuid": "^3.3.3",
|
"uuid": "^3.3.3",
|
||||||
|
|
Loading…
Reference in New Issue