Add origins and calculation of distance and duration

This commit is contained in:
2019-03-02 11:45:45 +01:00
parent 9661a07e31
commit fc0e546219
11 changed files with 165 additions and 26 deletions
+12
View File
@@ -14,6 +14,18 @@
<v-flex xs12 sm6 md3><strong>Kommun:</strong> <a href="#" v-if="hasUser" @click.prevent="ignore('municipality', event.danceHall.municipality)"><v-icon small title="Dölj">mdi-eye-off</v-icon></a>&nbsp;{{event.danceHall.municipality}}</v-flex>
<v-flex xs12 sm6 md3><strong>Län:</strong> <a href="#" v-if="hasUser" @click.prevent="ignore('state', event.danceHall.state)"><v-icon small title="Dölj">mdi-eye-off</v-icon></a>&nbsp;{{event.danceHall.state}}</v-flex>
</v-layout>
<v-layout row wrap v-for="distance in event.distances" :key="event.origin">
<v-flex xs12 sm6 md3>
<v-icon>mdi-home</v-icon>
<span><strong>{{distance.origin}}</strong></span>
</v-flex>
<v-flex xs12 sm6 md9>
<v-icon>mdi-car</v-icon>
<span>{{distance.distance / 1000 | numeral('0,0.00')}} km</span>
<v-icon>mdi-clock-outline</v-icon>
<span>{{distance.duration}}</span>
</v-flex>
</v-layout>
</v-container>
</v-card>
</template>