chore: Adds the ability to see the existing filter when we apply a new filter (#6310)

* feat: Adds existing filter to advance filter modal when we apply a filter
This commit is contained in:
Sivin Varghese
2023-01-24 09:10:17 +05:30
committed by GitHub
parent 9782f71bdf
commit af5c71e060
6 changed files with 119 additions and 12 deletions

View File

@@ -7,9 +7,6 @@
>
{{ value['TEXT'] }}
</option>
<option value="all">
{{ $t('CHAT_LIST.FILTER_ALL') }}
</option>
</select>
</template>

View File

@@ -77,6 +77,10 @@ export default {
type: Array,
default: () => [],
},
initialAppliedFilters: {
type: Array,
default: () => [],
},
},
validations: {
appliedFilters: {
@@ -102,7 +106,7 @@ export default {
data() {
return {
show: true,
appliedFilters: [],
appliedFilters: this.initialAppliedFilters,
filterTypes: this.initialFilterTypes,
filterAttributeGroups,
filterGroups: [],
@@ -120,6 +124,7 @@ export default {
this.setFilterAttributes();
this.$store.dispatch('campaigns/get');
if (this.getAppliedConversationFilters.length) {
this.appliedFilters = [];
this.appliedFilters = [...this.getAppliedConversationFilters];
} else {
this.appliedFilters.push({
@@ -230,10 +235,6 @@ export default {
name: statusFilters[status].TEXT,
};
}),
{
id: 'all',
name: this.$t('CHAT_LIST.FILTER_ALL'),
},
];
case 'assignee_id':
return this.$store.getters['agents/getAgents'];