Merge branch 'master'

This commit is contained in:
Mohit Panjwani
2021-12-02 17:49:53 +05:30
2 changed files with 34 additions and 0 deletions

View File

@ -304,8 +304,10 @@
},
"accepted": "Accepted",
"rejected": "Rejected",
"expired": "Expired",
"sent": "Sent",
"draft": "Draft",
"viewed": "Viewed",
"declined": "Declined",
"new_estimate": "New Estimate",
"add_new_estimate": "Add New Estimate",

View File

@ -54,6 +54,16 @@
/>
</BaseInputGroup>
<BaseInputGroup :label="$t('estimates.status')">
<BaseMultiselect
v-model="filters.status"
:options="status"
searchable
:placeholder="$t('general.select_a_status')"
@update:modelValue="setActiveTab"
@remove="clearStatusSearch()"
/>
</BaseInputGroup>
<BaseInputGroup :label="$t('general.from')">
<BaseDatePicker
v-model="filters.from_date"
@ -329,6 +339,11 @@ function hasAtleastOneAbility() {
])
}
async function clearStatusSearch(removedOption, id) {
filters.status = ''
refreshTable()
}
function refreshTable() {
tableComponent.value && tableComponent.value.refresh()
}
@ -443,6 +458,23 @@ function setActiveTab(val) {
case 'SENT':
activeTab.value = t('general.sent')
break
case 'VIEWED':
activeTab.value = t('estimates.viewed')
break
case 'EXPIRED':
activeTab.value = t('estimates.expired')
break
case 'ACCEPTED':
activeTab.value = t('estimates.accepted')
break
case 'REJECTED':
activeTab.value = t('estimates.rejected')
break
default:
activeTab.value = t('general.all')
break