This commit is contained in:
Carlos Jimenez Ruiz 2019-01-30 14:25:13 +01:00
commit b64609f3a5
18 changed files with 136 additions and 116 deletions

View File

@ -13,15 +13,18 @@ import UserError from '../../lib/user-error';
* properties are provided. * properties are provided.
*/ */
export default class Watcher extends Component { export default class Watcher extends Component {
constructor($element, $scope, $state, $transitions, $http, vnApp, $translate, $attrs, $q) { constructor($element, $, $state, $stateParams, $transitions, $http, vnApp, $translate, $attrs, $q) {
super($element); super($element);
this.$ = $scope; Object.assign(this, {
this.$state = $state; $,
this.$http = $http; $state,
this._ = $translate; $stateParams,
this.$attrs = $attrs; $http,
this.vnApp = vnApp; _: $translate,
this.$q = $q; $attrs,
vnApp,
$q
});
this.state = null; this.state = null;
this.deregisterCallback = $transitions.onStart({}, this.deregisterCallback = $transitions.onStart({},
@ -240,7 +243,7 @@ export default class Watcher extends Component {
return newCopy; return newCopy;
} }
} }
Watcher.$inject = ['$element', '$scope', '$state', '$transitions', '$http', 'vnApp', '$translate', '$attrs', '$q']; Watcher.$inject = ['$element', '$scope', '$state', '$stateParams', '$transitions', '$http', 'vnApp', '$translate', '$attrs', '$q'];
ngModule.component('vnWatcher', { ngModule.component('vnWatcher', {
template: require('./watcher.html'), template: require('./watcher.html'),

View File

@ -1,32 +1,53 @@
Applications: Aplicaciones Applications: Aplicaciones
Language: Idioma Language: Idioma
Change language: Cambiar idioma Change language: Cambiar idioma
Client Frozen: Cliente congelado
Client has debt: Cliente con riesgo
Client inactive: Cliente inactivo
Client not checked: Cliente no comprobado
credit: Crédito
creditInsurance: Crédito Asegurado
Clients: Clientes
Claims: Reclamaciones
Data saved!: ¡Datos guardados! Data saved!: ¡Datos guardados!
Home: Inicio Home: Inicio
Items: Artículos
Workers: Trabajadores
Locator: Localizador
Logout: Cerrar sesión Logout: Cerrar sesión
Modules access : Acceso a módulos Modules access : Acceso a módulos
Return to home: Volver a inicio Return to home: Volver a inicio
Notifications: Notificaciones Notifications: Notificaciones
name: Nombre Name: Nombre
phone: Teléfono
Preview: Vista previa Preview: Vista previa
Profile: Perfil Profile: Perfil
Push on applications menu: Para abrir un módulo pulsa en el menú de aplicaciones Push on applications menu: Para abrir un módulo pulsa en el menú de aplicaciones
Return to module index: Volver a la página principal del módulo Return to module index: Volver a la página principal del módulo
Routes: Rutas
What is new: Novedades de la versión What is new: Novedades de la versión
Web Account inactive: Sin acceso Web Settings: Ajustes
Orders: Cesta Enter a new search: Introduce una nueva búsqueda
No results: Sin resultados
# Actions
Back: Volver
Save: Guardar
Create: Crear
Send: Enviar
Delete: Eliminar
Order by: Ordenar por
Order: Orden
Ascendant: Ascendente
Descendant: Descendente
# Modules
Agencies: Agencias Agencies: Agencias
Claims: Reclamaciones
Clients: Clientes
Items: Artículos
Orders: Cesta
Tickets: Tickets
Travels: Envíos Travels: Envíos
Workers: Trabajadores
Routes: Rutas
Locator: Localizador
# Common
Summary: Vista previa
Basic data: Datos básicos
List: Listado
# Misc
Phone: Teléfono

View File

@ -1,18 +1,9 @@
Name: Nombre
Agency: Agencia Agency: Agencia
Warehouse: Almacén Warehouse: Almacén
Hour: Hora (ETD) Hour: Hora (ETD)
Price: Precio Price: Precio
Create: Crear
Delete: Eliminar
Settings: Ajustes
Locations: Localizaciones Locations: Localizaciones
Enter a new search: Introduce una nueva búsqueda
Delete zone: Eliminar zona Delete zone: Eliminar zona
Are you sure you want to delete this zone?: ¿Estás seguro de querer eliminar esta zona? Are you sure you want to delete this zone?: ¿Estás seguro de querer eliminar esta zona?
Zones: Zonas Zones: Zonas
List: Listado New zone: Nueva zona
Summary: Vista previa
New zone: Nueva zona
Basic data: Datos básicos

View File

@ -7,11 +7,5 @@ Responsible: Responsable
Remove sale: Borrar linea Remove sale: Borrar linea
Claim Id: Id reclamación Claim Id: Id reclamación
Created: Creado Created: Creado
Enter a new search: Introduce una nueva búsqueda
Pickup order: Orden de recogida Pickup order: Orden de recogida
Do you want to send it directly?: ¿Quieres enviarlo directamente? Do you want to send it directly?: ¿Quieres enviarlo directamente?
#sections
Claims: Reclamaciones
List: Listado
Summary: Vista previa

View File

@ -8,25 +8,40 @@
<form name="form" ng-submit="watcher.submit()" compact> <form name="form" ng-submit="watcher.submit()" compact>
<vn-card pad-large> <vn-card pad-large>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one <vn-textfield
vn-one
label="Comercial Name" label="Comercial Name"
field="$ctrl.client.name" vn-focus> field="$ctrl.client.name" vn-focus>
</vn-textfield> </vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Contact" field="$ctrl.client.contact"></vn-textfield> <vn-textfield
<vn-textfield vn-one vn-one
label="Contact"
field="$ctrl.client.contact">
</vn-textfield>
<vn-textfield
vn-one
label="Email" label="Email"
field="$ctrl.client.email" field="$ctrl.client.email"
info="You can save multiple emails"> info="You can save multiple emails">
</vn-textfield> </vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Phone" field="$ctrl.client.phone"></vn-textfield> <vn-textfield
<vn-textfield vn-one label="Mobile" field="$ctrl.client.mobile"></vn-textfield> vn-one
label="Phone"
field="$ctrl.client.phone">
</vn-textfield>
<vn-textfield
vn-one
label="Mobile"
field="$ctrl.client.mobile">
</vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-autocomplete vn-one <vn-autocomplete
vn-one
initial-data="$ctrl.client.salesPerson" initial-data="$ctrl.client.salesPerson"
field="$ctrl.client.salesPersonFk" field="$ctrl.client.salesPersonFk"
url="/client/api/Clients/activeWorkersWithRole" url="/client/api/Clients/activeWorkersWithRole"
@ -38,7 +53,8 @@
vn-acl="salesAssistant"> vn-acl="salesAssistant">
<tpl-item>{{firstName}} {{name}}</tpl-item> <tpl-item>{{firstName}} {{name}}</tpl-item>
</vn-autocomplete> </vn-autocomplete>
<vn-autocomplete vn-one <vn-autocomplete
vn-one
initial-data="$ctrl.client.contactChannel" initial-data="$ctrl.client.contactChannel"
field="$ctrl.client.contactChannelFk" field="$ctrl.client.contactChannelFk"
url="/client/api/ContactChannels" url="/client/api/ContactChannels"

View File

@ -43,7 +43,7 @@
ng-class="{bright: $ctrl.client.isActive == false}"> ng-class="{bright: $ctrl.client.isActive == false}">
</vn-icon> </vn-icon>
<vn-icon <vn-icon
vn-tooltip="Client Frozen" vn-tooltip="Client frozen"
icon="icon-frozen" icon="icon-frozen"
ng-class="{bright: $ctrl.client.isFreezed == true}"> ng-class="{bright: $ctrl.client.isFreezed == true}">
</vn-icon> </vn-icon>

View File

@ -2,7 +2,6 @@ Active: Activo
Amount: Importe Amount: Importe
Client: Cliente Client: Cliente
Comercial Name: Comercial Comercial Name: Comercial
Back: Volver
Has to invoice: Factura Has to invoice: Factura
Invoice by mail: Factura via e-mail Invoice by mail: Factura via e-mail
Country: País Country: País
@ -10,29 +9,29 @@ Street: Domicilio fiscal
City: Municipio City: Municipio
Postcode: Código postal Postcode: Código postal
Province: Provincia Province: Provincia
Save: Guardar
Address: Consignatario Address: Consignatario
Verified data: Datos comprobados Verified data: Datos comprobados
Remove contact: Quitar contacto Remove contact: Quitar contacto
Client ticket list: Listado de tickets del cliente Client ticket list: Listado de tickets del cliente
Add contact: Añadir contacto Add contact: Añadir contacto
Create: Crear
Sent: Enviado Sent: Enviado
Worker: Trabajador Worker: Trabajador
Send: Enviar
Sample: Plantilla Sample: Plantilla
Credit: Crédito Credit: Crédito
Are you sure you want to delete this expedition?: ¿Está seguro de borrar esta expedición? Are you sure you want to delete this expedition?: ¿Está seguro de borrar esta expedición?
Others: Otros Others: Otros
Enter a new search: Introduce una nueva búsqueda
New order: Nuevo pedido New order: Nuevo pedido
Client frozen: Cliente congelado
Client has debt: Cliente con riesgo
Client inactive: Cliente inactivo
Client not checked: Cliente no comprobado
Credit insurance: Crédito asegurado
Web Account inactive: Sin acceso Web
# Sections # Sections
Clients: Clientes Clients: Clientes
List: Listado
New client: Nuevo cliente New client: Nuevo cliente
Summary: Vista previa
Basic data: Datos básicos
Fiscal data: Datos fiscales Fiscal data: Datos fiscales
Pay method: Forma de pago Pay method: Forma de pago
Addresses: Consignatarios Addresses: Consignatarios

View File

@ -236,6 +236,7 @@
"state": "client.card.creditInsurance.index", "state": "client.card.creditInsurance.index",
"component": "vn-client-credit-insurance-index", "component": "vn-client-credit-insurance-index",
"description": "Credit contracts", "description": "Credit contracts",
"acl": ["creditInsurance"],
"params": { "params": {
"client": "$ctrl.client" "client": "$ctrl.client"
} }

View File

@ -34,7 +34,6 @@ Add barcode: Añadir código de barras
Remove barcode: Quitar código de barras Remove barcode: Quitar código de barras
Buyer: Comprador Buyer: Comprador
No results: Sin resultados No results: Sin resultados
Enter a new search: Introduce una nueva búsqueda
Tag: Etiqueta Tag: Etiqueta
Worker: Trabajador Worker: Trabajador
Available: Disponible Available: Disponible
@ -45,11 +44,9 @@ stems: Tallos
Compression: Compresión Compression: Compresión
Density: Densidad Density: Densidad
#Sections # Sections
Items: Artículos Items: Artículos
List: Listado
New item: Nuevo artículo New item: Nuevo artículo
Summary: Vista previa
Basic data: Datos básicos Basic data: Datos básicos
Tax: IVA Tax: IVA
History: Historial History: Historial

View File

@ -52,7 +52,7 @@
ng-class="{bright: $ctrl.ticket.client.isActive == false}"> ng-class="{bright: $ctrl.ticket.client.isActive == false}">
</vn-icon> </vn-icon>
<vn-icon vn-one <vn-icon vn-one
vn-tooltip="Client Frozen" vn-tooltip="Client frozen"
icon="icon-frozen" icon="icon-frozen"
ng-class="{bright: $ctrl.ticket.client.isFreezed == true}"> ng-class="{bright: $ctrl.ticket.client.isFreezed == true}">
</vn-icon> </vn-icon>

View File

@ -3,8 +3,6 @@ Catalog: Catálogo
from: desde from: desde
results: resultados results: resultados
More than: Más de More than: Más de
No results: Sin resultados
Enter a new search: Introduce una nueva búsqueda
Plant: Planta Plant: Planta
Flower: Flor Flower: Flor
Handmade: Confección Handmade: Confección
@ -12,9 +10,5 @@ Green: Verde
Accessories: Complemento Accessories: Complemento
Category: Reino Category: Reino
Search tag: Buscar etiqueta Search tag: Buscar etiqueta
Order by: Ordenar por
Order: Orden
Price: Precio Price: Precio
Ascendant: Ascendente
Descendant: Descendente
Created from: Creado desde Created from: Creado desde

View File

@ -7,9 +7,6 @@ Landed: F. llegada
Delivered: Enviado Delivered: Enviado
Received: Recibido Received: Recibido
Travel id: Id envío Travel id: Id envío
Enter a new search: Introduce una nueva búsqueda
#sections # Sections
Travels: Envíos Travels: Envíos
List: Listado
Summary: Vista previa

View File

@ -1,30 +1,34 @@
<mg-ajax path="api/Workers/{{patch.params.id}}" options="vnPatch"></mg-ajax>
<vn-watcher <vn-watcher
vn-id="watcher" vn-id="watcher"
data="$ctrl.worker" data="$ctrl.worker"
form="form" form="form"
save="patch"> id-field="id"
url="api/Workers"
save="post">
</vn-watcher> </vn-watcher>
<form name="form" ng-submit="$ctrl.onSubmit()"> <form name="form" ng-submit="$ctrl.onSubmit()">
<vn-card pad-large> <vn-card pad-large>
<vn-horizontal> <vn-vertical>
<vn-autocomplete <vn-horizontal>
vn-one <vn-textfield
field="$ctrl.zone.warehouseFk" vn-one
url="api/Warehouses" label="Name"
show-field="name" field="$ctrl.worker.firstName">
value-field="id" </vn-textfield>
label="Id"> <vn-textfield
</vn-autocomplete> vn-one
<vn-autocomplete label="Last name"
vn-one field="$ctrl.worker.name">
field="$ctrl.zone.agencyModeFk" </vn-textfield>
url="api/AgencyModes" </vn-horizontal>
show-field="name" <vn-horizontal>
value-field="id" <vn-textfield
label="Name"> vn-one
</vn-autocomplete> label="Phone"
</vn-horizontal> field="$ctrl.worker.phone">
</vn-textfield>
</vn-horizontal>
</vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Save"></vn-submit> <vn-submit label="Save"></vn-submit>

View File

@ -1,21 +1,16 @@
import ngModule from '../module'; import ngModule from '../module';
class Controller { class Controller {
constructor($, $state) { constructor($) {
Object.assign(this, { Object.assign(this, {$});
$,
$state
});
} }
onSubmit() { onSubmit() {
this.$.watcher.submit().then(() => { this.$.watcher.submit()
this.card.reload(); .then(() => this.card.reload());
});
} }
} }
Controller.$inject = ['$scope'];
Controller.$inject = ['$scope', '$state'];
ngModule.component('vnWorkerBasicData', { ngModule.component('vnWorkerBasicData', {
template: require('./index.html'), template: require('./index.html'),

View File

@ -10,27 +10,27 @@
</vn-horizontal> </vn-horizontal>
<div class="body"> <div class="body">
<div class="attributes"> <div class="attributes">
<h5>{{::$ctrl.worker.firstName}} {{::$ctrl.worker.name}}</h5> <h5>{{$ctrl.worker.firstName}} {{$ctrl.worker.name}}</h5>
<vn-label-value label="Id" <vn-label-value label="Id"
value="{{::$ctrl.worker.id}}"> value="{{$ctrl.worker.id}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="User" <vn-label-value label="User"
value="{{::$ctrl.worker.user.name}}"> value="{{$ctrl.worker.user.name}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Email" <vn-label-value label="Email"
value="{{::$ctrl.worker.user.email}}"> value="{{$ctrl.worker.user.email}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Fiscal identifier" <vn-label-value label="Fiscal identifier"
value="{{::$ctrl.worker.client.fi}}"> value="{{$ctrl.worker.client.fi}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Department" <vn-label-value label="Department"
value="{{::$ctrl.worker.department.department}}"> value="{{$ctrl.worker.department.department}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Phone" <vn-label-value label="Phone"
value="{{::$ctrl.worker.phone}}"> value="{{$ctrl.worker.phone}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Extension" <vn-label-value label="Extension"
value="{{::$ctrl.worker.sip.phone}}"> value="{{$ctrl.worker.sip.phone}}">
</vn-label-value> </vn-label-value>
</div> </div>
<div class="quicklinks"> <div class="quicklinks">

View File

@ -3,8 +3,7 @@
url="/agency/api/Workers" url="/agency/api/Workers"
include="::$ctrl.include" include="::$ctrl.include"
limit="20" limit="20"
data="workers" data="workers">
auto-load="false">
</vn-crud-model> </vn-crud-model>
<div class="index-block"> <div class="index-block">
<div class="vn-list"> <div class="vn-list">
@ -21,7 +20,7 @@
ui-sref="worker.card.summary({id: worker.id})" ui-sref="worker.card.summary({id: worker.id})"
translate-attr="{title: 'View worker'}" translate-attr="{title: 'View worker'}"
class="vn-list-item"> class="vn-list-item">
<vn-horizontal ng-click="$ctrl.onClick($event)"> <vn-horizontal>
<vn-one> <vn-one>
<h6>{{::worker.firstName}} {{::worker.name}}</h6> <h6>{{::worker.firstName}} {{::worker.name}}</h6>
<vn-label-value label="Id" <vn-label-value label="Id"

View File

@ -1 +1,10 @@
Workers: Trabajadores Workers: Trabajadores
Last name: Apellidos
User data: Datos de usuario
Fiscal identifier: Identificador fiscal
Email: Correo electrónico
Department: Departamento
User id: Id de usuario
Role: Rol
Extension: Extensión
Go to client: Ir al cliente

View File

@ -20,7 +20,7 @@
</vn-label-value> </vn-label-value>
</vn-one> </vn-one>
<vn-one> <vn-one>
<h4 translate>User info</h4> <h4 translate>User data</h4>
<vn-label-value label="User id" <vn-label-value label="User id"
value="{{worker.userFk}}"> value="{{worker.userFk}}">
</vn-label-value> </vn-label-value>