Skip to content

Commit

Permalink
fix: add disabledActions
Browse files Browse the repository at this point in the history
roundtrip and addPlaceInput buttons are no longer shown, since they do nothing in the optimization tab anyway
  • Loading branch information
blackbirdem committed Jun 3, 2024
1 parent 280945b commit 06d499d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/config-examples/app-config-example.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const appConfig = {

autoSelectFirstExactAddressMatchOnSearchEnter: true, // If the first exact address match must be auto selected when the user type a text and in the place search and hit enter/return

disabledActionsForOptimization: ['addPlaceInput', 'roundtrip'], // Possible values: `addPlaceInput`, `clearPlaces`, `reverseRoute`, `roundtrip`, `routeImporter`
disabledActionsForIsochrones: ['roundtrip'], // Possible values: `addPlaceInput`, `clearPlaces`, `reverseRoute`, `roundtrip`, `routeImporter`
disabledActionsForPlacesAndDirections: [], // // Possible values: `addPlaceInput`, `clearPlaces`, `reverseRoute`, `roundtrip`, `routeImporter`
supportsPlacesAndDirections: true, // If the whole places and directions feature is supported/enabled in the application
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@
</div>
</template>
</v-tooltip>
<form-actions :place-inputs="jobs.length"
@addPlaceInput="addPlaceInput"
<form-actions :place-inputs="jobs.length" :disabled-actions="disabledActions"
@clearPlaces="clearPlaces"
@reverseRoute="reverseRoute"
@contentUploaded="contentUploaded">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Optimization } from '@/support/ors-api-runner'
import AppMode from '@/support/app-modes/app-mode'
import MapViewData from '@/models/map-view-data'
import constants from '@/resources/constants'
import appConfig from '@/config/app-config'
import Place from '@/models/place'
import Job from '@/models/job'
import Vehicle from '@/models/vehicle'
Expand Down Expand Up @@ -88,6 +89,9 @@ export default {
}
}
return skillIds
},
disabledActions () {
return appConfig.disabledActionsForOptimization
}
},
created () {
Expand Down

0 comments on commit 06d499d

Please sign in to comment.