Merge branch 'dev' of ssh://git.verdnatura.es:/var/lib/git/salix into dev
This commit is contained in:
commit
bcd4cedbcd
|
@ -37,15 +37,28 @@
|
|||
},
|
||||
"description": "Datos facturación",
|
||||
"icon": "assignment"
|
||||
}, {
|
||||
},{
|
||||
"url": "/addresses",
|
||||
"state": "clientCard.addresses",
|
||||
"component": "ui-view",
|
||||
"abstract": true
|
||||
}, {
|
||||
"url": "/list",
|
||||
"state": "clientCard.addresses.list",
|
||||
"component": "vn-client-addresses",
|
||||
"params": {
|
||||
"client": "card.client"
|
||||
},
|
||||
"description": "Consignatarios",
|
||||
"icon": "local_shipping"
|
||||
}, {
|
||||
"url": "/create",
|
||||
"state": "clientCard.addresses.create",
|
||||
"component": "vn-address-create"
|
||||
}, {
|
||||
"url": "/:addressId/edit",
|
||||
"state": "clientCard.addresses.edit",
|
||||
"component": "vn-address-edit"
|
||||
}, {
|
||||
"url": "/web-access",
|
||||
"state": "clientCard.webAccess",
|
||||
|
@ -55,9 +68,14 @@
|
|||
},
|
||||
"description": "Acceso web",
|
||||
"icon": "language"
|
||||
}, {
|
||||
},{
|
||||
"url": "/notes",
|
||||
"state": "clientCard.notes",
|
||||
"component": "ui-view",
|
||||
"abstract": true
|
||||
}, {
|
||||
"url": "/list",
|
||||
"state": "clientCard.notes.list",
|
||||
"component": "vn-client-notes",
|
||||
"params": {
|
||||
"client": "card.client"
|
||||
|
@ -65,21 +83,13 @@
|
|||
"description": "Notas",
|
||||
"icon": "insert_drive_file"
|
||||
}, {
|
||||
"url": "/new-note",
|
||||
"state": "clientCard.newNote",
|
||||
"url": "/create",
|
||||
"state": "clientCard.notes.create",
|
||||
"component": "vn-new-note"
|
||||
},{
|
||||
"url": "/create",
|
||||
"state": "create",
|
||||
"component": "vn-client-create"
|
||||
}, {
|
||||
"url": "/address/create",
|
||||
"state": "clientCard.addressCreate",
|
||||
"component": "vn-address-create"
|
||||
}, {
|
||||
"url": "/address/:addressId",
|
||||
"state": "clientCard.addressEdit",
|
||||
"component": "vn-address-edit"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<div>{{i.city}}, {{i.province}}</div>
|
||||
<div>{{i.phone}}, {{i.mobile}}</div>
|
||||
</vn-auto>
|
||||
<a vn-empty ui-sref="clientCard.addressEdit({addressId: {{i.id}}})">
|
||||
<a vn-empty ui-sref="clientCard.addresses.edit({addressId: {{i.id}}})">
|
||||
<vn-icon-button icon="edit"></vn-icon-button>
|
||||
</a>
|
||||
</vn-horizontal>
|
||||
|
@ -26,7 +26,7 @@
|
|||
<vn-paging index="index"></vn-paging>
|
||||
<vn-float-button
|
||||
fixed-bottom-right
|
||||
ui-sref="clientCard.addressCreate"
|
||||
ui-sref="clientCard.addresses.create"
|
||||
icon="add">
|
||||
</vn-float-button>
|
||||
</vn-vertical>
|
||||
|
|
|
@ -26,7 +26,7 @@ export const COMPONENT = {
|
|||
};
|
||||
|
||||
this.newObservation = () => {
|
||||
$state.go("clientCard.newNote", {id: this.client.id});
|
||||
$state.go("clientCard.notes.create", {id: this.client.id});
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,8 +1,34 @@
|
|||
import ngModule from '../../module';
|
||||
|
||||
export default class MenuActions {
|
||||
constructor($state, $transitions) {
|
||||
this.$state = $state;
|
||||
this.deregisterCallback = $transitions.onSuccess({},
|
||||
transition => this.switchItem());
|
||||
}
|
||||
switchItem() {
|
||||
if (!this.items || !this.items.length) return;
|
||||
|
||||
let stateName = this.$state.current.name.replace('create', 'list').replace('edit', 'list');
|
||||
|
||||
for (let i = 0; i < this.items.length; i++) {
|
||||
this.items[i].active = (this.items[i].href === stateName);
|
||||
}
|
||||
}
|
||||
$onInit() {
|
||||
this.switchItem();
|
||||
}
|
||||
$onDestroy() {
|
||||
this.deregisterCallback();
|
||||
}
|
||||
|
||||
}
|
||||
MenuActions.$inject = ['$state', '$transitions'];
|
||||
|
||||
ngModule.component('vnActions', {
|
||||
template: require('./actions.html'),
|
||||
bindings: {
|
||||
items: '<'
|
||||
}
|
||||
},
|
||||
controller: MenuActions
|
||||
});
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<li>
|
||||
<li ng-class="{active: $ctrl.item.active}">
|
||||
<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.icon}}</i>
|
||||
|
|
|
@ -2,3 +2,6 @@ vn-menu-item a:hover {
|
|||
color: white !important;
|
||||
background-color: #424242;
|
||||
}
|
||||
vn-menu-item li.active{
|
||||
background-color: #E6E6E6;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue