Remove frequency

This commit is contained in:
portree_kid
2020-04-27 15:23:05 +02:00
parent 90740751dd
commit fb72f8d760
4 changed files with 23 additions and 5 deletions
+1 -1
View File
@@ -98,6 +98,6 @@
<style lang="scss" scoped>
.el-row {
padding: 0em;
margin-bottom: 10px;
margin-bottom: 5px;
}
</style>
+3
View File
@@ -455,6 +455,9 @@
return
}
this.$store.dispatch('updatedParking', this.$store.state.Editable.data.parking);
if (this.featureLookup[this.$store.state.Editable.index]===undefined) {
return
}
this.featureLookup[this.$store.state.Editable.index].forEach((element,index) => {
if (element instanceof L.ParkingSpot) {
element.options.attributes = Object.assign({}, this.$store.state.Editable.data.parking)
+10 -4
View File
@@ -12,7 +12,7 @@
></el-option>
</el-select>
</el-col>
<el-col :span="15">
<el-col :span="13">
<el-input
placeholder="Please input frequency"
v-model="value"
@@ -20,14 +20,19 @@
v-bind:class="{ invalid: !ok && editing}"
></el-input>
</el-col>
<el-col :span="2">
<el-button @click="remove" v-if="editing" ><i class="fas fa-trash-alt"></i></el-button>
</el-col>
</el-row>
</span>
</div>
</template>
<script lang="js">
import EditButton from './EditButton'
/* eslint-disable */
export default {
name: 'frequency',
components: { EditButton },
props: {frequency: Object},
mounted () {
},
@@ -37,6 +42,9 @@
}
},
methods: {
remove () {
this.$store.dispatch('removeFrequency', this.frequency)
},
isValid (frequency) {
let ok = frequency >= 118 && frequency <= 137
if (!ok) {
@@ -87,7 +95,7 @@
value: {
// getter
get: function () {
return this.frequency.value;
return this.frequency.value;
},
// setter
set: function (newValue) {
@@ -97,8 +105,6 @@
}
}
}
</script>
<style scoped lang="scss">