refs #5020 isActive column added, filter in front
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alexandre Riera 2023-01-17 08:54:26 +01:00
parent abf4c4e59b
commit c47cac7d55
8 changed files with 21 additions and 7 deletions

View File

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

View File

@ -80201,5 +80201,3 @@ USE `vncontrol`;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2022-11-21 7:57:28

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'
}