Consignatarios

This commit is contained in:
Juan Ferrer Toribio 2016-11-28 18:21:55 +01:00
parent 35462251ba
commit 76ed8478c1
9 changed files with 97 additions and 78 deletions

View File

@ -1,5 +1,5 @@
<vn-horizontal>
<ul style="list-style-type: none; margin: 0; padding: 0; width: 100%;">
<ul style="list-style-type: none; margin: 0; padding: 0; width: 100%; color: #666;">
<vn-menu-item ng-repeat="item in $ctrl.items" item = "item"></vn-menu-item>
</ul>
</vn-horizontal>

View File

@ -0,0 +1,27 @@
<vn-vertical full-height pad-large style="box-sizing: border-box;">
<vn-horizontal>
<h3 style="margin-top: 0;">Addresses</h3>
</vn-horizontal>
<vn-horizontal style="border-bottom: .1em dashed; text-transform: uppercase; text-align: center;" class="pad-medium-bottom">
<vn-empty style="width: 7em;">Default</vn-empty>
<vn-auto>Consignee</vn-auto>
<vn-empty style="width: 7em;">Enabled</vn-empty>
</vn-horizontal>
<vn-horizontal ng-repeat="i in $ctrl.addresses" style="align-items: center;" class="pad-medium-top">
<vn-empty style="width: 7em; text-align: center;">
<input type="radio" name="default"/>
</vn-empty>
<vn-auto vn-one style="border: 1px solid black; border-radius: .5em;" class="pad-small">
<button style="float: right;">
Edit
</button>
<h5>{{i.consignee}}</h5>
<div>{{i.street}}</div>
<div>{{i.city}}, {{i.province}}</div>
<div>{{i.phone}}, {{i.mobile}}</div>
</vn-auto>
<vn-empty style="width: 7em; text-align: center;">
<input type="checkbox" name="enabled" model="i.enabled"/>
</vn-empty>
</vn-horizontal>
</vn-vertical>

View File

@ -0,0 +1,32 @@
import template from './index.html';
import {module} from '../../module';
export const NAME = 'vnClientAddresses';
export const COMPONENT = {
template: template,
controller: function ($http)
{
this.addresses = [{
consignee: 'Consignee 1',
street: 'Street',
city: 'City',
postcode: '46600',
province: 'Province',
country: 'Country',
phone: 'XX-XXX-XX-XX',
mobile: 'XX-6XX-XX-XX',
enabled: true
},{
consignee: 'Consignee 2',
street: 'Street',
city: 'City',
postcode: '46600',
province: 'Province',
country: 'Country',
phone: 'XX-XXX-XX-XX',
mobile: 'XX-6XX-XX-XX',
enabled: true
}];
},
};
module.component(NAME, COMPONENT);

View File

@ -1,19 +1,14 @@
import template from './index.html';
import {module} from '../../module';
export const _NAME = 'customerBasicData';
//export const NAME = module.getName(_NAME);
export const NAME = 'vnCustomerBasicData';
export const NAME = 'vnClientBasicData';
export const COMPONENT = {
template: template,
controller: function ($http)
{
this.submit = function ()
{
controller: function ($http) {
this.submit = function () {
$http.post('/client/api/Clients', this.model).then (
() => console.log ('OK'),
() => console.log ('ER')
(json) => console.log (json.statusText),
(json) => console.error (json.data.error.message)
);
};
},

View File

@ -1,4 +1,6 @@
export {NAME as CLIENT_BASIC_DATA_INDEX,
COMPONENT as CLIENT_BASIC_DATA_INDEX_COMPONENT} from './basic-data/index';
export {NAME as CLIENT_INDEX,
COMPONENT as CLIENT_INDEX_COMPONENT} from './index/index';
export {NAME as CLIENT_BASIC_DATA_INDEX,
COMPONENT as CLIENT_BASIC_DATA_INDEX_COMPONENT} from './basic-data/index';
export {NAME as CLIENT_ADDRESSES,
COMPONENT as CLIENT_ADDRESSES_COMPONENT} from './addresses/index';

View File

@ -1,36 +0,0 @@
<vn-vertical full-height pad-medium>
<vn-horizontal>
<vn-one>
<h3>Datos básicos</h3>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one>
<vn-textfield label="Alias" name"alias" model="customer.alias"></vn-textfield>
<vn-textfield label="NIF/CIF" name="fi" model="customer.fi"></vn-textfield>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one>
<vn-textfield label="Razón social" name"socialName" model="customer.socialName"></vn-textfield>
<vn-date-picker label="Fecha alta" name"dischargeDate" model="customer.dischargeDate"></vn-date-picker>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one>
<vn-textfield label="Contacto" name="contact" model="customer.contact"></vn-textfield>
<vn-textfield label="Teléfono" name="telefono" model="customer.phone"></vn-textfield>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one>
<vn-textfield label="Calidad" name="quality" model="customer.quality"></vn-textfield>
<vn-combo label="Comercial" name="salesPerson" model="customer.salesPerson"></vn-combo>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one>
<vn-button class="colored" text="Guardar"></vn-button>
</vn-one>
</vn-horizontal>
</vn-vertical>

View File

@ -1,11 +0,0 @@
import template from './databasic.html';
import {module} from '../../module';
export const _NAME = 'clientDataBasic';
//export const NAME = module.getName(_NAME);
export const NAME = "vnClientDataBasic";
export const COMPONENT = {
template: template
};
module.component(NAME, COMPONENT);

View File

@ -1,20 +1,20 @@
[
{
url: '/client',
state: 'client',
template: '<vn-client-index full-height></vn-client-index>',
module: 'crud',
description: '',
image: '',
},
{
url: '/basic-data',
state: 'client.basicdata',
template: '<vn-customer-basic-data full-height></vn-customer-basic-data>',
module: 'crud',
description: '',
image: '',
}
]
[{
url: '/client',
state: 'client',
template: '<vn-client-index full-height></vn-client-index>',
module: 'crud',
description: '',
image: '',
},{
url: '/basic-data',
state: 'client.basicdata',
template: '<vn-client-basic-data full-height></vn-client-basic-data>',
module: 'crud'
},{
url: '/addresses',
state: 'client.addresses',
template: '<vn-client-addresses full-height></vn-client-addresses>',
module: 'crud'
}]

View File

@ -11,6 +11,10 @@
"type": "string",
"required": "true"
},
"consignee": {
"type": "string",
"required": "true"
},
"city": {
"type": "string",
"required": "true"
@ -25,8 +29,14 @@
"type": "string",
"required": "true"
},
"enabled": {
"type": "boolean"
},
"phone": {
"type": "string"
},
"mobile": {
"type": "string"
}
}
}