Client routes refactor #261
This commit is contained in:
parent
0e077314a6
commit
3bb1c92cf5
|
@ -5,25 +5,39 @@
|
||||||
"validations" : true,
|
"validations" : true,
|
||||||
"routes": [
|
"routes": [
|
||||||
{
|
{
|
||||||
"url": "/clients?q",
|
"url": "/client",
|
||||||
"state": "clients",
|
"state": "client",
|
||||||
"component": "vn-client-index",
|
"abstract": true,
|
||||||
|
"component": "ui-view",
|
||||||
"acl": ["employee"]
|
"acl": ["employee"]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"url": "/index?q",
|
||||||
|
"state": "client.index",
|
||||||
|
"component": "vn-client-index"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"url": "/create",
|
"url": "/create",
|
||||||
"state": "create",
|
"state": "client.create",
|
||||||
"component": "vn-client-create"
|
"component": "vn-client-create"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/clients/:id",
|
"url": "/:id",
|
||||||
"state": "clientCard",
|
"state": "client.card",
|
||||||
"abstract": true,
|
"abstract": true,
|
||||||
"component": "vn-client-card"
|
"component": "vn-client-card"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"url": "/summary",
|
||||||
|
"state": "client.card.summary",
|
||||||
|
"component": "vn-client-summary",
|
||||||
|
"params": {
|
||||||
|
"client": "$ctrl.client"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"url": "/basic-data",
|
"url": "/basic-data",
|
||||||
"state": "clientCard.basicData",
|
"state": "client.card.basicData",
|
||||||
"component": "vn-client-basic-data",
|
"component": "vn-client-basic-data",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
|
@ -35,7 +49,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/fiscal-data",
|
"url": "/fiscal-data",
|
||||||
"state": "clientCard.fiscalData",
|
"state": "client.card.fiscalData",
|
||||||
"component": "vn-client-fiscal-data",
|
"component": "vn-client-fiscal-data",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
|
@ -47,7 +61,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/billing-data",
|
"url": "/billing-data",
|
||||||
"state": "clientCard.billingData",
|
"state": "client.card.billingData",
|
||||||
"component": "vn-client-billing-data",
|
"component": "vn-client-billing-data",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
|
@ -58,15 +72,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/addresses",
|
"url": "/address",
|
||||||
"state": "clientCard.addresses",
|
"state": "client.card.address",
|
||||||
"component": "ui-view",
|
"component": "ui-view",
|
||||||
"abstract": true
|
"abstract": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/list",
|
"url": "/index",
|
||||||
"state": "clientCard.addresses.list",
|
"state": "client.card.address.index",
|
||||||
"component": "vn-client-addresses",
|
"component": "vn-client-address-index",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
},
|
},
|
||||||
|
@ -77,17 +91,17 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/create",
|
"url": "/create",
|
||||||
"state": "clientCard.addresses.create",
|
"state": "client.card.address.create",
|
||||||
"component": "vn-address-create"
|
"component": "vn-client-address-create"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/:addressId/edit",
|
"url": "/:addressId/edit",
|
||||||
"state": "clientCard.addresses.edit",
|
"state": "client.card.address.edit",
|
||||||
"component": "vn-address-edit"
|
"component": "vn-client-address-edit"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/web-access",
|
"url": "/web-access",
|
||||||
"state": "clientCard.webAccess",
|
"state": "client.card.webAccess",
|
||||||
"component": "vn-client-web-access",
|
"component": "vn-client-web-access",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
|
@ -98,15 +112,15 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/notes",
|
"url": "/note",
|
||||||
"state": "clientCard.notes",
|
"state": "client.card.note",
|
||||||
"component": "ui-view",
|
"component": "ui-view",
|
||||||
"abstract": true
|
"abstract": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/list",
|
"url": "/index",
|
||||||
"state": "clientCard.notes.list",
|
"state": "client.card.note.index",
|
||||||
"component": "vn-client-notes",
|
"component": "vn-client-note",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
},
|
},
|
||||||
|
@ -117,19 +131,19 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/create",
|
"url": "/create",
|
||||||
"state": "clientCard.notes.create",
|
"state": "client.card.note.create",
|
||||||
"component": "vn-note-create"
|
"component": "vn-note-create"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/credit",
|
"url": "/credit",
|
||||||
"abstract": true,
|
"abstract": true,
|
||||||
"state": "clientCard.credit",
|
"state": "client.card.credit",
|
||||||
"component": "ui-view"
|
"component": "ui-view"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/list",
|
"url": "/index",
|
||||||
"state": "clientCard.credit.list",
|
"state": "client.card.credit.index",
|
||||||
"component": "vn-client-credit-list",
|
"component": "vn-client-credit-index",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
},
|
},
|
||||||
|
@ -137,9 +151,10 @@
|
||||||
"description": "Credit",
|
"description": "Credit",
|
||||||
"icon": "credit_card"
|
"icon": "credit_card"
|
||||||
}
|
}
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"url": "/create",
|
"url": "/create",
|
||||||
"state": "clientCard.credit.create",
|
"state": "client.card.credit.create",
|
||||||
"component": "vn-client-credit-create",
|
"component": "vn-client-credit-create",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
|
@ -148,13 +163,13 @@
|
||||||
{
|
{
|
||||||
"url": "/greuge",
|
"url": "/greuge",
|
||||||
"abstract": true,
|
"abstract": true,
|
||||||
"state": "clientCard.greuge",
|
"state": "client.card.greuge",
|
||||||
"component": "ui-view"
|
"component": "ui-view"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/list",
|
"url": "/index",
|
||||||
"state": "clientCard.greuge.list",
|
"state": "client.card.greuge.index",
|
||||||
"component": "vn-client-greuge-list",
|
"component": "vn-client-greuge-index",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
},
|
},
|
||||||
|
@ -165,7 +180,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/create",
|
"url": "/create",
|
||||||
"state": "clientCard.greuge.create",
|
"state": "client.card.greuge.create",
|
||||||
"component": "vn-client-greuge-create",
|
"component": "vn-client-greuge-create",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
|
@ -173,7 +188,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/mandate",
|
"url": "/mandate",
|
||||||
"state": "clientCard.mandate",
|
"state": "client.card.mandate",
|
||||||
"component": "vn-client-mandate",
|
"component": "vn-client-mandate",
|
||||||
"menu": {
|
"menu": {
|
||||||
"description": "Mandate",
|
"description": "Mandate",
|
||||||
|
@ -181,9 +196,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/invoices",
|
"url": "/invoice",
|
||||||
"state": "clientCard.invoices",
|
"state": "client.card.invoice",
|
||||||
"component": "vn-client-invoices",
|
"component": "vn-client-invoice",
|
||||||
"menu": {
|
"menu": {
|
||||||
"description": "Invoices",
|
"description": "Invoices",
|
||||||
"icon": "icon-invoices"
|
"icon": "icon-invoices"
|
||||||
|
@ -192,13 +207,13 @@
|
||||||
{
|
{
|
||||||
"url": "/recovery",
|
"url": "/recovery",
|
||||||
"abstract": true,
|
"abstract": true,
|
||||||
"state": "clientCard.recovery",
|
"state": "client.card.recovery",
|
||||||
"component": "ui-view"
|
"component": "ui-view"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/list",
|
"url": "/index",
|
||||||
"state": "clientCard.recovery.list",
|
"state": "client.card.recovery.index",
|
||||||
"component": "vn-client-recovery-list",
|
"component": "vn-client-recovery-index",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
},
|
},
|
||||||
|
@ -206,32 +221,26 @@
|
||||||
"description": "Recovery",
|
"description": "Recovery",
|
||||||
"icon": "icon-recovery"
|
"icon": "icon-recovery"
|
||||||
}
|
}
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"url": "/create",
|
"url": "/create",
|
||||||
"state": "clientCard.recovery.create",
|
"state": "client.card.recovery.create",
|
||||||
"component": "vn-client-recovery-create",
|
"component": "vn-client-recovery-create",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
}
|
}
|
||||||
}, {
|
},
|
||||||
"url": "/summary",
|
|
||||||
"state": "clientCard.summary",
|
|
||||||
"component": "vn-client-summary",
|
|
||||||
"params": {
|
|
||||||
"client": "$ctrl.client"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"url": "/credit-classification",
|
"url": "/credit-insurance",
|
||||||
"abstract": true,
|
"abstract": true,
|
||||||
"state": "clientCard.creditClassification",
|
"state": "client.card.creditInsurance",
|
||||||
"component": "ui-view",
|
"component": "ui-view",
|
||||||
"acl": ["creditInsurance"]
|
"acl": ["creditInsurance"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/list",
|
"url": "/index",
|
||||||
"state": "clientCard.creditClassification.list",
|
"state": "client.card.creditInsurance.index",
|
||||||
"component": "vn-client-credit-classification-list",
|
"component": "vn-client-credit-insurance-index",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
},
|
},
|
||||||
|
@ -243,31 +252,31 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/create",
|
"url": "/create",
|
||||||
"state": "clientCard.creditClassification.create",
|
"state": "client.card.creditInsurance.create",
|
||||||
"component": "vn-client-credit-classification-create",
|
"component": "vn-client-credit-insurance-create",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/credit-insurance",
|
"url": "/insurance",
|
||||||
"abstract": true,
|
"abstract": true,
|
||||||
"state": "clientCard.creditInsurance",
|
"state": "client.card.creditInsurance.insurance",
|
||||||
"component": "ui-view",
|
"component": "ui-view",
|
||||||
"acl": ["creditInsurance"]
|
"acl": ["creditInsurance"]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/:classificationId/list",
|
"url": "/:classificationId/index",
|
||||||
"state": "clientCard.creditInsurance.list",
|
"state": "client.card.creditInsurance.insurance.index",
|
||||||
"component": "vn-client-credit-insurance-list",
|
"component": "vn-client-credit-insurance-insurance-index",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"url": "/:classificationId/create",
|
"url": "/:classificationId/create",
|
||||||
"state": "clientCard.creditInsurance.create",
|
"state": "client.card.creditInsurance.insurance.create",
|
||||||
"component": "vn-client-credit-insurance-create",
|
"component": "vn-client-credit-insurance-insurance-create",
|
||||||
"params": {
|
"params": {
|
||||||
"client": "$ctrl.client"
|
"client": "$ctrl.client"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import './address-create.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnAddressCreate', () => {
|
describe('Component vnAddressCreate', () => {
|
|
@ -6,7 +6,7 @@
|
||||||
save="post"
|
save="post"
|
||||||
form="form">
|
form="form">
|
||||||
</vn-watcher>
|
</vn-watcher>
|
||||||
<form name="form" ng-submit="watcher.submitGo('clientCard.addresses.list')">
|
<form name="form" ng-submit="watcher.submitGo('client.card.addresses.index')">
|
||||||
<vn-card pad-large>
|
<vn-card pad-large>
|
||||||
<vn-title>Address</vn-title>
|
<vn-title>Address</vn-title>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
<button
|
<button
|
||||||
class="mdl-button mdl-button--raised mdl-button--colored"
|
class="mdl-button mdl-button--raised mdl-button--colored"
|
||||||
translate
|
translate
|
||||||
ui-sref="clientCard.addresses.list"
|
ui-sref="client.card.address.index"
|
||||||
>Cancel
|
>Cancel
|
||||||
</button>
|
</button>
|
||||||
</vn-button-bar>
|
</vn-button-bar>
|
|
@ -1,4 +1,4 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
|
|
||||||
export default class Controller {
|
export default class Controller {
|
||||||
constructor($state) {
|
constructor($state) {
|
||||||
|
@ -10,7 +10,7 @@ export default class Controller {
|
||||||
}
|
}
|
||||||
Controller.$inject = ['$state'];
|
Controller.$inject = ['$state'];
|
||||||
|
|
||||||
ngModule.component('vnAddressCreate', {
|
ngModule.component('vnClientAddressCreate', {
|
||||||
template: require('./address-create.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller
|
controller: Controller
|
||||||
});
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
import './address-edit.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnAddressEdit', () => {
|
describe('Component vnAddressEdit', () => {
|
|
@ -1,4 +1,4 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
|
|
||||||
export default class Controller {
|
export default class Controller {
|
||||||
constructor($state, $scope, $http, $q, $translate, vnApp) {
|
constructor($state, $scope, $http, $q, $translate, vnApp) {
|
||||||
|
@ -109,16 +109,16 @@ export default class Controller {
|
||||||
);
|
);
|
||||||
} else if (canSubmitWatcher && !canSubmitObservations) {
|
} else if (canSubmitWatcher && !canSubmitObservations) {
|
||||||
this.$scope.watcher.submit().then(() => {
|
this.$scope.watcher.submit().then(() => {
|
||||||
this.$state.go('clientCard.addresses.list', {id: this.$state.params.id});
|
this.$state.go('client.card.addresses.list', {id: this.$state.params.id});
|
||||||
this.card.reload();
|
this.card.reload();
|
||||||
});
|
});
|
||||||
} else if (!canSubmitWatcher && canSubmitObservations) {
|
} else if (!canSubmitWatcher && canSubmitObservations) {
|
||||||
this._submitObservations(observationsObj).then(() => {
|
this._submitObservations(observationsObj).then(() => {
|
||||||
this.$state.go('clientCard.addresses.list', {id: this.$state.params.id});
|
this.$state.go('client.card.addresses.list', {id: this.$state.params.id});
|
||||||
});
|
});
|
||||||
} else if (canSubmitWatcher && canSubmitObservations) {
|
} else if (canSubmitWatcher && canSubmitObservations) {
|
||||||
this.$q.all([this.$scope.watcher.submit(), this._submitObservations(observationsObj)]).then(() => {
|
this.$q.all([this.$scope.watcher.submit(), this._submitObservations(observationsObj)]).then(() => {
|
||||||
this.$state.go('clientCard.addresses.list', {id: this.$state.params.id});
|
this.$state.go('client.card.addresses.list', {id: this.$state.params.id});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.vnApp.showMessage(
|
this.vnApp.showMessage(
|
||||||
|
@ -147,8 +147,8 @@ export default class Controller {
|
||||||
}
|
}
|
||||||
Controller.$inject = ['$state', '$scope', '$http', '$q', '$translate', 'vnApp'];
|
Controller.$inject = ['$state', '$scope', '$http', '$q', '$translate', 'vnApp'];
|
||||||
|
|
||||||
ngModule.component('vnAddressEdit', {
|
ngModule.component('vnClientAddressEdit', {
|
||||||
template: require('./address-edit.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
require: {
|
require: {
|
||||||
card: '^vnClientCard'
|
card: '^vnClientCard'
|
|
@ -38,7 +38,7 @@
|
||||||
<span>{{::observation.description}}</span>
|
<span>{{::observation.description}}</span>
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
<a pad-medium-h vn-auto ui-sref="clientCard.addresses.edit({addressId: {{::address.id}}})">
|
<a pad-medium-h vn-auto ui-sref="client.card.address.edit({addressId: {{::address.id}}})">
|
||||||
<vn-icon-button icon="edit"></vn-icon-button>
|
<vn-icon-button icon="edit"></vn-icon-button>
|
||||||
</a>
|
</a>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
<vn-float-button
|
<vn-float-button
|
||||||
vn-bind="+"
|
vn-bind="+"
|
||||||
fixed-bottom-right
|
fixed-bottom-right
|
||||||
ui-sref="clientCard.addresses.create"
|
ui-sref="client.card.address.create"
|
||||||
icon="add"
|
icon="add"
|
||||||
label="Add">
|
label="Add">
|
||||||
</vn-float-button>
|
</vn-float-button>
|
|
@ -1,6 +1,6 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
|
|
||||||
class ClientAddresses {
|
class Controller {
|
||||||
constructor($http, $scope) {
|
constructor($http, $scope) {
|
||||||
this.$http = $http;
|
this.$http = $http;
|
||||||
this.$scope = $scope;
|
this.$scope = $scope;
|
||||||
|
@ -14,9 +14,9 @@ class ClientAddresses {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientAddresses.$inject = ['$http', '$scope'];
|
Controller.$inject = ['$http', '$scope'];
|
||||||
|
|
||||||
ngModule.component('vnClientAddresses', {
|
ngModule.component('vnClientAddressIndex', {
|
||||||
template: require('./addresses.html'),
|
template: require('./index.html'),
|
||||||
controller: ClientAddresses
|
controller: Controller
|
||||||
});
|
});
|
|
@ -1,7 +1,7 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../module';
|
||||||
|
|
||||||
ngModule.component('vnClientBasicData', {
|
ngModule.component('vnClientBasicData', {
|
||||||
template: require('./basic-data.html'),
|
template: require('./index.html'),
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
import './billing-data.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientBillingData', () => {
|
describe('Component vnClientBillingData', () => {
|
||||||
|
|
|
@ -49,7 +49,7 @@ export default class Controller {
|
||||||
Controller.$inject = ['$scope', '$http', 'vnApp', '$translate'];
|
Controller.$inject = ['$scope', '$http', 'vnApp', '$translate'];
|
||||||
|
|
||||||
ngModule.component('vnClientBillingData', {
|
ngModule.component('vnClientBillingData', {
|
||||||
template: require('./billing-data.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
|
@ -1,4 +1,4 @@
|
||||||
import './card.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientCard', () => {
|
describe('Component vnClientCard', () => {
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-auto class="left-block">
|
<vn-auto class="left-block">
|
||||||
<vn-client-descriptor client="$ctrl.client"></vn-client-descriptor>
|
<vn-client-descriptor client="$ctrl.client"></vn-client-descriptor>
|
||||||
<vn-left-menu depth="2"></vn-left-menu>
|
<vn-left-menu></vn-left-menu>
|
||||||
</vn-auto>
|
</vn-auto>
|
||||||
<vn-one>
|
<vn-one>
|
||||||
<vn-vertical margin-medium ui-view></vn-vertical>
|
<vn-vertical margin-medium ui-view></vn-vertical>
|
|
@ -13,7 +13,7 @@ export default class Controller {
|
||||||
Controller.$inject = ['$scope'];
|
Controller.$inject = ['$scope'];
|
||||||
|
|
||||||
ngModule.component('vnClientCard', {
|
ngModule.component('vnClientCard', {
|
||||||
template: require('./card.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller
|
controller: Controller
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
export * from './module';
|
export * from './module';
|
||||||
|
|
||||||
import './index/index';
|
import './index';
|
||||||
import './card/card';
|
import './card';
|
||||||
import './create/create';
|
import './create';
|
||||||
import './basic-data/basic-data';
|
import './basic-data';
|
||||||
import './fiscal-data/fiscal-data';
|
import './fiscal-data';
|
||||||
import './billing-data/billing-data';
|
import './billing-data';
|
||||||
import './descriptor/descriptor';
|
import './descriptor';
|
||||||
import './search-panel/search-panel';
|
import './search-panel';
|
||||||
import './addresses/addresses';
|
import './address/index';
|
||||||
import './address-create/address-create';
|
import './address/create';
|
||||||
import './address-edit/address-edit';
|
import './address/edit';
|
||||||
import './notes/notes';
|
import './note/index';
|
||||||
import './note-create/note-create';
|
import './note/create';
|
||||||
import './web-access/web-access';
|
import './web-access';
|
||||||
import './credit-list/credit-list';
|
import './credit/index';
|
||||||
import './credit-create/credit-create';
|
import './credit/create';
|
||||||
import './greuge-list/greuge-list';
|
import './greuge/index';
|
||||||
import './greuge-create/greuge-create';
|
import './greuge/create';
|
||||||
import './mandate/mandate';
|
import './mandate';
|
||||||
import './invoices/invoices';
|
import './invoice';
|
||||||
import './summary/client-summary';
|
import './summary';
|
||||||
import './recovery-list/recovery-list';
|
import './recovery/index';
|
||||||
import './recovery-create/recovery-create';
|
import './recovery/create';
|
||||||
import './credit-classification-list/credit-classification-list';
|
import './credit-insurance/index';
|
||||||
import './credit-classification-create/credit-classification-create';
|
import './credit-insurance/create';
|
||||||
import './credit-insurance-list/credit-insurance-list';
|
import './credit-insurance/insurance/index';
|
||||||
import './credit-insurance-create/credit-insurance-create';
|
import './credit-insurance/insurance/create';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import './create.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientCreate', () => {
|
describe('Component vnClientCreate', () => {
|
||||||
|
@ -38,7 +38,7 @@ describe('Client', () => {
|
||||||
spyOn($state, 'go');
|
spyOn($state, 'go');
|
||||||
controller.onSubmit();
|
controller.onSubmit();
|
||||||
|
|
||||||
expect(controller.$state.go).toHaveBeenCalledWith('clientCard.basicData', {id: '1234'});
|
expect(controller.$state.go).toHaveBeenCalledWith('client.card.basicData', {id: '1234'});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
<button
|
<button
|
||||||
class="mdl-button mdl-button--raised mdl-button--colored"
|
class="mdl-button mdl-button--raised mdl-button--colored"
|
||||||
translate
|
translate
|
||||||
ui-sref="clients"
|
ui-sref="client.index"
|
||||||
>Cancel
|
>Cancel
|
||||||
</button>
|
</button>
|
||||||
</vn-button-bar>
|
</vn-button-bar>
|
|
@ -10,13 +10,13 @@ export default class Controller {
|
||||||
}
|
}
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.$.watcher.submit().then(
|
this.$.watcher.submit().then(
|
||||||
json => this.$state.go('clientCard.basicData', {id: json.data.id})
|
json => this.$state.go('client.card.basicData', {id: json.data.id})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controller.$inject = ['$scope', '$state'];
|
Controller.$inject = ['$scope', '$state'];
|
||||||
|
|
||||||
ngModule.component('vnClientCreate', {
|
ngModule.component('vnClientCreate', {
|
||||||
template: require('./create.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller
|
controller: Controller
|
||||||
});
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
constructor($http, $filter, $state, $scope, $translate, vnApp) {
|
constructor($http, $filter, $state, $scope, $translate, vnApp) {
|
||||||
|
@ -22,15 +22,15 @@ class Controller {
|
||||||
|
|
||||||
this.$http.post(query, data).then((res, err) => {
|
this.$http.post(query, data).then((res, err) => {
|
||||||
if (res.data)
|
if (res.data)
|
||||||
this.$state.go('clientCard.creditClassification.list');
|
this.$state.go('client.card.creditInsurance.index');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Controller.$inject = ['$http', '$filter', '$state', '$scope', '$translate', 'vnApp'];
|
Controller.$inject = ['$http', '$filter', '$state', '$scope', '$translate', 'vnApp'];
|
||||||
|
|
||||||
ngModule.component('vnClientCreditClassificationCreate', {
|
ngModule.component('vnClientCreditInsuranceCreate', {
|
||||||
template: require('./credit-classification-create.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
|
@ -1,4 +1,4 @@
|
||||||
import './credit-classification-list.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientCreditClassificationList', () => {
|
describe('Component vnClientCreditClassificationList', () => {
|
|
@ -33,7 +33,7 @@
|
||||||
</vn-one>
|
</vn-one>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
<a vn-auto ui-sref="clientCard.creditInsurance.list({classificationId: {{classification.id}}})">
|
<a vn-auto ui-sref="client.card.creditInsurance.insurance.index({classificationId: {{classification.id}}})">
|
||||||
<vn-icon-button icon="desktop_windows" vn-tooltip="List classifications"></vn-icon-button>
|
<vn-icon-button icon="desktop_windows" vn-tooltip="List classifications"></vn-icon-button>
|
||||||
</a>
|
</a>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
ng-if="$ctrl.canCreateNew()"
|
ng-if="$ctrl.canCreateNew()"
|
||||||
vn-tooltip="New contract"
|
vn-tooltip="New contract"
|
||||||
fixed-bottom-right
|
fixed-bottom-right
|
||||||
ui-sref="clientCard.creditClassification.create"
|
ui-sref="client.card.creditInsurance.create"
|
||||||
icon="add"
|
icon="add"
|
||||||
vn-bind="+"
|
vn-bind="+"
|
||||||
label="Add">
|
label="Add">
|
|
@ -1,4 +1,4 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
|
|
||||||
|
@ -67,8 +67,8 @@ class Controller {
|
||||||
|
|
||||||
Controller.$inject = ['$http', '$scope'];
|
Controller.$inject = ['$http', '$scope'];
|
||||||
|
|
||||||
ngModule.component('vnClientCreditClassificationList', {
|
ngModule.component('vnClientCreditInsuranceIndex', {
|
||||||
template: require('./credit-classification-list.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
|
@ -6,7 +6,7 @@
|
||||||
save="post">
|
save="post">
|
||||||
</vn-watcher>
|
</vn-watcher>
|
||||||
<form name="form"
|
<form name="form"
|
||||||
ng-submit="watcher.submitGo('clientCard.creditInsurance.list', {classificationId: post.params.classificationId})">
|
ng-submit="watcher.submitGo('client.card.creditInsurance.insurance.index', {classificationId: post.params.classificationId})">
|
||||||
<vn-card pad-large>
|
<vn-card pad-large>
|
||||||
<vn-title>New classification</vn-title>
|
<vn-title>New classification</vn-title>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
|
@ -1,4 +1,4 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../../module';
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
constructor($state, $filter) {
|
constructor($state, $filter) {
|
||||||
|
@ -11,8 +11,8 @@ class Controller {
|
||||||
|
|
||||||
Controller.$inject = ['$state', '$filter'];
|
Controller.$inject = ['$state', '$filter'];
|
||||||
|
|
||||||
ngModule.component('vnClientCreditInsuranceCreate', {
|
ngModule.component('vnClientCreditInsuranceInsuranceCreate', {
|
||||||
template: require('./credit-insurance-create.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
|
@ -1,4 +1,4 @@
|
||||||
import './credit-insurance-list';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientCreditInsuranceList', () => {
|
describe('Component vnClientCreditInsuranceList', () => {
|
|
@ -25,7 +25,7 @@
|
||||||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
<a ui-sref="clientCard.creditInsurance.create({classificationId: {{index.params.classificationId}}})"
|
<a ui-sref="client.card.creditInsurance.insurance.create({classificationId: {{index.params.classificationId}}})"
|
||||||
fixed-bottom-right vn-tooltip="New classification" vn-bind="+" ng-if="!$ctrl.isClosed">
|
fixed-bottom-right vn-tooltip="New classification" vn-bind="+" ng-if="!$ctrl.isClosed">
|
||||||
<vn-float-button icon="add"></vn-float-button>
|
<vn-float-button icon="add"></vn-float-button>
|
||||||
</a>
|
</a>
|
|
@ -1,4 +1,4 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../../module';
|
||||||
import FilterList from 'core/src/lib/filter-list';
|
import FilterList from 'core/src/lib/filter-list';
|
||||||
|
|
||||||
class Controller extends FilterList {
|
class Controller extends FilterList {
|
||||||
|
@ -27,8 +27,8 @@ class Controller extends FilterList {
|
||||||
|
|
||||||
Controller.$inject = ['$scope', '$timeout', '$state', '$http'];
|
Controller.$inject = ['$scope', '$timeout', '$state', '$http'];
|
||||||
|
|
||||||
ngModule.component('vnClientCreditInsuranceList', {
|
ngModule.component('vnClientCreditInsuranceInsuranceIndex', {
|
||||||
template: require('./credit-insurance-list.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
|
@ -1,7 +0,0 @@
|
||||||
import ngModule from '../module';
|
|
||||||
import FilterClientList from '../filter-client-list';
|
|
||||||
|
|
||||||
ngModule.component('vnClientCreditList', {
|
|
||||||
template: require('./credit-list.html'),
|
|
||||||
controller: FilterClientList
|
|
||||||
});
|
|
|
@ -1,4 +1,4 @@
|
||||||
import './credit-create.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientCreditCreate', () => {
|
describe('Component vnClientCreditCreate', () => {
|
||||||
|
@ -78,7 +78,7 @@ describe('Client', () => {
|
||||||
client.credit = 1;
|
client.credit = 1;
|
||||||
controller.addCredit();
|
controller.addCredit();
|
||||||
|
|
||||||
expect(controller.$state.go).toHaveBeenCalledWith('clientCard.credit.list');
|
expect(controller.$state.go).toHaveBeenCalledWith('client.card.credit.list');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
constructor($http, $scope, $state) {
|
constructor($http, $scope, $state) {
|
||||||
|
@ -25,7 +25,7 @@ class Controller {
|
||||||
addCredit() {
|
addCredit() {
|
||||||
this.$scope.watcher.submit().then(
|
this.$scope.watcher.submit().then(
|
||||||
() => {
|
() => {
|
||||||
this.$state.go('clientCard.credit.list');
|
this.$state.go('client.card.credit.index');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ class Controller {
|
||||||
Controller.$inject = ['$http', '$scope', '$state'];
|
Controller.$inject = ['$http', '$scope', '$state'];
|
||||||
|
|
||||||
ngModule.component('vnClientCreditCreate', {
|
ngModule.component('vnClientCreditCreate', {
|
||||||
template: require('./credit-create.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
|
@ -25,6 +25,6 @@
|
||||||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
<a ui-sref="clientCard.credit.create" vn-bind="+" fixed-bottom-right>
|
<a ui-sref="client.card.credit.create" vn-bind="+" fixed-bottom-right>
|
||||||
<vn-float-button icon="add"></vn-float-button>
|
<vn-float-button icon="add"></vn-float-button>
|
||||||
</a>
|
</a>
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ngModule from '../../module';
|
||||||
|
import FilterClientList from '../../filter-client-list';
|
||||||
|
|
||||||
|
ngModule.component('vnClientCreditIndex', {
|
||||||
|
template: require('./index.html'),
|
||||||
|
controller: FilterClientList
|
||||||
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
import './descriptor.js';
|
import './index';
|
||||||
|
|
||||||
describe('Descriptor', () => {
|
describe('Descriptor', () => {
|
||||||
describe('Component vnClientDescriptor', () => {
|
describe('Component vnClientDescriptor', () => {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<vn-icon icon="chevron_left"></vn-icon>
|
<vn-icon icon="chevron_left"></vn-icon>
|
||||||
</a>
|
</a>
|
||||||
<vn-icon icon="person"></vn-icon>
|
<vn-icon icon="person"></vn-icon>
|
||||||
<a translate-attr="{title: 'Preview'}" ui-sref="clientCard.summary">
|
<a translate-attr="{title: 'Preview'}" ui-sref="client.card.summary">
|
||||||
<vn-icon icon="desktop_windows"></vn-icon>
|
<vn-icon icon="desktop_windows"></vn-icon>
|
||||||
</a>
|
</a>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
|
@ -1,6 +1,6 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../module';
|
||||||
|
|
||||||
class ClientDescriptor {
|
class Controller {
|
||||||
constructor($http) {
|
constructor($http) {
|
||||||
this.$http = $http;
|
this.$http = $http;
|
||||||
}
|
}
|
||||||
|
@ -25,12 +25,12 @@ class ClientDescriptor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientDescriptor.$inject = ['$http'];
|
Controller.$inject = ['$http'];
|
||||||
|
|
||||||
ngModule.component('vnClientDescriptor', {
|
ngModule.component('vnClientDescriptor', {
|
||||||
template: require('./descriptor.html'),
|
template: require('./index.html'),
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
||||||
},
|
},
|
||||||
controller: ClientDescriptor
|
controller: Controller
|
||||||
});
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
import './fiscal-data.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientFiscalData', () => {
|
describe('Component vnClientFiscalData', () => {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../module';
|
||||||
|
|
||||||
export default class ClientFiscalData {
|
export default class Controller {
|
||||||
constructor($scope, $http, vnApp, $translate) {
|
constructor($scope, $http, vnApp, $translate) {
|
||||||
this.$ = $scope;
|
this.$ = $scope;
|
||||||
this.$http = $http;
|
this.$http = $http;
|
||||||
|
@ -49,11 +49,11 @@ export default class ClientFiscalData {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientFiscalData.$inject = ['$scope', '$http', 'vnApp', '$translate'];
|
Controller.$inject = ['$scope', '$http', 'vnApp', '$translate'];
|
||||||
|
|
||||||
ngModule.component('vnClientFiscalData', {
|
ngModule.component('vnClientFiscalData', {
|
||||||
template: require('./fiscal-data.html'),
|
template: require('./index.html'),
|
||||||
controller: ClientFiscalData,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
||||||
}
|
}
|
|
@ -1,7 +0,0 @@
|
||||||
import ngModule from '../module';
|
|
||||||
import FilterClientList from '../filter-client-list';
|
|
||||||
|
|
||||||
ngModule.component('vnClientGreugeList', {
|
|
||||||
template: require('./greuge-list.html'),
|
|
||||||
controller: FilterClientList
|
|
||||||
});
|
|
|
@ -1,4 +1,4 @@
|
||||||
import './greuge-create.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientGreugeCreate', () => {
|
describe('Component vnClientGreugeCreate', () => {
|
||||||
|
@ -32,7 +32,7 @@ describe('Client', () => {
|
||||||
spyOn($state, 'go');
|
spyOn($state, 'go');
|
||||||
controller.onSubmit();
|
controller.onSubmit();
|
||||||
|
|
||||||
expect(controller.$state.go).toHaveBeenCalledWith('clientCard.greuge.list');
|
expect(controller.$state.go).toHaveBeenCalledWith('client.card.greuge.list');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -1,6 +1,6 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
|
|
||||||
class ClientGreugeCreate {
|
class Controller {
|
||||||
constructor($scope, $state, $filter) {
|
constructor($scope, $state, $filter) {
|
||||||
this.$ = $scope;
|
this.$ = $scope;
|
||||||
this.$state = $state;
|
this.$state = $state;
|
||||||
|
@ -12,14 +12,14 @@ class ClientGreugeCreate {
|
||||||
this.greuge.clientFk = this.$state.params.id;
|
this.greuge.clientFk = this.$state.params.id;
|
||||||
this.$.watcher.submit().then(
|
this.$.watcher.submit().then(
|
||||||
() => {
|
() => {
|
||||||
this.$state.go('clientCard.greuge.list');
|
this.$state.go('client.card.greuge.index');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientGreugeCreate.$inject = ['$scope', '$state', '$filter'];
|
Controller.$inject = ['$scope', '$state', '$filter'];
|
||||||
|
|
||||||
ngModule.component('vnClientGreugeCreate', {
|
ngModule.component('vnClientGreugeCreate', {
|
||||||
template: require('./greuge-create.html'),
|
template: require('./index.html'),
|
||||||
controller: ClientGreugeCreate
|
controller: Controller
|
||||||
});
|
});
|
|
@ -33,7 +33,7 @@
|
||||||
<vn-paging margin-large-top vn-one index="index" total="index.model.count"></vn-paging>
|
<vn-paging margin-large-top vn-one index="index" total="index.model.count"></vn-paging>
|
||||||
<!-- <vn-auto-paging margin-large-top vn-one index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
<!-- <vn-auto-paging margin-large-top vn-one index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
<a ui-sref="clientCard.greuge.create" vn-bind="+" fixed-bottom-right>
|
<a ui-sref="client.card.greuge.create" vn-bind="+" fixed-bottom-right>
|
||||||
<vn-float-button icon="add"></vn-float-button>
|
<vn-float-button icon="add"></vn-float-button>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
import ngModule from '../../module';
|
||||||
|
import FilterClientList from '../../filter-client-list';
|
||||||
|
|
||||||
|
ngModule.component('vnClientGreugeIndex', {
|
||||||
|
template: require('./index.html'),
|
||||||
|
controller: FilterClientList
|
||||||
|
});
|
|
@ -22,7 +22,7 @@
|
||||||
<!-- <vn-auto-paging index="index" total="index.model.count" items="$ctrl.clients"></vn-auto-paging> -->
|
<!-- <vn-auto-paging index="index" total="index.model.count" items="$ctrl.clients"></vn-auto-paging> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a ui-sref="create" vn-bind="+" fixed-bottom-right>
|
<a ui-sref="client.create" vn-bind="+" fixed-bottom-right>
|
||||||
<vn-float-button icon="person_add"></vn-float-button>
|
<vn-float-button icon="person_add"></vn-float-button>
|
||||||
</a>
|
</a>
|
||||||
<vn-dialog class="dialog-summary"
|
<vn-dialog class="dialog-summary"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import './index.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientIndex', () => {
|
describe('Component vnClientIndex', () => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<a
|
<a
|
||||||
ui-sref="clientCard.summary({ id: {{::$ctrl.client.id}} })"
|
ui-sref="client.card.summary({ id: {{::$ctrl.client.id}} })"
|
||||||
translate-attr="{title: 'View client'}"
|
translate-attr="{title: 'View client'}"
|
||||||
class="vn-list-item">
|
class="vn-list-item">
|
||||||
<vn-horizontal ng-click="$ctrl.onClick($event)">
|
<vn-horizontal ng-click="$ctrl.onClick($event)">
|
||||||
|
|
|
@ -9,7 +9,7 @@ class Controller extends FilterClientList {
|
||||||
}
|
}
|
||||||
Controller.$inject = ['$scope', '$timeout', '$state', '$stateParams'];
|
Controller.$inject = ['$scope', '$timeout', '$state', '$stateParams'];
|
||||||
|
|
||||||
ngModule.component('vnClientInvoices', {
|
ngModule.component('vnClientInvoice', {
|
||||||
template: require('./invoices.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller
|
controller: Controller
|
||||||
});
|
});
|
|
@ -2,6 +2,6 @@ import ngModule from '../module';
|
||||||
import FilterClientList from '../filter-client-list';
|
import FilterClientList from '../filter-client-list';
|
||||||
|
|
||||||
ngModule.component('vnClientMandate', {
|
ngModule.component('vnClientMandate', {
|
||||||
template: require('./mandate.html'),
|
template: require('./index.html'),
|
||||||
controller: FilterClientList
|
controller: FilterClientList
|
||||||
});
|
});
|
|
@ -6,7 +6,7 @@
|
||||||
save="post"
|
save="post"
|
||||||
form="form">
|
form="form">
|
||||||
</vn-watcher>
|
</vn-watcher>
|
||||||
<form name="form" ng-submit="watcher.submitGo('clientCard.notes.list')">
|
<form name="form" ng-submit="watcher.submitGo('client.card.note.index')">
|
||||||
<vn-card pad-large>
|
<vn-card pad-large>
|
||||||
<vn-title>New note</vn-title>
|
<vn-title>New note</vn-title>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
|
@ -1,4 +1,4 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
|
|
||||||
export default class Controller {
|
export default class Controller {
|
||||||
constructor($state) {
|
constructor($state) {
|
||||||
|
@ -11,6 +11,6 @@ export default class Controller {
|
||||||
Controller.$inject = ['$state'];
|
Controller.$inject = ['$state'];
|
||||||
|
|
||||||
ngModule.component('vnNoteCreate', {
|
ngModule.component('vnNoteCreate', {
|
||||||
template: require('./note-create.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller
|
controller: Controller
|
||||||
});
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
import './note-create.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnNoteCreate', () => {
|
describe('Component vnNoteCreate', () => {
|
|
@ -1,4 +1,4 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
|
|
||||||
export default class Controller {
|
export default class Controller {
|
||||||
constructor($http, $state) {
|
constructor($http, $state) {
|
||||||
|
@ -22,13 +22,13 @@ export default class Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
newObservation() {
|
newObservation() {
|
||||||
this.$state.go("clientCard.notes.create", {id: this.client.id});
|
this.$state.go("client.card.note.create", {id: this.client.id});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Controller.$inject = ['$http', '$state'];
|
Controller.$inject = ['$http', '$state'];
|
||||||
|
|
||||||
ngModule.component('vnClientNotes', {
|
ngModule.component('vnClientNote', {
|
||||||
template: require('./notes.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
|
@ -1,4 +1,4 @@
|
||||||
import './notes.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientNotes', () => {
|
describe('Component vnClientNotes', () => {
|
||||||
|
@ -51,7 +51,7 @@ describe('Client', () => {
|
||||||
spyOn(controller.$state, 'go');
|
spyOn(controller.$state, 'go');
|
||||||
controller.newObservation();
|
controller.newObservation();
|
||||||
|
|
||||||
expect(controller.$state.go).toHaveBeenCalledWith('clientCard.notes.create', Object({id: '1234'}));
|
expect(controller.$state.go).toHaveBeenCalledWith('client.card.notes.create', Object({id: '1234'}));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -1,6 +1,6 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
|
|
||||||
class ClientRecoveryCreate {
|
class Controller {
|
||||||
constructor($scope, $state, $filter) {
|
constructor($scope, $state, $filter) {
|
||||||
this.$ = $scope;
|
this.$ = $scope;
|
||||||
this.$state = $state;
|
this.$state = $state;
|
||||||
|
@ -12,14 +12,14 @@ class ClientRecoveryCreate {
|
||||||
this.recovery.clientFk = this.$state.params.id;
|
this.recovery.clientFk = this.$state.params.id;
|
||||||
this.$.watcher.submit().then(
|
this.$.watcher.submit().then(
|
||||||
() => {
|
() => {
|
||||||
this.$state.go('clientCard.recovery.list');
|
this.$state.go('client.card.recovery.list');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ClientRecoveryCreate.$inject = ['$scope', '$state', '$filter'];
|
Controller.$inject = ['$scope', '$state', '$filter'];
|
||||||
|
|
||||||
ngModule.component('vnClientRecoveryCreate', {
|
ngModule.component('vnClientRecoveryCreate', {
|
||||||
template: require('./recovery-create.html'),
|
template: require('./index.html'),
|
||||||
controller: ClientRecoveryCreate
|
controller: Controller
|
||||||
});
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
import './recovery-create.js';
|
import './index';
|
||||||
|
|
||||||
describe('Client', () => {
|
describe('Client', () => {
|
||||||
describe('Component vnClientRecoveryCreate', () => {
|
describe('Component vnClientRecoveryCreate', () => {
|
||||||
|
@ -32,7 +32,7 @@ describe('Client', () => {
|
||||||
spyOn($state, 'go');
|
spyOn($state, 'go');
|
||||||
controller.onSubmit();
|
controller.onSubmit();
|
||||||
|
|
||||||
expect(controller.$state.go).toHaveBeenCalledWith('clientCard.recovery.list');
|
expect(controller.$state.go).toHaveBeenCalledWith('client.card.recovery.list');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
|
@ -33,6 +33,6 @@
|
||||||
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
<vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging>
|
||||||
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
<!-- <vn-auto-paging vn-one margin-large-top index="index" total="index.model.count" items="$ctrl.instances"></vn-auto-paging> -->
|
||||||
</vn-vertical>
|
</vn-vertical>
|
||||||
<a ui-sref="clientCard.recovery.create" vn-bind="+" fixed-bottom-right>
|
<a ui-sref="client.card.recovery.create" vn-bind="+" fixed-bottom-right>
|
||||||
<vn-float-button icon="add"></vn-float-button>
|
<vn-float-button icon="add"></vn-float-button>
|
||||||
</a>
|
</a>
|
|
@ -1,7 +1,7 @@
|
||||||
import ngModule from '../module';
|
import ngModule from '../../module';
|
||||||
import FilterClientList from '../filter-client-list';
|
import FilterClientList from '../../filter-client-list';
|
||||||
|
|
||||||
class ClientRecoveryList extends FilterClientList {
|
class Controller extends FilterClientList {
|
||||||
constructor($scope, $timeout, $state, $http) {
|
constructor($scope, $timeout, $state, $http) {
|
||||||
super($scope, $timeout, $state);
|
super($scope, $timeout, $state);
|
||||||
this.$http = $http;
|
this.$http = $http;
|
||||||
|
@ -16,9 +16,9 @@ class ClientRecoveryList extends FilterClientList {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientRecoveryList.$inject = ['$scope', '$timeout', '$state', '$http'];
|
Controller.$inject = ['$scope', '$timeout', '$state', '$http'];
|
||||||
|
|
||||||
ngModule.component('vnClientRecoveryList', {
|
ngModule.component('vnClientRecoveryIndex', {
|
||||||
template: require('./recovery-list.html'),
|
template: require('./index.html'),
|
||||||
controller: ClientRecoveryList
|
controller: Controller
|
||||||
});
|
});
|
|
@ -13,6 +13,6 @@ export default class Controller {
|
||||||
Controller.$inject = [];
|
Controller.$inject = [];
|
||||||
|
|
||||||
ngModule.component('vnClientSearchPanel', {
|
ngModule.component('vnClientSearchPanel', {
|
||||||
template: require('./search-panel.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller
|
controller: Controller
|
||||||
});
|
});
|
|
@ -20,7 +20,7 @@ class Controller {
|
||||||
Controller.$inject = ['$http'];
|
Controller.$inject = ['$http'];
|
||||||
|
|
||||||
ngModule.component('vnClientSummary', {
|
ngModule.component('vnClientSummary', {
|
||||||
template: require('./client-summary.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
|
@ -62,7 +62,7 @@ export default class Controller {
|
||||||
Controller.$inject = ['$scope', '$http', 'vnApp'];
|
Controller.$inject = ['$scope', '$http', 'vnApp'];
|
||||||
|
|
||||||
ngModule.component('vnClientWebAccess', {
|
ngModule.component('vnClientWebAccess', {
|
||||||
template: require('./web-access.html'),
|
template: require('./index.html'),
|
||||||
controller: Controller,
|
controller: Controller,
|
||||||
bindings: {
|
bindings: {
|
||||||
client: '<'
|
client: '<'
|
|
@ -1,4 +1,4 @@
|
||||||
import './web-access.js';
|
import './index';
|
||||||
|
|
||||||
describe('Component VnClientWebAccess', () => {
|
describe('Component VnClientWebAccess', () => {
|
||||||
let $componentController;
|
let $componentController;
|
||||||
|
|
|
@ -7,11 +7,11 @@ export default {
|
||||||
logOutButton: `#logout`,
|
logOutButton: `#logout`,
|
||||||
applicationsMenuButton: `#apps`,
|
applicationsMenuButton: `#apps`,
|
||||||
applicationsMenuVisible: `vn-main-menu [vn-id="apps-menu"] ul`,
|
applicationsMenuVisible: `vn-main-menu [vn-id="apps-menu"] ul`,
|
||||||
clientsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="clients"]`,
|
clientsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="client.index"]`,
|
||||||
ticketsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="ticket.list"]`
|
ticketsButton: `vn-main-menu [vn-id="apps-menu"] ul > li[ui-sref="ticket.list"]`
|
||||||
},
|
},
|
||||||
moduleAccessView: {
|
moduleAccessView: {
|
||||||
clientsSectionButton: `vn-home a[ui-sref="clients"]`,
|
clientsSectionButton: `vn-home a[ui-sref="client.index"]`,
|
||||||
itemsSectionButton: `vn-home a[ui-sref="item.index"]`,
|
itemsSectionButton: `vn-home a[ui-sref="item.index"]`,
|
||||||
ticketsSectionButton: `vn-home a[ui-sref="ticket.list"]`
|
ticketsSectionButton: `vn-home a[ui-sref="ticket.list"]`
|
||||||
},
|
},
|
||||||
|
@ -30,10 +30,10 @@ export default {
|
||||||
salesPersonInput: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] input`,
|
salesPersonInput: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] input`,
|
||||||
salesBruceBannerOption: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] vn-drop-down ul > li:nth-child(1)`,
|
salesBruceBannerOption: `vn-autocomplete[field="$ctrl.client.salesPersonFk"] vn-drop-down ul > li:nth-child(1)`,
|
||||||
createButton: `${components.vnSubmit}`,
|
createButton: `${components.vnSubmit}`,
|
||||||
cancelButton: `button[href="#!/clients"]`
|
cancelButton: `button[href="#!/client/index"]`
|
||||||
},
|
},
|
||||||
clientBasicData: {
|
clientBasicData: {
|
||||||
basicDataButton: `${components.vnMenuItem}[ui-sref="clientCard.basicData"]`,
|
basicDataButton: `${components.vnMenuItem}[ui-sref="client.card.basicData"]`,
|
||||||
nameInput: `${components.vnTextfield}[name="name"]`,
|
nameInput: `${components.vnTextfield}[name="name"]`,
|
||||||
contactInput: `${components.vnTextfield}[name="contact"]`,
|
contactInput: `${components.vnTextfield}[name="contact"]`,
|
||||||
phoneInput: `${components.vnTextfield}[name="phone"]`,
|
phoneInput: `${components.vnTextfield}[name="phone"]`,
|
||||||
|
@ -47,7 +47,7 @@ export default {
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
clientFiscalData: {
|
clientFiscalData: {
|
||||||
fiscalDataButton: `${components.vnMenuItem}[ui-sref="clientCard.fiscalData"]`,
|
fiscalDataButton: `${components.vnMenuItem}[ui-sref="client.card.fiscalData"]`,
|
||||||
socialNameInput: `${components.vnTextfield}[name="socialName"]`,
|
socialNameInput: `${components.vnTextfield}[name="socialName"]`,
|
||||||
fiscalIdInput: `${components.vnTextfield}[name="fi"]`,
|
fiscalIdInput: `${components.vnTextfield}[name="fi"]`,
|
||||||
equalizationTaxCheckboxLabel: `${components.vnCheck}[label='Is equalizated'] > label > input`,
|
equalizationTaxCheckboxLabel: `${components.vnCheck}[label='Is equalizated'] > label > input`,
|
||||||
|
@ -69,7 +69,7 @@ export default {
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
clientPayMethod: {
|
clientPayMethod: {
|
||||||
payMethodButton: `${components.vnMenuItem}[ui-sref="clientCard.billingData"]`,
|
payMethodButton: `${components.vnMenuItem}[ui-sref="client.card.billingData"]`,
|
||||||
payMethodInput: `${components.vnAutocomplete}[field="$ctrl.client.payMethodFk"] input`,
|
payMethodInput: `${components.vnAutocomplete}[field="$ctrl.client.payMethodFk"] input`,
|
||||||
payMethodIBANOption: `${components.vnAutocomplete}[field="$ctrl.client.payMethodFk"] vn-drop-down ul > li:nth-child(5)`,
|
payMethodIBANOption: `${components.vnAutocomplete}[field="$ctrl.client.payMethodFk"] vn-drop-down ul > li:nth-child(5)`,
|
||||||
payMethodOptionOne: `${components.vnAutocomplete}[field="$ctrl.client.payMethodFk"] vn-drop-down ul > li:nth-child(2)`,
|
payMethodOptionOne: `${components.vnAutocomplete}[field="$ctrl.client.payMethodFk"] vn-drop-down ul > li:nth-child(2)`,
|
||||||
|
@ -82,7 +82,7 @@ export default {
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
clientAddresses: {
|
clientAddresses: {
|
||||||
addressesButton: `${components.vnMenuItem}[ui-sref="clientCard.addresses.list"]`,
|
addressesButton: `${components.vnMenuItem}[ui-sref="client.card.address.index"]`,
|
||||||
createAddress: `${components.vnFloatButton}`,
|
createAddress: `${components.vnFloatButton}`,
|
||||||
defaultCheckboxInput: `${components.vnCheck}[label='Default'] > label > input`,
|
defaultCheckboxInput: `${components.vnCheck}[label='Default'] > label > input`,
|
||||||
consigneeInput: `${components.vnTextfield}[name="nickname"]`,
|
consigneeInput: `${components.vnTextfield}[name="nickname"]`,
|
||||||
|
@ -95,8 +95,8 @@ export default {
|
||||||
agenctySecondOption: `${components.vnAutocomplete}[field="$ctrl.address.agencyModeFk"] vn-drop-down ul > li:nth-child(2)`,
|
agenctySecondOption: `${components.vnAutocomplete}[field="$ctrl.address.agencyModeFk"] vn-drop-down ul > li:nth-child(2)`,
|
||||||
phoneInput: `${components.vnTextfield}[name="phone"]`,
|
phoneInput: `${components.vnTextfield}[name="phone"]`,
|
||||||
mobileInput: `${components.vnTextfield}[name="mobile"]`,
|
mobileInput: `${components.vnTextfield}[name="mobile"]`,
|
||||||
defaultAddress: 'vn-client-addresses > vn-vertical > vn-card > div > vn-horizontal:nth-child(2) > vn-one > vn-horizontal > vn-one > div:nth-child(2)',
|
defaultAddress: 'vn-client-address-index > vn-vertical > vn-card > div > vn-horizontal:nth-child(2) > vn-one > vn-horizontal > vn-one > div:nth-child(2)',
|
||||||
secondMakeDefaultStar: 'vn-client-addresses > vn-vertical > vn-card > div > vn-horizontal:nth-child(3) > vn-one > vn-horizontal > vn-none > i',
|
secondMakeDefaultStar: 'vn-client-address-index > vn-vertical > vn-card > div > vn-horizontal:nth-child(3) > vn-one > vn-horizontal > vn-none > i',
|
||||||
firstEditButton: `${components.vnIconButton}[icon='edit']`,
|
firstEditButton: `${components.vnIconButton}[icon='edit']`,
|
||||||
secondEditButton: `vn-horizontal:nth-child(3) > vn-one > vn-horizontal > a > ${components.vnIconButton}[icon='edit']`,
|
secondEditButton: `vn-horizontal:nth-child(3) > vn-one > vn-horizontal > a > ${components.vnIconButton}[icon='edit']`,
|
||||||
activeCheckbox: `${components.vnCheck}[label='Enabled'] > label > input`,
|
activeCheckbox: `${components.vnCheck}[label='Enabled'] > label > input`,
|
||||||
|
@ -112,45 +112,45 @@ export default {
|
||||||
thirdObservationDescriptionInput: `vn-horizontal:nth-child(5) > vn-textfield[label="Description"] > div > input`,
|
thirdObservationDescriptionInput: `vn-horizontal:nth-child(5) > vn-textfield[label="Description"] > div > input`,
|
||||||
addObservationButton: `${components.vnIcon}[icon="add_circle"]`,
|
addObservationButton: `${components.vnIcon}[icon="add_circle"]`,
|
||||||
saveButton: `${components.vnSubmit}`,
|
saveButton: `${components.vnSubmit}`,
|
||||||
cancelButton: `button[ui-sref="clientCard.addresses.list"]`
|
cancelButton: `button[ui-sref="client.card.address.index"]`
|
||||||
},
|
},
|
||||||
clientWebAccess: {
|
clientWebAccess: {
|
||||||
webAccessButton: `${components.vnMenuItem}[ui-sref="clientCard.webAccess"]`,
|
webAccessButton: `${components.vnMenuItem}[ui-sref="client.card.webAccess"]`,
|
||||||
enableWebAccessCheckbox: `${components.vnCheck}[label='Enable web access'] > label > input`,
|
enableWebAccessCheckbox: `${components.vnCheck}[label='Enable web access'] > label > input`,
|
||||||
userNameInput: `${components.vnTextfield}[name="name"]`,
|
userNameInput: `${components.vnTextfield}[name="name"]`,
|
||||||
saveButton: `${components.vnSubmit}`
|
saveButton: `${components.vnSubmit}`
|
||||||
},
|
},
|
||||||
clientNotes: {
|
clientNotes: {
|
||||||
notesButton: `${components.vnMenuItem}[ui-sref="clientCard.notes.list"]`,
|
notesButton: `${components.vnMenuItem}[ui-sref="client.card.note.index"]`,
|
||||||
addNoteFloatButton: `${components.vnFloatButton}`,
|
addNoteFloatButton: `${components.vnFloatButton}`,
|
||||||
noteInput: `${components.vnTextarea}[label="Note"]`,
|
noteInput: `${components.vnTextarea}[label="Note"]`,
|
||||||
saveButton: `${components.vnSubmit}`,
|
saveButton: `${components.vnSubmit}`,
|
||||||
firstNoteText: 'vn-client-notes .text'
|
firstNoteText: 'vn-client-note .text'
|
||||||
},
|
},
|
||||||
clientCredit: {
|
clientCredit: {
|
||||||
creditButton: `${components.vnMenuItem}[ui-sref="clientCard.credit.list"]`,
|
creditButton: `${components.vnMenuItem}[ui-sref="client.card.credit.index"]`,
|
||||||
addCreditFloatButton: `${components.vnFloatButton}`,
|
addCreditFloatButton: `${components.vnFloatButton}`,
|
||||||
creditInput: `${components.vnTextfield}[name="credit"]`,
|
creditInput: `${components.vnTextfield}[name="credit"]`,
|
||||||
saveButton: `${components.vnSubmit}`,
|
saveButton: `${components.vnSubmit}`,
|
||||||
firstCreditText: 'vn-client-credit-list .list-element'
|
firstCreditText: 'vn-client-credit-index .list-element'
|
||||||
},
|
},
|
||||||
clientGreuge: {
|
clientGreuge: {
|
||||||
greugeButton: `${components.vnMenuItem}[ui-sref="clientCard.greuge.list"]`,
|
greugeButton: `${components.vnMenuItem}[ui-sref="client.card.greuge.index"]`,
|
||||||
addGreugeFloatButton: `${components.vnFloatButton}`,
|
addGreugeFloatButton: `${components.vnFloatButton}`,
|
||||||
amountInput: `${components.vnTextfield}[name="amount"]`,
|
amountInput: `${components.vnTextfield}[name="amount"]`,
|
||||||
descriptionInput: `${components.vnTextfield}[name="description"]`,
|
descriptionInput: `${components.vnTextfield}[name="description"]`,
|
||||||
typeInput: `${components.vnAutocomplete}[field="$ctrl.greuge.greugeTypeFk"] input`,
|
typeInput: `${components.vnAutocomplete}[field="$ctrl.greuge.greugeTypeFk"] input`,
|
||||||
typeSecondOption: `${components.vnAutocomplete}[field="$ctrl.greuge.greugeTypeFk"] vn-drop-down ul > li`,
|
typeSecondOption: `${components.vnAutocomplete}[field="$ctrl.greuge.greugeTypeFk"] vn-drop-down ul > li`,
|
||||||
saveButton: `${components.vnSubmit}`,
|
saveButton: `${components.vnSubmit}`,
|
||||||
firstGreugeText: 'vn-client-greuge-list .list-element'
|
firstGreugeText: 'vn-client-greuge-index .list-element'
|
||||||
},
|
},
|
||||||
clientMandate: {
|
clientMandate: {
|
||||||
mandateButton: `${components.vnMenuItem}[ui-sref="clientCard.mandate"]`,
|
mandateButton: `${components.vnMenuItem}[ui-sref="client.card.mandate"]`,
|
||||||
firstMandateText: 'vn-client-mandate .list-element'
|
firstMandateText: 'vn-client-mandate .list-element'
|
||||||
},
|
},
|
||||||
clientInvoices: {
|
clientInvoices: {
|
||||||
invoicesButton: `${components.vnMenuItem}[ui-sref="clientCard.invoices"]`,
|
invoicesButton: `${components.vnMenuItem}[ui-sref="client.card.invoice"]`,
|
||||||
firstInvoiceText: 'vn-client-invoices .list-element'
|
firstInvoiceText: 'vn-client-invoice .list-element'
|
||||||
},
|
},
|
||||||
itemsIndex: {
|
itemsIndex: {
|
||||||
createItemButton: `${components.vnFloatButton}`,
|
createItemButton: `${components.vnFloatButton}`,
|
||||||
|
|
|
@ -16,7 +16,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.createClientView.createButton)
|
.wait(selectors.createClientView.createButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/create');
|
expect(url.hash).toEqual('#!/client/create');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.createClientView.createButton)
|
.wait(selectors.createClientView.createButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/create');
|
expect(url.hash).toEqual('#!/client/create');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -40,10 +40,10 @@ describe('Client', () => {
|
||||||
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
|
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
|
||||||
.waitToClick(selectors.clientsIndex.searchResult)
|
.waitToClick(selectors.clientsIndex.searchResult)
|
||||||
.waitToClick(selectors.clientAddresses.addressesButton)
|
.waitToClick(selectors.clientAddresses.addressesButton)
|
||||||
.waitForURL('/addresses/list')
|
.waitForURL('/address/index')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('/addresses/list');
|
expect(url).toContain('/address/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -126,10 +126,10 @@ describe('Client', () => {
|
||||||
it(`should click on the addresses button to access to the client's addresses`, () => {
|
it(`should click on the addresses button to access to the client's addresses`, () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientAddresses.addressesButton)
|
.waitToClick(selectors.clientAddresses.addressesButton)
|
||||||
.waitForURL('/addresses/list')
|
.waitForURL('/address/index')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('/addresses/list');
|
expect(url).toContain('/address/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -39,40 +39,40 @@ describe('Client', () => {
|
||||||
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
|
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
|
||||||
.waitToClick(selectors.clientsIndex.searchResult)
|
.waitToClick(selectors.clientsIndex.searchResult)
|
||||||
.waitToClick(selectors.clientAddresses.addressesButton)
|
.waitToClick(selectors.clientAddresses.addressesButton)
|
||||||
.waitForURL('addresses/list')
|
.waitForURL('address/index')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('addresses/list');
|
expect(url).toContain('address/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the add new address button to access to the new address form`, () => {
|
it(`should click on the add new address button to access to the new address form`, () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientAddresses.createAddress)
|
.waitToClick(selectors.clientAddresses.createAddress)
|
||||||
.waitForURL('addresses/create')
|
.waitForURL('address/create')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('addresses/create');
|
expect(url).toContain('address/create');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should return to the addreses section by clicking the cancel button`, () => {
|
it(`should return to the addreses section by clicking the cancel button`, () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientAddresses.cancelButton)
|
.waitToClick(selectors.clientAddresses.cancelButton)
|
||||||
.waitForURL('addresses/list')
|
.waitForURL('address/index')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('addresses/list');
|
expect(url).toContain('address/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should now click on the add new address button to access to the new address form`, () => {
|
it(`should now click on the add new address button to access to the new address form`, () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientAddresses.createAddress)
|
.waitToClick(selectors.clientAddresses.createAddress)
|
||||||
.waitForURL('addresses/create')
|
.waitForURL('address/create')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('addresses/create');
|
expect(url).toContain('address/create');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -39,10 +39,10 @@ describe('Client', () => {
|
||||||
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
|
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
|
||||||
.waitToClick(selectors.clientsIndex.searchResult)
|
.waitToClick(selectors.clientsIndex.searchResult)
|
||||||
.waitToClick(selectors.clientAddresses.addressesButton)
|
.waitToClick(selectors.clientAddresses.addressesButton)
|
||||||
.waitForURL('addresses/list')
|
.waitForURL('address/index')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('addresses/list');
|
expect(url).toContain('address/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -39,20 +39,20 @@ describe('Client', () => {
|
||||||
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
|
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Bruce Banner')
|
||||||
.waitToClick(selectors.clientsIndex.searchResult)
|
.waitToClick(selectors.clientsIndex.searchResult)
|
||||||
.waitToClick(selectors.clientNotes.notesButton)
|
.waitToClick(selectors.clientNotes.notesButton)
|
||||||
.waitForURL('notes/list')
|
.waitForURL('note/index')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('notes/list');
|
expect(url).toContain('note/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should click on the add note button`, () => {
|
it(`should click on the add note button`, () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.waitToClick(selectors.clientNotes.addNoteFloatButton)
|
.waitToClick(selectors.clientNotes.addNoteFloatButton)
|
||||||
.waitForURL('/notes/create')
|
.waitForURL('/note/create')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('/notes/create');
|
expect(url).toContain('/note/create');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -39,10 +39,10 @@ describe('Client', () => {
|
||||||
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Ororo Munroe')
|
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Ororo Munroe')
|
||||||
.waitToClick(selectors.clientsIndex.searchResult)
|
.waitToClick(selectors.clientsIndex.searchResult)
|
||||||
.waitToClick(selectors.clientCredit.creditButton)
|
.waitToClick(selectors.clientCredit.creditButton)
|
||||||
.waitForURL('credit/list')
|
.waitForURL('credit/index')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('credit/list');
|
expect(url).toContain('credit/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -39,10 +39,10 @@ describe('Client', () => {
|
||||||
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
|
.waitForTextInElement(selectors.clientsIndex.searchResult, 'Petter Parker')
|
||||||
.waitToClick(selectors.clientsIndex.searchResult)
|
.waitToClick(selectors.clientsIndex.searchResult)
|
||||||
.waitToClick(selectors.clientGreuge.greugeButton)
|
.waitToClick(selectors.clientGreuge.greugeButton)
|
||||||
.waitForURL('greuge/list')
|
.waitForURL('greuge/index')
|
||||||
.url()
|
.url()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url).toContain('greuge/list');
|
expect(url).toContain('greuge/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -61,6 +61,7 @@ describe('Client', () => {
|
||||||
return nightmare
|
return nightmare
|
||||||
.wait(selectors.clientFiscalData.verifiedDataCheckboxInput)
|
.wait(selectors.clientFiscalData.verifiedDataCheckboxInput)
|
||||||
.evaluate(selector => {
|
.evaluate(selector => {
|
||||||
|
console.log(document.querySelector(selector));
|
||||||
return document.querySelector(selector).className;
|
return document.querySelector(selector).className;
|
||||||
}, 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-main-block > vn-horizontal > vn-one > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-horizontal:nth-child(5) > vn-check:nth-child(4) > label')
|
}, 'body > vn-app > vn-vertical > vn-vertical > vn-client-card > vn-main-block > vn-horizontal > vn-one > vn-vertical > vn-client-fiscal-data > form > vn-card > div > vn-horizontal:nth-child(5) > vn-check:nth-child(4) > label')
|
||||||
.then(result => {
|
.then(result => {
|
||||||
|
@ -108,7 +109,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -221,7 +222,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -297,7 +298,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -410,7 +411,7 @@ describe('Client', () => {
|
||||||
.wait(selectors.clientsIndex.createClientButton)
|
.wait(selectors.clientsIndex.createClientButton)
|
||||||
.parsedUrl()
|
.parsedUrl()
|
||||||
.then(url => {
|
.then(url => {
|
||||||
expect(url.hash).toEqual('#!/clients');
|
expect(url.hash).toEqual('#!/client/index');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue