File tree 3 files changed +10
-3
lines changed
3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
1
<template >
2
2
<fieldset class =" border p-3 mb-3" >
3
3
<legend >Electric poles</legend >
4
- <CustomizeSelect custom-label =" Entity" label =" Entity" idPrefix =" electric-pole"
4
+ <div class =" form-check" >
5
+ <input type =" checkbox" class =" form-check-input" id =" add-electric-poles" v-model =" addElectricPoles" >
6
+ <label class =" form-check-label" for =" add-electric-poles" >Add electric poles</label >
7
+ </div >
8
+ <CustomizeSelect v-if =" addElectricPoles" custom-label =" Entity" label =" Entity" idPrefix =" electric-pole"
5
9
:showAdvancedOptions =" showAdvancedOptions" :defaultValue =" electricPoleEntityName"
6
10
:defaultIsCustom =" electricPoleIsCustom" v-model =" electricPoleEntityName" v-model:isCustom =" electricPoleIsCustom" >
7
11
<option value =" small-electric-pole" >Small electric pole</option >
8
12
<option value =" medium-electric-pole" >Medium electric pole</option >
9
13
<option value =" big-electric-pole" >Big electric pole</option >
10
14
<option value =" substation" >Substation</option >
11
15
</CustomizeSelect >
12
- <div class =" row" v-show =" showAdvancedOptions" >
16
+ <div class =" row" v-show =" showAdvancedOptions && addElectricPoles " >
13
17
<div class =" col-lg-4 mt-3" >
14
18
<label class =" form-label" for =" electric-pole-wire-reach" >Wire reach</label >
15
19
<input type =" text" pattern =" \d+(\.\d+)" min =" 1" max =" 99" class =" form-control" id =" electric-pole-wire-reach"
@@ -57,6 +61,7 @@ export default {
57
61
data() {
58
62
return pick (
59
63
storeToRefs (useOilFieldStore ()),
64
+ ' addElectricPoles' ,
60
65
' electricPoleEntityName' ,
61
66
' electricPoleIsCustom' ,
62
67
' electricPoleWidth' ,
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ type RequestPropertyGetters = {
8
8
9
9
const requestPropertyGetters : RequestPropertyGetters = {
10
10
addBeacons : ( state ) => state . addBeacons ,
11
- addElectricPoles : ( _ ) => true ,
11
+ addElectricPoles : ( state ) => state . addElectricPoles ,
12
12
addFbeOffset : ( _ ) => false ,
13
13
beaconEntityName : ( state ) => state . beaconEntityName . trim ( ) ,
14
14
beaconHeight : ( state ) => state . beaconHeight ,
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ const defaults = {
11
11
pumpjackModule : 'productivity-module-3' ,
12
12
pumpjackModuleIsCustom : false ,
13
13
addBeacons : true ,
14
+ addElectricPoles : true ,
14
15
overlapBeacons : true ,
15
16
beaconModule : 'speed-module-3' ,
16
17
beaconModuleIsCustom : false ,
@@ -51,6 +52,7 @@ const storeToQuery: StoreToQuery = {
51
52
pumpjackModule : 'pumpMod' ,
52
53
pumpjackModuleIsCustom : 'pumpModCust' ,
53
54
addBeacons : 'beacons' ,
55
+ addElectricPoles : 'poles' ,
54
56
overlapBeacons : 'overlapBeacons' ,
55
57
beaconModule : 'beaconMod' ,
56
58
beaconModuleIsCustom : 'beaconModCust' ,
You can’t perform that action at this time.
0 commit comments