Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,211 changes: 610 additions & 601 deletions .firebase/hosting.ZGlzdA.cache

Large diffs are not rendered by default.

Binary file modified .metals/metals.h2.db
Binary file not shown.
6 changes: 3 additions & 3 deletions .metals/metals.lock.db
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#FileLock
#Mon Feb 17 08:16:36 IST 2020
#Wed Feb 19 05:46:06 IST 2020
hostName=Choolaka-Pc
id=170510a3076021eb10641afc5cc0774ca3810c37195
id=1705acd217b8a9bca2d2c2ffc04bbed5eca49277fb5
method=file
server=169.254.211.207\:56331
server=169.254.211.207\:63392
6 changes: 6 additions & 0 deletions .metals/metals.log
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,9 @@ INFO time: initialize in 3.15s
WARN no build tool detected in workspace 'c:\Users\Chulaka\tref4-4\frontend'. The most common cause for this problem is that the editor was opened in the wrong working directory, for example if you use sbt then the workspace directory should contain build.sbt.
INFO time: initialize in 2.98s
WARN no build tool detected in workspace 'c:\Users\Chulaka\tref4-4\frontend'. The most common cause for this problem is that the editor was opened in the wrong working directory, for example if you use sbt then the workspace directory should contain build.sbt.
INFO time: initialize in 2.73s
WARN no build tool detected in workspace 'c:\Users\Chulaka\tref4-4\frontend'. The most common cause for this problem is that the editor was opened in the wrong working directory, for example if you use sbt then the workspace directory should contain build.sbt.
INFO time: initialize in 3.98s
WARN no build tool detected in workspace 'c:\Users\Chulaka\tref4-4\frontend'. The most common cause for this problem is that the editor was opened in the wrong working directory, for example if you use sbt then the workspace directory should contain build.sbt.
INFO time: initialize in 5.28s
WARN no build tool detected in workspace 'c:\Users\Chulaka\tref4-4\frontend'. The most common cause for this problem is that the editor was opened in the wrong working directory, for example if you use sbt then the workspace directory should contain build.sbt.
Binary file modified public/favicon.ico
Binary file not shown.
Binary file added public/used.ico
Binary file not shown.
9 changes: 5 additions & 4 deletions src/components/AppNavigation.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<span>
<v-navigation-drawer app v-model="drawer" class="brown lighten-2" dark disable-resize-watcher>
<v-navigation-drawer app v-model="drawer" class="cyan lighten-1" dark disable-resize-watcher>
<v-list>
<template v-for="item in items">
<v-list-tile :key="item.title">
Expand Down Expand Up @@ -41,8 +41,9 @@
<v-spacer class="hidden-md-and-up"></v-spacer>
<router-link to="/">

