localizador rutas maquetacion 90%

This commit is contained in:
Daniel Herrero 2017-11-07 11:22:33 +01:00
parent ed3ee81292
commit 5a1aca198b
6 changed files with 85 additions and 38 deletions

View File

@ -6,8 +6,7 @@ class LocatorIndex {
this.routes = []; this.routes = [];
for (let i = 1; i < 100; i++) { for (let i = 1; i < 100; i++) {
this.routes.push( let route = {
{
id: i, id: i,
zoneFk: Math.floor(Math.random() * 6) + 1, zoneFk: Math.floor(Math.random() * 6) + 1,
postalcode: 46006, postalcode: 46006,
@ -20,8 +19,9 @@ class LocatorIndex {
bultos: Math.floor(Math.random() * 20) + 10, bultos: Math.floor(Math.random() * 20) + 10,
m3: (Math.random()).toFixed(2), m3: (Math.random()).toFixed(2),
error: (Math.floor(Math.random() * 3) + 1) === 1 error: (Math.floor(Math.random() * 3) + 1) === 1
} };
); route.success = (!route.error && (Math.floor(Math.random() * 3) + 1) === 1);
this.routes.push(route);
} }
} }
} }

View File

@ -22,7 +22,7 @@
<vn-vertical <vn-vertical
class="list list-element text-center" class="list list-element text-center"
ng-repeat="route in $ctrl.pageTable.model track by route.id" ng-repeat="route in $ctrl.pageTable.model track by route.id"
ng-class="{warning: route.error}" ng-class="{warning: route.error, success: route.success}"
> >
<vn-horizontal> <vn-horizontal>
<vn-one pad-medium-h></vn-one> <vn-one pad-medium-h></vn-one>
@ -38,16 +38,22 @@
<vn-two pad-medium-h>{{::route.m3}}</vn-two> <vn-two pad-medium-h>{{::route.m3}}</vn-two>
</vn-horizontal> </vn-horizontal>
<vn-horizontal margin-small-top> <vn-horizontal margin-small-top>
<vn-one pad-medium-h> <vn-none pad-medium-h margin--small-top>
<vn-check model="route.checked"></vn-check> <vn-check model="route.checked"></vn-check>
</vn-one> </vn-none>
<vn-none></vn-none> <vn-none pad-medium-h></vn-none>
<vn-seven text-left pad-small border-solid> <vn-one text-left pad-small border-solid>
<strong translate>Address</strong>: {{::route.address}} <strong translate>Address</strong>: {{::route.address}}
</vn-seven> </vn-one>
<vn-none pad-medium-h>
<vn-icon icon="more" vn-tooltip tooltip-template="/static/templates/tooltip.routes.tpl.html" tooltip-position="left"></vn-icon>
</vn-none>
</vn-horizontal> </vn-horizontal>
</vn-vertical> </vn-vertical>
</vn-one> </vn-one>
<vn-horizontal vn-one class="list list-footer">
</vn-horizontal>
<vn-one> <vn-one>
<vn-paging page-change="$ctrl.paginate()" index="$ctrl.pageTable" total="$ctrl.totalFilter"></vn-paging> <vn-paging page-change="$ctrl.paginate()" index="$ctrl.pageTable" total="$ctrl.totalFilter"></vn-paging>
</vn-one> </vn-one>

View File

@ -6,3 +6,7 @@ $color-dark: #3c393b;
$color-dark-grey: #424242; $color-dark-grey: #424242;
$color-light-grey: #e6e6e6; $color-light-grey: #e6e6e6;
$color-medium-grey: #9D9D9D; $color-medium-grey: #9D9D9D;
$color-medium-green: #CCEC9E;
$color-medium-orange: #FFD29C;
$color-light-green: #D7F1BD;
$color-light-orange: #FFDEBB;

View File

@ -87,3 +87,30 @@ html [margin-large-h], .margin-large-h {
margin-left: $margin-large; margin-left: $margin-large;
margin-right: $margin-large; margin-right: $margin-large;
} }
/* Minus Small */
html [margin--small], .margin--small {
margin: -$margin-small;
}
html [margin--small-top], .margin--small-top {
margin-top: -$margin-small;
}
html [margin--small-left], .margin--small-left {
margin-left: -$margin-small;
}
html [margin--small-right], .margin--small-right {
margin-right: -$margin-small;
}
html [margin--small-bottom], .margin--small-bottom {
margin-bottom: -$margin-small;
}
html [margin--small-v], .margin--small-v {
margin-top: -$margin-small;
margin-bottom: -$margin-small;
}
html [margin--small-h], .margin--small-h {
margin-left: -$margin-small;
margin-right: -$margin-small;
}

View File

@ -76,21 +76,17 @@ html [vn-center], .vn-center{
border-top: 3px solid $color-medium-grey; border-top: 3px solid $color-medium-grey;
} }
.list-element.warning{ .list-element.warning{
background-color: $color-orange; background-color: $color-medium-orange;
color:$color-white; }
font-weight: bold; .list-element.success{
i { background-color: $color-medium-green;
color: $color-white;
} }
.mdl-checkbox.is-checked .mdl-checkbox__box-outline{ .list-element.success:hover{
border-color: $color-white; background-color: $color-light-green;
} }
.mdl-checkbox.is-checked .mdl-checkbox__tick-outline{ .list-element.warning:hover{
background-color: $color-white; background-color: $color-light-orange;
}
&:hover{
opacity: 0.7;
}
} }
.flatpickr-month, .flatpickr-weekdays, span.flatpickr-weekday { .flatpickr-month, .flatpickr-weekdays, span.flatpickr-weekday {
background-color: $color-orange; background-color: $color-orange;

View File

@ -0,0 +1,14 @@
<vn-vertical>
<vn-horizontal class="list list-header">
<vn-one margin-medium-right>Población</vn-one>
<vn-one margin-medium-right>Provincia</vn-one>
<vn-two margin-medium-right>ID_Cliente</vn-two>
<vn-two>Comercial</vn-two>
</vn-horizontal>
<vn-horizontal class="list list-element">
<vn-one margin-medium-right>{{::ticket.city | ucwords}}</vn-one>
<vn-one margin-medium-right>{{::ticket.province | ucwords}}</vn-one>
<vn-two margin-medium-right>{{::ticket.client | ucwords}}</vn-two>
<vn-two>{{::ticket.worker | ucwords}}</vn-two>
</vn-horizontal>
</vn-vertical>