refactor: added itemPackingType and temperature relations
gitea/salix/pipeline/head This commit is unstable
Details
gitea/salix/pipeline/head This commit is unstable
Details
This commit is contained in:
parent
fd80fc58fc
commit
1b3f0ee026
|
@ -18,18 +18,12 @@
|
|||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"temperatureFk": {
|
||||
"type": "string"
|
||||
},
|
||||
"life": {
|
||||
"type": "number"
|
||||
},
|
||||
"promo": {
|
||||
"type": "number"
|
||||
},
|
||||
"itemPackingTypeFk": {
|
||||
"type": "string"
|
||||
},
|
||||
"isUnconventionalSize": {
|
||||
"type": "number"
|
||||
}
|
||||
|
@ -49,6 +43,16 @@
|
|||
"type": "belongsTo",
|
||||
"model": "ItemCategory",
|
||||
"foreignKey": "categoryFk"
|
||||
},
|
||||
"itemPackingType": {
|
||||
"type": "belongsTo",
|
||||
"model": "ItemPackingType",
|
||||
"foreignKey": "itemPackingTypeFk"
|
||||
},
|
||||
"temperature": {
|
||||
"type": "belongsTo",
|
||||
"model": "Temperature",
|
||||
"foreignKey": "temperatureFk"
|
||||
}
|
||||
},
|
||||
"acls": [
|
||||
|
|
|
@ -6,7 +6,9 @@ class Controller extends ModuleCard {
|
|||
const filter = {
|
||||
include: [
|
||||
{relation: 'worker'},
|
||||
{relation: 'category'}
|
||||
{relation: 'category'},
|
||||
{relation: 'itemPackingType'},
|
||||
{relation: 'temperature'}
|
||||
]
|
||||
};
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Temperature"
|
||||
value="{{summary.temperatureFk}}">
|
||||
value="{{summary.temperature.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Life"
|
||||
|
@ -39,7 +39,7 @@
|
|||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Item packing type"
|
||||
value="{{summary.itemPackingTypeFk}}">
|
||||
value="{{summary.itemPackingType.description}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Is unconventional size"
|
||||
|
|
|
@ -10,7 +10,9 @@ class Controller extends Component {
|
|||
const filter = {
|
||||
include: [
|
||||
{relation: 'worker'},
|
||||
{relation: 'category'}
|
||||
{relation: 'category'},
|
||||
{relation: 'itemPackingType'},
|
||||
{relation: 'temperature'}
|
||||
]
|
||||
};
|
||||
this.$http.get(`ItemTypes/${value.id}`, {filter})
|
||||
|
|
Loading…
Reference in New Issue