This commit is contained in:
Juan Ferrer Toribio 2017-06-07 08:39:40 +02:00
parent fd08a6991e
commit 5d789b0e71
25 changed files with 146 additions and 67 deletions

View File

@ -8,23 +8,23 @@
<form name="form" ng-submit="watcher.submitGo('clientCard.addresses')" pad-medium> <form name="form" ng-submit="watcher.submitGo('clientCard.addresses')" pad-medium>
<vn-card > <vn-card >
<vn-vertical pad-large> <vn-vertical pad-large>
<vn-title>Consignatario</vn-title> <vn-title>Address</vn-title>
<vn-horizontal> <vn-horizontal>
<vn-check vn-one label="Predeterminado" field="$ctrl.address.default"></vn-check> <vn-check vn-one label="Default" field="$ctrl.address.default"></vn-check>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Consignatario" field="$ctrl.address.consignee" vn-focus></vn-textfield> <vn-textfield vn-one label="Consignee" field="$ctrl.address.consignee" vn-focus></vn-textfield>
<vn-textfield vn-one label="Domicilio" field="$ctrl.address.street"></vn-textfield> <vn-textfield vn-one label="Street" field="$ctrl.address.street"></vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Código Postal" field="$ctrl.address.postcode"></vn-textfield> <vn-textfield vn-one label="Postcode" field="$ctrl.address.postcode"></vn-textfield>
<vn-textfield vn-one label="Municipio" field="$ctrl.address.city"></vn-textfield> <vn-textfield vn-one label="City" field="$ctrl.address.city"></vn-textfield>
<vn-autocomplete vn-one <vn-autocomplete vn-one
field="$ctrl.address.provinceFk" field="$ctrl.address.provinceFk"
url="/client/api/Provinces" url="/client/api/Provinces"
show-field="name" show-field="name"
value-field="id" value-field="id"
label="Provincia"> label="Province">
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
@ -33,14 +33,14 @@
url="/client/api/AgencyServices" url="/client/api/AgencyServices"
show-field="name" show-field="name"
value-field="id" value-field="id"
label="Agencia"> label="Agency">
</vn-autocomplete> </vn-autocomplete>
<vn-textfield vn-one label="Teléfono" field="$ctrl.address.phone"></vn-textfield> <vn-textfield vn-one label="Phone" field="$ctrl.address.phone"></vn-textfield>
<vn-textfield vn-one label="Móvil" field="$ctrl.address.mobile"></vn-textfield> <vn-textfield vn-one label="Mobile" field="$ctrl.address.mobile"></vn-textfield>
</vn-horizontal> </vn-horizontal>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Guardar"></vn-submit> <vn-submit label="Save"></vn-submit>
</vn-button-bar> </vn-button-bar>
</form> </form>

View File

@ -0,0 +1,12 @@
{
"Address": "Consignatario",
"Default": "Predeterminado",
"Consignee": "Consignatario",
"Street": "Dirección",
"Postcode": "Código postal",
"City": "Municipio",
"Province": "Provincia",
"Agency": "Agencia",
"Phone": "Teléfono",
"Mobile": "Móvil"
}

View File

