This commit is contained in:
Juan Ferrer Toribio 2017-01-23 11:13:09 +01:00
commit c81a23bb22
4 changed files with 19 additions and 10 deletions

View File

@ -1,7 +1,16 @@
import {module} from './module'; import {module} from './module';
run.$inject = ['$rootScope']; const HOOK_ABORTED_TRANSITION = 3;
export function run ($rootScope) {
$rootScope.$on('$viewContentLoaded', () => {}) run.$inject = ['$rootScope', '$state'];
export function run ($rootScope, $state) {
$rootScope.$on('$viewContentLoaded', () => {});
window.myAppErrorLog = [];
$state.defaultErrorHandler(function(error) {
if (error.type === HOOK_ABORTED_TRANSITION)
window.myAppErrorLog.push(error);
});
} }
module.run(run); module.run(run);

View File

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

View File

@ -13,4 +13,4 @@ vn-item-client a:hover {
.vn-item-client-name{ .vn-item-client-name{
font-family: raleway-bold; font-family: raleway-bold;
} }

View File

@ -7,7 +7,7 @@ module.exports = function(Address) {
Address.observe('before save', function (ctx, next) { Address.observe('before save', function (ctx, next) {
var data = getData(ctx); var data = getData(ctx);
if (data.isEnabled && data.default) { if (data.enabled && data.default) {
ctx.Model.update({client: data.client}, {default: false}); ctx.Model.update({client: data.client}, {default: false});
} }
next(); next();