added autocompletes to item index
This commit is contained in:
parent
eb36f86b9d
commit
262e46d7c9
|
@ -11,7 +11,7 @@
|
||||||
<
|
<
|
||||||
<span translate>Showing</span>
|
<span translate>Showing</span>
|
||||||
{{model.data.length}}
|
{{model.data.length}}
|
||||||
<span translate>rows</span>
|
<span translate>results</span>
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,4 +5,4 @@ Save data: Guardar datos
|
||||||
Shown columns: Columnas visibles
|
Shown columns: Columnas visibles
|
||||||
Check the columns you want to see: Marca las columnas que quieres ver
|
Check the columns you want to see: Marca las columnas que quieres ver
|
||||||
Showing: Mostrando
|
Showing: Mostrando
|
||||||
rows: filas
|
results: resultados
|
|
@ -113,7 +113,7 @@ module.exports = Self => {
|
||||||
return {'i.typeFk': value};
|
return {'i.typeFk': value};
|
||||||
case 'categoryFk':
|
case 'categoryFk':
|
||||||
return {'ic.id': value};
|
return {'ic.id': value};
|
||||||
case 'salesPersonFk':
|
case 'buyerFk':
|
||||||
return {'it.workerFk': value};
|
return {'it.workerFk': value};
|
||||||
case 'origin':
|
case 'origin':
|
||||||
return {'ori.code': value};
|
return {'ori.code': value};
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"id": true,
|
"id": true,
|
||||||
"description": "Identifier"
|
"description": "Identifier"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"relations": {
|
"relations": {
|
||||||
|
|
|
@ -8,15 +8,15 @@
|
||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
"id": {
|
"id": {
|
||||||
"type": "Number",
|
"type": "number",
|
||||||
"id": true,
|
"id": true,
|
||||||
"description": "Identifier"
|
"description": "Identifier"
|
||||||
},
|
},
|
||||||
"code": {
|
"code": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"name": {
|
"name": {
|
||||||
"type": "String"
|
"type": "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"acls": [
|
"acls": [
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
<th field="origin" shrink>
|
<th field="origin" shrink>
|
||||||
<span translate>Origin</span>
|
<span translate>Origin</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="salesperson" shrink>
|
<th field="buyerFk" shrink>
|
||||||
<span translate>Buyer</span>
|
<span translate>Buyer</span>
|
||||||
</th>
|
</th>
|
||||||
<th field="density" shrink>
|
<th field="density" shrink>
|
||||||
|
|
|
@ -5,10 +5,6 @@ import './style.scss';
|
||||||
class Controller extends Section {
|
class Controller extends Section {
|
||||||
constructor($element, $) {
|
constructor($element, $) {
|
||||||
super($element, $);
|
super($element, $);
|
||||||
/* this.showFields = {
|
|
||||||
id: false,
|
|
||||||
actions: false
|
|
||||||
}; */
|
|
||||||
|
|
||||||
this.smartTableOptions = {
|
this.smartTableOptions = {
|
||||||
activeButtons: {
|
activeButtons: {
|
||||||
|
@ -20,12 +16,39 @@ class Controller extends Section {
|
||||||
field: 'category',
|
field: 'category',
|
||||||
autocomplete: {
|
autocomplete: {
|
||||||
url: 'ItemCategories',
|
url: 'ItemCategories',
|
||||||
|
valueField: 'name',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'origin',
|
field: 'origin',
|
||||||
autocomplete: {
|
autocomplete: {
|
||||||
url: 'Origins',
|
url: 'Origins',
|
||||||
|
showField: 'name',
|
||||||
|
valueField: 'code'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'typeFk',
|
||||||
|
autocomplete: {
|
||||||
|
url: 'ItemTypes',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'intrastat',
|
||||||
|
autocomplete: {
|
||||||
|
url: 'Intrastats',
|
||||||
|
showField: 'description',
|
||||||
|
valueField: 'description'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'buyerFk',
|
||||||
|
autocomplete: {
|
||||||
|
url: 'Workers/activeWithRole',
|
||||||
|
where: `{role: {inq: ['logistic', 'buyer']}}`,
|
||||||
|
searchFunction: '{firstName: $search}',
|
||||||
|
showField: 'nickname',
|
||||||
|
valueField: 'id',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -36,7 +59,7 @@ class Controller extends Section {
|
||||||
switch (param) {
|
switch (param) {
|
||||||
case 'category':
|
case 'category':
|
||||||
return {'ic.name': value};
|
return {'ic.name': value};
|
||||||
case 'salesPersonFk':
|
case 'buyerFk':
|
||||||
return {'it.workerFk': value};
|
return {'it.workerFk': value};
|
||||||
case 'grouping':
|
case 'grouping':
|
||||||
return {'b.grouping': value};
|
return {'b.grouping': value};
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-one
|
vn-one
|
||||||
disabled="false"
|
disabled="false"
|
||||||
ng-model="filter.salesPersonFk"
|
ng-model="filter.buyerFk"
|
||||||
url="Workers/activeWithRole"
|
url="Workers/activeWithRole"
|
||||||
show-field="nickname"
|
show-field="nickname"
|
||||||
search-function="{firstName: $search}"
|
search-function="{firstName: $search}"
|
||||||
|
|
Loading…
Reference in New Issue