@ -9,24 +9,24 @@
<form name="form" ng-submit="watcher.submitBack()" pad-medium> <form name="form" ng-submit="watcher.submitBack()" pad-medium>
<vn-card> <vn-card>
<vn-vertical pad-large> <vn-vertical pad-large>
<vn-title>Consignatario</vn-title> <vn-title>Address</vn-title>
<vn-horizontal> <vn-horizontal>
<vn-check vn-one label="Activo" field="$ctrl.address.enabled"></vn-check> <vn-check vn-one label="Enabled" field="$ctrl.address.enabled"></vn-check>
<vn-check vn-one label="Predeterminado" field="$ctrl.address.default"></vn-check> <vn-check vn-one label="Default" field="$ctrl.address.default"></vn-check>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Consignatario" field="$ctrl.address.consignee" vn-focus></vn-textfield> <vn-textfield vn-one label="Consignee" field="$ctrl.address.consignee" vn-focus></vn-textfield>
<vn-textfield vn-one label="Domicilio" field="$ctrl.address.street"></vn-textfield> <vn-textfield vn-one label="Street" field="$ctrl.address.street"></vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Código Postal" field="$ctrl.address.postcode"></vn-textfield> <vn-textfield vn-one label="Postcode" field="$ctrl.address.postcode"></vn-textfield>
<vn-textfield vn-one label="Municipio" field="$ctrl.address.city"></vn-textfield> <vn-textfield vn-one label="City" field="$ctrl.address.city"></vn-textfield>
<vn-autocomplete vn-one <vn-autocomplete vn-one
field="$ctrl.address.provinceFk" field="$ctrl.address.provinceFk"
url="/client/api/Provinces" url="/client/api/Provinces"
show-field="name" show-field="name"
value-field="id" value-field="id"
label="Provincia"> label="Province">
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
@ -35,14 +35,14 @@
url="/client/api/AgencyServices" url="/client/api/AgencyServices"
show-field="name" show-field="name"
value-field="id" value-field="id"
label="Agencia"> label="Agency">
</vn-autocomplete> </vn-autocomplete>
<vn-textfield vn-one label="Teléfono" field="$ctrl.address.phone"></vn-textfield> <vn-textfield vn-one label="Phone" field="$ctrl.address.phone"></vn-textfield>
<vn-textfield vn-one label="Móvil" field="$ctrl.address.mobile"></vn-textfield> <vn-textfield vn-one label="Mobile" field="$ctrl.address.mobile"></vn-textfield>
</vn-horizontal> </vn-horizontal>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Guardar"></vn-submit> <vn-submit label="Save"></vn-submit>
</vn-button-bar> </vn-button-bar>
</form> </form>

View File

@ -1,5 +1,15 @@
import ngModule from '../module'; import ngModule from '../module';
export default class Controller {
constructor($state) {
this.address = {
id: parseInt($state.params.addressId)
};
}
}
Controller.$inject = ['$state'];
ngModule.component('vnAddressEdit', { ngModule.component('vnAddressEdit', {
template: require('./address-edit.html') template: require('./address-edit.html'),
controller: Controller
}); });

View File

@ -0,0 +1,3 @@
{
"Enabled": "Activo"
}

View File

@ -3,17 +3,17 @@
<vn-card> <vn-card>
<vn-vertical pad-large> <vn-vertical pad-large>
<vn-horizontal> <vn-horizontal>
<vn-title vn-one>Consignatario</vn-title> <vn-title vn-one>Addresses</vn-title>
</vn-horizontal> </vn-horizontal>
<vn-horizontal ng-repeat="i in index.model" class="pad-medium-top" style="align-items: center;"> <vn-horizontal ng-repeat="i in index.model" class="pad-medium-top" style="align-items: center;">
<vn-auto style="border-radius: .5em;" class="pad-small border-solid" <vn-auto style="border-radius: .5em;" class="pad-small border-solid"
ng-class="{'bg-dark-item': i.default,'bg-opacity-item': !i.enabled && !i.default}"> ng-class="{'bg-dark-item': i.default,'bg-opacity-item': !i.enabled && !i.default}">
<vn-horizontal style="align-items: center;"> <vn-horizontal style="align-items: center;">
<vn-auto> <vn-auto>
<div><b>{{i.consignee}}</b></div> <div><b>{{::i.consignee}}</b></div>
<div>{{i.street}}</div> <div>{{::i.street}}</div>
<div>{{i.city}}, {{i.province}}</div> <div>{{::i.city}}, {{::i.province}}</div>
<div>{{i.phone}}, {{i.mobile}}</div> <div>{{::i.phone}}, {{::i.mobile}}</div>
</vn-auto> </vn-auto>
<a vn-empty ui-sref="clientCard.addresses.edit({addressId: {{i.id}}})"> <a vn-empty ui-sref="clientCard.addresses.edit({addressId: {{i.id}}})">
<vn-icon-button icon="edit"></vn-icon-button> <vn-icon-button icon="edit"></vn-icon-button>
@ -27,6 +27,7 @@
<vn-float-button <vn-float-button
fixed-bottom-right fixed-bottom-right
ui-sref="clientCard.addresses.create" ui-sref="clientCard.addresses.create"
icon="add"> icon="add"
label="Add">
</vn-float-button> </vn-float-button>
</vn-vertical> </vn-vertical>

