From 5fa9489f9a00d1edfb936cbc3f562f0abeddd198 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20S=C3=A1nchez?= Date: Thu, 3 Sep 2020 08:09:37 +0200 Subject: [PATCH] Added fields as required, added info icon --- modules/entry/back/models/entry.json | 12 ++++++++++++ modules/entry/front/create/index.html | 15 +++++++++++---- modules/entry/front/create/index.js | 1 + modules/entry/front/create/locale/es.yml | 3 ++- modules/entry/front/create/style.scss | 10 ++++++++++ 5 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 modules/entry/front/create/style.scss diff --git a/modules/entry/back/models/entry.json b/modules/entry/back/models/entry.json index 2739156ea..a67641b0c 100644 --- a/modules/entry/back/models/entry.json +++ b/modules/entry/back/models/entry.json @@ -62,6 +62,18 @@ }, "loadPriority": { "type": "number" + }, + "supplierFk": { + "type": "number", + "required": true + }, + "travelFk": { + "type": "number", + "required": true + }, + "companyFk": { + "type": "number", + "required": true } }, "relations": { diff --git a/modules/entry/front/create/index.html b/modules/entry/front/create/index.html index 3bc086f4e..262e904d7 100644 --- a/modules/entry/front/create/index.html +++ b/modules/entry/front/create/index.html @@ -7,6 +7,10 @@
+ + + label="Supplier" + required="true"> {{::id}} - {{::nickname}} - + label="Travel" + required="true"> {{::agencyModeName}} - {{::warehouseInName}} ({{::shipped | date: 'dd/MM/yyyy'}}) → {{::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"> diff --git a/modules/entry/front/create/index.js b/modules/entry/front/create/index.js index b94cbe2ca..ec022afed 100644 --- a/modules/entry/front/create/index.js +++ b/modules/entry/front/create/index.js @@ -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, $) { diff --git a/modules/entry/front/create/locale/es.yml b/modules/entry/front/create/locale/es.yml index bb20b313c..aa269ed15 100644 --- a/modules/entry/front/create/locale/es.yml +++ b/modules/entry/front/create/locale/es.yml @@ -1 +1,2 @@ -New entry: Nueva entrada \ No newline at end of file +New entry: Nueva entrada +Required fields (*): Campos requeridos (*) \ No newline at end of file diff --git a/modules/entry/front/create/style.scss b/modules/entry/front/create/style.scss new file mode 100644 index 000000000..2dc52b1ff --- /dev/null +++ b/modules/entry/front/create/style.scss @@ -0,0 +1,10 @@ +vn-entry-create { + vn-card { + position: relative + } + vn-icon[icon="info"] { + position: absolute; + top: 16px; + right: 16px + } +} \ No newline at end of file