Skip to content

Commit

Permalink
fix: expansion of job list
Browse files Browse the repository at this point in the history
  • Loading branch information
Seli0303 committed Aug 1, 2024
1 parent 0750448 commit 3226f02
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
{{ $t('optimization.addFromMap') + $t('optimization.job') }}
</v-btn>
<!-- low priority TODO: more elegant solution for this? -->
<job-list class="content-list" v-if="mapViewData.hasRoutes()" :jobs="jobs" :job-extended="jobsExpanded" :map-view-data="mapViewData"
<job-list class="content-list" v-if="mapViewData.hasRoutes()" :jobs="jobs" :map-view-data="mapViewData"
v-show="jobsExpanded"></job-list>
<job-list class="content-list" v-else :jobs="jobs" :job-extended="jobsExpanded"></job-list>
<job-list class="content-list" v-else :jobs="jobs" v-show="jobsExpanded"></job-list>
<v-card class="content-list" v-if="!jobsExpanded" @click="jobsExpanded=!jobsExpanded">
<v-card-title>
<v-icon style="padding: 0 5px 0 7px">work</v-icon>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="job-inputs">
<v-expansion-panel class="no-shadow" :value="showJobs" :expand="true">
<v-expansion-panel class="no-shadow" :expand="true">
<v-expansion-panel-content style="background: transparent;" v-for="(j, i) in jobs" :key="i">
<div v-if="localMapViewData === null || !unassignedIds.includes(j.id)" slot="header" style="padding-bottom: 0;"><v-icon style="padding: 0 5px 0 0">work</v-icon><b>Job {{j.id}} - {{ j.location[0].toPrecision(8) }}, {{ j.location[1].toPrecision(8)}}</b></div>
<div v-else slot="header" style="padding-bottom: 0"><v-icon style="padding: 0 5px 0 0">work</v-icon><b>Job {{j.id}} - {{ j.location[0].toPrecision(8) }}, {{ j.location[1].toPrecision(8)}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ export default {
Type: Array,
Required: true
},
jobExtended: {
Type: Boolean,
Default: true
},
mapViewData: {
Type: MapViewData,
Required: false
Expand All @@ -26,9 +22,6 @@ export default {
unassignedIds.push(job.id)
}
return unassignedIds
},
showJobs () {
return [this.jobExtended]
}
},
watch: {
Expand Down

0 comments on commit 3226f02

Please sign in to comment.