View File

@ -0,0 +1,3 @@
{
"Addresses": "Consignatarios"
}

View File

@ -8,15 +8,15 @@
<form name="form" ng-submit="watcher.submit()" pad-medium> <form name="form" ng-submit="watcher.submit()" pad-medium>
<vn-card> <vn-card>
<vn-vertical pad-large> <vn-vertical pad-large>
<vn-title>Datos básicos</vn-title> <vn-title>Basic data</vn-title>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Nombre" field="$ctrl.client.name" vn-focus></vn-textfield> <vn-textfield vn-one label="Name" field="$ctrl.client.name" vn-focus></vn-textfield>
<vn-textfield vn-one label="NIF/CIF" field="$ctrl.client.fi"></vn-textfield> <vn-textfield vn-one label="Tax number" field="$ctrl.client.fi"></vn-textfield>
<vn-textfield autofocus vn-one label="Razón social" field="$ctrl.client.socialName"></vn-textfield> <vn-textfield autofocus vn-one label="Social name" field="$ctrl.client.socialName"></vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Teléfono" field="$ctrl.client.phone"></vn-textfield> <vn-textfield vn-one label="Phone" field="$ctrl.client.phone"></vn-textfield>
<vn-textfield vn-one label="Móvil" field="$ctrl.client.mobile"></vn-textfield> <vn-textfield vn-one label="Mobile" field="$ctrl.client.mobile"></vn-textfield>
<vn-textfield vn-one label="Fax" field="$ctrl.client.fax"></vn-textfield> <vn-textfield vn-one label="Fax" field="$ctrl.client.fax"></vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
@ -28,7 +28,7 @@
show-field="name" show-field="name"
value-field="id" value-field="id"
select-fields="surname" select-fields="surname"
label="Comercial"> label="Salesperson">
<tpl-item> <tpl-item>
{{::i.name}} {{::i.surname}} {{::i.name}} {{::i.surname}}
</tpl-item> </tpl-item>
@ -37,12 +37,12 @@
initial-value="$ctrl.client.contactChannel" initial-value="$ctrl.client.contactChannel"
field="$ctrl.client.contactChannelFk" field="$ctrl.client.contactChannelFk"
url="/client/api/ContactChannels" url="/client/api/ContactChannels"
label="Canal"> label="Channel">
</vn-autocomplete> </vn-autocomplete>
</vn-horizontal> </vn-horizontal>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Guardar"></vn-submit> <vn-submit label="Save"></vn-submit>
</vn-button-bar> </vn-button-bar>
</form> </form>

View File

@ -0,0 +1,12 @@
{
"Basic data": "Datos básicos",
"Name": "Nombre",
"Tax number": "NIF/CIF",
"Social name": "Razón social",
"Phone": "Teléfono",
"Mobile": "Móvil",
"Fax": "Fax",
"Email": "Correo electrónico",
"Salesperson": "Comercial",
"Channel": "Canal"
}

View File

@ -5,7 +5,7 @@
<i class="material-icons descriptor-icon">person</i> <i class="material-icons descriptor-icon">person</i>
</vn-one> </vn-one>
<vn-vertical vn-two> <vn-vertical vn-two>
<div class="margin-none">{{$ctrl.client.id}}</div> <div class="margin-none">{{::$ctrl.client.id}}</div>
<div class="margin-none">{{$ctrl.client.name}}</div> <div class="margin-none">{{$ctrl.client.name}}</div>
<div class="margin-none">{{$ctrl.client.phone}}</div> <div class="margin-none">{{$ctrl.client.phone}}</div>
<vn-switch label="Activo" model="$ctrl.active"></vn-switch> <vn-switch label="Activo" model="$ctrl.active"></vn-switch>

View File

