diff --git a/src/components/EditSpot.vue b/src/components/EditSpot.vue
index d34520b..91d8717 100644
--- a/src/components/EditSpot.vue
+++ b/src/components/EditSpot.vue
@@ -19,16 +19,19 @@
-
+
- MHz
+ QRT
+
+
+ Test
- {{ curModeDisp }}
+ {{ curModeDisp }}
@@ -106,7 +109,7 @@ export default {
}
},
isInputValid () {
- return /^[a-zA-Z0-9/]{3,}$/.test(this.callsign) && this.summit !== null && this.isSummitValid(this.summit) && this.frequency && this.mode
+ return /^[a-zA-Z0-9/]{3,}$/.test(this.callsign) && this.summit !== null && this.isSummitValid(this.summit) && (this.type !== 'NORMAL' || (this.frequency && this.mode))
},
summitLabelClass () {
if (!this.summit || this.isSummitValid(this.summit)) {
@@ -171,6 +174,7 @@ export default {
this.frequency = this.spot.frequency
this.mode = this.spot.mode.toLowerCase()
this.comments = (this.spot.comments ? this.spot.comments.replace('[sotl.as]', '').trim() : '')
+ this.type = this.spot.type ?? 'NORMAL'
}
}
}
@@ -197,11 +201,16 @@ export default {
summitCode: this.summitCode.substring(this.summitCode.indexOf('/') + 1),
frequency: this.frequency,
mode: this.allModes()[this.mode],
+ type: this.type,
comments
}
if (this.spot && this.spot.id) {
params.id = this.spot.id
}
+ if (this.type !== 'NORMAL') {
+ delete params.mode
+ delete params.frequency
+ }
this.posting = true
this.postSotaWatchSpot(params)
.then(response => {
@@ -214,6 +223,7 @@ export default {
activatorCallsign: response.data.activatorCallsign,
callsign: response.data.callsign,
comments: response.data.comments
+ type: response.data.type
})
this.$parent.close()
@@ -240,6 +250,13 @@ export default {
this.$nextTick(() => {
this.$refs.summitCode.checkHtml5Validity()
})
+ },
+ setType (type) {
+ if (this.type === type) {
+ this.type = 'NORMAL'
+ } else {
+ this.type = type
+ }
}
},
data () {
@@ -255,7 +272,8 @@ export default {
summit: null,
summitInvalid: false,
summitLoading: false,
- posting: false
+ posting: false,
+ type: 'NORMAL'
}
}
}
diff --git a/src/components/FrequencyInput.vue b/src/components/FrequencyInput.vue
index 24424dd..f8fc455 100644
--- a/src/components/FrequencyInput.vue
+++ b/src/components/FrequencyInput.vue
@@ -1,11 +1,12 @@
-
+
+
+