new client descriptor
This commit is contained in:
parent
a35bfbf96e
commit
3ec5594e71
|
@ -10,6 +10,11 @@
|
|||
active="$ctrl.client.active"
|
||||
class="display-block" >
|
||||
</vn-descriptor>
|
||||
<vn-new-descriptor
|
||||
client="$ctrl.client"
|
||||
active="$ctrl.client.active"
|
||||
class="display-block" >
|
||||
</vn-new-descriptor>
|
||||
<vn-left-menu></vn-left-menu>
|
||||
</vn-auto>
|
||||
<vn-one>
|
||||
|
|
|
@ -1,31 +1,18 @@
|
|||
<vn-card>
|
||||
<vn-vertical class="margin-large" pad-medium-top pad-medium-bottom>
|
||||
<vn-horizontal>
|
||||
<a vn-one ui-sref="clients">
|
||||
<i class="material-icons descriptor-icon" >person</i>
|
||||
</a>
|
||||
|
||||
<vn-vertical vn-two>
|
||||
<div class="margin-none">{{::$ctrl.client.id}}</div>
|
||||
<div class="margin-none">{{$ctrl.client.name}}</div>
|
||||
<div class="margin-none">{{$ctrl.client.phone}}</div>
|
||||
<vn-card margin-large-v>
|
||||
<vn-vertical>
|
||||
<vn-auto class="descriptor-header pointer" ui-sref="clients">
|
||||
<i class="material-icons" >person</i>
|
||||
</vn-auto>
|
||||
<vn-auto pad-medium>
|
||||
<vn-vertical>
|
||||
<vn-horizontal ng-repeat="(field, title) in ::$ctrl.fieldsToShow" ng-if="$ctrl.client[field]">
|
||||
<strong vn-auto>{{::title}}:</strong>
|
||||
<vn-auto margin-small-left>
|
||||
<span ng-if="field.includes('credit')"> {{::$ctrl.client[field] | number:2}} €</span>
|
||||
<span ng-if="!field.includes('credit')">{{::$ctrl.client[field]}}</span>
|
||||
</vn-auto>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-one>
|
||||
<span translate>Credit</span>:
|
||||
</vn-one>
|
||||
<vn-auto>
|
||||
{{$ctrl.client.credit || 0}} €
|
||||
</vn-auto>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-one>
|
||||
<span translate>Secured credit</span>:
|
||||
</vn-one>
|
||||
<vn-auto>
|
||||
{{$ctrl.client.creditInsurance || 0}} €
|
||||
</vn-auto>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
import ngModule from '../module';
|
||||
import './style.scss';
|
||||
|
||||
export default class Controller {
|
||||
constructor($scope, $http) {
|
||||
constructor($scope, $http, $translate) {
|
||||
this.$http = $http;
|
||||
this.fieldsToShow = {
|
||||
id: 'id',
|
||||
name: $translate.instant('name'),
|
||||
phone: $translate.instant('phone'),
|
||||
credit: $translate.instant('credit'),
|
||||
creditInsurance: $translate.instant('creditInsurance')
|
||||
};
|
||||
}
|
||||
set active(value) {
|
||||
if (this._active !== value && this._active !== undefined)
|
||||
|
@ -14,7 +22,7 @@ export default class Controller {
|
|||
return this._active;
|
||||
}
|
||||
}
|
||||
Controller.$inject = ['$scope', '$http'];
|
||||
Controller.$inject = ['$scope', '$http', '$translate'];
|
||||
|
||||
ngModule.component('vnDescriptor', {
|
||||
template: require('./descriptor.html'),
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
vn-descriptor {
|
||||
.descriptor-header{
|
||||
background: rgb(255,171,64);
|
||||
color: white;
|
||||
text-align: center;
|
||||
i {
|
||||
font-size: 40px;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -12,5 +12,9 @@
|
|||
"Routes" : "Rutas",
|
||||
"Production" : "Producción",
|
||||
"Modules access" : "Acceso a módulos",
|
||||
"Locator": "Localizador"
|
||||
"Locator": "Localizador",
|
||||
"name": "Nombre",
|
||||
"credit": "Crédito",
|
||||
"phone": "Teléfono",
|
||||
"creditInsurance": "Crédito Asegurado"
|
||||
}
|
Loading…
Reference in New Issue