Enhancement: Paginate conversation calls in tabs (#560)
* Use conversationPage module for pagination * Load more conversations * Reset list if conversation status is changed * Add specs to conversationPage * Reset filter when page is re-mounted * Update text * Update text
This commit is contained in:
parent
e5bc372a29
commit
0740d4762f
28 changed files with 395 additions and 141 deletions
|
@ -16,8 +16,12 @@
|
|||
/* global bus */
|
||||
import { mapGetters } from 'vuex';
|
||||
import Spinner from 'shared/components/Spinner';
|
||||
import wootConstants from '../../constants';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Spinner,
|
||||
},
|
||||
props: ['conversationId'],
|
||||
data() {
|
||||
return {
|
||||
|
@ -29,19 +33,23 @@ export default {
|
|||
currentChat: 'getSelectedChat',
|
||||
}),
|
||||
currentStatus() {
|
||||
const ButtonName = this.currentChat.status === 0 ? 'Resolve' : 'Reopen';
|
||||
const ButtonName =
|
||||
this.currentChat.status === wootConstants.STATUS_TYPE.OPEN
|
||||
? this.$t('CONVERSATION.HEADER.RESOLVE_ACTION')
|
||||
: this.$t('CONVERSATION.HEADER.REOPEN_ACTION');
|
||||
return ButtonName;
|
||||
},
|
||||
buttonClass() {
|
||||
return this.currentChat.status === 0 ? 'success' : 'warning';
|
||||
return this.currentChat.status === wootConstants.STATUS_TYPE.OPEN
|
||||
? 'success'
|
||||
: 'warning';
|
||||
},
|
||||
buttonIconClass() {
|
||||
return this.currentChat.status === 0 ? 'ion-checkmark' : 'ion-refresh';
|
||||
return this.currentChat.status === wootConstants.STATUS_TYPE.OPEN
|
||||
? 'ion-checkmark'
|
||||
: 'ion-refresh';
|
||||
},
|
||||
},
|
||||
components: {
|
||||
Spinner,
|
||||
},
|
||||
methods: {
|
||||
toggleStatus() {
|
||||
this.isLoading = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue