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