aboutsummaryrefslogtreecommitdiff
path: root/resources/js/components/call-sign-description.vue
diff options
context:
space:
mode:
Diffstat (limited to 'resources/js/components/call-sign-description.vue')
-rw-r--r--resources/js/components/call-sign-description.vue10
1 files changed, 8 insertions, 2 deletions
diff --git a/resources/js/components/call-sign-description.vue b/resources/js/components/call-sign-description.vue
index 30cd37d..7ab8b64 100644
--- a/resources/js/components/call-sign-description.vue
+++ b/resources/js/components/call-sign-description.vue
@@ -2,7 +2,7 @@
<div>
<div class="form-group">
<label for="special-call">Special Callsign:</label>
- <select class="form-control" id="special-call" v-model="selected" name="scall" required>
+ <select class="form-control" :class="{ 'is-invalid': isInvalid }" id="special-call" v-model="selected" :name="name" required>
<option v-for="option in options" :key="option.id" :value="option.sign" v-text="option.sign"></option>
</select>
</div>
@@ -17,10 +17,16 @@
<script>
export default {
+ props: [ 'name', 'old', 'isInvalid' ],
mounted() {
this.$store.dispatch('pullSigns').then(() => {
try {
- this.$store.dispatch('setSelectedSign', this.$store.getters.getSigns[0].sign);
+ if (this.old) {
+ this.$store.dispatch('setSelectedSign', this.old);
+ }
+ else {
+ this.$store.dispatch('setSelectedSign', this.$store.getters.getSigns[0].sign);
+ }
}
catch {
console.log('No call signs!');