tarea #105 esturcctura montada, falta rellenar datos
This commit is contained in:
parent
465d210b51
commit
b92f8bdd43
|
@ -179,6 +179,14 @@
|
|||
"description": "Mandate",
|
||||
"icon": "pan_tool"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url": "/summary",
|
||||
"state": "clientCard.summary",
|
||||
"component": "vn-client-summary",
|
||||
"params": {
|
||||
"client": "$ctrl.client"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -19,3 +19,4 @@ import './credit-create/credit-create';
|
|||
import './greuge-list/greuge-list';
|
||||
import './greuge-create/greuge-create';
|
||||
import './mandate/mandate';
|
||||
import './summary/client-summary';
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
<vn-card margin-medium-top>
|
||||
<vn-item-client
|
||||
ng-repeat="client in index.model.instances"
|
||||
title="View client"
|
||||
client="client">
|
||||
</vn-item-client>
|
||||
</vn-card>
|
||||
|
@ -24,4 +23,10 @@
|
|||
<a ui-sref="create" fixed-bottom-right>
|
||||
<vn-float-button icon="person_add"></vn-float-button>
|
||||
</a>
|
||||
<vn-dialog class="dialog-summary"
|
||||
vn-id="dialog-summary-client">
|
||||
<tpl-body>
|
||||
<vn-client-summary client="$ctrl.clientSelected"></vn-client-summary>
|
||||
</tpl-body>
|
||||
</vn-dialog>
|
||||
</div>
|
||||
|
|
|
@ -3,13 +3,19 @@ import './style.scss';
|
|||
import './item-client';
|
||||
|
||||
export default class Controller {
|
||||
constructor() {
|
||||
this.model = {};
|
||||
constructor($scope) {
|
||||
this.$scope = $scope;
|
||||
this.clientSelected = null;
|
||||
}
|
||||
search(index) {
|
||||
index.accept();
|
||||
}
|
||||
openSummary(client) {
|
||||
this.clientSelected = client;
|
||||
this.$scope.dialogSummaryClient.show();
|
||||
}
|
||||
}
|
||||
Controller.$inject = ['$scope'];
|
||||
|
||||
ngModule.component('vnClientIndex', {
|
||||
template: require('./index.html'),
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
<a ui-sref="clientCard.basicData({ id: {{::$ctrl.client.id}} })" pad-medium border-solid-bottom>
|
||||
<h6>{{::$ctrl.client.name}}</h6>
|
||||
<div><span translate>Id</span> {{::$ctrl.client.id}}</div>
|
||||
<div><span translate>Phone</span> {{::$ctrl.client.phone | phone}}</div>
|
||||
<div><span translate>Town/City</span> {{::$ctrl.client.city}}</div>
|
||||
<div><span translate>Email</span> {{::$ctrl.client.email}}</div>
|
||||
</a>
|
||||
<vn-horizontal pad-medium border-solid-bottom>
|
||||
<a vn-one ui-sref="clientCard.basicData({ id: {{::$ctrl.client.id}} })" title="View client">
|
||||
<h6>{{::$ctrl.client.name}}</h6>
|
||||
<div><span translate>Id</span> {{::$ctrl.client.id}}</div>
|
||||
<div><span translate>Phone</span> {{::$ctrl.client.phone | phone}}</div>
|
||||
<div><span translate>Town/City</span> {{::$ctrl.client.city}}</div>
|
||||
<div><span translate>Email</span> {{::$ctrl.client.email}}</div>
|
||||
</a>
|
||||
<vn-auto>
|
||||
<vn-icon ng-click="$ctrl.preview()" vn-tooltip="Preview" pad-medium-top margin-small-top icon="icon-preview"></vn-icon>
|
||||
</vn-auto>
|
||||
</vn-horizontal>
|
||||
|
|
|
@ -1,8 +1,18 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
class Controller {
|
||||
preview() {
|
||||
this.list.openSummary(this.client);
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.component('vnItemClient', {
|
||||
template: require('./item-client.html'),
|
||||
controller: Controller,
|
||||
bindings: {
|
||||
client: '<'
|
||||
},
|
||||
require: {
|
||||
list: '^vnClientIndex'
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,20 +1,21 @@
|
|||
vn-item-client {
|
||||
display: block;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
a:hover {
|
||||
color: white;
|
||||
background-color: #424242;
|
||||
}
|
||||
span {
|
||||
font-size: .9em;
|
||||
color: #666;
|
||||
}
|
||||
a:hover span {
|
||||
color: #aaa;
|
||||
vn-horizontal {
|
||||
a {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
&:hover {
|
||||
color: white;
|
||||
background-color: #424242;
|
||||
}
|
||||
span {
|
||||
font-size: .9em;
|
||||
color: #666;
|
||||
}
|
||||
&:hover span {
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
<vn-vertical vn-one pad-medium>
|
||||
<vn-card class="summary">
|
||||
<vn-vertical pad-medium>
|
||||
<vn-auto>
|
||||
<h5 text-center pad-small-v class="tittle">{{$ctrl.client.name}} - {{$ctrl.client.id}} - {{$ctrl.client.salesPerson.name}}</h5>
|
||||
</vn-auto>
|
||||
<vn-horizontal vn-one>
|
||||
<vn-one margin-medium>
|
||||
<h5 translate>Basic data</h5>
|
||||
<p><span translate>Social name</span>: <b>{{$ctrl.client.socialName}}</b></p>
|
||||
</vn-one>
|
||||
<vn-one margin-medium>
|
||||
<h5 translate>Fiscal data</h5>
|
||||
</vn-one>
|
||||
<vn-one margin-medium>
|
||||
<h5 translate>Pay method</h5>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal vn-one>
|
||||
<vn-one margin-medium>
|
||||
<h5 translate>Address</h5>
|
||||
</vn-one>
|
||||
<vn-one margin-medium>
|
||||
<h5 translate>Credit</h5>
|
||||
</vn-one>
|
||||
<vn-one margin-medium>
|
||||
<h5 translate>Greuge</h5>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
</vn-vertical>
|
|
@ -0,0 +1,8 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
ngModule.component('vnClientSummary', {
|
||||
template: require('./client-summary.html'),
|
||||
bindings: {
|
||||
client: '<'
|
||||
}
|
||||
});
|
|
@ -6,7 +6,7 @@
|
|||
* @return {String} The camelized string
|
||||
*/
|
||||
export function kebabToCamel(str) {
|
||||
var camelCased = str.replace(/-([a-z])/, function(g) {
|
||||
var camelCased = str.replace(/-([a-z])/g, function(g) {
|
||||
return g[1].toUpperCase();
|
||||
});
|
||||
return camelCased;
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
<a ui-sref="item.create" fixed-bottom-right>
|
||||
<vn-float-button icon="add"></vn-float-button>
|
||||
</a>
|
||||
<vn-dialog vn-id="preview" class="dialog-item-summary">
|
||||
<tpl-body style="width:auto; background-color: transparent">
|
||||
<vn-dialog vn-id="preview" class="dialog-summary">
|
||||
<tpl-body>
|
||||
<vn-item-summary item="$ctrl.itemSelected"></vn-item-summary>
|
||||
</tpl-body>
|
||||
</vn-dialog>
|
||||
|
|
|
@ -28,16 +28,3 @@ vn-item-product img {
|
|||
.vn-item-product-name {
|
||||
font-family: vn-font-bold;
|
||||
}
|
||||
|
||||
.vn-dialog.dialog-item-summary > div {
|
||||
border: none;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
.vn-dialog.dialog-item-summary > div > button.close > vn-icon {
|
||||
color: $color-orange;
|
||||
}
|
||||
.vn-dialog.dialog-item-summary vn-item-summary > vn-card {
|
||||
min-width: 680px;
|
||||
margin-left: -20px;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
<vn-card>
|
||||
<vn-card class="summary">
|
||||
<vn-vertical pad-medium>
|
||||
<vn-horizontal>
|
||||
<vn-one margin-medium>
|
||||
|
@ -12,7 +12,7 @@
|
|||
zoom-image="http://verdnatura.es/vn-image-data/catalog/900x900/{{$ctrl.item.image}}" on-error-src/>
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<h5 text-center pad-small-v class="summaryId">{{$ctrl.item.id}}</h5>
|
||||
<h5 text-center pad-small-v class="tittle">{{$ctrl.item.id}}</h5>
|
||||
</vn-one>
|
||||
</vn-vertical>
|
||||
</vn-auto>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import ngModule from '../module';
|
||||
import './style.scss';
|
||||
|
||||
class ItemSummary {
|
||||
constructor($http) {
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
@import "../../../salix/src/styles/colors";
|
||||
|
||||
vn-item-summary{
|
||||
h5 {
|
||||
border-bottom: 2px solid $color-orange;
|
||||
}
|
||||
h5.summaryId {
|
||||
border: none;
|
||||
background: $color-orange;
|
||||
color: $color-white;
|
||||
}
|
||||
p {
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
}
|
|
@ -7,3 +7,4 @@ import './background.scss';
|
|||
import './border.scss';
|
||||
import './font-style.scss';
|
||||
import './misc.scss';
|
||||
import './summary.scss';
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
@import "./colors";
|
||||
|
||||
.summary{
|
||||
h5 {
|
||||
border-bottom: 2px solid $color-orange;
|
||||
}
|
||||
h5.tittle {
|
||||
border: none;
|
||||
background: $color-orange;
|
||||
color: $color-white;
|
||||
}
|
||||
p {
|
||||
margin: 0 0 5px 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.vn-dialog.dialog-summary > div {
|
||||
border: none;
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
.vn-dialog.dialog-summary > div > button.close > vn-icon {
|
||||
color: $color-orange;
|
||||
}
|
||||
.vn-dialog.dialog-summary tpl-body {
|
||||
width:auto;
|
||||
background-color: transparent;
|
||||
}
|
||||
.vn-dialog.dialog-summary form {
|
||||
min-width: 680px;
|
||||
margin-left: -20px;
|
||||
}
|
Loading…
Reference in New Issue