@ -1,7 +1,7 @@
<a ui-sref="clientCard.basicData({ id: {{$ctrl.client.id}} })" pad-medium border-solid-bottom> <a ui-sref="clientCard.basicData({ id: {{$ctrl.client.id}} })" pad-medium border-solid-bottom>
<div class="vn-item-client-name">{{$ctrl.client.name}}</div> <div class="vn-item-client-name">{{$ctrl.client.name}}</div>
<div>Id Cliente: <b>{{$ctrl.client.id}}</b></div> <div><span translate>Client id</span>: <b>{{$ctrl.client.id}}</b></div>
<div>Teléfono: <b>{{$ctrl.client.phone | phone}}</b></div> <div><span translate>Phone</span>: <b>{{$ctrl.client.phone | phone}}</b></div>
<div>Población: <b>{{$ctrl.client.city}}</b></div> <div><span translate>City</span>: <b>{{$ctrl.client.city}}</b></div>
<div>email: <b>{{$ctrl.client.email}}</b></div> <div><span translate>Email</span>: <b>{{$ctrl.client.email}}</b></div>
</a> </a>

View File

@ -0,0 +1,7 @@
{
"Client id": "Id cliente",
"Phone": "Teléfono",
"City": "Población",
"Email": "Correo electrónico",
"Create client": "Crear cliente"
}

View File

@ -1 +1,4 @@
{} {
"Client": "Client",
"Clients": "Clients"
}

View File

@ -1 +1,4 @@
{} {
"Client": "Cliente",
"Clients": "Clientes"
}

View File

@ -0,0 +1,4 @@
{
"New note": "Nueva nota",
"Note": "Nota"
}

View File

@ -8,11 +8,11 @@
<form name="form" ng-submit="watcher.submitGo('clientCard.notes.list')" pad-medium> <form name="form" ng-submit="watcher.submitGo('clientCard.notes.list')" pad-medium>
<vn-card> <vn-card>
<vn-vertical pad-large> <vn-vertical pad-large>
<vn-title>Nueva nota</vn-title> <vn-title>New note</vn-title>
<vn-textarea label="Nueva nota" model="$ctrl.note.text" vn-focus padd-medium-top></vn-textarea> <vn-textarea label="Note" model="$ctrl.note.text" vn-focus padd-medium-top></vn-textarea>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Guardar"></vn-submit> <vn-submit label="Save"></vn-submit>
</vn-button-bar> </vn-button-bar>
</form> </form>

View File

@ -0,0 +1,3 @@
{
"Notes": "Notas"
}

View File

@ -1,11 +1,11 @@
<vn-card ng-show="$ctrl.observations.length" pad-medium> <vn-card ng-show="$ctrl.observations.length" pad-medium>
<vn-vertical pad-large> <vn-vertical pad-large>
<vn-title>Notas</vn-title> <vn-title>Notes</vn-title>
<vn-horizontal ng-repeat="n in $ctrl.observations" margin-small-bottom style="align-items: center;"> <vn-horizontal ng-repeat="n in $ctrl.observations" margin-small-bottom style="align-items: center;">
<vn-auto style="border-radius: .3em;" class="pad-small border-solid"> <vn-auto style="border-radius: .3em;" class="pad-small border-solid">
<div class="notes-date">{{n.created | date:'dd/MM/yyyy HH:mm'}}</div> <div class="notes-date">{{::n.created | date:'dd/MM/yyyy HH:mm'}}</div>
<div class="notes-date">{{n.employee.name}}</div> <div class="notes-date">{{::n.employee.name}}</div>
<div>{{n.text}}</div> <div>{{::n.text}}</div>
</vn-auto> </vn-auto>
</vn-horizontal> </vn-horizontal>
</vn-vertical> </vn-vertical>

View File

@ -0,0 +1,10 @@
{
"Client id": "Id cliente",
"Tax number": "NIF/CIF",
"Name": "Nombre",
"Social name": "Razon social",
"City": "Población",
"Postcode": "Código postal",
"Email": "Correo electrónico",
"Phone": "Teléfono"
}

View File

