Merge branch 'dev' into 4732-previa-label
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Pau 2023-01-18 08:15:45 +00:00
commit 5e198b8541
7 changed files with 21 additions and 5 deletions

View File

@ -0,0 +1,3 @@
ALTER TABLE `vn`.`itemPackingType` ADD isActive BOOLEAN NOT NULL;
UPDATE `vn`.`itemPackingType` SET isActive = 0 WHERE code IN ('P', 'F');
UPDATE `vn`.`itemPackingType` SET isActive = 1 WHERE code IN ('V', 'H');

View File

@ -13,6 +13,9 @@
},
"description": {
"type": "string"
},
"isActive":{
"type": "boolean"
}
},
"acls": [
@ -23,4 +26,4 @@
"permission": "ALLOW"
}
]
}
}

View File

@ -25,7 +25,10 @@ class Controller extends SearchPanel {
getItemPackingTypes() {
let itemPackingTypes = [];
this.$http.get('ItemPackingTypes').then(res => {
const filter = {
where: {isActive: true}
};
this.$http.get('ItemPackingTypes', {filter}).then(res => {
for (let ipt of res.data) {
itemPackingTypes.push({
code: ipt.code,

View File

@ -39,6 +39,7 @@ export default class Controller extends Section {
field: 'ipt',
autocomplete: {
url: 'ItemPackingTypes',
where: `{isActive: true}`,
showField: 'description',
valueField: 'code'
}
@ -47,6 +48,7 @@ export default class Controller extends Section {
field: 'futureIpt',
autocomplete: {
url: 'ItemPackingTypes',
where: `{isActive: true}`,
showField: 'description',
valueField: 'code'
}

View File

@ -25,7 +25,10 @@ class Controller extends SearchPanel {
getItemPackingTypes() {
let itemPackingTypes = [];
this.$http.get('ItemPackingTypes').then(res => {
const filter = {
where: {isActive: true}
};
this.$http.get('ItemPackingTypes', {filter}).then(res => {
for (let ipt of res.data) {
itemPackingTypes.push({
description: this.$t(ipt.description),

View File

@ -134,7 +134,7 @@
{{::ticket.shipped | date: 'dd/MM/yyyy HH:mm'}}
</span>
</td>
<td>{{::ticket.ipt}}</td>
<td>{{::ticket.ipt | dashIfEmpty}}</td>
<td>
<span
class="chip {{$ctrl.stateColor(ticket.state)}}">
@ -155,7 +155,7 @@
{{::ticket.futureShipped | date: 'dd/MM/yyyy HH:mm'}}
</span>
</td>
<td>{{::ticket.futureIpt}}</td>
<td>{{::ticket.futureIpt | dashIfEmpty}}</td>
<td>
<span
class="chip {{$ctrl.stateColor(ticket.futureState)}}">

View File

@ -34,6 +34,7 @@ export default class Controller extends Section {
field: 'ipt',
autocomplete: {
url: 'ItemPackingTypes',
where: `{isActive: true}`,
showField: 'description',
valueField: 'code'
}
@ -42,6 +43,7 @@ export default class Controller extends Section {
field: 'futureIpt',
autocomplete: {
url: 'ItemPackingTypes',
where: `{isActive: true}`,
showField: 'description',
valueField: 'code'
}