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,22 +6,22 @@ class LocatorIndex {
this.routes = [];
for (let i = 1; i < 100; i++) {
this.routes.push(
{
id: i,
zoneFk: Math.floor(Math.random() * 6) + 1,
postalcode: 46006,
order: Math.floor(Math.random() * 3) + 1,
preparado: '25/08',
entrada: '26/08',
ticket: 1547890 + i,
routeFk: Math.floor(Math.random() * 9999) + 1000,
alias: `Flores X${Math.floor(Math.random() * 3) + 1}`,
bultos: Math.floor(Math.random() * 20) + 10,
m3: (Math.random()).toFixed(2),
error: (Math.floor(Math.random() * 3) + 1) === 1
}
);
let route = {
id: i,
zoneFk: Math.floor(Math.random() * 6) + 1,
postalcode: 46006,
order: Math.floor(Math.random() * 3) + 1,
preparado: '25/08',
entrada: '26/08',
ticket: 1547890 + i,
routeFk: Math.floor(Math.random() * 9999) + 1000,
alias: `Flores X${Math.floor(Math.random() * 3) + 1}`,
bultos: Math.floor(Math.random() * 20) + 10,
m3: (Math.random()).toFixed(2),
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
class="list list-element text-center"
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-one pad-medium-h></vn-one>
@ -38,16 +38,22 @@
<vn-two pad-medium-h>{{::route.m3}}</vn-two>
</vn-horizontal>
<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-one>
<vn-none></vn-none>
<vn-seven text-left pad-small border-solid>
</vn-none>
<vn-none pad-medium-h></vn-none>
<vn-one text-left pad-small border-solid>
<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-vertical>
</vn-one>
<vn-horizontal vn-one class="list list-footer">
</vn-horizontal>
<vn-one>
<vn-paging page-change="$ctrl.paginate()" index="$ctrl.pageTable" total="$ctrl.totalFilter"></vn-paging>
</vn-one>

View File

@ -5,4 +5,8 @@ $color-white: white;
$color-dark: #3c393b;
$color-dark-grey: #424242;
$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-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;
}
.list-element.warning{
background-color: $color-orange;
color:$color-white;
font-weight: bold;
i {
color: $color-white;
}
.mdl-checkbox.is-checked .mdl-checkbox__box-outline{
border-color: $color-white;
}
.mdl-checkbox.is-checked .mdl-checkbox__tick-outline{
background-color: $color-white;
}
&:hover{
opacity: 0.7;
}
background-color: $color-medium-orange;
}
.list-element.success{
background-color: $color-medium-green;
}
.list-element.success:hover{
background-color: $color-light-green;
}
.list-element.warning:hover{
background-color: $color-light-orange;
}
.flatpickr-month, .flatpickr-weekdays, span.flatpickr-weekday {
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>