Merge branch 'dev' into 2678-Delete_description_on_travel_thermograph
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2021-01-19 08:51:38 +00:00
commit b99ac2c9d5
6 changed files with 14 additions and 2 deletions

View File

@ -119,6 +119,7 @@ module.exports = Self => {
ori.code AS origin, ori.code AS origin,
ic.name AS category, ic.name AS category,
i.density, i.density,
i.stemMultiplier,
b.grouping, b.grouping,
b.packing, b.packing,
itn.code AS niche, @visibleCalc itn.code AS niche, @visibleCalc

View File

@ -65,7 +65,10 @@
"type": "Number", "type": "Number",
"description": "Density" "description": "Density"
}, },
"image": { "stemMultiplier": {
"type": "Number",
"description": "Multiplier"
},"image": {
"type": "String", "type": "String",
"description": "Image" "description": "Image"
}, },

View File

@ -25,6 +25,7 @@
<vn-th field="origin" shrink>Origin</vn-th> <vn-th field="origin" shrink>Origin</vn-th>
<vn-th field="salesperson" shrink>Buyer</vn-th> <vn-th field="salesperson" shrink>Buyer</vn-th>
<vn-th field="density" shrink>Density</vn-th> <vn-th field="density" shrink>Density</vn-th>
<vn-th field="stemMultiplier" shrink>Multiplier</vn-th>
<vn-th field="active" shrink>Active</vn-th> <vn-th field="active" shrink>Active</vn-th>
<vn-th></vn-th> <vn-th></vn-th>
</vn-tr> </vn-tr>
@ -78,6 +79,7 @@
</span> </span>
</vn-td> </vn-td>
<vn-td shrink>{{::item.density}}</vn-td> <vn-td shrink>{{::item.density}}</vn-td>
<vn-td shrink >{{::item.stemMultiplier}}</vn-td>
<vn-td shrink> <vn-td shrink>
<vn-check <vn-check
disabled="true" disabled="true"

View File

@ -6,6 +6,7 @@
auto-load="true"> auto-load="true">
</vn-crud-model> </vn-crud-model>
<vn-crud-model <vn-crud-model
vn-id="typesModel"
auto-load="true" auto-load="true"
url="TicketServiceTypes" url="TicketServiceTypes"
data="ticketServiceTypes" data="ticketServiceTypes"

View File

@ -35,6 +35,10 @@ class Controller extends Section {
throw new UserError(`Name can't be empty`); throw new UserError(`Name can't be empty`);
return this.$http.post(`TicketServiceTypes`, this.$.newServiceType) return this.$http.post(`TicketServiceTypes`, this.$.newServiceType)
.then(res => {
this.$.typesModel.refresh();
return res;
})
.then(res => service.ticketServiceTypeFk = res.data.id); .then(res => service.ticketServiceTypeFk = res.data.id);
} }

View File

@ -1,4 +1,5 @@
import './index.js'; import './index.js';
import crudModel from 'core/mocks/crud-model';
describe('Ticket component vnTicketService', () => { describe('Ticket component vnTicketService', () => {
let controller; let controller;
@ -11,7 +12,7 @@ describe('Ticket component vnTicketService', () => {
beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.typesModel = crudModel;
$element = angular.element(`<div></div>`); $element = angular.element(`<div></div>`);
controller = $componentController('vnTicketService', {$scope, $element}); controller = $componentController('vnTicketService', {$scope, $element});
})); }));