2019-08-14 09:48:44 +00:00
|
|
|
<template>
|
2019-09-02 14:56:28 +00:00
|
|
|
<transition-group
|
|
|
|
name="wizard-items"
|
|
|
|
tag="div"
|
|
|
|
class="wizard-box flex-child-shrink"
|
|
|
|
:class="classObject"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-for="item in items"
|
2019-09-02 15:49:25 +00:00
|
|
|
:key="item.route"
|
2019-09-02 14:56:28 +00:00
|
|
|
class="item"
|
|
|
|
:class="{ active: isActive(item), over: isOver(item) }"
|
|
|
|
>
|
|
|
|
<h3>
|
|
|
|
{{ item.title }}
|
|
|
|
<span v-if="isOver(item)" class="completed">
|
|
|
|
<i class="ion-checkmark"></i>
|
2019-08-14 09:48:44 +00:00
|
|
|
</span>
|
2019-09-02 14:56:28 +00:00
|
|
|
</h3>
|
|
|
|
<span class="step">
|
|
|
|
{{ items.indexOf(item) + 1 }}
|
|
|
|
</span>
|
|
|
|
<p>{{ item.body }}</p>
|
|
|
|
</div>
|
|
|
|
</transition-group>
|
2019-08-14 09:48:44 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
/* eslint no-console: 0 */
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
isFullwidth: Boolean,
|
|
|
|
},
|
|
|
|
|
|
|
|
computed: {
|
|
|
|
classObject() {
|
|
|
|
return 'full-width';
|
|
|
|
},
|
|
|
|
activeIndex() {
|
|
|
|
return this.items.findIndex(i => i.route === this.$route.name);
|
|
|
|
},
|
2020-04-06 16:47:07 +00:00
|
|
|
items() {
|
|
|
|
return this.$t('INBOX_MGMT.CREATE_FLOW');
|
|
|
|
},
|
2019-08-14 09:48:44 +00:00
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
isActive(item) {
|
|
|
|
return this.items.indexOf(item) === this.activeIndex;
|
|
|
|
},
|
|
|
|
isOver(item) {
|
|
|
|
return this.items.indexOf(item) < this.activeIndex;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|