diff --git a/client/client/routes.json b/client/client/routes.json
index 99c083ff3d..de6bcb5622 100644
--- a/client/client/routes.json
+++ b/client/client/routes.json
@@ -152,6 +152,14 @@
"params": {
"client": "$ctrl.client"
}
+ }, {
+ "url": "/mandate",
+ "state": "clientCard.mandate",
+ "component": "vn-client-mandate",
+ "menu": {
+ "description": "Mandate",
+ "icon": "pan_tool"
+ }
}
]
}
diff --git a/client/client/src/client.js b/client/client/src/client.js
index 15bd2d8ec8..d61f4e4aad 100644
--- a/client/client/src/client.js
+++ b/client/client/src/client.js
@@ -18,3 +18,4 @@ import './credit-list/credit-list';
import './credit-create/credit-create';
import './greuge-list/greuge-list';
import './greuge-create/greuge-create';
+import './mandate/mandate';
diff --git a/client/client/src/filterClientList.js b/client/client/src/filterClientList.js
index 3ad70cfc5c..6b6f48bb99 100644
--- a/client/client/src/filterClientList.js
+++ b/client/client/src/filterClientList.js
@@ -1,3 +1,4 @@
+// Generic object to list models, related to the client, with mgCrud
export default class FilterClientList {
constructor($scope, $timeout, $state) {
this.$ = $scope;
@@ -24,8 +25,10 @@ export default class FilterClientList {
}
this.$.index.accept();
+ } else if (!this.clientFk) {
+ throw new Error('Error: ClientFk not found');
} else if (this.waitingMgCrud > 3) {
- throw new Error('Magic Crud is not loaded');
+ throw new Error('Error: Magic Crud is not loaded');
} else {
this.waitingMgCrud++;
this.$timeout(() => {
diff --git a/client/client/src/locale/es.json b/client/client/src/locale/es.json
index 3a037b3aac..cdd92bb5a1 100644
--- a/client/client/src/locale/es.json
+++ b/client/client/src/locale/es.json
@@ -19,5 +19,6 @@
"Address": "Consignatario",
"Credit" : "Crédito",
"Secured credit": "Crédito asegurado",
- "Verified data": "Datos comprobados"
+ "Verified data": "Datos comprobados",
+ "Mandate": "Mandato"
}
diff --git a/client/client/src/mandate/locale/es.json b/client/client/src/mandate/locale/es.json
new file mode 100644
index 0000000000..51e30f9ed6
--- /dev/null
+++ b/client/client/src/mandate/locale/es.json
@@ -0,0 +1,5 @@
+{
+ "Company": "Empresa",
+ "Register date": "Fecha alta",
+ "End date": "Fecha baja"
+}
\ No newline at end of file
diff --git a/client/client/src/mandate/mandate.html b/client/client/src/mandate/mandate.html
new file mode 100644
index 0000000000..54b388267d
--- /dev/null
+++ b/client/client/src/mandate/mandate.html
@@ -0,0 +1,31 @@
+
+
+
+ Mandate
+
+
+
+
+
+
+
+
+
+
+ {{::mandate.id}}
+ {{::mandate.company}}
+ {{::mandate.type}}
+ {{::mandate.created | date:'dd/MM/yyyy HH:mm' }}
+ {{::mandate.finished | date:'dd/MM/yyyy HH:mm' || '-'}}
+
+
+ No results
+
+
+
+
+
\ No newline at end of file
diff --git a/client/client/src/mandate/mandate.js b/client/client/src/mandate/mandate.js
new file mode 100644
index 0000000000..e48222ce65
--- /dev/null
+++ b/client/client/src/mandate/mandate.js
@@ -0,0 +1,7 @@
+import ngModule from '../module';
+import FilterClientList from '../filterClientList';
+
+ngModule.component('vnClientMandate', {
+ template: require('./mandate.html'),
+ controller: FilterClientList
+});