mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-27 11:41:09 -04:00
Merge branch 'add_status_estimate' into 'master'
add status filter
This commit is contained in:
@ -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",
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user