<template>
  <wrapper
    fill
    margin
    padding
    background
  >
    <schedule
      class="l-flex__auto"
      :schedule="scheduleId"
      @submit="onSubmit"
    />
  </wrapper>
</template>

<script>
export default {
  name: 'ScheduleDesginer',
  computed: {
    scheduleId () {
      return this.$route.params.id
    }
  },
  methods: {
    onSubmit () {
      this.$router.replace({
        name: this.$route.meta.info.redirect,
        params: { refresh: true }
      })
    }
  }
}
</script>
