Help Slideover and trackingtrips
This commit is contained in:
@@ -22,7 +22,7 @@ const links = [{
|
|||||||
target: '_blank'
|
target: '_blank'
|
||||||
}, {
|
}, {
|
||||||
label: 'Roadmap',
|
label: 'Roadmap',
|
||||||
icon: 'i-heroicons-rocket-launch-solid',
|
icon: 'i-heroicons-rocket-launch',
|
||||||
to: 'https://fedeo.de/roadmap',
|
to: 'https://fedeo.de/roadmap',
|
||||||
target: '_blank'
|
target: '_blank'
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
markers: {
|
startMarker: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
endMarker: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const {markers} = props
|
const {startMarker,endMarker} = props
|
||||||
|
|
||||||
const zoom =ref(2)
|
const zoom =ref(2)
|
||||||
|
|
||||||
@@ -20,7 +24,7 @@ const zoom =ref(2)
|
|||||||
<div class="h-full w-full">
|
<div class="h-full w-full">
|
||||||
<LMap
|
<LMap
|
||||||
style="height: 300px;"
|
style="height: 300px;"
|
||||||
:center="markers[0]"
|
:center="startMarker"
|
||||||
:use-global-leaflet="false"
|
:use-global-leaflet="false"
|
||||||
:zoom="10"
|
:zoom="10"
|
||||||
ref="map"
|
ref="map"
|
||||||
@@ -32,10 +36,26 @@ const zoom =ref(2)
|
|||||||
name="OpenStreetMap"
|
name="OpenStreetMap"
|
||||||
/>
|
/>
|
||||||
<LMarker
|
<LMarker
|
||||||
v-for="marker in markers"
|
:lat-lng="startMarker"
|
||||||
:lat-lng="marker"
|
>
|
||||||
|
<LIcon
|
||||||
|
icon-url="https://api.iconify.design/heroicons:map-pin-solid.svg"
|
||||||
/>
|
/>
|
||||||
|
</LMarker>
|
||||||
|
<LMarker
|
||||||
|
:lat-lng="endMarker"
|
||||||
|
>
|
||||||
|
<LIcon
|
||||||
|
icon-url="https://api.iconify.design/heroicons:flag-solid.svg"
|
||||||
|
/>
|
||||||
|
</LMarker>
|
||||||
</LMap>
|
</LMap>
|
||||||
|
<div class="w-2/3 mx-auto mt-3 flex flex-row justify-between">
|
||||||
|
|
||||||
|
<p><UIcon name="i-heroicons-map-pin-solid" class="mr-3"/>Start</p>
|
||||||
|
|
||||||
|
<p><UIcon name="i-heroicons-flag-solid" class="mr-3"/>Ziel</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ const itemInfo = ref({
|
|||||||
const oldItemInfo = ref({})
|
const oldItemInfo = ref({})
|
||||||
|
|
||||||
const profiles = ref([])
|
const profiles = ref([])
|
||||||
|
const projects = ref([])
|
||||||
|
|
||||||
//Functions
|
//Functions
|
||||||
const setupPage = async () => {
|
const setupPage = async () => {
|
||||||
@@ -56,6 +57,7 @@ const setupPage = async () => {
|
|||||||
if(itemInfo.value) oldItemInfo.value = JSON.parse(JSON.stringify(itemInfo.value))
|
if(itemInfo.value) oldItemInfo.value = JSON.parse(JSON.stringify(itemInfo.value))
|
||||||
|
|
||||||
profiles.value = await useSupabaseSelect("profiles","*")
|
profiles.value = await useSupabaseSelect("profiles","*")
|
||||||
|
projects.value = await useSupabaseSelect("projects","*")
|
||||||
}
|
}
|
||||||
|
|
||||||
const cancelEditorCreate = () => {
|
const cancelEditorCreate = () => {
|
||||||
@@ -102,8 +104,8 @@ const zoom = ref(6)
|
|||||||
<template #center>
|
<template #center>
|
||||||
<h1
|
<h1
|
||||||
v-if="itemInfo"
|
v-if="itemInfo"
|
||||||
:class="['text-xl','font-medium', ...itemInfo.fixed ? ['text-primary-500'] : ['text-rose-600'] ]"
|
:class="['text-xl','font-medium' ]"
|
||||||
>{{itemInfo ? `Fahrt vom: ${dayjs(itemInfo.startTime).format("DD.MM.YY HH:mm")} über ${(itemInfo.distance/1000).toFixed(2)} km` : '' }}</h1>
|
><UIcon name="i-heroicons-lock-closed" v-if="itemInfo.fixed"/><UIcon name="i-heroicons-lock-open" v-else/> {{itemInfo ? `Fahrt vom: ${dayjs(itemInfo.startTime).format("DD.MM.YY HH:mm")} über ${(itemInfo.distance/1000).toFixed(2)} km` : '' }} </h1>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<UButton
|
<UButton
|
||||||
@@ -190,7 +192,13 @@ const zoom = ref(6)
|
|||||||
|
|
||||||
</UCard>
|
</UCard>
|
||||||
<UCard class="mt-5">
|
<UCard class="mt-5">
|
||||||
<Map :markers="[[itemInfo.startLatitude, itemInfo.startLongitude],[itemInfo.endLatitude, itemInfo.endLongitude]]"/>
|
<Map :markers="[[itemInfo.startLatitude, itemInfo.startLongitude],[itemInfo.endLatitude, itemInfo.endLongitude]]"
|
||||||
|
:startMarker="[itemInfo.startLatitude, itemInfo.startLongitude]"
|
||||||
|
:endMarker="[itemInfo.endLatitude, itemInfo.endLongitude]"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</UCard>
|
</UCard>
|
||||||
</div>
|
</div>
|
||||||
@@ -243,6 +251,17 @@ const zoom = ref(6)
|
|||||||
</template>
|
</template>
|
||||||
</USelectMenu>
|
</USelectMenu>
|
||||||
</UFormGroup>
|
</UFormGroup>
|
||||||
|
<UFormGroup
|
||||||
|
label="Projekt:"
|
||||||
|
>
|
||||||
|
<USelectMenu
|
||||||
|
v-model="itemInfo.project"
|
||||||
|
:options="projects"
|
||||||
|
option-attribute="name"
|
||||||
|
value-attribute="id"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</UFormGroup>
|
||||||
<UFormGroup
|
<UFormGroup
|
||||||
label="Beschreibung:"
|
label="Beschreibung:"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -43,6 +43,10 @@
|
|||||||
@select="(i) => router.push(`/trackingTrips/show/${i.id}`) "
|
@select="(i) => router.push(`/trackingTrips/show/${i.id}`) "
|
||||||
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Fahrten anzuzeigen' }"
|
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine Fahrten anzuzeigen' }"
|
||||||
>
|
>
|
||||||
|
<template #fixed-data="{row}">
|
||||||
|
<UIcon name="i-heroicons-lock-closed" v-if="row.fixed"/>
|
||||||
|
<div v-else></div>
|
||||||
|
</template>
|
||||||
<template #licensePlate-data="{row}">
|
<template #licensePlate-data="{row}">
|
||||||
<span v-if="row === filteredRows[selectedItem]" class="font-bold text-primary-500">{{row.vehicle.licensePlate}}</span>
|
<span v-if="row === filteredRows[selectedItem]" class="font-bold text-primary-500">{{row.vehicle.licensePlate}}</span>
|
||||||
<span v-else>{{row.vehicle.licensePlate}}</span>
|
<span v-else>{{row.vehicle.licensePlate}}</span>
|
||||||
@@ -108,6 +112,10 @@ const setupPage = async () => {
|
|||||||
setupPage()
|
setupPage()
|
||||||
|
|
||||||
const templateColumns = [
|
const templateColumns = [
|
||||||
|
{
|
||||||
|
key: 'fixed',
|
||||||
|
label: ""
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'licensePlate',
|
key: 'licensePlate',
|
||||||
label: "Kennzeichen:",
|
label: "Kennzeichen:",
|
||||||
|
|||||||
Reference in New Issue
Block a user