<v-toolbar-title data-cy="titleBtn" class="blue--text">{{appTitle}}</v-toolbar-title>
</router-link>
<v-toolbar-title data-cy="titleBtn" class="light-green--text">{{appTitle}}</v-toolbar-title>
<!-- <v-toolbar-title data-cy="titleBtn" class="blue--text"><v-img src="https://i.imgur.com/IP5kJjE.png"></v-img></v-toolbar-title>
--> </router-link>
<!-- <v-btn flat class="hidden-sm-and-down nav-menu" to="/menu" data-cy="menuBtn">Menu</v-btn> -->
<v-spacer class="hidden-sm-and-down"></v-spacer>
<v-toolbar-items class="hidden-sm-and-down">
Expand Down Expand Up @@ -86,7 +87,7 @@ export default {

if(this.userIsauthenticated ){
items = [
{title: 'View Guides' , to: '/viewguidesfinl'},
{title: 'View Guides' , to: '/waitingtest'},
{title: 'Create Guide' , to: '/newhike'},
{title: 'Profile' , to: '/profile'},

Expand Down
25 changes: 14 additions & 11 deletions src/components/ConvertMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@
<gmap-map v-bind:center="center" v-bind:zoom="12" style="width: 1200px; height: 576px" >

<!-- -->
<GmapMarker
<!-- <GmapMarker
v-bind:key="index"
v-for="(m, index) in favorites.position"
v-bind:position="favorites.position.m"
v-bind:clickable="true"
v-bind:draggable="true"
@click="center=m"
/>
/> -->

<gmap-polyline v-bind:path.sync="favorites.position" v-bind:options="{ strokeColor:'blue'}">
<!-- <gmap-polyline v-bind:path.sync="favorites.position" v-bind:options="{ strokeColor:'blue'}">
</gmap-polyline>

-->

<gmap-polyline v-bind:path.sync="path" v-bind:options="{ strokeColor:'#008000'}">
</gmap-polyline>



<gmap-polyline v-bind:path.sync="pathtracked" v-bind:options="{ strokeColor:'purple'}">
</gmap-polyline> -->
</gmap-polyline>


</gmap-map>
Expand Down Expand Up @@ -79,7 +79,7 @@
</v-flex>
</v-layout>

<v-container v-if="this.path3[0]">
<v-container>
<v-layout row >
<v-flex xs12 class="text-xs-center font-weight-black headline">
<!-- Ella -->
Expand All @@ -97,7 +97,7 @@
<v-card elevation="19">
<gmap-map v-bind:center="center" v-bind:zoom="12" style="width: 1200px; height: 576px" >

<GmapMarker
<GmapMarker
v-bind:position="favorites3"
v-bind:clickable="true"
v-bind:draggable="true"
Expand Down Expand Up @@ -208,7 +208,7 @@ export default {
// polyline: '{oll@{n|iN}AfCgApA}BdBuHhFeDnB{AdAg@d@{CzEu@vAi@lA_@n@_@b@eC|B_EhDgCbCY`@}AhCeCbDm@dAmAhCqApCk@lAg@xAU`AMz@QbBc@jB]t@i@f@eAt@_Aj@gCvAiCdBm@j@cAjAU\\{@dAgAz@qAvAk@`As@`Ai@h@[Ve@\\m@XcA^qBb@cATk@Vi@\\oAdAo@l@]Tu@NeCDaCJe@F[J[TQNUd@ETGdAHh@d@`An@`At@jAP^VhANfBf@jGHjB?fAQnCAfBTzCHx@AlAAzAEj@Q|@Qd@y@dAm@f@s@^eBr@oAb@kBn@kIlBoE~AeBp@cAp@g@f@c@d@g@p@uAnCiCnFmCpGyBzFq@tAi@x@yA|B_AvBg@xAw@|AmAtBu@rA_BnDi@nAcArB}BtEu@`Bc@bAyAjCgBzD{BtGq@tBCTJ^bB~@`@Zt@|@j@`Aj@nA~@dCVpAP`B@`@C`AUhAu@vBOt@m@|By@xA_AlBm@pAkCjGAPOd@KZBB?D?DNVDJ@Jl@j@b@j@hAlB`@r@v@|BV|@PjAPvB@`@OvAk@zCc@nB_CjHcA`CcAtBaArB}@|AiB`Ey@dBk@~@cB`B}AfBsA|B_AhB',
wholeResponse: [],
// polyline: wholeResponse[4].direction.points,
center: {lat: 7.4807041, lng: 80.3227606},
center: {lat: 7.4407518, lng: 80.4848742},
// center: path[0],
path: [],
path1: [],
Expand All @@ -234,6 +234,7 @@ export default {
],

pathcreator: '',
pathcreator1: '',
}
},
mounted () {
Expand All @@ -255,15 +256,17 @@ export default {
this.path = decodePolyline(this.wholeResponse[0].direction.points);
this.pathtracked = decodePolyline(this.wholeResponse[0].tracked_locations);
console.log(this.pathtracked)
this.favorites.position = decodePolyline(this.wholeResponse[0].landmarks[0]);
console.log(this.favorites.position)
// this.pathcreator = wholeResponse[0].user.given_name
// this.favorites.position = decodePolyline(this.wholeResponse[0].landmarks[0]);
// console.log(this.favorites.position)
this.pathcreator = this.wholeResponse[0].user.given_name
// console.log(this.pathcreator)
console.log(this.wholeResponse[0].user.given_name)

this.path1 = decodePolyline(this.wholeResponse[1].direction.points);
this.pathtracked1 = decodePolyline(this.wholeResponse[1].tracked_locations);
console.log(this.pathtracked)
console.log(this.pathtracked1)
this.pathcreator1 = this.wholeResponse[1].user.given_name



Expand Down
231 changes: 231 additions & 0 deletions src/components/ConvertMaptest.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
<template>
<v-container>
<v-layout row>
<v-flex xs12 class="text-xs-center display-3 font-weight-thin">
Journeys
</v-flex>
</v-layout><!--
<v-layout class="mt-4" row v-for="guide in wholeResponse " :key="guide._id"> -->
<v-layout row>
<v-flex xs12>
<v-layout row>
<v-btn block color="#91e6be" @click="find1" ></v-btn>
</v-layout>
</v-flex>
</v-layout>

<v-container v-if="this.wholeResponse[0]">
<v-layout row>
<v-flex xs12>
<v-layout row>
<v-btn block color="#91e6be" @click="mapclick(0)" >{{this.wholeResponse[0].journey.title}}</v-btn>
</v-layout>
</v-flex>
</v-layout>
</v-container>

<v-container v-if="this.wholeResponse[1]">
<v-layout row >
<v-flex xs12>
<v-layout row>
<v-btn block color="#91e6be" @click="mapclick(1)" >{{this.wholeResponse[1].journey.title}}</v-btn>
</v-layout>
</v-flex>
</v-layout>
</v-container>

<v-container v-if="this.wholeResponse[2]">
<v-layout row>
<v-flex xs12>
<v-layout row>
<v-btn block color="#91e6be" @click="mapclick(2)" >{{this.wholeResponse[2].journey.title}}</v-btn>
</v-layout>
</v-flex>
</v-layout>
</v-container>

<v-container v-if="this.wholeResponse[3]">
<v-layout row>
<v-flex xs12>
<v-layout row>
<v-btn block color="#91e6be" @click="mapclick(3)" >{{this.wholeResponse[3].journey.title}}</v-btn>
</v-layout>
</v-flex>
</v-layout>
</v-container>


<v-container v-if="this.wholeResponse[4]">
<v-layout row>
<v-flex xs12>
<v-layout row>
<v-btn block color="#91e6be" @click="mapclick(4)" >{{this.wholeResponse[4].journey.title}}</v-btn>
</v-layout>
</v-flex>
</v-layout>
</v-container>

<v-container v-if="this.wholeResponse[5]">
<v-layout row>
<v-flex xs12>
<v-layout row>
<v-btn block color="#91e6be" @click="mapclick(5)" >{{this.wholeResponse[5].journey.title}}</v-btn>
</v-layout>
</v-flex>
</v-layout>
</v-container>
<!-- <v-layout row>
<v-flex xs12 class="text-xs-center font-weight-black">
From {{ journey.journey.origin.address }} to {{ journey.journey.destination.address }}
created by {{journey.user.given_name}}
</v-flex>
</v-layout>

<v-layout row>
<v-flex xs12 class="text-xs-center">
<v-card elevation="19">
<gmap-map v-bind:center="center" v-bind:zoom="12" style="width: 1200px; height: 576px" >


<gmap-polyline v-bind:path.sync="path" v-bind:options="{ strokeColor:'#008000'}">
</gmap-polyline>

</gmap-map>
</v-card>
</v-flex>
</v-layout>
</v-flex>
-->
<v-container v-if="clicked">
<v-layout row>
<v-flex xs12 class="text-xs-center">
<v-layout row>
<v-flex xs12 class="text-xs-center font-weight-black">
From {{this.point0}} to {{this.point1}} | created by - {{this.creator}} |
</v-flex>
</v-layout>
<v-card elevation="19">
<gmap-map v-bind:center="center" v-bind:zoom="10" style="width: 1200px; height: 576px" >


<gmap-polyline v-bind:path.sync="path" v-bind:options="{ strokeColor:'#008000'}">
</gmap-polyline>


<gmap-polyline v-bind:path.sync="pathtracked" v-bind:options="{ strokeColor:'purple'}">
</gmap-polyline>

</gmap-map>
</v-card>
<v-layout row>
<v-flex xs12 class="text-xs-center">
<v-btn color="#7df08e" >Publish</v-btn>
<v-btn color="#f23343" >DELETE</v-btn>
</v-flex>
</v-layout>
<v-btn @click="clear()">clear</v-btn>
</v-flex>
</v-layout>
</v-container>

</v-container>

</template>


<script>
import axios from 'axios';
const decodePolyline = require('decode-google-map-polyline');
export default {
data () {
return {
wholeResponse: [],
path: [],
pathtracked: [],
mapcurrent: '',
clicked: null,

center: {lat: 7.4407518, lng: 80.4848742},
point0: '',
point1: '',
creator: ''
}
},
mounted () {
let config = {
headers: {
Authorization: this.$store.getters.token
}
}
axios
.get('https://api-treflor.herokuapp.com/journey/',config)/*
.get('https://api-treflor.herokuapp.com/images/unpublished',config) */

.then(response => {


this.wholeResponse = response.data
console.log(this.wholeResponse)

})
},

methods : {
mapclick (journeyid) {
/* console.log(this.wholeResponse)
*/this.clicked = true
this.mapcurrent = journeyid
/* var i;
for(i = 0 ; i <= this.wholeResponse.length; i++ ){
if (this.wholeResponse[i]._id == journeyid ){
this.mapcurrent = i
}
} */
this.path = decodePolyline(this.wholeResponse[journeyid].direction.points )
this.pathtracked = decodePolyline(this.wholeResponse[journeyid].tracked_locations);
this.point0 = this.wholeResponse[journeyid].journey.origin.address
this.point1 = this.wholeResponse[journeyid].journey.destination.address
this.creator = this.wholeResponse[journeyid].user.given_name
console.log(this.path)
},

clear () {
this.clicked = false
this.path = null
this.mapcurrent = null
},

find1() {

let config = {
headers: {
Authorization: this.$store.getters.token
}
}/*
let uri = 'https://api-treflor.herokuapp.com/journey/all'; */
let uri = 'https://api-treflor.herokuapp.com/journey/unpublished';
axios.get(uri, /*this.sign*/
config )
.then((response) => {
this.wholeResponse = response.data
console.log(this.wholeResponse)
this.token = config
this.progress = true

this.clicked = false
this.img = this.wholeResponse
}).catch((error) => {
console.log(error)
})
},
}

/* methods : {

polydecode (points) {
decodePolyline(points);
}
} */
}

</script>
6 changes: 4 additions & 2 deletions src/components/CreateGallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@


<v-hover v-slot:default="{ hover }">
<v-card :elevation="hover ? 19 : 1" :color="hover ? 'green' : 'white'" >
<v-card :elevation="hover ? 19 : 1" :color="hover ? 'white' : '#51bfb6'" >
<v-card-text>
<v-container>

Expand Down Expand Up @@ -485,8 +485,10 @@
-->
<v-layout row>
<v-flex xs12 class="text-xs-center">
<v-btn color="yellow" type="submit">
<v-hover v-slot:default="{ hover }">
<v-btn type="submit" :color="hover ? '#51bfb6' : 'white'" k>
Create</v-btn>
</v-hover>

</v-flex>
</v-layout>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CreateGalleryIcon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-container>
<v-layout row>
<v-flex xs12>
<v-btn elevation="19" ripple color="#78c48c" height="219" block to="creategallery" >Create Photo Gallery</v-btn>
<v-btn dark elevation="19" ripple color="#6870ab" height="219" block to="creategallery" >Create Photo Gallery</v-btn>
</v-flex>
</v-layout>
</v-container>
Expand Down
Loading