File: //home/arjun/projects/buyercall/buyercall/assets/vue/widgets/Worklist/components/WorkView.vue
<template>
<vue-resizable :active="['r']" width="auto" height="auto" :minWidth="200">
<template v-if="rootState.selectedWork === null">
<div class="card">
<div class="p-4 border-bottom">
<h5>Please select any available task.</h5>
</div>
</div>
</template>
<template v-else>
<template
v-if="
rootState.selectedWork.task_type === 'MISSED_PHONE_CALL_FOLLOW_UP'
"
>
<!-- <task-wrapper></task-wrapper> -->
</template>
<template
v-else-if="
rootState.selectedWork.task_type === 'TEXT_MESSAGE_FOLLOW_UP'
"
>
<task-wrapper :task="rootState.selectedWork">
<message-view :task="rootState.selectedWork"></message-view>
</task-wrapper>
</template>
<template v-else>
<div class="card">
<div class="p-4 border-bottom">
<h5>View for this task have not been set up.</h5>
</div>
</div>
</template>
</template>
</vue-resizable>
</template>
<script>
import VueResizable from 'vue-resizable';
import { mapActions, mapGetters } from 'vuex';
import { ROOT_GETTER } from '../constants';
import TaskWrapper from './TaskWrapper.vue';
import MessageView from './MessageView.vue';
export default {
components: {
VueResizable,
TaskWrapper,
MessageView,
},
computed: {
...mapGetters('root', {
rootState: ROOT_GETTER,
}),
},
};
</script>