Merge branch 'dev' of ssh://git.verdnatura.es:/var/lib/git/salix into dev
This commit is contained in:
commit
bcd4cedbcd
|
@ -40,12 +40,25 @@
|
||||||
},{
|
},{
|
||||||
"url": "/addresses",
|
"url": "/addresses",
|
||||||
"state": "clientCard.addresses",
|
"state": "clientCard.addresses",
|
||||||
|
"component": "ui-view",
|
||||||
|
"abstract": true
|
||||||
|
}, {
|
||||||
|
"url": "/list",
|
||||||
|
"state": "clientCard.addresses.list",
|
||||||
"component": "vn-client-addresses",
|
"component": "vn-client-addresses",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "card.client"
|
"client": "card.client"
|
||||||
},
|
},
|
||||||
"description": "Consignatarios",
|
"description": "Consignatarios",
|
||||||
"icon": "local_shipping"
|
"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",
|
"url": "/web-access",
|
||||||
"state": "clientCard.webAccess",
|
"state": "clientCard.webAccess",
|
||||||
|
@ -58,6 +71,11 @@
|
||||||
},{
|
},{
|
||||||
"url": "/notes",
|
"url": "/notes",
|
||||||
"state": "clientCard.notes",
|
"state": "clientCard.notes",
|
||||||
|
"component": "ui-view",
|
||||||
|
"abstract": true
|
||||||
|
}, {
|
||||||
|
"url": "/list",
|
||||||
|
"state": "clientCard.notes.list",
|
||||||
"component": "vn-client-notes",
|
"component": "vn-client-notes",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "card.client"
|
"client": "card.client"
|
||||||
|
@ -65,21 +83,13 @@
|
||||||
"description": "Notas",
|
"description": "Notas",
|
||||||
"icon": "insert_drive_file"
|
"icon": "insert_drive_file"
|
||||||
}, {
|
}, {
|
||||||
"url": "/new-note",
|
"url": "/create",
|
||||||
"state": "clientCard.newNote",
|
"state": "clientCard.notes.create",
|
||||||
"component": "vn-new-note"
|
"component": "vn-new-note"
|
||||||
},{
|
},{
|
||||||
"url": "/create",
|
"url": "/create",
|
||||||
"state": "create",
|
"state": "create",
|
||||||
"component": "vn-client-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.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.addressEdit({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>
|
||||||
</a>
|
</a>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<vn-paging index="index"></vn-paging>
|
<vn-paging index="index"></vn-paging>
|
||||||
<vn-float-button
|
<vn-float-button
|
||||||
fixed-bottom-right
|
fixed-bottom-right
|
||||||
ui-sref="clientCard.addressCreate"
|
ui-sref="clientCard.addresses.create"
|
||||||
icon="add">
|
icon="add">
|
||||||
</vn-float-button>
|
</vn-float-button>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
|
|
|
@ -26,7 +26,7 @@ export const COMPONENT = {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.newObservation = () => {
|
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';
|
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', {
|
ngModule.component('vnActions', {
|
||||||
template: require('./actions.html'),
|
template: require('./actions.html'),
|
||||||
bindings: {
|
bindings: {
|
||||||
items: '<'
|
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;">
|
<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="float: right; margin-left: .4em;">keyboard_arrow_right</i>
|
||||||
<i class="material-icons" style="vertical-align: middle; margin-right: .4em;">{{$ctrl.item.icon}}</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;
|
color: white !important;
|
||||||
background-color: #424242;
|
background-color: #424242;
|
||||||
}
|
}
|
||||||
|
vn-menu-item li.active{
|
||||||
|
background-color: #E6E6E6;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue