Sha256: 61304228aa98143d0af81f38a50a68249d65620ce50938b13c5466c4508b38c6

Contents?: true

Size: 1.16 KB

Versions: 94

Compression:

Stored size: 1.16 KB

Contents

<template>
  <div>
    <step v-show="index === currentStepIndex"
      v-for="(step, index) in feedback_path.steps"
      v-bind:step="step"
      v-bind:last-step="lastStep" />
  </div>
</template>
<script>

import Step from './step/base.vue';
import eventHub from './eventHub';
import store from './store';

export default {
  props: ['feedback_path'],
  components: { Step },
  data: function() {
    return {
      currentStepIndex: 0
    };
  },
  computed: {
    currentStep: function() {
      return this.feedback_path.steps[this.currentStepIndex];
    },
    lastStep: function() {
      return this.currentStepIndex === (this.feedback_path.steps.length - 1);
    }
  },
  methods: {
    nextStep: function(answer) {
      this.currentStepIndex += 1;
      store.addStep(answer);
      return false;
    },
    reset: function() {
      this.currentStepIndex = 0;
      return false;
    }
  },
  mounted: function() {
    eventHub.$on('reset-modal', this.reset);
    eventHub.$on('next-step', this.nextStep);
  },
  beforeDestroy: function() {
    eventHub.$off('next-step');
  }
}
</script>
<style scoped>
.feedback-path {
  display: flex;
  flex-direction: column;
}
</style>

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
station-0.5.16 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.15 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.14 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.13 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.12 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.11 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.10 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.9 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.8 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.7 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.6 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.5 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.4 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.3 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.2 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.1 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.5.0 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.4.9 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.4.8 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue
station-0.4.7 lib/nexmo_developer/app/webpacker/javascript/components/feedback/FeedbackPath.vue