Added fields as required, added info icon
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-09-03 08:09:37 +02:00
parent a3382300f9
commit 5fa9489f9a
5 changed files with 36 additions and 5 deletions

View File

@ -62,6 +62,18 @@
},
"loadPriority": {
"type": "number"
},
"supplierFk": {
"type": "number",
"required": true
},
"travelFk": {
"type": "number",
"required": true
},
"companyFk": {
"type": "number",
"required": true
}
},
"relations": {

View File

@ -7,6 +7,10 @@
</vn-watcher>
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
<vn-card class="vn-pa-lg">
<vn-icon color-marginal
icon="info"
vn-tooltip="Required fields (*)">
</vn-icon>
<vn-horizontal>
<vn-autocomplete
vn-one
@ -16,21 +20,23 @@
search-function="{or: [{id: $search}, {name: {like: '%'+ $search +'%'}}]}"
value-field="id"
order="nickname"
label="Supplier">
label="Supplier"
required="true">
<tpl-item>
{{::id}} - {{::nickname}}
</tpl-item>
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
<vn-autocomplete
vn-one
ng-model="$ctrl.entry.travelFk"
url="Travels/filter"
search-function="$ctrl.searchFunction($search)"
value-field="t.id"
order="t.id"
label="Travel">
label="Travel"
required="true">
<tpl-item>
{{::agencyModeName}} - {{::warehouseInName}} ({{::shipped | date: 'dd/MM/yyyy'}}) &#x2192;
{{::warehouseOutName}} ({{::landed | date: 'dd/MM/yyyy'}})
@ -43,7 +49,8 @@
label="Company"
show-field="code"
value-field="id"
ng-model="$ctrl.entry.companyFk">
ng-model="$ctrl.entry.companyFk"
required="true">
</vn-autocomplete>
</vn-horizontal>
</vn-card>

View File

@ -1,5 +1,6 @@
import ngModule from '../module';
import Section from 'salix/components/section';
import './style.scss';
export default class Controller extends Section {
constructor($element, $) {

View File

@ -1 +1,2 @@
New entry: Nueva entrada
New entry: Nueva entrada
Required fields (*): Campos requeridos (*)

View File

@ -0,0 +1,10 @@
vn-entry-create {
vn-card {
position: relative
}
vn-icon[icon="info"] {
position: absolute;
top: 16px;
right: 16px
}
}