Rutas en plural
This commit is contained in:
parent
b80fd31df1
commit
bbc2cf693a
|
@ -1,7 +1,7 @@
|
|||
<li>
|
||||
<a href="{{$ctrl.item.href}}" style="display: block; text-decoration: none; color: inherit; padding: .5em 2em;">
|
||||
<a ui-sref="{{$ctrl.item.href}}" style="display: block; text-decoration: none; color: inherit; padding: .5em 2em;">
|
||||
<i class="material-icons" style="float: right; margin-left: .4em;">keyboard_arrow_right</i>
|
||||
<i class="material-icons" style="vertical-align: middle; margin-right: .4em;">{{$ctrl.item.image}}</i>
|
||||
<span>{{$ctrl.item.text}}</span>
|
||||
<i class="material-icons" style="vertical-align: middle; margin-right: .4em;">{{$ctrl.item.icon}}</i>
|
||||
<span>{{$ctrl.item.description}}</span>
|
||||
</a>
|
||||
</li>
|
|
@ -1,7 +1,7 @@
|
|||
<form ng-submit="$ctrl.submit()" pad-large>
|
||||
<vn-title>Datos básicos</vn-title>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-one label="Alias" name"alias" model="$ctrl.model"></vn-textfield>
|
||||
<vn-textfield vn-one label="Alias" name="alias" model="$ctrl.model"></vn-textfield>
|
||||
<vn-textfield vn-one label="NIF/CIF" name="fi" model="$ctrl.model"></vn-textfield>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<vn-vertical class="full-height">
|
||||
<vn-topbar></vn-topbar>
|
||||
<vn-horizontal class="full-height">
|
||||
<vn-empty class="bg-content" style="width: 18em">
|
||||
<vn-descriptor descriptor = "$ctrl.descriptor"></vn-descriptor>
|
|
@ -0,0 +1,30 @@
|
|||
import template from './card.html';
|
||||
import {module} from '../../module';
|
||||
|
||||
const _NAME = 'clientClient';
|
||||
// export const NAME = module.getName(_NAME);
|
||||
export const NAME = "vnClientCard";
|
||||
export const COMPONENT = {
|
||||
template: template,
|
||||
controller: function() {
|
||||
let clientRoutes = routes['src/client/routes.js'].routes;
|
||||
|
||||
this.items = [];
|
||||
clientRoutes.forEach ((i) => {
|
||||
if (i.description)
|
||||
this.items.push ({
|
||||
description: i.description,
|
||||
icon: i.icon,
|
||||
href: i.state
|
||||
});
|
||||
});
|
||||
|
||||
this.descriptor = {
|
||||
clientId: "Cliente 1231",
|
||||
name: "Floristeria Lola",
|
||||
phone: "987 654 321"
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
module.component(NAME, COMPONENT);
|
|
@ -1,5 +1,5 @@
|
|||
export {NAME as CLIENT_CLIENT,
|
||||
COMPONENT as CLIENT_CLIENT_COMPONENT} from './client/client';
|
||||
export {NAME as CLIENT_CARD,
|
||||
COMPONENT as CLIENT_CARD_COMPONENT} from './card/card';
|
||||
export {NAME as CLIENT_BASIC_DATA_INDEX,
|
||||
COMPONENT as CLIENT_BASIC_DATA_INDEX_COMPONENT} from './basic-data/index';
|
||||
export {NAME as CLIENT_ADDRESSES,
|
||||
|
@ -12,3 +12,5 @@ export {NAME as CLIENT_WEB_ACCESS,
|
|||
COMPONENT as CLIENT_WEB_ACCESS_COMPONENT} from './web-access/index';
|
||||
export {NAME as CLIENT_DESCRIPTOR,
|
||||
COMPONENT as CLIENT_DESCRIPTOR_COMPONENT} from './descriptor/descriptor';
|
||||
export {NAME as CLIENT_NOTES,
|
||||
COMPONENT as CLIENT_NOTES_COMPONENT} from './notes/index';
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
import template from './client.html';
|
||||
import {module} from '../../module';
|
||||
|
||||
const _NAME = 'clientClient';
|
||||
// export const NAME = module.getName(_NAME);
|
||||
export const NAME = "vnClientClient";
|
||||
export const COMPONENT = {
|
||||
template: template,
|
||||
controller: function() {
|
||||
this.items = [
|
||||
{text: "Datos básicos", image: "person", href: "#/client/basic-data"},
|
||||
{text: "Datos facturación", image: "assignment", href: "#/client/fiscal-data"},
|
||||
{text: "Acceso web", image: "language", href: "#/client/web-access"},
|
||||
{text: "Consignatarios", image: "local_shipping", href: "#/client/addresses"},
|
||||
{text: "Notas", image: "insert_drive_file", href: "#/client/notes"}
|
||||
];
|
||||
this.descriptor =
|
||||
{clientId: "Cliente 1231",
|
||||
name: "Floristeria Lola",
|
||||
phone: "987 654 321"}
|
||||
;
|
||||
}
|
||||
};
|
||||
module.component(NAME, COMPONENT);
|
|
@ -19,4 +19,5 @@ export const COMPONENT = {
|
|||
};
|
||||
}
|
||||
};
|
||||
//COMPONENT.controller.$inject = ['$http'];
|
||||
module.component(NAME, COMPONENT);
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
<form ng-submit="$ctrl.submit()" pad-large>
|
||||
<vn-title>Notas</vn-title>
|
||||
<vn-textfield label="Notas" class="padd-medium-top" name="notes" model="$ctrl.model"></vn-textfield>
|
||||
<vn-submit text="Guardar"></vn-submit>
|
||||
</form>
|
|
@ -0,0 +1,8 @@
|
|||
import template from './index.html';
|
||||
import {module} from '../../module';
|
||||
|
||||
export const NAME = 'vnClientNotes';
|
||||
export const COMPONENT = {
|
||||
template: template
|
||||
};
|
||||
module.component(NAME, COMPONENT);
|
|
@ -1,30 +1,42 @@
|
|||
{
|
||||
module: 'crud',
|
||||
module: "crud",
|
||||
routes: [{
|
||||
url: '/clients',
|
||||
state: 'clients',
|
||||
component: 'vn-client-index',
|
||||
description: '',
|
||||
image: '',
|
||||
url: "/clients",
|
||||
state: "clients",
|
||||
component: "vn-client-index"
|
||||
},{
|
||||
url: '/client',
|
||||
state: 'client',
|
||||
component: 'vn-client-client',
|
||||
url: "/clients/:id",
|
||||
state: "clientCard",
|
||||
component: "vn-client-card"
|
||||
},{
|
||||
url: '/basic-data',
|
||||
state: 'client.basicdata',
|
||||
component: 'vn-client-basic-data',
|
||||
url: "/basic-data",
|
||||
state: "clientCard.basicData",
|
||||
component: "vn-client-basic-data",
|
||||
description: "Datos básicos",
|
||||
icon: "person"
|
||||
},{
|
||||
url: '/addresses',
|
||||
state: 'client.addresses',
|
||||
component: 'vn-client-addresses',
|
||||
url: "/fiscal-data",
|
||||
state: "clientCard.fiscalData",
|
||||
component: "vn-client-fiscal-data",
|
||||
description: "Datos facturación",
|
||||
icon: "assignment"
|
||||
},{
|
||||
url: '/fiscal-data',
|
||||
state: 'client.fiscaldata',
|
||||
component: 'vn-client-fiscal-data',
|
||||
url: "/addresses",
|
||||
state: "clientCard.addresses",
|
||||
component: "vn-client-addresses",
|
||||
description: "Consignatarios",
|
||||
icon: "local_shipping"
|
||||
},{
|
||||
url: '/web-access',
|
||||
state: 'client.webaccess',
|
||||
component: 'vn-client-web-access',
|
||||
url: "/web-access",
|
||||
state: "clientCard.webAccess",
|
||||
component: "vn-client-web-access",
|
||||
description: "Acceso web",
|
||||
icon: "language"
|
||||
},{
|
||||
url: "/notes",
|
||||
state: "clientCard.notes",
|
||||
component: "vn-client-notes",
|
||||
description: "Notas",
|
||||
icon: "insert_drive_file"
|
||||
}]
|
||||
}
|
Loading…
Reference in New Issue