@ -1,22 +1,22 @@
<div pad-large style="min-width: 30em"> <div pad-large style="min-width: 30em">
<form ng-submit="$ctrl.onSearch()"> <form ng-submit="$ctrl.onSearch()">
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Id Cliente" model="$ctrl.filter.id" vn-focus></vn-textfield> <vn-textfield vn-one label="Client id" model="$ctrl.filter.id" vn-focus></vn-textfield>
<vn-textfield vn-one label="NIF/CIF" model="$ctrl.filter.fi"></vn-textfield> <vn-textfield vn-one label="Tax number" model="$ctrl.filter.fi"></vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Nombre" model="$ctrl.filter.name"></vn-textfield> <vn-textfield vn-one label="Name" model="$ctrl.filter.name"></vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Razon Social" model="$ctrl.filter.socialName"></vn-textfield> <vn-textfield vn-one label="Social name" model="$ctrl.filter.socialName"></vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Población" model="$ctrl.filter.city"></vn-textfield> <vn-textfield vn-one label="City" model="$ctrl.filter.city"></vn-textfield>
<vn-textfield vn-one label="Código Postal" model="$ctrl.filter.postcode"></vn-textfield> <vn-textfield vn-one label="Postcode" model="$ctrl.filter.postcode"></vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal> <vn-horizontal>
<vn-textfield vn-one label="Email" model="$ctrl.filter.email"></vn-textfield> <vn-textfield vn-one label="Email" model="$ctrl.filter.email"></vn-textfield>
<vn-textfield vn-one label="Teléfono" model="$ctrl.filter.phone"></vn-textfield> <vn-textfield vn-one label="Phone" model="$ctrl.filter.phone"></vn-textfield>
</vn-horizontal> </vn-horizontal>
<vn-horizontal margin-large-top> <vn-horizontal margin-large-top>
<vn-submit label="Search"></vn-submit> <vn-submit label="Search"></vn-submit>

View File

@ -1,4 +1,6 @@
{ {
"User": "Usuario",
"Enable web access": "Habilitar acceso web",
"Web access": "Acceso web", "Web access": "Acceso web",
"New password": "Nueva contraseña", "New password": "Nueva contraseña",
"Repeat password": "Repetir contraseña", "Repeat password": "Repetir contraseña",

View File

@ -10,13 +10,13 @@
<vn-card> <vn-card>
<vn-vertical pad-large> <vn-vertical pad-large>
<vn-title>Web access</vn-title> <vn-title>Web access</vn-title>
<vn-check label="Acceso Web" field="$ctrl.account.active"></vn-check> <vn-check label="Enable web access" field="$ctrl.account.active"></vn-check>
<vn-textfield label="Usuario" class="margin-medium-top" field="$ctrl.account.name" vn-focus></vn-textfield> <vn-textfield label="User" class="margin-medium-top" field="$ctrl.account.name" vn-focus></vn-textfield>
</vn-vertical> </vn-vertical>
</vn-card> </vn-card>
<vn-button-bar> <vn-button-bar>
<vn-submit label="Guardar"></vn-submit> <vn-submit label="Save"></vn-submit>
<vn-button label="Cambiar contraseña" vn-dialog="change-pass"></vn-button> <vn-button label="Change password" vn-dialog="change-pass"></vn-button>
</vn-button-bar> </vn-button-bar>
</form> </form>
<vn-dialog <vn-dialog

View File

@ -2,5 +2,8 @@
"Accept": "Accept", "Accept": "Accept",
"Cancel": "Cancel", "Cancel": "Cancel",
"Close": "Close", "Close": "Close",
"Clear": "Clear" "Clear": "Clear",
"Save": "Save",
"Add": "Add",
"Search": "Search"
} }

View File

@ -2,5 +2,8 @@
"Accept": "Aceptar", "Accept": "Aceptar",
"Cancel": "Cancelar", "Cancel": "Cancelar",
"Close": "Cerrar", "Close": "Cerrar",
"Clear": "Borrar" "Clear": "Borrar",
"Save": "Guardar",
"Add": "Añadir",
"Search": "Buscar"
} }

View File

@ -1,2 +1,2 @@
<h3 style="margin-top: 0;" class="margin-medium-bottom" ng-transclude> <h3 style="margin-top: 0;" class="margin-medium-bottom" ng-transclude translate>
</h3> </h3>